- removed some dead code.

This commit is contained in:
Christoph Oelckers 2020-08-14 21:12:32 +02:00
parent 19635c7bdf
commit 249c5b5734
18 changed files with 29 additions and 163 deletions

View file

@ -96,15 +96,7 @@ void CGameMenuItemQAV::Draw(void)
at2c = data->at10; at2c = data->at10;
} }
data->Play(data->at10 - at2c - nTicks, data->at10 - at2c, -1, NULL); data->Play(data->at10 - at2c - nTicks, data->at10 - at2c, -1, NULL);
int wx1, wy1, wx2, wy2;
wx1 = windowxy1.x;
wy1 = windowxy1.y;
wx2 = windowxy2.x;
wy2 = windowxy2.y;
windowxy1.x = 0;
windowxy1.y = 0;
windowxy2.x = xdim - 1;
windowxy2.y = ydim - 1;
if (bWideScreen) if (bWideScreen)
{ {
int xdim43 = scale(ydim, 4, 3); int xdim43 = scale(ydim, 4, 3);
@ -120,10 +112,6 @@ void CGameMenuItemQAV::Draw(void)
else else
data->Draw(data->at10 - at2c, 10, 0, 0, 0, false); data->Draw(data->at10 - at2c, 10, 0, 0, 0, false);
windowxy1.x = wx1;
windowxy1.y = wy1;
windowxy2.x = wx2;
windowxy2.y = wy2;
gFrameClock = backFC; gFrameClock = backFC;
} }
} }

View file

@ -698,24 +698,6 @@ static FORCE_INLINE void rotatesprite(int32_t sx, int32_t sy, int32_t z, int16_t
{ {
rotatesprite_(sx, sy, z, a, picnum, dashade, dapalnum, dastat, 0, 0, cx1, cy1, cx2, cy2, pic, basepal); rotatesprite_(sx, sy, z, a, picnum, dashade, dapalnum, dastat, 0, 0, cx1, cy1, cx2, cy2, pic, basepal);
} }
// Don't clip at all, i.e. the whole screen real estate is available:
static FORCE_INLINE void rotatesprite_fs(int32_t sx, int32_t sy, int32_t z, int16_t a, int16_t picnum,
int8_t dashade, uint8_t dapalnum, int32_t dastat, FGameTexture* pic = nullptr, int basepal = 0)
{
rotatesprite_(sx, sy, z, a, picnum, dashade, dapalnum, dastat, 0, 0, 0,0,xdim-1,ydim-1, pic, basepal);
}
static FORCE_INLINE void rotatesprite_fs_alpha(int32_t sx, int32_t sy, int32_t z, int16_t a, int16_t picnum,
int8_t dashade, uint8_t dapalnum, int32_t dastat, uint8_t alpha)
{
rotatesprite_(sx, sy, z, a, picnum, dashade, dapalnum, dastat, alpha, 0, 0, 0, xdim-1, ydim-1);
}
static FORCE_INLINE void rotatesprite_win(int32_t sx, int32_t sy, int32_t z, int16_t a, int16_t picnum,
int8_t dashade, uint8_t dapalnum, int32_t dastat)
{
rotatesprite_(sx, sy, z, a, picnum, dashade, dapalnum, dastat, 0, 0, windowxy1.x,windowxy1.y,windowxy2.x,windowxy2.y);
}
void getzrange(const vec3_t *pos, int16_t sectnum, int32_t *ceilz, int32_t *ceilhit, int32_t *florz, void getzrange(const vec3_t *pos, int16_t sectnum, int32_t *ceilz, int32_t *ceilhit, int32_t *florz,
int32_t *florhit, int32_t walldist, uint32_t cliptype) ATTRIBUTE((nonnull(1,3,4,5,6))); int32_t *florhit, int32_t walldist, uint32_t cliptype) ATTRIBUTE((nonnull(1,3,4,5,6)));

View file

@ -355,8 +355,6 @@ CUSTOM_CVARD(Float, r_ambientlight, 1.0, CVAR_ARCHIVE|CVAR_GLOBALCONFIG, "sets t
CVARD(Bool, r_shadows, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG, "enable/disable sprite and model shadows") CVARD(Bool, r_shadows, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG, "enable/disable sprite and model shadows")
// Gross hack stuff. Only settable from the command line
CVARD(Bool, r_rotatespritenowidescreen, false, CVAR_NOSET, "pass bit 1024 to all CON rotatesprite calls")
CVARD(Bool, r_precache, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG, "enable/disable the pre-level caching routine") CVARD(Bool, r_precache, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG, "enable/disable the pre-level caching routine")
CUSTOM_CVARD(String, wchoice, "3457860291", CVAR_ARCHIVE | CVAR_NOINITCALL | CVAR_FRONTEND_DUKELIKE, "sets weapon autoselection order") CUSTOM_CVARD(String, wchoice, "3457860291", CVAR_ARCHIVE | CVAR_NOINITCALL | CVAR_FRONTEND_DUKELIKE, "sets weapon autoselection order")

View file

@ -78,7 +78,6 @@ EXTERN_CVAR(Int, r_showfps)
EXTERN_CVAR(Int, r_showfpsperiod) EXTERN_CVAR(Int, r_showfpsperiod)
EXTERN_CVAR(Float, r_ambientlight) EXTERN_CVAR(Float, r_ambientlight)
EXTERN_CVAR(Bool, r_shadows) EXTERN_CVAR(Bool, r_shadows)
EXTERN_CVAR(Bool, r_rotatespritenowidescreen)
EXTERN_CVAR(Bool, r_precache) EXTERN_CVAR(Bool, r_precache)
EXTERN_CVAR(Bool, r_voxels) EXTERN_CVAR(Bool, r_voxels)
EXTERN_CVAR(Int, r_upscalefactor) EXTERN_CVAR(Int, r_upscalefactor)

View file

@ -71,7 +71,8 @@ void ImageScreen::Drawer()
else tileindex = *tileindexp; else tileindex = *tileindexp;
if (!gi->DrawSpecialScreen(origin, tileindex)) // allows the front end to do custom handling for a given image. if (!gi->DrawSpecialScreen(origin, tileindex)) // allows the front end to do custom handling for a given image.
{ {
rotatesprite_fs(int(origin.X * 65536) + (160 << 16), int(origin.Y * 65536) + (100 << 16), 65536L, 0, tileindex, 0, 0, 10 + 64); DrawTexture(twod, tileGetTexture(tileindex), origin.X, origin.Y, DTA_FullscreenScale, 3, DTA_VirtualWidth, 320, DTA_VirtualHeight, 200,
DTA_TopLeft, true, DTA_LegacyRenderStyle, STYLE_Normal, TAG_DONE);
} }
} }
else if (mDesc->type > 0) else if (mDesc->type > 0)

View file

@ -221,6 +221,13 @@ void AnimZilla(int frame, int numframes)
} }
} }
// Used nowhere else anymore, will go away with the rest of this file.
static void rotatesprite_fs(int32_t sx, int32_t sy, int32_t z, int16_t a, int16_t picnum,
int8_t dashade, uint8_t dapalnum, int32_t dastat, FGameTexture* pic = nullptr, int basepal = 0)
{
rotatesprite_(sx, sy, z, a, picnum, dashade, dapalnum, dastat, 0, 0, 0,0,xdim-1,ydim-1, pic, basepal);
}
void void
playanm(short anim_num) playanm(short anim_num)
{ {

View file

@ -257,7 +257,7 @@ void GameInterface::DrawMenuCaption(const DVector2& origin, const char* text)
short w, h; short w, h;
// Draw the backdrop bar // Draw the backdrop bar
rotatesprite(10 << 16, (5-3) << 16, 65536, 0, 2427, rotatesprite(10 << 16, (5-3) << 16, 65536, 0, 2427,
2, 0, MenuDrawFlags|ROTATE_SPRITE_CORNER, 0, 0, xdim - 1, ydim - 1); 2, 0, MenuDrawFlags|RS_TOPLEFT, 0, 0, xdim - 1, ydim - 1);
MNU_MeasureStringLarge(text, &w, &h); MNU_MeasureStringLarge(text, &w, &h);
MNU_DrawStringLarge(TEXT_XCENTER(w), 5, text, 1); MNU_DrawStringLarge(TEXT_XCENTER(w), 5, text, 1);
} }

View file

@ -66,7 +66,6 @@ extern char buffer[];
SWBOOL DrawScreen; SWBOOL DrawScreen;
extern short f_c; extern short f_c;
extern SWBOOL HelpInputMode;
extern short HelpPage; extern short HelpPage;
extern short HelpPagePic[]; extern short HelpPagePic[];
extern ParentalStruct aVoxelArray[MAXTILES]; extern ParentalStruct aVoxelArray[MAXTILES];
@ -1465,34 +1464,6 @@ void DrawCheckKeys(PLAYERp pp)
ResizeView(pp); ResizeView(pp);
} }
void DrawMessageInput(void)
{
short w,h;
static SWBOOL cur_show;
short c;
// Used to make cursor fade in and out
c = 4-(sintable[((int32_t) totalclock<<4)&2047]>>11);
if (MessageInputMode)
{
MNU_MeasureSmallString(MessageInputString, &w, &h);
cur_show ^= 1;
if (cur_show)
{
minigametext(TEXT_XCENTER(w), MESSAGE_LINE, MessageInputString,ROTATE_SPRITE_SCREEN_CLIP);
rotatesprite((TEXT_XCENTER(w)+w+2)<<16,(MESSAGE_LINE+1)<<16,20000,0,COINCURSOR+(((int32_t) totalclock>>3)%7),c,0,ROTATE_SPRITE_SCREEN_CLIP,0,0,xdim-1,ydim-1);
}
else
{
minigametext(TEXT_XCENTER(w), MESSAGE_LINE, MessageInputString,ROTATE_SPRITE_SCREEN_CLIP);
rotatesprite((TEXT_XCENTER(w)+w+2)<<16,(MESSAGE_LINE+1)<<16,20000,0,COINCURSOR+(((int32_t) totalclock>>3)%7),c,0,ROTATE_SPRITE_SCREEN_CLIP,0,0,xdim-1,ydim-1);
}
}
}
void DrawCrosshair(PLAYERp pp) void DrawCrosshair(PLAYERp pp)
{ {
extern SWBOOL DemoMode,CameraTestMode; extern SWBOOL DemoMode,CameraTestMode;
@ -1513,11 +1484,8 @@ void DrawCrosshair(PLAYERp pp)
//NORMALXHAIR: //NORMALXHAIR:
rotatesprite(160<<16, 100<<16, (1 << 16), 0, rotatesprite(160<<16, 100<<16, (1 << 16), 0,
2326, 10, 0, 2326, 10, 0,
ROTATE_SPRITE_VIEW_CLIP, windowxy1.x, windowxy1.y, windowxy2.x, windowxy2.y); 0, windowxy1.x, windowxy1.y, windowxy2.x, windowxy2.y);
} }
//#define TITLE_ROT_FLAGS (ROTATE_SPRITE_CORNER|ROTATE_SPRITE_SCREEN_CLIP|ROTATE_SPRITE_NON_MASK)
} }
void CameraView(PLAYERp pp, int *tx, int *ty, int *tz, short *tsectnum, fix16_t *tq16ang, fix16_t *tq16horiz) void CameraView(PLAYERp pp, int *tx, int *ty, int *tz, short *tsectnum, fix16_t *tq16ang, fix16_t *tq16horiz)
@ -1890,35 +1858,6 @@ drawscreen(PLAYERp pp)
int const viewingRange = viewingrange; int const viewingRange = viewingrange;
if (HelpInputMode)
{
renderFlushPerms();
// note - could put Order Info Pages at the top like this also
rotatesprite(0,0,65536L,0,HelpPagePic[HelpPage],0,0,
(ROTATE_SPRITE_CORNER|ROTATE_SPRITE_SCREEN_CLIP|ROTATE_SPRITE_NON_MASK|ROTATE_SPRITE_IGNORE_START_MOST),
0, 0, xdim-1, ydim-1);
videoNextPage();
return;
}
#if 0
if (TenScreenMode)
{
#define TEN_PIC 5109
renderFlushPerms();
// note - could put Order Info Pages at the top like this also
rotatesprite(0,0,65536L,0,TEN_PIC,0,0,
(ROTATE_SPRITE_CORNER|ROTATE_SPRITE_SCREEN_CLIP|ROTATE_SPRITE_NON_MASK|ROTATE_SPRITE_IGNORE_START_MOST),
0, 0, xdim-1, ydim-1);
videoNextPage();
return;
}
#endif
DrawScreen = TRUE; DrawScreen = TRUE;
PreDraw(); PreDraw();
// part of new border refresh method // part of new border refresh method
@ -2209,8 +2148,6 @@ drawscreen(PLAYERp pp)
// Boss Health Meter, if Boss present // Boss Health Meter, if Boss present
BossHealthMeter(); BossHealthMeter();
DrawMessageInput(); // This is only used for non-multiplayer input now
if (!M_Active()) if (!M_Active())
SecretInfo(pp); SecretInfo(pp);

View file

@ -124,7 +124,7 @@ extern int sw_snd_scratch;
#define STAT_SCREEN_PIC 5114 #define STAT_SCREEN_PIC 5114
#define TITLE_PIC 2324 #define TITLE_PIC 2324
#define THREED_REALMS_PIC 2325 #define THREED_REALMS_PIC 2325
#define TITLE_ROT_FLAGS (ROTATE_SPRITE_CORNER|ROTATE_SPRITE_SCREEN_CLIP|ROTATE_SPRITE_NON_MASK) #define TITLE_ROT_FLAGS (RS_TOPLEFT|ROTATE_SPRITE_SCREEN_CLIP|ROTATE_SPRITE_NON_MASK)
#define PAL_SIZE (256*3) #define PAL_SIZE (256*3)
char DemoName[15][16]; char DemoName[15][16];
@ -165,11 +165,9 @@ SWBOOL MultiPlayQuitFlag = FALSE;
//Miscellaneous variables //Miscellaneous variables
char MessageInputString[256]; char MessageInputString[256];
char MessageOutputString[256]; char MessageOutputString[256];
SWBOOL MessageInputMode = FALSE;
SWBOOL ConInputMode = FALSE; SWBOOL ConInputMode = FALSE;
SWBOOL ConPanel = FALSE; SWBOOL ConPanel = FALSE;
SWBOOL FinishedLevel = FALSE; SWBOOL FinishedLevel = FALSE;
SWBOOL HelpInputMode = FALSE;
SWBOOL PanelUpdateMode = TRUE; SWBOOL PanelUpdateMode = TRUE;
short HelpPage = 0; short HelpPage = 0;
short HelpPagePic[] = { 5115, 5116, 5117 }; short HelpPagePic[] = { 5115, 5116, 5117 };

View file

@ -227,7 +227,6 @@ y++
////////////////////////////////////////////////////// //////////////////////////////////////////////////////
extern SWBOOL MenuInputMode; extern SWBOOL MenuInputMode;
extern SWBOOL MessageInputMode;
extern SWBOOL ConInputMode; extern SWBOOL ConInputMode;
extern SWBOOL ConPanel; extern SWBOOL ConPanel;
extern SWBOOL InputMode; extern SWBOOL InputMode;
@ -586,15 +585,8 @@ EDUKE32_STATIC_ASSERT(isPow2(MAXSECTORS));
#define OVER_SPRITE_YFLIP (BIT(4)) #define OVER_SPRITE_YFLIP (BIT(4))
// rotatesprite flags // rotatesprite flags
#define ROTATE_SPRITE_TRANSLUCENT (BIT(0))
#define ROTATE_SPRITE_VIEW_CLIP (BIT(1)) // clip to view
#define ROTATE_SPRITE_YFLIP (BIT(2))
#define ROTATE_SPRITE_IGNORE_START_MOST (BIT(3)) // don't clip to startumost
#define ROTATE_SPRITE_SCREEN_CLIP (BIT(1)|BIT(3)) // use window #define ROTATE_SPRITE_SCREEN_CLIP (BIT(1)|BIT(3)) // use window
#define ROTATE_SPRITE_CORNER (BIT(4)) // place sprite from upper left corner
#define ROTATE_SPRITE_TRANS_FLIP (BIT(5))
#define ROTATE_SPRITE_NON_MASK (BIT(6)) // non masked sprites #define ROTATE_SPRITE_NON_MASK (BIT(6)) // non masked sprites
#define ROTATE_SPRITE_ALL_PAGES (BIT(7)) // copies to all pages
#define RS_SCALE BIT(16) #define RS_SCALE BIT(16)

View file

@ -229,8 +229,6 @@ void operatefta(void)
j=MESSAGE_LINE; // Base line position on screen j=MESSAGE_LINE; // Base line position on screen
quotebot = min(quotebot,j); quotebot = min(quotebot,j);
quotebotgoal = min(quotebotgoal,j); quotebotgoal = min(quotebotgoal,j);
if (MessageInputMode)
j -= 6; // Bump all lines up one to make room for new line
quotebotgoal = j; quotebotgoal = j;
j = quotebot; j = quotebot;
@ -275,7 +273,7 @@ void addconquote(const char *daquote)
strcpy(con_quote[0],daquote); strcpy(con_quote[0],daquote);
} }
#define CON_ROT_FLAGS (ROTATE_SPRITE_CORNER|ROTATE_SPRITE_SCREEN_CLIP|ROTATE_SPRITE_NON_MASK) #define CON_ROT_FLAGS (RS_TOPLEFT|ROTATE_SPRITE_SCREEN_CLIP|ROTATE_SPRITE_NON_MASK)
void operateconfta(void) void operateconfta(void)
{ {
int i, j; int i, j;

View file

@ -222,7 +222,7 @@ void MNU_DrawStringLarge(short x, short y, const char *string, int shade)
continue; continue;
} }
rotatesprite(offset << 16, y << 16, MZ, 0, pic, shade, 0, MenuDrawFlags|ROTATE_SPRITE_CORNER, 0, 0, xdim - 1, ydim - 1); rotatesprite(offset << 16, y << 16, MZ, 0, pic, shade, 0, MenuDrawFlags|RS_TOPLEFT, 0, 0, xdim - 1, ydim - 1);
offset += tilesiz[pic].x + 1; offset += tilesiz[pic].x + 1;
} }

View file

@ -54,7 +54,6 @@ void MoveSectorObjects(SECTOR_OBJECTp sop, short locktics);
inline int TEXT_INFO_LINE(int line) { return (TEXT_INFO_Y + ((line)*TEXT_INFO_YOFF)); } inline int TEXT_INFO_LINE(int line) { return (TEXT_INFO_Y + ((line)*TEXT_INFO_YOFF)); }
void DisplayMiniBarSmString(PLAYERp pp, short xs, short ys, short pal, const char* buffer); void DisplayMiniBarSmString(PLAYERp pp, short xs, short ys, short pal, const char* buffer);
void DisplayMiniBarNumber(short xs, short ys, int number);
void PutStringInfo(PLAYERp pp, const char* string); void PutStringInfo(PLAYERp pp, const char* string);
void PutStringInfoLine(PLAYERp pp, const char* string); void PutStringInfoLine(PLAYERp pp, const char* string);
void PutStringInfoLine2(PLAYERp pp, const char* string); void PutStringInfoLine2(PLAYERp pp, const char* string);

View file

@ -7106,7 +7106,7 @@ pDisplaySprites(PLAYERp pp)
if (pp->InventoryActive[INVENTORY_CLOAK]) if (pp->InventoryActive[INVENTORY_CLOAK])
{ {
SET(flags, ROTATE_SPRITE_TRANSLUCENT); SET(flags, RS_TRANS1);
} }
//shade = overlay_shade = DIV2(sector[pp->cursectnum].floorshade + sector[pp->cursectnum].ceilingshade); //shade = overlay_shade = DIV2(sector[pp->cursectnum].floorshade + sector[pp->cursectnum].ceilingshade);
@ -7127,20 +7127,17 @@ pDisplaySprites(PLAYERp pp)
pal = 0; pal = 0;
} }
SET(flags, ROTATE_SPRITE_VIEW_CLIP);
if (TEST(psp->flags, PANF_TRANSLUCENT)) if (TEST(psp->flags, PANF_TRANSLUCENT))
SET(flags, ROTATE_SPRITE_TRANSLUCENT); SET(flags, RS_TRANS1);
SET(flags, TEST(psp->flags, PANF_TRANS_FLIP)); SET(flags, TEST(psp->flags, PANF_TRANS_FLIP));
if (TEST(psp->flags, PANF_CORNER)) if (TEST(psp->flags, PANF_CORNER))
SET(flags, ROTATE_SPRITE_CORNER); SET(flags, RS_TOPLEFT);
if ((psp->State && TEST(psp->State->flags, psf_Xflip)) || TEST(psp->flags, PANF_XFLIP)) if ((psp->State && TEST(psp->State->flags, psf_Xflip)) || TEST(psp->flags, PANF_XFLIP))
{ {
// Build has no xflip, so it uses yflip plus rotation. We don't need the rotation here. SET(flags, RS_XFLIPHUD);
SET(flags, ROTATE_SPRITE_YFLIP);
} }
// shading // shading
@ -7186,9 +7183,9 @@ pDisplaySprites(PLAYERp pp)
case BLOODYFIST3_SWING0: case BLOODYFIST3_SWING0:
case BLOODYFIST3_SWING1: case BLOODYFIST3_SWING1:
case BLOODYFIST3_SWING2: case BLOODYFIST3_SWING2:
if (TEST(flags, ROTATE_SPRITE_YFLIP) && x > 160) if (TEST(flags, RS_XFLIPHUD) && x > 160)
x = 65; x = 65;
else if (!TEST(flags, ROTATE_SPRITE_YFLIP) && x < 160) else if (!TEST(flags, RS_XFLIPHUD) && x < 160)
x = 345; x = 345;
break; break;
default: default:

View file

@ -89,7 +89,6 @@ struct PANEL_STATEstruct
#define PANF_JUMPING (BIT(21)) #define PANF_JUMPING (BIT(21))
#define PANF_FALLING (BIT(22)) #define PANF_FALLING (BIT(22))
#define PANF_DRAW_BEFORE_VIEW (BIT(30)) // draw before drawrooms #define PANF_DRAW_BEFORE_VIEW (BIT(30)) // draw before drawrooms
#define PANF_NOT_ALL_PAGES (BIT(31)) // DONT use permanentwritesprite bit for rotatesprite
typedef void (*PANEL_SPRITE_FUNCp)(PANEL_SPRITEp); typedef void (*PANEL_SPRITE_FUNCp)(PANEL_SPRITEp);

View file

@ -2494,7 +2494,7 @@ MoveScrollMode2D(PLAYERp pp)
int32_t keymove; int32_t keymove;
int32_t momx, momy; int32_t momx, momy;
static int mfvel=0, mfsvel=0; static int mfvel=0, mfsvel=0;
extern SWBOOL HelpInputMode, ScrollMode2D; extern SWBOOL ScrollMode2D;
CONTROL_GetInput(&scrl_input); CONTROL_GetInput(&scrl_input);
@ -2538,7 +2538,7 @@ MoveScrollMode2D(PLAYERp pp)
keymove = NORMALKEYMOVE; keymove = NORMALKEYMOVE;
} }
if (!HelpInputMode && !ConPanel) if (!ConPanel)
{ {
if (buttonMap.ButtonDown(gamefunc_Turn_Left)) if (buttonMap.ButtonDown(gamefunc_Turn_Left))
{ {
@ -2550,7 +2550,7 @@ MoveScrollMode2D(PLAYERp pp)
} }
} }
if (!InputMode && !ConPanel) if (!ConPanel)
{ {
if (buttonMap.ButtonDown(gamefunc_Strafe_Left)) if (buttonMap.ButtonDown(gamefunc_Strafe_Left))
{ {
@ -2563,7 +2563,7 @@ MoveScrollMode2D(PLAYERp pp)
} }
} }
if (!HelpInputMode && !ConPanel) if (!ConPanel)
{ {
if (buttonMap.ButtonDown(gamefunc_Move_Forward)) if (buttonMap.ButtonDown(gamefunc_Move_Forward))
{ {
@ -7645,10 +7645,9 @@ void PlayerTimers(PLAYERp pp)
void ChopsCheck(PLAYERp pp) void ChopsCheck(PLAYERp pp)
{ {
extern SWBOOL HelpInputMode;
extern int ChopTics; extern int ChopTics;
if (!M_Active() && !HelpInputMode && !TEST(pp->Flags, PF_DEAD) && !pp->sop_riding && numplayers <= 1) if (!M_Active() && !TEST(pp->Flags, PF_DEAD) && !pp->sop_riding && numplayers <= 1)
{ {
if ((pp->input.bits|pp->input.vel|pp->input.svel|pp->input.q16angvel|pp->input.q16aimvel) || if ((pp->input.bits|pp->input.vel|pp->input.svel|pp->input.q16angvel|pp->input.q16aimvel) ||
TEST(pp->Flags, PF_CLIMBING|PF_FALLING|PF_DIVING)) TEST(pp->Flags, PF_CLIMBING|PF_FALLING|PF_DIVING))

View file

@ -730,7 +730,7 @@ class DSWStatusBar : public DBaseStatusBar
DrawGraphic(tileGetTexture(MINI_BAR_HEALTH_BOX_PIC), x, y, DI_ITEM_LEFT_TOP, 1, -1, -1, 1, 1); DrawGraphic(tileGetTexture(MINI_BAR_HEALTH_BOX_PIC), x, y, DI_ITEM_LEFT_TOP, 1, -1, -1, 1, 1);
x = MINI_BAR_HEALTH_BOX_X + 3; x = MINI_BAR_HEALTH_BOX_X + 3;
DisplayMiniBarNumber(x, y + 5, u->Health); DisplayPanelNumber(x, y + 5, u->Health);
if (u->WeaponNum != WPN_SWORD && u->WeaponNum != WPN_FIST) if (u->WeaponNum != WPN_SWORD && u->WeaponNum != WPN_FIST)
{ {
@ -738,7 +738,7 @@ class DSWStatusBar : public DBaseStatusBar
DrawGraphic(tileGetTexture(MINI_BAR_AMMO_BOX_PIC), x, y, DI_ITEM_LEFT_TOP, 1, -1, -1, 1, 1); DrawGraphic(tileGetTexture(MINI_BAR_AMMO_BOX_PIC), x, y, DI_ITEM_LEFT_TOP, 1, -1, -1, 1, 1);
x = MINI_BAR_AMMO_BOX_X + 3; x = MINI_BAR_AMMO_BOX_X + 3;
DisplayMiniBarNumber(x, y + 5, pp->WpnAmmo[u->WeaponNum]); DisplayPanelNumber(x, y + 5, pp->WpnAmmo[u->WeaponNum]);
} }
if (!pp->InventoryAmount[pp->InventoryNum]) if (!pp->InventoryAmount[pp->InventoryNum])

View file

@ -182,34 +182,6 @@ PANEL_SPRITEp pClearSpriteID(PLAYERp pp, short id)
} }
void
DisplayMiniBarNumber(short xs, short ys, int number)
{
char buffer[32];
char *ptr;
short x, size;
short pic;
sprintf(buffer, "%03d", number);
for (ptr = buffer, x = xs; *ptr; ptr++, x += size)
{
if (!isdigit(*ptr))
{
size = 0;
continue;
}
pic = PANEL_FONT_G + (*ptr - '0');
rotatesprite((long)x << 16, (long)ys << 16, (1 << 16), 0,
pic, 0, 0,
ROTATE_SPRITE_SCREEN_CLIP | ROTATE_SPRITE_CORNER | RS_ALIGN_L,
0, 0, xdim - 1, ydim - 1);
size = tilesiz[PANEL_FONT_G + (*ptr - '0')].x + 1;
}
}
void void
DisplayMiniBarSmString(PLAYERp UNUSED(pp), short xs, short ys, short pal, const char *buffer) DisplayMiniBarSmString(PLAYERp UNUSED(pp), short xs, short ys, short pal, const char *buffer)
@ -231,7 +203,7 @@ DisplayMiniBarSmString(PLAYERp UNUSED(pp), short xs, short ys, short pal, const
pic = FRAG_FIRST_TILE + (*ptr - FRAG_FIRST_ASCII); pic = FRAG_FIRST_TILE + (*ptr - FRAG_FIRST_ASCII);
rotatesprite((int)x << 16, (int)ys << 16, (1 << 16), 0, pic, 0, pal, rotatesprite((int)x << 16, (int)ys << 16, (1 << 16), 0, pic, 0, pal,
ROTATE_SPRITE_SCREEN_CLIP | ROTATE_SPRITE_CORNER | RS_ALIGN_L, ROTATE_SPRITE_SCREEN_CLIP | RS_TOPLEFT | RS_ALIGN_L,
0, 0, xdim - 1, ydim - 1); 0, 0, xdim - 1, ydim - 1);
} }
} }