mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2025-02-18 10:02:12 +00:00
Use INT_MIN instead -999999
This commit is contained in:
parent
c80820500b
commit
b7cac7f8aa
1 changed files with 13 additions and 12 deletions
|
@ -21,6 +21,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
// texture (used for Alias models)
|
// texture (used for Alias models)
|
||||||
|
|
||||||
#include "header/local.h"
|
#include "header/local.h"
|
||||||
|
#include <limits.h>
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int isflattop;
|
int isflattop;
|
||||||
|
@ -453,7 +454,7 @@ R_PolysetDrawSpans8_33(const entity_t *currententity, spanpackage_t *pspanpackag
|
||||||
errorterm -= erroradjustdown;
|
errorterm -= erroradjustdown;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (lcount)
|
if (lcount > 0)
|
||||||
{
|
{
|
||||||
int pos_shift = (pspanpackage->v * vid.width) + pspanpackage->u;
|
int pos_shift = (pspanpackage->v * vid.width) + pspanpackage->u;
|
||||||
|
|
||||||
|
@ -491,7 +492,7 @@ R_PolysetDrawSpans8_33(const entity_t *currententity, spanpackage_t *pspanpackag
|
||||||
}
|
}
|
||||||
|
|
||||||
pspanpackage++;
|
pspanpackage++;
|
||||||
} while (pspanpackage->count != -999999);
|
} while ((pspanpackage < triangles_max) && (pspanpackage->count != INT_MIN));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -517,7 +518,7 @@ R_PolysetDrawSpansConstant8_33(const entity_t *currententity, spanpackage_t *psp
|
||||||
errorterm -= erroradjustdown;
|
errorterm -= erroradjustdown;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (lcount)
|
if (lcount > 0)
|
||||||
{
|
{
|
||||||
int pos_shift = (pspanpackage->v * vid.width) + pspanpackage->u;
|
int pos_shift = (pspanpackage->v * vid.width) + pspanpackage->u;
|
||||||
|
|
||||||
|
@ -538,7 +539,7 @@ R_PolysetDrawSpansConstant8_33(const entity_t *currententity, spanpackage_t *psp
|
||||||
}
|
}
|
||||||
|
|
||||||
pspanpackage++;
|
pspanpackage++;
|
||||||
} while (pspanpackage->count != -999999);
|
} while ((pspanpackage < triangles_max) && (pspanpackage->count != INT_MIN));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -567,7 +568,7 @@ R_PolysetDrawSpans8_66(const entity_t *currententity, spanpackage_t *pspanpackag
|
||||||
errorterm -= erroradjustdown;
|
errorterm -= erroradjustdown;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (lcount)
|
if (lcount > 0)
|
||||||
{
|
{
|
||||||
int pos_shift = (pspanpackage->v * vid.width) + pspanpackage->u;
|
int pos_shift = (pspanpackage->v * vid.width) + pspanpackage->u;
|
||||||
|
|
||||||
|
@ -606,7 +607,7 @@ R_PolysetDrawSpans8_66(const entity_t *currententity, spanpackage_t *pspanpackag
|
||||||
}
|
}
|
||||||
|
|
||||||
pspanpackage++;
|
pspanpackage++;
|
||||||
} while (pspanpackage->count != -999999);
|
} while ((pspanpackage < triangles_max) && (pspanpackage->count != INT_MIN));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -632,7 +633,7 @@ R_PolysetDrawSpansConstant8_66(const entity_t *currententity, spanpackage_t *psp
|
||||||
errorterm -= erroradjustdown;
|
errorterm -= erroradjustdown;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (lcount)
|
if (lcount > 0)
|
||||||
{
|
{
|
||||||
int pos_shift = (pspanpackage->v * vid.width) + pspanpackage->u;
|
int pos_shift = (pspanpackage->v * vid.width) + pspanpackage->u;
|
||||||
|
|
||||||
|
@ -653,7 +654,7 @@ R_PolysetDrawSpansConstant8_66(const entity_t *currententity, spanpackage_t *psp
|
||||||
}
|
}
|
||||||
|
|
||||||
pspanpackage++;
|
pspanpackage++;
|
||||||
} while (pspanpackage->count != -999999);
|
} while ((pspanpackage < triangles_max) && (pspanpackage->count != INT_MIN));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -674,7 +675,7 @@ R_PolysetDrawSpans8_Opaque (const entity_t *currententity, spanpackage_t *pspanp
|
||||||
errorterm -= erroradjustdown;
|
errorterm -= erroradjustdown;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (lcount)
|
if (lcount > 0)
|
||||||
{
|
{
|
||||||
int lsfrac, ltfrac;
|
int lsfrac, ltfrac;
|
||||||
pixel_t *lpdest;
|
pixel_t *lpdest;
|
||||||
|
@ -724,7 +725,7 @@ R_PolysetDrawSpans8_Opaque (const entity_t *currententity, spanpackage_t *pspanp
|
||||||
}
|
}
|
||||||
|
|
||||||
pspanpackage++;
|
pspanpackage++;
|
||||||
} while (pspanpackage->count != -999999);
|
} while ((pspanpackage < triangles_max) && (pspanpackage->count != INT_MIN));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -894,7 +895,7 @@ R_RasterizeAliasPolySmooth(const entity_t *currententity)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
originalcount = triangle_spans[initialrightheight].count;
|
originalcount = triangle_spans[initialrightheight].count;
|
||||||
triangle_spans[initialrightheight].count = -999999; // mark end of the spanpackages
|
triangle_spans[initialrightheight].count = INT_MIN; // mark end of the spanpackages
|
||||||
(*d_pdrawspans) (currententity, triangle_spans);
|
(*d_pdrawspans) (currententity, triangle_spans);
|
||||||
|
|
||||||
// scan out the bottom part of the right edge, if it exists
|
// scan out the bottom part of the right edge, if it exists
|
||||||
|
@ -922,7 +923,7 @@ R_RasterizeAliasPolySmooth(const entity_t *currententity)
|
||||||
r_outoftriangles++;
|
r_outoftriangles++;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
triangle_spans[initialrightheight + height].count = -999999; // mark end of the spanpackages
|
triangle_spans[initialrightheight + height].count = INT_MIN; // mark end of the spanpackages
|
||||||
(*d_pdrawspans) (currententity, pstart);
|
(*d_pdrawspans) (currententity, pstart);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue