Okay, this is in correlation to a problem I had earlier. I am attempting to create a version of geyKeyboardState that runs on events, so instead of updating it constantly, it only updates when a new event occurs. for those of you who don't understand why I do it this way, you have to call al_get_keyboard_state(foo) every time the keyboard state needs to update. it does not do so automatically, and any reallocation is not done until you tell it to. and since I use events for everything else, why not use it for this too?
My Current solution uses a struct:
and
and is called in main like so:
my problem is that I get compile errors wherever I put the word keyHeld in main. the error is always expected a ";" before ".". I had a buddy look at it, and he didn't know what the problem was either. perhaps we are both a bit sleep deprived, and overlooked something stupid. regardless, any help would be appreciated
keyHeld::keyDown(ev.keyboard.keycode);?
I now feel stupid. I guess fatigue really can screw you up. thanks for the really simple fix. I cannot believe we missed that