Skip to content

Commit 293ec3d

Browse files
committed
fix game over state palettes
1 parent 2760573 commit 293ec3d

4 files changed

Lines changed: 10 additions & 4 deletions

File tree

src/Geoscape/DefeatState.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,6 @@ DefeatState::DefeatState(Game *game) : State(game), _screenNumber(0)
6161
add(_txtText[text]);
6262
_txtText[text]->setVisible(false);
6363
}
64-
65-
nextScreen();
6664
}
6765

6866
/**
@@ -73,6 +71,10 @@ DefeatState::~DefeatState()
7371

7472
}
7573

74+
void DefeatState::init()
75+
{
76+
nextScreen();
77+
}
7678
/**
7779
* Returns to the previous screen.
7880
* @param action Pointer to an action.

src/Geoscape/DefeatState.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ class DefeatState : public State
4343
DefeatState(Game *game);
4444
/// Cleans up the Defeat state.
4545
~DefeatState();
46+
void init();
4647
/// Handler for clicking the screen.
4748
void windowClick(Action *action);
4849
void nextScreen();

src/Geoscape/VictoryState.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,6 @@ VictoryState::VictoryState(Game *game) : State(game), _screenNumber(0)
6363
add(_txtText[text]);
6464
_txtText[text]->setVisible(false);
6565
}
66-
67-
nextScreen();
6866
}
6967

7068
/**
@@ -75,6 +73,10 @@ VictoryState::~VictoryState()
7573

7674
}
7775

76+
void VictoryState::init()
77+
{
78+
nextScreen();
79+
}
7880
/**
7981
* Returns to the previous screen.
8082
* @param action Pointer to an action.

src/Geoscape/VictoryState.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ class VictoryState : public State
4343
VictoryState(Game *game);
4444
/// Cleans up the Victory state.
4545
~VictoryState();
46+
void init();
4647
/// Handler for clicking the screen.
4748
void windowClick(Action *action);
4849
void nextScreen();

0 commit comments

Comments
 (0)