subtitle:( IS there ANYONE that can give me some additional info
about
key commands on SDK 3.5 ??? )
Dear All,
I am developing a springboard-driven version of the freeware game
Subhunt, emulating the button pression with interrupt coming from the
board. However, there is something wrong in the key down generation
with keySetMask function,
Everything works fine, the interrupt is served by the int.handler,
the event is correctly posted to the card handler, but the
KeyCurrentState function does not intercept our modification of the
key mask.
I am working on SDK 3.5, using gcc ( egcs 2.91.57 - 1.1 )
development
platform.
Could you help me, or ,could you give me more information about the
key management ?
Thank you very much for your help
Best Regards,
Loris
P.S. Here below are interupt handler, cardEvent handler and the
polling function coming from the original game ( untouched!)
------------------------------------------------------------
void * STAppIntHandler( UInt32 cardParam, Boolean *sysAwakeP)
{
STGlobalsType *gP = (STGlobalsType*) cardParam;
UInt16 err;
UInt8 enable;
itr_palm(); // simply a function that modify
variables
HsCardEventPost(1, 1, 1 );
// enable = false;
// disable interrupt
// err = HsCardAttrSet ( gP->cardNo, hsCardAttrIntEnable,
&enable );
}
-------------------------------------------
static void
STCardEvtHandler(UInt32 cardparam, UInt16 evtNum, UInt16 evtpParam )
{
.....
.....
switch (wrd.vocId)
{
case LEFT:
butt = keyBitHard1;
//moveLeftKey
break;
case RIGHT:
butt = keyBitHard4;
//moveRightKey
break;
....
KeySetMask( butt );
------------------------------------------
static void GameStateElapse ()
{
UInt32 hardKeyState;
int chance;
Boolean updateChargesDisplayed = false;
int side;
....
....
// Move the ship
hardKeyState = KeyCurrentState() & keysAllowedMask;
....
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/