mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-22 12:41:21 +00:00
Rename min\max to avoid conflict with c-plus plus
While trying to compile the yquake2 rebased heretic2 source from 0lvin, a name conflict with min\max of different parameter counts included by a std::cpp library occurred.
This commit is contained in:
parent
4967b9d0ca
commit
9ac19de4ac
4 changed files with 7 additions and 11 deletions
|
@ -116,7 +116,7 @@ GL3_TextureMode(char *string)
|
|||
/* Set anisotropic filter if supported and enabled */
|
||||
if (gl3config.anisotropic && gl_anisotropic->value)
|
||||
{
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, max(gl_anisotropic->value, 1.f));
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, Q_max(gl_anisotropic->value, 1.f));
|
||||
}
|
||||
}
|
||||
else /* texture has no mipmaps */
|
||||
|
@ -227,7 +227,7 @@ GL3_Upload32(unsigned *data, int width, int height, qboolean mipmap)
|
|||
|
||||
if (mipmap && gl3config.anisotropic && gl_anisotropic->value)
|
||||
{
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, max(gl_anisotropic->value, 1.f));
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, Q_max(gl_anisotropic->value, 1.f));
|
||||
}
|
||||
|
||||
return res;
|
||||
|
|
|
@ -235,7 +235,7 @@ RE_Draw_StretchPicImplementation (int x, int y, int w, int h, const image_t *pic
|
|||
if (picupscale > 1)
|
||||
{
|
||||
int i;
|
||||
int pu = min(height-v, picupscale);
|
||||
int pu = Q_min(height-v, picupscale);
|
||||
pixel_t *dest_orig = dest;
|
||||
|
||||
// copy first line to fill whole sector
|
||||
|
|
|
@ -53,8 +53,8 @@ R_DrawSprite(entity_t *currententity, const model_t *currentmodel)
|
|||
}
|
||||
|
||||
r_polydesc.pixels = skin->pixels[0];
|
||||
r_polydesc.pixel_width = min(s_psprframe->width, skin->width);
|
||||
r_polydesc.pixel_height = min(s_psprframe->height, skin->height);
|
||||
r_polydesc.pixel_width = Q_min(s_psprframe->width, skin->width);
|
||||
r_polydesc.pixel_height = Q_min(s_psprframe->height, skin->height);
|
||||
r_polydesc.dist = 0;
|
||||
|
||||
// generate the sprite's axes, completely parallel to the viewplane.
|
||||
|
|
|
@ -124,12 +124,8 @@ typedef unsigned char byte;
|
|||
#define YAW 1 /* left / right */
|
||||
#define ROLL 2 /* fall over */
|
||||
|
||||
#ifndef min
|
||||
#define min(a, b) (((a) < (b)) ? (a) : (b))
|
||||
#endif
|
||||
#ifndef max
|
||||
#define max(a, b) (((a) > (b)) ? (a) : (b))
|
||||
#endif
|
||||
#define Q_min(a, b) (((a) < (b)) ? (a) : (b))
|
||||
#define Q_max(a, b) (((a) > (b)) ? (a) : (b))
|
||||
|
||||
#define MAX_STRING_CHARS 2048 /* max length of a string passed to Cmd_TokenizeString */
|
||||
#define MAX_STRING_TOKENS 80 /* max tokens resulting from Cmd_TokenizeString */
|
||||
|
|
Loading…
Reference in a new issue