Annotation of quake1/quakedef.h, revision 1.1.1.2

1.1       root        1: // quakedef.h -- primary header for client
                      2: 
1.1.1.2 ! root        3: //#define      GLTEST                  // experimental stuff
        !             4: 
1.1       root        5: #define        QUAKE_GAME                      // as opposed to utilities
                      6: 
1.1.1.2 ! root        7: #define        VERSION                         1.07
        !             8: #define        GLQUAKE_VERSION         0.91
        !             9: #define        D3DQUAKE_VERSION        0.01
        !            10: #define        WINQUAKE_VERSION        0.993
1.1       root       11: 
                     12: //define       PARANOID                        // speed sapping error checking
                     13: 
1.1.1.2 ! root       14: #ifdef QUAKE2
        !            15: #define        GAMENAME        "id1"           // directory to look in by default
        !            16: #else
        !            17: #define        GAMENAME        "id1"
        !            18: #endif
        !            19: 
1.1       root       20: #include <math.h>
                     21: #include <string.h>
                     22: #include <stdarg.h>
                     23: #include <stdio.h>
                     24: #include <stdlib.h>
                     25: #include <setjmp.h>
                     26: 
1.1.1.2 ! root       27: #if defined(_WIN32) && !defined(WINDED)
        !            28: 
        !            29: #if defined(_M_IX86)
        !            30: #define __i386__       1
        !            31: #endif
        !            32: 
        !            33: void   VID_LockBuffer (void);
        !            34: void   VID_UnlockBuffer (void);
        !            35: 
        !            36: #else
        !            37: 
        !            38: #define        VID_LockBuffer()
        !            39: #define        VID_UnlockBuffer()
        !            40: 
        !            41: #endif
        !            42: 
1.1       root       43: #ifdef __i386__
                     44: #define id386  1
                     45: #else
                     46: #define id386  0
                     47: #endif
                     48: 
                     49: #if id386
                     50: #define UNALIGNED_OK   1       // set to 0 if unaligned accesses are not supported
                     51: #else
                     52: #define UNALIGNED_OK   0
                     53: #endif
                     54: 
                     55: // !!! if this is changed, it must be changed in d_ifacea.h too !!!
                     56: #define CACHE_SIZE     32              // used to align key data structures
                     57: 
                     58: #define UNUSED(x)      (x = x) // for pesky compiler / lint warnings
                     59: 
1.1.1.2 ! root       60: #define        MINIMUM_MEMORY                  0x550000
        !            61: #define        MINIMUM_MEMORY_LEVELPAK (MINIMUM_MEMORY + 0x100000)
        !            62: 
        !            63: #define MAX_NUM_ARGVS  50
1.1       root       64: 
                     65: // up / down
                     66: #define        PITCH   0
                     67: 
                     68: // left / right
                     69: #define        YAW             1
                     70: 
                     71: // fall over
                     72: #define        ROLL    2
                     73: 
                     74: 
                     75: #define        MAX_QPATH               64                      // max length of a quake game pathname
                     76: #define        MAX_OSPATH              128                     // max length of a filesystem pathname
                     77: 
                     78: #define        ON_EPSILON              0.1                     // point on plane side epsilon
                     79: 
                     80: #define        MAX_MSGLEN              8000            // max length of a reliable message
                     81: #define        MAX_DATAGRAM    1024            // max length of unreliable message
                     82: 
                     83: //
                     84: // per-level limits
                     85: //
1.1.1.2 ! root       86: #define        MAX_EDICTS              600                     // FIXME: ouch! ouch! ouch!
1.1       root       87: #define        MAX_LIGHTSTYLES 64
                     88: #define        MAX_MODELS              256                     // these are sent over the net as bytes
                     89: #define        MAX_SOUNDS              256                     // so they cannot be blindly increased
                     90: 
                     91: #define        SAVEGAME_COMMENT_LENGTH 39
                     92: 
                     93: #define        MAX_STYLESTRING 64
                     94: 
                     95: //
                     96: // stats are integers communicated to the client by the server
                     97: //
                     98: #define        MAX_CL_STATS            32
                     99: #define        STAT_HEALTH                     0
                    100: #define        STAT_FRAGS                      1
                    101: #define        STAT_WEAPON                     2
                    102: #define        STAT_AMMO                       3
                    103: #define        STAT_ARMOR                      4
                    104: #define        STAT_WEAPONFRAME        5
                    105: #define        STAT_SHELLS                     6
                    106: #define        STAT_NAILS                      7
                    107: #define        STAT_ROCKETS            8
                    108: #define        STAT_CELLS                      9
                    109: #define        STAT_ACTIVEWEAPON       10
                    110: #define        STAT_TOTALSECRETS       11
                    111: #define        STAT_TOTALMONSTERS      12
                    112: #define        STAT_SECRETS            13              // bumped on client side by svc_foundsecret
                    113: #define        STAT_MONSTERS           14              // bumped by svc_killedmonster
                    114: 
1.1.1.2 ! root      115: // stock defines
        !           116: 
1.1       root      117: #define        IT_SHOTGUN                              1
                    118: #define        IT_SUPER_SHOTGUN                2
                    119: #define        IT_NAILGUN                              4
                    120: #define        IT_SUPER_NAILGUN                8
                    121: #define        IT_GRENADE_LAUNCHER             16
                    122: #define        IT_ROCKET_LAUNCHER              32
                    123: #define        IT_LIGHTNING                    64
1.1.1.2 ! root      124: #define IT_SUPER_LIGHTNING      128
        !           125: #define IT_SHELLS               256
        !           126: #define IT_NAILS                512
        !           127: #define IT_ROCKETS              1024
        !           128: #define IT_CELLS                2048
        !           129: #define IT_AXE                  4096
        !           130: #define IT_ARMOR1               8192
        !           131: #define IT_ARMOR2               16384
        !           132: #define IT_ARMOR3               32768
        !           133: #define IT_SUPERHEALTH          65536
        !           134: #define IT_KEY1                 131072
        !           135: #define IT_KEY2                 262144
1.1       root      136: #define        IT_INVISIBILITY                 524288
                    137: #define        IT_INVULNERABILITY              1048576
                    138: #define        IT_SUIT                                 2097152
                    139: #define        IT_QUAD                                 4194304
1.1.1.2 ! root      140: #define IT_SIGIL1               (1<<28)
        !           141: #define IT_SIGIL2               (1<<29)
        !           142: #define IT_SIGIL3               (1<<30)
        !           143: #define IT_SIGIL4               (1<<31)
        !           144: 
        !           145: //===========================================
        !           146: //rogue changed and added defines
        !           147: 
        !           148: #define RIT_SHELLS              128
        !           149: #define RIT_NAILS               256
        !           150: #define RIT_ROCKETS             512
        !           151: #define RIT_CELLS               1024
        !           152: #define RIT_AXE                 2048
        !           153: #define RIT_LAVA_NAILGUN        4096
        !           154: #define RIT_LAVA_SUPER_NAILGUN  8192
        !           155: #define RIT_MULTI_GRENADE       16384
        !           156: #define RIT_MULTI_ROCKET        32768
        !           157: #define RIT_PLASMA_GUN          65536
        !           158: #define RIT_ARMOR1              8388608
        !           159: #define RIT_ARMOR2              16777216
        !           160: #define RIT_ARMOR3              33554432
        !           161: #define RIT_LAVA_NAILS          67108864
        !           162: #define RIT_PLASMA_AMMO         134217728
        !           163: #define RIT_MULTI_ROCKETS       268435456
        !           164: #define RIT_SHIELD              536870912
        !           165: #define RIT_ANTIGRAV            1073741824
        !           166: #define RIT_SUPERHEALTH         2147483648
        !           167: 
        !           168: //MED 01/04/97 added hipnotic defines
        !           169: //===========================================
        !           170: //hipnotic added defines
        !           171: #define HIT_PROXIMITY_GUN_BIT 16
        !           172: #define HIT_MJOLNIR_BIT       7
        !           173: #define HIT_LASER_CANNON_BIT  23
        !           174: #define HIT_PROXIMITY_GUN   (1<<HIT_PROXIMITY_GUN_BIT)
        !           175: #define HIT_MJOLNIR         (1<<HIT_MJOLNIR_BIT)
        !           176: #define HIT_LASER_CANNON    (1<<HIT_LASER_CANNON_BIT)
        !           177: #define HIT_WETSUIT         (1<<(23+2))
        !           178: #define HIT_EMPATHY_SHIELDS (1<<(23+3))
1.1       root      179: 
1.1.1.2 ! root      180: //===========================================
1.1       root      181: 
                    182: #define        MAX_SCOREBOARD          16
                    183: #define        MAX_SCOREBOARDNAME      32
                    184: 
                    185: #define        SOUND_CHANNELS          8
                    186: 
1.1.1.2 ! root      187: // This makes anyone on id's net privileged
        !           188: // Use for multiplayer testing only - VERY dangerous!!!
        !           189: // #define IDGODS
1.1       root      190: 
                    191: #include "common.h"
                    192: #include "bspfile.h"
                    193: #include "vid.h"
                    194: #include "sys.h"
                    195: #include "zone.h"
                    196: #include "mathlib.h"
                    197: 
                    198: typedef struct
                    199: {
                    200:        vec3_t  origin;
                    201:        vec3_t  angles;
                    202:        int             modelindex;
                    203:        int             frame;
                    204:        int             colormap;
                    205:        int             skin;
                    206:        int             effects;
                    207: } entity_state_t;
                    208: 
                    209: 
                    210: #include "wad.h"
                    211: #include "draw.h"
                    212: #include "cvar.h"
                    213: #include "screen.h"
                    214: #include "net.h"
                    215: #include "protocol.h"
                    216: #include "cmd.h"
                    217: #include "sbar.h"
                    218: #include "sound.h"
                    219: #include "render.h"
                    220: #include "client.h"
                    221: #include "progs.h"
                    222: #include "server.h"
1.1.1.2 ! root      223: 
        !           224: #ifdef GLQUAKE
        !           225: #include "gl_model.h"
        !           226: #else
1.1       root      227: #include "model.h"
                    228: #include "d_iface.h"
1.1.1.2 ! root      229: #endif
        !           230: 
        !           231: #include "input.h"
1.1       root      232: #include "world.h"
                    233: #include "keys.h"
                    234: #include "console.h"
                    235: #include "view.h"
                    236: #include "menu.h"
                    237: #include "crc.h"
                    238: #include "cdaudio.h"
                    239: 
1.1.1.2 ! root      240: #ifdef GLQUAKE
        !           241: #include "glquake.h"
        !           242: #endif
        !           243: 
1.1       root      244: //=============================================================================
                    245: 
                    246: // the host system specifies the base of the directory tree, the
                    247: // command line parms passed to the program, and the amount of memory
                    248: // available for the program to use
                    249: 
                    250: typedef struct
                    251: {
                    252:        char    *basedir;
                    253:        char    *cachedir;              // for development over ISDN lines
                    254:        int             argc;
                    255:        char    **argv;
                    256:        void    *membase;
                    257:        int             memsize;
                    258: } quakeparms_t;
                    259: 
                    260: 
                    261: //=============================================================================
                    262: 
                    263: 
                    264: 
                    265: extern qboolean noclip_anglehack;
                    266: 
                    267: 
                    268: //
                    269: // host
                    270: //
                    271: extern quakeparms_t host_parms;
                    272: 
                    273: extern cvar_t          sys_ticrate;
                    274: extern cvar_t          sys_nostdout;
                    275: extern cvar_t          developer;
                    276: 
                    277: extern qboolean        host_initialized;               // true if into command execution
                    278: extern double          host_frametime;
                    279: extern byte            *host_basepal;
                    280: extern byte            *host_colormap;
                    281: extern int                     host_framecount;        // incremented every frame, never reset
                    282: extern double          realtime;                       // not bounded in any way, changed at
                    283:                                                                                // start of every frame, never reset
                    284: 
                    285: void Host_ClearMemory (void);
                    286: void Host_ServerFrame (void);
                    287: void Host_InitCommands (void);
                    288: void Host_Init (quakeparms_t *parms);
                    289: void Host_Shutdown(void);
                    290: void Host_Error (char *error, ...);
                    291: void Host_EndGame (char *message, ...);
                    292: void Host_Frame (float time);
                    293: void Host_Quit_f (void);
                    294: void Host_ClientCommands (char *fmt, ...);
                    295: void Host_ShutdownServer (qboolean crash);
                    296: 
1.1.1.2 ! root      297: extern qboolean                msg_suppress_1;         // suppresses resolution and cache size console output
        !           298:                                                                                //  an fullscreen DIB focus gain/loss
        !           299: extern int                     current_skill;          // skill level for currently loaded level (in case
        !           300:                                                                                //  the user changes the cvar while the level is
        !           301:                                                                                //  running, this reflects the level actually in use)
        !           302: 
        !           303: extern qboolean                isDedicated;
        !           304: 
        !           305: extern int                     minimum_memory;
        !           306: 
        !           307: //
        !           308: // chase
        !           309: //
        !           310: extern cvar_t  chase_active;
        !           311: 
        !           312: void Chase_Init (void);
        !           313: void Chase_Reset (void);
        !           314: void Chase_Update (void);

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.