mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-01 14:11:01 +00:00
- cleaned up the remnants of the old statusbar code.
This commit is contained in:
parent
67c340b573
commit
a5d9886aa9
12 changed files with 49 additions and 219 deletions
|
@ -51,50 +51,6 @@ short DebugBorderShade = 0;
|
||||||
#define X_TO_FIXED(val) (x_aspect_mul*(val))
|
#define X_TO_FIXED(val) (x_aspect_mul*(val))
|
||||||
#define Y_TO_FIXED(val) (y_aspect_mul*(val))
|
#define Y_TO_FIXED(val) (y_aspect_mul*(val))
|
||||||
|
|
||||||
extern SWBOOL BorderAdjust;
|
|
||||||
|
|
||||||
void
|
|
||||||
SetFragBar(PLAYERp pp)
|
|
||||||
{
|
|
||||||
short i, num_frag_bars;
|
|
||||||
int y;
|
|
||||||
extern int16_t OrigCommPlayers;
|
|
||||||
|
|
||||||
if (numplayers <= 1)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (gNet.MultiGameType == MULTI_GAME_COOPERATIVE)
|
|
||||||
return;
|
|
||||||
|
|
||||||
// if player sprite has not been initialized we have no business
|
|
||||||
// sticking a frag bar up. Prevents processing from MenuLevel etc.
|
|
||||||
if (!pp->SpriteP)
|
|
||||||
return;
|
|
||||||
|
|
||||||
//num_frag_bars = ((numplayers-1)/4)+1;
|
|
||||||
num_frag_bars = ((OrigCommPlayers-1)/4)+1;
|
|
||||||
|
|
||||||
for (i = windowxy1.x; i <= windowxy2.x; i++)
|
|
||||||
{
|
|
||||||
y = (tilesiz[FRAG_BAR].y * num_frag_bars) - (2 * (num_frag_bars-1));
|
|
||||||
y = y * (ydim/200.0);
|
|
||||||
}
|
|
||||||
|
|
||||||
for (i = 0, y = 0; i < num_frag_bars; i++)
|
|
||||||
{
|
|
||||||
pSpawnFullScreenSprite(pp, FRAG_BAR, PRI_MID, 0, y);
|
|
||||||
y += tilesiz[FRAG_BAR].y - 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
// write each persons kill info to everybody
|
|
||||||
// for (i = 0; i < numplayers; i++)
|
|
||||||
TRAVERSE_CONNECT(i)
|
|
||||||
{
|
|
||||||
PlayerUpdateKills(Player + i, 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
BORDER_INFO BorderInfoValues[] =
|
BORDER_INFO BorderInfoValues[] =
|
||||||
{
|
{
|
||||||
// x,y,screensize
|
// x,y,screensize
|
||||||
|
@ -155,35 +111,16 @@ static void BorderSetView(PLAYERp, int *Xdim, int *Ydim, int *ScreenSize)
|
||||||
// Redraw the whole screen
|
// Redraw the whole screen
|
||||||
//
|
//
|
||||||
|
|
||||||
void SetBorder(PLAYERp pp, int value)
|
void SetBorder(PLAYERp pp)
|
||||||
{
|
{
|
||||||
int Xdim, Ydim, ScreenSize;
|
int Xdim, Ydim, ScreenSize;
|
||||||
|
|
||||||
if (pp != Player + myconnectindex)
|
if (pp != Player + myconnectindex)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (!BorderAdjust)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (value >= 0) // just refresh
|
|
||||||
gs.BorderNum = value;
|
|
||||||
|
|
||||||
if (gs.BorderNum < BORDER_NONE)
|
|
||||||
{
|
|
||||||
gs.BorderNum = BORDER_NONE;
|
|
||||||
//return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (gs.BorderNum > (int)SIZ(BorderInfoValues) - 1)
|
|
||||||
{
|
|
||||||
gs.BorderNum = SIZ(BorderInfoValues) - 1;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (xdim == 0) return; // game not set up yet.
|
if (xdim == 0) return; // game not set up yet.
|
||||||
|
|
||||||
BorderSetView(pp, &Xdim, &Ydim, &ScreenSize);
|
BorderSetView(pp, &Xdim, &Ydim, &ScreenSize);
|
||||||
|
|
||||||
SetFragBar(pp);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
END_SW_NS
|
END_SW_NS
|
||||||
|
|
|
@ -1924,10 +1924,7 @@ drawscreen(PLAYERp pp)
|
||||||
// part of new border refresh method
|
// part of new border refresh method
|
||||||
if (!ScreenSavePic)
|
if (!ScreenSavePic)
|
||||||
{
|
{
|
||||||
renderFlushPerms();
|
SetBorder(pp);
|
||||||
// get rid of all PANF_KILL_AFTER_SHOW sprites!
|
|
||||||
pFlushPerms(pp);
|
|
||||||
SetBorder(pp,gs.BorderNum);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
PreUpdatePanel();
|
PreUpdatePanel();
|
||||||
|
|
|
@ -181,7 +181,6 @@ SWBOOL FirstTimeIntoGame;
|
||||||
|
|
||||||
SWBOOL PedanticMode;
|
SWBOOL PedanticMode;
|
||||||
|
|
||||||
SWBOOL BorderAdjust = FALSE;
|
|
||||||
SWBOOL LocationInfo = 0;
|
SWBOOL LocationInfo = 0;
|
||||||
void drawoverheadmap(int cposx, int cposy, int czoom, short cang);
|
void drawoverheadmap(int cposx, int cposy, int czoom, short cang);
|
||||||
int DispFrameRate = FALSE;
|
int DispFrameRate = FALSE;
|
||||||
|
@ -1229,12 +1228,6 @@ void CreditsLevel(void)
|
||||||
#define CREDITS1_PIC 5111
|
#define CREDITS1_PIC 5111
|
||||||
#define CREDITS2_PIC 5118
|
#define CREDITS2_PIC 5118
|
||||||
|
|
||||||
// put up a blank screen while loading
|
|
||||||
|
|
||||||
// get rid of all PERM sprites!
|
|
||||||
renderFlushPerms();
|
|
||||||
save = gs.BorderNum;
|
|
||||||
gs.BorderNum = save;
|
|
||||||
twod->ClearScreen();
|
twod->ClearScreen();
|
||||||
videoNextPage();
|
videoNextPage();
|
||||||
inputState.ClearAllInput();
|
inputState.ClearAllInput();
|
||||||
|
@ -1393,9 +1386,6 @@ void MenuLevel(void)
|
||||||
|
|
||||||
waitforeverybody();
|
waitforeverybody();
|
||||||
|
|
||||||
// don't allow BorderAdjusting in these menus
|
|
||||||
BorderAdjust = FALSE;
|
|
||||||
|
|
||||||
inputState.ClearAllInput();
|
inputState.ClearAllInput();
|
||||||
|
|
||||||
if (SW_SHAREWARE)
|
if (SW_SHAREWARE)
|
||||||
|
@ -1469,8 +1459,6 @@ void MenuLevel(void)
|
||||||
videoNextPage();
|
videoNextPage();
|
||||||
}
|
}
|
||||||
|
|
||||||
BorderAdjust = TRUE;
|
|
||||||
//LoadGameOutsideMoveLoop = FALSE;
|
|
||||||
inputState.ClearAllInput();
|
inputState.ClearAllInput();
|
||||||
M_ClearMenus();
|
M_ClearMenus();
|
||||||
InMenuLevel = FALSE;
|
InMenuLevel = FALSE;
|
||||||
|
@ -2421,7 +2409,6 @@ int32_t GameInterface::app_main()
|
||||||
InitCheats();
|
InitCheats();
|
||||||
buttonMap.SetButtons(actions, NUM_ACTIONS);
|
buttonMap.SetButtons(actions, NUM_ACTIONS);
|
||||||
automapping = 1;
|
automapping = 1;
|
||||||
BorderAdjust = true;
|
|
||||||
|
|
||||||
gs = gs_defaults;
|
gs = gs_defaults;
|
||||||
|
|
||||||
|
@ -2513,8 +2500,6 @@ void BotPlayerInsert(PLAYERp pp)
|
||||||
|
|
||||||
numplayers++;
|
numplayers++;
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetFragBar(pp);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -2738,7 +2723,6 @@ getinput(SW_PACKET *loc, SWBOOL tied)
|
||||||
{
|
{
|
||||||
MirrorDelay = 1;
|
MirrorDelay = 1;
|
||||||
dimensionmode = 3;
|
dimensionmode = 3;
|
||||||
SetFragBar(pp);
|
|
||||||
ScrollMode2D = FALSE;
|
ScrollMode2D = FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3587,7 +3571,7 @@ void Saveable_Init_Dynamic()
|
||||||
void GameInterface::set_hud_layout(int requested_size)
|
void GameInterface::set_hud_layout(int requested_size)
|
||||||
{
|
{
|
||||||
gs.BorderNum = 9 - requested_size;
|
gs.BorderNum = 9 - requested_size;
|
||||||
SetBorder(Player + myconnectindex, gs.BorderNum);
|
SetBorder(Player + myconnectindex);
|
||||||
}
|
}
|
||||||
|
|
||||||
::GameInterface* CreateInterface()
|
::GameInterface* CreateInterface()
|
||||||
|
|
|
@ -2100,8 +2100,7 @@ extern SECTOR_OBJECT SectorObject[MAX_SECTOR_OBJECTS];
|
||||||
|
|
||||||
ANIMATOR NullAnimator;
|
ANIMATOR NullAnimator;
|
||||||
|
|
||||||
void SetBorder(PLAYERp pp, int);
|
void SetBorder(PLAYERp pp);
|
||||||
void SetFragBar(PLAYERp pp);
|
|
||||||
int Distance(int x1, int y1, int x2, int y2);
|
int Distance(int x1, int y1, int x2, int y2);
|
||||||
short GetDeltaAngle(short, short);
|
short GetDeltaAngle(short, short);
|
||||||
fix16_t GetDeltaQ16Angle(fix16_t, fix16_t);
|
fix16_t GetDeltaQ16Angle(fix16_t, fix16_t);
|
||||||
|
|
|
@ -901,7 +901,6 @@ void JS_DrawMirrors(PLAYERp pp, int tx, int ty, int tz, fix16_t tpq16ang, fix16
|
||||||
|
|
||||||
// renderDrawRoomsQ16(tx, ty, tz, tpq16ang, tpq16horiz, pp->cursectnum);
|
// renderDrawRoomsQ16(tx, ty, tz, tpq16ang, tpq16horiz, pp->cursectnum);
|
||||||
// Clean up anything that the camera view might have done
|
// Clean up anything that the camera view might have done
|
||||||
SetFragBar(pp);
|
|
||||||
tileDelete(MIRROR);
|
tileDelete(MIRROR);
|
||||||
wall[mirror[cnt].mirrorwall].overpicnum = MIRRORLABEL + cnt;
|
wall[mirror[cnt].mirrorwall].overpicnum = MIRRORLABEL + cnt;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 DisplaySmString(PLAYERp pp, short xs, short ys, short pal, const char* buffer);
|
|
||||||
void DisplayMiniBarNumber(short xs, short ys, int number);
|
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);
|
||||||
|
|
|
@ -549,20 +549,6 @@ Connect(void)
|
||||||
{
|
{
|
||||||
if (CommEnabled)
|
if (CommEnabled)
|
||||||
{
|
{
|
||||||
#if 0
|
|
||||||
int x1, x2, y1, y2;
|
|
||||||
int screensize = xdim;
|
|
||||||
extern short BorderTest[];
|
|
||||||
|
|
||||||
// put up a tile
|
|
||||||
x1 = (xdim >> 1) - (screensize >> 1);
|
|
||||||
x2 = x1 + screensize - 1;
|
|
||||||
y1 = ((ydim) >> 1) - (((screensize * (ydim)) / xdim) >> 1);
|
|
||||||
y2 = y1 + ((screensize * (ydim)) / xdim) - 1;
|
|
||||||
rotatespritetile(BorderTest[gs.BorderTile], 0, x1, y1, x2, y2, 0);
|
|
||||||
nextpage();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
screenpeek = myconnectindex;
|
screenpeek = myconnectindex;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -83,7 +83,6 @@ typedef struct
|
||||||
PANEL_STATEp state[2];
|
PANEL_STATEp state[2];
|
||||||
} PANEL_SHRAP, *PANEL_SHRAPp;
|
} PANEL_SHRAP, *PANEL_SHRAPp;
|
||||||
|
|
||||||
PANEL_SPRITEp pSpawnFullScreenSprite(PLAYERp pp, short pic, short pri, int x, int y);
|
|
||||||
void PanelInvTestSuicide(PANEL_SPRITEp psp);
|
void PanelInvTestSuicide(PANEL_SPRITEp psp);
|
||||||
|
|
||||||
void InsertPanelSprite(PLAYERp pp, PANEL_SPRITEp psp);
|
void InsertPanelSprite(PLAYERp pp, PANEL_SPRITEp psp);
|
||||||
|
@ -209,31 +208,6 @@ PANEL_SPRITEp pSpawnFullViewSprite(PLAYERp pp, short pic, short pri, int x, int
|
||||||
return nsp;
|
return nsp;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Used to display panel info at correct aspect ratio and x,y location on the
|
|
||||||
// status panel. Sprites will kill themselves after writing to all pages.
|
|
||||||
|
|
||||||
PANEL_SPRITEp pSpawnFullScreenSprite(PLAYERp pp, short pic, short pri, int x, int y)
|
|
||||||
{
|
|
||||||
PANEL_SPRITEp nsp;
|
|
||||||
|
|
||||||
if ((nsp = pFindMatchingSprite(pp, x, y, pri)) == NULL)
|
|
||||||
{
|
|
||||||
nsp = pSpawnSprite(pp, NULL, pri, x, y);
|
|
||||||
}
|
|
||||||
|
|
||||||
nsp->numpages = numpages;
|
|
||||||
nsp->picndx = -1;
|
|
||||||
nsp->picnum = pic;
|
|
||||||
nsp->x1 = 0;
|
|
||||||
nsp->y1 = 0;
|
|
||||||
nsp->x2 = xdim - 1;
|
|
||||||
nsp->y2 = ydim - 1;
|
|
||||||
SET(nsp->flags, PANF_STATUS_AREA | PANF_SCREEN_CLIP | PANF_KILL_AFTER_SHOW);
|
|
||||||
|
|
||||||
return nsp;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void pSetSuicide(PANEL_SPRITEp psp)
|
void pSetSuicide(PANEL_SPRITEp psp)
|
||||||
{
|
{
|
||||||
//SET(psp->flags, PANF_SUICIDE);
|
//SET(psp->flags, PANF_SUICIDE);
|
||||||
|
@ -7042,13 +7016,6 @@ pDisplaySprites(PLAYERp pp)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// force kill before showing again
|
|
||||||
if (TEST(psp->flags, PANF_KILL_AFTER_SHOW) && psp->numpages == 0)
|
|
||||||
{
|
|
||||||
pKillSprite(psp);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
// if the state is null get the picnum for other than picndx
|
// if the state is null get the picnum for other than picndx
|
||||||
if (psp->picndx == -1 || !psp->State)
|
if (psp->picndx == -1 || !psp->State)
|
||||||
picnum = psp->picnum;
|
picnum = psp->picnum;
|
||||||
|
@ -7200,8 +7167,6 @@ pDisplaySprites(PLAYERp pp)
|
||||||
}
|
}
|
||||||
else set.clear();
|
else set.clear();
|
||||||
|
|
||||||
//PANF_STATUS_AREA | PANF_SCREEN_CLIP | PANF_KILL_AFTER_SHOW,
|
|
||||||
|
|
||||||
SET(flags, ROTATE_SPRITE_VIEW_CLIP);
|
SET(flags, ROTATE_SPRITE_VIEW_CLIP);
|
||||||
|
|
||||||
if (TEST(psp->flags, PANF_TRANSLUCENT))
|
if (TEST(psp->flags, PANF_TRANSLUCENT))
|
||||||
|
@ -7266,14 +7231,6 @@ pDisplaySprites(PLAYERp pp)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 1
|
|
||||||
if (TEST(psp->flags, PANF_KILL_AFTER_SHOW) && !TEST(psp->flags, PANF_NOT_ALL_PAGES) && !M_Active())
|
|
||||||
{
|
|
||||||
psp->numpages = 0;
|
|
||||||
SET(flags, ROTATE_SPRITE_ALL_PAGES);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// temporary hack to fix fist artifacts until a solution is found in the panel system itself
|
// temporary hack to fix fist artifacts until a solution is found in the panel system itself
|
||||||
switch (picnum)
|
switch (picnum)
|
||||||
{
|
{
|
||||||
|
@ -7333,27 +7290,6 @@ pDisplaySprites(PLAYERp pp)
|
||||||
flags, x1, y1, x2, y2);
|
flags, x1, y1, x2, y2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (TEST(psp->flags, PANF_KILL_AFTER_SHOW))
|
|
||||||
{
|
|
||||||
psp->numpages--;
|
|
||||||
if (psp->numpages <= 0)
|
|
||||||
pKillSprite(psp);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void pFlushPerms(PLAYERp pp)
|
|
||||||
{
|
|
||||||
PANEL_SPRITEp psp=NULL, next=NULL;
|
|
||||||
|
|
||||||
TRAVERSE(&pp->PanelSpriteList, psp, next)
|
|
||||||
{
|
|
||||||
// force kill before showing again
|
|
||||||
if (TEST(psp->flags, PANF_KILL_AFTER_SHOW))
|
|
||||||
{
|
|
||||||
pKillSprite(psp);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7508,26 +7444,6 @@ PreUpdatePanel(void)
|
||||||
DrawBeforeView = FALSE;
|
DrawBeforeView = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void rotatespritetile(short tilenum,
|
|
||||||
signed char shade, int cx1, int cy1,
|
|
||||||
int cx2, int cy2, char dapalnum)
|
|
||||||
{
|
|
||||||
int x, y, xsiz, ysiz, tx1, ty1, tx2, ty2;
|
|
||||||
|
|
||||||
xsiz = tilesiz[tilenum].x; tx1 = cx1/xsiz; tx2 = cx2/xsiz;
|
|
||||||
ysiz = tilesiz[tilenum].y; ty1 = cy1/ysiz; ty2 = cy2/ysiz;
|
|
||||||
|
|
||||||
for (x=tx1; x<=tx2; x++)
|
|
||||||
{
|
|
||||||
for (y=ty1; y<=ty2; y++)
|
|
||||||
{
|
|
||||||
rotatesprite((x*xsiz)<<16,(y*ysiz)<<16,65536L,0,tilenum,shade,dapalnum,
|
|
||||||
ROTATE_SPRITE_NON_MASK|ROTATE_SPRITE_CORNER|ROTATE_SPRITE_IGNORE_START_MOST,
|
|
||||||
cx1,cy1,cx2,cy2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#define EnvironSuit_RATE 10
|
#define EnvironSuit_RATE 10
|
||||||
#define Fly_RATE 10
|
#define Fly_RATE 10
|
||||||
#define Cloak_RATE 10
|
#define Cloak_RATE 10
|
||||||
|
|
|
@ -78,7 +78,6 @@ struct PANEL_STATEstruct
|
||||||
#define PANF_TRANSLUCENT (BIT(8)) // turn invisible
|
#define PANF_TRANSLUCENT (BIT(8)) // turn invisible
|
||||||
#define PANF_INVISIBLE (BIT(9)) // turn invisible
|
#define PANF_INVISIBLE (BIT(9)) // turn invisible
|
||||||
#define PANF_DEATH_HIDE (BIT(10)) // hide done when dead
|
#define PANF_DEATH_HIDE (BIT(10)) // hide done when dead
|
||||||
#define PANF_KILL_AFTER_SHOW (BIT(11)) // kill after showing numpages times
|
|
||||||
#define PANF_SCREEN_CLIP (BIT(12)) // maintain aspect to the screen
|
#define PANF_SCREEN_CLIP (BIT(12)) // maintain aspect to the screen
|
||||||
#define PANF_STATUS_AREA (BIT(13)) // maintain aspect to the screen
|
#define PANF_STATUS_AREA (BIT(13)) // maintain aspect to the screen
|
||||||
#define PANF_IGNORE_START_MOST (BIT(14)) // maintain aspect to the screen
|
#define PANF_IGNORE_START_MOST (BIT(14)) // maintain aspect to the screen
|
||||||
|
@ -185,11 +184,9 @@ enum BorderTypes
|
||||||
#define SHOTGUN_AUTO 2078
|
#define SHOTGUN_AUTO 2078
|
||||||
|
|
||||||
PANEL_SPRITEp pSpawnSprite(PLAYERp pp, PANEL_STATEp state, uint8_t priority, int x, int y);
|
PANEL_SPRITEp pSpawnSprite(PLAYERp pp, PANEL_STATEp state, uint8_t priority, int x, int y);
|
||||||
PANEL_SPRITEp pSpawnFullScreenSprite(PLAYERp pp, short pic, short pri, int x, int y);
|
|
||||||
PANEL_SPRITEp pSpawnFullViewSprite(PLAYERp pp,short pic,short pri,int x,int y);
|
PANEL_SPRITEp pSpawnFullViewSprite(PLAYERp pp,short pic,short pri,int x,int y);
|
||||||
void pSetSuicide(PANEL_SPRITEp psp);
|
void pSetSuicide(PANEL_SPRITEp psp);
|
||||||
SWBOOL pKillScreenSpiteIDs(PLAYERp pp, short id);
|
SWBOOL pKillScreenSpiteIDs(PLAYERp pp, short id);
|
||||||
void pFlushPerms(PLAYERp pp);
|
|
||||||
void PreUpdatePanel(void);
|
void PreUpdatePanel(void);
|
||||||
void UpdatePanel(void);
|
void UpdatePanel(void);
|
||||||
void PlayerUpdateArmor(PLAYERp pp,short value);
|
void PlayerUpdateArmor(PLAYERp pp,short value);
|
||||||
|
|
|
@ -7779,7 +7779,6 @@ void UpdateScrollingMessages(void)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// if ((klabs(quotebotgoal-quotebot) <= 16) && gs.BorderNum < BORDER_NONE+2)
|
|
||||||
if ((klabs(quotebotgoal-quotebot) <= 16))
|
if ((klabs(quotebotgoal-quotebot) <= 16))
|
||||||
quotebot += ksgn(quotebotgoal-quotebot);
|
quotebot += ksgn(quotebotgoal-quotebot);
|
||||||
else
|
else
|
||||||
|
|
|
@ -256,7 +256,6 @@ class DSWStatusBar : public DBaseStatusBar
|
||||||
|
|
||||||
void DisplayFragNumbers()
|
void DisplayFragNumbers()
|
||||||
{
|
{
|
||||||
// must draw this in HUD mode!
|
|
||||||
for (int pnum = 0; pnum < 4; pnum++)
|
for (int pnum = 0; pnum < 4; pnum++)
|
||||||
{
|
{
|
||||||
char buffer[32];
|
char buffer[32];
|
||||||
|
@ -292,7 +291,6 @@ class DSWStatusBar : public DBaseStatusBar
|
||||||
|
|
||||||
void DisplayFragNames()
|
void DisplayFragNames()
|
||||||
{
|
{
|
||||||
// must draw this in HUD mode!
|
|
||||||
for (int pnum = 0; pnum < 4; pnum++)
|
for (int pnum = 0; pnum < 4; pnum++)
|
||||||
{
|
{
|
||||||
short xs, ys;
|
short xs, ys;
|
||||||
|
@ -317,6 +315,49 @@ class DSWStatusBar : public DBaseStatusBar
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//---------------------------------------------------------------------------
|
||||||
|
|
||||||
|
void DisplayFragBar(PLAYERp pp)
|
||||||
|
{
|
||||||
|
// must draw this in HUD mode and align to the top center
|
||||||
|
short i, num_frag_bars;
|
||||||
|
int y;
|
||||||
|
extern int16_t OrigCommPlayers;
|
||||||
|
|
||||||
|
if (numplayers <= 1)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (gNet.MultiGameType == MULTI_GAME_COOPERATIVE)
|
||||||
|
return;
|
||||||
|
|
||||||
|
// if player sprite has not been initialized we have no business
|
||||||
|
// sticking a frag bar up. Prevents processing from MenuLevel etc.
|
||||||
|
if (!pp->SpriteP)
|
||||||
|
return;
|
||||||
|
|
||||||
|
//num_frag_bars = ((numplayers-1)/4)+1;
|
||||||
|
num_frag_bars = ((OrigCommPlayers - 1) / 4) + 1;
|
||||||
|
|
||||||
|
for (i = windowxy1.x; i <= windowxy2.x; i++)
|
||||||
|
{
|
||||||
|
y = (tilesiz[FRAG_BAR].y * num_frag_bars) - (2 * (num_frag_bars - 1));
|
||||||
|
y = y * (ydim / 200.0);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (i = 0, y = 0; i < num_frag_bars; i++)
|
||||||
|
{
|
||||||
|
DrawGraphic(tileGetTexture(FRAG_BAR), 0, y, DI_ITEM_LEFT_TOP, 1, -1, -1, 1, 1);
|
||||||
|
y += tilesiz[FRAG_BAR].y - 2;
|
||||||
|
}
|
||||||
|
DisplayFragNames();
|
||||||
|
DisplayFragNumbers();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
|
|
|
@ -233,30 +233,6 @@ DisplayMiniBarSmString(PLAYERp UNUSED(pp), short xs, short ys, short pal, const
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DisplaySmString(PLAYERp pp, short xs, short ys, short pal, const char *buffer)
|
|
||||||
{
|
|
||||||
short size=4,x;
|
|
||||||
const char *ptr;
|
|
||||||
PANEL_SPRITEp nsp;
|
|
||||||
// ID is base + (0-3)
|
|
||||||
//short id = ID_TEXT + MOD4(pp->pnum);
|
|
||||||
|
|
||||||
#define FRAG_FIRST_ASCII ('!') //exclamation point
|
|
||||||
#define FRAG_FIRST_TILE 2930 //exclamation point
|
|
||||||
|
|
||||||
for (ptr = buffer, x = xs; *ptr; ptr++, x += size)
|
|
||||||
{
|
|
||||||
if (*ptr == ' ')
|
|
||||||
continue;
|
|
||||||
|
|
||||||
ASSERT(*ptr >= '!' && *ptr <= '}');
|
|
||||||
|
|
||||||
nsp = pSpawnFullScreenSprite(pp, FRAG_FIRST_TILE + (*ptr - FRAG_FIRST_ASCII), PRI_FRONT_MAX, x, ys);
|
|
||||||
nsp->pal = pal;
|
|
||||||
//nsp->ID = id;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
short GlobInfoStringTime = TEXT_INFO_TIME;
|
short GlobInfoStringTime = TEXT_INFO_TIME;
|
||||||
void PutStringInfo(PLAYERp pp, const char *string)
|
void PutStringInfo(PLAYERp pp, const char *string)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue