PETKA: renamed unknown field in QMessage

This commit is contained in:
Andrei Prykhodko 2019-06-01 16:24:07 +03:00 committed by Eugene Sandulenko
parent 93980436aa
commit ab76b44ce0
3 changed files with 10 additions and 8 deletions

View File

@ -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 {

View File

@ -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});
}
}

View File

@ -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;