Commit dbc8142a authored by Steven Fuller's avatar Steven Fuller

wl_game.c: Removed DrawAllPlayBorderSides and DrawAllPlayBorder, and

replaced them with the actual function they were calling.

wl_menu.c, wl_game.c: now viewsize 20 is allowed (width = 320, so no more
border).
parent 59f8e415
...@@ -748,9 +748,9 @@ void ClearMemory (void); ...@@ -748,9 +748,9 @@ void ClearMemory (void);
void PlayDemo(int demonumber); void PlayDemo(int demonumber);
int PlayDemoFromFile(char *demoname); int PlayDemoFromFile(char *demoname);
void RecordDemo (void); void RecordDemo (void);
void DrawAllPlayBorder (void); void DrawPlayBorder (void);
void DrawHighScores(void); void DrawHighScores(void);
void DrawAllPlayBorderSides (void); void DrawPlayBorderSides (void);
#define PlaySoundLocTile(s,tx,ty) PlaySoundLocGlobal(s,(((long)(tx) << TILESHIFT) + (1L << (TILESHIFT - 1))),(((long)ty << TILESHIFT) + (1L << (TILESHIFT - 1)))) #define PlaySoundLocTile(s,tx,ty) PlaySoundLocGlobal(s,(((long)(tx) << TILESHIFT) + (1L << (TILESHIFT - 1))),(((long)ty << TILESHIFT) + (1L << (TILESHIFT - 1))))
#define PlaySoundLocActor(s,ob) PlaySoundLocGlobal(s,(ob)->x,(ob)->y) #define PlaySoundLocActor(s,ob) PlaySoundLocGlobal(s,(ob)->x,(ob)->y)
......
...@@ -602,42 +602,20 @@ void SetupGameLevel() ...@@ -602,42 +602,20 @@ void SetupGameLevel()
void DrawPlayBorderSides() void DrawPlayBorderSides()
{ {
int xl,yl; int xl, yl;
xl = 160-viewwidth/2; xl = 160-viewwidth/2;
yl = (200-STATUSLINES-viewheight)/2; yl = (200-STATUSLINES-viewheight)/2;
VW_Bar (0,0,xl-1,200-STATUSLINES,127); if (xl == 0) {
VW_Bar (xl+viewwidth+1,0,xl-2,200-STATUSLINES,127); return;
} else {
VW_Vlin (yl-1,yl+viewheight,xl-1,0); VW_Bar(0,0,xl-1,200-STATUSLINES,127);
VW_Vlin (yl-1,yl+viewheight,xl+viewwidth,125); VW_Bar(xl+viewwidth+1,0,xl-2,200-STATUSLINES,127);
}
/*
===================
=
= DrawAllPlayBorderSides
=
===================
*/
void DrawAllPlayBorderSides()
{
DrawPlayBorderSides();
}
/* VW_Vlin(yl-1,yl+viewheight,xl-1,0);
=================== VW_Vlin(yl-1,yl+viewheight,xl+viewwidth,125);
= }
= DrawPlayBorder
=
===================
*/
void DrawAllPlayBorder()
{
DrawPlayBorder();
} }
/* /*
...@@ -652,17 +630,21 @@ void DrawPlayBorder() ...@@ -652,17 +630,21 @@ void DrawPlayBorder()
{ {
int xl, yl; int xl, yl;
VW_Bar (0,0,320,200-STATUSLINES,127); VW_Bar(0,0,320,200-STATUSLINES+1,127);
xl = 160-viewwidth/2; xl = 160-viewwidth/2;
yl = (200-STATUSLINES-viewheight)/2; yl = (200-STATUSLINES-viewheight)/2;
VW_Bar (xl,yl,viewwidth,viewheight,0); VW_Bar(xl,yl,viewwidth,viewheight+1,0);
VW_Hlin (xl-1,xl+viewwidth,yl-1,0); if (xl == 0) {
VW_Hlin (xl-1,xl+viewwidth,yl+viewheight,125); VW_Hlin(0,viewwidth-1,viewheight,125);
VW_Vlin (yl-1,yl+viewheight,xl-1,0); } else {
VW_Vlin (yl-1,yl+viewheight,xl+viewwidth,125); VW_Hlin(xl-1,xl+viewwidth,yl-1,0);
VW_Plot (xl-1,yl+viewheight,124); VW_Hlin(xl-1,xl+viewwidth,yl+viewheight,125);
VW_Vlin(yl-1,yl+viewheight,xl-1,0);
VW_Vlin(yl-1,yl+viewheight,xl+viewwidth,125);
VW_Plot(xl-1,yl+viewheight,124);
}
} }
/* /*
......
...@@ -539,7 +539,7 @@ int CP_CheckQuick(unsigned scancode) ...@@ -539,7 +539,7 @@ int CP_CheckQuick(unsigned scancode)
pickquick = gamestate.lives = 0; pickquick = gamestate.lives = 0;
} }
DrawAllPlayBorder(); DrawPlayBorder();
WindowH=200; WindowH=200;
fontnumber=0; fontnumber=0;
MainMenu[savegame].active = 0; MainMenu[savegame].active = 0;
...@@ -624,7 +624,7 @@ int CP_CheckQuick(unsigned scancode) ...@@ -624,7 +624,7 @@ int CP_CheckQuick(unsigned scancode)
if (Confirm(string)) if (Confirm(string))
CP_LoadGame(1); CP_LoadGame(1);
DrawAllPlayBorder(); DrawPlayBorder();
fontnumber=0; fontnumber=0;
} }
else else
...@@ -694,7 +694,7 @@ int CP_CheckQuick(unsigned scancode) ...@@ -694,7 +694,7 @@ int CP_CheckQuick(unsigned scancode)
Quit(NULL); Quit(NULL);
} }
DrawAllPlayBorder(); DrawPlayBorder();
WindowH=200; WindowH=200;
fontnumber=0; fontnumber=0;
return 1; return 1;
...@@ -2463,8 +2463,8 @@ void CP_ChangeView(void) ...@@ -2463,8 +2463,8 @@ void CP_ChangeView(void)
case dir_North: case dir_North:
case dir_East: case dir_East:
newview++; newview++;
if (newview>19) if (newview>20)
newview=19; newview=20;
ShowViewSize(newview); ShowViewSize(newview);
VW_UpdateScreen(); VW_UpdateScreen();
SD_PlaySound(HITWALLSND); SD_PlaySound(HITWALLSND);
......
...@@ -602,7 +602,7 @@ void CheckKeys() ...@@ -602,7 +602,7 @@ void CheckKeys()
IN_Ack(); IN_Ack();
godmode ^= 1; godmode ^= 1;
DrawAllPlayBorderSides(); DrawPlayBorderSides();
IN_ClearKeysDown(); IN_ClearKeysDown();
return; return;
} }
...@@ -638,7 +638,7 @@ void CheckKeys() ...@@ -638,7 +638,7 @@ void CheckKeys()
IN_ClearKeysDown(); IN_ClearKeysDown();
IN_Ack(); IN_Ack();
DrawAllPlayBorder (); DrawPlayBorder ();
} }
// //
...@@ -655,7 +655,7 @@ void CheckKeys() ...@@ -655,7 +655,7 @@ void CheckKeys()
IN_ClearKeysDown(); IN_ClearKeysDown();
IN_Ack(); IN_Ack();
DrawAllPlayBorderSides (); DrawPlayBorderSides ();
DebugOk=1; DebugOk=1;
} }
...@@ -676,7 +676,7 @@ void CheckKeys() ...@@ -676,7 +676,7 @@ void CheckKeys()
IN_ClearKeysDown(); IN_ClearKeysDown();
IN_Ack(); IN_Ack();
DrawAllPlayBorder(); DrawPlayBorder();
} }
if (Paused) { if (Paused) {
...@@ -706,7 +706,7 @@ void CheckKeys() ...@@ -706,7 +706,7 @@ void CheckKeys()
ClearSplitVWB (); ClearSplitVWB ();
US_ControlPanel(scan); US_ControlPanel(scan);
DrawAllPlayBorderSides (); DrawPlayBorderSides ();
VW_UpdateScreen(); VW_UpdateScreen();
if (scan == sc_F9) if (scan == sc_F9)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment