TWINE: moved actionstates into keyboard struct
This commit is contained in:
parent
903e0cc18a
commit
d8ad31f056
3 changed files with 4 additions and 4 deletions
|
@ -96,6 +96,7 @@ static constexpr const struct ActionMapping {
|
||||||
static_assert(ARRAYSIZE(twineactions) == TwinEActionType::Max, "Unexpected action mapping array size");
|
static_assert(ARRAYSIZE(twineactions) == TwinEActionType::Max, "Unexpected action mapping array size");
|
||||||
|
|
||||||
struct Keyboard {
|
struct Keyboard {
|
||||||
|
bool actionStates[TwinEActionType::Max] {false};
|
||||||
/** Skipped key - key1 */
|
/** Skipped key - key1 */
|
||||||
int16 skippedKey = 0;
|
int16 skippedKey = 0;
|
||||||
/** Pressed key - printTextVar12 */
|
/** Pressed key - printTextVar12 */
|
||||||
|
|
|
@ -915,7 +915,7 @@ void TwinEEngine::readKeys() {
|
||||||
uint8 localKey = 0;
|
uint8 localKey = 0;
|
||||||
switch (event.type) {
|
switch (event.type) {
|
||||||
case Common::EVENT_CUSTOM_ENGINE_ACTION_END:
|
case Common::EVENT_CUSTOM_ENGINE_ACTION_END:
|
||||||
actionStates[event.customType] = false;
|
_keyboard.actionStates[event.customType] = false;
|
||||||
localKey = twineactions[event.customType].localKey;
|
localKey = twineactions[event.customType].localKey;
|
||||||
break;
|
break;
|
||||||
case Common::EVENT_CUSTOM_ENGINE_ACTION_START:
|
case Common::EVENT_CUSTOM_ENGINE_ACTION_START:
|
||||||
|
@ -929,12 +929,12 @@ void TwinEEngine::readKeys() {
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
localKey = twineactions[event.customType].localKey;
|
localKey = twineactions[event.customType].localKey;
|
||||||
actionStates[event.customType] = true;
|
_keyboard.actionStates[event.customType] = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
localKey = twineactions[event.customType].localKey;
|
localKey = twineactions[event.customType].localKey;
|
||||||
actionStates[event.customType] = true;
|
_keyboard.actionStates[event.customType] = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case Common::EVENT_KEYUP:
|
case Common::EVENT_KEYUP:
|
||||||
|
|
|
@ -153,7 +153,6 @@ private:
|
||||||
int32 isTimeFreezed = 0;
|
int32 isTimeFreezed = 0;
|
||||||
int32 saveFreezedTime = 0;
|
int32 saveFreezedTime = 0;
|
||||||
ActorMoveStruct loopMovePtr; // mainLoopVar1
|
ActorMoveStruct loopMovePtr; // mainLoopVar1
|
||||||
bool actionStates[TwinEActionType::Max] {false};
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
TwinEEngine(OSystem *system, Common::Language language, uint32 flags);
|
TwinEEngine(OSystem *system, Common::Language language, uint32 flags);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue