patch #791738 g++ 3.4 compile fix, from Falk Hueffner and a few minor local bits in my tree

svn-id: r9807
This commit is contained in:
Jonathan Gray 2003-08-21 13:39:21 +00:00
parent 255c7ae5ff
commit ce42f4d3dd
90 changed files with 101 additions and 98 deletions

View File

@ -29,7 +29,7 @@ include config.mak
# Uncomment this for stricter compile time code verification
# CXXFLAGS+= -Wshadow -Werror
CXXFLAGS:= -O -Wall -Wstrict-prototypes -Wuninitialized -Wno-long-long -Wno-multichar -Wno-unknown-pragmas $(CXXFLAGS)
CXXFLAGS:= -O -Wall -Wuninitialized -Wno-long-long -Wno-multichar -Wno-unknown-pragmas $(CXXFLAGS)
# Even more warnings...
CXXFLAGS+= -pedantic -Wpointer-arith -Wcast-qual -Wcast-align -Wconversion
CXXFLAGS+= -Wshadow -Wimplicit -Wundef -Wnon-virtual-dtor

View File

@ -25,9 +25,10 @@
FILE *File::fopenNoCase(const char *filename, const char *directory, const char *mode) {
FILE *file;
char buf[256];
char buf[512];
char *ptr;
assert(directory);
strcpy(buf, directory);
#ifdef WIN32

View File

@ -126,6 +126,6 @@ protected:
}
};
};// End of namespace ScummVM
} // End of namespace ScummVM
#endif

View File

@ -237,6 +237,6 @@ class String;
typedef Map<String, String> StringMap;
}; // End of namespace ScummVM
} // End of namespace ScummVM
#endif

View File

@ -108,6 +108,6 @@ struct Rect {
}
};
}; // End of namespace ScummVM
} // End of namespace ScummVM
#endif

View File

@ -266,4 +266,4 @@ bool operator != (const char* y, const ConstString &x) {
return x != y;
}
}; // End of namespace ScummVM
} // End of namespace ScummVM

View File

@ -141,6 +141,6 @@ public:
}
};
}; // End of namespace ScummVM
} // End of namespace ScummVM
#endif

View File

@ -2158,10 +2158,12 @@ void Gdi::unkDecode11(byte *dst, const byte *src, int height) {
#pragma mark -
void Scumm::fadeIn(int effect) {
updatePalette();
switch (effect) {
case 0:
// seems to do nothing
break;
case 1:
case 2:
case 3:
@ -2179,6 +2181,8 @@ void Scumm::fadeIn(int effect) {
case 128:
unkScreenEffect6();
break;
case 129:
break;
case 130:
case 131:
case 132:
@ -2191,8 +2195,6 @@ void Scumm::fadeIn(int effect) {
case 135:
unkScreenEffect5(1);
break;
case 129:
break;
default:
warning("Unknown screen effect, %d", effect);
}

View File

@ -51,7 +51,7 @@ namespace SkyTalkAnims {
extern bool animTalkTableIsPointer[];
extern uint16 animTalkTableVal[];
extern void *animTalkTablePtr[];
};
}
namespace SkyCompact {
@ -602,5 +602,5 @@ void patchFor288(void) {
((Compact *)SkyCompact::data_3[409])->actionScript = 0x3127; // slot_28
}
};
}

View File

@ -3252,6 +3252,6 @@ namespace SkyCompact {
extern uint16 ss_auto[];
extern uint16 wit_auto[];
extern uint16 minif_auto[];
};
}
#endif

View File

@ -9322,6 +9322,6 @@ void *data_1[] = {
car_down_seq
};
}; // namespace SkyCompact
} // namespace SkyCompact
#endif

View File

@ -882,6 +882,6 @@ uint16 s101_chip_list[] = {
0
};
}; // namespace SkyCompact
} // namespace SkyCompact
#endif

View File

@ -568,6 +568,6 @@ Compact restart_butt = {
0
};
}; // namespace SkyCompact
} // namespace SkyCompact
#endif

View File

@ -2430,6 +2430,6 @@ Compact liyt_1 = {
0
};
}; // namespace SkyCompact
} // namespace SkyCompact
#endif

View File

@ -1725,6 +1725,6 @@ uint16 cable_fall2_seq[] = {
0
};
}; // namespace SkyCompact
} // namespace SkyCompact
#endif

View File

@ -2227,6 +2227,6 @@ uint16 topbelt_seq[] = {
0
};
}; // namespace SkyCompact
} // namespace SkyCompact
#endif

View File

@ -3765,6 +3765,6 @@ uint16 armsup_seq[] = {
0
};
}; // namespace SkyCompact
} // namespace SkyCompact
#endif

View File

@ -2073,6 +2073,6 @@ uint16 change6_seq[] = {
0
};
}; // namespace SkyCompact
} // namespace SkyCompact
#endif

View File

@ -1106,6 +1106,6 @@ uint16 s15_chip_list[] = {
0
};
}; // namespace SkyCompact
} // namespace SkyCompact
#endif

View File

@ -980,6 +980,6 @@ uint16 fost_con_look[] = {
0
};
}; // namespace SkyCompact
} // namespace SkyCompact
#endif

View File

@ -914,6 +914,6 @@ Compact pulse = {
0
};
}; // namespace SkyCompact
} // namespace SkyCompact
#endif

View File

@ -1601,6 +1601,6 @@ Compact right_exit_s18 = {
0
};
}; // namespace SkyCompact
} // namespace SkyCompact
#endif

View File

@ -721,6 +721,6 @@ uint16 s19_fast_list[] = {
0
};
}; // namespace SkyCompact
} // namespace SkyCompact
#endif

View File

@ -1972,6 +1972,6 @@ uint16 fire1_seq[] = {
0
};
}; // namespace SkyCompact
} // namespace SkyCompact
#endif

View File

@ -1221,6 +1221,6 @@ uint16 s20_mouse[] = {
ID_TEXT_MOUSE
};
}; // namespace SkyCompact
} // namespace SkyCompact
#endif

View File

@ -2142,6 +2142,6 @@ uint16 take_cassette_seq[] = {
0
};
}; // namespace SkyCompact
} // namespace SkyCompact
#endif

View File

@ -1581,6 +1581,6 @@ Compact fish_poster = {
0
};
}; // namespace SkyCompact
} // namespace SkyCompact
#endif

View File

@ -795,6 +795,6 @@ uint16 rs_foster_29_23[] = {
65535
};
}; // namespace SkyCompact
} // namespace SkyCompact
#endif

View File

@ -1311,6 +1311,6 @@ uint16 s24_fast_list[] = {
0
};
}; // namespace SkyCompact
} // namespace SkyCompact
#endif

View File

@ -1117,6 +1117,6 @@ Compact s25_floor = {
0
};
}; // namespace SkyCompact
} // namespace SkyCompact
#endif

View File

@ -1303,6 +1303,6 @@ Compact s26_floor = {
0
};
}; // namespace SkyCompact
} // namespace SkyCompact
#endif

View File

@ -3274,6 +3274,6 @@ Compact chair_27 = {
0
};
}; // namespace SkyCompact
} // namespace SkyCompact
#endif

View File

@ -989,6 +989,6 @@ Compact small_l_28 = {
0
};
}; // namespace SkyCompact
} // namespace SkyCompact
#endif

View File

@ -1590,6 +1590,6 @@ void *data_3[] = {
rs_31_28
};
}; // namespace SkyCompact
} // namespace SkyCompact
#endif

View File

@ -1820,6 +1820,6 @@ Compact top_barrel = {
0
};
}; // namespace SkyCompact
} // namespace SkyCompact
#endif

View File

@ -6615,6 +6615,6 @@ void *data_4[] = {
&sc31_at_watcher
};
}; // namespace SkyCompact
} // namespace SkyCompact
#endif

View File

@ -2850,6 +2850,6 @@ uint16 sc31_joey_list[] = {
0
};
}; // namespace SkyCompact
} // namespace SkyCompact
#endif

View File

@ -1836,6 +1836,6 @@ Compact sc32_exit_33 = {
0
};
}; // namespace SkyCompact
} // namespace SkyCompact
#endif

View File

@ -824,6 +824,6 @@ uint16 reset_30_33[] = {
65535
};
}; // namespace SkyCompact
} // namespace SkyCompact
#endif

View File

@ -954,6 +954,6 @@ Compact sc34_door = {
0
};
}; // namespace SkyCompact
} // namespace SkyCompact
#endif

View File

@ -4269,6 +4269,6 @@ Compact sc36_exit_30 = {
0
};
}; // namespace SkyCompact
} // namespace SkyCompact
#endif

View File

@ -1904,6 +1904,6 @@ uint16 sc37_crbarbox[] = {
0
};
}; // namespace SkyCompact
} // namespace SkyCompact
#endif

View File

@ -3828,6 +3828,6 @@ uint16 sc38_lift_down[] = {
0
};
}; // namespace SkyCompact
} // namespace SkyCompact
#endif

View File

@ -774,6 +774,6 @@ uint16 sc39_palette[] = {
16191
};
}; // namespace SkyCompact
} // namespace SkyCompact
#endif

View File

@ -1843,6 +1843,6 @@ Compact low_barrel = {
0
};
}; // namespace SkyCompact
} // namespace SkyCompact
#endif

View File

@ -1220,6 +1220,6 @@ uint16 sc40_ascend[] = {
0
};
}; // namespace SkyCompact
} // namespace SkyCompact
#endif

View File

@ -744,6 +744,6 @@ uint16 sc41_palette[] = {
16191
};
}; // namespace SkyCompact
} // namespace SkyCompact
#endif

View File

@ -1708,6 +1708,6 @@ uint16 sc42_fos_leave[] = {
0
};
}; // namespace SkyCompact
} // namespace SkyCompact
#endif

View File

@ -649,6 +649,6 @@ uint16 reset_37_44[] = {
65535
};
}; // namespace SkyCompact
} // namespace SkyCompact
#endif

View File

@ -629,6 +629,6 @@ uint16 sc45_mouse_list[] = {
ID_TEXT_MOUSE
};
}; // namespace SkyCompact
} // namespace SkyCompact
#endif

View File

@ -564,6 +564,6 @@ Compact sc46_floor = {
0
};
}; // namespace SkyCompact
} // namespace SkyCompact
#endif

View File

@ -578,6 +578,6 @@ Compact sc47_floor = {
0
};
}; // namespace SkyCompact
} // namespace SkyCompact
#endif

View File

@ -1162,6 +1162,6 @@ uint16 sc48_light_pal[] = {
16191
};
}; // namespace SkyCompact
} // namespace SkyCompact
#endif

View File

@ -1346,6 +1346,6 @@ Compact cupboard_s4 = {
0
};
}; // namespace SkyCompact
} // namespace SkyCompact
#endif

View File

@ -4923,6 +4923,6 @@ void *data_2[] = {
uint32 *table2 = (uint32*)data_2;
}; // namespace SkyCompact
} // namespace SkyCompact
#endif

View File

@ -671,6 +671,6 @@ uint16 sc65_palette[] = {
16191
};
}; // namespace SkyCompact
} // namespace SkyCompact
#endif

View File

@ -6689,6 +6689,6 @@ void *data_5[] = {
reset_dad_spec
};
}; // namespace SkyCompact
} // namespace SkyCompact
#endif

View File

@ -2089,6 +2089,6 @@ Compact sc67_clot = {
0
};
}; // namespace SkyCompact
} // namespace SkyCompact
#endif

View File

@ -1409,6 +1409,6 @@ uint16 sc68_joey_list[] = {
0
};
}; // namespace SkyCompact
} // namespace SkyCompact
#endif

View File

@ -1191,6 +1191,6 @@ Compact sc69_floor = {
0
};
}; // namespace SkyCompact
} // namespace SkyCompact
#endif

View File

@ -1260,6 +1260,6 @@ uint16 sc70_mouse_list[] = {
ID_TEXT_MOUSE
};
}; // namespace SkyCompact
} // namespace SkyCompact
#endif

View File

@ -1700,6 +1700,6 @@ uint16 sc71_light2_anim[] = {
0
};
}; // namespace SkyCompact
} // namespace SkyCompact
#endif

View File

@ -2414,6 +2414,6 @@ Compact sc72_chamber1 = {
0
};
}; // namespace SkyCompact
} // namespace SkyCompact
#endif

View File

@ -2546,6 +2546,6 @@ Compact sc73_cham4_light = {
0
};
}; // namespace SkyCompact
} // namespace SkyCompact
#endif

View File

@ -6681,6 +6681,6 @@ uint16 sc74_slot_flash[] = {
0
};
}; // namespace SkyCompact
} // namespace SkyCompact
#endif

View File

@ -1910,6 +1910,6 @@ uint16 sc75_get_tiss[] = {
0
};
}; // namespace SkyCompact
} // namespace SkyCompact
#endif

View File

@ -2814,6 +2814,6 @@ Compact sc76_door75 = {
0
};
}; // namespace SkyCompact
} // namespace SkyCompact
#endif

View File

@ -1092,6 +1092,6 @@ Compact sc77_door76 = {
0
};
}; // namespace SkyCompact
} // namespace SkyCompact
#endif

View File

@ -1204,6 +1204,6 @@ uint16 sc78_fast_list[] = {
0
};
}; // namespace SkyCompact
} // namespace SkyCompact
#endif

View File

@ -1655,6 +1655,6 @@ Compact sc79_pipe = {
0
};
}; // namespace SkyCompact
} // namespace SkyCompact
#endif

View File

@ -3565,6 +3565,6 @@ Compact sc80_goo = {
0
};
}; // namespace SkyCompact
} // namespace SkyCompact
#endif

View File

@ -2762,6 +2762,6 @@ uint16 sc81_foster_sit[] = {
0
};
}; // namespace SkyCompact
} // namespace SkyCompact
#endif

View File

@ -712,6 +712,6 @@ uint16 sc82_jobs_return[] = {
0
};
}; // namespace SkyCompact
} // namespace SkyCompact
#endif

View File

@ -434,6 +434,6 @@ uint16 sc85_logic_list[] = {
ID_STD_MENU_LOGIC
};
}; // namespace SkyCompact
} // namespace SkyCompact
#endif

View File

@ -1857,6 +1857,6 @@ void *data_6[] = {
uint32 *sec6_compacts = (uint32*)data_6;
}; // namespace SkyCompact
} // namespace SkyCompact
#endif

View File

@ -1518,6 +1518,6 @@ Compact door_r91f = {
0
};
}; // namespace SkyCompact
} // namespace SkyCompact
#endif

View File

@ -1682,6 +1682,6 @@ Compact slab3 = {
0
};
}; // namespace SkyCompact
} // namespace SkyCompact
#endif

View File

@ -834,6 +834,6 @@ uint16 pal93[] = {
16191
};
}; // namespace SkyCompact
} // namespace SkyCompact
#endif

View File

@ -1377,6 +1377,6 @@ Compact hologram_a = {
0
};
}; // namespace SkyCompact
} // namespace SkyCompact
#endif

View File

@ -1357,6 +1357,6 @@ uint16 door_l95_anim[] = {
0
};
}; // namespace SkyCompact
} // namespace SkyCompact
#endif

View File

@ -924,6 +924,6 @@ uint16 fast_list_sc96[] = {
0
};
}; // namespace SkyCompact
} // namespace SkyCompact
#endif

View File

@ -1689,6 +1689,6 @@ uint16 s9_pal[] = {
16191
};
}; // namespace SkyCompact
} // namespace SkyCompact
#endif

View File

@ -571,6 +571,6 @@ uint16 rs_foster_s90[] = {
uint32 *grid93 = 0;
}; // namespace SkyCompact
} // namespace SkyCompact
#endif

View File

@ -798,6 +798,6 @@ Compact blind_menu = {
0
};
}; // namespace SkyCompact
} // namespace SkyCompact
#endif

View File

@ -1258,6 +1258,6 @@ Compact menu_bar = {
0
};
}; // namespace SkyCompact
} // namespace SkyCompact
#endif

View File

@ -5969,6 +5969,6 @@ void *data_0[] = {
uint32 *z_compact_table = (uint32*)data_0;
}; // namespace SkyCompact
} // namespace SkyCompact
#endif

View File

@ -1260,5 +1260,5 @@ void SkyDebug::script(uint32 command, uint16 *scriptData) {
void SkyDebug::mcode(uint32 mcode, uint32 a, uint32 b, uint32 c) {
debug(6, "MCODE: %s(%d, %d, %d)", mcodes[mcode], a, b, c);
};
}

View File

@ -1148,7 +1148,7 @@ uint16 SkyLogic::mouseScript(uint32 scrNum, Compact *scriptComp) {
uint16 retVal = script((uint16)(scrNum & 0xFFFF), (uint16)(scrNum >> 16));
_compact = tmpComp;
return retVal;
};
}
/**
* This is the actual script engine. It interprets script \a scriptNo starting at \a offset

View File

@ -1329,11 +1329,11 @@ void Con_display_events() // (James11july97)
#else // not debug
void Print_to_console(const char *format,...) {};
void Temp_print_to_console(const char *format,...) {};
void Clear_console_line(void) {};
void Scroll_console(void) {};
void Init_console(void) {};
void StartConsole(void) {};
void Print_to_console(const char *format,...) {}
void Temp_print_to_console(const char *format,...) {}
void Clear_console_line(void) {}
void Scroll_console(void) {}
void Init_console(void) {}
void StartConsole(void) {}
#endif // _SWORD2_DEBUG

View File

@ -547,7 +547,7 @@ void Print_current_info(void) //Tony30Oct96
//--------------------------------------------------------------------------------------
#else // not debug
void Draw_debug_graphics(void) {};
void Draw_debug_graphics(void) {}
#endif // _SWORD2_DEBUG
//--------------------------------------------------------------------------------------