[Scummvm-git-logs] scummvm master -> 6fdd705659332035d725d171cc41dc727c982fc7
sev-
sev at scummvm.org
Thu Apr 30 12:22:38 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:
267c78a40c WAGE: Plug memory leaks
6fdd705659 WAGE: Better event handling in sound
Commit: 267c78a40cdc5f57294ca2360eb0ce408a11bf69
https://github.com/scummvm/scummvm/commit/267c78a40cdc5f57294ca2360eb0ce408a11bf69
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-04-30T14:21:14+02:00
Commit Message:
WAGE: Plug memory leaks
Changed paths:
engines/wage/entities.cpp
engines/wage/entities.h
diff --git a/engines/wage/entities.cpp b/engines/wage/entities.cpp
index f4981a7269..7d22cadbda 100644
--- a/engines/wage/entities.cpp
+++ b/engines/wage/entities.cpp
@@ -383,6 +383,11 @@ Chr::Chr(Common::String name, Common::SeekableReadStream *data) {
delete data;
}
+Chr::~Chr() {
+ delete _weapon1;
+ delete _weapon2;
+}
+
void Chr::resetState() {
_context._statVariables[PHYS_STR_BAS] = _context._statVariables[PHYS_STR_CUR] = _physicalStrength;
_context._statVariables[PHYS_HIT_BAS] = _context._statVariables[PHYS_HIT_CUR] = _physicalHp;
diff --git a/engines/wage/entities.h b/engines/wage/entities.h
index 4f08cbb0c3..cba4cec919 100644
--- a/engines/wage/entities.h
+++ b/engines/wage/entities.h
@@ -151,6 +151,7 @@ public:
};
Chr(Common::String name, Common::SeekableReadStream *data);
+ ~Chr();
int _index;
int _resourceId;
Commit: 6fdd705659332035d725d171cc41dc727c982fc7
https://github.com/scummvm/scummvm/commit/6fdd705659332035d725d171cc41dc727c982fc7
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-04-30T14:22:21+02:00
Commit Message:
WAGE: Better event handling in sound
Changed paths:
engines/wage/sound.cpp
diff --git a/engines/wage/sound.cpp b/engines/wage/sound.cpp
index 9f5ed3497c..88a99fc35e 100644
--- a/engines/wage/sound.cpp
+++ b/engines/wage/sound.cpp
@@ -98,15 +98,15 @@ void WageEngine::playSound(Common::String soundName) {
while (_mixer->isSoundHandleActive(_soundHandle) && !_shouldQuit) {
Common::Event event;
- _eventMan->pollEvent(event);
-
- switch (event.type) {
- case Common::EVENT_QUIT:
- if (saveDialog())
- _shouldQuit = true;
- break;
- default:
- break;
+ if (_eventMan->pollEvent(event)) {
+ switch (event.type) {
+ case Common::EVENT_QUIT:
+ if (saveDialog())
+ _shouldQuit = true;
+ break;
+ default:
+ break;
+ }
}
_system->updateScreen();
More information about the Scummvm-git-logs
mailing list