]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
renamed byte to qbyte throughout engine to eliminate a mingw conflict
authorlordhavoc <lordhavoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 27 Feb 2002 03:58:07 +0000 (03:58 +0000)
committerlordhavoc <lordhavoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 27 Feb 2002 03:58:07 +0000 (03:58 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@1579 d7cf8633-e32d-0410-b094-e92efae38249

80 files changed:
bspfile.h
cd_linux.c
cd_win.c
cdaudio.h
cgamevm.c
cgamevm.h
cl_input.c
cl_main.c
cl_parse.c
cl_particles.c
cl_screen.c
cl_screen.h
cl_tent.c
client.h
common.c
common.h
console.h
crc.c
crc.h
fractalnoise.c
gl_backend.c
gl_draw.c
gl_models.c
gl_rsurf.c
gl_textures.c
image.c
image.h
mathlib.c
mathlib.h
menu.c
model_alias.c
model_brush.c
model_brush.h
model_shared.c
model_shared.h
model_sprite.c
modelgen.h
net.h
net_dgrm.c
net_loop.c
net_udp.c
net_udp.h
net_wins.c
net_wins.h
net_wipx.c
net_wipx.h
palette.c
palette.h
pr_cmds.c
pr_comp.h
pr_edict.c
pr_execprogram.h
progs.h
protocol.c
protocol.h
quakedef.h
r_clip.c
r_crosshairs.c
r_explosion.c
r_light.c
r_particles.c
r_sky.c
r_textures.h
render.h
sbar.c
server.h
snd_mem.c
sound.h
sv_light.c
sv_main.c
sys_win.c
ui.c
vid_3dfxsvga.c
vid_shared.c
vid_wgl.c
wad.c
wad.h
winquake.h
world.c
zone.h

index 7c8d489aa31b2fa1621964d167d20f9a919c8baf..24c3c1483915e97deb8307356ee4d09710fce56c 100644 (file)
--- a/bspfile.h
+++ b/bspfile.h
@@ -197,7 +197,7 @@ typedef struct
        short           texinfo;
 
 // lighting info
        short           texinfo;
 
 // lighting info
-       byte            styles[MAXLIGHTMAPS];
+       qbyte           styles[MAXLIGHTMAPS];
        int                     lightofs;               // start of [numstyles*surfsize] samples
 } dface_t;
 
        int                     lightofs;               // start of [numstyles*surfsize] samples
 } dface_t;
 
@@ -223,7 +223,7 @@ typedef struct
        unsigned short          firstmarksurface;
        unsigned short          nummarksurfaces;
 
        unsigned short          firstmarksurface;
        unsigned short          nummarksurfaces;
 
-       byte            ambient_level[NUM_AMBIENTS];
+       qbyte           ambient_level[NUM_AMBIENTS];
 } dleaf_t;
 
 
 } dleaf_t;
 
 
@@ -241,13 +241,13 @@ extern    int                     nummodels;
 extern dmodel_t        dmodels[MAX_MAP_MODELS];
 
 extern int                     visdatasize;
 extern dmodel_t        dmodels[MAX_MAP_MODELS];
 
 extern int                     visdatasize;
-extern byte            dvisdata[MAX_MAP_VISIBILITY];
+extern qbyte           dvisdata[MAX_MAP_VISIBILITY];
 
 extern int                     lightdatasize;
 
 extern int                     lightdatasize;
-extern byte            dlightdata[MAX_MAP_LIGHTING];
+extern qbyte           dlightdata[MAX_MAP_LIGHTING];
 
 extern int                     texdatasize;
 
 extern int                     texdatasize;
-extern byte            dtexdata[MAX_MAP_MIPTEX]; // (dmiptexlump_t)
+extern qbyte           dtexdata[MAX_MAP_MIPTEX]; // (dmiptexlump_t)
 
 extern int                     entdatasize;
 extern char            dentdata[MAX_MAP_ENTSTRING];
 
 extern int                     entdatasize;
 extern char            dentdata[MAX_MAP_ENTSTRING];
@@ -283,8 +283,8 @@ extern      int                     numsurfedges;
 extern int                     dsurfedges[MAX_MAP_SURFEDGES];
 
 
 extern int                     dsurfedges[MAX_MAP_SURFEDGES];
 
 
-void DecompressVis (byte *in, byte *decompressed);
-int CompressVis (byte *vis, byte *dest);
+void DecompressVis (qbyte *in, qbyte *decompressed);
+int CompressVis (qbyte *vis, qbyte *dest);
 
 void   LoadBSPFile (char *filename);
 void   WriteBSPFile (char *filename);
 
 void   LoadBSPFile (char *filename);
 void   WriteBSPFile (char *filename);
index bdfea6068879c8c2956f0ca3297ed26c8c15cbde..d188b8e13fb3bf4a1d491572d693c860b06e7fb0 100644 (file)
@@ -38,15 +38,15 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 // used by menu to ghost CD audio slider
 qboolean cdaudioinitialized = false;
 static qboolean cdValid = false;
 // used by menu to ghost CD audio slider
 qboolean cdaudioinitialized = false;
 static qboolean cdValid = false;
-static qboolean        playing = false;
-static qboolean        wasPlaying = false;
-static qboolean        initialized = false;
-static qboolean        enabled = true;
+static qboolean playing = false;
+static qboolean wasPlaying = false;
+static qboolean initialized = false;
+static qboolean enabled = true;
 static qboolean playLooping = false;
 static qboolean playLooping = false;
-static float   cdvolume;
-static byte    remap[100];
-static byte            playTrack;
-static byte            maxTrack;
+static float cdvolume;
+static qbyte remap[100];
+static qbyte playTrack;
+static qbyte maxTrack;
 
 static int cdfile = -1;
 static char cd_dev[64] = "/dev/cdrom";
 
 static int cdfile = -1;
 static char cd_dev[64] = "/dev/cdrom";
@@ -95,7 +95,7 @@ static int CDAudio_GetAudioDiskInfo(void)
 }
 
 
 }
 
 
-void CDAudio_Play(byte track, qboolean looping)
+void CDAudio_Play(qbyte track, qboolean looping)
 {
        struct cdrom_tocentry entry;
        struct cdrom_ti ti;
 {
        struct cdrom_tocentry entry;
        struct cdrom_ti ti;
@@ -278,13 +278,13 @@ static void CD_f (void)
 
        if (Q_strcasecmp(command, "play") == 0)
        {
 
        if (Q_strcasecmp(command, "play") == 0)
        {
-               CDAudio_Play((byte)atoi(Cmd_Argv (2)), false);
+               CDAudio_Play((qbyte)atoi(Cmd_Argv (2)), false);
                return;
        }
 
        if (Q_strcasecmp(command, "loop") == 0)
        {
                return;
        }
 
        if (Q_strcasecmp(command, "loop") == 0)
        {
-               CDAudio_Play((byte)atoi(Cmd_Argv (2)), true);
+               CDAudio_Play((qbyte)atoi(Cmd_Argv (2)), true);
                return;
        }
 
                return;
        }
 
index 7766e552601594732b27974af21c3b3b2e5df115..5b35239f4a0615458415e45e3a1a50e64778ba9a 100644 (file)
--- a/cd_win.c
+++ b/cd_win.c
@@ -27,16 +27,16 @@ extern      HWND    mainwindow;
 
 qboolean cdaudioinitialized = false;
 static qboolean cdValid = false;
 
 qboolean cdaudioinitialized = false;
 static qboolean cdValid = false;
-static qboolean        playing = false;
-static qboolean        wasPlaying = false;
-static qboolean        initialized = false;
-static qboolean        enabled = false;
+static qboolean playing = false;
+static qboolean wasPlaying = false;
+static qboolean initialized = false;
+static qboolean enabled = false;
 static qboolean playLooping = false;
 static qboolean playLooping = false;
-static float   cdvolume;
-static byte    remap[100];
-static byte            cdrom;
-static byte            playTrack;
-static byte            maxTrack;
+static float cdvolume;
+static qbyte remap[100];
+static qbyte cdrom;
+static qbyte playTrack;
+static qbyte maxTrack;
 
 UINT   wDeviceID;
 
 
 UINT   wDeviceID;
 
@@ -100,7 +100,7 @@ static int CDAudio_GetAudioDiskInfo(void)
 }
 
 
 }
 
 
-void CDAudio_Play(byte track, qboolean looping)
+void CDAudio_Play(qbyte track, qboolean looping)
 {
        DWORD                           dwReturn;
     MCI_PLAY_PARMS             mciPlayParms;
 {
        DWORD                           dwReturn;
     MCI_PLAY_PARMS             mciPlayParms;
@@ -309,13 +309,13 @@ static void CD_f (void)
 
        if (Q_strcasecmp(command, "play") == 0)
        {
 
        if (Q_strcasecmp(command, "play") == 0)
        {
-               CDAudio_Play((byte)atoi(Cmd_Argv (2)), false);
+               CDAudio_Play((qbyte)atoi(Cmd_Argv (2)), false);
                return;
        }
 
        if (Q_strcasecmp(command, "loop") == 0)
        {
                return;
        }
 
        if (Q_strcasecmp(command, "loop") == 0)
        {
-               CDAudio_Play((byte)atoi(Cmd_Argv (2)), true);
+               CDAudio_Play((qbyte)atoi(Cmd_Argv (2)), true);
                return;
        }
 
                return;
        }
 
index 80e975be23d0a41003f6dc2a6a1309ceba6a8497..e8519cd6d7efe695df40f7c92756628ac0589ff1 100644 (file)
--- a/cdaudio.h
+++ b/cdaudio.h
@@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 */
 
 int CDAudio_Init(void);
 */
 
 int CDAudio_Init(void);
-void CDAudio_Play(byte track, qboolean looping);
+void CDAudio_Play(qbyte track, qboolean looping);
 void CDAudio_Stop(void);
 void CDAudio_Pause(void);
 void CDAudio_Resume(void);
 void CDAudio_Stop(void);
 void CDAudio_Pause(void);
 void CDAudio_Resume(void);
index 9dd567e27ce5b27ebfc5049d81ebd91522691e2a..249185e2933cf87355cfb6bb2961e92bed1a0bdf 100644 (file)
--- a/cgamevm.c
+++ b/cgamevm.c
@@ -11,7 +11,7 @@ static mempool_t *cgvm_mempool;
 
 static void (*cgvm_networkcode[256])(unsigned char num);
 
 
 static void (*cgvm_networkcode[256])(unsigned char num);
 
-static byte *cgvm_netbuffer;
+static qbyte *cgvm_netbuffer;
 static int cgvm_netbufferlength;
 static int cgvm_netbufferpos;
 
 static int cgvm_netbufferlength;
 static int cgvm_netbufferpos;
 
@@ -46,7 +46,7 @@ void CL_CGVM_Start(void)
        CG_Init(); // API call
 }
 
        CG_Init(); // API call
 }
 
-void CL_CGVM_ParseNetwork(byte *netbuffer, int length)
+void CL_CGVM_ParseNetwork(qbyte *netbuffer, int length)
 {
        int num;
        cgvm_netbuffer = netbuffer;
 {
        int num;
        cgvm_netbuffer = netbuffer;
@@ -56,7 +56,7 @@ void CL_CGVM_ParseNetwork(byte *netbuffer, int length)
        {
                num = CGVM_MSG_ReadByte();
                if (cgvm_networkcode[num])
        {
                num = CGVM_MSG_ReadByte();
                if (cgvm_networkcode[num])
-                       cgvm_networkcode[num]((byte)num);
+                       cgvm_networkcode[num]((qbyte)num);
                else
                        Host_Error("CL_CGVM_ParseNetwork: unregistered network code %i", num);
        }
                else
                        Host_Error("CL_CGVM_ParseNetwork: unregistered network code %i", num);
        }
index c4a292382076f500f91d9ca1a9f755fccd3ecccb..75ce188d6b5fe2f6e06f4465bb8db777f0f9be7d 100644 (file)
--- a/cgamevm.h
+++ b/cgamevm.h
@@ -6,7 +6,7 @@ void CL_CGVM_Init(void);
 void CL_CGVM_Clear(void);
 void CL_CGVM_Frame(void);
 void CL_CGVM_Start(void);
 void CL_CGVM_Clear(void);
 void CL_CGVM_Frame(void);
 void CL_CGVM_Start(void);
-void CL_CGVM_ParseNetwork(byte *netbuffer, int length);
+void CL_CGVM_ParseNetwork(qbyte *netbuffer, int length);
 
 #endif
 
 
 #endif
 
index 0943007dc259b27e23fee07af3b6490e01481f8d..030ffa29275e0d94bde104c1ebfbac5a666fc493 100644 (file)
@@ -350,7 +350,7 @@ void CL_SendMove (usercmd_t *cmd)
        int             i;
        int             bits;
        sizebuf_t       buf;
        int             i;
        int             bits;
        sizebuf_t       buf;
-       byte    data[128];
+       qbyte   data[128];
        static double lastmovetime;
        static float forwardmove, sidemove, upmove, total; // accumulation
 
        static double lastmovetime;
        static float forwardmove, sidemove, upmove, total; // accumulation
 
index 7ee3d2d93109da357d31bf101b6d5c7c213d7772..13037820abf37b450eead51f5ffddeeaaac3853d 100644 (file)
--- a/cl_main.c
+++ b/cl_main.c
@@ -228,7 +228,7 @@ Host should be either "local" or a net address to be passed on
 void CL_EstablishConnection (char *host)
 {
        sizebuf_t       buf;
 void CL_EstablishConnection (char *host)
 {
        sizebuf_t       buf;
-       byte    data[128];
+       qbyte   data[128];
 
        buf.maxsize = 128;
        buf.cursize = 0;
 
        buf.maxsize = 128;
        buf.cursize = 0;
@@ -595,7 +595,7 @@ static void CL_RelinkNetworkEntities()
                glowcolor = ent->state_current.glowcolor;
                if (glowsize)
                {
                glowcolor = ent->state_current.glowcolor;
                if (glowsize)
                {
-                       byte *tempcolor = (byte *)&d_8to24table[glowcolor];
+                       qbyte *tempcolor = (qbyte *)&d_8to24table[glowcolor];
                        dlightcolor[0] += glowsize * tempcolor[0] * (1.0f / 255.0f);
                        dlightcolor[1] += glowsize * tempcolor[1] * (1.0f / 255.0f);
                        dlightcolor[2] += glowsize * tempcolor[2] * (1.0f / 255.0f);
                        dlightcolor[0] += glowsize * tempcolor[0] * (1.0f / 255.0f);
                        dlightcolor[1] += glowsize * tempcolor[1] * (1.0f / 255.0f);
                        dlightcolor[2] += glowsize * tempcolor[2] * (1.0f / 255.0f);
index 576bd1d2675f00ac3897df930e627e6a67b4293e..5a1b5b5f840d58a21e4f05dadb65b6f4f0353892 100644 (file)
@@ -198,7 +198,7 @@ void CL_KeepaliveMessage (void)
        static float lastmsg;
        int             ret;
        sizebuf_t       old;
        static float lastmsg;
        int             ret;
        sizebuf_t       old;
-       byte            olddata[8192];
+       qbyte           olddata[8192];
        
        if (sv.active)
                return;         // no need if server is local
        
        if (sv.active)
                return;         // no need if server is local
@@ -527,7 +527,7 @@ If an entities model or origin changes from frame to frame, it must be
 relinked.  Other attributes can change without relinking.
 ==================
 */
 relinked.  Other attributes can change without relinking.
 ==================
 */
-byte entkill[MAX_EDICTS];
+qbyte entkill[MAX_EDICTS];
 int bitprofile[32], bitprofilecount = 0;
 void CL_ParseUpdate (int bits)
 {
 int bitprofile[32], bitprofilecount = 0;
 void CL_ParseUpdate (int bits)
 {
@@ -953,7 +953,7 @@ void CL_ParseEffect2 (void)
 
 #define SHOWNET(x) if(cl_shownet.integer==2)Con_Printf ("%3i:%s\n", msg_readcount-1, x);
 
 
 #define SHOWNET(x) if(cl_shownet.integer==2)Con_Printf ("%3i:%s\n", msg_readcount-1, x);
 
-static byte cgamenetbuffer[65536];
+static qbyte cgamenetbuffer[65536];
 
 /*
 =====================
 
 /*
 =====================
@@ -964,7 +964,7 @@ void CL_ParseServerMessage (void)
 {
        int                     cmd;
        int                     i, entitiesupdated;
 {
        int                     cmd;
        int                     i, entitiesupdated;
-       byte            cmdlog[32];
+       qbyte           cmdlog[32];
        char            *cmdlogname[32], *temp;
        int                     cmdindex, cmdcount = 0;
 
        char            *cmdlogname[32], *temp;
        int                     cmdindex, cmdcount = 0;
 
@@ -1235,9 +1235,9 @@ void CL_ParseServerMessage (void)
                        cl.cdtrack = MSG_ReadByte ();
                        cl.looptrack = MSG_ReadByte ();
                        if ( (cls.demoplayback || cls.demorecording) && (cls.forcetrack != -1) )
                        cl.cdtrack = MSG_ReadByte ();
                        cl.looptrack = MSG_ReadByte ();
                        if ( (cls.demoplayback || cls.demorecording) && (cls.forcetrack != -1) )
-                               CDAudio_Play ((byte)cls.forcetrack, true);
+                               CDAudio_Play ((qbyte)cls.forcetrack, true);
                        else
                        else
-                               CDAudio_Play ((byte)cl.cdtrack, true);
+                               CDAudio_Play ((qbyte)cl.cdtrack, true);
                        break;
 
                case svc_intermission:
                        break;
 
                case svc_intermission:
index 2798ef68c3087a9f69e1efb81c5f31ddaa70d078..823c68bf2050847d3e6b2109a26b592a24dd59b3 100644 (file)
@@ -48,7 +48,7 @@ typedef struct particle_s
        float           friction; // how much air friction affects this object (objects with a low mass/size ratio tend to get more air friction)
        float           pressure; // if non-zero, apply pressure to other particles
        int                     dynlight; // if set the particle will be dynamically lit (if cl_dynamicparticles is on), used for smoke and blood
        float           friction; // how much air friction affects this object (objects with a low mass/size ratio tend to get more air friction)
        float           pressure; // if non-zero, apply pressure to other particles
        int                     dynlight; // if set the particle will be dynamically lit (if cl_dynamicparticles is on), used for smoke and blood
-       byte            color[4];
+       qbyte           color[4];
 }
 particle_t;
 
 }
 particle_t;
 
@@ -325,7 +325,7 @@ void CL_ParticleExplosion (vec3_t org, int smoke)
                int i, j;
                float f;
                vec3_t v, end, ang;
                int i, j;
                float f;
                vec3_t v, end, ang;
-               byte noise1[32*32], noise2[32*32];
+               qbyte noise1[32*32], noise2[32*32];
 
                VectorClear(end); // hush MSVC
                i = Mod_PointInLeaf(org, cl.worldmodel)->contents;
 
                VectorClear(end); // hush MSVC
                i = Mod_PointInLeaf(org, cl.worldmodel)->contents;
index 8f2f269d9c919c887ddccd50eccffe5f136c756c..a56acc4dd9718e3a8efe23a41830685511ef4390 100644 (file)
@@ -23,7 +23,7 @@ qboolean      scr_disabled_for_loading;
 //qboolean     scr_drawloading;
 //float                scr_disabled_time;
 
 //qboolean     scr_drawloading;
 //float                scr_disabled_time;
 
-static byte menuplyr_pixels[4096];
+static qbyte menuplyr_pixels[4096];
 
 /*
 ===============================================================================
 
 /*
 ===============================================================================
@@ -634,7 +634,7 @@ void DrawQ_Fill (float x, float y, float w, float h, float red, float green, flo
 }
 
 //only used for the player color selection menu
 }
 
 //only used for the player color selection menu
-void DrawQ_PicTranslate (int x, int y, char *picname, byte *translation)
+void DrawQ_PicTranslate (int x, int y, char *picname, qbyte *translation)
 {
        int i, c;
        unsigned int trans[4096];
 {
        int i, c;
        unsigned int trans[4096];
@@ -655,7 +655,7 @@ void DrawQ_PicTranslate (int x, int y, char *picname, byte *translation)
                trans[i] = d_8to24table[translation[menuplyr_pixels[i]]];
 
        // FIXME: this is renderer stuff?
                trans[i] = d_8to24table[translation[menuplyr_pixels[i]]];
 
        // FIXME: this is renderer stuff?
-       R_UpdateTexture (pic->tex, (byte *)trans);
+       R_UpdateTexture (pic->tex, (qbyte *)trans);
 
        DrawQ_Pic(x, y, picname, 0, 0, 1, 1, 1, 1, 0);
 }
 
        DrawQ_Pic(x, y, picname, 0, 0, 1, 1, 1, 1, 0);
 }
@@ -774,7 +774,7 @@ showlmp_t showlmp[SHOWLMP_MAXLABELS];
 void SHOWLMP_decodehide(void)
 {
        int i;
 void SHOWLMP_decodehide(void)
 {
        int i;
-       byte *lmplabel;
+       qbyte *lmplabel;
        lmplabel = MSG_ReadString();
        for (i = 0;i < SHOWLMP_MAXLABELS;i++)
                if (showlmp[i].isactive && strcmp(showlmp[i].label, lmplabel) == 0)
        lmplabel = MSG_ReadString();
        for (i = 0;i < SHOWLMP_MAXLABELS;i++)
                if (showlmp[i].isactive && strcmp(showlmp[i].label, lmplabel) == 0)
@@ -787,7 +787,7 @@ void SHOWLMP_decodehide(void)
 void SHOWLMP_decodeshow(void)
 {
        int i, k;
 void SHOWLMP_decodeshow(void)
 {
        int i, k;
-       byte lmplabel[256], picname[256];
+       qbyte lmplabel[256], picname[256];
        float x, y;
        strcpy(lmplabel,MSG_ReadString());
        strcpy(picname, MSG_ReadString());
        float x, y;
        strcpy(lmplabel,MSG_ReadString());
        strcpy(picname, MSG_ReadString());
index 9d5290d447e7dfb02c5c0ce4192eed68d0620c08..69fc72064b1d7d167ce84450700b2853f2074737 100644 (file)
@@ -8,7 +8,7 @@
 typedef struct drawqueue_s
 {
        unsigned short size;
 typedef struct drawqueue_s
 {
        unsigned short size;
-       byte command, flags;
+       qbyte command, flags;
        unsigned int color;
        float x, y, scalex, scaley;
 }
        unsigned int color;
        float x, y, scalex, scaley;
 }
@@ -21,7 +21,7 @@ void DrawQ_Pic(float x, float y, char *picname, float width, float height, float
 void DrawQ_String(float x, float y, char *string, int maxlen, float scalex, float scaley, float red, float green, float blue, float alpha, int flags);
 void DrawQ_Fill (float x, float y, float w, float h, float red, float green, float blue, float alpha, int flags);
 // only used for player config menu
 void DrawQ_String(float x, float y, char *string, int maxlen, float scalex, float scaley, float red, float green, float blue, float alpha, int flags);
 void DrawQ_Fill (float x, float y, float w, float h, float red, float green, float blue, float alpha, int flags);
 // only used for player config menu
-void DrawQ_PicTranslate (int x, int y, char *picname, byte *translation);
+void DrawQ_PicTranslate (int x, int y, char *picname, qbyte *translation);
 
 void SHOWLMP_decodehide(void);
 void SHOWLMP_decodeshow(void);
 
 void SHOWLMP_decodehide(void);
 void SHOWLMP_decodeshow(void);
index 387a64cb8f9ce7e0e08c52a4266775e92ef6e8ee..971dc6ef28b3bd4c3ec97344c6849e2c2c7d7ccb 100644 (file)
--- a/cl_tent.c
+++ b/cl_tent.c
@@ -114,7 +114,7 @@ void CL_ParseTEnt (void)
        int             rnd;
        int             colorStart, colorLength, count;
        float   velspeed, radius;
        int             rnd;
        int             colorStart, colorLength, count;
        float   velspeed, radius;
-       byte *tempcolor;
+       qbyte *tempcolor;
 
        type = MSG_ReadByte ();
        switch (type)
 
        type = MSG_ReadByte ();
        switch (type)
@@ -429,7 +429,7 @@ void CL_ParseTEnt (void)
                colorLength = MSG_ReadByte ();
                CL_ParticleExplosion2 (pos, colorStart, colorLength);
 //             CL_BlastParticles (pos, 80, 80);
                colorLength = MSG_ReadByte ();
                CL_ParticleExplosion2 (pos, colorStart, colorLength);
 //             CL_BlastParticles (pos, 80, 80);
-               tempcolor = (byte *)&d_8to24table[(rand()%colorLength) + colorStart];
+               tempcolor = (qbyte *)&d_8to24table[(rand()%colorLength) + colorStart];
                CL_AllocDlight (NULL, pos, 350, tempcolor[0] * (1.0f / 255.0f), tempcolor[1] * (1.0f / 255.0f), tempcolor[2] * (1.0f / 255.0f), 700, 0.5);
                S_StartSound (-1, 0, cl_sfx_r_exp3, pos, 1, 1);
                break;
                CL_AllocDlight (NULL, pos, 350, tempcolor[0] * (1.0f / 255.0f), tempcolor[1] * (1.0f / 255.0f), tempcolor[2] * (1.0f / 255.0f), 700, 0.5);
                S_StartSound (-1, 0, cl_sfx_r_exp3, pos, 1, 1);
                break;
index 3513a3f7521dfed7a7b9e8adc839efe35f8cff23..2b7505c2dd70bf99f415ba6d4227738a8f620c7d 100644 (file)
--- a/client.h
+++ b/client.h
@@ -507,7 +507,7 @@ typedef struct
        int numparticles;
        struct renderparticle_s *particles;
 
        int numparticles;
        struct renderparticle_s *particles;
 
-       byte drawqueue[MAX_DRAWQUEUE];
+       qbyte drawqueue[MAX_DRAWQUEUE];
        int drawqueuesize;
 }
 refdef_t;
        int drawqueuesize;
 }
 refdef_t;
index b1c684b4f5665170f1e85c4c4ee6e52c1adcdde4..daa7fbde44efd30ae09aa0758be96ca831178f03 100644 (file)
--- a/common.c
+++ b/common.c
@@ -109,7 +109,7 @@ void Q_memset (void *dest, int fill, int count)
        }
        else
                for (i=0 ; i<count ; i++)
        }
        else
                for (i=0 ; i<count ; i++)
-                       ((byte *)dest)[i] = fill;
+                       ((qbyte *)dest)[i] = fill;
 }
 
 void Q_memcpy (void *dest, void *src, int count)
 }
 
 void Q_memcpy (void *dest, void *src, int count)
@@ -124,7 +124,7 @@ void Q_memcpy (void *dest, void *src, int count)
        }
        else
                for (i=0 ; i<count ; i++)
        }
        else
                for (i=0 ; i<count ; i++)
-                       ((byte *)dest)[i] = ((byte *)src)[i];
+                       ((qbyte *)dest)[i] = ((qbyte *)src)[i];
 }
 
 int Q_memcmp (void *m1, void *m2, int count)
 }
 
 int Q_memcmp (void *m1, void *m2, int count)
@@ -132,7 +132,7 @@ int Q_memcmp (void *m1, void *m2, int count)
        while(count)
        {
                count--;
        while(count)
        {
                count--;
-               if (((byte *)m1)[count] != ((byte *)m2)[count])
+               if (((qbyte *)m1)[count] != ((qbyte *)m2)[count])
                        return -1;
        }
        return 0;
                        return -1;
        }
        return 0;
@@ -404,7 +404,7 @@ float   (*LittleFloat) (float l);
 
 short   ShortSwap (short l)
 {
 
 short   ShortSwap (short l)
 {
-       byte    b1,b2;
+       qbyte    b1,b2;
 
        b1 = l&255;
        b2 = (l>>8)&255;
 
        b1 = l&255;
        b2 = (l>>8)&255;
@@ -421,7 +421,7 @@ short   ShortNoSwap (short l)
 
 int    LongSwap (int l)
 {
 
 int    LongSwap (int l)
 {
-       byte    b1,b2,b3,b4;
+       qbyte    b1,b2,b3,b4;
 
        b1 = l&255;
        b2 = (l>>8)&255;
 
        b1 = l&255;
        b2 = (l>>8)&255;
@@ -443,7 +443,7 @@ float FloatSwap (float f)
        union
        {
                float   f;
        union
        {
                float   f;
-               byte    b[4];
+               qbyte    b[4];
        } dat1, dat2;
 
 
        } dat1, dat2;
 
 
@@ -477,7 +477,7 @@ Handles byte ordering and avoids alignment errors
 
 void MSG_WriteChar (sizebuf_t *sb, int c)
 {
 
 void MSG_WriteChar (sizebuf_t *sb, int c)
 {
-       byte    *buf;
+       qbyte    *buf;
        
 //#ifdef PARANOID
 //     if (c < -128 || c > 127)
        
 //#ifdef PARANOID
 //     if (c < -128 || c > 127)
@@ -490,7 +490,7 @@ void MSG_WriteChar (sizebuf_t *sb, int c)
 
 void MSG_WriteByte (sizebuf_t *sb, int c)
 {
 
 void MSG_WriteByte (sizebuf_t *sb, int c)
 {
-       byte    *buf;
+       qbyte    *buf;
        
 //#ifdef PARANOID
 //     if (c < 0 || c > 255)
        
 //#ifdef PARANOID
 //     if (c < 0 || c > 255)
@@ -503,7 +503,7 @@ void MSG_WriteByte (sizebuf_t *sb, int c)
 
 void MSG_WriteShort (sizebuf_t *sb, int c)
 {
 
 void MSG_WriteShort (sizebuf_t *sb, int c)
 {
-       byte    *buf;
+       qbyte    *buf;
 
 //#ifdef PARANOID
 //     if (c < ((short)0x8000) || c > (short)0x7fff)
 
 //#ifdef PARANOID
 //     if (c < ((short)0x8000) || c > (short)0x7fff)
@@ -517,7 +517,7 @@ void MSG_WriteShort (sizebuf_t *sb, int c)
 
 void MSG_WriteLong (sizebuf_t *sb, int c)
 {
 
 void MSG_WriteLong (sizebuf_t *sb, int c)
 {
-       byte    *buf;
+       qbyte    *buf;
 
        buf = SZ_GetSpace (sb, 4);
        buf[0] = c&0xff;
 
        buf = SZ_GetSpace (sb, 4);
        buf[0] = c&0xff;
@@ -689,7 +689,7 @@ float MSG_ReadFloat (void)
 {
        union
        {
 {
        union
        {
-               byte    b[4];
+               qbyte    b[4];
                float   f;
                int     l;
        } dat;
                float   f;
                int     l;
        } dat;
@@ -822,9 +822,9 @@ void SZ_Print (sizebuf_t *buf, char *data)
 
 // byte * cast to keep VC++ happy
        if (buf->data[buf->cursize-1])
 
 // byte * cast to keep VC++ happy
        if (buf->data[buf->cursize-1])
-               memcpy ((byte *)SZ_GetSpace(buf, len),data,len); // no trailing 0
+               memcpy ((qbyte *)SZ_GetSpace(buf, len),data,len); // no trailing 0
        else
        else
-               memcpy ((byte *)SZ_GetSpace(buf, len-1)-1,data,len); // write over trailing 0
+               memcpy ((qbyte *)SZ_GetSpace(buf, len-1)-1,data,len); // write over trailing 0
 }
 
 
 }
 
 
@@ -1202,7 +1202,7 @@ COM_Init
 void COM_Init (void)
 {
 #if !defined(ENDIAN_LITTLE) && !defined(ENDIAN_BIG)
 void COM_Init (void)
 {
 #if !defined(ENDIAN_LITTLE) && !defined(ENDIAN_BIG)
-       byte    swaptest[2] = {1,0};
+       qbyte    swaptest[2] = {1,0};
 
 // set the byte swapping variables in a portable manner
        if ( *(short *)swaptest == 1)
 
 // set the byte swapping variables in a portable manner
        if ( *(short *)swaptest == 1)
@@ -1265,7 +1265,7 @@ char    *va(char *format, ...)
 
 
 /// just for debugging
 
 
 /// just for debugging
-int     memsearch (byte *start, int count, int search)
+int     memsearch (qbyte *start, int count, int search)
 {
        int             i;
 
 {
        int             i;
 
@@ -1630,14 +1630,14 @@ Filename are reletive to the quake directory.
 Always appends a 0 byte.
 ============
 */
 Always appends a 0 byte.
 ============
 */
-byte                   *loadbuf;
-int                            loadsize;
-byte *COM_LoadFile (char *path, qboolean quiet)
+qbyte *loadbuf;
+int loadsize;
+qbyte *COM_LoadFile (char *path, qboolean quiet)
 {
 {
-       QFile             *h;
-       byte    *buf;
-       char    base[1024];
-       int             len;
+       QFile *h;
+       qbyte *buf;
+       char base[1024];
+       int len;
 
        buf = NULL;     // quiet compiler warning
        loadsize = 0;
 
        buf = NULL;     // quiet compiler warning
        loadsize = 0;
@@ -1656,7 +1656,7 @@ byte *COM_LoadFile (char *path, qboolean quiet)
        if (!buf)
                Sys_Error ("COM_LoadFile: not enough available memory for %s (size %i)", path, len);
 
        if (!buf)
                Sys_Error ("COM_LoadFile: not enough available memory for %s (size %i)", path, len);
 
-       ((byte *)buf)[len] = 0;
+       ((qbyte *)buf)[len] = 0;
 
        Qread (h, buf, len);
        Qclose (h);
 
        Qread (h, buf, len);
        Qclose (h);
index 85aba74d7ff9ce1367031193d2350dc557e24766..98753e272918acb28169b3a44a8a115808c61724 100644 (file)
--- a/common.h
+++ b/common.h
@@ -30,7 +30,7 @@ typedef struct sizebuf_s
 {
        qboolean        allowoverflow;  // if false, do a Sys_Error
        qboolean        overflowed;             // set to true if the buffer size failed
 {
        qboolean        allowoverflow;  // if false, do a Sys_Error
        qboolean        overflowed;             // set to true if the buffer size failed
-       byte            *data;
+       qbyte           *data;
        mempool_t       *mempool;
        int                     maxsize;
        int                     cursize;
        mempool_t       *mempool;
        int                     maxsize;
        int                     cursize;
@@ -179,7 +179,7 @@ int COM_FOpenFile (char *filename, QFile **file, qboolean quiet, qboolean zip);
 
 // set by COM_LoadFile functions
 extern int loadsize;
 
 // set by COM_LoadFile functions
 extern int loadsize;
-byte *COM_LoadFile (char *path, qboolean quiet);
+qbyte *COM_LoadFile (char *path, qboolean quiet);
 
 int COM_FileExists(char *filename);
 
 
 int COM_FileExists(char *filename);
 
index 3122584d5f72601948648a95b51d139dd83cdd6f..43a538f7067ded0fdf60e163761b55c2240c9645 100644 (file)
--- a/console.h
+++ b/console.h
@@ -23,10 +23,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 //
 extern int con_totallines;
 extern int con_backscroll;
 //
 extern int con_totallines;
 extern int con_backscroll;
-extern qboolean con_forcedup;  // because no entities to refresh
+extern qboolean con_forcedup;  // because no entities to refresh
 extern qboolean con_initialized;
 extern qboolean con_initialized;
-extern byte *con_chars;
-extern int     con_notifylines;                // scan lines to clear for notify lines
+extern qbyte *con_chars;
+extern int con_notifylines;            // scan lines to clear for notify lines
 
 void Con_DrawCharacter (int cx, int line, int num);
 
 
 void Con_DrawCharacter (int cx, int line, int num);
 
diff --git a/crc.c b/crc.c
index 84dd8559fe595267981812d521a2c9db6698dd00..9024e073e323cbf1ba0bd971606d5b60ebae77c8 100644 (file)
--- a/crc.c
+++ b/crc.c
@@ -70,13 +70,13 @@ void CRC_Init(unsigned short *crcvalue)
        *crcvalue = CRC_INIT_VALUE;
 }
 
        *crcvalue = CRC_INIT_VALUE;
 }
 
-void CRC_ProcessByte(unsigned short *crcvalue, byte data)
+void CRC_ProcessByte(unsigned short *crcvalue, qbyte data)
 {
        *crcvalue = (*crcvalue << 8) ^ crctable[(*crcvalue >> 8) ^ data];
 }
 
 // LordHavoc: added for speed reasons
 {
        *crcvalue = (*crcvalue << 8) ^ crctable[(*crcvalue >> 8) ^ data];
 }
 
 // LordHavoc: added for speed reasons
-void CRC_ProcessBytes(unsigned short *crcvalue, byte *data, int size)
+void CRC_ProcessBytes(unsigned short *crcvalue, qbyte *data, int size)
 {
        unsigned short crc;
        crc = *crcvalue;
 {
        unsigned short crc;
        crc = *crcvalue;
@@ -91,7 +91,7 @@ unsigned short CRC_Value(unsigned short crcvalue)
 }
 
 // LordHavoc: further speed and usability improvement
 }
 
 // LordHavoc: further speed and usability improvement
-unsigned short CRC_Block(byte *data, int size)
+unsigned short CRC_Block(qbyte *data, int size)
 {
        unsigned short crc = CRC_INIT_VALUE;
        while (size--)
 {
        unsigned short crc = CRC_INIT_VALUE;
        while (size--)
diff --git a/crc.h b/crc.h
index c613ebc4f24304517b167bf3a5d7c4c40f90e0df..7bf4092ae37aa2a984e034534f9b59025bf38889 100644 (file)
--- a/crc.h
+++ b/crc.h
@@ -20,9 +20,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 /* crc.h */
 
 void CRC_Init(unsigned short *crcvalue);
 /* crc.h */
 
 void CRC_Init(unsigned short *crcvalue);
-void CRC_ProcessByte(unsigned short *crcvalue, byte data);
+void CRC_ProcessByte(unsigned short *crcvalue, qbyte data);
 // LordHavoc: added this for speed reasons
 // LordHavoc: added this for speed reasons
-void CRC_ProcessBytes(unsigned short *crcvalue, byte *data, int size);
+void CRC_ProcessBytes(unsigned short *crcvalue, qbyte *data, int size);
 unsigned short CRC_Value(unsigned short crcvalue);
 // LordHavoc: further speed and usability improvement
 unsigned short CRC_Value(unsigned short crcvalue);
 // LordHavoc: further speed and usability improvement
-unsigned short CRC_Block(byte *data, int size);
+unsigned short CRC_Block(qbyte *data, int size);
index ad9d91ed4a0ab1b0a4bf7a396483c3047f8bc987..73f122eca95a2414ce12e04448adcd4f4b901f0d 100644 (file)
@@ -1,7 +1,7 @@
 
 #include "quakedef.h"
 
 
 #include "quakedef.h"
 
-void fractalnoise(byte *noise, int size, int startgrid)
+void fractalnoise(qbyte *noise, int size, int startgrid)
 {
        int x, y, g, g2, amplitude, min, max, size1 = size - 1, sizepower, gridpower;
        int *noisebuf;
 {
        int x, y, g, g2, amplitude, min, max, size1 = size - 1, sizepower, gridpower;
        int *noisebuf;
@@ -59,13 +59,13 @@ void fractalnoise(byte *noise, int size, int startgrid)
        // normalize noise and copy to output
        for (y = 0;y < size;y++)
                for (x = 0;x < size;x++)
        // normalize noise and copy to output
        for (y = 0;y < size;y++)
                for (x = 0;x < size;x++)
-                       *noise++ = (byte) (((n(x,y) - min) * 256) / max);
+                       *noise++ = (qbyte) (((n(x,y) - min) * 256) / max);
        Mem_Free(noisebuf);
 #undef n
 }
 
 // unnormalized, used for explosions mainly, does not allocate/free memory (hence the name quick)
        Mem_Free(noisebuf);
 #undef n
 }
 
 // unnormalized, used for explosions mainly, does not allocate/free memory (hence the name quick)
-void fractalnoisequick(byte *noise, int size, int startgrid)
+void fractalnoisequick(qbyte *noise, int size, int startgrid)
 {
        int x, y, g, g2, amplitude, size1 = size - 1, sizepower, gridpower;
 #define n(x,y) noise[((y)&size1)*size+((x)&size1)]
 {
        int x, y, g, g2, amplitude, size1 = size - 1, sizepower, gridpower;
 #define n(x,y) noise[((y)&size1)*size+((x)&size1)]
@@ -98,13 +98,13 @@ void fractalnoisequick(byte *noise, int size, int startgrid)
                        // diamond
                        for (y = 0;y < size;y += g2)
                                for (x = 0;x < size;x += g2)
                        // diamond
                        for (y = 0;y < size;y += g2)
                                for (x = 0;x < size;x += g2)
-                                       n(x+g,y+g) = (byte) (((int) n(x,y) + (int) n(x+g2,y) + (int) n(x,y+g2) + (int) n(x+g2,y+g2)) >> 2);
+                                       n(x+g,y+g) = (qbyte) (((int) n(x,y) + (int) n(x+g2,y) + (int) n(x,y+g2) + (int) n(x+g2,y+g2)) >> 2);
                        // square
                        for (y = 0;y < size;y += g2)
                                for (x = 0;x < size;x += g2)
                                {
                        // square
                        for (y = 0;y < size;y += g2)
                                for (x = 0;x < size;x += g2)
                                {
-                                       n(x+g,y) = (byte) (((int) n(x,y) + (int) n(x+g2,y) + (int) n(x+g,y-g) + (int) n(x+g,y+g)) >> 2);
-                                       n(x,y+g) = (byte) (((int) n(x,y) + (int) n(x,y+g2) + (int) n(x-g,y+g) + (int) n(x+g,y+g)) >> 2);
+                                       n(x+g,y) = (qbyte) (((int) n(x,y) + (int) n(x+g2,y) + (int) n(x+g,y-g) + (int) n(x+g,y+g)) >> 2);
+                                       n(x,y+g) = (qbyte) (((int) n(x,y) + (int) n(x,y+g2) + (int) n(x-g,y+g) + (int) n(x+g,y+g)) >> 2);
                                }
                }
        }
                                }
                }
        }
index 6def93366fcf09243f58ee7a822b7d68152cb0b0..810900a7290a2f82b57db047cff43b91105aa152 100644 (file)
@@ -66,7 +66,7 @@ buf_fcolor_t;
 
 typedef struct
 {
 
 typedef struct
 {
-       byte c[4];
+       qbyte c[4];
 }
 buf_bcolor_t;
 
 }
 buf_bcolor_t;
 
@@ -364,7 +364,7 @@ void R_Mesh_Render(void)
        // float to byte color conversion
        int *icolor;
        float *fcolor;
        // float to byte color conversion
        int *icolor;
        float *fcolor;
-       byte *bcolor;
+       qbyte *bcolor;
        if (!backendactive)
                Sys_Error("R_Mesh_Render: called when backend is not active\n");
        if (!currentmesh)
        if (!backendactive)
                Sys_Error("R_Mesh_Render: called when backend is not active\n");
        if (!currentmesh)
@@ -1372,7 +1372,7 @@ void R_ClearScreen(void);
 void SCR_ScreenShot(char *filename, int x, int y, int width, int height)
 {
        int i;
 void SCR_ScreenShot(char *filename, int x, int y, int width, int height)
 {
        int i;
-       byte *buffer;
+       qbyte *buffer;
 
        buffer = Mem_Alloc(tempmempool, width*height*3);
        glReadPixels (x, y, width, height, GL_RGB, GL_UNSIGNED_BYTE, buffer);
 
        buffer = Mem_Alloc(tempmempool, width*height*3);
        glReadPixels (x, y, width, height, GL_RGB, GL_UNSIGNED_BYTE, buffer);
index e104cef9099485e0942e7d52ae21f768d8172d80..f5cb2bb27ae8ab722691b4c3b117848d043d285e 100644 (file)
--- a/gl_draw.c
+++ b/gl_draw.c
@@ -37,7 +37,7 @@ static int numcachepics;
 
 static rtexturepool_t *drawtexturepool;
 
 
 static rtexturepool_t *drawtexturepool;
 
-static byte pointerimage[256] =
+static qbyte pointerimage[256] =
 {
        "333333332......."
        "26777761........"
 {
        "333333332......."
        "26777761........"
@@ -60,7 +60,7 @@ static byte pointerimage[256] =
 static rtexture_t *draw_generatemousepointer(void)
 {
        int i;
 static rtexture_t *draw_generatemousepointer(void)
 {
        int i;
-       byte buffer[256][4];
+       qbyte buffer[256][4];
        for (i = 0;i < 256;i++)
        {
                if (pointerimage[i] == '.')
        for (i = 0;i < 256;i++)
        {
                if (pointerimage[i] == '.')
@@ -84,7 +84,7 @@ static rtexture_t *draw_generatemousepointer(void)
 // must match NUMCROSSHAIRS in r_crosshairs.c
 #define NUMCROSSHAIRS 5
 
 // must match NUMCROSSHAIRS in r_crosshairs.c
 #define NUMCROSSHAIRS 5
 
-static byte *crosshairtexdata[NUMCROSSHAIRS] =
+static qbyte *crosshairtexdata[NUMCROSSHAIRS] =
 {
        "................"
        "................"
 {
        "................"
        "................"
@@ -176,7 +176,7 @@ static rtexture_t *draw_generatecrosshair(int num)
 {
        int i;
        char *in;
 {
        int i;
        char *in;
-       byte data[16*16][4];
+       qbyte data[16*16][4];
        in = crosshairtexdata[num];
        for (i = 0;i < 16*16;i++)
        {
        in = crosshairtexdata[num];
        for (i = 0;i < 16*16;i++)
        {
@@ -192,7 +192,7 @@ static rtexture_t *draw_generatecrosshair(int num)
                        data[i][0] = 255;
                        data[i][1] = 255;
                        data[i][2] = 255;
                        data[i][0] = 255;
                        data[i][1] = 255;
                        data[i][2] = 255;
-                       data[i][3] = (byte) ((int) (in[i] - '0') * 255 / 7);
+                       data[i][3] = (qbyte) ((int) (in[i] - '0') * 255 / 7);
                }
        }
        return R_LoadTexture(drawtexturepool, va("crosshair%i", num), 16, 16, &data[0][0], TEXTYPE_RGBA, TEXF_ALPHA | TEXF_PRECACHE);
                }
        }
        return R_LoadTexture(drawtexturepool, va("crosshair%i", num), 16, 16, &data[0][0], TEXTYPE_RGBA, TEXF_ALPHA | TEXF_PRECACHE);
@@ -233,9 +233,9 @@ cachepic_t  *Draw_CachePic (char *path)
        {
                if (!strcmp(path, "conchars"))
                {
        {
                if (!strcmp(path, "conchars"))
                {
-                       byte *pix;
+                       qbyte *pix;
                        // conchars is a raw image and with the wrong transparent color
                        // conchars is a raw image and with the wrong transparent color
-                       pix = (byte *)p;
+                       pix = (qbyte *)p;
                        for (i = 0;i < 128 * 128;i++)
                                if (pix[i] == 0)
                                        pix[i] = 255;
                        for (i = 0;i < 128 * 128;i++)
                                if (pix[i] == 0)
                                        pix[i] = 255;
@@ -391,7 +391,7 @@ void R_DrawQueue(void)
                if (color != dq->color)
                {
                        color = dq->color;
                if (color != dq->color)
                {
                        color = dq->color;
-                       glColor4ub((byte)(((color >> 24) & 0xFF) >> overbright), (byte)(((color >> 16) & 0xFF) >> overbright), (byte)(((color >> 8) & 0xFF) >> overbright), (byte)(color & 0xFF));
+                       glColor4ub((qbyte)(((color >> 24) & 0xFF) >> overbright), (qbyte)(((color >> 16) & 0xFF) >> overbright), (qbyte)(((color >> 8) & 0xFF) >> overbright), (qbyte)(color & 0xFF));
                }
                x = dq->x;
                y = dq->y;
                }
                x = dq->x;
                y = dq->y;
index 76862b2dd5f3eb4e923be915ae92d421a47a5fd8..638696898c2d617d931d536164fe4a56a2ff2519 100644 (file)
@@ -62,8 +62,8 @@ rtexturepool_t *chrometexturepool;
 void makechrometexture(void)
 {
        int i;
 void makechrometexture(void)
 {
        int i;
-       byte noise[64*64];
-       byte data[64*64][4];
+       qbyte noise[64*64];
+       qbyte data[64*64][4];
 
        fractalnoise(noise, 64, 8);
 
 
        fractalnoise(noise, 64, 8);
 
@@ -396,13 +396,13 @@ void R_DrawQ1Q2AliasModel (void)
                if (currentrenderentity->colormap >= 0 && (skinframe->base || skinframe->pants || skinframe->shirt))
                {
                        int c;
                if (currentrenderentity->colormap >= 0 && (skinframe->base || skinframe->pants || skinframe->shirt))
                {
                        int c;
-                       byte *color;
+                       qbyte *color;
                        if (skinframe->base)
                                R_DrawModelMesh(skinframe->base, aliasvertcolor, 0, 0, 0);
                        if (skinframe->pants)
                        {
                                c = (currentrenderentity->colormap & 0xF) << 4;c += (c >= 128 && c < 224) ? 4 : 12; // 128-224 are backwards ranges
                        if (skinframe->base)
                                R_DrawModelMesh(skinframe->base, aliasvertcolor, 0, 0, 0);
                        if (skinframe->pants)
                        {
                                c = (currentrenderentity->colormap & 0xF) << 4;c += (c >= 128 && c < 224) ? 4 : 12; // 128-224 are backwards ranges
-                               color = (byte *) (&d_8to24table[c]);
+                               color = (qbyte *) (&d_8to24table[c]);
                                if (c >= 224) // fullbright ranges
                                        R_DrawModelMesh(skinframe->pants, NULL, color[0] * (1.0f / 255.0f), color[1] * (1.0f / 255.0f), color[2] * (1.0f / 255.0f));
                                else
                                if (c >= 224) // fullbright ranges
                                        R_DrawModelMesh(skinframe->pants, NULL, color[0] * (1.0f / 255.0f), color[1] * (1.0f / 255.0f), color[2] * (1.0f / 255.0f));
                                else
@@ -414,7 +414,7 @@ void R_DrawQ1Q2AliasModel (void)
                        if (skinframe->shirt)
                        {
                                c = currentrenderentity->colormap & 0xF0      ;c += (c >= 128 && c < 224) ? 4 : 12; // 128-224 are backwards ranges
                        if (skinframe->shirt)
                        {
                                c = currentrenderentity->colormap & 0xF0      ;c += (c >= 128 && c < 224) ? 4 : 12; // 128-224 are backwards ranges
-                               color = (byte *) (&d_8to24table[c]);
+                               color = (qbyte *) (&d_8to24table[c]);
                                if (c >= 224) // fullbright ranges
                                        R_DrawModelMesh(skinframe->shirt, NULL, color[0] * (1.0f / 255.0f), color[1] * (1.0f / 255.0f), color[2] * (1.0f / 255.0f));
                                else
                                if (c >= 224) // fullbright ranges
                                        R_DrawModelMesh(skinframe->shirt, NULL, color[0] * (1.0f / 255.0f), color[1] * (1.0f / 255.0f), color[2] * (1.0f / 255.0f));
                                else
index 4a8fe7234a0f839251d48542ba4838bfb6f06073..494a93a58d2b4e2649b7058daded46c23fb57f3c 100644 (file)
@@ -25,7 +25,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
 static signed int blocklights[MAX_LIGHTMAP_SIZE*MAX_LIGHTMAP_SIZE*3]; // LordHavoc: *3 for colored lighting
 
 
 static signed int blocklights[MAX_LIGHTMAP_SIZE*MAX_LIGHTMAP_SIZE*3]; // LordHavoc: *3 for colored lighting
 
-static byte templight[MAX_LIGHTMAP_SIZE*MAX_LIGHTMAP_SIZE*4];
+static qbyte templight[MAX_LIGHTMAP_SIZE*MAX_LIGHTMAP_SIZE*4];
 
 cvar_t r_ambient = {0, "r_ambient", "0"};
 cvar_t r_vertexsurfaces = {0, "r_vertexsurfaces", "0"};
 
 cvar_t r_ambient = {0, "r_ambient", "0"};
 cvar_t r_vertexsurfaces = {0, "r_vertexsurfaces", "0"};
@@ -168,7 +168,7 @@ void R_StainNode (mnode_t *node, model_t *model, vec3_t origin, float radius, in
        float ndist;
        msurface_t *surf, *endsurf;
        int sdtable[256], td, maxdist, maxdist2, maxdist3, i, s, t, smax, tmax, smax3, dist2, impacts, impactt, subtract, a, stained, cr, cg, cb, ca, ratio;
        float ndist;
        msurface_t *surf, *endsurf;
        int sdtable[256], td, maxdist, maxdist2, maxdist3, i, s, t, smax, tmax, smax3, dist2, impacts, impactt, subtract, a, stained, cr, cg, cb, ca, ratio;
-       byte *bl;
+       qbyte *bl;
        vec3_t impact;
        // LordHavoc: use 64bit integer...  shame it's not very standardized...
 #if _MSC_VER || __BORLANDC__
        vec3_t impact;
        // LordHavoc: use 64bit integer...  shame it's not very standardized...
 #if _MSC_VER || __BORLANDC__
@@ -262,9 +262,9 @@ loc0:
                                                                                cr = (((icolor[4] - icolor[0]) * ratio) >> 8) + icolor[0];
                                                                                cg = (((icolor[5] - icolor[1]) * ratio) >> 8) + icolor[1];
                                                                                cb = (((icolor[6] - icolor[2]) * ratio) >> 8) + icolor[2];
                                                                                cr = (((icolor[4] - icolor[0]) * ratio) >> 8) + icolor[0];
                                                                                cg = (((icolor[5] - icolor[1]) * ratio) >> 8) + icolor[1];
                                                                                cb = (((icolor[6] - icolor[2]) * ratio) >> 8) + icolor[2];
-                                                                               bl[0] = (byte) ((((cr - (int) bl[0]) * a) >> 8) + (int) bl[0]);
-                                                                               bl[1] = (byte) ((((cg - (int) bl[1]) * a) >> 8) + (int) bl[1]);
-                                                                               bl[2] = (byte) ((((cb - (int) bl[2]) * a) >> 8) + (int) bl[2]);
+                                                                               bl[0] = (qbyte) ((((cr - (int) bl[0]) * a) >> 8) + (int) bl[0]);
+                                                                               bl[1] = (qbyte) ((((cg - (int) bl[1]) * a) >> 8) + (int) bl[1]);
+                                                                               bl[2] = (qbyte) ((((cb - (int) bl[2]) * a) >> 8) + (int) bl[2]);
                                                                                stained = true;
                                                                        }
                                                                }
                                                                                stained = true;
                                                                        }
                                                                }
@@ -349,8 +349,8 @@ Combine and scale multiple lightmaps into the 8.8 format in blocklights
 */
 static void R_BuildLightMap (msurface_t *surf, int dlightchanged)
 {
 */
 static void R_BuildLightMap (msurface_t *surf, int dlightchanged)
 {
-       int             smax, tmax, i, j, size, size3, shift, scale, maps, *bl, stride, l;
-       byte    *lightmap, *out, *stain;
+       int smax, tmax, i, j, size, size3, shift, scale, maps, *bl, stride, l;
+       qbyte *lightmap, *out, *stain;
 
        // update cached lighting info
        surf->cached_dlight = 0;
 
        // update cached lighting info
        surf->cached_dlight = 0;
@@ -1088,12 +1088,12 @@ static void RSurfShader_Wall_Pass_BaseLightmap(msurface_t *s)
 
 static void RSurfShader_Wall_Pass_BaseVertex(msurface_t *s)
 {
 
 static void RSurfShader_Wall_Pass_BaseVertex(msurface_t *s)
 {
-       int                             i, size3;
-       float                   c[3], base[3], scale, diff[3], ifog;
-       surfvertex_t    *v;
-       surfvert_t              *sv;
-       rmeshinfo_t             m;
-       byte                    *lm;
+       int i, size3;
+       float c[3], base[3], scale, diff[3], ifog;
+       surfvertex_t *v;
+       surfvert_t *sv;
+       rmeshinfo_t m;
+       qbyte *lm;
 
        size3 = ((s->extents[0]>>4)+1)*((s->extents[1]>>4)+1)*3;
 
 
        size3 = ((s->extents[0]>>4)+1)*((s->extents[1]>>4)+1)*3;
 
@@ -1813,7 +1813,7 @@ static void R_PVSWorldNode()
        msurface_t *surf, **mark, **endmark;
        mleaf_t *leaf;
        tinyplane_t plane;
        msurface_t *surf, **mark, **endmark;
        mleaf_t *leaf;
        tinyplane_t plane;
-       byte *worldvis;
+       qbyte *worldvis;
 
        worldvis = Mod_LeafPVS (r_viewleaf, cl.worldmodel);
 
 
        worldvis = Mod_LeafPVS (r_viewleaf, cl.worldmodel);
 
index c1682318796c6408079bdf5c64d4b871d54419c2..2ef38e93a9f85296e4521e85290b236afe1424e4 100644 (file)
@@ -33,7 +33,7 @@ static int block_size;
 
 // since there is only one set of GL texture numbers, we have to track them
 // globally, everything else is per texture pool
 
 // since there is only one set of GL texture numbers, we have to track them
 // globally, everything else is per texture pool
-static byte *gltexnuminuse;
+static qbyte *gltexnuminuse;
 
 typedef struct
 {
 
 typedef struct
 {
@@ -86,16 +86,16 @@ typedef struct gltexture_s
        // location in the image, and size
        int x, y, width, height;
        // copy of the original texture supplied to the upload function, for re-uploading or deferred uploads (non-precached)
        // location in the image, and size
        int x, y, width, height;
        // copy of the original texture supplied to the upload function, for re-uploading or deferred uploads (non-precached)
-       byte *inputtexels;
+       qbyte *inputtexels;
        // to identify cache mismatchs (this might be removed someday)
        int crc;
        // flags supplied to the LoadTexture/ProceduralTexture functions
        // (might be altered to remove TEXF_ALPHA), and GLTEXF_ private flags
        int flags;
        // procedural texture generation function, called once per frame if the texture is used
        // to identify cache mismatchs (this might be removed someday)
        int crc;
        // flags supplied to the LoadTexture/ProceduralTexture functions
        // (might be altered to remove TEXF_ALPHA), and GLTEXF_ private flags
        int flags;
        // procedural texture generation function, called once per frame if the texture is used
-       int (*generate)(byte *buffer, int width, int height, void *parameterdata, int parameterdatasize);
+       int (*generate)(qbyte *buffer, int width, int height, void *parameterdata, int parameterdatasize);
        // data provided to generate, persistent from call to call
        // data provided to generate, persistent from call to call
-       byte *proceduraldata;
+       qbyte *proceduraldata;
        // size of data
        int proceduraldatasize;
        // used only to avoid updating the texture more than once per frame
        // size of data
        int proceduraldatasize;
        // used only to avoid updating the texture more than once per frame
@@ -118,11 +118,11 @@ gltexturepool_t;
 
 static gltexturepool_t *gltexturepoolchain = NULL;
 
 
 static gltexturepool_t *gltexturepoolchain = NULL;
 
-static byte *resamplerow1 = NULL, *resamplerow2 = NULL;
+static qbyte *resamplerow1 = NULL, *resamplerow2 = NULL;
 static int resamplerowsize = 0;
 static int resamplerowsize = 0;
-static byte *resizebuffer = NULL, *colorconvertbuffer;
+static qbyte *resizebuffer = NULL, *colorconvertbuffer;
 static int resizebuffersize = 0;
 static int resizebuffersize = 0;
-static byte *texturebuffer;
+static qbyte *texturebuffer;
 static int texturebuffersize = 0;
 
 static int realmaxsize = 0;
 static int texturebuffersize = 0;
 
 static int realmaxsize = 0;
@@ -523,7 +523,7 @@ void R_Textures_Init (void)
        R_RegisterModule("R_Textures", r_textures_start, r_textures_shutdown, r_textures_newmap);
 }
 
        R_RegisterModule("R_Textures", r_textures_start, r_textures_shutdown, r_textures_newmap);
 }
 
-static void R_ResampleTextureLerpLine (byte *in, byte *out, int inwidth, int outwidth, int bytesperpixel)
+static void R_ResampleTextureLerpLine (qbyte *in, qbyte *out, int inwidth, int outwidth, int bytesperpixel)
 {
        int             j, xi, oldx = 0, f, fstep, endx, lerp;
        fstep = (int) (inwidth*65536.0f/outwidth);
 {
        int             j, xi, oldx = 0, f, fstep, endx, lerp;
        fstep = (int) (inwidth*65536.0f/outwidth);
@@ -541,10 +541,10 @@ static void R_ResampleTextureLerpLine (byte *in, byte *out, int inwidth, int out
                        if (xi < endx)
                        {
                                lerp = f & 0xFFFF;
                        if (xi < endx)
                        {
                                lerp = f & 0xFFFF;
-                               *out++ = (byte) ((((in[4] - in[0]) * lerp) >> 16) + in[0]);
-                               *out++ = (byte) ((((in[5] - in[1]) * lerp) >> 16) + in[1]);
-                               *out++ = (byte) ((((in[6] - in[2]) * lerp) >> 16) + in[2]);
-                               *out++ = (byte) ((((in[7] - in[3]) * lerp) >> 16) + in[3]);
+                               *out++ = (qbyte) ((((in[4] - in[0]) * lerp) >> 16) + in[0]);
+                               *out++ = (qbyte) ((((in[5] - in[1]) * lerp) >> 16) + in[1]);
+                               *out++ = (qbyte) ((((in[6] - in[2]) * lerp) >> 16) + in[2]);
+                               *out++ = (qbyte) ((((in[7] - in[3]) * lerp) >> 16) + in[3]);
                        }
                        else // last pixel of the line has no pixel to lerp to
                        {
                        }
                        else // last pixel of the line has no pixel to lerp to
                        {
@@ -568,9 +568,9 @@ static void R_ResampleTextureLerpLine (byte *in, byte *out, int inwidth, int out
                        if (xi < endx)
                        {
                                lerp = f & 0xFFFF;
                        if (xi < endx)
                        {
                                lerp = f & 0xFFFF;
-                               *out++ = (byte) ((((in[3] - in[0]) * lerp) >> 16) + in[0]);
-                               *out++ = (byte) ((((in[4] - in[1]) * lerp) >> 16) + in[1]);
-                               *out++ = (byte) ((((in[5] - in[2]) * lerp) >> 16) + in[2]);
+                               *out++ = (qbyte) ((((in[3] - in[0]) * lerp) >> 16) + in[0]);
+                               *out++ = (qbyte) ((((in[4] - in[1]) * lerp) >> 16) + in[1]);
+                               *out++ = (qbyte) ((((in[5] - in[2]) * lerp) >> 16) + in[2]);
                        }
                        else // last pixel of the line has no pixel to lerp to
                        {
                        }
                        else // last pixel of the line has no pixel to lerp to
                        {
@@ -607,8 +607,8 @@ static void R_ResampleTexture (void *indata, int inwidth, int inheight, void *ou
        {
                if (r_lerpimages.integer)
                {
        {
                if (r_lerpimages.integer)
                {
-                       int             i, j, yi, oldy, f, fstep, lerp, endy = (inheight-1), inwidth4 = inwidth*4, outwidth4 = outwidth*4;
-                       byte    *inrow, *out;
+                       int i, j, yi, oldy, f, fstep, lerp, endy = (inheight-1), inwidth4 = inwidth*4, outwidth4 = outwidth*4;
+                       qbyte *inrow, *out;
                        out = outdata;
                        fstep = (int) (inheight*65536.0f/outheight);
 
                        out = outdata;
                        fstep = (int) (inheight*65536.0f/outheight);
 
@@ -624,7 +624,7 @@ static void R_ResampleTexture (void *indata, int inwidth, int inheight, void *ou
                                        lerp = f & 0xFFFF;
                                        if (yi != oldy)
                                        {
                                        lerp = f & 0xFFFF;
                                        if (yi != oldy)
                                        {
-                                               inrow = (byte *)indata + inwidth4*yi;
+                                               inrow = (qbyte *)indata + inwidth4*yi;
                                                if (yi == oldy+1)
                                                        memcpy(row1, row2, outwidth4);
                                                else
                                                if (yi == oldy+1)
                                                        memcpy(row1, row2, outwidth4);
                                                else
@@ -635,7 +635,7 @@ static void R_ResampleTexture (void *indata, int inwidth, int inheight, void *ou
                                        j = outwidth - 4;
                                        while(j >= 0)
                                        {
                                        j = outwidth - 4;
                                        while(j >= 0)
                                        {
-#define LERPBYTE(i) out[i] = (byte) ((((row2[i] - row1[i]) * lerp) >> 16) + row1[i])
+#define LERPBYTE(i) out[i] = (qbyte) ((((row2[i] - row1[i]) * lerp) >> 16) + row1[i])
                                                LERPBYTE( 0);
                                                LERPBYTE( 1);
                                                LERPBYTE( 2);
                                                LERPBYTE( 0);
                                                LERPBYTE( 1);
                                                LERPBYTE( 2);
@@ -688,7 +688,7 @@ static void R_ResampleTexture (void *indata, int inwidth, int inheight, void *ou
                                {
                                        if (yi != oldy)
                                        {
                                {
                                        if (yi != oldy)
                                        {
-                                               inrow = (byte *)indata + inwidth4*yi;
+                                               inrow = (qbyte *)indata + inwidth4*yi;
                                                if (yi == oldy+1)
                                                        memcpy(row1, row2, outwidth4);
                                                else
                                                if (yi == oldy+1)
                                                        memcpy(row1, row2, outwidth4);
                                                else
@@ -740,8 +740,8 @@ static void R_ResampleTexture (void *indata, int inwidth, int inheight, void *ou
        {
                if (r_lerpimages.integer)
                {
        {
                if (r_lerpimages.integer)
                {
-                       int             i, j, yi, oldy, f, fstep, lerp, endy = (inheight-1), inwidth3 = inwidth * 3, outwidth3 = outwidth * 3;
-                       byte    *inrow, *out;
+                       int i, j, yi, oldy, f, fstep, lerp, endy = (inheight-1), inwidth3 = inwidth * 3, outwidth3 = outwidth * 3;
+                       qbyte *inrow, *out;
                        out = outdata;
                        fstep = (int) (inheight*65536.0f/outheight);
 
                        out = outdata;
                        fstep = (int) (inheight*65536.0f/outheight);
 
@@ -757,7 +757,7 @@ static void R_ResampleTexture (void *indata, int inwidth, int inheight, void *ou
                                        lerp = f & 0xFFFF;
                                        if (yi != oldy)
                                        {
                                        lerp = f & 0xFFFF;
                                        if (yi != oldy)
                                        {
-                                               inrow = (byte *)indata + inwidth3*yi;
+                                               inrow = (qbyte *)indata + inwidth3*yi;
                                                if (yi == oldy+1)
                                                        memcpy(row1, row2, outwidth3);
                                                else
                                                if (yi == oldy+1)
                                                        memcpy(row1, row2, outwidth3);
                                                else
@@ -768,7 +768,7 @@ static void R_ResampleTexture (void *indata, int inwidth, int inheight, void *ou
                                        j = outwidth - 4;
                                        while(j >= 0)
                                        {
                                        j = outwidth - 4;
                                        while(j >= 0)
                                        {
-#define LERPBYTE(i) out[i] = (byte) ((((row2[i] - row1[i]) * lerp) >> 16) + row1[i])
+#define LERPBYTE(i) out[i] = (qbyte) ((((row2[i] - row1[i]) * lerp) >> 16) + row1[i])
                                                LERPBYTE( 0);
                                                LERPBYTE( 1);
                                                LERPBYTE( 2);
                                                LERPBYTE( 0);
                                                LERPBYTE( 1);
                                                LERPBYTE( 2);
@@ -814,7 +814,7 @@ static void R_ResampleTexture (void *indata, int inwidth, int inheight, void *ou
                                {
                                        if (yi != oldy)
                                        {
                                {
                                        if (yi != oldy)
                                        {
-                                               inrow = (byte *)indata + inwidth3*yi;
+                                               inrow = (qbyte *)indata + inwidth3*yi;
                                                if (yi == oldy+1)
                                                        memcpy(row1, row2, outwidth3);
                                                else
                                                if (yi == oldy+1)
                                                        memcpy(row1, row2, outwidth3);
                                                else
@@ -829,13 +829,13 @@ static void R_ResampleTexture (void *indata, int inwidth, int inheight, void *ou
                {
                        int i, j, f, inwidth3 = inwidth * 3;
                        unsigned frac, fracstep;
                {
                        int i, j, f, inwidth3 = inwidth * 3;
                        unsigned frac, fracstep;
-                       byte *inrow, *out;
+                       qbyte *inrow, *out;
                        out = outdata;
 
                        fracstep = inwidth*0x10000/outwidth;
                        for (i = 0;i < outheight;i++)
                        {
                        out = outdata;
 
                        fracstep = inwidth*0x10000/outwidth;
                        for (i = 0;i < outheight;i++)
                        {
-                               inrow = (byte *)indata + inwidth3*(i*inheight/outheight);
+                               inrow = (qbyte *)indata + inwidth3*(i*inheight/outheight);
                                frac = fracstep >> 1;
                                j = outwidth - 4;
                                while (j >= 0)
                                frac = fracstep >> 1;
                                j = outwidth - 4;
                                while (j >= 0)
@@ -867,7 +867,7 @@ static void R_ResampleTexture (void *indata, int inwidth, int inheight, void *ou
 }
 
 // in can be the same as out
 }
 
 // in can be the same as out
-static void R_MipReduce(byte *in, byte *out, int *width, int *height, int destwidth, int destheight, int bytesperpixel)
+static void R_MipReduce(qbyte *in, qbyte *out, int *width, int *height, int destwidth, int destheight, int bytesperpixel)
 {
        int x, y, nextrow;
        nextrow = *width * bytesperpixel;
 {
        int x, y, nextrow;
        nextrow = *width * bytesperpixel;
@@ -884,10 +884,10 @@ static void R_MipReduce(byte *in, byte *out, int *width, int *height, int destwi
                                {
                                        for (x = 0;x < *width;x++)
                                        {
                                {
                                        for (x = 0;x < *width;x++)
                                        {
-                                               out[0] = (byte) ((in[0] + in[4] + in[nextrow  ] + in[nextrow+4]) >> 2);
-                                               out[1] = (byte) ((in[1] + in[5] + in[nextrow+1] + in[nextrow+5]) >> 2);
-                                               out[2] = (byte) ((in[2] + in[6] + in[nextrow+2] + in[nextrow+6]) >> 2);
-                                               out[3] = (byte) ((in[3] + in[7] + in[nextrow+3] + in[nextrow+7]) >> 2);
+                                               out[0] = (qbyte) ((in[0] + in[4] + in[nextrow  ] + in[nextrow+4]) >> 2);
+                                               out[1] = (qbyte) ((in[1] + in[5] + in[nextrow+1] + in[nextrow+5]) >> 2);
+                                               out[2] = (qbyte) ((in[2] + in[6] + in[nextrow+2] + in[nextrow+6]) >> 2);
+                                               out[3] = (qbyte) ((in[3] + in[7] + in[nextrow+3] + in[nextrow+7]) >> 2);
                                                out += 4;
                                                in += 8;
                                        }
                                                out += 4;
                                                in += 8;
                                        }
@@ -900,9 +900,9 @@ static void R_MipReduce(byte *in, byte *out, int *width, int *height, int destwi
                                {
                                        for (x = 0;x < *width;x++)
                                        {
                                {
                                        for (x = 0;x < *width;x++)
                                        {
-                                               out[0] = (byte) ((in[0] + in[3] + in[nextrow  ] + in[nextrow+3]) >> 2);
-                                               out[1] = (byte) ((in[1] + in[4] + in[nextrow+1] + in[nextrow+4]) >> 2);
-                                               out[2] = (byte) ((in[2] + in[5] + in[nextrow+2] + in[nextrow+5]) >> 2);
+                                               out[0] = (qbyte) ((in[0] + in[3] + in[nextrow  ] + in[nextrow+3]) >> 2);
+                                               out[1] = (qbyte) ((in[1] + in[4] + in[nextrow+1] + in[nextrow+4]) >> 2);
+                                               out[2] = (qbyte) ((in[2] + in[5] + in[nextrow+2] + in[nextrow+5]) >> 2);
                                                out += 3;
                                                in += 6;
                                        }
                                                out += 3;
                                                in += 6;
                                        }
@@ -921,10 +921,10 @@ static void R_MipReduce(byte *in, byte *out, int *width, int *height, int destwi
                                {
                                        for (x = 0;x < *width;x++)
                                        {
                                {
                                        for (x = 0;x < *width;x++)
                                        {
-                                               out[0] = (byte) ((in[0] + in[4]) >> 1);
-                                               out[1] = (byte) ((in[1] + in[5]) >> 1);
-                                               out[2] = (byte) ((in[2] + in[6]) >> 1);
-                                               out[3] = (byte) ((in[3] + in[7]) >> 1);
+                                               out[0] = (qbyte) ((in[0] + in[4]) >> 1);
+                                               out[1] = (qbyte) ((in[1] + in[5]) >> 1);
+                                               out[2] = (qbyte) ((in[2] + in[6]) >> 1);
+                                               out[3] = (qbyte) ((in[3] + in[7]) >> 1);
                                                out += 4;
                                                in += 8;
                                        }
                                                out += 4;
                                                in += 8;
                                        }
@@ -936,9 +936,9 @@ static void R_MipReduce(byte *in, byte *out, int *width, int *height, int destwi
                                {
                                        for (x = 0;x < *width;x++)
                                        {
                                {
                                        for (x = 0;x < *width;x++)
                                        {
-                                               out[0] = (byte) ((in[0] + in[3]) >> 1);
-                                               out[1] = (byte) ((in[1] + in[4]) >> 1);
-                                               out[2] = (byte) ((in[2] + in[5]) >> 1);
+                                               out[0] = (qbyte) ((in[0] + in[3]) >> 1);
+                                               out[1] = (qbyte) ((in[1] + in[4]) >> 1);
+                                               out[2] = (qbyte) ((in[2] + in[5]) >> 1);
                                                out += 3;
                                                in += 6;
                                        }
                                                out += 3;
                                                in += 6;
                                        }
@@ -960,10 +960,10 @@ static void R_MipReduce(byte *in, byte *out, int *width, int *height, int destwi
                                {
                                        for (x = 0;x < *width;x++)
                                        {
                                {
                                        for (x = 0;x < *width;x++)
                                        {
-                                               out[0] = (byte) ((in[0] + in[nextrow  ]) >> 1);
-                                               out[1] = (byte) ((in[1] + in[nextrow+1]) >> 1);
-                                               out[2] = (byte) ((in[2] + in[nextrow+2]) >> 1);
-                                               out[3] = (byte) ((in[3] + in[nextrow+3]) >> 1);
+                                               out[0] = (qbyte) ((in[0] + in[nextrow  ]) >> 1);
+                                               out[1] = (qbyte) ((in[1] + in[nextrow+1]) >> 1);
+                                               out[2] = (qbyte) ((in[2] + in[nextrow+2]) >> 1);
+                                               out[3] = (qbyte) ((in[3] + in[nextrow+3]) >> 1);
                                                out += 4;
                                                in += 4;
                                        }
                                                out += 4;
                                                in += 4;
                                        }
@@ -976,9 +976,9 @@ static void R_MipReduce(byte *in, byte *out, int *width, int *height, int destwi
                                {
                                        for (x = 0;x < *width;x++)
                                        {
                                {
                                        for (x = 0;x < *width;x++)
                                        {
-                                               out[0] = (byte) ((in[0] + in[nextrow  ]) >> 1);
-                                               out[1] = (byte) ((in[1] + in[nextrow+1]) >> 1);
-                                               out[2] = (byte) ((in[2] + in[nextrow+2]) >> 1);
+                                               out[0] = (qbyte) ((in[0] + in[nextrow  ]) >> 1);
+                                               out[1] = (qbyte) ((in[1] + in[nextrow+1]) >> 1);
+                                               out[2] = (qbyte) ((in[2] + in[nextrow+2]) >> 1);
                                                out += 3;
                                                in += 3;
                                        }
                                                out += 3;
                                                in += 3;
                                        }
@@ -993,10 +993,10 @@ static void R_MipReduce(byte *in, byte *out, int *width, int *height, int destwi
        }
 }
 
        }
 }
 
-static void R_Upload(gltexture_t *glt, byte *data)
+static void R_Upload(gltexture_t *glt, qbyte *data)
 {
        int mip, width, height, internalformat;
 {
        int mip, width, height, internalformat;
-       byte *prevbuffer;
+       qbyte *prevbuffer;
        prevbuffer = data;
 
        glBindTexture(GL_TEXTURE_2D, glt->image->texnum);
        prevbuffer = data;
 
        glBindTexture(GL_TEXTURE_2D, glt->image->texnum);
@@ -1278,7 +1278,7 @@ static void R_UploadTexture (gltexture_t *glt)
        }
 }
 
        }
 }
 
-static gltexture_t *R_SetupTexture(gltexturepool_t *pool, char *identifier, int crc, int width, int height, int flags, textypeinfo_t *texinfo, byte *data, int (*generate)(byte *buffer, int width, int height, void *proceduraldata, int proceduraldatasize), void *proceduraldata, int proceduraldatasize)
+static gltexture_t *R_SetupTexture(gltexturepool_t *pool, char *identifier, int crc, int width, int height, int flags, textypeinfo_t *texinfo, qbyte *data, int (*generate)(qbyte *buffer, int width, int height, void *proceduraldata, int proceduraldatasize), void *proceduraldata, int proceduraldatasize)
 {
        gltexture_t *glt;
        glt = Mem_Alloc(texturemempool, sizeof(gltexture_t));
 {
        gltexture_t *glt;
        glt = Mem_Alloc(texturemempool, sizeof(gltexture_t));
@@ -1331,7 +1331,7 @@ static gltexture_t *R_SetupTexture(gltexturepool_t *pool, char *identifier, int
 R_LoadTexture
 ================
 */
 R_LoadTexture
 ================
 */
-rtexture_t *R_LoadTexture (rtexturepool_t *rtexturepool, char *identifier, int width, int height, byte *data, int textype, int flags)
+rtexture_t *R_LoadTexture (rtexturepool_t *rtexturepool, char *identifier, int width, int height, qbyte *data, int textype, int flags)
 {
        int i;
        gltexture_t *glt;
 {
        int i;
        gltexture_t *glt;
@@ -1416,7 +1416,7 @@ rtexture_t *R_LoadTexture (rtexturepool_t *rtexturepool, char *identifier, int w
        return (rtexture_t *)R_SetupTexture(pool, identifier, crc, width, height, flags | GLTEXF_UPLOAD, texinfo, data, NULL, NULL, 0);
 }
 
        return (rtexture_t *)R_SetupTexture(pool, identifier, crc, width, height, flags | GLTEXF_UPLOAD, texinfo, data, NULL, NULL, 0);
 }
 
-rtexture_t *R_ProceduralTexture (rtexturepool_t *rtexturepool, char *identifier, int width, int height, int textype, int flags, int (*generate)(byte *buffer, int width, int height, void *proceduraldata, int proceduraldatasize), void *proceduraldata, int proceduraldatasize)
+rtexture_t *R_ProceduralTexture (rtexturepool_t *rtexturepool, char *identifier, int width, int height, int textype, int flags, int (*generate)(qbyte *buffer, int width, int height, void *proceduraldata, int proceduraldatasize), void *proceduraldata, int proceduraldatasize)
 {
        gltexture_t             *glt;
        gltexturepool_t *pool = (gltexturepool_t *)rtexturepool;
 {
        gltexture_t             *glt;
        gltexturepool_t *pool = (gltexturepool_t *)rtexturepool;
@@ -1550,7 +1550,7 @@ int R_CompatibleFragmentWidth(int width, int textype, int flags)
        return width;
 }
 
        return width;
 }
 
-void R_UpdateTexture(rtexture_t *rt, byte *data)
+void R_UpdateTexture(rtexture_t *rt, qbyte *data)
 {
        gltexture_t *glt;
        if (rt == NULL)
 {
        gltexture_t *glt;
        if (rt == NULL)
diff --git a/image.c b/image.c
index dbad08ff5b69231a6e8255e1faafe393b8efaa11..bcd2bc7763fcf36bad5a8d881adb91c1f744d36f 100644 (file)
--- a/image.c
+++ b/image.c
@@ -4,7 +4,7 @@
 int            image_width;
 int            image_height;
 
 int            image_width;
 int            image_height;
 
-void Image_GammaRemapRGB(byte *in, byte *out, int pixels, byte *gammar, byte *gammag, byte *gammab)
+void Image_GammaRemapRGB(qbyte *in, qbyte *out, int pixels, qbyte *gammar, qbyte *gammag, qbyte *gammab)
 {
        while (pixels--)
        {
 {
        while (pixels--)
        {
@@ -17,7 +17,7 @@ void Image_GammaRemapRGB(byte *in, byte *out, int pixels, byte *gammar, byte *ga
 }
 
 // note: pal must be 32bit color
 }
 
 // note: pal must be 32bit color
-void Image_Copy8bitRGBA(byte *in, byte *out, int pixels, int *pal)
+void Image_Copy8bitRGBA(qbyte *in, qbyte *out, int pixels, int *pal)
 {
        int *iout = (void *)out;
        while (pixels >= 8)
 {
        int *iout = (void *)out;
        while (pixels >= 8)
@@ -83,11 +83,11 @@ typedef struct
 LoadPCX
 ============
 */
 LoadPCX
 ============
 */
-byte* LoadPCX (byte *f, int matchwidth, int matchheight)
+qbyte* LoadPCX (qbyte *f, int matchwidth, int matchheight)
 {
 {
-       pcx_t   pcx;
-       byte    *palette, *a, *b, *image_rgba, *fin, *pbuf, *enddata;
-       int             x, y, x2, dataByte;
+       pcx_t pcx;
+       qbyte *palette, *a, *b, *image_rgba, *fin, *pbuf, *enddata;
+       int x, y, x2, dataByte;
 
        if (loadsize < sizeof(pcx) + 768)
        {
 
        if (loadsize < sizeof(pcx) + 768)
        {
@@ -204,10 +204,10 @@ TargaHeader               targa_header;
 LoadTGA
 =============
 */
 LoadTGA
 =============
 */
-byte* LoadTGA (byte *f, int matchwidth, int matchheight)
+qbyte *LoadTGA (qbyte *f, int matchwidth, int matchheight)
 {
        int columns, rows, row, column;
 {
        int columns, rows, row, column;
-       byte *pixbuf, *image_rgba, *fin, *enddata;
+       qbyte *pixbuf, *image_rgba, *fin, *enddata;
 
        if (loadsize < 18+3)
                return NULL;
 
        if (loadsize < 18+3)
                return NULL;
@@ -399,10 +399,10 @@ outofdata:;
 LoadLMP
 ============
 */
 LoadLMP
 ============
 */
-byte* LoadLMP (byte *f, int matchwidth, int matchheight)
+qbyte *LoadLMP (qbyte *f, int matchwidth, int matchheight)
 {
 {
-       byte    *image_rgba;
-       int             width, height;
+       qbyte *image_rgba;
+       int width, height;
 
        if (loadsize < 9)
        {
 
        if (loadsize < 9)
        {
@@ -457,10 +457,10 @@ void Image_StripImageExtension (char *in, char *out)
                strcpy(out, in);
 }
 
                strcpy(out, in);
 }
 
-byte* loadimagepixels (char* filename, qboolean complain, int matchwidth, int matchheight)
+qbyte *loadimagepixels (char *filename, qboolean complain, int matchwidth, int matchheight)
 {
 {
-       byte    *f, *data;
-       char    basename[256], name[256], *c;
+       qbyte *f, *data;
+       char basename[256], name[256], *c;
        Image_StripImageExtension(filename, basename); // strip .tga, .pcx and .lmp extensions to allow replacement by other types
        // replace *'s with #, so commandline utils don't get confused when dealing with the external files
        for (c = basename;*c;c++)
        Image_StripImageExtension(filename, basename); // strip .tga, .pcx and .lmp extensions to allow replacement by other types
        // replace *'s with #, so commandline utils don't get confused when dealing with the external files
        for (c = basename;*c;c++)
@@ -511,7 +511,7 @@ byte* loadimagepixels (char* filename, qboolean complain, int matchwidth, int ma
        return NULL;
 }
 
        return NULL;
 }
 
-int image_makemask (byte *in, byte *out, int size)
+int image_makemask (qbyte *in, qbyte *out, int size)
 {
        int             i, count;
        count = 0;
 {
        int             i, count;
        count = 0;
@@ -527,9 +527,9 @@ int image_makemask (byte *in, byte *out, int size)
        return count;
 }
 
        return count;
 }
 
-byte* loadimagepixelsmask (char* filename, qboolean complain, int matchwidth, int matchheight)
+qbyte* loadimagepixelsmask (char* filename, qboolean complain, int matchwidth, int matchheight)
 {
 {
-       byte    *in, *data;
+       qbyte *in, *data;
        in = data = loadimagepixels(filename, complain, matchwidth, matchheight);
        if (!data)
                return NULL;
        in = data = loadimagepixels(filename, complain, matchwidth, matchheight);
        if (!data)
                return NULL;
@@ -544,7 +544,7 @@ byte* loadimagepixelsmask (char* filename, qboolean complain, int matchwidth, in
 
 rtexture_t *loadtextureimage (rtexturepool_t *pool, char* filename, int matchwidth, int matchheight, qboolean complain, qboolean mipmap, qboolean precache)
 {
 
 rtexture_t *loadtextureimage (rtexturepool_t *pool, char* filename, int matchwidth, int matchheight, qboolean complain, qboolean mipmap, qboolean precache)
 {
-       byte *data;
+       qbyte *data;
        rtexture_t *rt;
        if (!(data = loadimagepixels (filename, complain, matchwidth, matchheight)))
                return 0;
        rtexture_t *rt;
        if (!(data = loadimagepixels (filename, complain, matchwidth, matchheight)))
                return 0;
@@ -555,7 +555,7 @@ rtexture_t *loadtextureimage (rtexturepool_t *pool, char* filename, int matchwid
 
 rtexture_t *loadtextureimagemask (rtexturepool_t *pool, char* filename, int matchwidth, int matchheight, qboolean complain, qboolean mipmap, qboolean precache)
 {
 
 rtexture_t *loadtextureimagemask (rtexturepool_t *pool, char* filename, int matchwidth, int matchheight, qboolean complain, qboolean mipmap, qboolean precache)
 {
-       byte *data;
+       qbyte *data;
        rtexture_t *rt;
        if (!(data = loadimagepixelsmask (filename, complain, matchwidth, matchheight)))
                return 0;
        rtexture_t *rt;
        if (!(data = loadimagepixelsmask (filename, complain, matchwidth, matchheight)))
                return 0;
@@ -568,7 +568,7 @@ rtexture_t *image_masktex;
 rtexture_t *loadtextureimagewithmask (rtexturepool_t *pool, char* filename, int matchwidth, int matchheight, qboolean complain, qboolean mipmap, qboolean precache)
 {
        int count;
 rtexture_t *loadtextureimagewithmask (rtexturepool_t *pool, char* filename, int matchwidth, int matchheight, qboolean complain, qboolean mipmap, qboolean precache)
 {
        int count;
-       byte *data;
+       qbyte *data;
        char *filename2;
        rtexture_t *rt;
        image_masktex = NULL;
        char *filename2;
        rtexture_t *rt;
        image_masktex = NULL;
@@ -587,9 +587,9 @@ rtexture_t *loadtextureimagewithmask (rtexturepool_t *pool, char* filename, int
        return rt;
 }
 
        return rt;
 }
 
-void Image_WriteTGARGB_preflipped (char *filename, int width, int height, byte *data)
+void Image_WriteTGARGB_preflipped (char *filename, int width, int height, qbyte *data)
 {
 {
-       byte *buffer, *in, *out, *end;
+       qbyte *buffer, *in, *out, *end;
 
        buffer = Mem_Alloc(tempmempool, width*height*3 + 18);
 
 
        buffer = Mem_Alloc(tempmempool, width*height*3 + 18);
 
@@ -616,10 +616,10 @@ void Image_WriteTGARGB_preflipped (char *filename, int width, int height, byte *
        Mem_Free(buffer);
 }
 
        Mem_Free(buffer);
 }
 
-void Image_WriteTGARGB (char *filename, int width, int height, byte *data)
+void Image_WriteTGARGB (char *filename, int width, int height, qbyte *data)
 {
        int y;
 {
        int y;
-       byte *buffer, *in, *out, *end;
+       qbyte *buffer, *in, *out, *end;
 
        buffer = Mem_Alloc(tempmempool, width*height*3 + 18);
 
 
        buffer = Mem_Alloc(tempmempool, width*height*3 + 18);
 
@@ -649,10 +649,10 @@ void Image_WriteTGARGB (char *filename, int width, int height, byte *data)
        Mem_Free(buffer);
 }
 
        Mem_Free(buffer);
 }
 
-void Image_WriteTGARGBA (char *filename, int width, int height, byte *data)
+void Image_WriteTGARGBA (char *filename, int width, int height, qbyte *data)
 {
        int y;
 {
        int y;
-       byte *buffer, *in, *out, *end;
+       qbyte *buffer, *in, *out, *end;
 
        buffer = Mem_Alloc(tempmempool, width*height*4 + 18);
 
 
        buffer = Mem_Alloc(tempmempool, width*height*4 + 18);
 
@@ -683,9 +683,9 @@ void Image_WriteTGARGBA (char *filename, int width, int height, byte *data)
        Mem_Free(buffer);
 }
 
        Mem_Free(buffer);
 }
 
-qboolean Image_CheckAlpha(byte *data, int size, qboolean rgba)
+qboolean Image_CheckAlpha(qbyte *data, int size, qboolean rgba)
 {
 {
-       byte *end;
+       qbyte *end;
        if (rgba)
        {
                // check alpha bytes
        if (rgba)
        {
                // check alpha bytes
diff --git a/image.h b/image.h
index c955fafbcf36bf201afc19d6bf05c3862e1ff804..f8d4608ce034740978cb185d31e87e52ca62f0bd 100644 (file)
--- a/image.h
+++ b/image.h
@@ -1,14 +1,14 @@
 
 
-void Image_GammaRemapRGB(byte *in, byte *out, int pixels, byte *gammar, byte *gammag, byte *gammab);
-void Image_Copy8bitRGBA(byte *in, byte *out, int pixels, int *pal);
-int image_makemask (byte *in, byte *out, int size);
-byte* loadimagepixels (char* filename, qboolean complain, int matchwidth, int matchheight);
+void Image_GammaRemapRGB(qbyte *in, qbyte *out, int pixels, qbyte *gammar, qbyte *gammag, qbyte *gammab);
+void Image_Copy8bitRGBA(qbyte *in, qbyte *out, int pixels, int *pal);
+int image_makemask (qbyte *in, qbyte *out, int size);
+qbyte *loadimagepixels (char* filename, qboolean complain, int matchwidth, int matchheight);
 rtexture_t *loadtextureimage (rtexturepool_t *pool, char* filename, int matchwidth, int matchheight, qboolean complain, qboolean mipmap, qboolean precache);
 rtexture_t *loadtextureimage (rtexturepool_t *pool, char* filename, int matchwidth, int matchheight, qboolean complain, qboolean mipmap, qboolean precache);
-byte* loadimagepixelsmask (char* filename, qboolean complain, int matchwidth, int matchheight);
+qbyte *loadimagepixelsmask (char* filename, qboolean complain, int matchwidth, int matchheight);
 rtexture_t *loadtextureimagemask (rtexturepool_t *pool, char* filename, int matchwidth, int matchheight, qboolean complain, qboolean mipmap, qboolean precache);
 rtexture_t *image_masktex;
 rtexture_t *loadtextureimagewithmask (rtexturepool_t *pool, char* filename, int matchwidth, int matchheight, qboolean complain, qboolean mipmap, qboolean precache);
 rtexture_t *loadtextureimagemask (rtexturepool_t *pool, char* filename, int matchwidth, int matchheight, qboolean complain, qboolean mipmap, qboolean precache);
 rtexture_t *image_masktex;
 rtexture_t *loadtextureimagewithmask (rtexturepool_t *pool, char* filename, int matchwidth, int matchheight, qboolean complain, qboolean mipmap, qboolean precache);
-void Image_WriteTGARGB_preflipped (char *filename, int width, int height, byte *data);
-void Image_WriteTGARGB (char *filename, int width, int height, byte *data);
-void Image_WriteTGARGBA (char *filename, int width, int height, byte *data);
-qboolean Image_CheckAlpha(byte *data, int size, qboolean rgba);
+void Image_WriteTGARGB_preflipped (char *filename, int width, int height, qbyte *data);
+void Image_WriteTGARGB (char *filename, int width, int height, qbyte *data);
+void Image_WriteTGARGBA (char *filename, int width, int height, qbyte *data);
+qboolean Image_CheckAlpha(qbyte *data, int size, qboolean rgba);
index 8f73d5eab2476072ebb21ede62645bfab358a93d..d45bb3562127506fec23c9f4711a45c185dde39a 100644 (file)
--- a/mathlib.c
+++ b/mathlib.c
@@ -114,7 +114,7 @@ float m_bytenormals[NUMVERTEXNORMALS][3] =
 {-0.587785, -0.425325, -0.688191}, {-0.688191, -0.587785, -0.425325}, 
 };
 
 {-0.587785, -0.425325, -0.688191}, {-0.688191, -0.587785, -0.425325}, 
 };
 
-byte NormalToByte(vec3_t n)
+qbyte NormalToByte(vec3_t n)
 {
        int i, best;
        float bestdistance, distance;
 {
        int i, best;
        float bestdistance, distance;
@@ -134,7 +134,7 @@ byte NormalToByte(vec3_t n)
 }
 
 // note: uses byte partly to force unsigned for the validity check
 }
 
 // note: uses byte partly to force unsigned for the validity check
-void ByteToNormal(byte num, vec3_t n)
+void ByteToNormal(qbyte num, vec3_t n)
 {
        if (num < NUMVERTEXNORMALS)
                VectorCopy(m_bytenormals[num], n);
 {
        if (num < NUMVERTEXNORMALS)
                VectorCopy(m_bytenormals[num], n);
index d3e3753f6de4c28e4ffe3831519bc6a8621228b1..7e17c7a48237d8acd928fe10a1d64451325886f1 100644 (file)
--- a/mathlib.h
+++ b/mathlib.h
@@ -144,8 +144,8 @@ float Q_RSqrt(float number);
 #define NUMVERTEXNORMALS       162
 extern float m_bytenormals[NUMVERTEXNORMALS][3];
 
 #define NUMVERTEXNORMALS       162
 extern float m_bytenormals[NUMVERTEXNORMALS][3];
 
-byte NormalToByte(vec3_t n);
-void ByteToNormal(byte num, vec3_t n);
+qbyte NormalToByte(vec3_t n);
+void ByteToNormal(qbyte num, vec3_t n);
 
 void R_ConcatRotations (float in1[3][3], float in2[3][3], float out[3][3]);
 void R_ConcatTransforms (float in1[3][4], float in2[3][4], float out[3][4]);
 
 void R_ConcatRotations (float in1[3][3], float in2[3][3], float out[3][3]);
 void R_ConcatTransforms (float in1[3][4], float in2[3][4], float out[3][4]);
diff --git a/menu.c b/menu.c
index 8320bbf8a53483e692f04bbac02962281d59ac64..e822267d31c86badff6addb0eb7ab65a942fa22a 100644 (file)
--- a/menu.c
+++ b/menu.c
@@ -173,13 +173,13 @@ void M_DrawPic (float cx, float cy, char *picname)
        DrawQ_Pic (menu_x + cx, menu_y + cy, picname, 0, 0, 1, 1, 1, 1, 0);
 }
 
        DrawQ_Pic (menu_x + cx, menu_y + cy, picname, 0, 0, 1, 1, 1, 1, 0);
 }
 
-byte identityTable[256];
-byte translationTable[256];
+qbyte identityTable[256];
+qbyte translationTable[256];
 
 void M_BuildTranslationTable(int top, int bottom)
 {
 
 void M_BuildTranslationTable(int top, int bottom)
 {
-       int             j;
-       byte    *dest, *source;
+       int j;
+       qbyte *dest, *source;
 
        for (j = 0; j < 256; j++)
                identityTable[j] = j;
 
        for (j = 0; j < 256; j++)
                identityTable[j] = j;
index 85c6ddd273e3b530229ae1a5f7e77fe190ae05ff..926e64f768e57c7a3af0a2c0bc28acd8e1b70d82 100644 (file)
@@ -160,10 +160,10 @@ static void Mod_MDL_LoadFrames (long datapointer, int inverts, int outverts, vec
        }
 }
 
        }
 }
 
-static rtexture_t *GL_SkinSplitShirt(byte *in, byte *out, int width, int height, int bits, char *name, int precache)
+static rtexture_t *GL_SkinSplitShirt(qbyte *in, qbyte *out, int width, int height, int bits, char *name, int precache)
 {
        int i, pixels, passed;
 {
        int i, pixels, passed;
-       byte pixeltest[16];
+       qbyte pixeltest[16];
        for (i = 0;i < 16;i++)
                pixeltest[i] = (bits & (1 << i)) != 0;
        pixels = width*height;
        for (i = 0;i < 16;i++)
                pixeltest[i] = (bits & (1 << i)) != 0;
        pixels = width*height;
@@ -190,10 +190,10 @@ static rtexture_t *GL_SkinSplitShirt(byte *in, byte *out, int width, int height,
                return NULL;
 }
 
                return NULL;
 }
 
-static rtexture_t *GL_SkinSplit(byte *in, byte *out, int width, int height, int bits, char *name, int precache)
+static rtexture_t *GL_SkinSplit(qbyte *in, qbyte *out, int width, int height, int bits, char *name, int precache)
 {
        int i, pixels, passed;
 {
        int i, pixels, passed;
-       byte pixeltest[16];
+       qbyte pixeltest[16];
        for (i = 0;i < 16;i++)
                pixeltest[i] = (bits & (1 << i)) != 0;
        pixels = width*height;
        for (i = 0;i < 16;i++)
                pixeltest[i] = (bits & (1 << i)) != 0;
        pixels = width*height;
@@ -216,7 +216,7 @@ static rtexture_t *GL_SkinSplit(byte *in, byte *out, int width, int height, int
                return NULL;
 }
 
                return NULL;
 }
 
-static void Mod_LoadSkin (char *basename, byte *skindata, byte *skintemp, int width, int height, skinframe_t *skinframe, int precache)
+static void Mod_LoadSkin (char *basename, qbyte *skindata, qbyte *skintemp, int width, int height, skinframe_t *skinframe, int precache)
 {
        skinframe->base   = loadtextureimagewithmask(loadmodel->texturepool, va("%s_normal", basename), 0, 0, false, r_mipskins.integer, precache);
        skinframe->fog    = image_masktex;
 {
        skinframe->base   = loadtextureimagewithmask(loadmodel->texturepool, va("%s_normal", basename), 0, 0, false, r_mipskins.integer, precache);
        skinframe->fog    = image_masktex;
@@ -267,7 +267,7 @@ void Mod_LoadAliasModel (model_t *mod, void *buffer)
        float                                   scales, scalet, scale[3], translate[3], interval;
        long                                    datapointer, startframes, startskins;
        char                                    name[MAX_QPATH];
        float                                   scales, scalet, scale[3], translate[3], interval;
        long                                    datapointer, startframes, startskins;
        char                                    name[MAX_QPATH];
-       byte                                    *skintemp = NULL;
+       qbyte                                   *skintemp = NULL;
        modelyawradius = 0;
        modelradius = 0;
 
        modelyawradius = 0;
        modelradius = 0;
 
@@ -401,7 +401,7 @@ void Mod_LoadAliasModel (model_t *mod, void *buffer)
                                sprintf (name, "%s_%i_%i", loadmodel->name, i, j);
                        else
                                sprintf (name, "%s_%i", loadmodel->name, i);
                                sprintf (name, "%s_%i_%i", loadmodel->name, i, j);
                        else
                                sprintf (name, "%s_%i", loadmodel->name, i);
-                       Mod_LoadSkin(name, (byte *)datapointer, skintemp, skinwidth, skinheight, loadmodel->skinframes + totalskins, i == 0);
+                       Mod_LoadSkin(name, (qbyte *)datapointer, skintemp, skinwidth, skinheight, loadmodel->skinframes + totalskins, i == 0);
                        datapointer += skinwidth * skinheight;
                        totalskins++;
                }
                        datapointer += skinwidth * skinheight;
                        totalskins++;
                }
@@ -900,7 +900,7 @@ void Mod_LoadZymoticModel(model_t *mod, void *buffer)
        zymswapintblock((void *) (pheader->lump_render.start + pbase), pheader->lump_render.length);
        // validate renderlist and swap winding order of tris
        renderlist = (void *) (pheader->lump_render.start + pbase);
        zymswapintblock((void *) (pheader->lump_render.start + pbase), pheader->lump_render.length);
        // validate renderlist and swap winding order of tris
        renderlist = (void *) (pheader->lump_render.start + pbase);
-       renderlistend = (void *) ((byte *) renderlist + pheader->lump_render.length);
+       renderlistend = (void *) ((qbyte *) renderlist + pheader->lump_render.length);
        i = pheader->numshaders * sizeof(int) + pheader->numtris * sizeof(int[3]);
        if (pheader->lump_render.length != i)
                Host_Error("Mod_LoadZymoticModel: renderlist is wrong size in %s (is %i bytes, should be %i bytes)\n", loadmodel->name, pheader->lump_render.length, i);
        i = pheader->numshaders * sizeof(int) + pheader->numtris * sizeof(int[3]);
        if (pheader->lump_render.length != i)
                Host_Error("Mod_LoadZymoticModel: renderlist is wrong size in %s (is %i bytes, should be %i bytes)\n", loadmodel->name, pheader->lump_render.length, i);
index ca010f055da445d62c8ff9e5bb8d792b82c24053..9b0a3454de2a188ba36bc7c7f196ed24e442faf3 100644 (file)
@@ -20,7 +20,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
 #include "quakedef.h"
 
 
 #include "quakedef.h"
 
-byte mod_novis[(MAX_MAP_LEAFS + 7)/ 8];
+qbyte mod_novis[(MAX_MAP_LEAFS + 7)/ 8];
 
 cvar_t r_subdivide_size = {CVAR_SAVE, "r_subdivide_size", "128"};
 cvar_t halflifebsp = {0, "halflifebsp", "0"};
 
 cvar_t r_subdivide_size = {CVAR_SAVE, "r_subdivide_size", "128"};
 cvar_t halflifebsp = {0, "halflifebsp", "0"};
@@ -118,12 +118,12 @@ mleaf_t *Mod_PointInLeaf (vec3_t p, model_t *model)
 Mod_DecompressVis
 ===================
 */
 Mod_DecompressVis
 ===================
 */
-static byte *Mod_DecompressVis (byte *in, model_t *model)
+static qbyte *Mod_DecompressVis (qbyte *in, model_t *model)
 {
 {
-       static byte     decompressed[MAX_MAP_LEAFS/8];
-       int             c;
-       byte    *out;
-       int             row;
+       static qbyte decompressed[MAX_MAP_LEAFS/8];
+       int c;
+       qbyte *out;
+       int row;
 
        row = (model->numleafs+7)>>3;
        out = decompressed;
 
        row = (model->numleafs+7)>>3;
        out = decompressed;
@@ -160,7 +160,7 @@ static byte *Mod_DecompressVis (byte *in, model_t *model)
        return decompressed;
 }
 
        return decompressed;
 }
 
-byte *Mod_LeafPVS (mleaf_t *leaf, model_t *model)
+qbyte *Mod_LeafPVS (mleaf_t *leaf, model_t *model)
 {
        if (r_novis.integer || leaf == model->leafs || leaf->compressed_vis == NULL)
                return mod_novis;
 {
        if (r_novis.integer || leaf == model->leafs || leaf->compressed_vis == NULL)
                return mod_novis;
@@ -169,8 +169,8 @@ byte *Mod_LeafPVS (mleaf_t *leaf, model_t *model)
 
 void Mod_SetupNoTexture(void)
 {
 
 void Mod_SetupNoTexture(void)
 {
-       int             x, y;
-       byte    pix[16][16][4];
+       int x, y;
+       qbyte pix[16][16][4];
 
        for (y = 0;y < 16;y++)
        {
 
        for (y = 0;y < 16;y++)
        {
@@ -212,7 +212,7 @@ static void Mod_LoadTextures (lump_t *l)
        miptex_t                *dmiptex;
        texture_t               *tx, *tx2, *anims[10], *altanims[10];
        dmiptexlump_t   *m;
        miptex_t                *dmiptex;
        texture_t               *tx, *tx2, *anims[10], *altanims[10];
        dmiptexlump_t   *m;
-       byte                    *data, *mtdata, *data2;
+       qbyte                   *data, *mtdata, *data2;
        char                    name[256];
 
        Mod_SetupNoTexture();
        char                    name[256];
 
        Mod_SetupNoTexture();
@@ -237,7 +237,7 @@ static void Mod_LoadTextures (lump_t *l)
                dofs[i] = LittleLong(dofs[i]);
                if (dofs[i] == -1)
                        continue;
                dofs[i] = LittleLong(dofs[i]);
                if (dofs[i] == -1)
                        continue;
-               dmiptex = (miptex_t *)((byte *)m + dofs[i]);
+               dmiptex = (miptex_t *)((qbyte *)m + dofs[i]);
                mtwidth = LittleLong (dmiptex->width);
                mtheight = LittleLong (dmiptex->height);
                mtdata = NULL;
                mtwidth = LittleLong (dmiptex->width);
                mtheight = LittleLong (dmiptex->height);
                mtdata = NULL;
@@ -247,7 +247,7 @@ static void Mod_LoadTextures (lump_t *l)
                        // texture included
                        if (j < 40 || j + mtwidth * mtheight > l->filelen)
                                Host_Error ("Texture %s is corrupt or incomplete\n", dmiptex->name);
                        // texture included
                        if (j < 40 || j + mtwidth * mtheight > l->filelen)
                                Host_Error ("Texture %s is corrupt or incomplete\n", dmiptex->name);
-                       mtdata = (byte *)dmiptex + j;
+                       mtdata = (qbyte *)dmiptex + j;
                }
 
                if ((mtwidth & 15) || (mtheight & 15))
                }
 
                if ((mtwidth & 15) || (mtheight & 15))
@@ -486,8 +486,7 @@ Mod_LoadLighting
 static void Mod_LoadLighting (lump_t *l)
 {
        int i;
 static void Mod_LoadLighting (lump_t *l)
 {
        int i;
-       byte *in, *out, *data;
-       byte d;
+       qbyte *in, *out, *data, d;
        char litfilename[1024];
        loadmodel->lightdata = NULL;
        if (loadmodel->ishlbsp) // LordHavoc: load the colored lighting data straight
        char litfilename[1024];
        loadmodel->lightdata = NULL;
        if (loadmodel->ishlbsp) // LordHavoc: load the colored lighting data straight
@@ -501,7 +500,7 @@ static void Mod_LoadLighting (lump_t *l)
                strcpy(litfilename, loadmodel->name);
                COM_StripExtension(litfilename, litfilename);
                strcat(litfilename, ".lit");
                strcpy(litfilename, loadmodel->name);
                COM_StripExtension(litfilename, litfilename);
                strcat(litfilename, ".lit");
-               data = (byte*) COM_LoadFile (litfilename, false);
+               data = (qbyte*) COM_LoadFile (litfilename, false);
                if (data)
                {
                        if (loadsize > 8 && data[0] == 'Q' && data[1] == 'L' && data[2] == 'I' && data[3] == 'T')
                if (data)
                {
                        if (loadsize > 8 && data[0] == 'Q' && data[1] == 'L' && data[2] == 'I' && data[3] == 'T')
@@ -2393,7 +2392,7 @@ void Mod_LoadBrushModel (model_t *mod, void *buffer)
                Cvar_SetValue("halflifebsp", mod->ishlbsp);
 
 // swap all the lumps
                Cvar_SetValue("halflifebsp", mod->ishlbsp);
 
 // swap all the lumps
-       mod_base = (byte *)header;
+       mod_base = (qbyte *)header;
 
        for (i=0 ; i<sizeof(dheader_t)/4 ; i++)
                ((int *)header)[i] = LittleLong ( ((int *)header)[i]);
 
        for (i=0 ; i<sizeof(dheader_t)/4 ; i++)
                ((int *)header)[i] = LittleLong ( ((int *)header)[i]);
index d25f4858e2d84e0a4877c1277f32caee24cb5699..cadbdcc81a86f1d58c8bbb212cc39f214dfaef57 100644 (file)
@@ -141,11 +141,11 @@ typedef struct msurface_s
        texture_t       *currenttexture; // updated (animated) during early surface processing each frame
 
        // index into d_lightstylevalue array, 255 means not used (black)
        texture_t       *currenttexture; // updated (animated) during early surface processing each frame
 
        // index into d_lightstylevalue array, 255 means not used (black)
-       byte            styles[MAXLIGHTMAPS];
+       qbyte           styles[MAXLIGHTMAPS];
        // RGB lighting data [numstyles][height][width][3]
        // RGB lighting data [numstyles][height][width][3]
-       byte            *samples;
+       qbyte           *samples;
        // stain to apply on lightmap (soot/dirt/blood/whatever)
        // stain to apply on lightmap (soot/dirt/blood/whatever)
-       byte            *stainsamples;
+       qbyte           *stainsamples;
 
        // these fields are generated during model loading
        // the lightmap texture fragment to use on the surface
 
        // these fields are generated during model loading
        // the lightmap texture fragment to use on the surface
@@ -246,11 +246,11 @@ typedef struct mleaf_s
        int                                     dlightbits[8];
        int                                     dlightframe;
 
        int                                     dlightbits[8];
        int                                     dlightframe;
 
-       byte                            *compressed_vis;
+       qbyte                           *compressed_vis;
 
        msurface_t                      **firstmarksurface;
        int                                     nummarksurfaces;
 
        msurface_t                      **firstmarksurface;
        int                                     nummarksurfaces;
-       byte                            ambient_sound_level[NUM_AMBIENTS];
+       qbyte                           ambient_sound_level[NUM_AMBIENTS];
 }
 mleaf_t;
 
 }
 mleaf_t;
 
index f05900bab4463c555ec0a9becf2af78448d4a4d3..4151100ee1de0775467b6e67c1dd6f2d64977749 100644 (file)
@@ -309,7 +309,7 @@ model_t *Mod_ForName (char *name, qboolean crash, qboolean checkdisk, qboolean i
        return Mod_LoadModel (Mod_FindName (name), crash, checkdisk, isworldmodel);
 }
 
        return Mod_LoadModel (Mod_FindName (name), crash, checkdisk, isworldmodel);
 }
 
-byte   *mod_base;
+qbyte *mod_base;
 
 /*
 =================
 
 /*
 =================
index 6c2a336ef13dae691c4ec107d84d9f5fe5832170..2e70d78380b098664c19cb75ef33b19ef563c552 100644 (file)
@@ -163,8 +163,8 @@ typedef struct model_s
        int                             numtextures;
        texture_t               **textures;
 
        int                             numtextures;
        texture_t               **textures;
 
-       byte                    *visdata;
-       byte                    *lightdata;
+       qbyte                   *visdata;
+       qbyte                   *lightdata;
        char                    *entities;
 
        int                             numportals;
        char                    *entities;
 
        int                             numportals;
@@ -211,7 +211,7 @@ model_t;
 
 // model loading
 extern model_t *loadmodel;
 
 // model loading
 extern model_t *loadmodel;
-extern byte    *mod_base;
+extern qbyte *mod_base;
 // sky/water subdivision
 extern cvar_t gl_subdivide_size;
 // texture fullbrights
 // sky/water subdivision
 extern cvar_t gl_subdivide_size;
 // texture fullbrights
@@ -225,7 +225,7 @@ void Mod_TouchModel (char *name);
 void Mod_UnloadModel (model_t *mod);
 
 mleaf_t *Mod_PointInLeaf (float *p, model_t *model);
 void Mod_UnloadModel (model_t *mod);
 
 mleaf_t *Mod_PointInLeaf (float *p, model_t *model);
-byte *Mod_LeafPVS (mleaf_t *leaf, model_t *model);
+qbyte *Mod_LeafPVS (mleaf_t *leaf, model_t *model);
 
 void Mod_ClearUsed(void);
 void Mod_PurgeUnused(void);
 
 void Mod_ClearUsed(void);
 void Mod_PurgeUnused(void);
index 22140efad857fbdfb8eea059284b0f672fc394cb..5d82993dbb79d4bdb689d227bcd3e7b16f06ee2c 100644 (file)
@@ -60,7 +60,7 @@ void Mod_Sprite_SharedSetup(long datapointer, int version, int *palette)
        dspriteinterval_t       *pinintervals;
        float                           modelradius, interval;
        char                            tempname[MAX_QPATH], name[MAX_QPATH];
        dspriteinterval_t       *pinintervals;
        float                           modelradius, interval;
        char                            tempname[MAX_QPATH], name[MAX_QPATH];
-       byte                            *pixbuf;
+       qbyte                           *pixbuf;
        long                            startframes;
        modelradius = 0;
 
        long                            startframes;
        modelradius = 0;
 
@@ -186,9 +186,9 @@ void Mod_Sprite_SharedSetup(long datapointer, int version, int *palette)
                        {
                                pixbuf = Mem_Alloc(tempmempool, width*height*4);
                                if (version == SPRITE32_VERSION)
                        {
                                pixbuf = Mem_Alloc(tempmempool, width*height*4);
                                if (version == SPRITE32_VERSION)
-                                       memcpy(pixbuf, (byte *)datapointer, width*height*4);
+                                       memcpy(pixbuf, (qbyte *)datapointer, width*height*4);
                                else //if (version == SPRITE_VERSION || version == SPRITEHL_VERSION)
                                else //if (version == SPRITE_VERSION || version == SPRITEHL_VERSION)
-                                       Image_Copy8bitRGBA((byte *)datapointer, pixbuf, width*height, palette);
+                                       Image_Copy8bitRGBA((qbyte *)datapointer, pixbuf, width*height, palette);
 
                                loadmodel->sprdata_frames[realframes].texture = R_LoadTexture (loadmodel->texturepool, name, width, height, pixbuf, TEXTYPE_RGBA, TEXF_ALPHA | (r_mipsprites.integer ? TEXF_MIPMAP : 0) | TEXF_PRECACHE);
 
 
                                loadmodel->sprdata_frames[realframes].texture = R_LoadTexture (loadmodel->texturepool, name, width, height, pixbuf, TEXTYPE_RGBA, TEXF_ALPHA | (r_mipsprites.integer ? TEXF_MIPMAP : 0) | TEXF_PRECACHE);
 
@@ -264,7 +264,7 @@ void Mod_LoadSpriteModel (model_t *mod, void *buffer)
        else if (version == SPRITEHL_VERSION)
        {
                int                                     i, rendermode;
        else if (version == SPRITEHL_VERSION)
        {
                int                                     i, rendermode;
-               byte                            palette[256][4], *in;
+               qbyte                           palette[256][4], *in;
                dspritehl_t                     *pinsprite;
                long                            datapointer;
 
                dspritehl_t                     *pinsprite;
                long                            datapointer;
 
@@ -278,12 +278,12 @@ void Mod_LoadSpriteModel (model_t *mod, void *buffer)
                loadmodel->synctype = LittleLong (pinsprite->synctype);
                rendermode = pinsprite->rendermode;
 
                loadmodel->synctype = LittleLong (pinsprite->synctype);
                rendermode = pinsprite->rendermode;
 
-               in = (byte *)datapointer;
+               in = (qbyte *)datapointer;
                datapointer += 2;
                i = in[0] + in[1] * 256;
                if (i != 256)
                        Host_Error ("Mod_LoadHLSprite: unexpected number of palette colors %i (should be 256)", i);
                datapointer += 2;
                i = in[0] + in[1] * 256;
                if (i != 256)
                        Host_Error ("Mod_LoadHLSprite: unexpected number of palette colors %i (should be 256)", i);
-               in = (byte *)datapointer;
+               in = (qbyte *)datapointer;
                datapointer += 768;
                switch(rendermode)
                {
                datapointer += 768;
                switch(rendermode)
                {
index 951ed91fedebbafcf3393bf16236c014aef226fe..3b5fd543878a39f9550a6bde505dfb3d885e0bed 100644 (file)
@@ -72,8 +72,8 @@ typedef struct dtriangle_s {
 // load this data
 
 typedef struct {
 // load this data
 
 typedef struct {
-       byte    v[3];
-       byte    lightnormalindex;
+       qbyte   v[3];
+       qbyte   lightnormalindex;
 } trivertx_t;
 
 typedef struct {
 } trivertx_t;
 
 typedef struct {
diff --git a/net.h b/net.h
index c962f626280f38af58682bbd94a81e225d702565..9684aa68dbcb579e75d91896066cec017822d5a3 100644 (file)
--- a/net.h
+++ b/net.h
@@ -136,12 +136,12 @@ typedef struct qsocket_s
        unsigned int    sendSequence;
        unsigned int    unreliableSendSequence;
        int                             sendMessageLength;
        unsigned int    sendSequence;
        unsigned int    unreliableSendSequence;
        int                             sendMessageLength;
-       byte                    sendMessage [NET_MAXMESSAGE];
+       qbyte                   sendMessage [NET_MAXMESSAGE];
 
        unsigned int    receiveSequence;
        unsigned int    unreliableReceiveSequence;
        int                             receiveMessageLength;
 
        unsigned int    receiveSequence;
        unsigned int    unreliableReceiveSequence;
        int                             receiveMessageLength;
-       byte                    receiveMessage [NET_MAXMESSAGE];
+       qbyte                   receiveMessage [NET_MAXMESSAGE];
 
        struct qsockaddr        addr;
        char                            address[NET_NAMELEN];
 
        struct qsockaddr        addr;
        char                            address[NET_NAMELEN];
@@ -166,9 +166,9 @@ typedef struct
        int             (*CloseSocket) (int socket);
        int             (*Connect) (int socket, struct qsockaddr *addr);
        int             (*CheckNewConnections) (void);
        int             (*CloseSocket) (int socket);
        int             (*Connect) (int socket, struct qsockaddr *addr);
        int             (*CheckNewConnections) (void);
-       int             (*Read) (int socket, byte *buf, int len, struct qsockaddr *addr);
-       int             (*Write) (int socket, byte *buf, int len, struct qsockaddr *addr);
-       int             (*Broadcast) (int socket, byte *buf, int len);
+       int             (*Read) (int socket, qbyte *buf, int len, struct qsockaddr *addr);
+       int             (*Write) (int socket, qbyte *buf, int len, struct qsockaddr *addr);
+       int             (*Broadcast) (int socket, qbyte *buf, int len);
        char *          (*AddrToString) (struct qsockaddr *addr);
        int             (*StringToAddr) (char *string, struct qsockaddr *addr);
        int             (*GetSocketAddr) (int socket, struct qsockaddr *addr);
        char *          (*AddrToString) (struct qsockaddr *addr);
        int             (*StringToAddr) (char *string, struct qsockaddr *addr);
        int             (*GetSocketAddr) (int socket, struct qsockaddr *addr);
index dd4ed8a065b2d4f36f8f315578d6b7dbd1574a6c..db5f46bc265c1879d292a6d729fa1cdcfe2bc11f 100644 (file)
@@ -77,7 +77,7 @@ struct
 {
        unsigned int    length;
        unsigned int    sequence;
 {
        unsigned int    length;
        unsigned int    sequence;
-       byte                    data[MAX_DATAGRAM];
+       qbyte                   data[MAX_DATAGRAM];
 } packetBuffer;
 
 
 } packetBuffer;
 
 
@@ -85,7 +85,7 @@ struct
 char *StrAddr (struct qsockaddr *addr)
 {
        static char buf[34];
 char *StrAddr (struct qsockaddr *addr)
 {
        static char buf[34];
-       byte *p = (byte *)addr;
+       qbyte *p = (qbyte *)addr;
        int n;
 
        for (n = 0; n < 16; n++)
        int n;
 
        for (n = 0; n < 16; n++)
@@ -193,7 +193,7 @@ int Datagram_SendMessage (qsocket_t *sock, sizebuf_t *data)
 
        sock->canSend = false;
 
 
        sock->canSend = false;
 
-       if (sfunc.Write (sock->socket, (byte *)&packetBuffer, packetLen, &sock->addr) == -1)
+       if (sfunc.Write (sock->socket, (qbyte *)&packetBuffer, packetLen, &sock->addr) == -1)
                return -1;
 
        sock->lastSendTime = net_time;
                return -1;
 
        sock->lastSendTime = net_time;
@@ -226,7 +226,7 @@ int SendMessageNext (qsocket_t *sock)
 
        sock->sendNext = false;
 
 
        sock->sendNext = false;
 
-       if (sfunc.Write (sock->socket, (byte *)&packetBuffer, packetLen, &sock->addr) == -1)
+       if (sfunc.Write (sock->socket, (qbyte *)&packetBuffer, packetLen, &sock->addr) == -1)
                return -1;
 
        sock->lastSendTime = net_time;
                return -1;
 
        sock->lastSendTime = net_time;
@@ -259,7 +259,7 @@ int ReSendMessage (qsocket_t *sock)
 
        sock->sendNext = false;
 
 
        sock->sendNext = false;
 
-       if (sfunc.Write (sock->socket, (byte *)&packetBuffer, packetLen, &sock->addr) == -1)
+       if (sfunc.Write (sock->socket, (qbyte *)&packetBuffer, packetLen, &sock->addr) == -1)
                return -1;
 
        sock->lastSendTime = net_time;
                return -1;
 
        sock->lastSendTime = net_time;
@@ -301,7 +301,7 @@ int Datagram_SendUnreliableMessage (qsocket_t *sock, sizebuf_t *data)
        packetBuffer.sequence = BigLong(sock->unreliableSendSequence++);
        memcpy (packetBuffer.data, data->data, data->cursize);
 
        packetBuffer.sequence = BigLong(sock->unreliableSendSequence++);
        memcpy (packetBuffer.data, data->data, data->cursize);
 
-       if (sfunc.Write (sock->socket, (byte *)&packetBuffer, packetLen, &sock->addr) == -1)
+       if (sfunc.Write (sock->socket, (qbyte *)&packetBuffer, packetLen, &sock->addr) == -1)
                return -1;
 
        packetsSent++;
                return -1;
 
        packetsSent++;
@@ -324,7 +324,7 @@ int Datagram_GetMessage (qsocket_t *sock)
 
        while(1)
        {       
 
        while(1)
        {       
-               length = sfunc.Read (sock->socket, (byte *)&packetBuffer, NET_DATAGRAMSIZE, &readaddr);
+               length = sfunc.Read (sock->socket, (qbyte *)&packetBuffer, NET_DATAGRAMSIZE, &readaddr);
 
 //     if ((rand() & 255) > 220)
 //             continue;
 
 //     if ((rand() & 255) > 220)
 //             continue;
@@ -425,7 +425,7 @@ int Datagram_GetMessage (qsocket_t *sock)
                {
                        packetBuffer.length = BigLong(NET_HEADERSIZE | NETFLAG_ACK);
                        packetBuffer.sequence = BigLong(sequence);
                {
                        packetBuffer.length = BigLong(NET_HEADERSIZE | NETFLAG_ACK);
                        packetBuffer.sequence = BigLong(sequence);
-                       sfunc.Write (sock->socket, (byte *)&packetBuffer, NET_HEADERSIZE, &readaddr);
+                       sfunc.Write (sock->socket, (qbyte *)&packetBuffer, NET_HEADERSIZE, &readaddr);
 
                        if (sequence != sock->receiveSequence)
                        {
 
                        if (sequence != sock->receiveSequence)
                        {
@@ -528,7 +528,7 @@ static void Test_Poll(void)
        int             colors;
        int             frags;
        int             connectTime;
        int             colors;
        int             frags;
        int             connectTime;
-       byte    playerNumber;
+       qbyte   playerNumber;
 
        net_landriverlevel = testDriver;
 
 
        net_landriverlevel = testDriver;
 
index 1ad3fee92c3ae70ee7b0e8f632e30fb17d45ed15..8424ca9cccd7ce5592e15afac0de12c8d0d042ab 100644 (file)
@@ -153,8 +153,8 @@ int Loop_GetMessage (qsocket_t *sock)
 
 int Loop_SendMessage (qsocket_t *sock, sizebuf_t *data)
 {
 
 int Loop_SendMessage (qsocket_t *sock, sizebuf_t *data)
 {
-       byte *buffer;
-       int  *bufferLength;
+       qbyte *buffer;
+       int *bufferLength;
 
        if (!sock->driverdata)
                return -1;
 
        if (!sock->driverdata)
                return -1;
@@ -187,16 +187,16 @@ int Loop_SendMessage (qsocket_t *sock, sizebuf_t *data)
 
 int Loop_SendUnreliableMessage (qsocket_t *sock, sizebuf_t *data)
 {
 
 int Loop_SendUnreliableMessage (qsocket_t *sock, sizebuf_t *data)
 {
-       byte *buffer;
-       int  *bufferLength;
+       qbyte *buffer;
+       int *bufferLength;
 
        if (!sock->driverdata)
                return -1;
 
        bufferLength = &((qsocket_t *)sock->driverdata)->receiveMessageLength;
 
 
        if (!sock->driverdata)
                return -1;
 
        bufferLength = &((qsocket_t *)sock->driverdata)->receiveMessageLength;
 
-       // LordHavoc: added an extra sizeof(byte) to account for alignment
-       if ((*bufferLength + data->cursize + sizeof(byte) + sizeof(short) + sizeof(byte)) > NET_MAXMESSAGE)
+       // LordHavoc: added an extra sizeof(qbyte) to account for alignment
+       if ((*bufferLength + data->cursize + sizeof(qbyte) + sizeof(short) + sizeof(qbyte)) > NET_MAXMESSAGE)
                return 0;
 
        buffer = ((qsocket_t *)sock->driverdata)->receiveMessage + *bufferLength;
                return 0;
 
        buffer = ((qsocket_t *)sock->driverdata)->receiveMessage + *bufferLength;
index ed5d066e0978e803b9fdba7c8087b3a40fe4d317..9b91330680991ac0b860b9c99b2afa8ab14e4d01 100644 (file)
--- a/net_udp.c
+++ b/net_udp.c
@@ -244,7 +244,7 @@ int UDP_CheckNewConnections (void)
 
 //=============================================================================
 
 
 //=============================================================================
 
-int UDP_Read (int socket, byte *buf, int len, struct qsockaddr *addr)
+int UDP_Read (int socket, qbyte *buf, int len, struct qsockaddr *addr)
 {
        int addrlen = sizeof (struct qsockaddr);
        int ret;
 {
        int addrlen = sizeof (struct qsockaddr);
        int ret;
@@ -271,7 +271,7 @@ int UDP_MakeSocketBroadcastCapable (int socket)
 
 //=============================================================================
 
 
 //=============================================================================
 
-int UDP_Broadcast (int socket, byte *buf, int len)
+int UDP_Broadcast (int socket, qbyte *buf, int len)
 {
        int ret;
 
 {
        int ret;
 
@@ -292,7 +292,7 @@ int UDP_Broadcast (int socket, byte *buf, int len)
 
 //=============================================================================
 
 
 //=============================================================================
 
-int UDP_Write (int socket, byte *buf, int len, struct qsockaddr *addr)
+int UDP_Write (int socket, qbyte *buf, int len, struct qsockaddr *addr)
 {
        int ret;
 
 {
        int ret;
 
index 75303011cd9546de9b46bda34df1380051c25490..87ab879d9976d0703074bd458c68c0dd15485520 100644 (file)
--- a/net_udp.h
+++ b/net_udp.h
@@ -26,9 +26,9 @@ int  UDP_OpenSocket (int port);
 int  UDP_CloseSocket (int socket);
 int  UDP_Connect (int socket, struct qsockaddr *addr);
 int  UDP_CheckNewConnections (void);
 int  UDP_CloseSocket (int socket);
 int  UDP_Connect (int socket, struct qsockaddr *addr);
 int  UDP_CheckNewConnections (void);
-int  UDP_Read (int socket, byte *buf, int len, struct qsockaddr *addr);
-int  UDP_Write (int socket, byte *buf, int len, struct qsockaddr *addr);
-int  UDP_Broadcast (int socket, byte *buf, int len);
+int  UDP_Read (int socket, qbyte *buf, int len, struct qsockaddr *addr);
+int  UDP_Write (int socket, qbyte *buf, int len, struct qsockaddr *addr);
+int  UDP_Broadcast (int socket, qbyte *buf, int len);
 char *UDP_AddrToString (struct qsockaddr *addr);
 int  UDP_StringToAddr (char *string, struct qsockaddr *addr);
 int  UDP_GetSocketAddr (int socket, struct qsockaddr *addr);
 char *UDP_AddrToString (struct qsockaddr *addr);
 int  UDP_StringToAddr (char *string, struct qsockaddr *addr);
 int  UDP_GetSocketAddr (int socket, struct qsockaddr *addr);
index 21eedf8c4e5b69fec73176d0697cc2aacb8a863c..236c3554de1521b6d919ce2bb62c82033c26dfaa 100644 (file)
@@ -108,7 +108,7 @@ void WINS_GetLocalAddress(void)
        myAddr = *(int *)local->h_addr_list[0];
 
        addr = ntohl(myAddr);
        myAddr = *(int *)local->h_addr_list[0];
 
        addr = ntohl(myAddr);
-       sprintf(my_tcpip_address, "%d.%d.%d.%d", (addr >> 24) & 0xff, (addr >> 16) & 0xff, (addr >> 8) & 0xff, addr & 0xff);
+       sprintf(my_tcpip_address, "%d.%d.%d.%d", (int) ((addr >> 24) & 0xff), (int) ((addr >> 16) & 0xff), (int) ((addr >> 8) & 0xff), (int) (addr & 0xff));
 }
 
 
 }
 
 
@@ -392,7 +392,7 @@ int WINS_CheckNewConnections (void)
 
 //=============================================================================
 
 
 //=============================================================================
 
-int WINS_Read (int socket, byte *buf, int len, struct qsockaddr *addr)
+int WINS_Read (int socket, qbyte *buf, int len, struct qsockaddr *addr)
 {
        int addrlen = sizeof (struct qsockaddr);
        int ret;
 {
        int addrlen = sizeof (struct qsockaddr);
        int ret;
@@ -426,7 +426,7 @@ int WINS_MakeSocketBroadcastCapable (int socket)
 
 //=============================================================================
 
 
 //=============================================================================
 
-int WINS_Broadcast (int socket, byte *buf, int len)
+int WINS_Broadcast (int socket, qbyte *buf, int len)
 {
        int ret;
 
 {
        int ret;
 
@@ -448,7 +448,7 @@ int WINS_Broadcast (int socket, byte *buf, int len)
 
 //=============================================================================
 
 
 //=============================================================================
 
-int WINS_Write (int socket, byte *buf, int len, struct qsockaddr *addr)
+int WINS_Write (int socket, qbyte *buf, int len, struct qsockaddr *addr)
 {
        int ret;
 
 {
        int ret;
 
index 756ce645910d04b37df991263344a13c839e091f..d907248515e828fa60d5205cc8c85223702cf675 100644 (file)
@@ -26,9 +26,9 @@ int  WINS_OpenSocket (int port);
 int  WINS_CloseSocket (int socket);
 int  WINS_Connect (int socket, struct qsockaddr *addr);
 int  WINS_CheckNewConnections (void);
 int  WINS_CloseSocket (int socket);
 int  WINS_Connect (int socket, struct qsockaddr *addr);
 int  WINS_CheckNewConnections (void);
-int  WINS_Read (int socket, byte *buf, int len, struct qsockaddr *addr);
-int  WINS_Write (int socket, byte *buf, int len, struct qsockaddr *addr);
-int  WINS_Broadcast (int socket, byte *buf, int len);
+int  WINS_Read (int socket, qbyte *buf, int len, struct qsockaddr *addr);
+int  WINS_Write (int socket, qbyte *buf, int len, struct qsockaddr *addr);
+int  WINS_Broadcast (int socket, qbyte *buf, int len);
 char *WINS_AddrToString (struct qsockaddr *addr);
 int  WINS_StringToAddr (char *string, struct qsockaddr *addr);
 int  WINS_GetSocketAddr (int socket, struct qsockaddr *addr);
 char *WINS_AddrToString (struct qsockaddr *addr);
 int  WINS_StringToAddr (char *string, struct qsockaddr *addr);
 int  WINS_GetSocketAddr (int socket, struct qsockaddr *addr);
index 20f550a47da992709ce041b595321a90766d4649..bf53adb5a7ceceb0083e6bab6fcdce3bc63737f7 100644 (file)
@@ -230,9 +230,9 @@ int WIPX_CheckNewConnections (void)
 
 //=============================================================================
 
 
 //=============================================================================
 
-static byte packetBuffer[NET_DATAGRAMSIZE + 4];
+static qbyte packetBuffer[NET_DATAGRAMSIZE + 4];
 
 
-int WIPX_Read (int handle, byte *buf, int len, struct qsockaddr *addr)
+int WIPX_Read (int handle, qbyte *buf, int len, struct qsockaddr *addr)
 {
        int addrlen = sizeof (struct qsockaddr);
        int socket = ipxsocket[handle];
 {
        int addrlen = sizeof (struct qsockaddr);
        int socket = ipxsocket[handle];
@@ -261,14 +261,14 @@ int WIPX_Read (int handle, byte *buf, int len, struct qsockaddr *addr)
 
 //=============================================================================
 
 
 //=============================================================================
 
-int WIPX_Broadcast (int handle, byte *buf, int len)
+int WIPX_Broadcast (int handle, qbyte *buf, int len)
 {
        return WIPX_Write (handle, buf, len, &broadcastaddr);
 }
 
 //=============================================================================
 
 {
        return WIPX_Write (handle, buf, len, &broadcastaddr);
 }
 
 //=============================================================================
 
-int WIPX_Write (int handle, byte *buf, int len, struct qsockaddr *addr)
+int WIPX_Write (int handle, qbyte *buf, int len, struct qsockaddr *addr)
 {
        int socket = ipxsocket[handle];
        int ret;
 {
        int socket = ipxsocket[handle];
        int ret;
index ed82dc1d97c658b5b02df7266256069bc855383a..109120ea3d88befd443253a70cbc34c254afa264 100644 (file)
@@ -26,9 +26,9 @@ int  WIPX_OpenSocket (int port);
 int  WIPX_CloseSocket (int socket);
 int  WIPX_Connect (int socket, struct qsockaddr *addr);
 int  WIPX_CheckNewConnections (void);
 int  WIPX_CloseSocket (int socket);
 int  WIPX_Connect (int socket, struct qsockaddr *addr);
 int  WIPX_CheckNewConnections (void);
-int  WIPX_Read (int socket, byte *buf, int len, struct qsockaddr *addr);
-int  WIPX_Write (int socket, byte *buf, int len, struct qsockaddr *addr);
-int  WIPX_Broadcast (int socket, byte *buf, int len);
+int  WIPX_Read (int socket, qbyte *buf, int len, struct qsockaddr *addr);
+int  WIPX_Write (int socket, qbyte *buf, int len, struct qsockaddr *addr);
+int  WIPX_Broadcast (int socket, qbyte *buf, int len);
 char *WIPX_AddrToString (struct qsockaddr *addr);
 int  WIPX_StringToAddr (char *string, struct qsockaddr *addr);
 int  WIPX_GetSocketAddr (int socket, struct qsockaddr *addr);
 char *WIPX_AddrToString (struct qsockaddr *addr);
 int  WIPX_StringToAddr (char *string, struct qsockaddr *addr);
 int  WIPX_GetSocketAddr (int socket, struct qsockaddr *addr);
index 76a2de55f1eb7dfd36c961f439cc458775d8e8b2..6b4aa922186cc04150160269d18809a5c01f7c8d 100644 (file)
--- a/palette.c
+++ b/palette.c
@@ -2,9 +2,9 @@
 #include "quakedef.h"
 
 unsigned int d_8to24table[256];
 #include "quakedef.h"
 
 unsigned int d_8to24table[256];
-//byte d_15to8table[32768];
-byte host_basepal[768];
-byte texgamma[256];
+//qbyte d_15to8table[32768];
+qbyte host_basepal[768];
+qbyte texgamma[256];
 
 cvar_t v_gamma = {CVAR_SAVE, "v_gamma", "1"};
 cvar_t v_contrast = {CVAR_SAVE, "v_contrast", "1"};
 
 cvar_t v_gamma = {CVAR_SAVE, "v_gamma", "1"};
 cvar_t v_contrast = {CVAR_SAVE, "v_contrast", "1"};
@@ -14,11 +14,11 @@ cvar_t v_hwgamma = {0, "v_hwgamma", "1"};
 
 void Palette_Setup8to24(void)
 {
 
 void Palette_Setup8to24(void)
 {
-       byte *in, *out;
+       qbyte *in, *out;
        unsigned short i;
 
        in = host_basepal;
        unsigned short i;
 
        in = host_basepal;
-       out = (byte *) d_8to24table; // d_8to24table is accessed as 32bit for speed reasons, but is created as 8bit bytes
+       out = (qbyte *) d_8to24table; // d_8to24table is accessed as 32bit for speed reasons, but is created as 8bit bytes
        for (i=0 ; i<255 ; i++)
        {
                *out++ = *in++;
        for (i=0 ; i<255 ; i++)
        {
                *out++ = *in++;
@@ -32,7 +32,7 @@ void Palette_Setup8to24(void)
 /*
 void   Palette_Setup15to8(void)
 {
 /*
 void   Palette_Setup15to8(void)
 {
-       byte    *pal;
+       qbyte   *pal;
        unsigned r,g,b;
        unsigned v;
        int     r1,g1,b1;
        unsigned r,g,b;
        unsigned v;
        int     r1,g1,b1;
@@ -62,7 +62,7 @@ void  Palette_Setup15to8(void)
 }
 */
 
 }
 */
 
-void BuildGammaTable8(float prescale, float gamma, float scale, float base, byte *out)
+void BuildGammaTable8(float prescale, float gamma, float scale, float base, qbyte *out)
 {
        int i, adjusted;
        double invgamma, d;
 {
        int i, adjusted;
        double invgamma, d;
@@ -174,8 +174,8 @@ void Gamma_Init(void)
 
 void Palette_Init(void)
 {
 
 void Palette_Init(void)
 {
-       byte *pal;
-       pal = (byte *)COM_LoadFile ("gfx/palette.lmp", false);
+       qbyte *pal;
+       pal = (qbyte *)COM_LoadFile ("gfx/palette.lmp", false);
        if (!pal)
                Sys_Error ("Couldn't load gfx/palette.lmp");
        memcpy(host_basepal, pal, 765);
        if (!pal)
                Sys_Error ("Couldn't load gfx/palette.lmp");
        memcpy(host_basepal, pal, 765);
index 7e3ef152f9c46723102c32a07e81b588a458ccbd..f6e862e05c5c7d4049113fa39511b17c050b6342 100644 (file)
--- a/palette.h
+++ b/palette.h
@@ -6,14 +6,14 @@ extern cvar_t v_overbrightbits;
 extern cvar_t v_hwgamma;
 
 extern unsigned int d_8to24table[256];
 extern cvar_t v_hwgamma;
 
 extern unsigned int d_8to24table[256];
-//extern byte d_15to8table[32768];
+//extern qbyte d_15to8table[32768];
 
 extern qboolean hardwaregammasupported;
 
 void VID_UpdateGamma(qboolean force);
 
 // used by hardware gamma functions in vid_* files
 
 extern qboolean hardwaregammasupported;
 
 void VID_UpdateGamma(qboolean force);
 
 // used by hardware gamma functions in vid_* files
-void BuildGammaTable8(float prescale, float gamma, float scale, float base, byte *out);
+void BuildGammaTable8(float prescale, float gamma, float scale, float base, qbyte *out);
 void BuildGammaTable16(float prescale, float gamma, float scale, float base, unsigned short *out);
 
 void Gamma_Init(void);
 void BuildGammaTable16(float prescale, float gamma, float scale, float base, unsigned short *out);
 
 void Gamma_Init(void);
index c002f3cfe5eb2571c27f8a5b149ae337ea299e38..7b1a17825dccd0327ea8fdcff8645ea446b4735a 100644 (file)
--- a/pr_cmds.c
+++ b/pr_cmds.c
@@ -858,12 +858,12 @@ void PF_checkpos (void)
 
 //============================================================================
 
 
 //============================================================================
 
-byte   checkpvs[MAX_MAP_LEAFS/8];
+qbyte checkpvs[MAX_MAP_LEAFS/8];
 
 int PF_newcheckclient (int check)
 {
        int             i;
 
 int PF_newcheckclient (int check)
 {
        int             i;
-       byte    *pvs;
+       qbyte   *pvs;
        edict_t *ent;
        mleaf_t *leaf;
        vec3_t  org;
        edict_t *ent;
        mleaf_t *leaf;
        vec3_t  org;
index 94410c4169fd685d3425ffcef77cbee9bcce1878..614881ac3d10b052e4bfb1a42b00a0cba36fd91b 100644 (file)
--- a/pr_comp.h
+++ b/pr_comp.h
@@ -147,7 +147,7 @@ typedef struct
        int             s_file;                 // source file defined in
        
        int             numparms;
        int             s_file;                 // source file defined in
        
        int             numparms;
-       byte    parm_size[MAX_PARMS];
+       qbyte   parm_size[MAX_PARMS];
 } dfunction_t;
 
 
 } dfunction_t;
 
 
index 4b17da13476b603cc72106705503cc9f9b1c27ef..78fd1176347a3bae46999121973ba48ee566896b 100644 (file)
@@ -1204,7 +1204,7 @@ void PR_LoadProgs (void)
 
        Con_DPrintf ("Programs occupy %iK.\n", com_filesize/1024);
 
 
        Con_DPrintf ("Programs occupy %iK.\n", com_filesize/1024);
 
-       pr_crc = CRC_Block((byte *)progs, com_filesize);
+       pr_crc = CRC_Block((qbyte *)progs, com_filesize);
 
 // byte swap the header
        for (i=0 ; i<sizeof(*progs)/4 ; i++)
 
 // byte swap the header
        for (i=0 ; i<sizeof(*progs)/4 ; i++)
@@ -1215,20 +1215,20 @@ void PR_LoadProgs (void)
        if (progs->crc != PROGHEADER_CRC)
                Host_Error ("progs.dat system vars have been modified, progdefs.h is out of date");
 
        if (progs->crc != PROGHEADER_CRC)
                Host_Error ("progs.dat system vars have been modified, progdefs.h is out of date");
 
-       pr_functions = (dfunction_t *)((byte *)progs + progs->ofs_functions);
+       pr_functions = (dfunction_t *)((qbyte *)progs + progs->ofs_functions);
        pr_strings = (char *)progs + progs->ofs_strings;
        pr_strings = (char *)progs + progs->ofs_strings;
-       pr_globaldefs = (ddef_t *)((byte *)progs + progs->ofs_globaldefs);
+       pr_globaldefs = (ddef_t *)((qbyte *)progs + progs->ofs_globaldefs);
 
        // we need to expand the fielddefs list to include all the engine fields,
        // so allocate a new place for it
 
        // we need to expand the fielddefs list to include all the engine fields,
        // so allocate a new place for it
-       infielddefs = (ddef_t *)((byte *)progs + progs->ofs_fielddefs);
+       infielddefs = (ddef_t *)((qbyte *)progs + progs->ofs_fielddefs);
        pr_fielddefs = Mem_Alloc(progs_mempool, (progs->numfielddefs + DPFIELDS) * sizeof(ddef_t));
 
        pr_fielddefs = Mem_Alloc(progs_mempool, (progs->numfielddefs + DPFIELDS) * sizeof(ddef_t));
 
-       pr_statements = (dstatement_t *)((byte *)progs + progs->ofs_statements);
+       pr_statements = (dstatement_t *)((qbyte *)progs + progs->ofs_statements);
 
        // moved edict_size calculation down below field adding code
 
 
        // moved edict_size calculation down below field adding code
 
-       pr_global_struct = (globalvars_t *)((byte *)progs + progs->ofs_globals);
+       pr_global_struct = (globalvars_t *)((qbyte *)progs + progs->ofs_globals);
        pr_globals = (float *)pr_global_struct;
 
 // byte swap the lumps
        pr_globals = (float *)pr_global_struct;
 
 // byte swap the lumps
@@ -1477,7 +1477,7 @@ edict_t *EDICT_NUM(int n)
 {
        if (n < 0 || n >= sv.max_edicts)
                Sys_Error ("EDICT_NUM: bad number %i", n);
 {
        if (n < 0 || n >= sv.max_edicts)
                Sys_Error ("EDICT_NUM: bad number %i", n);
-       return (edict_t *)((byte *)sv.edicts+ (n)*pr_edict_size);
+       return (edict_t *)((qbyte *)sv.edicts+ (n)*pr_edict_size);
 }
 */
 
 }
 */
 
@@ -1485,7 +1485,7 @@ int NUM_FOR_EDICT(edict_t *e)
 {
        int             b;
 
 {
        int             b;
 
-       b = (byte *)e - (byte *)sv.edicts;
+       b = (qbyte *)e - (qbyte *)sv.edicts;
        b = b / pr_edict_size;
 
        if (b < 0 || b >= sv.num_edicts)
        b = b / pr_edict_size;
 
        if (b < 0 || b >= sv.num_edicts)
@@ -1497,7 +1497,7 @@ int NoCrash_NUM_FOR_EDICT(edict_t *e)
 {
        int             b;
 
 {
        int             b;
 
-       b = (byte *)e - (byte *)sv.edicts;
+       b = (qbyte *)e - (qbyte *)sv.edicts;
        b = b / pr_edict_size;
        return b;
 }
        b = b / pr_edict_size;
        return b;
 }
index 524ca44feddd1efdd49242dbf3d74c033c5ac1e7..838a0036511664769746fbf7fe71f1f723aa3d40 100644 (file)
                                        PR_RunError("Progs attempted to write to an out of bounds edict\n");
                                        return;
                                }
                                        PR_RunError("Progs attempted to write to an out of bounds edict\n");
                                        return;
                                }
-                               if (OPB->_int % pr_edict_size < ((byte *)&sv.edicts->v - (byte *)sv.edicts))
+                               if (OPB->_int % pr_edict_size < ((qbyte *)&sv.edicts->v - (qbyte *)sv.edicts))
                                {
                                        pr_xstatement = st - pr_statements;
                                        PR_RunError("Progs attempted to write to an engine edict field\n");
                                        return;
                                }
 #endif
                                {
                                        pr_xstatement = st - pr_statements;
                                        PR_RunError("Progs attempted to write to an engine edict field\n");
                                        return;
                                }
 #endif
-                               ptr = (eval_t *)((byte *)sv.edicts + OPB->_int);
+                               ptr = (eval_t *)((qbyte *)sv.edicts + OPB->_int);
                                ptr->_int = OPA->_int;
                                break;
                        case OP_STOREP_V:
                                ptr->_int = OPA->_int;
                                break;
                        case OP_STOREP_V:
                                        return;
                                }
 #endif
                                        return;
                                }
 #endif
-                               ptr = (eval_t *)((byte *)sv.edicts + OPB->_int);
+                               ptr = (eval_t *)((qbyte *)sv.edicts + OPB->_int);
                                ptr->vector[0] = OPA->vector[0];
                                ptr->vector[1] = OPA->vector[1];
                                ptr->vector[2] = OPA->vector[2];
                                ptr->vector[0] = OPA->vector[0];
                                ptr->vector[1] = OPA->vector[1];
                                ptr->vector[2] = OPA->vector[2];
                                }
 #endif
                                ed = PROG_TO_EDICT(OPA->edict);
                                }
 #endif
                                ed = PROG_TO_EDICT(OPA->edict);
-                               OPC->_int = (byte *)((int *)&ed->v + OPB->_int) - (byte *)sv.edicts;
+                               OPC->_int = (qbyte *)((int *)&ed->v + OPB->_int) - (qbyte *)sv.edicts;
                                break;
 
                        case OP_LOAD_F:
                                break;
 
                        case OP_LOAD_F:
                                        PR_RunError("Progs attempted to write to an out of bounds edict\n");
                                        return;
                                }
                                        PR_RunError("Progs attempted to write to an out of bounds edict\n");
                                        return;
                                }
-                               if (OPB->_int % pr_edict_size < ((byte *)&sv.edicts->v - (byte *)sv.edicts))
+                               if (OPB->_int % pr_edict_size < ((qbyte *)&sv.edicts->v - (qbyte *)sv.edicts))
                                {
                                        pr_xstatement = st - pr_statements;
                                        PR_RunError("Progs attempted to write to an engine edict field\n");
                                        return;
                                }
 #endif
                                {
                                        pr_xstatement = st - pr_statements;
                                        PR_RunError("Progs attempted to write to an engine edict field\n");
                                        return;
                                }
 #endif
-                               ptr = (eval_t *)((byte *)sv.edicts + OPB->_int);
+                               ptr = (eval_t *)((qbyte *)sv.edicts + OPB->_int);
                                ptr->_int = OPA->_int;
                                break;
                        case OP_LOAD_I:
                                ptr->_int = OPA->_int;
                                break;
                        case OP_LOAD_I:
diff --git a/progs.h b/progs.h
index 289f4214a47b9dca42101f31745a67857683512b..c377ec0cb59f7d04705c20262e9cf7e279e4b2ae 100644 (file)
--- a/progs.h
+++ b/progs.h
@@ -52,7 +52,7 @@ typedef struct edict_s
        entvars_t       v;                                      // C exported fields from progs
 // other fields from progs come immediately after
 } edict_t;
        entvars_t       v;                                      // C exported fields from progs
 // other fields from progs come immediately after
 } edict_t;
-//#define      EDICT_FROM_AREA(l) ((edict_t *)((byte *)l - (int)&(((edict_t *)0)->area)))
+//#define      EDICT_FROM_AREA(l) ((edict_t *)((qbyte *)l - (int)&(((edict_t *)0)->area)))
 //#define      EDICT_FROM_AREA(l) STRUCT_FROM_LINK(l,edict_t,area)
 
 // LordHavoc: in an effort to eliminate time wasted on GetEdictFieldValue...  see pr_edict.c for the functions which use these.
 //#define      EDICT_FROM_AREA(l) STRUCT_FROM_LINK(l,edict_t,area)
 
 // LordHavoc: in an effort to eliminate time wasted on GetEdictFieldValue...  see pr_edict.c for the functions which use these.
@@ -136,23 +136,23 @@ void ED_ParseGlobals (char *data);
 void ED_LoadFromFile (char *data);
 
 edict_t *EDICT_NUM_ERROR(int n);
 void ED_LoadFromFile (char *data);
 
 edict_t *EDICT_NUM_ERROR(int n);
-#define EDICT_NUM(n) (n >= 0 ? (n < sv.max_edicts ? (edict_t *)((byte *)sv.edicts + (n) * pr_edict_size) : EDICT_NUM_ERROR(n)) : EDICT_NUM_ERROR(n))
+#define EDICT_NUM(n) (n >= 0 ? (n < sv.max_edicts ? (edict_t *)((qbyte *)sv.edicts + (n) * pr_edict_size) : EDICT_NUM_ERROR(n)) : EDICT_NUM_ERROR(n))
 //define EDICT_NUM(n) ((edict_t *)(sv.edicts+ (n)*pr_edict_size))
 //define EDICT_NUM(n) ((edict_t *)(sv.edicts+ (n)*pr_edict_size))
-//define NUM_FOR_EDICT(e) (((byte *)(e) - sv.edicts)/pr_edict_size)
+//define NUM_FOR_EDICT(e) (((qbyte *)(e) - sv.edicts)/pr_edict_size)
 
 //edict_t *EDICT_NUM(int n);
 int NUM_FOR_EDICT(edict_t *e);
 
 
 //edict_t *EDICT_NUM(int n);
 int NUM_FOR_EDICT(edict_t *e);
 
-#define        NEXT_EDICT(e) ((edict_t *)( (byte *)e + pr_edict_size))
+#define        NEXT_EDICT(e) ((edict_t *)( (qbyte *)e + pr_edict_size))
 
 
-#define        EDICT_TO_PROG(e) ((byte *)e - (byte *)sv.edicts)
-#define PROG_TO_EDICT(e) ((edict_t *)((byte *)sv.edicts + e))
+#define        EDICT_TO_PROG(e) ((qbyte *)e - (qbyte *)sv.edicts)
+#define PROG_TO_EDICT(e) ((edict_t *)((qbyte *)sv.edicts + e))
 
 //============================================================================
 
 #define        G_FLOAT(o) (pr_globals[o])
 #define        G_INT(o) (*(int *)&pr_globals[o])
 
 //============================================================================
 
 #define        G_FLOAT(o) (pr_globals[o])
 #define        G_INT(o) (*(int *)&pr_globals[o])
-#define        G_EDICT(o) ((edict_t *)((byte *)sv.edicts+ *(int *)&pr_globals[o]))
+#define        G_EDICT(o) ((edict_t *)((qbyte *)sv.edicts+ *(int *)&pr_globals[o]))
 #define G_EDICTNUM(o) NUM_FOR_EDICT(G_EDICT(o))
 #define        G_VECTOR(o) (&pr_globals[o])
 #define        G_STRING(o) (pr_strings + *(string_t *)&pr_globals[o])
 #define G_EDICTNUM(o) NUM_FOR_EDICT(G_EDICT(o))
 #define        G_VECTOR(o) (&pr_globals[o])
 #define        G_STRING(o) (pr_strings + *(string_t *)&pr_globals[o])
index be9c9e7946d07a4ee292ff391f8865d0fab322e9..a5e16ab285fd34c9b57e4f9f889a03716ce6d948 100644 (file)
@@ -181,11 +181,11 @@ void EntityFrame_Write(entity_database_t *d, entity_frame_t *f, sizebuf_t *msg)
                        bits |= E_ORIGIN2;
                if ((int) ent->origin[2] != (int) delta->origin[2])
                        bits |= E_ORIGIN3;
                        bits |= E_ORIGIN2;
                if ((int) ent->origin[2] != (int) delta->origin[2])
                        bits |= E_ORIGIN3;
-               if ((byte) (ent->angles[0] * (256.0f / 360.0f)) != (byte) (delta->angles[0] * (256.0f / 360.0f)))
+               if ((qbyte) (ent->angles[0] * (256.0f / 360.0f)) != (qbyte) (delta->angles[0] * (256.0f / 360.0f)))
                        bits |= E_ANGLE1;
                        bits |= E_ANGLE1;
-               if ((byte) (ent->angles[1] * (256.0f / 360.0f)) != (byte) (delta->angles[1] * (256.0f / 360.0f)))
+               if ((qbyte) (ent->angles[1] * (256.0f / 360.0f)) != (qbyte) (delta->angles[1] * (256.0f / 360.0f)))
                        bits |= E_ANGLE2;
                        bits |= E_ANGLE2;
-               if ((byte) (ent->angles[2] * (256.0f / 360.0f)) != (byte) (delta->angles[2] * (256.0f / 360.0f)))
+               if ((qbyte) (ent->angles[2] * (256.0f / 360.0f)) != (qbyte) (delta->angles[2] * (256.0f / 360.0f)))
                        bits |= E_ANGLE3;
                if ((ent->modelindex ^ delta->modelindex) & 0x00FF)
                        bits |= E_MODEL1;
                        bits |= E_ANGLE3;
                if ((ent->modelindex ^ delta->modelindex) & 0x00FF)
                        bits |= E_MODEL1;
index ad839c2b37646fbdf7834275165a8be62e4764d9..2ed2326a7efd0eaeda53500d8aa86e596b64dc26 100644 (file)
@@ -288,21 +288,21 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
 typedef struct
 {
 
 typedef struct
 {
-       double  time; // time this state was built
-       vec3_t  origin;
-       vec3_t  angles;
+       double time; // time this state was built
+       vec3_t origin;
+       vec3_t angles;
        int number; // entity number this state is for
        unsigned short active; // true if a valid state
        unsigned short modelindex;
        unsigned short frame;
        unsigned short effects;
        int number; // entity number this state is for
        unsigned short active; // true if a valid state
        unsigned short modelindex;
        unsigned short frame;
        unsigned short effects;
-       byte    colormap;
-       byte    skin;
-       byte    alpha;
-       byte    scale;
-       byte    glowsize;
-       byte    glowcolor;
-       byte    flags;
+       qbyte colormap;
+       qbyte skin;
+       qbyte alpha;
+       qbyte scale;
+       qbyte glowsize;
+       qbyte glowcolor;
+       qbyte flags;
 }
 entity_state_t;
 
 }
 entity_state_t;
 
index 85760abad582bb32b6c2029c71990b0c9bba651e..dbaf99cc4a82c37d1513a31ca2a1d54bb0612ad9 100644 (file)
@@ -21,12 +21,16 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
 #define QUAKE_GAME // as opposed to utilities
 
 
 #define QUAKE_GAME // as opposed to utilities
 
+#include <math.h>
+#include <string.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <setjmp.h>
+
 extern char *buildstring;
 
 extern char *buildstring;
 
-#if !defined BYTE_DEFINED
-typedef unsigned char          byte;
-#define BYTE_DEFINED 1
-#endif
+typedef unsigned char qbyte;
 
 #undef true
 #undef false
 
 #undef true
 #undef false
@@ -51,13 +55,6 @@ typedef enum {false, true} qboolean;
 
 #define GAMENAME "id1"
 
 
 #define GAMENAME "id1"
 
-#include <math.h>
-#include <string.h>
-#include <stdarg.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <setjmp.h>
-
 #define MAX_NUM_ARGVS  50
 
 // up / down
 #define MAX_NUM_ARGVS  50
 
 // up / down
@@ -294,7 +291,7 @@ void Chase_Reset (void);
 void Chase_Update (void);
 
 void fractalnoise(unsigned char *noise, int size, int startgrid);
 void Chase_Update (void);
 
 void fractalnoise(unsigned char *noise, int size, int startgrid);
-void fractalnoisequick(byte *noise, int size, int startgrid);
+void fractalnoisequick(unsigned char *noise, int size, int startgrid);
 
 #include "palette.h"
 #include "image.h"
 
 #include "palette.h"
 #include "image.h"
index d0134e03ad69fbe351658e5b8fbe709f44e6c5b2..8625a2a1486def2298b8aaad78024cb228f5726e 100644 (file)
--- a/r_clip.c
+++ b/r_clip.c
@@ -248,7 +248,7 @@ int R_Clip_ClipPolygonToPlane(float *in, float *out, int inpoints, int stride, t
        float *prevpoint, prevdist, dist, dot;
 
        // begin with the last point, then enter the loop with the first point as current
        float *prevpoint, prevdist, dist, dot;
 
        // begin with the last point, then enter the loop with the first point as current
-       prevpoint = (float *) ((byte *)in + stride * (inpoints - 1));
+       prevpoint = (float *) ((qbyte *)in + stride * (inpoints - 1));
        prevdist = DotProduct(prevpoint, plane->normal) - plane->dist;
        prevside = prevdist >= 0 ? SIDE_FRONT : SIDE_BACK;
        i = 0;
        prevdist = DotProduct(prevpoint, plane->normal) - plane->dist;
        prevside = prevdist >= 0 ? SIDE_FRONT : SIDE_BACK;
        i = 0;
@@ -259,7 +259,7 @@ int R_Clip_ClipPolygonToPlane(float *in, float *out, int inpoints, int stride, t
                prevpoint = in;
                prevdist = dist;
                prevside = side;
                prevpoint = in;
                prevdist = dist;
                prevside = side;
-               (byte *)in += stride;
+               (qbyte *)in += stride;
 
 begin:
                dist = DotProduct(in, plane->normal) - plane->dist;
 
 begin:
                dist = DotProduct(in, plane->normal) - plane->dist;
@@ -313,12 +313,12 @@ void R_Clip_AddPolygon (vec_t *points, int numverts, int stride, int solid, void
        {
                polyplane = &localplane;
                // calculate the plane for the polygon
        {
                polyplane = &localplane;
                // calculate the plane for the polygon
-               if (!R_Clip_TriangleToPlane((float *) points, (float *) ((byte *)points + stride), (float *) ((byte *)points + 2 * stride), polyplane))
+               if (!R_Clip_TriangleToPlane((float *) points, (float *) ((qbyte *)points + stride), (float *) ((qbyte *)points + 2 * stride), polyplane))
                {
                        for (i = 0;i < numverts;i++)
                                for (j = i + 1;j < numverts;j++)
                                        for (k = j + 1;k < numverts;k++)
                {
                        for (i = 0;i < numverts;i++)
                                for (j = i + 1;j < numverts;j++)
                                        for (k = j + 1;k < numverts;k++)
-                                               if (R_Clip_TriangleToPlane((float *) ((byte *)points + i * stride), (float *) ((byte *)points + j * stride), (float *) ((byte *)points + k * stride), polyplane))
+                                               if (R_Clip_TriangleToPlane((float *) ((qbyte *)points + i * stride), (float *) ((qbyte *)points + j * stride), (float *) ((qbyte *)points + k * stride), polyplane))
                                                        goto valid1;
                        return; // gave up
                        valid1:;
                                                        goto valid1;
                        return; // gave up
                        valid1:;
@@ -332,12 +332,12 @@ void R_Clip_AddPolygon (vec_t *points, int numverts, int stride, int solid, void
        else
        {
                // calculate the plane for the polygon
        else
        {
                // calculate the plane for the polygon
-               if (!R_Clip_TriangleToPlane((float *) points, (float *) ((byte *)points + stride), (float *) ((byte *)points + 2 * stride), &localplane))
+               if (!R_Clip_TriangleToPlane((float *) points, (float *) ((qbyte *)points + stride), (float *) ((qbyte *)points + 2 * stride), &localplane))
                {
                        for (i = 0;i < numverts;i++)
                                for (j = i + 1;j < numverts;j++)
                                        for (k = j + 1;k < numverts;k++)
                {
                        for (i = 0;i < numverts;i++)
                                for (j = i + 1;j < numverts;j++)
                                        for (k = j + 1;k < numverts;k++)
-                                               if (R_Clip_TriangleToPlane((float *) ((byte *)points + i * stride), (float *) ((byte *)points + j * stride), (float *) ((byte *)points + k * stride), &localplane))
+                                               if (R_Clip_TriangleToPlane((float *) ((qbyte *)points + i * stride), (float *) ((qbyte *)points + j * stride), (float *) ((qbyte *)points + k * stride), &localplane))
                                                        goto valid4;
                        return; // gave up
                        valid4:;
                                                        goto valid4;
                        return; // gave up
                        valid4:;
@@ -874,7 +874,7 @@ void R_Clip_DisplayBuffer(void)
 #if CLIPTEST
        int i;
        static int firstupload = true;
 #if CLIPTEST
        int i;
        static int firstupload = true;
-       byte clipbuffertex[256*256], *b;
+       qbyte clipbuffertex[256*256], *b;
        if (!r_render.integer)
                return;
        if (clipwidth > 256 || clipheight > 256)
        if (!r_render.integer)
                return;
        if (clipwidth > 256 || clipheight > 256)
index 042a42c9dfb6a4026f24d53b3114b2d5d0af8cd4..83a45ecb74717ee2e92009de48a17a824111810a 100644 (file)
@@ -21,7 +21,7 @@ void R_Crosshairs_Init(void)
 void DrawCrosshair(int num)
 {
        int i;
 void DrawCrosshair(int num)
 {
        int i;
-       byte *color;
+       qbyte *color;
        float scale, base;
        char *picname;
        cachepic_t *pic;
        float scale, base;
        char *picname;
        cachepic_t *pic;
@@ -37,7 +37,7 @@ void DrawCrosshair(int num)
        }
        else
                i = 15;
        }
        else
                i = 15;
-       color = (byte *) &d_8to24table[i];
+       color = (qbyte *) &d_8to24table[i];
        if (crosshair_flashspeed.value >= 0.01f)
                base = (sin(realtime * crosshair_flashspeed.value * (M_PI*2.0f)) * crosshair_flashrange.value);
        else
        if (crosshair_flashspeed.value >= 0.01f)
                base = (sin(realtime * crosshair_flashspeed.value * (M_PI*2.0f)) * crosshair_flashrange.value);
        else
index 8bfd09d7b7f026e5836330577c74bf21b75f6166..f46fe6482b4d9b6af5b2b72e81246489cf4d2d94 100644 (file)
@@ -77,7 +77,7 @@ cvar_t r_drawexplosions = {0, "r_drawexplosions", "1"};
 void r_explosion_start(void)
 {
        int x, y;
 void r_explosion_start(void)
 {
        int x, y;
-       byte noise1[128][128], noise2[128][128], noise3[128][128], data[128][128][4];
+       qbyte noise1[128][128], noise2[128][128], noise3[128][128], data[128][128][4];
        explosiontexturepool = R_AllocTexturePool();
        fractalnoise(&noise1[0][0], 128, 32);
        fractalnoise(&noise2[0][0], 128, 4);
        explosiontexturepool = R_AllocTexturePool();
        fractalnoise(&noise1[0][0], 128, 32);
        fractalnoise(&noise2[0][0], 128, 4);
@@ -169,7 +169,7 @@ void R_NewExplosion(vec3_t org)
 {
        int i, j;
        float dist;
 {
        int i, j;
        float dist;
-       byte noise[EXPLOSIONGRID*EXPLOSIONGRID];
+       qbyte noise[EXPLOSIONGRID*EXPLOSIONGRID];
        fractalnoisequick(noise, EXPLOSIONGRID, 4);
        for (i = 0;i < MAX_EXPLOSIONS;i++)
        {
        fractalnoisequick(noise, EXPLOSIONGRID, 4);
        for (i = 0;i < MAX_EXPLOSIONS;i++)
        {
index 2f8625d96ba46464228198c1efddc01406905a7f..aa35da8ef81bab35d205918b4bc6f54889303df0 100644 (file)
--- a/r_light.c
+++ b/r_light.c
@@ -35,7 +35,7 @@ void r_light_start(void)
 {
        float dx, dy;
        int x, y, a;
 {
        float dx, dy;
        int x, y, a;
-       byte pixels[32][32][4];
+       qbyte pixels[32][32][4];
        lighttexturepool = R_AllocTexturePool();
        for (y = 0;y < 32;y++)
        {
        lighttexturepool = R_AllocTexturePool();
        for (y = 0;y < 32;y++)
        {
@@ -395,7 +395,7 @@ static void R_VisMarkLights (rdlight_t *rd, int bit, int bitindex)
        int             i, k, m, c, leafnum;
        msurface_t *surf, **mark;
        mleaf_t *leaf;
        int             i, k, m, c, leafnum;
        msurface_t *surf, **mark;
        mleaf_t *leaf;
-       byte    *in;
+       qbyte   *in;
        int             row;
        float   low[3], high[3], dist, maxdist;
 
        int             row;
        float   low[3], high[3], dist, maxdist;
 
@@ -662,7 +662,7 @@ loc0:
 
                                if (surf->samples)
                                {
 
                                if (surf->samples)
                                {
-                                       byte *lightmap;
+                                       qbyte *lightmap;
                                        int maps, line3, size3, dsfrac = ds & 15, dtfrac = dt & 15, scale = 0, r00 = 0, g00 = 0, b00 = 0, r01 = 0, g01 = 0, b01 = 0, r10 = 0, g10 = 0, b10 = 0, r11 = 0, g11 = 0, b11 = 0;
                                        line3 = ((surf->extents[0]>>4)+1)*3;
                                        size3 = ((surf->extents[0]>>4)+1) * ((surf->extents[1]>>4)+1)*3; // LordHavoc: *3 for colored lighting
                                        int maps, line3, size3, dsfrac = ds & 15, dtfrac = dt & 15, scale = 0, r00 = 0, g00 = 0, b00 = 0, r01 = 0, g01 = 0, b01 = 0, r10 = 0, g10 = 0, b10 = 0, r11 = 0, g11 = 0, b11 = 0;
                                        line3 = ((surf->extents[0]>>4)+1)*3;
                                        size3 = ((surf->extents[0]>>4)+1) * ((surf->extents[1]>>4)+1)*3; // LordHavoc: *3 for colored lighting
index f69405bf5bf03caf45a5221d12df3464d9e23efd..cb5795a8861b67b3981035eb368e95121db4d931 100644 (file)
@@ -29,7 +29,7 @@ static particletexture_t particletexture[MAX_PARTICLETEXTURES][2];
 static cvar_t r_drawparticles = {0, "r_drawparticles", "1"};
 static cvar_t r_particles_lighting = {0, "r_particles_lighting", "1"};
 
 static cvar_t r_drawparticles = {0, "r_drawparticles", "1"};
 static cvar_t r_particles_lighting = {0, "r_particles_lighting", "1"};
 
-static byte shadebubble(float dx, float dy, vec3_t light)
+static qbyte shadebubble(float dx, float dy, vec3_t light)
 {
        float   dz, f, dot;
        vec3_t  normal;
 {
        float   dz, f, dot;
        vec3_t  normal;
@@ -56,13 +56,13 @@ static byte shadebubble(float dx, float dy, vec3_t light)
                f *= 128;
                f += 16; // just to give it a haze so you can see the outline
                f = bound(0, f, 255);
                f *= 128;
                f += 16; // just to give it a haze so you can see the outline
                f = bound(0, f, 255);
-               return (byte) f;
+               return (qbyte) f;
        }
        else
                return 0;
 }
 
        }
        else
                return 0;
 }
 
-static void setuptex(int cltexnum, int fog, int rtexnum, byte *data, byte *particletexturedata)
+static void setuptex(int cltexnum, int fog, int rtexnum, qbyte *data, qbyte *particletexturedata)
 {
        int basex, basey, y;
        basex = ((rtexnum >> 0) & 7) * 32;
 {
        int basex, basey, y;
        basex = ((rtexnum >> 0) & 7) * 32;
@@ -79,9 +79,9 @@ static void R_InitParticleTexture (void)
 {
        int             x,y,d,i,m;
        float   dx, dy, radius, f, f2;
 {
        int             x,y,d,i,m;
        float   dx, dy, radius, f, f2;
-       byte    data[32][32][4], noise1[64][64], noise2[64][64];
+       qbyte   data[32][32][4], noise1[64][64], noise2[64][64];
        vec3_t  light;
        vec3_t  light;
-       byte    particletexturedata[256*256*4];
+       qbyte   particletexturedata[256*256*4];
 
        memset(particletexturedata, 255, sizeof(particletexturedata));
 
 
        memset(particletexturedata, 255, sizeof(particletexturedata));
 
@@ -107,7 +107,7 @@ static void R_InitParticleTexture (void)
                                        if (d > 0)
                                                d = (d * (256 - (int) (dx*dx+dy*dy))) >> 8;
                                        d = bound(0, d, 255);
                                        if (d > 0)
                                                d = (d * (256 - (int) (dx*dx+dy*dy))) >> 8;
                                        d = bound(0, d, 255);
-                                       data[y][x][3] = (byte) d;
+                                       data[y][x][3] = (qbyte) d;
                                        if (m < d)
                                                m = d;
                                }
                                        if (m < d)
                                                m = d;
                                }
@@ -153,7 +153,7 @@ static void R_InitParticleTexture (void)
                        dx = x - 16;
                        d = (256 - (dx*dx+dy*dy));
                        d = bound(0, d, 255);
                        dx = x - 16;
                        d = (256 - (dx*dx+dy*dy));
                        d = bound(0, d, 255);
-                       data[y][x][3] = (byte) d;
+                       data[y][x][3] = (qbyte) d;
                }
        }
        setuptex(24, 0, 32, &data[0][0][0], particletexturedata);
                }
        }
        setuptex(24, 0, 32, &data[0][0][0], particletexturedata);
diff --git a/r_sky.c b/r_sky.c
index 5a4ddf1b2a659fb7cfa9c44bcbff35cdf193f7e9..72da6c915eac9797e823231363e59f53e4515ecc 100644 (file)
--- a/r_sky.c
+++ b/r_sky.c
@@ -94,9 +94,9 @@ static char *suf[6] = {"rt", "bk", "lf", "ft", "up", "dn"};
 static rtexture_t *skyboxside[6];
 int R_SetSkyBox(char *sky)
 {
 static rtexture_t *skyboxside[6];
 int R_SetSkyBox(char *sky)
 {
-       int             i;
-       char    name[1024];
-       byte*   image_rgba;
+       int i;
+       char name[1024];
+       qbyte *image_rgba;
 
        if (strcmp(sky, skyname) == 0) // no change
                return true;
 
        if (strcmp(sky, skyname) == 0) // no change
                return true;
@@ -361,9 +361,6 @@ void R_Sky(void)
 
 //===============================================================
 
 
 //===============================================================
 
-static byte skyupperlayerpixels[128*128*4];
-static byte skylowerlayerpixels[128*128*4];
-
 /*
 =============
 R_InitSky
 /*
 =============
 R_InitSky
@@ -371,13 +368,11 @@ R_InitSky
 A sky texture is 256*128, with the right side being a masked overlay
 ==============
 */
 A sky texture is 256*128, with the right side being a masked overlay
 ==============
 */
-void R_InitSky (byte *src, int bytesperpixel)
+void R_InitSky (qbyte *src, int bytesperpixel)
 {
 {
-       int                     i, j, p;
-       unsigned        trans[128*128];
-       unsigned        transpix;
-       int                     r, g, b;
-       unsigned        *rgba;
+       int i, j, p, r, g, b;
+       qbyte skyupperlayerpixels[128*128*4], skylowerlayerpixels[128*128*4];
+       unsigned trans[128*128], transpix, *rgba;
 
        strcpy(skyworldname, loadmodel->name);
 
 
        strcpy(skyworldname, loadmodel->name);
 
@@ -405,29 +400,29 @@ void R_InitSky (byte *src, int bytesperpixel)
                                p = src[i*256 + j + 128];
                                rgba = &d_8to24table[p];
                                trans[(i*128) + j] = *rgba;
                                p = src[i*256 + j + 128];
                                rgba = &d_8to24table[p];
                                trans[(i*128) + j] = *rgba;
-                               r += ((byte *)rgba)[0];
-                               g += ((byte *)rgba)[1];
-                               b += ((byte *)rgba)[2];
+                               r += ((qbyte *)rgba)[0];
+                               g += ((qbyte *)rgba)[1];
+                               b += ((qbyte *)rgba)[2];
                        }
                }
 
                        }
                }
 
-               ((byte *)&transpix)[0] = r/(128*128);
-               ((byte *)&transpix)[1] = g/(128*128);
-               ((byte *)&transpix)[2] = b/(128*128);
-               ((byte *)&transpix)[3] = 0;
+               ((qbyte *)&transpix)[0] = r/(128*128);
+               ((qbyte *)&transpix)[1] = g/(128*128);
+               ((qbyte *)&transpix)[2] = b/(128*128);
+               ((qbyte *)&transpix)[3] = 0;
        }
 
        memcpy(skyupperlayerpixels, trans, 128*128*4);
 
        }
 
        memcpy(skyupperlayerpixels, trans, 128*128*4);
 
-       solidskytexture = R_LoadTexture (skytexturepool, "sky_solidtexture", 128, 128, (byte *) trans, TEXTYPE_RGBA, TEXF_PRECACHE);
+       solidskytexture = R_LoadTexture (skytexturepool, "sky_solidtexture", 128, 128, (qbyte *) trans, TEXTYPE_RGBA, TEXF_PRECACHE);
        /*
        for (i = 0;i < 128*128;i++)
        {
        /*
        for (i = 0;i < 128*128;i++)
        {
-               ((byte *)&trans[i])[0] >>= 1;
-               ((byte *)&trans[i])[1] >>= 1;
-               ((byte *)&trans[i])[2] >>= 1;
+               ((qbyte *)&trans[i])[0] >>= 1;
+               ((qbyte *)&trans[i])[1] >>= 1;
+               ((qbyte *)&trans[i])[2] >>= 1;
        }
        }
-       solidskytexture_half = R_LoadTexture (skytexturepool, "sky_solidtexture_half", 128, 128, (byte *) trans, TEXTYPE_RGBA, TEXF_PRECACHE);
+       solidskytexture_half = R_LoadTexture (skytexturepool, "sky_solidtexture_half", 128, 128, (qbyte *) trans, TEXTYPE_RGBA, TEXF_PRECACHE);
        */
 
        if (bytesperpixel == 4)
        */
 
        if (bytesperpixel == 4)
@@ -453,14 +448,14 @@ void R_InitSky (byte *src, int bytesperpixel)
 
        memcpy(skylowerlayerpixels, trans, 128*128*4);
 
 
        memcpy(skylowerlayerpixels, trans, 128*128*4);
 
-       alphaskytexture = R_LoadTexture (skytexturepool, "sky_alphatexture", 128, 128, (byte *) trans, TEXTYPE_RGBA, TEXF_ALPHA | TEXF_PRECACHE);
+       alphaskytexture = R_LoadTexture (skytexturepool, "sky_alphatexture", 128, 128, (qbyte *) trans, TEXTYPE_RGBA, TEXF_ALPHA | TEXF_PRECACHE);
        /*
        for (i = 0;i < 128*128;i++)
        {
        /*
        for (i = 0;i < 128*128;i++)
        {
-               ((byte *)&trans[i])[0] >>= 1;
-               ((byte *)&trans[i])[1] >>= 1;
-               ((byte *)&trans[i])[2] >>= 1;
+               ((qbyte *)&trans[i])[0] >>= 1;
+               ((qbyte *)&trans[i])[1] >>= 1;
+               ((qbyte *)&trans[i])[2] >>= 1;
        }
        }
-       alphaskytexture_half = R_LoadTexture (skytexturepool, "sky_alphatexture_half", 128, 128, (byte *) trans, TEXTYPE_RGBA, TEXF_ALPHA | TEXF_PRECACHE);
+       alphaskytexture_half = R_LoadTexture (skytexturepool, "sky_alphatexture_half", 128, 128, (qbyte *) trans, TEXTYPE_RGBA, TEXF_ALPHA | TEXF_PRECACHE);
        */
 }
        */
 }
index 3684133f4c9bca1560ab406e98407cb1749c058a..5d810b930b954c027eed3b005b5b4383ccdf49f4 100644 (file)
@@ -46,13 +46,13 @@ int R_CompatibleFragmentWidth(int width, int textype, int flags);
 
 // these two functions add a texture to a pool, and may precache (upload) it
 // a normal static texture
 
 // these two functions add a texture to a pool, and may precache (upload) it
 // a normal static texture
-rtexture_t *R_LoadTexture (rtexturepool_t *rtexturepool, char *identifier, int width, int height, byte *data, int textype, int flags);
+rtexture_t *R_LoadTexture (rtexturepool_t *rtexturepool, char *identifier, int width, int height, qbyte *data, int textype, int flags);
 // a procedurally generated texture, often animated over time, note: generate can be NULL (for odd uses)
 // a procedurally generated texture, often animated over time, note: generate can be NULL (for odd uses)
-rtexture_t *R_ProceduralTexture (rtexturepool_t *rtexturepool, char *identifier, int width, int height, int textype, int flags, int (*generate)(byte *buffer, int width, int height, void *parameterdata, int parameterdatasize), void *parameterdata, int parameterdatasize);
+rtexture_t *R_ProceduralTexture (rtexturepool_t *rtexturepool, char *identifier, int width, int height, int textype, int flags, int (*generate)(qbyte *buffer, int width, int height, void *parameterdata, int parameterdatasize), void *parameterdata, int parameterdatasize);
 
 // update the image data of a texture, used by lightmap updates and procedural
 // textures.
 
 // update the image data of a texture, used by lightmap updates and procedural
 // textures.
-void R_UpdateTexture(rtexture_t *rt, byte *data);
+void R_UpdateTexture(rtexture_t *rt, qbyte *data);
 
 // location of the fragment in the texture (note: any parameter except rt can be NULL)
 void R_FragmentLocation(rtexture_t *rt, int *x, int *y, float *fx1, float *fy1, float *fx2, float *fy2);
 
 // location of the fragment in the texture (note: any parameter except rt can be NULL)
 void R_FragmentLocation(rtexture_t *rt, int *x, int *y, float *fx1, float *fy1, float *fx2, float *fy2);
index 70f42d9e7dbfd305d6bd334e0c84f0b378926e10..76777d16c6a1a7acba822cc0c4503c6c2795f97f 100644 (file)
--- a/render.h
+++ b/render.h
@@ -106,7 +106,7 @@ void R_Init (void);
 void R_RenderView (void); // must set r_refdef first
 
 
 void R_RenderView (void); // must set r_refdef first
 
 
-void R_InitSky (byte *src, int bytesperpixel); // called at level load
+void R_InitSky (qbyte *src, int bytesperpixel); // called at level load
 
 //int R_VisibleCullBox (vec3_t mins, vec3_t maxs);
 
 
 //int R_VisibleCullBox (vec3_t mins, vec3_t maxs);
 
@@ -140,7 +140,7 @@ extern vec3_t fogcolor;
 extern vec_t fogdensity;
 //#define calcfog(v) (exp(-(fogdensity*fogdensity*(((v)[0] - r_origin[0]) * vpn[0] + ((v)[1] - r_origin[1]) * vpn[1] + ((v)[2] - r_origin[2]) * vpn[2])*(((v)[0] - r_origin[0]) * vpn[0] + ((v)[1] - r_origin[1]) * vpn[1] + ((v)[2] - r_origin[2]) * vpn[2]))))
 #define calcfog(v) (exp(-(fogdensity*fogdensity*(((v)[0] - r_origin[0])*((v)[0] - r_origin[0])+((v)[1] - r_origin[1])*((v)[1] - r_origin[1])+((v)[2] - r_origin[2])*((v)[2] - r_origin[2])))))
 extern vec_t fogdensity;
 //#define calcfog(v) (exp(-(fogdensity*fogdensity*(((v)[0] - r_origin[0]) * vpn[0] + ((v)[1] - r_origin[1]) * vpn[1] + ((v)[2] - r_origin[2]) * vpn[2])*(((v)[0] - r_origin[0]) * vpn[0] + ((v)[1] - r_origin[1]) * vpn[1] + ((v)[2] - r_origin[2]) * vpn[2]))))
 #define calcfog(v) (exp(-(fogdensity*fogdensity*(((v)[0] - r_origin[0])*((v)[0] - r_origin[0])+((v)[1] - r_origin[1])*((v)[1] - r_origin[1])+((v)[2] - r_origin[2])*((v)[2] - r_origin[2])))))
-#define calcfogbyte(v) ((byte) (bound(0, ((int) ((float) (calcfog((v)) * 255.0f))), 255)))
+#define calcfogbyte(v) ((qbyte) (bound(0, ((int) ((float) (calcfog((v)) * 255.0f))), 255)))
 
 #include "r_modules.h"
 
 
 #include "r_modules.h"
 
diff --git a/sbar.c b/sbar.c
index a85875dfacbf96c495623a60af416c94ccd10c89..82305a38fbf1c1bddac1630af623a6ca85f21bf9 100644 (file)
--- a/sbar.c
+++ b/sbar.c
@@ -607,7 +607,7 @@ void Sbar_DrawFrags (void)
        int i, k, l, x, f;
        char num[12];
        scoreboard_t *s;
        int i, k, l, x, f;
        char num[12];
        scoreboard_t *s;
-       byte *c;
+       qbyte *c;
 
        Sbar_SortFrags ();
 
 
        Sbar_SortFrags ();
 
@@ -624,9 +624,9 @@ void Sbar_DrawFrags (void)
                        continue;
 
                // draw background
                        continue;
 
                // draw background
-               c = (byte *)&d_8to24table[(s->colors & 0xf0) + 8];
+               c = (qbyte *)&d_8to24table[(s->colors & 0xf0) + 8];
                DrawQ_Fill (sbar_x + x + 10, sbar_y     - 23, 28, 4, c[0] * (1.0f / 255.0f), c[1] * (1.0f / 255.0f), c[2] * (1.0f / 255.0f), c[3] * (1.0f / 255.0f), 0);
                DrawQ_Fill (sbar_x + x + 10, sbar_y     - 23, 28, 4, c[0] * (1.0f / 255.0f), c[1] * (1.0f / 255.0f), c[2] * (1.0f / 255.0f), c[3] * (1.0f / 255.0f), 0);
-               c = (byte *)&d_8to24table[((s->colors & 15)<<4) + 8];
+               c = (qbyte *)&d_8to24table[((s->colors & 15)<<4) + 8];
                DrawQ_Fill (sbar_x + x + 10, sbar_y + 4 - 23, 28, 3, c[0] * (1.0f / 255.0f), c[1] * (1.0f / 255.0f), c[2] * (1.0f / 255.0f), c[3] * (1.0f / 255.0f), 0);
 
                // draw number
                DrawQ_Fill (sbar_x + x + 10, sbar_y + 4 - 23, 28, 3, c[0] * (1.0f / 255.0f), c[1] * (1.0f / 255.0f), c[2] * (1.0f / 255.0f), c[3] * (1.0f / 255.0f), 0);
 
                // draw number
@@ -664,14 +664,14 @@ void Sbar_DrawFace (void)
        {
                char num[12];
                scoreboard_t *s;
        {
                char num[12];
                scoreboard_t *s;
-               byte *c;
+               qbyte *c;
 
                s = &cl.scores[cl.viewentity - 1];
                // draw background
                Sbar_DrawPic (112, 0, rsb_teambord);
 
                s = &cl.scores[cl.viewentity - 1];
                // draw background
                Sbar_DrawPic (112, 0, rsb_teambord);
-               c = (byte *)&d_8to24table[(s->colors & 0xf0) + 8];
+               c = (qbyte *)&d_8to24table[(s->colors & 0xf0) + 8];
                DrawQ_Fill (sbar_x + 113, vid.conheight-SBAR_HEIGHT+3, 22, 9, c[0] * (1.0f / 255.0f), c[1] * (1.0f / 255.0f), c[2] * (1.0f / 255.0f), c[3] * (1.0f / 255.0f), 0);
                DrawQ_Fill (sbar_x + 113, vid.conheight-SBAR_HEIGHT+3, 22, 9, c[0] * (1.0f / 255.0f), c[1] * (1.0f / 255.0f), c[2] * (1.0f / 255.0f), c[3] * (1.0f / 255.0f), 0);
-               c = (byte *)&d_8to24table[((s->colors & 15)<<4) + 8];
+               c = (qbyte *)&d_8to24table[((s->colors & 15)<<4) + 8];
                DrawQ_Fill (sbar_x + 113, vid.conheight-SBAR_HEIGHT+12, 22, 9, c[0] * (1.0f / 255.0f), c[1] * (1.0f / 255.0f), c[2] * (1.0f / 255.0f), c[3] * (1.0f / 255.0f), 0);
 
                // draw number
                DrawQ_Fill (sbar_x + 113, vid.conheight-SBAR_HEIGHT+12, 22, 9, c[0] * (1.0f / 255.0f), c[1] * (1.0f / 255.0f), c[2] * (1.0f / 255.0f), c[3] * (1.0f / 255.0f), 0);
 
                // draw number
@@ -892,7 +892,7 @@ void Sbar_DeathmatchOverlay (void)
        int i, k, l, x, y, total, n, minutes, tens, units, fph;
        char num[128];
        scoreboard_t *s;
        int i, k, l, x, y, total, n, minutes, tens, units, fph;
        char num[128];
        scoreboard_t *s;
-       byte *c;
+       qbyte *c;
 
        pic = Draw_CachePic ("gfx/ranking.lmp");
        DrawQ_Pic ((vid.conwidth - pic->width)/2, 8, "gfx/ranking.lmp", 0, 0, 1, 1, 1, 1, 0);
 
        pic = Draw_CachePic ("gfx/ranking.lmp");
        DrawQ_Pic ((vid.conwidth - pic->width)/2, 8, "gfx/ranking.lmp", 0, 0, 1, 1, 1, 1, 0);
@@ -913,9 +913,9 @@ void Sbar_DeathmatchOverlay (void)
                        continue;
 
        // draw background
                        continue;
 
        // draw background
-               c = (byte *)&d_8to24table[(s->colors & 0xf0) + 8];
+               c = (qbyte *)&d_8to24table[(s->colors & 0xf0) + 8];
                DrawQ_Fill ( x, y+1, 88, 3, c[0] * (1.0f / 255.0f), c[1] * (1.0f / 255.0f), c[2] * (1.0f / 255.0f), c[3] * (1.0f / 255.0f), 0);
                DrawQ_Fill ( x, y+1, 88, 3, c[0] * (1.0f / 255.0f), c[1] * (1.0f / 255.0f), c[2] * (1.0f / 255.0f), c[3] * (1.0f / 255.0f), 0);
-               c = (byte *)&d_8to24table[((s->colors & 15)<<4) + 8];
+               c = (qbyte *)&d_8to24table[((s->colors & 15)<<4) + 8];
                DrawQ_Fill ( x, y+4, 88, 3, c[0] * (1.0f / 255.0f), c[1] * (1.0f / 255.0f), c[2] * (1.0f / 255.0f), c[3] * (1.0f / 255.0f), 0);
 
                total = cl.time - s->entertime;
                DrawQ_Fill ( x, y+4, 88, 3, c[0] * (1.0f / 255.0f), c[1] * (1.0f / 255.0f), c[2] * (1.0f / 255.0f), c[3] * (1.0f / 255.0f), 0);
 
                total = cl.time - s->entertime;
@@ -947,7 +947,7 @@ void Sbar_MiniDeathmatchOverlay (void)
        int i, l, k, x, y, fph, numlines;
        char num[128];
        scoreboard_t *s;
        int i, l, k, x, y, fph, numlines;
        char num[128];
        scoreboard_t *s;
-       byte *c;
+       qbyte *c;
 
        if (vid.conwidth < 512 || !sb_lines)
                return;
 
        if (vid.conwidth < 512 || !sb_lines)
                return;
@@ -986,9 +986,9 @@ void Sbar_MiniDeathmatchOverlay (void)
                        continue;
 
                // draw background
                        continue;
 
                // draw background
-               c = (byte *)&d_8to24table[(s->colors & 0xf0) + 8];
+               c = (qbyte *)&d_8to24table[(s->colors & 0xf0) + 8];
                DrawQ_Fill ( x, y+1, 72, 3, c[0] * (1.0f / 255.0f), c[1] * (1.0f / 255.0f), c[2] * (1.0f / 255.0f), c[3] * (1.0f / 255.0f), 0);
                DrawQ_Fill ( x, y+1, 72, 3, c[0] * (1.0f / 255.0f), c[1] * (1.0f / 255.0f), c[2] * (1.0f / 255.0f), c[3] * (1.0f / 255.0f), 0);
-               c = (byte *)&d_8to24table[((s->colors & 15)<<4) + 8];
+               c = (qbyte *)&d_8to24table[((s->colors & 15)<<4) + 8];
                DrawQ_Fill ( x, y+4, 72, 3, c[0] * (1.0f / 255.0f), c[1] * (1.0f / 255.0f), c[2] * (1.0f / 255.0f), c[3] * (1.0f / 255.0f), 0);
 
                fph = (cl.time - s->entertime) ? (int) ((float) s->frags * 3600.0 / (cl.time - s->entertime)) : 0;
                DrawQ_Fill ( x, y+4, 72, 3, c[0] * (1.0f / 255.0f), c[1] * (1.0f / 255.0f), c[2] * (1.0f / 255.0f), c[3] * (1.0f / 255.0f), 0);
 
                fph = (cl.time - s->entertime) ? (int) ((float) s->frags * 3600.0 / (cl.time - s->entertime)) : 0;
index 175cd41f47a4c62dd30362fc1ef5f234844cfed9..68d6ca176babfbbeb8e627b48145e2984726b1b2 100644 (file)
--- a/server.h
+++ b/server.h
@@ -61,13 +61,13 @@ typedef struct
        server_state_t  state;                  // some actions are only valid during load
 
        sizebuf_t       datagram;
        server_state_t  state;                  // some actions are only valid during load
 
        sizebuf_t       datagram;
-       byte            datagram_buf[MAX_DATAGRAM];
+       qbyte           datagram_buf[MAX_DATAGRAM];
 
        sizebuf_t       reliable_datagram;      // copied to all clients at end of frame
 
        sizebuf_t       reliable_datagram;      // copied to all clients at end of frame
-       byte            reliable_datagram_buf[MAX_DATAGRAM];
+       qbyte           reliable_datagram_buf[MAX_DATAGRAM];
 
        sizebuf_t       signon;
 
        sizebuf_t       signon;
-       byte            signon_buf[32768]; // LordHavoc: increased signon message buffer from 8192 to 32768
+       qbyte           signon_buf[32768]; // LordHavoc: increased signon message buffer from 8192 to 32768
 } server_t;
 
 
 } server_t;
 
 
@@ -95,7 +95,7 @@ typedef struct client_s
 
        sizebuf_t               message;                        // can be added to at any time,
                                                                                // copied and clear once per frame
 
        sizebuf_t               message;                        // can be added to at any time,
                                                                                // copied and clear once per frame
-       byte                    msgbuf[MAX_MSGLEN];
+       qbyte                   msgbuf[MAX_MSGLEN];
        edict_t                 *edict;                         // EDICT_NUM(clientnum+1)
        char                    name[32];                       // for printing to other people
        int                             colors;
        edict_t                 *edict;                         // EDICT_NUM(clientnum+1)
        char                    name[32];                       // for printing to other people
        int                             colors;
index af98487d1f830feac5de23bde3668d64c0ea7ea2..8183e42eee88d5fb2f58fff009ff7f32288a0156 100644 (file)
--- a/snd_mem.c
+++ b/snd_mem.c
@@ -21,14 +21,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
 #include "quakedef.h"
 
 
 #include "quakedef.h"
 
-byte *S_Alloc (int size);
+qbyte *S_Alloc (int size);
 
 /*
 ================
 ResampleSfx
 ================
 */
 
 /*
 ================
 ResampleSfx
 ================
 */
-void ResampleSfx (sfx_t *sfx, int inrate, byte *data, char *name)
+void ResampleSfx (sfx_t *sfx, int inrate, qbyte *data, char *name)
 {
        int             outcount;
        int             srcsample, srclength;
 {
        int             outcount;
        int             srcsample, srclength;
@@ -251,7 +251,7 @@ S_LoadSound
 sfxcache_t *S_LoadSound (sfx_t *s)
 {
     char       namebuffer[256];
 sfxcache_t *S_LoadSound (sfx_t *s)
 {
     char       namebuffer[256];
-       byte    *data;
+       qbyte   *data;
        wavinfo_t       info;
        int             len;
        float   stepscale;
        wavinfo_t       info;
        int             len;
        float   stepscale;
@@ -330,10 +330,10 @@ WAV loading
 */
 
 
 */
 
 
-byte   *data_p;
-byte   *iff_end;
-byte   *last_chunk;
-byte   *iff_data;
+qbyte  *data_p;
+qbyte  *iff_end;
+qbyte  *last_chunk;
+qbyte  *iff_data;
 int    iff_chunk_len;
 
 
 int    iff_chunk_len;
 
 
@@ -413,7 +413,7 @@ void DumpChunks(void)
 GetWavinfo
 ============
 */
 GetWavinfo
 ============
 */
-wavinfo_t GetWavinfo (char *name, byte *wav, int wavlength)
+wavinfo_t GetWavinfo (char *name, qbyte *wav, int wavlength)
 {
        wavinfo_t       info;
        int     i;
 {
        wavinfo_t       info;
        int     i;
diff --git a/sound.h b/sound.h
index 89e56a932cd3108652b7d8d4831253fefb7cacf2..8f34de9a542218f2ebfa0472b2c11f9c2043fb6b 100644 (file)
--- a/sound.h
+++ b/sound.h
@@ -38,7 +38,7 @@ typedef struct
        int     speed;
        int     width;
        int     stereo;
        int     speed;
        int     width;
        int     stereo;
-       byte    data[1];                // variable sized
+       qbyte   data[1];                // variable sized
 } sfxcache_t;
 
 typedef struct sfx_s
 } sfxcache_t;
 
 typedef struct sfx_s
@@ -169,7 +169,7 @@ extern int snd_blocked;
 void S_LocalSound (char *s);
 sfxcache_t *S_LoadSound (sfx_t *s);
 
 void S_LocalSound (char *s);
 sfxcache_t *S_LoadSound (sfx_t *s);
 
-wavinfo_t GetWavinfo (char *name, byte *wav, int wavlength);
+wavinfo_t GetWavinfo (char *name, qbyte *wav, int wavlength);
 
 void SND_InitScaletable (void);
 void SNDDMA_Submit(void);
 
 void SND_InitScaletable (void);
 void SNDDMA_Submit(void);
index 7e4c5e96fb252609ae8b2c2661811cd9afec664f..c54dd55245debb3656ccec7ca0ac3ec49bc20351 100644 (file)
@@ -102,7 +102,7 @@ loc0:
 
                                if (surf->samples)
                                {
 
                                if (surf->samples)
                                {
-                                       byte *lightmap;
+                                       qbyte *lightmap;
                                        int maps, line3, size3, dsfrac = ds & 15, dtfrac = dt & 15, scale = 0, r00 = 0, g00 = 0, b00 = 0, r01 = 0, g01 = 0, b01 = 0, r10 = 0, g10 = 0, b10 = 0, r11 = 0, g11 = 0, b11 = 0;
                                        line3 = ((surf->extents[0]>>4)+1)*3;
                                        size3 = ((surf->extents[0]>>4)+1) * ((surf->extents[1]>>4)+1)*3; // LordHavoc: *3 for colored lighting
                                        int maps, line3, size3, dsfrac = ds & 15, dtfrac = dt & 15, scale = 0, r00 = 0, g00 = 0, b00 = 0, r01 = 0, g01 = 0, b01 = 0, r10 = 0, g10 = 0, b10 = 0, r11 = 0, g11 = 0, b11 = 0;
                                        line3 = ((surf->extents[0]>>4)+1)*3;
                                        size3 = ((surf->extents[0]>>4)+1) * ((surf->extents[1]>>4)+1)*3; // LordHavoc: *3 for colored lighting
index ba3d483b093c26213f2780ee608eba1fc8c13763..a335a7f9f6e171f1673063b93c0520c25dfc6a4e 100644 (file)
--- a/sv_main.c
+++ b/sv_main.c
@@ -409,12 +409,12 @@ crosses a waterline.
 */
 
 int            fatbytes;
 */
 
 int            fatbytes;
-byte   fatpvs[MAX_MAP_LEAFS/8];
+qbyte  fatpvs[MAX_MAP_LEAFS/8];
 
 void SV_AddToFatPVS (vec3_t org, mnode_t *node)
 {
        int             i;
 
 void SV_AddToFatPVS (vec3_t org, mnode_t *node)
 {
        int             i;
-       byte    *pvs;
+       qbyte   *pvs;
        mplane_t        *plane;
        float   d;
 
        mplane_t        *plane;
        float   d;
 
@@ -454,7 +454,7 @@ Calculates a PVS that is the inclusive or of all leafs within 8 pixels of the
 given point.
 =============
 */
 given point.
 =============
 */
-byte *SV_FatPVS (vec3_t org)
+qbyte *SV_FatPVS (vec3_t org)
 {
        fatbytes = (sv.worldmodel->numleafs+31)>>3;
        memset (fatpvs, 0, fatbytes);
 {
        fatbytes = (sv.worldmodel->numleafs+31)>>3;
        memset (fatpvs, 0, fatbytes);
@@ -465,7 +465,7 @@ byte *SV_FatPVS (vec3_t org)
 //=============================================================================
 
 
 //=============================================================================
 
 
-int SV_BoxTouchingPVS (byte *pvs, vec3_t mins, vec3_t maxs, mnode_t *node)
+int SV_BoxTouchingPVS (qbyte *pvs, vec3_t mins, vec3_t maxs, mnode_t *node)
 {
        int leafnum;
 loc0:
 {
        int leafnum;
 loc0:
@@ -510,7 +510,7 @@ void SV_WriteEntitiesToClient (client_t *client, edict_t *clent, sizebuf_t *msg)
 {
        int e, clentnum, bits, alpha, glowcolor, glowsize, scale, effects;
        int culled_pvs, culled_portal, culled_trace, visibleentities, totalentities;
 {
        int e, clentnum, bits, alpha, glowcolor, glowsize, scale, effects;
        int culled_pvs, culled_portal, culled_trace, visibleentities, totalentities;
-       byte *pvs;
+       qbyte *pvs;
        vec3_t org, origin, angles, entmins, entmaxs;
        float nextfullupdate;
        edict_t *ent;
        vec3_t org, origin, angles, entmins, entmaxs;
        float nextfullupdate;
        edict_t *ent;
@@ -787,8 +787,8 @@ void SV_WriteEntitiesToClient (client_t *client, edict_t *clent, sizebuf_t *msg)
                if (((int)(angles[0]*(256.0/360.0)) & 255) != ((int)(baseline->angles[0]*(256.0/360.0)) & 255)) bits |= U_ANGLE1;
                if (((int)(angles[1]*(256.0/360.0)) & 255) != ((int)(baseline->angles[1]*(256.0/360.0)) & 255)) bits |= U_ANGLE2;
                if (((int)(angles[2]*(256.0/360.0)) & 255) != ((int)(baseline->angles[2]*(256.0/360.0)) & 255)) bits |= U_ANGLE3;
                if (((int)(angles[0]*(256.0/360.0)) & 255) != ((int)(baseline->angles[0]*(256.0/360.0)) & 255)) bits |= U_ANGLE1;
                if (((int)(angles[1]*(256.0/360.0)) & 255) != ((int)(baseline->angles[1]*(256.0/360.0)) & 255)) bits |= U_ANGLE2;
                if (((int)(angles[2]*(256.0/360.0)) & 255) != ((int)(baseline->angles[2]*(256.0/360.0)) & 255)) bits |= U_ANGLE3;
-               if (baseline->colormap != (byte) ent->v.colormap)                                                               bits |= U_COLORMAP;
-               if (baseline->skin != (byte) ent->v.skin)                                                                               bits |= U_SKIN;
+               if (baseline->colormap != (qbyte) ent->v.colormap)                                                              bits |= U_COLORMAP;
+               if (baseline->skin != (qbyte) ent->v.skin)                                                                              bits |= U_SKIN;
                if ((baseline->frame & 0x00FF) != ((int) ent->v.frame & 0x00FF))                                bits |= U_FRAME;
                if ((baseline->effects & 0x00FF) != ((int) ent->v.effects & 0x00FF))                    bits |= U_EFFECTS;
                if ((baseline->modelindex & 0x00FF) != ((int) ent->v.modelindex & 0x00FF))              bits |= U_MODEL;
                if ((baseline->frame & 0x00FF) != ((int) ent->v.frame & 0x00FF))                                bits |= U_FRAME;
                if ((baseline->effects & 0x00FF) != ((int) ent->v.effects & 0x00FF))                    bits |= U_EFFECTS;
                if ((baseline->modelindex & 0x00FF) != ((int) ent->v.modelindex & 0x00FF))              bits |= U_MODEL;
@@ -868,7 +868,7 @@ void SV_WriteEntitiesToClient (client_t *client, edict_t *clent, sizebuf_t *msg)
 {
        int e, clentnum, flags, alpha, glowcolor, glowsize, scale, effects;
        int culled_pvs, culled_portal, culled_trace, visibleentities, totalentities;
 {
        int e, clentnum, flags, alpha, glowcolor, glowsize, scale, effects;
        int culled_pvs, culled_portal, culled_trace, visibleentities, totalentities;
-       byte *pvs;
+       qbyte *pvs;
        vec3_t org, origin, angles, entmins, entmaxs;
        edict_t *ent;
        eval_t *val;
        vec3_t org, origin, angles, entmins, entmaxs;
        edict_t *ent;
        eval_t *val;
@@ -1147,7 +1147,7 @@ void SV_WriteClientdataToMessage (edict_t *ent, sizebuf_t *msg)
        int             items;
        eval_t  *val;
        vec3_t  punchvector;
        int             items;
        eval_t  *val;
        vec3_t  punchvector;
-       byte    viewzoom;
+       qbyte   viewzoom;
 
 //
 // send a damage message
 
 //
 // send a damage message
@@ -1317,7 +1317,7 @@ SV_SendClientDatagram
 */
 qboolean SV_SendClientDatagram (client_t *client)
 {
 */
 qboolean SV_SendClientDatagram (client_t *client)
 {
-       byte            buf[MAX_DATAGRAM];
+       qbyte           buf[MAX_DATAGRAM];
        sizebuf_t       msg;
 
        msg.data = buf;
        sizebuf_t       msg;
 
        msg.data = buf;
@@ -1399,7 +1399,7 @@ message buffer
 void SV_SendNop (client_t *client)
 {
        sizebuf_t       msg;
 void SV_SendNop (client_t *client)
 {
        sizebuf_t       msg;
-       byte            buf[4];
+       qbyte           buf[4];
 
        msg.data = buf;
        msg.maxsize = sizeof(buf);
 
        msg.data = buf;
        msg.maxsize = sizeof(buf);
index bbf95e6be3c2fa68fa7a9ef736271eda635829e7..10226f3a577659386859f2b1e8d380915e468fd8 100644 (file)
--- a/sys_win.c
+++ b/sys_win.c
@@ -39,7 +39,7 @@ qboolean      ActiveApp, Minimized;
 static qboolean                sc_return_on_enter = false;
 HANDLE                         hinput, houtput;
 
 static qboolean                sc_return_on_enter = false;
 HANDLE                         hinput, houtput;
 
-static char                    *tracking_tag = "Clams & Mooses";
+//static char                  *tracking_tag = "Clams & Mooses";
 
 static HANDLE  tevent;
 static HANDLE  hFile;
 
 static HANDLE  tevent;
 static HANDLE  hFile;
@@ -71,10 +71,10 @@ int         findhandle (void)
 
 /*
 ================
 
 /*
 ================
-filelength
+Sys_FileLength
 ================
 */
 ================
 */
-int filelength (QFile *f)
+int Sys_FileLength (QFile *f)
 {
        int             pos;
        int             end;
 {
        int             pos;
        int             end;
@@ -105,7 +105,7 @@ int Sys_FileOpenRead (char *path, int *hndl)
        {
                sys_handles[i] = f;
                *hndl = i;
        {
                sys_handles[i] = f;
                *hndl = i;
-               retval = filelength(f);
+               retval = Sys_FileLength(f);
        }
 
        return retval;
        }
 
        return retval;
@@ -368,11 +368,11 @@ double Sys_DoubleTime (void)
 
 char *Sys_ConsoleInput (void)
 {
 
 char *Sys_ConsoleInput (void)
 {
-       static char     text[256];
-       static int              len;
-       INPUT_RECORD    recs[1024];
-       int             dummy;
-       int             ch, numread, numevents;
+       static char text[256];
+       static int len;
+       INPUT_RECORD recs[1024];
+       int ch;
+       DWORD numread, numevents, dummy;
 
        if (cls.state != ca_dedicated)
                return NULL;
 
        if (cls.state != ca_dedicated)
                return NULL;
diff --git a/ui.c b/ui.c
index e00fd7d60f3ef3268b738f861895a9ab5a04e8e1..6a41d9b8a909a442075cb25acce9f678c918c25d 100644 (file)
--- a/ui.c
+++ b/ui.c
@@ -233,7 +233,7 @@ int ui_isactive(void)
 }
 
 #define UI_QUEUE_SIZE 256
 }
 
 #define UI_QUEUE_SIZE 256
-static byte ui_keyqueue[UI_QUEUE_SIZE];
+static qbyte ui_keyqueue[UI_QUEUE_SIZE];
 static int ui_keyqueuepos = 0;
 
 void ui_leftkeyupdate(int pressed)
 static int ui_keyqueuepos = 0;
 
 void ui_leftkeyupdate(int pressed)
index 88a617f59555854182f27f2e38bc35b97d8e507e..813a9d55094d224d08f317981cb2da86299f6f18 100644 (file)
@@ -65,7 +65,7 @@ const char *gl_version;
 const char *gl_extensions;
 
 /*-----------------------------------------------------------------------*/
 const char *gl_extensions;
 
 /*-----------------------------------------------------------------------*/
-void D_BeginDirectRect (int x, int y, byte *pbitmap, int width, int height)
+void D_BeginDirectRect (int x, int y, qbyte *pbitmap, int width, int height)
 {
 }
 
 {
 }
 
index e7ce03c51fc235c7abd20fc1fbd2ee25151d5f14..79451a54ec33ad94b3e54f713ab37a5d6cd4aa53 100644 (file)
@@ -64,7 +64,9 @@ static gl_extensionfunctionlist_t compiledvertexarrayfuncs[] =
 #include <dlfcn.h>
 #endif
 
 #include <dlfcn.h>
 #endif
 
+#ifndef WIN32
 static void *prjobj = NULL;
 static void *prjobj = NULL;
+#endif
 
 static void gl_getfuncs_begin(void)
 {
 
 static void gl_getfuncs_begin(void)
 {
index 9ce018a8146810931427c880e05c8e428d01fa5b..e6f3133f0a8e9f278b9799447352c2f93f45f6d6 100644 (file)
--- a/vid_wgl.c
+++ b/vid_wgl.c
@@ -66,7 +66,7 @@ qboolean              scr_skipupdate;
 
 static vmode_t modelist[MAX_MODE_LIST];
 static int             nummodes;
 
 static vmode_t modelist[MAX_MODE_LIST];
 static int             nummodes;
-static vmode_t *pcurrentmode;
+//static vmode_t       *pcurrentmode;
 static vmode_t badmode;
 
 static DEVMODE gdevmode;
 static vmode_t badmode;
 
 static DEVMODE gdevmode;
@@ -252,7 +252,7 @@ qboolean VID_SetFullDIBMode (int modenum)
 int VID_SetMode (int modenum)
 {
        int                             original_mode, temp;
 int VID_SetMode (int modenum)
 {
        int                             original_mode, temp;
-       qboolean                stat;
+       qboolean                stat = 0;
     MSG                                msg;
 
        if ((windowed && (modenum != 0)) || (!windowed && (modenum < 1)) || (!windowed && (modenum >= nummodes)))
     MSG                                msg;
 
        if ((windowed && (modenum != 0)) || (!windowed && (modenum < 1)) || (!windowed && (modenum >= nummodes)))
@@ -503,7 +503,7 @@ BOOL bSetupPixelFormat(HDC hDC)
 
 
 
 
 
 
-byte scantokey[128] =
+qbyte scantokey[128] =
 {
 //     0           1      2     3     4     5       6       7      8         9      A       B           C     D            E           F
        0          ,27    ,'1'  ,'2'  ,'3'  ,'4'    ,'5'    ,'6'   ,'7'      ,'8'   ,'9'    ,'0'        ,'-'  ,'='         ,K_BACKSPACE,9     , // 0
 {
 //     0           1      2     3     4     5       6       7      8         9      A       B           C     D            E           F
        0          ,27    ,'1'  ,'2'  ,'3'  ,'4'    ,'5'    ,'6'   ,'7'      ,'8'   ,'9'    ,'0'        ,'-'  ,'='         ,K_BACKSPACE,9     , // 0
@@ -517,7 +517,7 @@ byte scantokey[128] =
 };
 
 /*
 };
 
 /*
-byte shiftscantokey[128] =
+qbyte shiftscantokey[128] =
 { 
 //     0           1      2     3     4     5       6       7      8         9      A       B           C    D            E           F 
        0          ,27    ,'!'  ,'@'  ,'#'  ,'$'    ,'%'    ,'^'   ,'&'      ,'*'   ,'('    ,')'        ,'_' ,'+'         ,K_BACKSPACE,9    , // 0
 { 
 //     0           1      2     3     4     5       6       7      8         9      A       B           C    D            E           F 
        0          ,27    ,'!'  ,'@'  ,'#'  ,'$'    ,'%'    ,'^'   ,'&'      ,'*'   ,'('    ,')'        ,'_' ,'+'         ,K_BACKSPACE,9    , // 0
@@ -1178,7 +1178,7 @@ void VID_InitFullDIB (HINSTANCE hInstance)
                Con_SafePrintf ("No fullscreen DIB modes found\n");
 }
 
                Con_SafePrintf ("No fullscreen DIB modes found\n");
 }
 
-static int grabsysgamma = true;
+//static int grabsysgamma = true;
 WORD systemgammaramps[3][256], currentgammaramps[3][256];
 
 int VID_SetGamma(float prescale, float gamma, float scale, float base)
 WORD systemgammaramps[3][256], currentgammaramps[3][256];
 
 int VID_SetGamma(float prescale, float gamma, float scale, float base)
@@ -1231,7 +1231,7 @@ void      VID_Init (void)
 {
        int             i;
 //     int             existingmode;
 {
        int             i;
 //     int             existingmode;
-       int             basenummodes, width, height, bpp, findbpp, done;
+       int             basenummodes, width, height = 0, bpp, findbpp, done;
        HDC             hdc;
        DEVMODE devmode;
 
        HDC             hdc;
        DEVMODE devmode;
 
@@ -1457,7 +1457,7 @@ extern void M_PrintWhite (int cx, int cy, char *str);
 extern void M_DrawCharacter (int cx, int line, int num);
 extern void M_DrawPic (int x, int y, char *picname);
 
 extern void M_DrawCharacter (int cx, int line, int num);
 extern void M_DrawPic (int x, int y, char *picname);
 
-static int     vid_line, vid_wmodes;
+static int     vid_wmodes;
 
 typedef struct
 {
 
 typedef struct
 {
diff --git a/wad.c b/wad.c
index 5eba9d350e66b57da2b9533357fd8869e77a14ed..4414197f2fcb5831599b02f73d76602601b79105 100644 (file)
--- a/wad.c
+++ b/wad.c
@@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
 static int                     wad_numlumps;
 static lumpinfo_t      *wad_lumps;
 
 static int                     wad_numlumps;
 static lumpinfo_t      *wad_lumps;
-static byte                    *wad_base = NULL;
+static qbyte                   *wad_base = NULL;
 static mempool_t       *wad_mempool = NULL;
 
 void SwapPic (qpic_t *pic);
 static mempool_t       *wad_mempool = NULL;
 
 void SwapPic (qpic_t *pic);
@@ -212,7 +212,7 @@ void W_LoadTextureWadFile (char *filename, int complain)
 }
 
 /*
 }
 
 /*
-byte hlpalette[768] =
+qbyte hlpalette[768] =
 {
        0x00,0x00,0x00,0x0F,0x0F,0x0F,0x1F,0x1F,0x1F,0x2F,0x2F,0x2F,0x3F,0x3F,0x3F,0x4B,
        0x4B,0x4B,0x5B,0x5B,0x5B,0x6B,0x6B,0x6B,0x7B,0x7B,0x7B,0x8B,0x8B,0x8B,0x9B,0x9B,
 {
        0x00,0x00,0x00,0x0F,0x0F,0x0F,0x1F,0x1F,0x1F,0x2F,0x2F,0x2F,0x3F,0x3F,0x3F,0x4B,
        0x4B,0x4B,0x5B,0x5B,0x5B,0x6B,0x6B,0x6B,0x7B,0x7B,0x7B,0x8B,0x8B,0x8B,0x9B,0x9B,
@@ -265,12 +265,12 @@ byte hlpalette[768] =
 };
 */
 
 };
 */
 
-byte *W_ConvertWAD3Texture(miptex_t *tex)
+qbyte *W_ConvertWAD3Texture(miptex_t *tex)
 {
 {
-       byte *in, *data, *out, *pal;
+       qbyte *in, *data, *out, *pal;
 //     int palsize;
        int d, p;
 //     int palsize;
        int d, p;
-       in = (byte *)((int) tex + tex->offsets[0]);
+       in = (qbyte *)((int) tex + tex->offsets[0]);
        data = out = Mem_Alloc(tempmempool, tex->width * tex->height * 4);
        if (!data)
                return NULL;
        data = out = Mem_Alloc(tempmempool, tex->width * tex->height * 4);
        if (!data)
                return NULL;
@@ -299,16 +299,16 @@ byte *W_ConvertWAD3Texture(miptex_t *tex)
        return data;
 }
 
        return data;
 }
 
-byte *W_GetTexture(char *name)
+qbyte *W_GetTexture(char *name)
 {
 //     int i, c, datasize;
 //     short colorcount;
 {
 //     int i, c, datasize;
 //     short colorcount;
-//     byte pal[256][3], *indata, *outdata, *data;
+//     qbyte pal[256][3], *indata, *outdata, *data;
        char texname[17];
        int i, j;
        QFile *file;
        miptex_t *tex;
        char texname[17];
        int i, j;
        QFile *file;
        miptex_t *tex;
-       byte *data;
+       qbyte *data;
        texname[16] = 0;
        W_CleanupName (name, texname);
        for (i = 0;i < TEXWAD_MAXIMAGES;i++)
        texname[16] = 0;
        W_CleanupName (name, texname);
        for (i = 0;i < TEXWAD_MAXIMAGES;i++)
diff --git a/wad.h b/wad.h
index 6a20203e659f43a8e53a612d8893351cae866c37..ac8199bf530bda1e371d300dc9a127ef78eacd0b 100644 (file)
--- a/wad.h
+++ b/wad.h
@@ -39,7 +39,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 typedef struct
 {
        int                     width, height;
 typedef struct
 {
        int                     width, height;
-       byte            data[4];                        // variably sized
+       qbyte           data[4];                        // variably sized
 } qpic_t;
 
 
 } qpic_t;
 
 
@@ -64,7 +64,7 @@ typedef struct
 
 extern int                     wad_numlumps;
 extern lumpinfo_t      *wad_lumps;
 
 extern int                     wad_numlumps;
 extern lumpinfo_t      *wad_lumps;
-extern byte            *wad_base;
+extern qbyte           *wad_base;
 
 void   W_LoadWadFile (char *filename);
 void   *W_GetLumpName (char *name);
 
 void   W_LoadWadFile (char *filename);
 void   *W_GetLumpName (char *name);
@@ -74,5 +74,5 @@ void SwapPic (qpic_t *pic);
 // LordHavoc: added alternate texture WAD2/WAD3 system for easier loading of HalfLife texture wads
 extern int image_width, image_height;
 void   W_LoadTextureWadFile (char *filename, int complain);
 // LordHavoc: added alternate texture WAD2/WAD3 system for easier loading of HalfLife texture wads
 extern int image_width, image_height;
 void   W_LoadTextureWadFile (char *filename, int complain);
-byte   *W_GetTexture (char *name); // returns tempmempool allocated image data, width and height are in image_width and image_height
-byte   *W_ConvertWAD3Texture(miptex_t *tex); // returns tempmempool allocated image data, width and height are in image_width and image_height
+qbyte  *W_GetTexture (char *name); // returns tempmempool allocated image data, width and height are in image_width and image_height
+qbyte  *W_ConvertWAD3Texture(miptex_t *tex); // returns tempmempool allocated image data, width and height are in image_width and image_height
index 850958b24bf45661ca0a415d99301bdb835a8e11..6849014ea993cca265fe3895ba165ea5627c0511 100644 (file)
@@ -22,13 +22,16 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 #pragma warning( disable : 4229 )  // mgraph gets this
 
 #include <windows.h>
 #pragma warning( disable : 4229 )  // mgraph gets this
 
 #include <windows.h>
-#define WM_MOUSEWHEEL                   0x020A
 
 #ifndef SERVERONLY
 #include <ddraw.h>
 #include <dsound.h>
 #endif
 
 
 #ifndef SERVERONLY
 #include <ddraw.h>
 #include <dsound.h>
 #endif
 
+#ifndef WM_MOUSEWHEEL
+#define WM_MOUSEWHEEL                   0x020A
+#endif
+
 extern HINSTANCE       global_hInstance;
 extern int                     global_nCmdShow;
 
 extern HINSTANCE       global_hInstance;
 extern int                     global_nCmdShow;
 
diff --git a/world.c b/world.c
index 54f59ecce4aca0ee098522e5ef6e5a996094e02d..764023a279812ffac6875f7a21d44aab39bc2602 100644 (file)
--- a/world.c
+++ b/world.c
@@ -45,9 +45,9 @@ void InsertLinkAfter (link_t *l, link_t *after);
 // (type *)STRUCT_FROM_LINK(link_t *link, type, member)
 // ent = STRUCT_FROM_LINK(link,entity_t,order)
 // FIXME: remove this mess!
 // (type *)STRUCT_FROM_LINK(link_t *link, type, member)
 // ent = STRUCT_FROM_LINK(link,entity_t,order)
 // FIXME: remove this mess!
-//#define      STRUCT_FROM_LINK(l,t,m) ((t *)((byte *)l - (int)&(((t *)0)->m)))
+//#define      STRUCT_FROM_LINK(l,t,m) ((t *)((qbyte *)l - (int)&(((t *)0)->m)))
 
 
-#define        EDICT_FROM_AREA(l) ((edict_t *)((byte *)l - (int)&(((edict_t *)0)->area)))
+#define        EDICT_FROM_AREA(l) ((edict_t *)((qbyte *)l - (int)&(((edict_t *)0)->area)))
 
 //============================================================================
 
 
 //============================================================================
 
diff --git a/zone.h b/zone.h
index 79b81e5f94744e7c50c4172276ced8cbd44001ec..0b77463a76d44f205e608dc9939579a9f8a5bb8a 100644 (file)
--- a/zone.h
+++ b/zone.h
@@ -53,7 +53,7 @@ memheader_t;
 typedef struct memclump_s
 {
        // contents of the clump
 typedef struct memclump_s
 {
        // contents of the clump
-       byte block[MEMCLUMPSIZE];
+       qbyte block[MEMCLUMPSIZE];
        // should always be MEMCLUMP_SENTINEL
        int sentinel1;
        // if a bit is on, it means that the MEMUNIT bytes it represents are
        // should always be MEMCLUMP_SENTINEL
        int sentinel1;
        // if a bit is on, it means that the MEMUNIT bytes it represents are