mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-27 01:10:51 +00:00
Make status bar code polymost friendly
This commit is contained in:
parent
48b9ca7f7f
commit
0023ae625d
6 changed files with 31 additions and 47 deletions
|
@ -610,12 +610,8 @@ short nGamma = 0;
|
||||||
|
|
||||||
short word_CB326;
|
short word_CB326;
|
||||||
|
|
||||||
short screenpage;
|
|
||||||
|
|
||||||
short screensize;
|
short screensize;
|
||||||
|
|
||||||
short barpages;
|
|
||||||
|
|
||||||
short bSnakeCam = kFalse;
|
short bSnakeCam = kFalse;
|
||||||
short bRecord = kFalse;
|
short bRecord = kFalse;
|
||||||
short bPlayback = kFalse;
|
short bPlayback = kFalse;
|
||||||
|
@ -763,8 +759,6 @@ void UpdateScreenSize()
|
||||||
(xdim >> 1) - (screensize >> 1) + screensize - 1,
|
(xdim >> 1) - (screensize >> 1) + screensize - 1,
|
||||||
(y1 + v0 - 1));
|
(y1 + v0 - 1));
|
||||||
|
|
||||||
screenpage = (short)numpages;
|
|
||||||
|
|
||||||
RefreshStatus();
|
RefreshStatus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2148,6 +2142,7 @@ LOOP3:
|
||||||
|
|
||||||
if (bMapMode)
|
if (bMapMode)
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
if (bHiRes && nViewBottom > nMaskY)
|
if (bHiRes && nViewBottom > nMaskY)
|
||||||
{
|
{
|
||||||
videoSetViewableArea(nViewLeft, nViewTop, nViewRight, nMaskY);
|
videoSetViewableArea(nViewLeft, nViewTop, nViewRight, nMaskY);
|
||||||
|
@ -2158,6 +2153,10 @@ LOOP3:
|
||||||
{
|
{
|
||||||
DrawMap();
|
DrawMap();
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
// TODO: Map should not be drawn on top of status bar. Redraw status bar?
|
||||||
|
DrawMap();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
videoNextPage();
|
videoNextPage();
|
||||||
|
@ -2750,11 +2749,14 @@ void EraseScreen(int nVal)
|
||||||
nVal = overscanindex;
|
nVal = overscanindex;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
videoClearScreen(nVal);
|
||||||
|
#if 0
|
||||||
for (int i = 0; i < numpages; i++)
|
for (int i = 0; i < numpages; i++)
|
||||||
{
|
{
|
||||||
videoClearScreen(nVal);
|
videoClearScreen(nVal);
|
||||||
videoNextPage();
|
videoNextPage();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
int Query(short nLines, short nKeys, ...)
|
int Query(short nLines, short nKeys, ...)
|
||||||
|
@ -2846,7 +2848,6 @@ int Query(short nLines, short nKeys, ...)
|
||||||
{
|
{
|
||||||
RefreshStatus();
|
RefreshStatus();
|
||||||
ClearAllKeys();
|
ClearAllKeys();
|
||||||
bgpages = numpages;
|
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2855,7 +2856,6 @@ int Query(short nLines, short nKeys, ...)
|
||||||
|
|
||||||
RefreshStatus();
|
RefreshStatus();
|
||||||
ClearAllKeys();
|
ClearAllKeys();
|
||||||
bgpages = numpages;
|
|
||||||
|
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
|
|
@ -106,7 +106,6 @@ extern int nNetPlayerCount;
|
||||||
extern int htimer;
|
extern int htimer;
|
||||||
|
|
||||||
extern int nNetTime;
|
extern int nNetTime;
|
||||||
extern short barpages;
|
|
||||||
|
|
||||||
extern short nTotalPlayers;
|
extern short nTotalPlayers;
|
||||||
|
|
||||||
|
@ -170,8 +169,6 @@ extern int totalmoves;
|
||||||
|
|
||||||
extern short nGamma;
|
extern short nGamma;
|
||||||
|
|
||||||
extern short screenpage;
|
|
||||||
|
|
||||||
extern int lCountDown;
|
extern int lCountDown;
|
||||||
|
|
||||||
extern short bSlipMode;
|
extern short bSlipMode;
|
||||||
|
|
|
@ -986,7 +986,7 @@ int menu_NewGameMenu()
|
||||||
|
|
||||||
int nNameOffset = 0; // char index into slot name string
|
int nNameOffset = 0; // char index into slot name string
|
||||||
|
|
||||||
int nPages = numpages;
|
//int nPages = numpages;
|
||||||
|
|
||||||
int arg_3E = tilesiz[kMenuBlankTitleTile].x - 10;
|
int arg_3E = tilesiz[kMenuBlankTitleTile].x - 10;
|
||||||
|
|
||||||
|
@ -1058,10 +1058,10 @@ int menu_NewGameMenu()
|
||||||
overwritesprite(233, edi + 78, kMenuCursorTile, 0, 10, kPalNormal);
|
overwritesprite(233, edi + 78, kMenuCursorTile, 0, 10, kPalNormal);
|
||||||
videoNextPage();
|
videoNextPage();
|
||||||
|
|
||||||
nPages--;
|
//nPages--;
|
||||||
if (nPages > 0) {
|
//if (nPages > 0) {
|
||||||
continue;
|
// continue;
|
||||||
}
|
//}
|
||||||
|
|
||||||
if (KB_KeyDown[sc_Escape])
|
if (KB_KeyDown[sc_Escape])
|
||||||
{
|
{
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
short nMaskY;
|
short nMaskY;
|
||||||
static short nAnimsFree = 0;
|
static short nAnimsFree = 0;
|
||||||
|
|
||||||
short statusmask[1600];
|
short statusmask[MAXXDIM];
|
||||||
|
|
||||||
short message_timer = 0;
|
short message_timer = 0;
|
||||||
char message_text[80];
|
char message_text[80];
|
||||||
|
@ -60,7 +60,6 @@ short nItemAltSeq;
|
||||||
short airpages = 0;
|
short airpages = 0;
|
||||||
|
|
||||||
short ammodelay = 3;
|
short ammodelay = 3;
|
||||||
short ammopages = 4;
|
|
||||||
|
|
||||||
short nCounterBullet = -1;
|
short nCounterBullet = -1;
|
||||||
|
|
||||||
|
@ -144,8 +143,6 @@ void RefreshStatus()
|
||||||
val += 2;
|
val += 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
barpages = numpages;
|
|
||||||
|
|
||||||
SetPlayerItem(nLocalPlayer, nPlayerItem[nLocalPlayer]);
|
SetPlayerItem(nLocalPlayer, nPlayerItem[nLocalPlayer]);
|
||||||
SetHealthFrame(0);
|
SetHealthFrame(0);
|
||||||
SetMagicFrame();
|
SetMagicFrame();
|
||||||
|
@ -365,7 +362,6 @@ void SetCounterDigits()
|
||||||
nDigit[2] = 3 * (nCounter / 100 % 10);
|
nDigit[2] = 3 * (nCounter / 100 % 10);
|
||||||
nDigit[1] = 3 * (nCounter / 10 % 10);
|
nDigit[1] = 3 * (nCounter / 10 % 10);
|
||||||
nDigit[0] = 3 * (nCounter % 10);
|
nDigit[0] = 3 * (nCounter % 10);
|
||||||
ammopages = numpages;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetItemSeq()
|
void SetItemSeq()
|
||||||
|
@ -507,7 +503,6 @@ void MoveStatus()
|
||||||
if (nCounter == nCounterDest)
|
if (nCounter == nCounterDest)
|
||||||
{
|
{
|
||||||
nCounter = nCounterDest;
|
nCounter = nCounterDest;
|
||||||
ammopages = numpages;
|
|
||||||
ammodelay = 3;
|
ammodelay = 3;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -519,8 +514,6 @@ void MoveStatus()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ammopages = numpages;
|
|
||||||
|
|
||||||
int eax = nCounterDest - nCounter;
|
int eax = nCounterDest - nCounter;
|
||||||
|
|
||||||
if (eax <= 0)
|
if (eax <= 0)
|
||||||
|
@ -590,13 +583,16 @@ void MoveStatus()
|
||||||
|
|
||||||
void UnMaskStatus()
|
void UnMaskStatus()
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
for (int i = 0; i < xdim; i++) {
|
for (int i = 0; i < xdim; i++) {
|
||||||
startdmost[i] = ydim;
|
startdmost[i] = ydim;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void MaskStatus()
|
void MaskStatus()
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
for (int i = 0; i < xdim; i++)
|
for (int i = 0; i < xdim; i++)
|
||||||
{
|
{
|
||||||
short bx = startdmost[i];
|
short bx = startdmost[i];
|
||||||
|
@ -606,10 +602,12 @@ void MaskStatus()
|
||||||
startdmost[i] = cx;
|
startdmost[i] = cx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void LoadStatus()
|
void LoadStatus()
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
int i;
|
int i;
|
||||||
short nSize;
|
short nSize;
|
||||||
short tmp;
|
short tmp;
|
||||||
|
@ -651,6 +649,7 @@ void LoadStatus()
|
||||||
nMaskY = ydim - v8;
|
nMaskY = ydim - v8;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void StatusMessage(int messageTime, const char *fmt, ...)
|
void StatusMessage(int messageTime, const char *fmt, ...)
|
||||||
|
@ -680,12 +679,8 @@ void DrawStatus()
|
||||||
NoClip();
|
NoClip();
|
||||||
// }
|
// }
|
||||||
|
|
||||||
if (barpages > 0)
|
// draw the main bar itself
|
||||||
{
|
seq_DrawStatusSequence(nStatusSeqOffset, 0, 0);
|
||||||
// draw the main bar itself
|
|
||||||
seq_DrawStatusSequence(nStatusSeqOffset, 0, 0);
|
|
||||||
barpages--;
|
|
||||||
}
|
|
||||||
|
|
||||||
seq_DrawStatusSequence(nStatusSeqOffset + 128, 0, 0);
|
seq_DrawStatusSequence(nStatusSeqOffset + 128, 0, 0);
|
||||||
seq_DrawStatusSequence(nStatusSeqOffset + 127, 0, 0);
|
seq_DrawStatusSequence(nStatusSeqOffset + 127, 0, 0);
|
||||||
|
@ -728,13 +723,9 @@ void DrawStatus()
|
||||||
printext(xdim - 20, nViewTop, cFPS, kTile159, -1);
|
printext(xdim - 20, nViewTop, cFPS, kTile159, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ammopages)
|
seq_DrawStatusSequence(nStatusSeqOffset + 44, nDigit[2], 0);
|
||||||
{
|
seq_DrawStatusSequence(nStatusSeqOffset + 45, nDigit[1], 0);
|
||||||
ammopages--;
|
seq_DrawStatusSequence(nStatusSeqOffset + 46, nDigit[0], 0);
|
||||||
seq_DrawStatusSequence(nStatusSeqOffset + 44, nDigit[2], 0);
|
|
||||||
seq_DrawStatusSequence(nStatusSeqOffset + 45, nDigit[1], 0);
|
|
||||||
seq_DrawStatusSequence(nStatusSeqOffset + 46, nDigit[0], 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
// bjd - commenting out this check seems to fix the black status bar at 320x200 resolution
|
// bjd - commenting out this check seems to fix the black status bar at 320x200 resolution
|
||||||
// if (bHiRes) {
|
// if (bHiRes) {
|
||||||
|
@ -837,7 +828,7 @@ void DrawStatus()
|
||||||
sprintf(coordBuf, "X %d", (int)sprite[nSprite].x);
|
sprintf(coordBuf, "X %d", (int)sprite[nSprite].x);
|
||||||
printext(x, nViewTop + 1, coordBuf, kTile159, 255);
|
printext(x, nViewTop + 1, coordBuf, kTile159, 255);
|
||||||
|
|
||||||
sprintf(coordBuf, "Y %d", (int)sprite[nSprite].y);
|
sprintf(coordBuf, "Y %d", sprite[nSprite].y);
|
||||||
printext(x, nViewTop + 10, coordBuf, kTile159, 255);
|
printext(x, nViewTop + 10, coordBuf, kTile159, 255);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,6 @@ short nChunkTotal = 0;
|
||||||
short nCameraa;
|
short nCameraa;
|
||||||
short nCamerapan;
|
short nCamerapan;
|
||||||
short nViewTop;
|
short nViewTop;
|
||||||
short bgpages = 0;
|
|
||||||
short bClip = kFalse;
|
short bClip = kFalse;
|
||||||
short nViewBottom;
|
short nViewBottom;
|
||||||
short nViewRight;
|
short nViewRight;
|
||||||
|
@ -215,15 +214,10 @@ void ResetView()
|
||||||
MySetPalette(kenpal);
|
MySetPalette(kenpal);
|
||||||
|
|
||||||
LoadStatus();
|
LoadStatus();
|
||||||
|
|
||||||
screenpage = (short)numpages;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetView1()
|
void SetView1()
|
||||||
{
|
{
|
||||||
if (screenpage > 0) {
|
|
||||||
screenpage--;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void FlushMessageLine()
|
void FlushMessageLine()
|
||||||
|
@ -284,8 +278,6 @@ void MySetView(int x1, int y1, int x2, int y2)
|
||||||
videoSetViewableArea(x1, y1, x2, y2);
|
videoSetViewableArea(x1, y1, x2, y2);
|
||||||
|
|
||||||
nViewy = y1;
|
nViewy = y1;
|
||||||
barpages = (short)numpages;
|
|
||||||
bgpages = (short)numpages;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// unused function
|
// unused function
|
||||||
|
@ -302,6 +294,7 @@ void DrawView()
|
||||||
int nAngle;
|
int nAngle;
|
||||||
short pan;
|
short pan;
|
||||||
|
|
||||||
|
#if 0
|
||||||
if (bgpages <= 0)
|
if (bgpages <= 0)
|
||||||
{
|
{
|
||||||
if (textpages > 0)
|
if (textpages > 0)
|
||||||
|
@ -315,6 +308,10 @@ void DrawView()
|
||||||
RefreshBackground();
|
RefreshBackground();
|
||||||
bgpages--;
|
bgpages--;
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
FlushMessageLine();
|
||||||
|
RefreshBackground();
|
||||||
|
#endif
|
||||||
|
|
||||||
if (!bFullScreen) {
|
if (!bFullScreen) {
|
||||||
MaskStatus();
|
MaskStatus();
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
|
|
||||||
extern short bSubTitles;
|
extern short bSubTitles;
|
||||||
extern short nViewTop;
|
extern short nViewTop;
|
||||||
extern short bgpages;
|
|
||||||
extern short bClip;
|
extern short bClip;
|
||||||
extern short nViewBottom;
|
extern short nViewBottom;
|
||||||
extern short nViewRight;
|
extern short nViewRight;
|
||||||
|
|
Loading…
Reference in a new issue