1
0
Fork 0
devilution/Source/init.h

52 lines
2.1 KiB
C
Raw Normal View History

2018-06-07 02:25:54 +00:00
/*
* UNPUBLISHED -- Rights reserved under the copyright laws of the
* United States. Use of a copyright notice is precautionary only and
* does not imply publication or disclosure.
*
* THIS DOCUMENTATION CONTAINS CONFIDENTIAL AND PROPRIETARY INFORMATION
* OF BLIZZARD ENTERTAINMENT. ANY DUPLICATION, MODIFICATION,
* DISTRIBUTION, OR DISCLOSURE IS STRICTLY PROHIBITED WITHOUT THE PRIOR
* EXPRESS WRITTEN PERMISSION OF BLIZZARD ENTERTAINMENT.
*/
//init
extern _SNETVERSIONDATA fileinfo;
extern int init_cpp_init_value; // weak
extern int window_activated; // weak
extern char diablo_exe_path[260];
extern void *unused_mpq;
extern char patch_rt_mpq_path[260];
extern LRESULT (__stdcall *CurrentProc)(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
extern void *diabdat_mpq;
extern char diabdat_mpq_path[260];
extern void *patch_rt_mpq;
extern int killed_mom_parent; // weak
extern bool screensaver_enabled_prev;
void __cdecl init_cpp_init();
void __fastcall init_cleanup(bool show_cursor);
void __cdecl init_run_office_from_start_menu();
void __fastcall init_run_office(char *dir);
void __fastcall init_disable_screensaver(bool disable);
void __cdecl init_create_window();
void __cdecl init_kill_mom_parent();
HWND __cdecl init_find_mom_parent();
void __cdecl init_await_mom_parent_exit();
void __cdecl init_archives();
void *__fastcall init_test_access(char *mpq_path, char *mpq_name, char *reg_loc, int flags, bool on_cd);
char *__fastcall init_strip_trailing_slash(char *path);
int __fastcall init_read_test_file(char *mpq_path, char *mpq_name, int flags, void **archive);
void __cdecl init_get_file_info();
LRESULT __stdcall init_palette(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
void __fastcall init_activate_window(HWND hWnd, bool activated);
LRESULT __stdcall init_redraw_window(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam);
Fix compile errors on Linux Source/../types.h:35:10: fatal error: DiabloUI/_diabloui.h: No such file or directory #include "DiabloUI/_diabloui.h" --- Source/../Source/init.h:43:109: error: fastcall and stdcall attributes are not compatible LRESULT (__stdcall *__fastcall SetWindowProc(void *func))(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam); --- Source/missiles.cpp:915:27: error: unable to find numeric literal operator ‘operator""i64’ *(_QWORD *)&Dirs[0][2] = 0i64; --- Source/world.cpp:38:1: error: narrowing conversion of ‘3937053354’ from ‘unsigned int’ to ‘int’ inside { } [-Wnarrowing] --- Source/lighting.cpp:429:1: error: narrowing conversion of ‘-1’ from ‘int’ to ‘unsigned char’ inside { } [-Wnarrowing] --- Source/objects.cpp:5459:62: error: unable to find numeric literal operator ‘operator""i64’ while ( !(plr[v53]._pMemSpells[1] & ((unsigned __int64)(1i64 << v60) >> 32) | plr[v53]._pMemSpells[0] & (unsigned int)(1i64 << v60)) ); --- Source/control.cpp:488:9: error: unable to find numeric literal operator ‘operator""i64’ v26 = 1i64; --- Source/objects.cpp:243:1: error: narrowing conversion of ‘255’ from ‘int’ to ‘char’ inside { } [-Wnarrowing] --- Source/gamemenu.cpp:22:1: error: narrowing conversion of ‘2147483648’ from ‘unsigned int’ to ‘int’ inside { } [-Wnarrowing] --- Source/sound.cpp:41:88: error: narrowing conversion of ‘240’ from ‘unsigned int’ to ‘char’ inside { } [-Wnarrowing] --- Source/quests.cpp:46:1: error: narrowing conversion of ‘255’ from ‘int’ to ‘char’ inside { } [-Wnarrowing] --- Source/player.cpp:4666:8: error: unable to find numeric literal operator ‘operator""i64’ v14 = 0i64; --- Source/init.cpp:546:109: error: fastcall and stdcall attributes are not compatible LRESULT (__stdcall *__fastcall SetWindowProc(void *func))(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) --- Source/items.cpp:114:1: error: narrowing conversion of ‘(item_effect_type)255’ from ‘unsigned int’ to ‘char’ inside { } [-Wnarrowing] --- Source/items.cpp:307:1: error: narrowing conversion of ‘(unique_base_item)255’ from ‘unsigned int’ to ‘char’ inside { } [-Wnarrowing] --- Source/items.cpp:854:8: error: unable to find numeric literal operator ‘operator""i64’ v37 = 0i64; --- Source/items.cpp:471:1: error: narrowing conversion of ‘(item_equip_type)255’ from ‘unsigned int’ to ‘char’ inside { } [-Wnarrowing]
2018-06-07 20:44:03 +00:00
LRESULT (__stdcall *SetWindowProc(void *func))(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
2018-06-07 02:25:54 +00:00
/* data */
extern int init_inf; // weak
/* rdata */
extern char gszVersionNumber[260];
Fix compile errors on Linux Source/../types.h:35:10: fatal error: DiabloUI/_diabloui.h: No such file or directory #include "DiabloUI/_diabloui.h" --- Source/../Source/init.h:43:109: error: fastcall and stdcall attributes are not compatible LRESULT (__stdcall *__fastcall SetWindowProc(void *func))(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam); --- Source/missiles.cpp:915:27: error: unable to find numeric literal operator ‘operator""i64’ *(_QWORD *)&Dirs[0][2] = 0i64; --- Source/world.cpp:38:1: error: narrowing conversion of ‘3937053354’ from ‘unsigned int’ to ‘int’ inside { } [-Wnarrowing] --- Source/lighting.cpp:429:1: error: narrowing conversion of ‘-1’ from ‘int’ to ‘unsigned char’ inside { } [-Wnarrowing] --- Source/objects.cpp:5459:62: error: unable to find numeric literal operator ‘operator""i64’ while ( !(plr[v53]._pMemSpells[1] & ((unsigned __int64)(1i64 << v60) >> 32) | plr[v53]._pMemSpells[0] & (unsigned int)(1i64 << v60)) ); --- Source/control.cpp:488:9: error: unable to find numeric literal operator ‘operator""i64’ v26 = 1i64; --- Source/objects.cpp:243:1: error: narrowing conversion of ‘255’ from ‘int’ to ‘char’ inside { } [-Wnarrowing] --- Source/gamemenu.cpp:22:1: error: narrowing conversion of ‘2147483648’ from ‘unsigned int’ to ‘int’ inside { } [-Wnarrowing] --- Source/sound.cpp:41:88: error: narrowing conversion of ‘240’ from ‘unsigned int’ to ‘char’ inside { } [-Wnarrowing] --- Source/quests.cpp:46:1: error: narrowing conversion of ‘255’ from ‘int’ to ‘char’ inside { } [-Wnarrowing] --- Source/player.cpp:4666:8: error: unable to find numeric literal operator ‘operator""i64’ v14 = 0i64; --- Source/init.cpp:546:109: error: fastcall and stdcall attributes are not compatible LRESULT (__stdcall *__fastcall SetWindowProc(void *func))(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) --- Source/items.cpp:114:1: error: narrowing conversion of ‘(item_effect_type)255’ from ‘unsigned int’ to ‘char’ inside { } [-Wnarrowing] --- Source/items.cpp:307:1: error: narrowing conversion of ‘(unique_base_item)255’ from ‘unsigned int’ to ‘char’ inside { } [-Wnarrowing] --- Source/items.cpp:854:8: error: unable to find numeric literal operator ‘operator""i64’ v37 = 0i64; --- Source/items.cpp:471:1: error: narrowing conversion of ‘(item_equip_type)255’ from ‘unsigned int’ to ‘char’ inside { } [-Wnarrowing]
2018-06-07 20:44:03 +00:00
extern char gszProductName[260];