8 DECLSPEC
int isKeyDown(int key
) {
10 Uint8
*keystate
= SDL_GetKeyState(&num
);
11 return keystate
[key
]? 1:0;
14 DECLSPEC
int isKeyPressed(int key
) {
17 Uint8
*keystate
= SDL_GetKeyState(&num
);
19 oldkeys
=calloc(num
,1);
20 if (keystate
[key
]&&!oldkeys
[key
])
22 oldkeys
[key
] = keystate
[key
];