========================================================================== TITLE : Getflags for Quake2 deathmatch. FILENAME : getflags.exe getflags.c (source code) getflags.txt (this file) VERSION : 1.2 DATE : June 8, 1998 AUTHOR : John Wolanski EMAIL : jpwolanski@juno.com INFO : Lets you input the DM flags number for Quake2 deathmatch servers and shows which flags are set in the game. For instance, if you're using GameSpy to find a server and the description box shows that the server's DMFlags are 1556, instead of you trying to guess which flags are set, or figuring it out with a calculator, you'll just enter 1556 when you run Getflags, and you'll get a list of all the flags set in the game (in this instance: weapons stay, instant powerups, spawn farthest, and force respawn)! I do know that GameSpy's latest version will automatically tell you exactly which flags are set, but I didn't know that when I wrote this program, so I went ahead and made it anyway, even though it's not really needed anymore... This is my first C program! :-) CREDITS : Peter Aitken & Bradley L. Jones, authors of Teach Yourself C in 21 Days, by SAMS Publishing. (I was able to code this program just after finishing week 1!) id Software for Quake2. Larry, my boss, for helping me out along the way and giving me the advice that let me overcome a major block I was having with the coding. USAGE : Run the program and enter the DM flags value you want to determine. Enter 0 to quit. BUGS : None known. However, if you try to enter a value with a decimal point in it, whatever is after the decimal point will be cut off, giving you the flags for the number before the decimal point (whole numbers only, in other words). Entering a negative zero (e.g.- "-0") will be the same as entering "0" (quit the program). Also, I don't think 65536 is a used flag in the game, so if this value finds it's way into your inputed flag value, you'll get a message that says so -- it's not a bug! If you enter characters instead of numbers, Getflags'll run in an unending loop, so don't do it! ========================================================================== MISCELLANEOUS INFO Was compiled and tested on an Intel 233MMX Pentium with Borland C++ v3.1 in Windows95 as well as on an AMD K6-166 with whatever version of gcc comes with RedHat 5.0. More DM flags can be added by changing the value of MAX_FLAGS in the code to the new number of flags, and adding the appropriate statements that display the flags' descriptions at the end of the main() function, and then recompiling the code. However, this only takes into account new flags that progress naturally from the previous highest flag (i.e.- previous flag value * 2). As of version 1.2 (Jun. 8, 1998), the next logical flag value would be 1048576. If there are any "jumps" between flag values (such as between 32768 and 131072), you're going to end up with the missing values stored in the program somewhere, and you're going to have to keep this in consideration when adding new flag values or else do some overhauling of the code (which would probably involve at least as much consideration ;). Once I learn how to do it, I *might* add in a command line option where you'll just type 'getflags ' to run the program and have it display the flag descriptions instead of running the program and then entering the dmflags value. But since most people don't have an open DOS window on their desktop all the time, and would just click an icon to run Getflags, it would probably be pointless. ========================================================================== COPYRIGHT INFO The source code is (should've been) included with this. Feel free to do what you want with it, although if you change it or want to redistribute it or anything, please give me credit for the original code and drop me a line saying what you're doing with it. I'd especially like to see any changes/improvements made to the code. ========================================================================== WHERE TO GET THIS FILE ftp.cdrom.com/pub/quake2 (one of the directories in there...) ==========================================================================