Skip to content

Commit

Permalink
Simplifications
Browse files Browse the repository at this point in the history
  • Loading branch information
gerstrong committed Sep 16, 2023
1 parent 5753636 commit eee655b
Show file tree
Hide file tree
Showing 7 changed files with 106 additions and 356 deletions.
437 changes: 98 additions & 339 deletions LICENSE

Large diffs are not rendered by default.

4 changes: 0 additions & 4 deletions src/engine/core/CIntro.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ CIntro::CIntro()
{
mp_bm.fill(nullptr);


m_introtime = 10; // Total time (in seconds) to elapse until Main menu opens
m_scrolly = 200;
m_finished = false;
mp_bmp_surface = gVideoDriver.mpVideoEngine->getBlitSurface();
SDL_FillRect(mp_bmp_surface, nullptr, 0);
}
Expand Down
6 changes: 3 additions & 3 deletions src/engine/core/CIntro.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ class CIntro
SDL_Surface *mp_bmp_surface;
std::array<int, 6> m_mid;
int m_timer = 0;
int m_introtime; // Total time to elapse until Main menu opens
int m_scrolly;
bool m_finished;
int m_introtime = 10; // Total time (in seconds) to elapse until Main menu opens
int m_scrolly = 200;
bool m_finished = false;
};

#endif /* CINTRO_H_ */
2 changes: 0 additions & 2 deletions src/engine/core/CMap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ CMap::CMap():
m_Tilemaps(gGraphics.getTileMaps())
{
resetScrolls();
m_Level = 0;
isSecret = false;
}


Expand Down
4 changes: 2 additions & 2 deletions src/engine/core/CMap.h
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ class CMap

bool m_animation_enabled = true;
bool m_Dark = false;
bool isSecret;
bool isSecret = false;
int mNumFuses = 0;
bool mFuseInLevel = false;

Expand All @@ -256,7 +256,7 @@ class CMap
CPlane mInfoPlane;
std::vector<ScrollingPlane> mScrollingPlanes;

Uint16 m_Level;
Uint16 m_Level = 0;
std::string m_LevelName;

bool mLocked = false;
Expand Down
5 changes: 1 addition & 4 deletions src/engine/core/CPassive.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,8 @@ CPassive::CPassive()
{
auto &keenFiles = gKeenFiles;
CExeFile &ExeFile = keenFiles.exeFile;
mBackToGameLauncher = false;
m_mode = INTRO;
m_Episode = ExeFile.getEpisode();
m_DataDirectory = gKeenFiles.gameDir;

m_DataDirectory = keenFiles.gameDir;
}


Expand Down
4 changes: 2 additions & 2 deletions src/engine/core/CPassive.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,14 @@ class CPassive : public CGameMode

void createOutlinedText(const int splash_x, const int splash_y, const std::string &text);

char m_mode;
char m_mode = INTRO;

protected:
char m_Episode;
char m_Difficulty;

// TODO: Bad variable name. Think about something better
bool mBackToGameLauncher;
bool mBackToGameLauncher = false;
std::string m_DataDirectory;
CSaveGameController m_SavedGame;
GsSurface mTextSfc;
Expand Down

0 comments on commit eee655b

Please sign in to comment.