diff options
Diffstat (limited to 'queen/structs.h')
-rw-r--r-- | queen/structs.h | 54 |
1 files changed, 7 insertions, 47 deletions
diff --git a/queen/structs.h b/queen/structs.h index b94e5320ac..1e2f1d2892 100644 --- a/queen/structs.h +++ b/queen/structs.h @@ -36,13 +36,6 @@ struct Box { y2 = (int16)READ_BE_UINT16(ptr); ptr += 2; } - void readFromLE(byte *&ptr) { - x1 = (int16)READ_LE_UINT16(ptr); ptr += 2; - y1 = (int16)READ_LE_UINT16(ptr); ptr += 2; - x2 = (int16)READ_LE_UINT16(ptr); ptr += 2; - y2 = (int16)READ_LE_UINT16(ptr); ptr += 2; - } - void writeToBE(byte *&ptr) { WRITE_BE_UINT16(ptr, x1); ptr += 2; WRITE_BE_UINT16(ptr, y1); ptr += 2; @@ -86,14 +79,6 @@ struct Area { object = READ_BE_UINT16(ptr); ptr += 2; } - void readFromLE(byte *&ptr) { - mapNeighbours = (int16)READ_LE_UINT16(ptr); ptr += 2; - box.readFromLE(ptr); - bottomScaleFactor = READ_LE_UINT16(ptr); ptr += 2; - topScaleFactor = READ_LE_UINT16(ptr); ptr += 2; - object = READ_LE_UINT16(ptr); ptr += 2; - } - void writeToBE(byte *&ptr) { WRITE_BE_UINT16(ptr, mapNeighbours); ptr += 2; box.writeToBE(ptr); @@ -134,12 +119,6 @@ struct WalkOffData { y = READ_BE_UINT16(ptr); ptr += 2; } - void readFromLE(byte *&ptr) { - entryObj = (int16)READ_LE_UINT16(ptr); ptr += 2; - x = READ_LE_UINT16(ptr); ptr += 2; - y = READ_LE_UINT16(ptr); ptr += 2; - } - void writeToBE(byte *&ptr) { WRITE_BE_UINT16(ptr, entryObj); ptr += 2; WRITE_BE_UINT16(ptr, x); ptr += 2; @@ -252,17 +231,6 @@ struct ObjectData { state = READ_BE_UINT16(ptr); ptr += 2; image = (int16)READ_BE_UINT16(ptr); ptr += 2; } - - void readFromLE(byte *&ptr) { - name = (int16)READ_LE_UINT16(ptr); ptr += 2; - x = READ_LE_UINT16(ptr); ptr += 2; - y = READ_LE_UINT16(ptr); ptr += 2; - description = READ_LE_UINT16(ptr); ptr += 2; - entryObj = (int16)READ_LE_UINT16(ptr); ptr += 2; - room = READ_LE_UINT16(ptr); ptr += 2; - state = READ_LE_UINT16(ptr); ptr += 2; - image = (int16)READ_LE_UINT16(ptr); ptr += 2; - } void writeToBE(byte *&ptr) { WRITE_BE_UINT16(ptr, name); ptr += 2; @@ -317,6 +285,13 @@ struct ObjectDescription { lastDescription = READ_BE_UINT16(ptr); ptr += 2; lastSeenNumber = READ_BE_UINT16(ptr); ptr += 2; } + + void writeToBE(byte *&ptr) { + WRITE_BE_UINT16(ptr, object); ptr += 2; + WRITE_BE_UINT16(ptr, type); ptr += 2; + WRITE_BE_UINT16(ptr, lastDescription); ptr += 2; + WRITE_BE_UINT16(ptr, lastSeenNumber); ptr += 2; + } }; @@ -340,14 +315,6 @@ struct ItemData { sfxDescription = (int16)READ_BE_UINT16(ptr); ptr += 2; } - void readFromLE(byte *&ptr) { - name = (int16)READ_LE_UINT16(ptr); ptr += 2; - description = READ_LE_UINT16(ptr); ptr += 2; - state = READ_LE_UINT16(ptr); ptr += 2; - frame = READ_LE_UINT16(ptr); ptr += 2; - sfxDescription = (int16)READ_LE_UINT16(ptr); ptr += 2; - } - void writeToBE(byte *&ptr) { WRITE_BE_UINT16(ptr, name); ptr += 2; WRITE_BE_UINT16(ptr, description); ptr += 2; @@ -579,13 +546,6 @@ struct TalkSelected { } } - void readFromLE(byte *&ptr) { - hasTalkedTo = READ_LE_UINT16(ptr) != 0; ptr += 2; - for (int i = 0; i < 4; i++) { - values[i] = (int16)READ_LE_UINT16(ptr); ptr += 2; - } - } - void writeToBE(byte *&ptr) { WRITE_BE_UINT16(ptr, (uint16)hasTalkedTo); ptr += 2; for (int i = 0; i < 4; i++) { |