Noticing line 38 of SLD_keysysm.h, it says:
/* The keyboard syms have been cleverly chosen to map to ASCII */
I can’t seem to figure out how to take advantage of this. For example, how
would I map the SDL_RETURN key to “fire the BFG”. I’d like the proper key to
sit in a data file and then parse this data file in the code. Something like this:
///////////////////////
//data.dat
SDL_RETURN
EOF
///////////////////////
///////////////////////
// foobar.cpp
//
void Load()
{
ifstream fin(“data.dat”);
string strFire;
fin >> strFire;
// Now “SDL_RETURN” should be sitting in fire
// Need to get SDL_RETURN into kFire
SDLKey kFire = static_cast<SDLKey>(atoi(strFire.c_str()));
}
Is this the correct way?
P.