Skip to content

Commit

Permalink
PRINCE: Interpreter flags fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaslw committed Jul 7, 2014
1 parent c7eada5 commit 9df716e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions engines/prince/script.cpp
Expand Up @@ -451,12 +451,12 @@ void InterpreterFlags::resetAllFlags() {
memset(_flags, 0, sizeof(_flags));
}

void InterpreterFlags::setFlagValue(Flags::Id flagId, uint16 value) {
_flags[(uint16)flagId - FLAG_MASK] = value;
void InterpreterFlags::setFlagValue(Flags::Id flagId, uint32 value) {
_flags[(uint32)flagId - FLAG_MASK] = value;
}

uint16 InterpreterFlags::getFlagValue(Flags::Id flagId) {
return _flags[(uint16)flagId - FLAG_MASK];
uint32 InterpreterFlags::getFlagValue(Flags::Id flagId) {
return _flags[(uint32)flagId - FLAG_MASK];
}

Interpreter::Interpreter(PrinceEngine *vm, Script *script, InterpreterFlags *flags) :
Expand Down
6 changes: 3 additions & 3 deletions engines/prince/script.h
Expand Up @@ -165,16 +165,16 @@ class InterpreterFlags {
public:
InterpreterFlags();

void setFlagValue(Flags::Id flag, uint16 value);
uint16 getFlagValue(Flags::Id flag);
void setFlagValue(Flags::Id flag, uint32 value);
uint32 getFlagValue(Flags::Id flag);

void resetAllFlags();

static const uint16 FLAG_MASK = 0x8000;

private:
static const uint16 MAX_FLAGS = 2000;
int16 _flags[MAX_FLAGS];
int32 _flags[MAX_FLAGS];
};

class Interpreter {
Expand Down

0 comments on commit 9df716e

Please sign in to comment.