diff --git a/source/games/whaven/src/main.cpp b/source/games/whaven/src/main.cpp index 87e804434..b34fe3b2c 100644 --- a/source/games/whaven/src/main.cpp +++ b/source/games/whaven/src/main.cpp @@ -223,6 +223,7 @@ void GameInterface::app_init() readpalettetable(); TileFiles.SetBackup(); InitFonts(); + connectpoint2[0] = -1; if(isWh2()) { tileDelete(FLOORMIRROR); @@ -245,6 +246,19 @@ void GameInterface::app_init() //sndInit(); //initpaletteshifts(); InitOriginalEpisodes(); + + psky_t* pSky = tileSetupSky(0); + pSky->tileofs[0] = 0; + pSky->tileofs[1] = 0; + pSky->tileofs[2] = 0; + pSky->tileofs[3] = 0; + pSky->yoffs = 256; + pSky->lognumtiles = 2; + pSky->horizfrac = 65536; + pSky->yscale = 65536; + parallaxtype = 2; + g_visibility = 2048; + } void GameInterface::Startup() @@ -402,6 +416,14 @@ void GameInterface::NewGame(MapRecord* map, int skill) STAT_NewLevel(currentLevel->labelName); } +bool GameInterface::StartGame(FNewGameStartup& gs) +{ + auto map = FindMapByLevelNum(1); + DeferedStartGame(map, gs.Skill); + return true; + +} + void GameInterface::MenuSound(EMenuSounds snd) { diff --git a/source/games/whaven/src/render.cpp b/source/games/whaven/src/render.cpp index 0b30f860d..51c3586f6 100644 --- a/source/games/whaven/src/render.cpp +++ b/source/games/whaven/src/render.cpp @@ -41,7 +41,8 @@ void drawscreen(int num, int dasmoothratio) { choriz = iHoriz; cang = inAngle; } - + choriz -= 100; // make it 0-based like the rest of the engine expects. + // wango if ((gotpic[FLOORMIRROR >> 3] & (1 << (FLOORMIRROR & 7))) != 0) { int dist = 0x7fffffff; @@ -59,7 +60,7 @@ void drawscreen(int num, int dasmoothratio) { // Todo: render this with 30% light only. inpreparemirror = true; renderSetRollAngle(1024); - renderDrawRoomsQ16(cposx, cposy, cposz, FloatToFixed(cang), FloatToFixed(201 - choriz), floormirrorsector[i]); + renderDrawRoomsQ16(cposx, cposy, cposz, FloatToFixed(cang), FloatToFixed(101 - choriz), floormirrorsector[i]); analyzesprites(plr, dasmoothratio); renderDrawMasks(); renderSetRollAngle(0); diff --git a/source/games/whaven/src/wh.h b/source/games/whaven/src/wh.h index 74b57cd80..cc8341bd9 100644 --- a/source/games/whaven/src/wh.h +++ b/source/games/whaven/src/wh.h @@ -527,7 +527,7 @@ struct GameInterface : public ::GameInterface //void MenuOpened() override; void MenuSound(EMenuSounds snd) override; bool CanSave() override; - //bool StartGame(FNewGameStartup& gs) override; + bool StartGame(FNewGameStartup& gs) override; //FSavegameInfo GetSaveSig() override; void SerializeGameState(FSerializer& arc) override; //void QuitToTitle() override;