Game A Gogo wrote:That function seems to be a bit strange to work with, but still a nice way of doing things
My way would involve casting the GetKeyUp(); and GetKeyDown(); like the GetKeyState();
I built mine to be like GetKeyState. To me state would be pressed, released, or neither, hence -1, 0, and 1. And with this method it works exactly like GetKeyState, except it has a state for key up (all you have to do is call it when you need it). But I guess that is a matter of opinion.
Game A Gogo wrote:Urg, for some reason I can't get malloc and writting memory to it quite right, so I give up!
I think i'm starting to preffer Visual Studio C++ over GE C, in VSC++, you get a lot more flexibilty. To anyone interested, here's the code I came up so far. But don't use it, it's broken and probably really badly written:
One thing that might be going wrong is that the memory returned by GetKeyState is over 400 characters long. For instance the KEY_RIGHT definition resolves to 275. Anyway, I'm surprised you are just starting to prefer other editors. gE's editor and its version of C in general is pretty restrictive. You have to worry about if things are implemented or not, and you don't get printf (among other things).