M4: Further changes of long to int32

This commit is contained in:
Paul Gilbert 2023-10-20 21:49:17 -07:00 committed by Eugene Sandulenko
parent 274151c233
commit da518ab7e5
64 changed files with 179 additions and 180 deletions

View File

@ -63,31 +63,31 @@ namespace M4 {
#define DOT 446
#define CNE 448
extern conv_chunk *get_conv(Conv *c, long cSize);
extern entry_chunk *get_entry(Conv *c, long cSize);
extern char *conv_ops_get_entry(long i, long *next, long *tag, Conv *c);
extern void conv_ops_unknown_chunk(long tag, const char *s);
extern decl_chunk *get_decl(Conv *c, long cSize);
extern char *get_string(Conv *c, long cSize);
extern text_chunk *get_text(Conv *c, long cSize);
extern long conv_ops_text_strlen(char *s);
extern c_assign_chunk *get_c_asgn(Conv *c, long cSize);
extern int conv_ops_cond_successful(long l_op, long op, long r_op);
extern long conv_ops_process_asgn(long val, long oprtr, long opnd);
extern assign_chunk *get_asgn(Conv *c, long cSize);
extern misc_chunk *get_misc(Conv *c, long cSize);
extern entry_chunk *get_hash_entry(Conv *c, long cSize);
extern c_misc_chunk *get_c_misc(Conv *c, long cSize);
extern c_goto_chunk *get_c_goto(Conv *c, long cSize);
extern goto_chunk *get_goto(Conv *c, long cSize);
extern reply_chunk *get_reply(Conv *c, long cSize);
extern lnode_chunk *get_lnode(Conv *c, long cSize);
extern node_chunk *get_node(Conv *c, long cSize);
extern fall_chunk *get_fall(Conv *c, long cSize);
extern long get_long(Conv *c, long cSize);
extern c_reply_chunk *get_c_reply(Conv *c, long cSize);
extern w_reply_chunk *get_w_reply(Conv *c, long cSize);
extern w_entry_chunk *get_w_entry(Conv *c, long cSize);
extern conv_chunk *get_conv(Conv *c, int32 cSize);
extern entry_chunk *get_entry(Conv *c, int32 cSize);
extern char *conv_ops_get_entry(int32 i, int32 *next, int32 *tag, Conv *c);
extern void conv_ops_unknown_chunk(int32 tag, const char *s);
extern decl_chunk *get_decl(Conv *c, int32 cSize);
extern char *get_string(Conv *c, int32 cSize);
extern text_chunk *get_text(Conv *c, int32 cSize);
extern int32 conv_ops_text_strlen(char *s);
extern c_assign_chunk *get_c_asgn(Conv *c, int32 cSize);
extern int conv_ops_cond_successful(int32 l_op, int32 op, int32 r_op);
extern int32 conv_ops_process_asgn(int32 val, int32 oprtr, int32 opnd);
extern assign_chunk *get_asgn(Conv *c, int32 cSize);
extern misc_chunk *get_misc(Conv *c, int32 cSize);
extern entry_chunk *get_hash_entry(Conv *c, int32 cSize);
extern c_misc_chunk *get_c_misc(Conv *c, int32 cSize);
extern c_goto_chunk *get_c_goto(Conv *c, int32 cSize);
extern goto_chunk *get_goto(Conv *c, int32 cSize);
extern reply_chunk *get_reply(Conv *c, int32 cSize);
extern lnode_chunk *get_lnode(Conv *c, int32 cSize);
extern node_chunk *get_node(Conv *c, int32 cSize);
extern fall_chunk *get_fall(Conv *c, int32 cSize);
extern int32 get_long(Conv *c, int32 cSize);
extern c_reply_chunk *get_c_reply(Conv *c, int32 cSize);
extern w_reply_chunk *get_w_reply(Conv *c, int32 cSize);
extern w_entry_chunk *get_w_entry(Conv *c, int32 cSize);
} // End of namespace M4

View File

@ -35,10 +35,10 @@ namespace M4 {
// Get next node pointer
// Process declarations
// Get message text
static void conv_exec_entry(long offset, Conv *c) {
long i = offset, entry_count;
long l_op, r_op;
long tag, next;
static void conv_exec_entry(int32 offset, Conv *c) {
int32 i = offset, entry_count;
int32 l_op, r_op;
int32 tag, next;
goto_chunk *go;
c_goto_chunk *c_goto;
@ -252,12 +252,12 @@ static void conv_exec_entry(long offset, Conv *c) {
}
}
static int conv_get_mesg(long offset, long is_valid, Conv *c) {
long i = offset, entry_count;
long l_op, r_op;
long x, y, s_offset = 0, cSize;
long tag, next;
long text_len;
static int conv_get_mesg(int32 offset, int32 is_valid, Conv *c) {
int32 i = offset, entry_count;
int32 l_op, r_op;
int32 x, y, s_offset = 0, cSize;
int32 tag, next;
int32 text_len;
int sum, result = 0;
entry_chunk *entry;
@ -495,10 +495,10 @@ static void find_true_ent(int entry_num, Conv *c) {
lnode_chunk *lnode = nullptr;
entry_chunk *entry = nullptr;
fall_chunk *fall = nullptr;
long offset = 0, ent = 0, n = 0;
long next = 0, tag = 0, num_ents = 0;
int32 offset = 0, ent = 0, n = 0;
int32 next = 0, tag = 0, num_ents = 0;
int i = 0;
long sub_ent = 0;
int32 sub_ent = 0;
int result = 1;
for (;;) {
@ -537,7 +537,7 @@ static void find_true_ent(int entry_num, Conv *c) {
assert(fall);
//do this to skip the fall chunk and all will be fine.
ent += sizeof(long); //was get_long, sizeof( fall_chunk )
ent += sizeof(int32); //was get_long, sizeof( fall_chunk )
n++; //don't increment i.
break;
@ -569,7 +569,7 @@ static void find_true_ent(int entry_num, Conv *c) {
//fprintf( conv_fp, "find_true_ent _GC(ent)++\n" );
_GC(ent)++;
ent += sizeof(long);
ent += sizeof(int32);
}
}
@ -581,7 +581,7 @@ static int conv_get_node_text(Conv *c) {
entry_chunk *entry = nullptr;
fall_chunk *fall = nullptr;
long ent = 0, offset = 0, tag, next, num_ents = 0;
int32 ent = 0, offset = 0, tag, next, num_ents = 0;
int i = 0, num_vis = 0, result = 0;
_G(cdd).num_txt_ents = 0;
@ -623,10 +623,10 @@ static int conv_get_node_text(Conv *c) {
ent = get_long(c, offset);
entry = get_entry(c, offset + ent);
offset += sizeof(long);
offset += sizeof(int32);
}
offset -= sizeof(long);
offset -= sizeof(int32);
// Set sound file name instead.?
if ((entry->status != 0) && (num_ents != 0) && ok_status(entry)) {
@ -670,7 +670,7 @@ static int conv_get_node_text(Conv *c) {
fall = get_fall(c, offset + ent);
}
offset += sizeof(long);
offset += sizeof(int32);
}
if (fall) {
@ -700,7 +700,7 @@ void conv_shutdown(void) {
// Simplify me.
static void conv_start(Conv *c) {
long ok = 1, ent = 0, tag = 0, next;
int32 ok = 1, ent = 0, tag = 0, next;
decl_chunk *decl;
switch (c->exit_now) {
@ -774,10 +774,10 @@ static int conv_process_entry(int entry_num, Conv *c, int mode) {
lnode_chunk *lnode = nullptr;
entry_chunk *entry = nullptr;
fall_chunk *fall = nullptr;
long offset = 0, ent = 0, is_valid = 0, n = 0;
long next = 0, tag = 0, num_ents = 0;
int32 offset = 0, ent = 0, is_valid = 0, n = 0;
int32 next = 0, tag = 0, num_ents = 0;
int i = 0;
long sub_ent = 0;
int32 sub_ent = 0;
int result = 1;
//int changed = 0;
@ -817,7 +817,7 @@ static int conv_process_entry(int entry_num, Conv *c, int mode) {
assert(fall);
//do this to skip the fall chunk and all will be fine.
ent += sizeof(long); //was get_long, sizeof( fall_chunk )
ent += sizeof(int32); //was get_long, sizeof( fall_chunk )
n++; //don't increment i.
break;
@ -842,11 +842,11 @@ static int conv_process_entry(int entry_num, Conv *c, int mode) {
is_valid = 1;
}
ent += sizeof(long);
ent += sizeof(int32);
n++;
}
ent -= sizeof(long);
ent -= sizeof(int32);
if (is_valid) {
switch (mode) {

View File

@ -570,7 +570,6 @@ static Conv *conv_restore_state(Conv *c) {
int32 myCNode;
char fname[9];
int dont_update_ents = 0;
int file_size = 0;
char *conv_save_buff = nullptr;
@ -643,14 +642,14 @@ static Conv *conv_restore_state(Conv *c) {
switch (tag) {
case LNODE_CHUNK:
if (myCNode == ent) {
dont_update_ents = 1;
//dont_update_ents = 1;
} else {
dont_update_ents = 0;
//dont_update_ents = 0;
}
break;
case NODE_CHUNK:
dont_update_ents = 0;
//dont_update_ents = 0;
break;
case ENTRY_CHUNK:

View File

@ -38,7 +38,7 @@ struct seriesPlayBreak {
int32 trigger;
uint32 flags;
int32 loopCount;
long *variable;
int32 *variable;
int32 value;
};

View File

@ -36,7 +36,7 @@ struct seriesStreamBreak {
int32 volume;
int32 trigger;
uint32 flags;
const long *variable;
const int32 *variable;
int32 value;
};
#define STREAM_BREAK_END { -1, nullptr, 0, 0, NO_TRIGGER, 0, nullptr, 0 }

View File

@ -55,7 +55,7 @@ static const BoonsvilleRec ARRAY[] = {
{ 0, 0, nullptr }
};
long Flags::_flags[FLAGS_COUNT];
int32 Flags::_flags[FLAGS_COUNT];
Flags::Flags() {
Common::fill(_flags, _flags + FLAGS_COUNT, 0);

View File

@ -553,7 +553,7 @@ enum {
class Flags {
public:
static long _flags[FLAGS_COUNT];
static int32 _flags[FLAGS_COUNT];
public:
Flags();
@ -584,7 +584,7 @@ public:
size_t size() const {
return FLAGS_COUNT;
}
long &operator[](uint idx) {
int32 &operator[](uint idx) {
assert(idx < FLAGS_COUNT);
return _flags[idx];
}

View File

@ -32,7 +32,7 @@ class Room102 : public Room {
private:
int _val1 = 0;
int _val3 = -1;
long _val4 = 0;
int32 _val4 = 0;
int _val5 = 0;
int _val6 = 0;
int _val8 = 0;

View File

@ -109,7 +109,7 @@ static const seriesPlayBreak PLAY4[] = {
PLAY_BREAK_END
};
long Room103::_val0 = 0;
int32 Room103::_val0 = 0;
void Room103::init() {
_flag1 = false;

View File

@ -34,7 +34,7 @@ class Room103 : public Room {
static const seriesStreamBreak SERIES3[];
static const seriesStreamBreak SERIES4[];
private:
static long _val0;
static int32 _val0;
bool _flag1 = false;
int _val2 = 0;
int _val3 = 0;

View File

@ -120,8 +120,8 @@ const seriesPlayBreak Room106::PLAY7[] = {
PLAY_BREAK_END
};
long Room106::_val1;
long Room106::_val3;
int32 Room106::_val1;
int32 Room106::_val3;
void Room106::preload() {
_G(player).walker_in_this_scene = _G(game).room_id != 137 &&

View File

@ -40,9 +40,9 @@ class Room106 : public Room {
static const seriesPlayBreak PLAY7[];
private:
const char *_digi1 = nullptr;
static long _val1;
static int32 _val1;
int _val2 = 0;
static long _val3;
static int32 _val3;
void setHotspots();
void loadSeries();

View File

@ -157,9 +157,9 @@ const seriesPlayBreak Room142::PLAY14[] = {
};
long Room142::_val1;
long Room142::_val2;
long Room142::_val3;
int32 Room142::_val1;
int32 Room142::_val2;
int32 Room142::_val3;
Room142::Room142() : Room() {
_val1 = 0;

View File

@ -58,9 +58,9 @@ private:
noWalkRect *_noWalk = nullptr;
int _actionType = 0;
int _volume = 0;
static long _val1;
static long _val2;
static long _val3;
static int32 _val1;
static int32 _val2;
static int32 _val3;
int _val4 = 0;
void checkAction();

View File

@ -197,9 +197,9 @@ const seriesPlayBreak Room145::PLAY23[] = {
PLAY_BREAK_END
};
long Room145::_state1;
long Room145::_state2;
long Room145::_state3;
int32 Room145::_state1;
int32 Room145::_state2;
int32 Room145::_state3;
Room145::Room145() : Room() {
_state1 = 0;

View File

@ -56,9 +56,9 @@ private:
static const seriesPlayBreak PLAY21[];
static const seriesPlayBreak PLAY22[];
static const seriesPlayBreak PLAY23[];
static long _state1;
static long _state2;
static long _state3;
static int32 _state1;
static int32 _state2;
static int32 _state3;
noWalkRect *_walk1 = nullptr;
noWalkRect *_walk2 = nullptr;
noWalkRect *_walk3 = nullptr;

View File

@ -428,7 +428,7 @@ int Mine::getTreasureDistance() const {
}
void Mine::mine_travel_link(int16 takeLink) {
long &mineRoomIndex = _G(flags)[kMineRoomIndex];
int32 &mineRoomIndex = _G(flags)[kMineRoomIndex];
_mineRoomInfo = MINE_INFO[mineRoomIndex]; // Get this mine room info
_entranceDoor = _mineRoomInfo.door[takeLink]; // Get which door to enter from in new room

View File

@ -160,7 +160,7 @@ const seriesPlayBreak Room302::PLAY13[] = {
PLAY_BREAK_END
};
long Room302::_state1;
int32 Room302::_state1;
Room302::Room302() : Section3Room() {

View File

@ -47,7 +47,7 @@ private:
static const seriesPlayBreak PLAY11[];
static const seriesPlayBreak PLAY12[];
static const seriesPlayBreak PLAY13[];
static long _state1;
static int32 _state1;
machine *_series1 = nullptr;
Series _series2;
machine *_series3 = nullptr;

View File

@ -74,7 +74,7 @@ const seriesPlayBreak Room310::PLAY6[] = {
{ 52, 56, "300_001", 2, 255, -1, 0, 0, nullptr, 0 },
};
long Room310::_state1;
int32 Room310::_state1;
Room310::Room310() : Mine() {

View File

@ -37,7 +37,7 @@ private:
static const seriesPlayBreak PLAY4[];
static const seriesPlayBreak PLAY5[];
static const seriesPlayBreak PLAY6[];
static long _state1;
static int32 _state1;
Series _series1;
machine *_series2 = nullptr;
noWalkRect *_walk1 = nullptr;

View File

@ -411,10 +411,10 @@ const seriesPlayBreak Room406::PLAY36[] = {
{ 5, -1, nullptr, 0, 0, -1, 0, 0, nullptr, 0 },
};
long Room406::_state1;
long Room406::_state2;
long Room406::_state3;
long Room406::_state4;
int32 Room406::_state1;
int32 Room406::_state2;
int32 Room406::_state3;
int32 Room406::_state4;
Room406::Room406() : Section4Room() {

View File

@ -70,10 +70,10 @@ private:
static const seriesPlayBreak PLAY34[];
static const seriesPlayBreak PLAY35[];
static const seriesPlayBreak PLAY36[];
static long _state1;
static long _state2;
static long _state3;
static long _state4;
static int32 _state1;
static int32 _state2;
static int32 _state3;
static int32 _state4;
Series _coll;
Series _gate;
Series _mg03;

View File

@ -146,7 +146,7 @@ const seriesPlayBreak Room407::PLAY18[] = {
PLAY_BREAK_END
};
long Room407::_state1;
int32 Room407::_state1;
Room407::Room407() : Section4Room() {

View File

@ -51,7 +51,7 @@ private:
static const seriesPlayBreak PLAY16[];
static const seriesPlayBreak PLAY17[];
static const seriesPlayBreak PLAY18[];
static long _state1;
static int32 _state1;
Series _vp02;
Series _dz;
int _dzS1 = 0, _dzS2 = 0;

View File

@ -249,10 +249,10 @@ const seriesPlayBreak Room502::PLAY17[] = {
PLAY_BREAK_END
};
long Room502::_state1;
long Room502::_state2;
long Room502::_state3;
long Room502::_state4;
int32 Room502::_state1;
int32 Room502::_state2;
int32 Room502::_state3;
int32 Room502::_state4;
Room502::Room502() : Section5Room() {

View File

@ -49,10 +49,10 @@ private:
static const seriesPlayBreak PLAY15[];
static const seriesPlayBreak PLAY16[];
static const seriesPlayBreak PLAY17[];
static long _state1;
static long _state2;
static long _state3;
static long _state4;
static int32 _state1;
static int32 _state2;
static int32 _state3;
static int32 _state4;
private:
static const BorkPoint BORK_TABLE[];

View File

@ -263,12 +263,12 @@ const seriesPlayBreak Room503::PLAY24[] = {
PLAY_BREAK_END
};
long Room503::_state1;
long Room503::_state2;
long Room503::_state3;
long Room503::_state4;
long Room503::_state5;
long Room503::_state6;
int32 Room503::_state1;
int32 Room503::_state2;
int32 Room503::_state3;
int32 Room503::_state4;
int32 Room503::_state5;
int32 Room503::_state6;
Room503::Room503() : Section5Room() {
_state1 = 0;

View File

@ -55,12 +55,12 @@ private:
static const seriesPlayBreak PLAY22[];
static const seriesPlayBreak PLAY23[];
static const seriesPlayBreak PLAY24[];
static long _state1;
static long _state2;
static long _state3;
static long _state4;
static long _state5;
static long _state6;
static int32 _state1;
static int32 _state2;
static int32 _state3;
static int32 _state4;
static int32 _state5;
static int32 _state6;
int16 _array1[5];
int16 _array2[5];
int _val2 = 0;

View File

@ -178,11 +178,11 @@ const seriesPlayBreak Room504::PLAY16[] = {
PLAY_BREAK_END
};
long Room504::_state1;
long Room504::_state2;
long Room504::_state3;
long Room504::_state4;
long Room504::_state5;
int32 Room504::_state1;
int32 Room504::_state2;
int32 Room504::_state3;
int32 Room504::_state4;
int32 Room504::_state5;
Room504::Room504() : Section5Room() {
_state1 = 0;

View File

@ -47,11 +47,11 @@ private:
static const seriesPlayBreak PLAY14[];
static const seriesPlayBreak PLAY15[];
static const seriesPlayBreak PLAY16[];
static long _state1;
static long _state2;
static long _state3;
static long _state4;
static long _state5;
static int32 _state1;
static int32 _state2;
static int32 _state3;
static int32 _state4;
static int32 _state5;
bool _flag1 = false;
int _val1 = 0;
int _val2 = 0;

View File

@ -112,8 +112,8 @@ const seriesPlayBreak Room506::PLAY6[] = {
};
long Room506::_state1;
long Room506::_state2;
int32 Room506::_state1;
int32 Room506::_state2;
Room506::Room506() : Section5Room() {
_state1 = 0;

View File

@ -38,8 +38,8 @@ private:
static const seriesPlayBreak PLAY4[];
static const seriesPlayBreak PLAY5[];
static const seriesPlayBreak PLAY6[];
static long _state1;
static long _state2;
static int32 _state1;
static int32 _state2;
noWalkRect *_walk1 = nullptr;
machine *_series1 = nullptr;
machine *_series2 = nullptr;

View File

@ -212,11 +212,11 @@ const seriesPlayBreak Room507::PLAY18[] = {
PLAY_BREAK_END
};
long Room507::_state1;
long Room507::_state2;
long Room507::_state3;
long Room507::_state4;
long Room507::_state5;
int32 Room507::_state1;
int32 Room507::_state2;
int32 Room507::_state3;
int32 Room507::_state4;
int32 Room507::_state5;
Room507::Room507() : Section5Room() {

View File

@ -49,11 +49,11 @@ private:
static const seriesPlayBreak PLAY16[];
static const seriesPlayBreak PLAY17[];
static const seriesPlayBreak PLAY18[];
static long _state1;
static long _state2;
static long _state3;
static long _state4;
static long _state5;
static int32 _state1;
static int32 _state2;
static int32 _state3;
static int32 _state4;
static int32 _state5;
machine *_series1 = nullptr;
machine *_series2 = nullptr;
machine *_series3 = nullptr;

View File

@ -140,10 +140,10 @@ const seriesPlayBreak Room508::PLAY12[] = {
PLAY_BREAK_END
};
long Room508::_state1;
long Room508::_state2;
long Room508::_state3;
long Room508::_state4;
int32 Room508::_state1;
int32 Room508::_state2;
int32 Room508::_state3;
int32 Room508::_state4;
Room508::Room508() : Section5Room() {

View File

@ -43,10 +43,10 @@ private:
static const seriesPlayBreak PLAY10[];
static const seriesPlayBreak PLAY11[];
static const seriesPlayBreak PLAY12[];
static long _state1;
static long _state2;
static long _state3;
static long _state4;
static int32 _state1;
static int32 _state2;
static int32 _state3;
static int32 _state4;
machine *_series1 = nullptr;
machine *_series2 = nullptr;
machine *_series3 = nullptr;

View File

@ -101,8 +101,8 @@ const seriesPlayBreak Room509::PLAY8[] = {
static const RGB8 PALETTE[1] = { { 0x6E, 0x46, 0x1E } };
long Room509::_state1;
long Room509::_state2;
int32 Room509::_state1;
int32 Room509::_state2;
Room509::Room509() : Section5Room() {

View File

@ -39,8 +39,8 @@ private:
static const seriesPlayBreak PLAY6[];
static const seriesPlayBreak PLAY7[];
static const seriesPlayBreak PLAY8[];
static long _state1;
static long _state2;
static int32 _state1;
static int32 _state2;
machine *_series1 = nullptr;
machine *_series2 = nullptr;
int _val1 = 0;

View File

@ -41,7 +41,7 @@ const seriesStreamBreak Room511::SERIES1[] = {
STREAM_BREAK_END
};
long Room511::_state1;
int32 Room511::_state1;
Room511::Room511() : Section5Room() {

View File

@ -31,7 +31,7 @@ namespace Rooms {
class Room511 : public Section5Room {
private:
static const seriesStreamBreak SERIES1[];
static long _state1;
static int32 _state1;
int _val1 = 0;
public:

View File

@ -40,7 +40,7 @@ const seriesStreamBreak Room512::SERIES1[] = {
STREAM_BREAK_END
};
long Room512::_state1;
int32 Room512::_state1;
Room512::Room512() : Section5Room() {

View File

@ -31,7 +31,7 @@ namespace Rooms {
class Room512 : public Section5Room {
private:
static const seriesStreamBreak SERIES1[];
static long _state1;
static int32 _state1;
public:
Room512();

View File

@ -247,8 +247,8 @@ const seriesPlayBreak Room602::PLAY22[] = {
PLAY_BREAK_END
};
long Room602::_test1;
long Room602::_test2;
int32 Room602::_test1;
int32 Room602::_test2;
Room602::Room602() : Section6Room() {
_gerbilTable = GERBIL;

View File

@ -54,6 +54,8 @@ class Room602 : public Section6Room {
static const seriesPlayBreak PLAY22[];
private:
static int32 _test1;
static int32 _test2;
noWalkRect *_walk1 = nullptr;
int _series1 = 0;
machine *_series2 = nullptr;
@ -69,8 +71,6 @@ private:
int _val2 = 0;
int _val3 = 0;
int _val4 = 0;
static long _test1;
static long _test2;
public:
Room602();

View File

@ -168,7 +168,7 @@ const seriesPlayBreak Room603::PLAY15[] = {
PLAY_BREAK_END
};
long Room603::_state1;
int32 Room603::_state1;
Room603::Room603() : Section6Room() {
_gerbilTable = GERBIL;

View File

@ -47,7 +47,7 @@ private:
static const seriesPlayBreak PLAY14[];
static const seriesPlayBreak PLAY15[];
static long _state1;
static int32 _state1;
private:
machine *_series1 = nullptr;
int _series2 = 0;

View File

@ -146,7 +146,7 @@ const seriesPlayBreak Room604::PLAY12[] = {
PLAY_BREAK_END
};
long Room604::_state1;
int32 Room604::_state1;
Room604::Room604() : Section6Room() {
_state1 = 0;

View File

@ -42,7 +42,7 @@ private:
static const seriesPlayBreak PLAY10[];
static const seriesPlayBreak PLAY11[];
static const seriesPlayBreak PLAY12[];
static long _state1;
static int32 _state1;
private:
machine *_series1 = nullptr;

View File

@ -36,7 +36,7 @@ const seriesStreamBreak Room606::SERIES1[] = {
STREAM_BREAK_END
};
long Room606::_state1;
int32 Room606::_state1;
Room606::Room606() : Section6Room() {
_state1 = 0;

View File

@ -31,7 +31,7 @@ namespace Rooms {
class Room606 : public Section6Room {
private:
static const seriesStreamBreak SERIES1[];
static long _state1;
static int32 _state1;
public:
Room606();
~Room606() override {}

View File

@ -45,7 +45,7 @@ const seriesStreamBreak Room608::SERIES2[] = {
STREAM_BREAK_END
};
long Room608::_state1;
int32 Room608::_state1;
Room608::Room608() : Section6Room() {
_state1 = 0;

View File

@ -32,7 +32,7 @@ class Room608 : public Section6Room {
private:
static const seriesStreamBreak SERIES1[];
static const seriesStreamBreak SERIES2[];
static long _state1;
static int32 _state1;
public:
Room608();
~Room608() override {}

View File

@ -36,7 +36,7 @@ const seriesStreamBreak Room609::SERIES1[] = {
STREAM_BREAK_END
};
long Room609::_state1;
int32 Room609::_state1;
Room609::Room609() : Section6Room() {
_state1 = 0;

View File

@ -31,7 +31,7 @@ namespace Rooms {
class Room609 : public Section6Room {
private:
static const seriesStreamBreak SERIES1[];
static long _state1;
static int32 _state1;
public:
Room609();
~Room609() override {}

View File

@ -59,7 +59,7 @@ const seriesStreamBreak Room610::SERIES1[] = {
STREAM_BREAK_END
};
long Room610::_state1;
int32 Room610::_state1;
Room610::Room610() : Section6Room() {
_state1 = 0;

View File

@ -31,7 +31,7 @@ namespace Rooms {
class Room610 : public Section6Room {
private:
static const seriesStreamBreak SERIES1[];
static long _state1;
static int32 _state1;
public:
Room610();
~Room610() override {}

View File

@ -38,7 +38,7 @@ namespace Burger {
Vars *g_vars;
const char *GAME_MODES[4] = { "WHOLE_GAME", "INTERACTIVE_DEMO", "MAGAZINE_DEMO", "WHOLE_GAME" };
long Vars::_wilbur_should = 0;
int32 Vars::_wilbur_should = 0;
/**
* Structure for accented character replacement

View File

@ -85,7 +85,7 @@ protected:
public:
// These are defined as statics because they're referenced in data arrays
static long _wilbur_should;
static int32 _wilbur_should;
public:
Burger::Flags _flags;
GameMode _executing = WHOLE_GAME;

View File

@ -35,9 +35,9 @@ struct WilburMatch {
const char *_word0;
const char *_word1;
int _trigger;
const long *_testVariable;
const int32 *_testVariable;
int _testValue;
long *_newVariable;
int32 *_newVariable;
int _newValue;
};

View File

@ -56,7 +56,7 @@ bool Console::Cmd_flag(int argc, const char **argv) {
debugPrintf("Not Orion Burger\n");
} else if (argc == 2) {
int flagNum = atol(argv[1]);
debugPrintf("Flag %d = %ld\n", flagNum, Burger::g_vars->_flags[flagNum]);
debugPrintf("Flag %d = %d\n", flagNum, Burger::g_vars->_flags[flagNum]);
} else if (argc == 3) {
int flagNum = atol(argv[1]);
int flagVal = atol(argv[2]);

View File

@ -34,8 +34,8 @@ class Resources {
struct Entry {
Common::String name;
MemHandle RHandle = nullptr;
size_t BufferSize = 0;
uint32 Size = 0;
int32 BufferSize = 0;
int32 Size = 0;
byte Flags = 0;
};
private:

View File

@ -28,7 +28,7 @@
namespace M4 {
namespace Riddle {
long Flags::_flags[FLAGS_COUNT];
int32 Flags::_flags[FLAGS_COUNT];
Flags::Flags() {
reset();

View File

@ -553,7 +553,7 @@ enum {
class Flags {
public:
static long _flags[FLAGS_COUNT];
static int32 _flags[FLAGS_COUNT];
public:
Flags();
@ -566,7 +566,7 @@ public:
size_t size() const {
return FLAGS_COUNT;
}
long &operator[](uint idx) {
int32 &operator[](uint idx) {
assert(idx < FLAGS_COUNT);
return _flags[idx];
}