aboutsummaryrefslogtreecommitdiff
path: root/gob
diff options
context:
space:
mode:
authorJoost Peters2005-04-11 10:55:22 +0000
committerJoost Peters2005-04-11 10:55:22 +0000
commitf9f8bf30702ec0ca248757e30460bc8a5c1112c2 (patch)
tree968979c28ffc499ca4cafa131251e2db765d480d /gob
parent0c5253c1eb9182ca1af0c0f402d1dcb1f40cde9c (diff)
downloadscummvm-rg350-f9f8bf30702ec0ca248757e30460bc8a5c1112c2.tar.gz
scummvm-rg350-f9f8bf30702ec0ca248757e30460bc8a5c1112c2.tar.bz2
scummvm-rg350-f9f8bf30702ec0ca248757e30460bc8a5c1112c2.zip
convert some struct members - unfortunately we can't currently allocate memory and read the struct in "the proper way", as the engine still addresses data beyond it
svn-id: r17537
Diffstat (limited to 'gob')
-rw-r--r--gob/game.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/gob/game.cpp b/gob/game.cpp
index 1b6a09f40c..2ee53afc1e 100644
--- a/gob/game.cpp
+++ b/gob/game.cpp
@@ -1790,6 +1790,14 @@ void game_playTot(int16 skipPlay) {
game_totTextData =
(Game_TotTextTable *) (curPtr +
READ_LE_UINT32((char *)game_totFileData + 0x30));
+
+ game_totTextData->itemsCount = (int16)READ_LE_UINT16(&game_totTextData->itemsCount);
+
+ for (i = 0; i < game_totTextData->itemsCount; ++i) {
+ game_totTextData->items[i].offset = (int16)READ_LE_UINT16(&game_totTextData->items[i].offset);
+ game_totTextData->items[i].size = (int16)READ_LE_UINT16(&game_totTextData->items[i].size);
+ }
+
needTextFree = 0;
}
@@ -1800,6 +1808,16 @@ void game_playTot(int16 skipPlay) {
game_totResourceTable =
(Game_TotResTable *)(curPtr +
READ_LE_UINT32((char *)game_totFileData + 0x34));
+
+ game_totResourceTable->itemsCount = (int16)READ_LE_UINT16(&game_totResourceTable->itemsCount);
+
+ for (i = 0; i < game_totResourceTable->itemsCount; ++i) {
+ game_totResourceTable->items[i].offset = (int32)READ_LE_UINT32(&game_totResourceTable->items[i].offset);
+ game_totResourceTable->items[i].size = (int16)READ_LE_UINT16(&game_totResourceTable->items[i].size);
+ game_totResourceTable->items[i].width = (int16)READ_LE_UINT16(&game_totResourceTable->items[i].width);
+ game_totResourceTable->items[i].height = (int16)READ_LE_UINT16(&game_totResourceTable->items[i].height);
+ }
+
needFreeResTable = 0;
}