mirror of
https://github.com/ZDoom/Raze.git
synced 2024-12-02 09:02:18 +00:00
- added the needed parts to start the game from the menu.
Levels render, but gameplay has not been hooked up yet.
This commit is contained in:
parent
f09db4c943
commit
a31bc4be6b
3 changed files with 26 additions and 3 deletions
|
@ -223,6 +223,7 @@ void GameInterface::app_init()
|
||||||
readpalettetable();
|
readpalettetable();
|
||||||
TileFiles.SetBackup();
|
TileFiles.SetBackup();
|
||||||
InitFonts();
|
InitFonts();
|
||||||
|
connectpoint2[0] = -1;
|
||||||
|
|
||||||
if(isWh2()) {
|
if(isWh2()) {
|
||||||
tileDelete(FLOORMIRROR);
|
tileDelete(FLOORMIRROR);
|
||||||
|
@ -245,6 +246,19 @@ void GameInterface::app_init()
|
||||||
//sndInit();
|
//sndInit();
|
||||||
//initpaletteshifts();
|
//initpaletteshifts();
|
||||||
InitOriginalEpisodes();
|
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()
|
void GameInterface::Startup()
|
||||||
|
@ -402,6 +416,14 @@ void GameInterface::NewGame(MapRecord* map, int skill)
|
||||||
STAT_NewLevel(currentLevel->labelName);
|
STAT_NewLevel(currentLevel->labelName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool GameInterface::StartGame(FNewGameStartup& gs)
|
||||||
|
{
|
||||||
|
auto map = FindMapByLevelNum(1);
|
||||||
|
DeferedStartGame(map, gs.Skill);
|
||||||
|
return true;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void GameInterface::MenuSound(EMenuSounds snd)
|
void GameInterface::MenuSound(EMenuSounds snd)
|
||||||
{
|
{
|
||||||
|
|
|
@ -41,6 +41,7 @@ void drawscreen(int num, int dasmoothratio) {
|
||||||
choriz = iHoriz;
|
choriz = iHoriz;
|
||||||
cang = inAngle;
|
cang = inAngle;
|
||||||
}
|
}
|
||||||
|
choriz -= 100; // make it 0-based like the rest of the engine expects.
|
||||||
|
|
||||||
// wango
|
// wango
|
||||||
if ((gotpic[FLOORMIRROR >> 3] & (1 << (FLOORMIRROR & 7))) != 0) {
|
if ((gotpic[FLOORMIRROR >> 3] & (1 << (FLOORMIRROR & 7))) != 0) {
|
||||||
|
@ -59,7 +60,7 @@ void drawscreen(int num, int dasmoothratio) {
|
||||||
// Todo: render this with 30% light only.
|
// Todo: render this with 30% light only.
|
||||||
inpreparemirror = true;
|
inpreparemirror = true;
|
||||||
renderSetRollAngle(1024);
|
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);
|
analyzesprites(plr, dasmoothratio);
|
||||||
renderDrawMasks();
|
renderDrawMasks();
|
||||||
renderSetRollAngle(0);
|
renderSetRollAngle(0);
|
||||||
|
|
|
@ -527,7 +527,7 @@ struct GameInterface : public ::GameInterface
|
||||||
//void MenuOpened() override;
|
//void MenuOpened() override;
|
||||||
void MenuSound(EMenuSounds snd) override;
|
void MenuSound(EMenuSounds snd) override;
|
||||||
bool CanSave() override;
|
bool CanSave() override;
|
||||||
//bool StartGame(FNewGameStartup& gs) override;
|
bool StartGame(FNewGameStartup& gs) override;
|
||||||
//FSavegameInfo GetSaveSig() override;
|
//FSavegameInfo GetSaveSig() override;
|
||||||
void SerializeGameState(FSerializer& arc) override;
|
void SerializeGameState(FSerializer& arc) override;
|
||||||
//void QuitToTitle() override;
|
//void QuitToTitle() override;
|
||||||
|
|
Loading…
Reference in a new issue