2005-06-11

mrlachatte: (Default)
2005-06-11 01:41 am
Entry tags:

Balrogs demand the right to wear toe socks

I just finished adding full chat support to the game, you can now send any message up to 60 characters long, but I have the feeling that my input system is going to cause me troubles. I don't even remember why I added this SDLK_* wrapper thing, it actually just makes things harder I think :
mrlachatte: (Default)
2005-06-11 11:40 pm
Entry tags:

Oh horror

It's true, I did screw up my input system rather badly. Who'd've thought that SDL keysyms mapped perfectly to the ascii character set? Not I!

I've got a tendancy to overcomplicate things, and this is a prime example. I had this clunky system of KEY_ enumerations which mapped to the SDL symbols like so: KEY_c - KEY_a + 'a'. Unfortunately, that only worked for letters, so of course I wrote a whole seperate macro for numbers. Then there was punctuation, where I couldn't even think of a way to make it work so I did it all manually. Now all of that is replaced with code about 1/5 of the total size, which actually includes every key I want as well. At least it ended well!

1:18 AM ninja edit: Shift is also working perfectly now, I just had to define a bunch of special conversions that toupper() doesn't handle (for non-alphabet characters). Chatting seems to be complete for the moment. On to the next feature!

East Coast Band Championships begin in 8 hours, and the Lake Macquarrie Concert Band will be there. I will finally have four lovely, $10,000+ timpanis from the Conservatory to play with, instead of the two crapboxes I have to use at band practice. I'm getting hard just thinking about it.