: Like I said before, "to*" won't work becuase they need an "unsigned char" variable, which won't work for my needs. I don't know what I was smoking last night, but it must have been good, because I was trying to call the macros like functions, rather than using them in an expression. They work fine.
:
: UPPER(Player[LoginID].Buffer[0]); //Wrong
: Player[LoginID].Buffer[0] = UPPER(Player[LoginID].Buffer[0]); //Right
:
: I am currently writing descriptions and setting bonuses for races in the game and testing it out. So far it works flawlessly and generates no errors (except a single recv() error if you disconnect without telling the server you're leaving with a quit or exit command). You can go as far as selecting your race and seeing race descriptions right now. I plan on opening the server with five races and three classes to choose from. In the end, there can be an unlimited number of races and classes, but 5*3=15 possible routes, and if you do a multiclass character you can multiply 15 by 9 to get the total number of opening setups you can choose from. Now if only I found time to code the client...
:
: -
Sephiroth
:
:
Write a macro to accept a pointer - you will call it once and with better performance (server code needs that!):
#define _2UPCASEBYREF(pChar) \
if (((pChar)[0] >= 'a') && ((pChar)[0] <= 'z')) { *pChar -= 0x20; }
#define _2LOCASEBYREF(pChar) \
if (((pChar)[0] >= 'A') && ((pChar)[0] <= 'Z')) { *pChar += 0x20; }