aboutsummaryrefslogtreecommitdiff
path: root/sky
diff options
context:
space:
mode:
authorOliver Kiehl2003-04-27 21:45:28 +0000
committerOliver Kiehl2003-04-27 21:45:28 +0000
commit2823a2fadd30fccf38535fc8e934581cb62bfbde (patch)
tree97259fe7fa11cc2aba1cf672f33dc5933edd8328 /sky
parent687bcd0c09d0e8aef037c6682aa337567e703b73 (diff)
downloadscummvm-rg350-2823a2fadd30fccf38535fc8e934581cb62bfbde.tar.gz
scummvm-rg350-2823a2fadd30fccf38535fc8e934581cb62bfbde.tar.bz2
scummvm-rg350-2823a2fadd30fccf38535fc8e934581cb62bfbde.zip
adapted the code to the compact changes. not quite complete yet
svn-id: r7165
Diffstat (limited to 'sky')
-rw-r--r--sky/compact.cpp140
-rw-r--r--sky/compact.h13
-rw-r--r--sky/struc.h60
3 files changed, 26 insertions, 187 deletions
diff --git a/sky/compact.cpp b/sky/compact.cpp
index b0f027468e..500ca6034f 100644
--- a/sky/compact.cpp
+++ b/sky/compact.cpp
@@ -39,7 +39,6 @@
#define COMPACT_SIZE (sizeof(compactOffsets)/sizeof(uint32))
#define EXTCOMPACT_SIZE (sizeof(extCompactOffsets)/sizeof(uint32))
-#define UNKNOWNSTUFF_SIZE (sizeof(unknownStuffOffsets)/sizeof(uint32))
#define OFFS(type,item) (((uint32)(&((type*)0)->item)))
#define MK32(type,item) OFFS(type, item),0,0,0
@@ -104,136 +103,6 @@ static const uint32 extCompactOffsets[] = {
MK16(ExtCompact, arTargetY),
MK32(ExtCompact, animScratch),
MK16(ExtCompact, megaSet),
- MK16(ExtCompact, gridWidth),
- MK16(ExtCompact, colOffset),
- MK16(ExtCompact, colWidth),
- MK16(ExtCompact, lastChr),
- MK32(ExtCompact, animUp),
- MK32(ExtCompact, animDown),
- MK32(ExtCompact, animLeft),
- MK32(ExtCompact, animRight),
- MK32(ExtCompact, standUp),
- MK32(ExtCompact, standDown),
- MK32(ExtCompact, standLeft),
- MK32(ExtCompact, standRight),
- MK32(ExtCompact, standTalk),
-};
-
-static const uint32 unknownStuffOffsets[] = {
- MK16(UnknownStuff, unknownStuff_1_1[0]),
- MK16(UnknownStuff, unknownStuff_1_1[1]),
- MK16(UnknownStuff, unknownStuff_1_1[2]),
- MK16(UnknownStuff, unknownStuff_1_1[3]),
- MK32(UnknownStuff, unknownStuff_1_2[0]),
- MK32(UnknownStuff, unknownStuff_1_2[1]),
- MK32(UnknownStuff, unknownStuff_1_2[2]),
- MK32(UnknownStuff, unknownStuff_1_2[3]),
- MK32(UnknownStuff, unknownStuff_1_2[4]),
- MK32(UnknownStuff, unknownStuff_1_2[5]),
- MK32(UnknownStuff, unknownStuff_1_2[6]),
- MK32(UnknownStuff, unknownStuff_1_2[7]),
- MK32(UnknownStuff, unknownStuff_1_2[8]),
- MK32(UnknownStuff, unknownStuff_1_2[9]),
- MK32(UnknownStuff, unknownStuff_1_2[10]),
- MK32(UnknownStuff, unknownStuff_1_2[11]),
- MK32(UnknownStuff, unknownStuff_1_2[12]),
- MK32(UnknownStuff, unknownStuff_1_2[13]),
- MK32(UnknownStuff, unknownStuff_1_2[14]),
- MK32(UnknownStuff, unknownStuff_1_2[15]),
- MK32(UnknownStuff, unknownStuff_1_2[16]),
- MK32(UnknownStuff, unknownStuff_1_2[17]),
- MK32(UnknownStuff, unknownStuff_1_2[18]),
- MK32(UnknownStuff, unknownStuff_1_2[19]),
- MK32(UnknownStuff, unknownStuff_1_2[20]),
- MK32(UnknownStuff, unknownStuff_1_2[21]),
- MK32(UnknownStuff, unknownStuff_1_2[22]),
- MK32(UnknownStuff, unknownStuff_1_2[23]),
- MK32(UnknownStuff, unknownStuff_1_2[24]),
- MK32(UnknownStuff, unknownStuff_1_2[25]),
- MK32(UnknownStuff, unknownStuff_1_2[26]),
- MK32(UnknownStuff, unknownStuff_1_2[27]),
- MK32(UnknownStuff, unknownStuff_1_2[28]),
- MK32(UnknownStuff, unknownStuff_1_2[29]),
- MK32(UnknownStuff, unknownStuff_1_2[30]),
- MK32(UnknownStuff, unknownStuff_1_2[31]),
- MK32(UnknownStuff, unknownStuff_1_2[32]),
- MK32(UnknownStuff, unknownStuff_1_2[33]),
- MK16(UnknownStuff, unknownStuff_2_1[0]),
- MK16(UnknownStuff, unknownStuff_2_1[1]),
- MK16(UnknownStuff, unknownStuff_2_1[2]),
- MK16(UnknownStuff, unknownStuff_2_1[3]),
- MK32(UnknownStuff, unknownStuff_2_2[0]),
- MK32(UnknownStuff, unknownStuff_2_2[1]),
- MK32(UnknownStuff, unknownStuff_2_2[2]),
- MK32(UnknownStuff, unknownStuff_2_2[3]),
- MK32(UnknownStuff, unknownStuff_2_2[4]),
- MK32(UnknownStuff, unknownStuff_2_2[5]),
- MK32(UnknownStuff, unknownStuff_2_2[6]),
- MK32(UnknownStuff, unknownStuff_2_2[7]),
- MK32(UnknownStuff, unknownStuff_2_2[8]),
- MK32(UnknownStuff, unknownStuff_2_2[9]),
- MK32(UnknownStuff, unknownStuff_2_2[10]),
- MK32(UnknownStuff, unknownStuff_2_2[11]),
- MK32(UnknownStuff, unknownStuff_2_2[12]),
- MK32(UnknownStuff, unknownStuff_2_2[13]),
- MK32(UnknownStuff, unknownStuff_2_2[14]),
- MK32(UnknownStuff, unknownStuff_2_2[15]),
- MK32(UnknownStuff, unknownStuff_2_2[16]),
- MK32(UnknownStuff, unknownStuff_2_2[17]),
- MK32(UnknownStuff, unknownStuff_2_2[18]),
- MK32(UnknownStuff, unknownStuff_2_2[19]),
- MK32(UnknownStuff, unknownStuff_2_2[20]),
- MK32(UnknownStuff, unknownStuff_2_2[21]),
- MK32(UnknownStuff, unknownStuff_2_2[22]),
- MK32(UnknownStuff, unknownStuff_2_2[23]),
- MK32(UnknownStuff, unknownStuff_2_2[24]),
- MK32(UnknownStuff, unknownStuff_2_2[25]),
- MK32(UnknownStuff, unknownStuff_2_2[26]),
- MK32(UnknownStuff, unknownStuff_2_2[27]),
- MK32(UnknownStuff, unknownStuff_2_2[28]),
- MK32(UnknownStuff, unknownStuff_2_2[29]),
- MK32(UnknownStuff, unknownStuff_2_2[30]),
- MK32(UnknownStuff, unknownStuff_2_2[31]),
- MK32(UnknownStuff, unknownStuff_2_2[32]),
- MK32(UnknownStuff, unknownStuff_2_2[33]),
- MK16(UnknownStuff, unknownStuff_3_1[0]),
- MK16(UnknownStuff, unknownStuff_3_1[1]),
- MK16(UnknownStuff, unknownStuff_3_1[2]),
- MK16(UnknownStuff, unknownStuff_3_1[3]),
- MK32(UnknownStuff, unknownStuff_3_2[0]),
- MK32(UnknownStuff, unknownStuff_3_2[1]),
- MK32(UnknownStuff, unknownStuff_3_2[2]),
- MK32(UnknownStuff, unknownStuff_3_2[3]),
- MK32(UnknownStuff, unknownStuff_3_2[4]),
- MK32(UnknownStuff, unknownStuff_3_2[5]),
- MK32(UnknownStuff, unknownStuff_3_2[6]),
- MK32(UnknownStuff, unknownStuff_3_2[7]),
- MK32(UnknownStuff, unknownStuff_3_2[8]),
- MK32(UnknownStuff, unknownStuff_3_2[9]),
- MK32(UnknownStuff, unknownStuff_3_2[10]),
- MK32(UnknownStuff, unknownStuff_3_2[11]),
- MK32(UnknownStuff, unknownStuff_3_2[12]),
- MK32(UnknownStuff, unknownStuff_3_2[13]),
- MK32(UnknownStuff, unknownStuff_3_2[14]),
- MK32(UnknownStuff, unknownStuff_3_2[15]),
- MK32(UnknownStuff, unknownStuff_3_2[16]),
- MK32(UnknownStuff, unknownStuff_3_2[17]),
- MK32(UnknownStuff, unknownStuff_3_2[18]),
- MK32(UnknownStuff, unknownStuff_3_2[19]),
- MK32(UnknownStuff, unknownStuff_3_2[20]),
- MK32(UnknownStuff, unknownStuff_3_2[21]),
- MK32(UnknownStuff, unknownStuff_3_2[22]),
- MK32(UnknownStuff, unknownStuff_3_2[23]),
- MK32(UnknownStuff, unknownStuff_3_2[24]),
- MK32(UnknownStuff, unknownStuff_3_2[25]),
- MK32(UnknownStuff, unknownStuff_3_2[26]),
- MK32(UnknownStuff, unknownStuff_3_2[27]),
- MK32(UnknownStuff, unknownStuff_3_2[28]),
- MK32(UnknownStuff, unknownStuff_3_2[29]),
- MK32(UnknownStuff, unknownStuff_3_2[30]),
- MK32(UnknownStuff, unknownStuff_3_2[31]),
- MK32(UnknownStuff, unknownStuff_3_2[32]),
- MK32(UnknownStuff, unknownStuff_3_2[33]),
};
void *getCompactElem(Compact *cpt, uint32 off) {
@@ -245,14 +114,9 @@ void *getCompactElem(Compact *cpt, uint32 off) {
return((uint8 *)(cpt->extCompact) + extCompactOffsets[off]);
off -= EXTCOMPACT_SIZE;
- if (off < 5*5*4)
- return ((void **)(cpt->turnTable))[off/4];
-
- off -= 5*5*4;
- if (off < UNKNOWNSTUFF_SIZE)
- return((uint8 *)(cpt->unknownStuff) + unknownStuffOffsets[off]);
+ // TODO: put the MegaSet stuff in
- error("Offset %X out of bounds of compact", off + COMPACT_SIZE + EXTCOMPACT_SIZE + 5*5*4);
+ error("Offset %X out of bounds of compact", off + COMPACT_SIZE + EXTCOMPACT_SIZE);
}
};
diff --git a/sky/compact.h b/sky/compact.h
index cfdfcc076f..d1572f305a 100644
--- a/sky/compact.h
+++ b/sky/compact.h
@@ -114,7 +114,6 @@ namespace SkyCompact {
extern uint16 m_ss_l_to_u[];
extern uint16 m_ss_l_to_r[];
extern uint16 m_ss_r_to_l[];
- extern uint16 *mini_so_turnTable[5][5];
extern ExtCompact mini_so_ext;
extern Compact mini_so;
extern uint16 unload_seq1[];
@@ -135,7 +134,6 @@ namespace SkyCompact {
extern uint16 f_ss_l_to_d[];
extern uint16 f_ss_r_to_u[];
extern uint16 f_ss_r_to_l[];
- extern uint16 *full_so_turnTable[5][5];
extern ExtCompact full_so_ext;
extern Compact full_so;
extern uint16 panel_seq[];
@@ -428,7 +426,6 @@ namespace SkyCompact {
extern uint16 foreman_d_to_u[];
extern uint16 foreman_d_to_r[];
extern uint16 foreman_r_to_d[];
- extern uint16 *foreman_turnTable[5][5];
extern ExtCompact foreman_ext;
extern Compact foreman;
extern uint16 lite1_seq[];
@@ -467,7 +464,6 @@ namespace SkyCompact {
extern uint16 radman_r_to_u[];
extern uint16 radman_r_to_d[];
extern uint16 radman_r_to_l[];
- extern uint16 *radman_turnTable[5][5];
extern ExtCompact radman_ext;
extern Compact radman;
extern Compact locker2;
@@ -1089,8 +1085,6 @@ namespace SkyCompact {
extern uint16 sml_loaderb_u_to_r[];
extern uint16 sml_loaderb_d_to_r[];
extern uint16 sml_loaderb_l_to_d[];
- extern UnknownStuff loader_unk;
- extern uint16 *loader_turnTable[5][5];
extern ExtCompact loader_ext;
extern Compact loader;
extern Compact junk2;
@@ -1537,8 +1531,6 @@ namespace SkyCompact {
extern uint16 sex_st_up[];
extern uint16 sex_st_left[];
extern uint16 sex_u_to_l[];
- extern UnknownStuff danielle_unk;
- extern uint16 *danielle_turnTable[5][5];
extern ExtCompact danielle_ext;
extern Compact danielle;
extern uint16 spu_d_to_r[];
@@ -3121,8 +3113,6 @@ namespace SkyCompact {
extern uint16 sjoey_r_to_u[];
extern uint16 sjoey_r_to_d[];
extern uint16 sjoey_r_to_l[];
- extern UnknownStuff joey_unk;
- extern uint16 *joey_turnTable[5][5];
extern ExtCompact joey_ext;
extern Compact joey;
extern uint16 baby_logic_list[];
@@ -3182,8 +3172,6 @@ namespace SkyCompact {
extern uint16 bfoster_l_to_u[];
extern uint16 bfoster_l_to_d[];
extern uint16 bfoster_l_to_r[];
- extern UnknownStuff foster_unk;
- extern uint16 *foster_turnTable[5][5];
extern ExtCompact foster_ext;
extern Compact foster;
extern uint16 monitor_up[];
@@ -3218,7 +3206,6 @@ namespace SkyCompact {
extern uint16 monitor_l_to_d[];
extern uint16 monitor_r_to_d[];
extern uint16 monitor_r_to_l[];
- extern uint16 *monitor_turnTable[5][5];
extern ExtCompact monitor_ext;
extern Compact monitor;
extern ExtCompact anita_ext;
diff --git a/sky/struc.h b/sky/struc.h
index 80e86e860a..c7bdd8c417 100644
--- a/sky/struc.h
+++ b/sky/struc.h
@@ -38,9 +38,24 @@ struct dataFileHeader {
uint16 s_compressed_size;
};
-#if !defined(__GNUC__)
-#pragma START_PACK_STRUCTS
-#endif
+struct MegaSet {
+ uint16 gridWidth;
+ uint16 colOffset;
+ uint16 colWidth;
+ uint16 lastChr;
+
+ uint16 *animUp;
+ uint16 *animDown;
+ uint16 *animLeft;
+ uint16 *animRight;
+
+ uint16 *standUp;
+ uint16 *standDown;
+ uint16 *standLeft;
+ uint16 *standRight;
+ uint16 *standTalk;
+ void *turnTable;
+};
struct ExtCompact {
uint16 actionSub;
@@ -76,32 +91,11 @@ struct ExtCompact {
void *animScratch; // data area for AR
uint16 megaSet;
-
- uint16 gridWidth;
- uint16 colOffset;
- uint16 colWidth;
- uint16 lastChr;
-
- uint16 *animUp;
- uint16 *animDown;
- uint16 *animLeft;
- uint16 *animRight;
-
- uint16 *standUp;
- uint16 *standDown;
- uint16 *standLeft;
- uint16 *standRight;
- uint16 *standTalk;
-} GCC_PACK;
-
-struct UnknownStuff {
- uint16 unknownStuff_1_1[4];
- uint16 *unknownStuff_1_2[34];
- uint16 unknownStuff_2_1[4];
- uint16 *unknownStuff_2_2[34];
- uint16 unknownStuff_3_1[4];
- uint16 *unknownStuff_3_2[34];
-} GCC_PACK;
+ MegaSet *megaSet0;
+ MegaSet *megaSet1;
+ MegaSet *megaSet2;
+ MegaSet *megaSet3;
+};
struct Compact {
uint16 logic; // Entry in logic table to run (byte as <256entries in logic table
@@ -144,12 +138,6 @@ struct Compact {
uint16 baseSub_off;
ExtCompact *extCompact;
- void *turnTable;
- UnknownStuff *unknownStuff;
-} GCC_PACK;
-
-#if !defined(__GNUC__)
-#pragma END_PACK_STRUCTS
-#endif
+};
#endif