diff --git a/game/boe.main.cpp b/game/boe.main.cpp index 24cb21f5..445d1422 100644 --- a/game/boe.main.cpp +++ b/game/boe.main.cpp @@ -18,6 +18,24 @@ #include "globvar.h" +// Check windows +#if _WIN32 || _WIN64 +#if _WIN64 +#define ENVIRONMENT64 +#else +#define ENVIRONMENT32 +#endif +#endif + +// Check GCC +#if __GNUC__ +#if __x86_64__ || __ppc64__ +#define ENVIRONMENT64 +#else +#define ENVIRONMENT32 +#endif +#endif + void startup_load() { load_file(); diff --git a/game/tools/dlogtool.cpp b/game/tools/dlogtool.cpp index 638b9c8a..55a6689e 100644 --- a/game/tools/dlogtool.cpp +++ b/game/tools/dlogtool.cpp @@ -47,7 +47,12 @@ short item_label_loc[NI]; inline void cd_kill_dc(short which_slot,HDC hdc) { fry_dc(dlgs[which_slot],hdc); } -LRESULT CALLBACK dummy_dialog_proc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam); +#ifdef ENVIRONMENT64 +LRESULT +#else +BOOL +#endif +CALLBACK dummy_dialog_proc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam); LRESULT CALLBACK fresh_edit_proc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam); LRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM); @@ -542,7 +547,12 @@ short cd_create_dialog(short dlog_num, HWND parent) return 0; } -LRESULT CALLBACK dummy_dialog_proc (HWND hDlg, UINT message, WPARAM, LPARAM) +#ifdef ENVIRONMENT64 +LRESULT +#else +BOOL +#endif +CALLBACK dummy_dialog_proc (HWND hDlg, UINT message, WPARAM, LPARAM) { short i,j,k,free_slot = -1,free_item = -1; int type, flag;