Implemented the 'Start Again' menu option to properly restart the game
svn-id: r39981
This commit is contained in:
parent
9efb96ce69
commit
f53b4d3de4
4 changed files with 9 additions and 0 deletions
|
@ -124,6 +124,7 @@ void closeAllMenu(void);
|
|||
int removeFinishedScripts(scriptInstanceStruct *ptrHandle);
|
||||
void initBigVar3(void);
|
||||
void resetActorPtr(actorStruct *ptr);
|
||||
int initAllData(void);
|
||||
|
||||
} // End of namespace Cruise
|
||||
|
||||
|
|
|
@ -35,6 +35,7 @@ int16 computeZoom(int param);
|
|||
int16 subOp23(int param1, int param2);
|
||||
void freeObjectList(cellStruct *pListHead);
|
||||
int removeAnimation(actorStruct * pHead, int overlay, int objIdx, int objType);
|
||||
int16 Op_FadeOut(void);
|
||||
|
||||
} // End of namespace Cruise
|
||||
|
||||
|
|
|
@ -261,6 +261,12 @@ int playerMenu(int menuX, int menuY) {
|
|||
loadSavegameData(0);
|
||||
break;
|
||||
case 6: // restart
|
||||
Op_FadeOut();
|
||||
memset(globalScreen, 0, 320 * 200);
|
||||
initVars();
|
||||
initAllData();
|
||||
changeCursor(CURSOR_NORMAL);
|
||||
userEnabled = 0;
|
||||
break;
|
||||
case 7: // exit
|
||||
return 1;
|
||||
|
|
|
@ -42,6 +42,7 @@ struct CruiseSavegameHeader {
|
|||
Common::Error saveSavegameData(int saveGameIdx, const Common::String &saveName);
|
||||
Common::Error loadSavegameData(int saveGameIdx);
|
||||
bool readSavegameHeader(Common::InSaveFile *in, CruiseSavegameHeader &header);
|
||||
void initVars(void);
|
||||
|
||||
} // End of namespace Cruise
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue