void VL_Hlin( int x, int y, int width, Uint8 color) { VL_Bar(x, y, width, 1, color); }
void VL_Vlin( int x, int y, int height, Uint8 color) { VL_Bar(x, y, 1, height, color); }
//------------------------------------------------------------------------ // PreDemo() //------------------------------------------------------------------------ void PreDemo() { #if !SKIP_TITLE_AND_CREDITS #if TECH_SUPPORT_VERSION fontnumber=4; SETFONTCOLOR(0,15*3); CenterWindow (26,7); US_Print(EnterBetaCode); VW_UpdateScreen(); CA_LoadAllSounds(); PM_CheckMainMem(); SD_PlaySound(INFORMDEATH2SND); // Nooooo! IN_UserInput(TickBase*20); ClearMemory(); #elif BETA_TEST boolean param=false; for (i=1; i<g_argc; i++) switch (US_CheckParm(g_argv[i],MainStrs)) { case 13: param=true; break; } if (!param) { char buffer[15] = {0}; fontnumber=4; CenterWindow (26,7); US_Print(EnterBetaCode); VW_UpdateScreen(); SETFONTCOLOR(0,15*3); US_LineInput(24*8,92,buffer,buffer,true,14,100); if (_fstricmp(buffer,bc_buffer)) Quit("Bad beta code!"); } #endif #if GAME_VERSION == SHAREWARE_VERSION #if IN_DEVELOPMENT || GEORGE_CHEAT if (!MS_CheckParm("nochex")) #endif { #if (!SKIP_CHECKSUMS) // CheckValidity("MAPTEMP.",MAPTEMP_CHECKSUM,"LEVELS"); CheckValidity("MAPTEMP.",MAPTEMP_CHECKSUM); #endif } #else #if (!SKIP_CHECKSUMS) if (ChecksumFile("FILE_ID.DIZ",0) != DIZFILE_CHECKSUM) gamestate.flags |= GS_BAD_DIZ_FILE; #endif #endif VL_SetPaletteIntensity(0,255,vgapal,0); if (!(gamestate.flags & GS_NOWAIT)) { #if (0) // GAME_VERSION != SHAREWARE_VERSION //--------------------- // Anti-piracy screen //--------------------- // Cache pic // CA_CacheScreen(PIRACYPIC); // Cache and set palette. AND Fade it in! // CA_CacheGrChunk(PIRACYPALETTE); VL_SetPalette (0,256,grsegs[PIRACYPALETTE]); VL_SetPaletteIntensity(0,255,grsegs[PIRACYPALETTE],0); VW_UpdateScreen(); VL_FadeOut (0, 255, 0, 0, 25, 20); VL_FadeIn(0,255,grsegs[PIRACYPALETTE],30); // Wait a little // IN_UserInput(TickBase*20); // Free palette // UNCACHEGRCHUNK(PIRACYPALETTE); VL_FadeOut (0, 255, 0, 0, 25, 20); VW_FadeOut(); // Cleanup screen for upcoming SetPalette call // { Uint16 old_bufferofs=bufferofs; bufferofs=displayofs; VL_Bar(0,0,320,200,0); bufferofs=old_bufferofs; } #endif //--------------------- // Apogee presents //--------------------- // ISG --> this fixes intro timing IN_UserInput(TickBase*1); // Cache pic // CA_CacheScreen(APOGEEPIC); // Load and start music // CA_CacheAudioChunk(STARTMUSIC+APOGFNFM_MUS); ::SD_StartMusic(APOGFNFM_MUS); // Cache and set palette. AND Fade it in! // CA_CacheGrChunk(APOGEEPALETTE); VL_SetPalette (0,256,static_cast<const Uint8*>(grsegs[APOGEEPALETTE])); VL_SetPaletteIntensity(0,255,static_cast<const Uint8*>(grsegs[APOGEEPALETTE]),0); VW_UpdateScreen(); VL_FadeOut (0, 255, 25, 29, 53, 20); VL_FadeIn(0,255,static_cast<const Uint8*>(grsegs[APOGEEPALETTE]),30); // Wait for end of fanfare // if (MusicMode==smm_AdLib) { IN_StartAck(); while ((!sqPlayedOnce) && (!IN_CheckAck())); } else IN_UserInput(TickBase*6); SD_MusicOff(); // Free palette and music. AND Restore palette // UNCACHEGRCHUNK(APOGEEPALETTE); delete [] audiosegs[STARTMUSIC + APOGFNFM_MUS]; audiosegs[STARTMUSIC + APOGFNFM_MUS] = NULL; // Do A Blue Flash! VL_FadeOut (0, 255, 25, 29, 53, 20); VL_FadeOut (0, 255, 0, 0, 0, 30); //--------------------- // JAM logo intro //--------------------- // Load and start music // CA_CacheAudioChunk(STARTMUSIC+TITLE_LOOP_MUSIC); ::SD_StartMusic(TITLE_LOOP_MUSIC); // Show JAM logo // if (!DoMovie(mv_intro,0)) MAIN_ERROR(PREDEMO_NOJAM); if (PowerBall) { Sint16 i; for (i=0;i<60 && (!DebugOk);i++) { VL_WaitVBL(1); // BBi ::in_handle_events(); if (Keyboard[sc_left_shift] && Keyboard[sc_right_shift]) { CA_LoadAllSounds(); SD_MusicOff(); ::sd_play_player_sound(SHOOTDOORSND, bstone::AC_ITEM); SD_WaitSoundDone(); ClearMemory(); DebugOk = 1; CA_CacheAudioChunk(STARTMUSIC+TITLE_LOOP_MUSIC); ::SD_StartMusic(TITLE_LOOP_MUSIC); } } } //--------------------- // PC-13 //--------------------- VL_Bar(0,0,320,200,0x14); CacheDrawPic(0,64,PC13PIC); VW_UpdateScreen(); VW_FadeIn(); IN_UserInput(TickBase*2); // Do A Red Flash! VL_FadeOut (0, 255, 39, 0, 0, 20); VW_FadeOut(); } #endif // SKIP_TITLE_AND_CREDITS }