[Scummvm-git-logs] scummvm master -> 1ef2265991e4d30714a400d376f3e751cbe18735
sev-
sev at scummvm.org
Sat Oct 24 23:31:00 UTC 2020
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
c810e1d174 TWINE: Remove array initializer
1ef2265991 TWINE: Remove array initializers. Some older gcc's do not like it
Commit: c810e1d174c6c03864aca5d3ba3c21d5e6aadb46
https://github.com/scummvm/scummvm/commit/c810e1d174c6c03864aca5d3ba3c21d5e6aadb46
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-10-25T01:30:42+02:00
Commit Message:
TWINE: Remove array initializer
Changed paths:
engines/twine/menu.cpp
engines/twine/menu.h
diff --git a/engines/twine/menu.cpp b/engines/twine/menu.cpp
index f02819ccd6..13e0f27d68 100644
--- a/engines/twine/menu.cpp
+++ b/engines/twine/menu.cpp
@@ -250,6 +250,8 @@ Menu::Menu(TwinEEngine *engine) {
GiveUpMenuState = copySettings(_priv::GiveUpMenuSettings, sizeof(_priv::GiveUpMenuSettings));
MainMenuState = copySettings(_priv::MainMenuSettings, sizeof(_priv::MainMenuSettings));
AdvOptionsMenuState = copySettings(_priv::AdvOptionsMenuSettings, sizeof(_priv::AdvOptionsMenuSettings));
+
+ Common::fill(&behaviourAnimState[0], &behaviourAnimState[4], 0);
}
Menu::~Menu() {
diff --git a/engines/twine/menu.h b/engines/twine/menu.h
index 09c0650570..d588e01cc6 100644
--- a/engines/twine/menu.h
+++ b/engines/twine/menu.h
@@ -44,7 +44,7 @@ private:
/** Hero behaviour menu entity */
uint8 *behaviourEntity = 0;
/** Behaviour menu anim state */
- int16 behaviourAnimState[4]{0}; // winTab
+ int16 behaviourAnimState[4]; // winTab
/** Behaviour menu anim data pointer */
AnimTimerDataStruct behaviourAnimData[4];
Commit: 1ef2265991e4d30714a400d376f3e751cbe18735
https://github.com/scummvm/scummvm/commit/1ef2265991e4d30714a400d376f3e751cbe18735
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-10-25T01:30:42+02:00
Commit Message:
TWINE: Remove array initializers. Some older gcc's do not like it
Changed paths:
engines/twine/gamestate.cpp
engines/twine/gamestate.h
diff --git a/engines/twine/gamestate.cpp b/engines/twine/gamestate.cpp
index 53eb90dcaa..fd1fef97e6 100644
--- a/engines/twine/gamestate.cpp
+++ b/engines/twine/gamestate.cpp
@@ -49,8 +49,14 @@ namespace TwinE {
#define SAVE_DIR "save/"
-GameState::GameState(TwinEEngine *engine) {
- _engine = engine;
+GameState::GameState(TwinEEngine *engine) : _engine(engine) {
+ Common::fill(&gameFlags[0], &gameFlags[256], 0);
+ Common::fill(&inventoryFlags[0], &inventoryFlags[NUM_INVENTORY_ITEMS], 0);
+ Common::fill(&holomapFlags[0], &holomapFlags[150], 0);
+ playerName[0] = 0;
+ Common::fill(&gameChoices[0], &gameChoices[10], 0);
+ Common::fill(&gameChoicesSettings[0], &gameChoicesSettings[18], 0);
+
}
void GameState::initEngineProjections() {
diff --git a/engines/twine/gamestate.h b/engines/twine/gamestate.h
index c06de48638..649baa05a5 100644
--- a/engines/twine/gamestate.h
+++ b/engines/twine/gamestate.h
@@ -68,7 +68,7 @@ public:
/** LBA engine game flags to save quest states */
// TODO: why not NUM_GAME_FLAGS?
- uint8 gameFlags[256]{0};
+ uint8 gameFlags[256];
/** LBA engine chapter */
int16 gameChapter = 0;
@@ -99,15 +99,15 @@ public:
int16 usingSabre = 0;
/** Inventory used flags */
- uint8 inventoryFlags[NUM_INVENTORY_ITEMS]{0};
+ uint8 inventoryFlags[NUM_INVENTORY_ITEMS];
- uint8 holomapFlags[150]{0}; // GV14
+ uint8 holomapFlags[150]; // GV14
- char playerName[30] = "";
+ char playerName[30];
- int32 gameChoices[10]{0}; // inGameMenuData
+ int32 gameChoices[10]; // inGameMenuData
int32 numChoices = 0; // numOfOptionsInChoice
- int16 gameChoicesSettings[18]{0}; // choiceTab - same structure as menu settings
+ int16 gameChoicesSettings[18]; // choiceTab - same structure as menu settings
int32 choiceAnswer = 0; // inGameMenuAnswer
/** Initialize all engine variables */
More information about the Scummvm-git-logs
mailing list