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");
|
||||
|
||||
struct Keyboard {
|
||||
bool actionStates[TwinEActionType::Max] {false};
|
||||
/** Skipped key - key1 */
|
||||
int16 skippedKey = 0;
|
||||
/** Pressed key - printTextVar12 */
|
||||
|
|
|
@ -915,7 +915,7 @@ void TwinEEngine::readKeys() {
|
|||
uint8 localKey = 0;
|
||||
switch (event.type) {
|
||||
case Common::EVENT_CUSTOM_ENGINE_ACTION_END:
|
||||
actionStates[event.customType] = false;
|
||||
_keyboard.actionStates[event.customType] = false;
|
||||
localKey = twineactions[event.customType].localKey;
|
||||
break;
|
||||
case Common::EVENT_CUSTOM_ENGINE_ACTION_START:
|
||||
|
@ -929,12 +929,12 @@ void TwinEEngine::readKeys() {
|
|||
break;
|
||||
default:
|
||||
localKey = twineactions[event.customType].localKey;
|
||||
actionStates[event.customType] = true;
|
||||
_keyboard.actionStates[event.customType] = true;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
localKey = twineactions[event.customType].localKey;
|
||||
actionStates[event.customType] = true;
|
||||
_keyboard.actionStates[event.customType] = true;
|
||||
}
|
||||
break;
|
||||
case Common::EVENT_KEYUP:
|
||||
|
|
|
@ -153,7 +153,6 @@ private:
|
|||
int32 isTimeFreezed = 0;
|
||||
int32 saveFreezedTime = 0;
|
||||
ActorMoveStruct loopMovePtr; // mainLoopVar1
|
||||
bool actionStates[TwinEActionType::Max] {false};
|
||||
|
||||
public:
|
||||
TwinEEngine(OSystem *system, Common::Language language, uint32 flags);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue