equal
deleted
inserted
replaced
68 void CallLandscapeTick(void); |
68 void CallLandscapeTick(void); |
69 void IncreaseDate(void); |
69 void IncreaseDate(void); |
70 void DoPaletteAnimations(void); |
70 void DoPaletteAnimations(void); |
71 void MusicLoop(void); |
71 void MusicLoop(void); |
72 void ResetMusic(void); |
72 void ResetMusic(void); |
73 void InitializeStations(void); |
|
74 void DeleteAllPlayerStations(void); |
|
75 |
73 |
76 extern void SetDifficultyLevel(int mode, GameOptions *gm_opt); |
74 extern void SetDifficultyLevel(int mode, GameOptions *gm_opt); |
77 extern Player* DoStartupNewPlayer(bool is_ai); |
75 extern Player* DoStartupNewPlayer(bool is_ai); |
78 extern void ShowOSErrorBox(const char *buf); |
76 extern void ShowOSErrorBox(const char *buf); |
79 |
77 |
838 MarkWholeScreenDirty(); |
836 MarkWholeScreenDirty(); |
839 break; |
837 break; |
840 |
838 |
841 case SM_LOAD_SCENARIO: { /* Load scenario from scenario editor */ |
839 case SM_LOAD_SCENARIO: { /* Load scenario from scenario editor */ |
842 if (SafeSaveOrLoad(_file_to_saveload.name, _file_to_saveload.mode, GM_EDITOR)) { |
840 if (SafeSaveOrLoad(_file_to_saveload.name, _file_to_saveload.mode, GM_EDITOR)) { |
843 Player *p; |
|
844 |
|
845 _opt_ptr = &_opt; |
841 _opt_ptr = &_opt; |
846 |
842 |
847 SetLocalPlayer(OWNER_NONE); |
843 SetLocalPlayer(OWNER_NONE); |
848 _generating_world = true; |
|
849 /* Delete all players */ |
|
850 FOR_ALL_PLAYERS(p) { |
|
851 if (p->is_active) { |
|
852 ChangeOwnershipOfPlayerItems(p->index, PLAYER_SPECTATOR); |
|
853 p->is_active = false; |
|
854 } |
|
855 } |
|
856 _generating_world = false; |
|
857 _patches_newgame.starting_year = _cur_year; |
844 _patches_newgame.starting_year = _cur_year; |
858 // delete all stations owned by a player |
|
859 DeleteAllPlayerStations(); |
|
860 } else { |
845 } else { |
861 ShowErrorMessage(INVALID_STRING_ID, STR_4009_GAME_LOAD_FAILED, 0, 0); |
846 ShowErrorMessage(INVALID_STRING_ID, STR_4009_GAME_LOAD_FAILED, 0, 0); |
862 } |
847 } |
863 break; |
848 break; |
864 } |
849 } |