Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiangreffrath committed Jul 20, 2020
2 parents c17e4af + 778193c commit 6080e1c
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 52 deletions.
14 changes: 10 additions & 4 deletions wl_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ char configname[13] = "config.";
//
boolean param_debugmode = false;
boolean param_nowait = false;
boolean param_demotest = false;
int param_difficulty = 1; // default is "normal"
int param_tedlevel = -1; // default is not to start a level
int param_joystickindex = 0;
Expand Down Expand Up @@ -1571,7 +1572,8 @@ static void DemoLoop()
// main game cycle
//

#ifndef DEMOTEST
if (!param_demotest)
{

#ifndef UPLOAD

Expand Down Expand Up @@ -1600,7 +1602,7 @@ static void DemoLoop()
PG13 ();
#endif

#endif
}

while (1)
{
Expand All @@ -1609,7 +1611,8 @@ static void DemoLoop()
//
// title page
//
#ifndef DEMOTEST
if (!param_demotest)
{

#ifdef SPEAR
SDL_Color pal[256];
Expand Down Expand Up @@ -1653,7 +1656,7 @@ static void DemoLoop()

if (IN_UserInput(TickBase*10))
break;
#endif
}
//
// demo
//
Expand Down Expand Up @@ -1725,6 +1728,8 @@ void CheckParameters(int argc, char *argv[])
param_difficulty = 3;
else IFARG("--nowait")
param_nowait = true;
else IFARG("--demotest")
param_demotest = true;
else IFARG("--tedlevel")
{
if(++i >= argc)
Expand Down Expand Up @@ -1920,6 +1925,7 @@ void CheckParameters(int argc, char *argv[])
" --normal Sets the difficulty to normal for tedlevel\n"
" --hard Sets the difficulty to hard for tedlevel\n"
" --nowait Skips intro screens\n"
" --demotest Skips right into the demo loop\n"
" --windowed[-mouse] Starts the game in a window [and grabs mouse]\n"
" --res <width> <height> Sets the screen resolution\n"
" (must be multiple of 320x200 or 320x240)\n"
Expand Down
77 changes: 29 additions & 48 deletions wl_menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,6 @@ CP_ReadThis (int)
#endif


#ifdef GOODTIMES
////////////////////////////////////////////////////////////////////
//
// BOSS KEY
Expand All @@ -748,59 +747,41 @@ CP_ReadThis (int)
void
BossKey (void)
{
#ifdef NOTYET
byte palette1[256][3];
SD_MusicOff ();
/* _AX = 3;
geninterrupt(0x10); */
_asm
{
mov eax, 3 int 0x10}
puts ("C>");
SetTextCursor (2, 0);
// while (!Keyboard[sc_Escape])
IN_Ack ();
IN_ClearKeysDown ();
const char *prompt[] = {"C:\\>", "C:\\>_"};
int i = 0;

SD_MusicOn ();
VL_SetVGAPlaneMode ();
for (int i = 0; i < 768; i++)
palette1[0][i] = 0;
int lastoffs = StopMusic();
int32_t lastBlinkTime = GetTimeCount();

VL_SetPalette (&palette1[0][0]);
LoadLatchMem ();
#endif
}
#else
#ifdef SPEAR
void
BossKey (void)
{
#ifdef NOTYET
byte palette1[256][3];
SD_MusicOff ();
/* _AX = 3;
geninterrupt(0x10); */
_asm
// [FG] instant fade-in to cleared screen
VWB_Bar(0, 0, 320, 200, 0);
VL_FadeIn(0, 255, gamepal, 1);

fontnumber = 0;
SETFONTCOLOR(15, 0);

do
{
mov eax, 3 int 0x10}
puts ("C>");
SetTextCursor (2, 0);
// while (!Keyboard[sc_Escape])
IN_Ack ();
IN_ClearKeysDown ();
// [FG] clear screen
VWB_Bar (0, 0, 320, 200, 0);

SD_MusicOn ();
VL_SetVGAPlaneMode ();
for (int i = 0; i < 768; i++)
palette1[0][i] = 0;
// [FG] print DOS prompt line with blinking cursor
if ((int32_t)GetTimeCount() - lastBlinkTime > 20)
{
lastBlinkTime = GetTimeCount();
i ^= 1;
}
PrintX = PrintY = 0;
US_Print(prompt[i]);

VL_SetPalette (&palette1[0][0]);
LoadLatchMem ();
#endif
VW_UpdateScreen();
TicDelay(20);
} while (!(IN_KeyDown(sc_Escape) || IN_KeyDown(sc_Control) || IN_KeyDown(sc_Alt)));

IN_ClearKeysDown ();

ContinueMusic(lastoffs);
}
#endif
#endif


////////////////////////////////////////////////////////////////////
Expand Down

0 comments on commit 6080e1c

Please sign in to comment.