diff --git a/source/game/game.cpp b/source/game/game.cpp index 9a63c4175..58223dd9c 100644 --- a/source/game/game.cpp +++ b/source/game/game.cpp @@ -313,7 +313,7 @@ void CGameScene::think(int _frames) chapterToOpen=chapter+1; } gameSlot->levelIsNowOpen(chapterToOpen-1,levelToOpen-1); -// CMapScene::setLevelToStartOn(chapterToOpen-1,levelToOpen-1); + CMapScene::setLevelToStartOn(chapterToOpen-1,levelToOpen-1); } // Level finished - go to map or fma diff --git a/source/map/map.cpp b/source/map/map.cpp index bb5705a43..04b9e0804 100644 --- a/source/map/map.cpp +++ b/source/map/map.cpp @@ -170,6 +170,9 @@ DVECTOR CMapScene::s_mapLevelPositions[MAP_NUM_LEVELS_PER_CHAPTER]= { 330,113 }, }; +int CMapScene::s_chapterToStartOn=1; +int CMapScene::s_levelToStartOn=1; + extern int s_globalLevelSelectThing; @@ -187,10 +190,14 @@ void CMapScene::init() m_font->setOt(10); m_font->setJustification(FontBank::JUST_LEFT); - m_currentChapterSelection=0; - m_currentLevelSelection=0; m_screenImage=MemAlloc(512*256*2,"MapScreen"); + + m_currentChapterSelection=s_chapterToStartOn; generateMapScreenImage(); + m_currentLevelSelection=s_levelToStartOn; + m_pointerPos=getPointerTargetPosition(); + m_pointerArrivedAtTarget=true; + SetScreenImage((u8*)m_screenImage); m_readyToExit=false; diff --git a/source/map/map.h b/source/map/map.h index 3aee59d75..d0ae624a7 100644 --- a/source/map/map.h +++ b/source/map/map.h @@ -48,6 +48,7 @@ public: int readyToShutdown(); char *getSceneName() {return"Map";} + static void setLevelToStartOn(int _chapter,int _level) {s_chapterToStartOn=_chapter;s_levelToStartOn=_level;} private: enum @@ -111,6 +112,9 @@ private: static sMapLevelData s_mapLevelData[MAP_NUM_CHAPTERS][MAP_NUM_LEVELS_PER_CHAPTER]; static DVECTOR s_mapLevelPositions[MAP_NUM_LEVELS_PER_CHAPTER]; + static int s_chapterToStartOn; + static int s_levelToStartOn; + };