[Scummvm-git-logs] scummvm master -> 9c432233a2146de9923defc04b994ff91f971137
dreammaster
dreammaster at scummvm.org
Sat Dec 9 18:18:27 CET 2017
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:
9c432233a2 XEEN: Change monster _damageType from int to DamageType enum
Commit: 9c432233a2146de9923defc04b994ff91f971137
https://github.com/scummvm/scummvm/commit/9c432233a2146de9923defc04b994ff91f971137
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2017-12-09T12:18:15-05:00
Commit Message:
XEEN: Change monster _damageType from int to DamageType enum
Changed paths:
engines/xeen/combat.cpp
engines/xeen/interface_scene.cpp
engines/xeen/map.h
diff --git a/engines/xeen/combat.cpp b/engines/xeen/combat.cpp
index 4a952fa..866cb8a 100644
--- a/engines/xeen/combat.cpp
+++ b/engines/xeen/combat.cpp
@@ -762,7 +762,7 @@ void Combat::monsterOvercome() {
if (monster._damageType != DT_PHYSICAL && monster._damageType != DT_DRAGONSLEEP) {
// Do a saving throw for monster
if (dataIndex <= _vm->getRandomNumber(1, dataIndex + 50))
- monster._damageType = 0;
+ monster._damageType = DT_PHYSICAL;
}
}
}
diff --git a/engines/xeen/interface_scene.cpp b/engines/xeen/interface_scene.cpp
index c9dd534..05815c5 100644
--- a/engines/xeen/interface_scene.cpp
+++ b/engines/xeen/interface_scene.cpp
@@ -704,7 +704,7 @@ void InterfaceScene::animate3d() {
for (uint idx = 0; idx < map._mobData._monsters.size(); ++idx) {
MazeMonster &monster = map._mobData._monsters[idx];
- if (!monster._damageType) {
+ if (monster._damageType == DT_PHYSICAL) {
if (monster._frame < 8) {
MonsterStruct &monsterData = *monster._monsterData;
if (!monsterData._loopAnimation) {
diff --git a/engines/xeen/map.h b/engines/xeen/map.h
index d0b63ec..19d7cc5 100644
--- a/engines/xeen/map.h
+++ b/engines/xeen/map.h
@@ -248,7 +248,7 @@ struct MazeMonster {
int _id;
int _spriteId;
bool _isAttacking;
- int _damageType;
+ DamageType _damageType;
int _field9;
int _fieldA;
int _hp;
More information about the Scummvm-git-logs
mailing list