[Scummvm-git-logs] scummvm master -> fefc0435dc57c95c67538bb082b0bc043ef18802
aquadran
noreply at scummvm.org
Sun Nov 17 13:33:16 UTC 2024
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
fefc0435dc WIJNTERMUTE: Fixed compilation for pluginEvent
Commit: fefc0435dc57c95c67538bb082b0bc043ef18802
https://github.com/scummvm/scummvm/commit/fefc0435dc57c95c67538bb082b0bc043ef18802
Author: PaweÅ KoÅodziejski (aquadran at gmail.com)
Date: 2024-11-17T14:33:12+01:00
Commit Message:
WIJNTERMUTE: Fixed compilation for pluginEvent
Changed paths:
engines/wintermute/ad/ad_game.cpp
engines/wintermute/base/base_game.h
engines/wintermute/base/saveload.cpp
diff --git a/engines/wintermute/ad/ad_game.cpp b/engines/wintermute/ad/ad_game.cpp
index 84756a2d032..d5eebe4b2d6 100644
--- a/engines/wintermute/ad/ad_game.cpp
+++ b/engines/wintermute/ad/ad_game.cpp
@@ -271,7 +271,7 @@ bool AdGame::changeScene(const char *filename, bool fadeIn) {
_scene = new AdScene(_gameRef);
registerObject(_scene);
} else {
- _gameRef->_pluginEvents.applyEvent(WME_EVENT_SCENE_SHUTDOWN, _scene);
+ _gameRef->pluginEvents().applyEvent(WME_EVENT_SCENE_SHUTDOWN, _scene);
_scene->applyEvent("SceneShutdown", true);
setPrevSceneName(_scene->getName());
@@ -311,7 +311,7 @@ bool AdGame::changeScene(const char *filename, bool fadeIn) {
}
_scene->loadState();
- _gameRef->_pluginEvents.applyEvent(WME_EVENT_SCENE_INIT, _scene);
+ _gameRef->pluginEvents().applyEvent(WME_EVENT_SCENE_INIT, _scene);
}
if (fadeIn) {
_gameRef->_transMgr->start(TRANSITION_FADE_IN);
@@ -2096,16 +2096,16 @@ bool AdGame::displayContent(bool doUpdate, bool displayAll) {
// process plugin events
if (doUpdate)
- _gameRef->_pluginEvents.applyEvent(WME_EVENT_UPDATE, nullptr);
+ _gameRef->pluginEvents().applyEvent(WME_EVENT_UPDATE, nullptr);
Point32 p;
getMousePos(&p);
_scene->update();
- _gameRef->_pluginEvents.applyEvent(WME_EVENT_SCENE_DRAW_BEGIN, _scene);
+ _gameRef->pluginEvents().applyEvent(WME_EVENT_SCENE_DRAW_BEGIN, _scene);
_scene->display();
- _gameRef->_pluginEvents.applyEvent(WME_EVENT_SCENE_DRAW_END, _scene);
+ _gameRef->pluginEvents().applyEvent(WME_EVENT_SCENE_DRAW_END, _scene);
// display in-game windows
displayWindows(true);
diff --git a/engines/wintermute/base/base_game.h b/engines/wintermute/base/base_game.h
index c4e3fda0472..b4dcc124e2a 100644
--- a/engines/wintermute/base/base_game.h
+++ b/engines/wintermute/base/base_game.h
@@ -406,6 +406,7 @@ protected:
public:
void autoSaveOnExit();
+ PluginEvent &pluginEvents() { return _pluginEvents; }
#ifdef ENABLE_HEROCRAFT
private:
diff --git a/engines/wintermute/base/saveload.cpp b/engines/wintermute/base/saveload.cpp
index 15fcbef95e1..e0504deb5cc 100644
--- a/engines/wintermute/base/saveload.cpp
+++ b/engines/wintermute/base/saveload.cpp
@@ -55,7 +55,7 @@ bool SaveLoad::loadGame(const Common::String &filename, BaseGame *gameRef) {
gameRef->_renderer->initSaveLoad(false);
gameRef->_loadInProgress = true;
- gameRef->_pluginEvents.clearEvents();
+ gameRef->pluginEvents().clearEvents();
BasePersistenceManager *pm = new BasePersistenceManager();
if (DID_SUCCEED(ret = pm->initLoad(filename))) {
//if (DID_SUCCEED(ret = cleanup())) {
@@ -67,7 +67,7 @@ bool SaveLoad::loadGame(const Common::String &filename, BaseGame *gameRef) {
// data initialization after load
SaveLoad::initAfterLoad();
- gameRef->_pluginEvents.applyEvent(WME_EVENT_GAME_AFTER_LOAD, nullptr);
+ gameRef->pluginEvents().applyEvent(WME_EVENT_GAME_AFTER_LOAD, nullptr);
gameRef->applyEvent("AfterLoad", true);
gameRef->displayContent(true, false);
@@ -94,7 +94,7 @@ bool SaveLoad::saveGame(int slot, const char *desc, bool quickSave, BaseGame *ga
gameRef->LOG(0, "Saving game '%s'...", filename.c_str());
- gameRef->_pluginEvents.applyEvent(WME_EVENT_GAME_BEFORE_SAVE, nullptr);
+ gameRef->pluginEvents().applyEvent(WME_EVENT_GAME_BEFORE_SAVE, nullptr);
gameRef->applyEvent("BeforeSave", true);
bool ret;
More information about the Scummvm-git-logs
mailing list