mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2025-02-02 14:01:26 +00:00
"W007: '&array' may not produce intended result" Watcom warning fixes.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1504 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
parent
3cefb58d5d
commit
daf5ebec2f
3 changed files with 12 additions and 12 deletions
|
@ -376,8 +376,9 @@ void Draw_NewGame (void)
|
|||
int i;
|
||||
|
||||
// empty scrap and reallocate gltextures
|
||||
memset(&scrap_allocated, 0, sizeof(scrap_allocated));
|
||||
memset(&scrap_texels, 255, sizeof(scrap_texels));
|
||||
memset(scrap_allocated, 0, sizeof(scrap_allocated));
|
||||
memset(scrap_texels, 255, sizeof(scrap_texels));
|
||||
|
||||
Scrap_Upload (); //creates 2 empty gltextures
|
||||
|
||||
// reload wad pics
|
||||
|
@ -402,8 +403,9 @@ void Draw_Init (void)
|
|||
Cvar_RegisterVariable (&scr_conalpha);
|
||||
|
||||
// clear scrap and allocate gltextures
|
||||
memset(&scrap_allocated, 0, sizeof(scrap_allocated));
|
||||
memset(&scrap_texels, 255, sizeof(scrap_texels));
|
||||
memset(scrap_allocated, 0, sizeof(scrap_allocated));
|
||||
memset(scrap_texels, 255, sizeof(scrap_texels));
|
||||
|
||||
Scrap_Upload (); //creates 2 empty textures
|
||||
|
||||
// create internal pics
|
||||
|
@ -687,7 +689,7 @@ void GL_SetCanvas (canvastype newcanvas)
|
|||
currentcanvas = newcanvas;
|
||||
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
glLoadIdentity ();
|
||||
glLoadIdentity ();
|
||||
|
||||
switch(newcanvas)
|
||||
{
|
||||
|
@ -749,7 +751,7 @@ void GL_SetCanvas (canvastype newcanvas)
|
|||
}
|
||||
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
glLoadIdentity ();
|
||||
glLoadIdentity ();
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -156,7 +156,7 @@ qboolean Image_WriteTGA (const char *name, byte *data, int width, int height, in
|
|||
if (handle == -1)
|
||||
return false;
|
||||
|
||||
Q_memset (&header, 0, TARGAHEADERSIZE);
|
||||
Q_memset (header, 0, TARGAHEADERSIZE);
|
||||
header[2] = 2; // uncompressed type
|
||||
header[12] = width&255;
|
||||
header[13] = width>>8;
|
||||
|
@ -176,7 +176,7 @@ qboolean Image_WriteTGA (const char *name, byte *data, int width, int height, in
|
|||
data[i+2] = temp;
|
||||
}
|
||||
|
||||
Sys_FileWrite (handle, &header, TARGAHEADERSIZE);
|
||||
Sys_FileWrite (handle, header, TARGAHEADERSIZE);
|
||||
Sys_FileWrite (handle, data, size);
|
||||
Sys_FileClose (handle);
|
||||
|
||||
|
|
|
@ -96,8 +96,7 @@ model and pose.
|
|||
*/
|
||||
static void *GLARB_GetXYZOffset (aliashdr_t *hdr, int pose)
|
||||
{
|
||||
meshxyz_t dummy;
|
||||
int xyzoffs = ((char*)&dummy.xyz - (char*)&dummy);
|
||||
const int xyzoffs = offsetof (meshxyz_t, xyz);
|
||||
return (void *) (currententity->model->vboxyzofs + (hdr->numverts_vbo * pose * sizeof (meshxyz_t)) + xyzoffs);
|
||||
}
|
||||
|
||||
|
@ -111,8 +110,7 @@ given model and pose.
|
|||
*/
|
||||
static void *GLARB_GetNormalOffset (aliashdr_t *hdr, int pose)
|
||||
{
|
||||
meshxyz_t dummy;
|
||||
int normaloffs = ((char*)&dummy.normal - (char*)&dummy);
|
||||
const int normaloffs = offsetof (meshxyz_t, normal);
|
||||
return (void *)(currententity->model->vboxyzofs + (hdr->numverts_vbo * pose * sizeof (meshxyz_t)) + normaloffs);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue