fuckit *unshortens your patch dimensions*
This commit is contained in:
1 parent
7256fb9d62
commit
fe1579e960
17 files changed
+153
-160
No files matched your search
+7
-7
@@ -621,11 +621,11 @@ static void CON_MoveConsole(void)
|
||||
con_curlines -= FixedInt(fracmovement);
|
||||
if (con_curlines < con_destlines)
|
||||
con_curlines = con_destlines;
|
||||
|
||||
|
||||
if (con_destlines == 0) // If the console is being closed, not just moved up...
|
||||
con_tick = 0; // ...don't show the blinking cursor
|
||||
}
|
||||
|
||||
|
||||
fracmovement %= FRACUNIT; // Reset fracmovement's integer value, but keep the fraction
|
||||
|
||||
Unlock_state();
|
||||
@@ -635,7 +635,7 @@ INT32 CON_ShiftChar(INT32 ch)
|
||||
{
|
||||
if (I_UseNativeKeyboard())
|
||||
return ch;
|
||||
|
||||
|
||||
if ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z'))
|
||||
{
|
||||
if (cv_keyboardlayout.value == 3)
|
||||
@@ -1244,7 +1244,7 @@ void CONS_Printf(const char *fmt, ...)
|
||||
|
||||
if (con_started)
|
||||
CON_Print(txt);
|
||||
|
||||
|
||||
CON_LogMessage(txt);
|
||||
|
||||
Lock_state();
|
||||
@@ -1474,7 +1474,7 @@ static void CON_DrawHudlines(void)
|
||||
;//charwidth = 4 * con_scalefactor;
|
||||
else
|
||||
{
|
||||
//charwidth = SHORT(hu_font['A'-HU_FONTSTART]->width) * con_scalefactor;
|
||||
//charwidth = hu_font['A'-HU_FONTSTART]->width * con_scalefactor;
|
||||
V_DrawCharacter(x, y, (INT32)(*p) | charflags | cv_constextsize.value | V_NOSCALESTART, !cv_allcaps.value);
|
||||
}
|
||||
}
|
||||
@@ -1577,11 +1577,11 @@ void CON_Drawer(void)
|
||||
if (con_recalc)
|
||||
{
|
||||
CON_RecalcSize();
|
||||
|
||||
|
||||
if (con_curlines <= 0)
|
||||
CON_ClearHUD();
|
||||
}
|
||||
|
||||
|
||||
// console movement
|
||||
if (con_curlines != con_destlines)
|
||||
CON_MoveConsole();
|
||||
|
||||
+1
-1
@@ -604,7 +604,7 @@ static boolean D_Display(void)
|
||||
else
|
||||
py = viewwindowy + 4;
|
||||
patch = W_CachePatchName("M_PAUSE", PU_CACHE);
|
||||
V_DrawScaledPatch(viewwindowx + (BASEVIDWIDTH - SHORT(patch->width))/2, py, V_SNAPTOTOP, patch);
|
||||
V_DrawScaledPatch(viewwindowx + (BASEVIDWIDTH - patch->width)/2, py, V_SNAPTOTOP, patch);
|
||||
}
|
||||
|
||||
if (rendermode == render_soft && demo.rewinding)
|
||||
|
||||
+6
-6
@@ -170,8 +170,8 @@ static void F_SkyScroll(INT32 scrollspeed)
|
||||
w = (vid.width / vid.dupx)<<FRACBITS;
|
||||
|
||||
// The scroll offset MUST be clamped before shifting by FRACBITS, or else it'll overflow in about 3 minutes
|
||||
animtimer = ((((finalecount * scrollspeed) % (SHORT(pat->width)*16))<<FRACBITS) + (R_GetMenuUncap() * scrollspeed))/16;
|
||||
anim2 = (SHORT(pat2->width)<<FRACBITS) - ((((finalecount * scrollspeed) % (SHORT(pat2->width)*16))<<FRACBITS) + (R_GetMenuUncap() * scrollspeed))/16;
|
||||
animtimer = ((((finalecount * scrollspeed) % (pat->width*16))<<FRACBITS) + (R_GetMenuUncap() * scrollspeed))/16;
|
||||
anim2 = (pat2->width<<FRACBITS) - ((((finalecount * scrollspeed) % (pat2->width*16))<<FRACBITS) + (R_GetMenuUncap() * scrollspeed))/16;
|
||||
|
||||
// SRB2Kart: F_DrawPatchCol is over-engineered; recoded to be less shitty and error-prone
|
||||
if (rendermode != render_none)
|
||||
@@ -183,15 +183,15 @@ static void F_SkyScroll(INT32 scrollspeed)
|
||||
while (x < w)
|
||||
{
|
||||
V_DrawFixedPatch(x, y, FRACUNIT, V_SNAPTOTOP|V_SNAPTOLEFT, pat, NULL);
|
||||
x += SHORT(pat->width)<<FRACBITS;
|
||||
x += pat->width<<FRACBITS;
|
||||
}
|
||||
|
||||
x = -anim2;
|
||||
y = (BASEVIDHEIGHT - SHORT(pat2->height))<<FRACBITS;
|
||||
y = (BASEVIDHEIGHT - pat2->height)<<FRACBITS;
|
||||
while (x < w)
|
||||
{
|
||||
V_DrawFixedPatch(x, y, FRACUNIT, V_SNAPTOBOTTOM|V_SNAPTOLEFT, pat2, NULL);
|
||||
x += SHORT(pat2->width)<<FRACBITS;
|
||||
x += pat2->width<<FRACBITS;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1270,7 +1270,7 @@ void F_ContinueDrawer(void)
|
||||
V_DrawCenteredString(BASEVIDWIDTH/2, 100, 0, "CONTINUE?");
|
||||
|
||||
// Draw a Sonic!
|
||||
V_DrawScaledPatch((BASEVIDWIDTH - SHORT(contsonic->width))/2, 32, 0, contsonic);
|
||||
V_DrawScaledPatch((BASEVIDWIDTH - contsonic->width)/2, 32, 0, contsonic);
|
||||
|
||||
// Draw the continue markers! Show continues minus one.
|
||||
x -= ncontinues * 6;
|
||||
|
||||
@@ -1090,15 +1090,15 @@ static void HWR_DrawFadeMaskInCache(GLMipmap_t *mipmap, INT32 pblockwidth, INT32
|
||||
W_ReadLump(fademasklumpnum, Z_Malloc(W_LumpLength(fademasklumpnum),
|
||||
PU_HWRCACHE, &flat));
|
||||
|
||||
stepy = ((INT32)SHORT(fmheight)<<FRACBITS)/pblockheight;
|
||||
stepx = ((INT32)SHORT(fmwidth)<<FRACBITS)/pblockwidth;
|
||||
stepy = ((INT32)fmheight<<FRACBITS)/pblockheight;
|
||||
stepx = ((INT32)fmwidth<<FRACBITS)/pblockwidth;
|
||||
posy = 0;
|
||||
|
||||
for (j = 0; j < pblockheight; j++)
|
||||
{
|
||||
posx = 0;
|
||||
dest = &block[j*(mipmap->width)]; // 1bpp
|
||||
src = &flat[(posy>>FRACBITS)*SHORT(fmwidth)];
|
||||
src = &flat[(posy>>FRACBITS)*fmwidth];
|
||||
for (i = 0; i < pblockwidth;i++)
|
||||
{
|
||||
// fademask bpp is always 1, and is used just for alpha
|
||||
|
||||
+11
-11
@@ -108,10 +108,10 @@ void HWR_DrawPatch(patch_t *gpatch, INT32 x, INT32 y, INT32 option)
|
||||
if (option & V_NOSCALESTART)
|
||||
sdupx = sdupy = 2.0f;
|
||||
|
||||
v[0].x = v[3].x = (x*sdupx-(gpatch->leftoffset)*pdupx)/vid.width - 1;
|
||||
v[2].x = v[1].x = (x*sdupx+((gpatch->width)-(gpatch->leftoffset))*pdupx)/vid.width - 1;
|
||||
v[0].y = v[1].y = 1-(y*sdupy-(gpatch->topoffset)*pdupy)/vid.height;
|
||||
v[2].y = v[3].y = 1-(y*sdupy+((gpatch->height)-(gpatch->topoffset))*pdupy)/vid.height;
|
||||
v[0].x = v[3].x = (x*sdupx-gpatch->leftoffset*pdupx)/vid.width - 1;
|
||||
v[2].x = v[1].x = (x*sdupx+(gpatch->width - gpatch->leftoffset)*pdupx)/vid.width - 1;
|
||||
v[0].y = v[1].y = 1-(y*sdupy-gpatch->topoffset*pdupy)/vid.height;
|
||||
v[2].y = v[3].y = 1-(y*sdupy+(gpatch->height - gpatch->topoffset)*pdupy)/vid.height;
|
||||
|
||||
v[0].z = v[1].z = v[2].z = v[3].z = 1.0f;
|
||||
|
||||
@@ -191,7 +191,7 @@ void HWR_DrawStretchyFixedPatch(patch_t *gpatch, fixed_t x, fixed_t y, fixed_t p
|
||||
|
||||
// left offset
|
||||
if (option & V_FLIP)
|
||||
offsetx = (float)((gpatch->width) - (gpatch->leftoffset)) * fscalew;
|
||||
offsetx = (float)(gpatch->width - gpatch->leftoffset) * fscalew;
|
||||
else
|
||||
offsetx = (float)(gpatch->leftoffset) * fscalew;
|
||||
|
||||
@@ -225,7 +225,7 @@ void HWR_DrawStretchyFixedPatch(patch_t *gpatch, fixed_t x, fixed_t y, fixed_t p
|
||||
// if it's meant to cover the whole screen, black out the rest
|
||||
// cx and cy are possibly *slightly* off from float maths
|
||||
// This is done before here compared to software because we directly alter cx and cy to centre
|
||||
if (cx >= -0.1f && cx <= 0.1f && (gpatch->width) == BASEVIDWIDTH && cy >= -0.1f && cy <= 0.1f && (gpatch->height) == BASEVIDHEIGHT)
|
||||
if (cx >= -0.1f && cx <= 0.1f && gpatch->width == BASEVIDWIDTH && cy >= -0.1f && cy <= 0.1f && gpatch->height == BASEVIDHEIGHT)
|
||||
{
|
||||
const column_t *column = (const column_t *)((const UINT8 *)(gpatch->columns) + (gpatch->columnofs[0]));
|
||||
|
||||
@@ -376,7 +376,7 @@ void HWR_DrawCroppedPatch(patch_t *gpatch, fixed_t x, fixed_t y, fixed_t pscale,
|
||||
// if it's meant to cover the whole screen, black out the rest
|
||||
// cx and cy are possibly *slightly* off from float maths
|
||||
// This is done before here compared to software because we directly alter cx and cy to centre
|
||||
if (cx >= -0.1f && cx <= 0.1f && (gpatch->width) == BASEVIDWIDTH && cy >= -0.1f && cy <= 0.1f && (gpatch->height) == BASEVIDHEIGHT)
|
||||
if (cx >= -0.1f && cx <= 0.1f && gpatch->width == BASEVIDWIDTH && cy >= -0.1f && cy <= 0.1f && gpatch->height == BASEVIDHEIGHT)
|
||||
{
|
||||
const column_t *column = (const column_t *)((const UINT8 *)(gpatch->columns) + (gpatch->columnofs[0]));
|
||||
|
||||
@@ -415,11 +415,11 @@ void HWR_DrawCroppedPatch(patch_t *gpatch, fixed_t x, fixed_t y, fixed_t pscale,
|
||||
if (fheight > h - sy)
|
||||
fheight = h - sy;
|
||||
|
||||
if (fwidth > (gpatch->width))
|
||||
fwidth = (gpatch->width);
|
||||
if (fwidth > gpatch->width)
|
||||
fwidth = gpatch->width;
|
||||
|
||||
if (fheight > (gpatch->height))
|
||||
fheight = (gpatch->height);
|
||||
if (fheight > gpatch->height)
|
||||
fheight = gpatch->height;
|
||||
|
||||
if (pscale != FRACUNIT)
|
||||
{
|
||||
|
||||
@@ -4797,10 +4797,10 @@ static void HWR_ProjectSprite(mobj_t *thing)
|
||||
|
||||
if (rotsprite != NULL)
|
||||
{
|
||||
spr_width = SHORT(rotsprite->width) << FRACBITS;
|
||||
spr_height = SHORT(rotsprite->height) << FRACBITS;
|
||||
spr_offset = SHORT(rotsprite->leftoffset) << FRACBITS;
|
||||
spr_topoffset = SHORT(rotsprite->topoffset) << FRACBITS;
|
||||
spr_width = rotsprite->width << FRACBITS;
|
||||
spr_height = rotsprite->height << FRACBITS;
|
||||
spr_offset = rotsprite->leftoffset << FRACBITS;
|
||||
spr_topoffset = rotsprite->topoffset << FRACBITS;
|
||||
spr_topoffset += FEETADJUST;
|
||||
|
||||
// flip -> rotate, not rotate -> flip
|
||||
|
||||
+6
-12
@@ -1949,17 +1949,11 @@ static void HU_DrawChat_Old(void)
|
||||
const char *ntalk = "Say: ", *ttalk = "Say-Team: ";
|
||||
const char *talk = ntalk;
|
||||
size_t select_start = 0, select_end = 0;
|
||||
INT32 charwidth = 8 * con_scalefactor; //SHORT(hu_font['A'-HU_FONTSTART]->width) * con_scalefactor;
|
||||
INT32 charheight = 8 * con_scalefactor; //SHORT(hu_font['A'-HU_FONTSTART]->height) * con_scalefactor;
|
||||
INT32 charwidth = 8 * con_scalefactor; //hu_font['A'-HU_FONTSTART]->width * con_scalefactor;
|
||||
INT32 charheight = 8 * con_scalefactor; //hu_font['A'-HU_FONTSTART]->height * con_scalefactor;
|
||||
if (teamtalk)
|
||||
{
|
||||
talk = ttalk;
|
||||
#if 0
|
||||
if (players[consoleplayer].ctfteam == 1)
|
||||
t = 0x500; // Red
|
||||
else if (players[consoleplayer].ctfteam == 2)
|
||||
t = 0x400; // Blue
|
||||
#endif
|
||||
}
|
||||
|
||||
while (talk[i])
|
||||
@@ -1971,7 +1965,7 @@ static void HU_DrawChat_Old(void)
|
||||
}
|
||||
else
|
||||
{
|
||||
//charwidth = SHORT(hu_font[talk[i]-HU_FONTSTART]->width) * con_scalefactor;
|
||||
//charwidth = hu_font[talk[i]-HU_FONTSTART]->width * con_scalefactor;
|
||||
V_DrawCharacter(HU_INPUTX + c, y, talk[i++] | cv_constextsize.value | V_NOSCALESTART, !cv_allcaps.value);
|
||||
}
|
||||
c += charwidth;
|
||||
@@ -1999,7 +1993,7 @@ static void HU_DrawChat_Old(void)
|
||||
//Hurdler: isn't it better like that?
|
||||
if (w_chat_buf[i] >= HU_FONTSTART)
|
||||
{
|
||||
//charwidth = SHORT(hu_font[w_chat[i]-HU_FONTSTART]->width) * con_scalefactor;
|
||||
//charwidth = hu_font[w_chat[i]-HU_FONTSTART]->width * con_scalefactor;
|
||||
V_DrawCharacter(HU_INPUTX + c, y, w_chat_buf[i] | cv_constextsize.value | V_NOSCALESTART | t, !cv_allcaps.value);
|
||||
}
|
||||
|
||||
@@ -2638,7 +2632,7 @@ static void HU_DrawRankings(void)
|
||||
else
|
||||
p = bmatcico;
|
||||
|
||||
V_DrawSmallScaledPatch(128 - SHORT(p->width)/4, 4, 0, p);
|
||||
V_DrawSmallScaledPatch(128 - p->width/4, 4, 0, p);
|
||||
V_DrawCenteredString(128, 16, 0, va("%u", bluescore));
|
||||
|
||||
if (gametype == GT_CTF)
|
||||
@@ -2646,7 +2640,7 @@ static void HU_DrawRankings(void)
|
||||
else
|
||||
p = rmatcico;
|
||||
|
||||
V_DrawSmallScaledPatch(192 - SHORT(p->width)/4, 4, 0, p);
|
||||
V_DrawSmallScaledPatch(192 - p->width/4, 4, 0, p);
|
||||
V_DrawCenteredString(192, 16, 0, va("%u", redscore));
|
||||
}
|
||||
|
||||
|
||||
+20
-20
@@ -9045,7 +9045,7 @@ static void K_DrawKartPositionNum(INT32 num)
|
||||
const boolean wheeloffs = (cv_showinput.value && cv_posi_xoffset.value == 0 && cv_posi_yoffset.value == 0 && cv_wheel_xoffset.value == 0 && cv_wheel_yoffset.value == 0);
|
||||
boolean win = (stplyr->exiting && num == 1);
|
||||
//INT32 X = POSI_X;
|
||||
INT32 W = SHORT(kp_positionnum[0][0]->width);
|
||||
INT32 W = kp_positionnum[0][0]->width;
|
||||
fixed_t scale = FRACUNIT;
|
||||
patch_t *localpatch = kp_positionnum[0][0];
|
||||
//INT32 splitflags = K_calcSplitFlags(V_SNAPTOBOTTOM|V_SNAPTORIGHT);
|
||||
@@ -9159,7 +9159,7 @@ static void K_DrawKartPositionNum(INT32 num)
|
||||
localpatch = kp_positionnum[num % 10][0];
|
||||
}
|
||||
|
||||
V_DrawFixedPatch((fx<<FRACBITS) + ((overtake && flipdraw) ? (SHORT(localpatch->width)*scale/2) : 0), (fy<<FRACBITS) + ((overtake && flipvdraw) ? (SHORT(localpatch->height)*scale/2) : 0), scale, V_HUDTRANSHALF|fflags, localpatch, NULL);
|
||||
V_DrawFixedPatch((fx<<FRACBITS) + ((overtake && flipdraw) ? (localpatch->width*scale/2) : 0), (fy<<FRACBITS) + ((overtake && flipvdraw) ? (localpatch->height*scale/2) : 0), scale, V_HUDTRANSHALF|fflags, localpatch, NULL);
|
||||
// ^ if we overtake as p1 or p3 in splitscren, we shift it so that it doesn't go off screen.
|
||||
// ^ if we overtake as p1 in 2p splits, shift vertically so that this doesn't happen either.
|
||||
|
||||
@@ -9493,9 +9493,9 @@ static void K_DrawDialNum(INT32 x, INT32 y, boolean colorized, INT32 flags, INT3
|
||||
INT32 w;
|
||||
|
||||
if (colorized)
|
||||
w = SHORT(skp_dialnumclr[0]->width);
|
||||
w = skp_dialnumclr[0]->width;
|
||||
else
|
||||
w = SHORT(skp_dialnum[0]->width);
|
||||
w = skp_dialnum[0]->width;
|
||||
|
||||
if (flags & V_NOSCALESTART)
|
||||
w *= vid.dupx;
|
||||
@@ -10436,7 +10436,7 @@ static void K_drawKartWanted(void)
|
||||
}
|
||||
else if (splitscreen == 3) // 4P splitscreen...
|
||||
{
|
||||
basex = BASEVIDWIDTH/2 - (SHORT(kp_wantedsplit->width)/2); // center on screen
|
||||
basex = BASEVIDWIDTH/2 - (kp_wantedsplit->width/2); // center on screen
|
||||
basey = BASEVIDHEIGHT - 55;
|
||||
//basey2 = 4;
|
||||
}
|
||||
@@ -10559,8 +10559,8 @@ static void K_drawKartMinimapHead(mobj_t *mo, INT32 x, INT32 y, INT32 flags)
|
||||
if (encoremode)
|
||||
amnumxpos = -amnumxpos;
|
||||
|
||||
amxpos = amnumxpos + ((x + (SHORT(minimapinfo.minimap_pic->width)-SHORT(minimaphead->width)) / 2)<<FRACBITS);
|
||||
amypos = amnumypos + ((y + (SHORT(minimapinfo.minimap_pic->height)-SHORT(minimaphead->height)) / 2)<<FRACBITS);
|
||||
amxpos = amnumxpos + ((x + (minimapinfo.minimap_pic->width-minimaphead->width) / 2)<<FRACBITS);
|
||||
amypos = amnumypos + ((y + (minimapinfo.minimap_pic->height-minimaphead->height) / 2)<<FRACBITS);
|
||||
|
||||
if (cv_showminimapnames.value && player && !(modeattacking || gamestate == GS_TIMEATTACK))
|
||||
{
|
||||
@@ -10573,8 +10573,8 @@ static void K_drawKartMinimapHead(mobj_t *mo, INT32 x, INT32 y, INT32 flags)
|
||||
|
||||
if (cv_minihead.value)
|
||||
{
|
||||
amxpos += (SHORT(minimaphead->width) / 4)<<FRACBITS;
|
||||
amypos += (SHORT(minimaphead->height) / 4)<<FRACBITS;
|
||||
amxpos += (minimaphead->width / 4)<<FRACBITS;
|
||||
amypos += (minimaphead->height / 4)<<FRACBITS;
|
||||
scale /= 2;
|
||||
}
|
||||
|
||||
@@ -10646,14 +10646,14 @@ static void K_drawKartMinimap(void)
|
||||
|
||||
drawinfo_t info;
|
||||
K_getMinimapDrawinfo(&info);
|
||||
x = info.x - (SHORT(minimapinfo.minimap_pic->width)/2);
|
||||
y = info.y - (SHORT(minimapinfo.minimap_pic->height)/2);
|
||||
x = info.x - (minimapinfo.minimap_pic->width/2);
|
||||
y = info.y - (minimapinfo.minimap_pic->height/2);
|
||||
splitflags = info.flags;
|
||||
|
||||
splitflags |= minimaptrans;
|
||||
|
||||
if (encoremode)
|
||||
V_DrawScaledPatch(x+SHORT(minimapinfo.minimap_pic->width), y, splitflags|V_FLIP, minimapinfo.minimap_pic);
|
||||
V_DrawScaledPatch(x+minimapinfo.minimap_pic->width, y, splitflags|V_FLIP, minimapinfo.minimap_pic);
|
||||
else
|
||||
V_DrawScaledPatch(x, y, splitflags, minimapinfo.minimap_pic);
|
||||
|
||||
@@ -10665,10 +10665,10 @@ static void K_drawKartMinimap(void)
|
||||
|
||||
// let offsets transfer to the heads, too!
|
||||
if (encoremode)
|
||||
x += SHORT(minimapinfo.minimap_pic->leftoffset);
|
||||
x += minimapinfo.minimap_pic->leftoffset;
|
||||
else
|
||||
x -= SHORT(minimapinfo.minimap_pic->leftoffset);
|
||||
y -= SHORT(minimapinfo.minimap_pic->topoffset);
|
||||
x -= minimapinfo.minimap_pic->leftoffset;
|
||||
y -= minimapinfo.minimap_pic->topoffset;
|
||||
|
||||
// initialize
|
||||
for (i = 0; i < MAXSPLITSCREENPLAYERS; i++)
|
||||
@@ -10749,7 +10749,7 @@ static void K_drawKartStartCountdown(void)
|
||||
if (splitscreen) // splitscreen
|
||||
pnum += 8;
|
||||
|
||||
V_DrawScaledPatch(STCD_X - (SHORT(kp_startcountdown[pnum]->width)/2), STCD_Y - (SHORT(kp_startcountdown[pnum]->height)/2), splitflags, kp_startcountdown[pnum]);
|
||||
V_DrawScaledPatch(STCD_X - (kp_startcountdown[pnum]->width/2), STCD_Y - (kp_startcountdown[pnum]->height/2), splitflags, kp_startcountdown[pnum]);
|
||||
}
|
||||
|
||||
static void K_drawKartFinish(void)
|
||||
@@ -10765,7 +10765,7 @@ static void K_drawKartFinish(void)
|
||||
if (splitscreen > 1) // 3/4p, stationary FIN
|
||||
{
|
||||
pnum += 2;
|
||||
V_DrawScaledPatch(STCD_X - (SHORT(kp_racefinish[pnum]->width)/2), STCD_Y - (SHORT(kp_racefinish[pnum]->height)/2), splitflags, kp_racefinish[pnum]);
|
||||
V_DrawScaledPatch(STCD_X - (kp_racefinish[pnum]->width/2), STCD_Y - (kp_racefinish[pnum]->height/2), splitflags, kp_racefinish[pnum]);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -10777,14 +10777,14 @@ static void K_drawKartFinish(void)
|
||||
pnum += 4;
|
||||
|
||||
x = ((vid.width<<FRACBITS)/vid.dupx);
|
||||
xval = (SHORT(kp_racefinish[pnum]->width)<<FRACBITS);
|
||||
xval = (kp_racefinish[pnum]->width<<FRACBITS);
|
||||
x = (FixedMul(((TICRATE - stplyr->kartstuff[k_cardanimation])<<FRACBITS) - R_GetHudUncap(), xval > x ? xval : x))/TICRATE;
|
||||
|
||||
if (splitscreen && stplyrnum == 1)
|
||||
x = -x;
|
||||
|
||||
V_DrawFixedPatch(x + (STCD_X<<FRACBITS) - (xval>>1),
|
||||
(STCD_Y<<FRACBITS) - (SHORT(kp_racefinish[pnum]->height)<<(FRACBITS-1)),
|
||||
(STCD_Y<<FRACBITS) - (kp_racefinish[pnum]->height<<(FRACBITS-1)),
|
||||
FRACUNIT,
|
||||
splitflags, kp_racefinish[pnum], NULL);
|
||||
}
|
||||
@@ -11705,7 +11705,7 @@ void K_drawKartHUD(void)
|
||||
return;
|
||||
|
||||
if (G_BattleGametype() && !splitscreen && (stplyr->kartstuff[k_yougotem] % 2)) // * YOU GOT EM *
|
||||
V_DrawScaledPatch(BASEVIDWIDTH/2 - (SHORT(kp_yougotem->width)/2), 32, V_HUDTRANS, kp_yougotem);
|
||||
V_DrawScaledPatch(BASEVIDWIDTH/2 - (kp_yougotem->width/2), 32, V_HUDTRANS, kp_yougotem);
|
||||
|
||||
// Draw FREE PLAY.
|
||||
if (isfreeplay && !stplyr->spectator && timeinmap > 113)
|
||||
|
||||
+13
-13
@@ -303,16 +303,16 @@ static int patch_get(lua_State *L)
|
||||
lua_pushboolean(L, patch != NULL);
|
||||
break;
|
||||
case patch_width:
|
||||
lua_pushinteger(L, SHORT(patch->width));
|
||||
lua_pushinteger(L, patch->width);
|
||||
break;
|
||||
case patch_height:
|
||||
lua_pushinteger(L, SHORT(patch->height));
|
||||
lua_pushinteger(L, patch->height);
|
||||
break;
|
||||
case patch_leftoffset:
|
||||
lua_pushinteger(L, SHORT(patch->leftoffset));
|
||||
lua_pushinteger(L, patch->leftoffset);
|
||||
break;
|
||||
case patch_topoffset:
|
||||
lua_pushinteger(L, SHORT(patch->topoffset));
|
||||
lua_pushinteger(L, patch->topoffset);
|
||||
break;
|
||||
}
|
||||
return 1;
|
||||
@@ -657,27 +657,27 @@ static int libd_drawOnMinimap(lua_State *L)
|
||||
splitflags |= V_HUDTRANS;
|
||||
|
||||
// Handle offsets and stuff.
|
||||
mm_x = info.x - (SHORT(AutomapPic->width)/2);
|
||||
mm_y = info.y - (SHORT(AutomapPic->height)/2);
|
||||
mm_x = info.x - (AutomapPic->width/2);
|
||||
mm_y = info.y - (AutomapPic->height/2);
|
||||
|
||||
// let offsets transfer to the heads, too!
|
||||
if (encoremode)
|
||||
{
|
||||
mm_x += SHORT(AutomapPic->leftoffset);
|
||||
mm_x += AutomapPic->leftoffset;
|
||||
}
|
||||
else
|
||||
{
|
||||
mm_x -= SHORT(AutomapPic->leftoffset);
|
||||
mm_x -= AutomapPic->leftoffset;
|
||||
}
|
||||
|
||||
mm_y -= SHORT(AutomapPic->topoffset);
|
||||
mm_y -= AutomapPic->topoffset;
|
||||
|
||||
// patch is supposedly already centered, don't butt in.
|
||||
if (!centered)
|
||||
{
|
||||
// scale patch coords
|
||||
patchw = (SHORT(patch->width) * scale / 2);
|
||||
patchh = (SHORT(patch->height) * scale / 2);
|
||||
patchw = (patch->width * scale / 2);
|
||||
patchh = (patch->height * scale / 2);
|
||||
}
|
||||
|
||||
amnumxpos = (FixedMul(x, minimapinfo.zoom) - minimapinfo.offs_x);
|
||||
@@ -688,8 +688,8 @@ static int libd_drawOnMinimap(lua_State *L)
|
||||
amnumxpos = -amnumxpos;
|
||||
}
|
||||
|
||||
amxpos = amnumxpos + ((mm_x + SHORT(AutomapPic->width) / 2)<<FRACBITS) - patchw;
|
||||
amypos = amnumypos + ((mm_y + SHORT(AutomapPic->height) / 2)<<FRACBITS) - patchh;
|
||||
amxpos = amnumxpos + ((mm_x + AutomapPic->width / 2)<<FRACBITS) - patchw;
|
||||
amypos = amnumypos + ((mm_y + AutomapPic->height / 2)<<FRACBITS) - patchh;
|
||||
|
||||
if (cv_minihead.value)
|
||||
{
|
||||
|
||||
+15
-15
@@ -5044,7 +5044,7 @@ static void M_DrawThermo(INT32 x, INT32 y, consvar_t *cv)
|
||||
cursorlump = W_GetNumForName("M_THERMO");
|
||||
|
||||
V_DrawScaledPatch(xx, y, 0, p = W_CachePatchNum(leftlump,PU_CACHE));
|
||||
xx += SHORT(p->width) - SHORT(p->leftoffset);
|
||||
xx += p->width - p->leftoffset;
|
||||
for (i = 0; i < 16; i++)
|
||||
{
|
||||
V_DrawScaledPatch(xx, y, V_WRAPX, W_CachePatchNum(centerlump[i & 1], PU_CACHE));
|
||||
@@ -5192,8 +5192,8 @@ static void M_DrawMenuTitle(void)
|
||||
|
||||
if (p->height > 24) // title is larger than normal
|
||||
{
|
||||
INT32 xtitle = (BASEVIDWIDTH - (SHORT(p->width)/2))/2;
|
||||
INT32 ytitle = (30 - (SHORT(p->height)/2))/2;
|
||||
INT32 xtitle = (BASEVIDWIDTH - (p->width/2))/2;
|
||||
INT32 ytitle = (30 - (p->height/2))/2;
|
||||
|
||||
if (xtitle < 0)
|
||||
xtitle = 0;
|
||||
@@ -5204,8 +5204,8 @@ static void M_DrawMenuTitle(void)
|
||||
}
|
||||
else
|
||||
{
|
||||
INT32 xtitle = (BASEVIDWIDTH - SHORT(p->width))/2;
|
||||
INT32 ytitle = (30 - SHORT(p->height))/2;
|
||||
INT32 xtitle = (BASEVIDWIDTH - p->width)/2;
|
||||
INT32 ytitle = (30 - p->height)/2;
|
||||
|
||||
if (xtitle < 0)
|
||||
xtitle = 0;
|
||||
@@ -5293,7 +5293,7 @@ static void M_DrawGenericMenu(void)
|
||||
{
|
||||
patch_t *p;
|
||||
p = W_CachePatchName(currentMenu->menuitems[i].patch, PU_CACHE);
|
||||
V_DrawScaledPatch((BASEVIDWIDTH - SHORT(p->width))/2, y, 0, p);
|
||||
V_DrawScaledPatch((BASEVIDWIDTH - p->width)/2, y, 0, p);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -5621,7 +5621,7 @@ static void M_DrawCenteredMenu(void)
|
||||
|
||||
if (currentMenu->menuitems[i].status & IT_CENTER)
|
||||
{
|
||||
V_DrawScaledPatch((BASEVIDWIDTH - SHORT(p->width))/2, y, 0, p);
|
||||
V_DrawScaledPatch((BASEVIDWIDTH - p->width)/2, y, 0, p);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -6052,7 +6052,7 @@ static void M_DrawMessageMenu(void)
|
||||
}
|
||||
|
||||
V_DrawString((BASEVIDWIDTH - V_StringWidth(string, 0))/2,y,V_ALLOWLOWERCASE,string);
|
||||
y += 8; //SHORT(hu_font[0]->height);
|
||||
y += 8; //hu_font[0]->height;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7222,8 +7222,8 @@ static void DrawReplayHutReplayInfo(void)
|
||||
V_DrawSmallScaledPatch(x, y, V_SNAPTOTOP, patch);
|
||||
else
|
||||
{
|
||||
w = SHORT(patch->width);
|
||||
h = SHORT(patch->height);
|
||||
w = patch->width;
|
||||
h = patch->height;
|
||||
V_DrawSmallScaledPatch(x+(w>>1), y, V_SNAPTOTOP|V_FLIP, patch);
|
||||
|
||||
{
|
||||
@@ -7314,7 +7314,7 @@ static void DrawReplayHutReplayInfo(void)
|
||||
GTC_MENUCACHE);
|
||||
}
|
||||
|
||||
V_DrawMappedPatch(BASEVIDWIDTH-15 - SHORT(patch->width), y+20, V_SNAPTOTOP, patch, colormap);
|
||||
V_DrawMappedPatch(BASEVIDWIDTH-15 - patch->width, y+20, V_SNAPTOTOP, patch, colormap);
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -7533,7 +7533,7 @@ static void M_DrawReplayStartMenu(void)
|
||||
GTC_MENUCACHE);
|
||||
}
|
||||
|
||||
V_DrawMappedPatch(BASEVIDWIDTH-5 - SHORT(patch->width), STARTY + i*20, V_SNAPTOTOP, patch, colormap);
|
||||
V_DrawMappedPatch(BASEVIDWIDTH-5 - patch->width, STARTY + i*20, V_SNAPTOTOP, patch, colormap);
|
||||
}
|
||||
#undef STARTY
|
||||
|
||||
@@ -9132,7 +9132,7 @@ void M_DrawTimeAttackMenu(void)
|
||||
if (W_CheckNumForName(skins[cv_chooseskin.value-1].facewant) != LUMPERROR)
|
||||
{
|
||||
UINT8 *colormap = R_GetTranslationColormap(cv_chooseskin.value-1, cv_playercolor.value, GTC_MENUCACHE);
|
||||
V_DrawMappedPatch(BASEVIDWIDTH-x - SHORT(facewantprefix[cv_chooseskin.value-1]->width), y, 0, facewantprefix[cv_chooseskin.value-1], colormap);
|
||||
V_DrawMappedPatch(BASEVIDWIDTH-x - facewantprefix[cv_chooseskin.value-1]->width, y, 0, facewantprefix[cv_chooseskin.value-1], colormap);
|
||||
}
|
||||
|
||||
for (i = 0; i < currentMenu->numitems; ++i)
|
||||
@@ -10254,8 +10254,8 @@ static void M_DrawLevelSelectOnly(boolean leftfade, boolean rightfade)
|
||||
else
|
||||
PictureOfLevel = W_CachePatchName("RANDOMLV", PU_CACHE);
|
||||
|
||||
w = SHORT(PictureOfLevel->width)/2;
|
||||
i = SHORT(PictureOfLevel->height)/2;
|
||||
w = PictureOfLevel->width/2;
|
||||
i = PictureOfLevel->height/2;
|
||||
x = BASEVIDWIDTH/2 - w/2;
|
||||
y = currentMenu->y + 130 + 8 - i;
|
||||
|
||||
|
||||
+2
-2
@@ -642,8 +642,8 @@ void R_LoadTextures(void)
|
||||
|
||||
// Set texture properties.
|
||||
M_Memcpy(texture->name, W_CheckNameForNumPwad((UINT16)w, texstart + j), sizeof(texture->name));
|
||||
texture->width = SHORT(patchlump->width);
|
||||
texture->height = SHORT(patchlump->height);
|
||||
texture->width = patchlump->width;
|
||||
texture->height = patchlump->height;
|
||||
texture->patchcount = 1;
|
||||
texture->holes = false;
|
||||
|
||||
|
||||
+5
-5
@@ -344,10 +344,10 @@ patch_t *Patch_Create(softwarepatch_t *source, size_t srcsize, void *dest)
|
||||
size_t size = sizeof(INT32) * source->width;
|
||||
size_t offs = (sizeof(INT16) * 4) + size;
|
||||
|
||||
patch->width = source->width;
|
||||
patch->height = source->height;
|
||||
patch->leftoffset = source->leftoffset;
|
||||
patch->topoffset = source->topoffset;
|
||||
patch->width = SHORT(source->width);
|
||||
patch->height = SHORT(source->height);
|
||||
patch->leftoffset = SHORT(source->leftoffset);
|
||||
patch->topoffset = SHORT(source->topoffset);
|
||||
patch->columnofs = Z_Calloc(size, PU_CACHE, NULL);
|
||||
|
||||
for (col = 0; col < source->width; col++)
|
||||
@@ -800,7 +800,7 @@ void RotatedPatch_DoRotation(rotsprite_t *rotsprite, patch_t *patch, INT32 angle
|
||||
}
|
||||
|
||||
ox = (newwidth / 2) + (leftoffset - xpivot);
|
||||
oy = (newheight / 2) + (SHORT(patch->topoffset) - ypivot);
|
||||
oy = (newheight / 2) + (patch->topoffset - ypivot);
|
||||
width = (maxx - minx);
|
||||
height = (maxy - miny);
|
||||
|
||||
|
||||
+2
-2
@@ -173,7 +173,7 @@ static void R_DrawWallSplats(void)
|
||||
|
||||
patch = W_CachePatchNum(splat->patch, PU_CACHE);
|
||||
|
||||
dc_texturemid = splat->top + (SHORT(patch->height)<<(FRACBITS-1)) - viewz;
|
||||
dc_texturemid = splat->top + (patch->height<<(FRACBITS-1)) - viewz;
|
||||
if (splat->yoffset)
|
||||
dc_texturemid += *splat->yoffset;
|
||||
|
||||
@@ -225,7 +225,7 @@ static void R_DrawWallSplats(void)
|
||||
|
||||
// FIXME!
|
||||
texturecolumn >>= FRACBITS;
|
||||
if (texturecolumn < 0 || texturecolumn >= SHORT(patch->width))
|
||||
if (texturecolumn < 0 || texturecolumn >= patch->width)
|
||||
continue;
|
||||
|
||||
// draw the texture
|
||||
|
||||
+13
-13
@@ -297,10 +297,10 @@ static boolean R_AddSingleSpriteDef(const char *sprname, spritedef_t *spritedef,
|
||||
// store sprite info in lookup tables
|
||||
//FIXME : numspritelumps do not duplicate sprite replacements
|
||||
W_ReadLumpHeaderPwad(wadnum, l, &patch, sizeof (patch_t), 0);
|
||||
spritecachedinfo[numspritelumps].width = (patch.width)<<FRACBITS;
|
||||
spritecachedinfo[numspritelumps].offset = (patch.leftoffset)<<FRACBITS;
|
||||
spritecachedinfo[numspritelumps].topoffset = (patch.topoffset)<<FRACBITS;
|
||||
spritecachedinfo[numspritelumps].height = (patch.height)<<FRACBITS;
|
||||
spritecachedinfo[numspritelumps].width = (INT32)(SHORT(patch.width))<<FRACBITS;
|
||||
spritecachedinfo[numspritelumps].offset = (INT32)(SHORT(patch.leftoffset))<<FRACBITS;
|
||||
spritecachedinfo[numspritelumps].topoffset = (INT32)(SHORT(patch.topoffset))<<FRACBITS;
|
||||
spritecachedinfo[numspritelumps].height = (INT32)(SHORT(patch.height))<<FRACBITS;
|
||||
|
||||
//BP: we cannot use special tric in hardware mode because feet in ground caused by z-buffer
|
||||
if (rendermode != render_none) // not for psprite
|
||||
@@ -746,7 +746,7 @@ static void R_DrawVisSprite(vissprite_t *vis)
|
||||
// TODO This check should not be necessary. But Papersprites near to the camera will sometimes create invalid values
|
||||
// for the vissprite's startfrac. This happens because they are not depth culled like other sprites.
|
||||
// Someone who is more familiar with papersprites pls check and try to fix <3
|
||||
if (vis->startfrac < 0 || vis->startfrac > (SHORT(patch->width) << FRACBITS))
|
||||
if (vis->startfrac < 0 || vis->startfrac > (patch->width << FRACBITS))
|
||||
{
|
||||
// never draw vissprites with startfrac out of patch range
|
||||
return;
|
||||
@@ -814,7 +814,7 @@ static void R_DrawVisSprite(vissprite_t *vis)
|
||||
dc_colormap += COLORMAP_REMAPOFFSET;
|
||||
|
||||
dc_texturemid = vis->texturemid;
|
||||
dc_texheight = SHORT(patch->height);
|
||||
dc_texheight = patch->height;
|
||||
|
||||
frac = vis->startfrac;
|
||||
windowtop = windowbottom = sprbotscreen = INT32_MAX;
|
||||
@@ -858,8 +858,8 @@ static void R_DrawVisSprite(vissprite_t *vis)
|
||||
vis->x2 = vid.width-1;
|
||||
|
||||
localcolfunc = (vis->vflip) ? R_DrawFlippedMaskedColumn : R_DrawMaskedColumn;
|
||||
lengthcol = SHORT(patch->height);
|
||||
pwidth = SHORT(patch->width);
|
||||
lengthcol = patch->height;
|
||||
pwidth = patch->width;
|
||||
|
||||
// Split drawing loops for paper and non-paper to reduce conditional checks per sprite
|
||||
if (vis->scalestep)
|
||||
@@ -938,7 +938,7 @@ static void R_DrawPrecipitationVisSprite(vissprite_t *vis)
|
||||
|
||||
dc_iscale = FixedDiv(FRACUNIT, vis->scale);
|
||||
dc_texturemid = FixedDiv(vis->texturemid, this_scale);
|
||||
dc_texheight = SHORT(patch->height);
|
||||
dc_texheight = patch->height;
|
||||
|
||||
frac = vis->startfrac;
|
||||
spryscale = vis->scale;
|
||||
@@ -1391,10 +1391,10 @@ static void R_ProjectSprite(mobj_t *thing)
|
||||
|
||||
if (rotsprite != NULL)
|
||||
{
|
||||
spr_width = SHORT(rotsprite->width) << FRACBITS;
|
||||
spr_height = SHORT(rotsprite->height) << FRACBITS;
|
||||
spr_offset = SHORT(rotsprite->leftoffset) << FRACBITS;
|
||||
spr_topoffset = SHORT(rotsprite->topoffset) << FRACBITS;
|
||||
spr_width = rotsprite->width << FRACBITS;
|
||||
spr_height = rotsprite->height << FRACBITS;
|
||||
spr_offset = rotsprite->leftoffset << FRACBITS;
|
||||
spr_topoffset = rotsprite->topoffset << FRACBITS;
|
||||
spr_topoffset += FEETADJUST;
|
||||
|
||||
// flip -> rotate, not rotate -> flip
|
||||
|
||||
+41
-41
@@ -710,13 +710,13 @@ void V_DrawStretchyFixedPatch(fixed_t x, fixed_t y, fixed_t pscale, fixed_t vsca
|
||||
|
||||
// left offset
|
||||
if (scrn & V_FLIP)
|
||||
offsetx = FixedMul((SHORT(patch->width) - SHORT(patch->leftoffset))<<FRACBITS, pscale) + 1;
|
||||
offsetx = FixedMul((patch->width - patch->leftoffset)<<FRACBITS, pscale) + 1;
|
||||
else
|
||||
offsetx = FixedMul(SHORT(patch->leftoffset)<<FRACBITS, pscale);
|
||||
offsetx = FixedMul(patch->leftoffset<<FRACBITS, pscale);
|
||||
|
||||
// top offset
|
||||
// TODO: make some kind of vertical version of V_FLIP, maybe by deprecating V_OFFSET in future?!?
|
||||
offsety = FixedMul(SHORT(patch->topoffset)<<FRACBITS, vscale);
|
||||
offsety = FixedMul(patch->topoffset<<FRACBITS, vscale);
|
||||
|
||||
if ((scrn & (V_NOSCALESTART|V_OFFSET)) == (V_NOSCALESTART|V_OFFSET)) // Multiply by dupx/dupy
|
||||
{
|
||||
@@ -759,7 +759,7 @@ void V_DrawStretchyFixedPatch(fixed_t x, fixed_t y, fixed_t pscale, fixed_t vsca
|
||||
if (!(scrn & V_SCALEPATCHMASK))
|
||||
{
|
||||
// if it's meant to cover the whole screen, black out the rest (ONLY IF TOP LEFT ISN'T TRANSPARENT)
|
||||
if (x == 0 && SHORT(patch->width) == BASEVIDWIDTH && y == 0 && SHORT(patch->height) == BASEVIDHEIGHT)
|
||||
if (x == 0 && patch->width == BASEVIDWIDTH && y == 0 && patch->height == BASEVIDHEIGHT)
|
||||
{
|
||||
column = (const column_t *)((const UINT8 *)(patch->columns) + (patch->columnofs[0]));
|
||||
if (!column->topdelta)
|
||||
@@ -797,18 +797,18 @@ void V_DrawStretchyFixedPatch(fixed_t x, fixed_t y, fixed_t pscale, fixed_t vsca
|
||||
|
||||
if (pscale != FRACUNIT) // scale width properly
|
||||
{
|
||||
pwidth = SHORT(patch->width)<<FRACBITS;
|
||||
pwidth = patch->width<<FRACBITS;
|
||||
pwidth = FixedMul(pwidth, pscale);
|
||||
pwidth = FixedMul(pwidth, dupx<<FRACBITS);
|
||||
pwidth >>= FRACBITS;
|
||||
}
|
||||
else
|
||||
pwidth = SHORT(patch->width) * dupx;
|
||||
pwidth = patch->width * dupx;
|
||||
|
||||
deststart = desttop;
|
||||
destend = desttop + pwidth;
|
||||
|
||||
for (col = 0; (col>>FRACBITS) < SHORT(patch->width); col += colfrac, ++offx, desttop++)
|
||||
for (col = 0; (col>>FRACBITS) < patch->width; col += colfrac, ++offx, desttop++)
|
||||
{
|
||||
INT32 topdelta, prevdelta = -1;
|
||||
if (scrn & V_FLIP) // offx is measured from right edge instead of left
|
||||
@@ -905,8 +905,8 @@ void V_DrawCroppedPatch(fixed_t x, fixed_t y, fixed_t pscale, INT32 scrn, patch_
|
||||
colfrac = FixedDiv(FRACUNIT, fdup);
|
||||
rowfrac = FixedDiv(FRACUNIT, fdup);
|
||||
|
||||
y -= FixedMul(SHORT(patch->topoffset)<<FRACBITS, pscale);
|
||||
x -= FixedMul(SHORT(patch->leftoffset)<<FRACBITS, pscale);
|
||||
y -= FixedMul(patch->topoffset<<FRACBITS, pscale);
|
||||
x -= FixedMul(patch->leftoffset<<FRACBITS, pscale);
|
||||
|
||||
desttop = screens[scrn&V_PARAMMASK];
|
||||
|
||||
@@ -956,7 +956,7 @@ void V_DrawCroppedPatch(fixed_t x, fixed_t y, fixed_t pscale, INT32 scrn, patch_
|
||||
desttop += (y*vid.width) + x;
|
||||
}
|
||||
|
||||
for (col = sx<<FRACBITS; (col>>FRACBITS) < SHORT(patch->width) && ((col>>FRACBITS) - sx) < w; col += colfrac, ++x, desttop++)
|
||||
for (col = sx<<FRACBITS; (col>>FRACBITS) < patch->width && ((col>>FRACBITS) - sx) < w; col += colfrac, ++x, desttop++)
|
||||
{
|
||||
INT32 topdelta, prevdelta = -1;
|
||||
if (x < 0) // don't draw off the left of the screen (WRAP PREVENTION)
|
||||
@@ -1505,7 +1505,7 @@ void V_DrawFlatFill(INT32 x, INT32 y, INT32 w, INT32 h, lumpnum_t flatnum)
|
||||
void V_DrawPatchFill(patch_t *pat)
|
||||
{
|
||||
INT32 dupz = (vid.dupx < vid.dupy ? vid.dupx : vid.dupy);
|
||||
INT32 x, y, pw = SHORT(pat->width) * dupz, ph = SHORT(pat->height) * dupz;
|
||||
INT32 x, y, pw = pat->width * dupz, ph = pat->height * dupz;
|
||||
|
||||
for (x = 0; x < vid.width; x += pw)
|
||||
{
|
||||
@@ -1706,7 +1706,7 @@ void V_DrawCharacter(INT32 x, INT32 y, INT32 c, boolean lowercaseallowed)
|
||||
if (c < 0 || c >= HU_FONTSIZE || !hu_font[c])
|
||||
return;
|
||||
|
||||
w = SHORT(hu_font[c]->width);
|
||||
w = hu_font[c]->width;
|
||||
if (x + w > vid.width)
|
||||
return;
|
||||
|
||||
@@ -1733,7 +1733,7 @@ void V_DrawChatCharacter(INT32 x, INT32 y, INT32 c, boolean lowercaseallowed, UI
|
||||
if (c < 0 || c >= HU_FONTSIZE || !hu_font[c])
|
||||
return;
|
||||
|
||||
w = SHORT(hu_font[c]->width)/2;
|
||||
w = hu_font[c]->width/2;
|
||||
if (x + w > vid.width)
|
||||
return;
|
||||
|
||||
@@ -1899,10 +1899,10 @@ void V_DrawString(INT32 x, INT32 y, INT32 option, const char *string)
|
||||
if (charwidth)
|
||||
{
|
||||
w = charwidth * dupx;
|
||||
center = w/2 - SHORT(hu_font[c]->width)*dupx/2;
|
||||
center = w/2 - hu_font[c]->width*dupx/2;
|
||||
}
|
||||
else
|
||||
w = SHORT(hu_font[c]->width) * dupx;
|
||||
w = hu_font[c]->width * dupx;
|
||||
|
||||
if (cx > scrwidth)
|
||||
break;
|
||||
@@ -2001,10 +2001,10 @@ void V_DrawKartString(INT32 x, INT32 y, INT32 option, const char *string)
|
||||
if (charwidth)
|
||||
{
|
||||
w = charwidth * dupx;
|
||||
center = w/2 - SHORT(kart_font[c]->width)*dupx/2;
|
||||
center = w/2 - kart_font[c]->width*dupx/2;
|
||||
}
|
||||
else
|
||||
w = SHORT(kart_font[c]->width) * dupx;
|
||||
w = kart_font[c]->width * dupx;
|
||||
|
||||
if (cx > scrwidth)
|
||||
break;
|
||||
@@ -2119,10 +2119,10 @@ void V_DrawSmallString(INT32 x, INT32 y, INT32 option, const char *string)
|
||||
if (charwidth)
|
||||
{
|
||||
w = charwidth * dupx;
|
||||
center = w/2 - SHORT(hu_font[c]->width)*dupx/4;
|
||||
center = w/2 - hu_font[c]->width*dupx/4;
|
||||
}
|
||||
else
|
||||
w = SHORT(hu_font[c]->width) * dupx / 2;
|
||||
w = hu_font[c]->width * dupx / 2;
|
||||
if (cx > scrwidth)
|
||||
break;
|
||||
if (cx+left + w < 0) //left boundary check
|
||||
@@ -2236,8 +2236,8 @@ void V_DrawThinString(INT32 x, INT32 y, INT32 option, const char *string)
|
||||
if (charwidth)
|
||||
w = charwidth * dupx;
|
||||
else
|
||||
w = ((option & V_6WIDTHSPACE ? max(1, SHORT(tny_font[c]->width)-1) // Reuse this flag for the alternate bunched-up spacing
|
||||
: SHORT(tny_font[c]->width)) * dupx);
|
||||
w = ((option & V_6WIDTHSPACE ? max(1, tny_font[c]->width-1) // Reuse this flag for the alternate bunched-up spacing
|
||||
: tny_font[c]->width) * dupx);
|
||||
|
||||
if (cx > scrwidth)
|
||||
break;
|
||||
@@ -2337,10 +2337,10 @@ void V_DrawStringAtFixed(fixed_t x, fixed_t y, INT32 option, const char *string)
|
||||
if (charwidth)
|
||||
{
|
||||
w = charwidth * dupx;
|
||||
center = w/2 - SHORT(hu_font[c]->width)*(dupx/2);
|
||||
center = w/2 - hu_font[c]->width*(dupx/2);
|
||||
}
|
||||
else
|
||||
w = SHORT(hu_font[c]->width) * dupx;
|
||||
w = hu_font[c]->width * dupx;
|
||||
|
||||
if ((cx>>FRACBITS) > scrwidth)
|
||||
break;
|
||||
@@ -2535,10 +2535,10 @@ void V_DrawThinStringAtFixed(fixed_t x, fixed_t y, INT32 option, const char *str
|
||||
if (charwidth)
|
||||
{
|
||||
w = charwidth * dupx;
|
||||
center = w/2 - SHORT(tny_font[c]->width)*(dupx/2);
|
||||
center = w/2 - tny_font[c]->width*(dupx/2);
|
||||
}
|
||||
else
|
||||
w = SHORT(tny_font[c]->width) * dupx;
|
||||
w = tny_font[c]->width * dupx;
|
||||
|
||||
if ((cx>>FRACBITS) > scrwidth)
|
||||
break;
|
||||
@@ -2558,7 +2558,7 @@ void V_DrawThinStringAtFixed(fixed_t x, fixed_t y, INT32 option, const char *str
|
||||
// Draws a tallnum. Replaces two functions in y_inter and st_stuff
|
||||
void V_DrawTallNum(INT32 x, INT32 y, INT32 flags, INT32 num)
|
||||
{
|
||||
INT32 w = SHORT(tallnum[0]->width);
|
||||
INT32 w = tallnum[0]->width;
|
||||
boolean neg;
|
||||
|
||||
if (flags & V_NOSCALESTART)
|
||||
@@ -2584,7 +2584,7 @@ void V_DrawTallNum(INT32 x, INT32 y, INT32 flags, INT32 num)
|
||||
// Does not handle negative numbers in a special way, don't try to feed it any.
|
||||
void V_DrawPaddedTallNum(INT32 x, INT32 y, INT32 flags, INT32 num, INT32 digits)
|
||||
{
|
||||
INT32 w = SHORT(tallnum[0]->width);
|
||||
INT32 w = tallnum[0]->width;
|
||||
|
||||
if (flags & V_NOSCALESTART)
|
||||
w *= vid.dupx;
|
||||
@@ -2605,7 +2605,7 @@ void V_DrawPaddedTallNum(INT32 x, INT32 y, INT32 flags, INT32 num, INT32 digits)
|
||||
// Does not handle negative numbers in a special way, don't try to feed it any.
|
||||
void V_DrawPaddedTallColorNum(INT32 x, INT32 y, INT32 flags, INT32 num, INT32 digits, const UINT8 *colormap)
|
||||
{
|
||||
INT32 w = SHORT(tallnum[0]->width);
|
||||
INT32 w = tallnum[0]->width;
|
||||
|
||||
if (flags & V_NOSCALESTART)
|
||||
w *= vid.dupx;
|
||||
@@ -2627,7 +2627,7 @@ void V_DrawPaddedTallColorNum(INT32 x, INT32 y, INT32 flags, INT32 num, INT32 di
|
||||
|
||||
INT32 V_DrawPingNum(INT32 x, INT32 y, INT32 flags, INT32 num, const UINT8 *colormap)
|
||||
{
|
||||
INT32 w = SHORT(pingnum[0]->width); // this SHOULD always be 5 but I guess custom graphics exist.
|
||||
INT32 w = pingnum[0]->width; // this SHOULD always be 5 but I guess custom graphics exist.
|
||||
|
||||
if (flags & V_NOSCALESTART)
|
||||
w *= vid.dupx;
|
||||
@@ -2650,7 +2650,7 @@ INT32 V_DrawPingNum(INT32 x, INT32 y, INT32 flags, INT32 num, const UINT8 *color
|
||||
//
|
||||
void V_DrawRankNum(INT32 x, INT32 y, INT32 flags, INT32 num, INT32 digits, const UINT8 *colormap)
|
||||
{
|
||||
INT32 w = SHORT(ranknum[0]->width) - 1;
|
||||
INT32 w = ranknum[0]->width - 1;
|
||||
|
||||
if (flags & V_NOSCALESTART)
|
||||
w *= vid.dupx;
|
||||
@@ -2709,7 +2709,7 @@ void V_DrawCreditString(fixed_t x, fixed_t y, INT32 option, const char *string)
|
||||
continue;
|
||||
}
|
||||
|
||||
w = SHORT(cred_font[c]->width) * dupx;
|
||||
w = cred_font[c]->width * dupx;
|
||||
if ((cx>>FRACBITS) > scrwidth)
|
||||
break;
|
||||
|
||||
@@ -2735,7 +2735,7 @@ INT32 V_CreditStringWidth(const char *string)
|
||||
if (c < 0 || c >= CRED_FONTSIZE)
|
||||
w += 16;
|
||||
else
|
||||
w += SHORT(cred_font[c]->width);
|
||||
w += cred_font[c]->width;
|
||||
}
|
||||
|
||||
return w;
|
||||
@@ -2782,7 +2782,7 @@ void V_DrawLevelTitle(INT32 x, INT32 y, INT32 option, const char *string)
|
||||
continue;
|
||||
}
|
||||
|
||||
w = SHORT(lt_font[c]->width) * dupx;
|
||||
w = lt_font[c]->width * dupx;
|
||||
if (cx > scrwidth)
|
||||
break;
|
||||
if (cx+left + w < 0) //left boundary check
|
||||
@@ -2809,7 +2809,7 @@ INT32 V_LevelNameWidth(const char *string)
|
||||
if (c < 0 || c >= LT_FONTSIZE || !lt_font[c])
|
||||
w += 12;
|
||||
else
|
||||
w += SHORT(lt_font[c]->width);
|
||||
w += lt_font[c]->width;
|
||||
}
|
||||
|
||||
return w;
|
||||
@@ -2828,8 +2828,8 @@ INT32 V_LevelNameHeight(const char *string)
|
||||
if (c < 0 || c >= LT_FONTSIZE || !lt_font[c])
|
||||
continue;
|
||||
|
||||
if (SHORT(lt_font[c]->height) > w)
|
||||
w = SHORT(lt_font[c]->height);
|
||||
if (lt_font[c]->height > w)
|
||||
w = lt_font[c]->height;
|
||||
}
|
||||
|
||||
return w;
|
||||
@@ -2871,7 +2871,7 @@ INT32 V_SubStringWidth(const char *string, INT32 length, INT32 option)
|
||||
if (c < 0 || c >= HU_FONTSIZE || !hu_font[c])
|
||||
w += spacewidth;
|
||||
else
|
||||
w += (charwidth ? charwidth : SHORT(hu_font[c]->width));
|
||||
w += (charwidth ? charwidth : hu_font[c]->width);
|
||||
}
|
||||
|
||||
return w;
|
||||
@@ -2913,7 +2913,7 @@ INT32 V_SmallSubStringWidth(const char *string, INT32 length, INT32 option)
|
||||
if (c < 0 || c >= HU_FONTSIZE || !hu_font[c])
|
||||
w += spacewidth;
|
||||
else
|
||||
w += (charwidth ? charwidth : SHORT(hu_font[c]->width)/2);
|
||||
w += (charwidth ? charwidth : hu_font[c]->width/2);
|
||||
}
|
||||
|
||||
return w;
|
||||
@@ -2965,8 +2965,8 @@ INT32 V_ThinSubStringWidth(const char *string, INT32 length, INT32 option)
|
||||
else
|
||||
{
|
||||
w += (charwidth ? charwidth
|
||||
: ((option & V_6WIDTHSPACE && i < length-1) ? max(1, SHORT(tny_font[c]->width)-1) // Reuse this flag for the alternate bunched-up spacing
|
||||
: SHORT(tny_font[c]->width)));
|
||||
: ((option & V_6WIDTHSPACE && i < length-1) ? max(1, tny_font[c]->width-1) // Reuse this flag for the alternate bunched-up spacing
|
||||
: tny_font[c]->width));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3007,7 +3007,7 @@ INT32 V_SubStringLengthToFit(const char *string, INT32 width, INT32 option)
|
||||
if (c < 0 || c >= HU_FONTSIZE || !hu_font[c])
|
||||
w += spacewidth;
|
||||
else
|
||||
w += (charwidth ? charwidth : SHORT(hu_font[c]->width));
|
||||
w += (charwidth ? charwidth : hu_font[c]->width);
|
||||
}
|
||||
|
||||
return max(i-1, 0);
|
||||
|
||||
@@ -1814,7 +1814,6 @@ void *W_GetCachedRotPatchPwad(UINT16 wadnum, UINT16 lumpnum)
|
||||
|
||||
return (void *)rspr;
|
||||
}
|
||||
|
||||
#endif // ROTSPRITE
|
||||
|
||||
void W_UnlockCachedPatch(void *patch)
|
||||
|
||||
+4
-4
@@ -923,8 +923,8 @@ static void Y_DrawAnimatedVoteScreenPatch(boolean widePatch)
|
||||
currentAnimFrame = 0;
|
||||
|
||||
patch_t *background = W_CachePatchName(va("%s%d", tempAnimPrefix, currentAnimFrame + 1), PU_CACHE);
|
||||
V_DrawScaledPatch(((vid.width/2) / vid.dupx) - (SHORT(background->width)/2), // Keep the width/height adjustments, for screens that are less wide than 320(?)
|
||||
(vid.height / vid.dupy) - SHORT(background->height),
|
||||
V_DrawScaledPatch(((vid.width/2) / vid.dupx) - (background->width/2), // Keep the width/height adjustments, for screens that are less wide than 320(?)
|
||||
(vid.height / vid.dupy) - background->height,
|
||||
V_SNAPTOTOP|V_SNAPTOLEFT, background);
|
||||
|
||||
if (renderisnewtic && votetic % 2 == 0 && !paused)
|
||||
@@ -954,8 +954,8 @@ static void Y_DrawVoteScreenPatch(void)
|
||||
votebg = widebgpatch;
|
||||
}
|
||||
|
||||
V_DrawScaledPatch(((vid.width/2) / vid.dupx) - (SHORT(votebg->width)/2),
|
||||
(vid.height / vid.dupy) - SHORT(votebg->height),
|
||||
V_DrawScaledPatch(((vid.width/2) / vid.dupx) - (votebg->width/2),
|
||||
(vid.height / vid.dupy) - votebg->height,
|
||||
V_SNAPTOTOP|V_SNAPTOLEFT, votebg);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user