void VW_Shutdown (void) { VW_SetScreenMode (TEXTGR); #if GRMODE == EGAGR VW_SetLineWidth (80); #endif }
DreamsIntro::DreamsIntro() { mStep = 1; mTimer = TickBase * 4; VW_SetScreenMode (GRMODE); VW_ClearVideo (BLACK); US_SetLoadSaveHooks(LoadGame,SaveGame,ResetGame); restartgame = gd_Continue; //while (true) //{ loadedgame = false; mFileName1 = "TITLESCR.LBM"; if (LoadLIBShape("KDREAMS.CMP", mFileName1.c_str(), &mFileShape1)) { //Quit("Can't load TITLE SCREEN"); } //while (!restartgame && !loadedgame) VW_InitDoubleBuffer(); IN_ClearKeysDown(); VW_SetScreen(0, 0); MoveGfxDst(0, 200); UnpackEGAShapeToScreen(&mFileShape1, 0, 0); mTimer = TickBase * 4; }
int handle() { VW_SetScreenMode (GRMODE); VW_ClearVideo (BLACK); DemoLoop(); // If thread has finished, we can quit CG gEventManager.add( new GMQuit() ); return 0; }
void Quit (const id0_char_t *error) { ShutdownId (); if (error && *error) { BE_ST_clrscr(); BE_ST_puts(error); BE_ST_puts("\n"); #ifdef REFKEEN_VER_KDREAMS_CGA_ALL // BE_ST_puts("For techinical assistance with running this software, type HELP at"); // BE_ST_puts(" the DOS prompt or call Softdisk Publishing at 1-318-221-8311"); #else if (refkeen_current_gamever == BE_GAMEVER_KDREAMSE113) { BE_ST_puts("For techinical assistance with running this software, type HELP at"); BE_ST_puts(" the DOS prompt or call Gamer's Edge at 1-318-221-8311"); } #endif // No additional lines for later versions (registered v1.93, shareware v1.20) BE_ST_HandleExit(1); } // TODO (REFKEEN) Maybe we can define CATALOG based on version? #if (!defined REFKEEN_VER_KDREAMS_CGA_ALL) || (!defined CATALOG) #ifndef REFKEEN_VER_KDREAMS_CGA_ALL if (refkeen_current_gamever == BE_GAMEVER_KDREAMSE113) #endif { id0_argc = 2; id0_argv[1] = "LAST.SHL"; id0_argv[2] = "ENDSCN.SCN"; id0_argv[3] = NULL; //if (execv("LOADSCN.EXE", _argv) == -1) // Quit("Couldn't find executable LOADSCN.EXE.\n"); void loadscn2_main(int argc, const char **argv); loadscn2_main(id0_argc+1, id0_argv); } #endif #if (defined REFKEEN_VER_KDREAMS_CGA_ALL) && (defined CATALOG) VW_SetScreenMode(TEXTGR); BE_ST_HandleExit(0); #endif // For all other versions (registered v1.93, shareware v1.20), just exit #ifndef REFKEEN_VER_KDREAMS_CGA_ALL if (refkeen_current_gamever != BE_GAMEVER_KDREAMSE113) { BE_ST_HandleExit(0); } #endif }
//------------------------------------------------------------------------- // Display640() //------------------------------------------------------------------------- void Display640(void) { // Can you believe it takes all this just to change to 640 mode!!???! // VW_ScreenToScreen(0,FREESTART-STATUSLEN,40,80); VW_SetLineWidth(80); MoveScreen(0,0); VW_Bar (0,0,640,200,0); VW_SetScreenMode(EGA640GR); VW_SetLineWidth(80); BlackPalette(); }
//------------------------------------------------------------------------- // Display320() //------------------------------------------------------------------------- void Display320(void) { // Can you believe it takes all this just to change to 320 mode!!???! // VW_ColorBorder(0); VW_FadeOut(); VW_SetLineWidth(40); MoveScreen(0,0); VW_Bar (0,0,320,200,0); VW_SetScreenMode(EGA320GR); VW_SetLineWidth(40); BlackPalette(); VW_ScreenToScreen(FREESTART-STATUSLEN,0,40,80); }
void InitGame (void) { //id0_unsigned_t segstart,seglength; id0_int_t i,x,y; id0_unsigned_t *blockstart; if (refkeen_current_gamever == BE_GAMEVER_CAT3D100) { US_TextScreen(); } MM_Startup (); VW_Startup (); #ifndef PROFILE IN_Startup (); SD_Startup (); #endif US_Startup (); if (refkeen_current_gamever == BE_GAMEVER_CAT3D100) { US_UpdateTextScreen(); } CA_Startup (); US_Setup (); US_SetLoadSaveHooks(LoadTheGame,SaveTheGame,ResetGame); // // load in and lock down some basic chunks // CA_ClearMarks (); CA_MarkGrChunk(STARTFONT); CA_MarkGrChunk(STARTTILE8); CA_MarkGrChunk(STARTTILE8M); CA_MarkGrChunk(HAND1PICM); CA_MarkGrChunk(HAND2PICM); CA_MarkGrChunk(ENTERPLAQUEPIC); CA_CacheMarks (NULL); MM_SetLock (&grsegs[STARTFONT],true); MM_SetLock (&grsegs[STARTTILE8],true); MM_SetLock (&grsegs[STARTTILE8M],true); MM_SetLock (&grsegs[HAND1PICM],true); MM_SetLock (&grsegs[HAND2PICM],true); MM_SetLock (&grsegs[ENTERPLAQUEPIC],true); fontcolor = WHITE; // // build some tables // for (i=0;i<MAPSIZE;i++) nearmapylookup[i] = &tilemap[0][0]+MAPSIZE*i; for (i=0;i<PORTTILESHIGH;i++) uwidthtable[i] = UPDATEWIDE*i; blockstart = &blockstarts[0]; for (y=0;y<UPDATEHIGH;y++) for (x=0;x<UPDATEWIDE;x++) *blockstart++ = SCREENWIDTH*16*y+x*TILEWIDTH; BuildTables (); // 3-d tables SetupScaling (); #ifndef PROFILE if (refkeen_current_gamever == BE_GAMEVER_CAT3D100) { US_FinishTextScreen(); } #endif // // reclaim the memory from the linked in text screen // // REFKEEN DIFFERENCE (FIXME: Should we "fix" this at all?) // - Don't handle this, a bit more complicated with our setup and the // difference is (probably) insignificant with well-defined behaviors // anyway... #if 0 segstart = FP_SEG(&introscn); seglength = 4000/16; if (FP_OFF(&introscn)) { segstart++; seglength--; } MML_UseSpace (segstart,seglength); #endif VW_SetScreenMode (GRMODE); VW_ColorBorder (3); VW_ClearVideo (BLACK); // // initialize variables // updateptr = &update[0]; // REFKEEN - Safe unaligned accesses *(updateptr + UPDATEWIDE*PORTTILESHIGH) = 1; *(updateptr + UPDATEWIDE*PORTTILESHIGH + 1) = 3; //*(id0_unsigned_t *)(updateptr + UPDATEWIDE*PORTTILESHIGH) = UPDATETERMINATE; bufferofs = 0; displayofs = 0; VW_SetLineWidth(SCREENWIDTH); }
void VW_Shutdown (void) { VW_SetScreenMode (TEXTGR); if (GRMODE == EGAGR) VW_SetLineWidth (80); }
void InitGame (void) { id0_int_t i; MM_Startup (); #if 0 // Handle piracy screen... // movedata(FP_SEG(PIRACY),(id0_unsigned_t)PIRACY,0xb800,displayofs,4000); while (BE_ST_BiosScanCode(0) != sc_Return); //while ((bioskey(0)>>8) != sc_Return); #endif #if GRMODE == EGAGR if (mminfo.mainmem < 335l*1024) { //#pragma warn -pro //#pragma warn -nod #ifdef REFKEEN_VER_KDREAMS_CGA_ALL BE_ST_textcolor(7); #endif #ifndef REFKEEN_VER_KDREAMS_CGA_ALL if (refkeen_current_gamever == BE_GAMEVER_KDREAMSE113) #endif { BE_ST_textbackground(0); } //#pragma warn +nod //#pragma warn +pro BE_ST_clrscr(); // we can't include CONIO because of a name conflict //#pragma warn +nod //#pragma warn +pro BE_ST_puts ("There is not enough memory available to play the game reliably. You can"); BE_ST_puts ("play anyway, but an out of memory condition will eventually pop up. The"); BE_ST_puts ("correct solution is to unload some TSRs or rename your CONFIG.SYS and"); BE_ST_puts ("AUTOEXEC.BAT to free up more memory.\n"); BE_ST_puts ("Do you want to (Q)uit, or (C)ontinue?"); //i = bioskey (0); //if ( (i>>8) != sc_C) i = BE_ST_BiosScanCode (0); if (i != sc_C) Quit (""); } #endif US_TextScreen(); VW_Startup (); RF_Startup (); IN_Startup (); SD_Startup (); US_Startup (); #ifdef REFKEEN_VER_KDREAMS_CGA_ALL US_UpdateTextScreen(); #endif CA_Startup (); US_Setup (); // // load in and lock down some basic chunks // CA_ClearMarks (); CA_MarkGrChunk(STARTFONT); CA_MarkGrChunk(STARTFONTM); CA_MarkGrChunk(STARTTILE8); CA_MarkGrChunk(STARTTILE8M); for (i=KEEN_LUMP_START;i<=KEEN_LUMP_END;i++) CA_MarkGrChunk(i); #ifdef REFKEEN_VER_KDREAMS_CGA_ALL CA_CacheMarks (NULL); #elif defined REFKEEN_VER_KDREAMS_ANYEGA_ALL CA_CacheMarks (NULL, 0); #endif MM_SetLock (&grsegs[STARTFONT],true); MM_SetLock (&grsegs[STARTFONTM],true); MM_SetLock (&grsegs[STARTTILE8],true); MM_SetLock (&grsegs[STARTTILE8M],true); for (i=KEEN_LUMP_START;i<=KEEN_LUMP_END;i++) MM_SetLock (&grsegs[i],true); CA_LoadAllSounds (); fontcolor = WHITE; US_FinishTextScreen(); VW_SetScreenMode (GRMODE); VW_ClearVideo (BLACK); }
void InitGame (void) { //id0_unsigned_t segstart,seglength; id0_int_t i,x,y; id0_unsigned_t *blockstart; // US_TextScreen(); MM_Startup (); VW_Startup (); #ifndef PROFILE IN_Startup (); SD_Startup (); #endif US_Startup (); CA_Startup (); US_Setup (); US_SetLoadSaveHooks(LoadTheGame,SaveTheGame,ResetGame); // // load in and lock down some basic chunks // CA_ClearMarks (); CA_MarkGrChunk(STARTFONT); CA_MarkGrChunk(STARTTILE8); CA_MarkGrChunk(STARTTILE8M); CA_MarkGrChunk(HAND1PICM); CA_MarkGrChunk(NORTHICONSPR); CA_CacheMarks (NULL); MM_SetLock (&grsegs[STARTFONT],true); MM_SetLock (&grsegs[STARTTILE8],true); MM_SetLock (&grsegs[STARTTILE8M],true); MM_SetLock (&grsegs[HAND1PICM],true); fontcolor = WHITE; // // build some tables // for (i=0;i<MAPSIZE;i++) nearmapylookup[i] = &tilemap[0][0]+MAPSIZE*i; for (i=0;i<PORTTILESHIGH;i++) uwidthtable[i] = UPDATEWIDE*i; blockstart = &blockstarts[0]; for (y=0;y<UPDATEHIGH;y++) for (x=0;x<UPDATEWIDE;x++) *blockstart++ = SCREENWIDTH*16*y+x*TILEWIDTH; BuildTables (); // 3-d tables SetupScaling (); #ifndef PROFILE // US_FinishTextScreen(); #endif #if 0 // // reclaim the memory from the linked in text screen // segstart = FP_SEG(&introscn); seglength = 4000/16; if (FP_OFF(&introscn)) { segstart++; seglength--; } MML_UseSpace (segstart,seglength); #endif VW_SetScreenMode (GRMODE); ge_textmode = false; // VW_ColorBorder (3); VW_ClearVideo (BLACK); // // initialize variables // updateptr = &update[0]; // REFKEEN - Safe unaligned accesses *(updateptr + UPDATEWIDE*PORTTILESHIGH) = 1; *(updateptr + UPDATEWIDE*PORTTILESHIGH + 1) = 3; //*(id0_unsigned_t *)(updateptr + UPDATEWIDE*PORTTILESHIGH) = UPDATETERMINATE; bufferofs = 0; displayofs = 0; VW_SetLineWidth(SCREENWIDTH); }