From ab76b44ce0b14ffe6ac64726ef57e300e06fe2bf Mon Sep 17 00:00:00 2001 From: Andrei Prykhodko Date: Sat, 1 Jun 2019 16:24:07 +0300 Subject: [PATCH] PETKA: renamed unknown field in QMessage --- engines/petka/base.h | 6 ++++-- engines/petka/q_system.cpp | 8 ++++---- engines/petka/q_system.h | 4 ++-- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/engines/petka/base.h b/engines/petka/base.h index a1d6a1e1af8..0fc6eaa859a 100644 --- a/engines/petka/base.h +++ b/engines/petka/base.h @@ -94,14 +94,16 @@ enum Opcode { kToMap = 63 // ??? MessageNumber }; +class QMessageObject; + struct QMessage { uint16 objId; uint16 opcode; int16 arg1; int16 arg2; int16 arg3; - int32 unk1; - int32 unk2; + QMessageObject *sender; + int32 unk; }; struct QReaction { diff --git a/engines/petka/q_system.cpp b/engines/petka/q_system.cpp index d6bacba83d0..1dc29a6546f 100644 --- a/engines/petka/q_system.cpp +++ b/engines/petka/q_system.cpp @@ -97,13 +97,13 @@ void QSystem::addMessage(const QMessage &msg) { _messages.push_back(msg); } -void QSystem::addMessage(uint16 objId, uint16 opcode, int16 arg1, int16 arg2, int16 arg3, int16 unk1, int16 unk2) { - _messages.push_back({objId, opcode, arg1, arg2, arg3, unk1, unk2}); +void QSystem::addMessage(uint16 objId, uint16 opcode, int16 arg1, int16 arg2, int16 arg3, int16 unk, QMessageObject *sender) { + _messages.push_back({objId, opcode, arg1, arg2, arg3, sender, unk}); } -void QSystem::addMessageForAllObjects(uint16 opcode, int16 arg1, int16 arg2, int16 arg3, int16 unk1, int16 unk2) { +void QSystem::addMessageForAllObjects(uint16 opcode, int16 arg1, int16 arg2, int16 arg3, int16 unk, QMessageObject *sender) { for (uint i = 0; i < _allObjects.size(); ++i) { - _messages.push_back({_allObjects[i]->getId(), opcode, arg1, arg2, arg3, unk1, unk2}); + _messages.push_back({_allObjects[i]->getId(), opcode, arg1, arg2, arg3, sender, unk}); } } diff --git a/engines/petka/q_system.h b/engines/petka/q_system.h index 79ae675284f..e3b0e0ed6c9 100644 --- a/engines/petka/q_system.h +++ b/engines/petka/q_system.h @@ -42,8 +42,8 @@ public: bool init(); void addMessage(const QMessage &msg); - void addMessage(uint16 objId, uint16 opcode, int16 arg1 = 0, int16 arg2 = 0, int16 arg3 = 0, int16 unk1 = 0, int16 unk2 = 0); - void addMessageForAllObjects(uint16 opcode, int16 arg1 = 0, int16 arg2 = 0, int16 arg3 = 0, int16 unk1 = 0, int16 unk2 = 0); + void addMessage(uint16 objId, uint16 opcode, int16 arg1 = 0, int16 arg2 = 0, int16 arg3 = 0, int16 unk = 0, QMessageObject *sender = nullptr); + void addMessageForAllObjects(uint16 opcode, int16 arg1 = 0, int16 arg2 = 0, int16 arg3 = 0, int16 unk = 0, QMessageObject *sender = nullptr); private: PetkaEngine &_vm;