I just looked it up, and in C it's defined as const int too. So I recommend you try doing that, because if it's compiling fine odds are you're going to do something and then your code will break because of it. It would probably be better to use const int, because it's better practice and int const will probably end up giving you some bugs eventually. It's better to get into good habits now then find out in 2 months that no-one understands why you're declaring everything as int const.
However,
I don't know C, and maybe that's how SDL is supposed to work in C. If it's compiling fine try doing it both ways and see if your code breaks when you do it my way.
I looked it up, now I am pretty sure it's just a style and preference thing.
Why don't you just put:
[source lang="java"]#define SDLK KEY[/source]
I could, but that would also require me to include SDL in event.h, because I was intending to use the KEY_<key> constants in other modules of the game.
... You may for example define things like FIRE_KEY, JUMP_KEY, INVENTORY_KEY (whose values may actually vary based on configuration files or platform)...
Oh, this might be the solution. If I read that right, you mean to define extern FIRE_KEY and JUMP_KEY and etc in the header file, and set their values to some SDL_K's according to some configuration files in the .c file?
In my experience, the ASCII character values are comparable to SDLK enums, for all letter keys. So, assuming that you have a function like `int getHitKey(Uint32 sdlk)`, calling `getHitKey('a')` should work as expected in many cases, to return the status of that particular key.
The rest of the enums can be manually re-defined, because there's not that many of them, and you usually only need a subset of those.
Oh, thanks for reminding. I was staying away from it because I remember the docs said somewhere that it's not always true for all keyboards. I'll try this too, then.