mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-09 11:20:56 +00:00
EMI: Increase MAX_SHADOWS from 5 to 8.
This commit is contained in:
parent
94dd10cb11
commit
3648da8934
@ -108,7 +108,7 @@ Actor::Actor() :
|
||||
_turnRate = 100.0f;
|
||||
|
||||
_activeShadowSlot = -1;
|
||||
_shadowArray = new Shadow[5];
|
||||
_shadowArray = new Shadow[MAX_SHADOWS];
|
||||
}
|
||||
|
||||
Actor::~Actor() {
|
||||
@ -373,7 +373,11 @@ bool Actor::restoreState(SaveGame *savedState) {
|
||||
_mumbleChore.restoreState(savedState, this);
|
||||
|
||||
clearShadowPlanes();
|
||||
for (int i = 0; i < MAX_SHADOWS; ++i) {
|
||||
|
||||
int maxShadows = MAX_SHADOWS;
|
||||
if (savedState->saveMinorVersion() < 24)
|
||||
maxShadows = 5;
|
||||
for (int i = 0; i < maxShadows; ++i) {
|
||||
Shadow &shadow = _shadowArray[i];
|
||||
shadow.name = savedState->readString();
|
||||
|
||||
@ -1780,7 +1784,7 @@ void Actor::addShadowPlane(const char *n) {
|
||||
}
|
||||
|
||||
void Actor::setActiveShadow(int shadowId) {
|
||||
assert(shadowId >= 0 && shadowId <= 4);
|
||||
assert(shadowId >= 0 && shadowId < MAX_SHADOWS);
|
||||
|
||||
_activeShadowSlot = shadowId;
|
||||
_shadowArray[_activeShadowSlot].active = true;
|
||||
@ -1794,7 +1798,7 @@ void Actor::setShadowValid(int valid) {
|
||||
}
|
||||
|
||||
void Actor::setActivateShadow(int shadowId, bool state) {
|
||||
assert(shadowId >= 0 && shadowId <= 4);
|
||||
assert(shadowId >= 0 && shadowId < MAX_SHADOWS);
|
||||
|
||||
_shadowArray[shadowId].active = state;
|
||||
}
|
||||
|
@ -49,7 +49,7 @@ struct Plane {
|
||||
|
||||
typedef Common::List<Plane> SectorListType;
|
||||
|
||||
#define MAX_SHADOWS 5
|
||||
#define MAX_SHADOWS 8
|
||||
|
||||
struct Shadow {
|
||||
Shadow();
|
||||
|
@ -35,7 +35,7 @@ namespace Grim {
|
||||
#define SAVEGAME_FOOTERTAG 'ESAV'
|
||||
|
||||
uint SaveGame::SAVEGAME_MAJOR_VERSION = 22;
|
||||
uint SaveGame::SAVEGAME_MINOR_VERSION = 23;
|
||||
uint SaveGame::SAVEGAME_MINOR_VERSION = 24;
|
||||
|
||||
SaveGame *SaveGame::openForLoading(const Common::String &filename) {
|
||||
Common::InSaveFile *inSaveFile = g_system->getSavefileManager()->openForLoading(filename);
|
||||
|
Loading…
Reference in New Issue
Block a user