Jun. 11th, 2005

mrlachatte: (Default)
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 :

Oh horror

Jun. 11th, 2005 11:40 pm
mrlachatte: (Default)
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.

December 2007

S M T W T F S
      1
2345678
9101112131415
16171819202122
23242526 272829
3031     

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 4th, 2025 10:50 pm
Powered by Dreamwidth Studios