Fix linking against storm.dll and diabloui.dll
* add aliases for storm exports to handle __stdcall calling convention on Linux * mark external functions as extern "C"pull/2/head
parent
bd12b61831
commit
1836399875
|
@ -0,0 +1,4 @@
|
|||
*.o
|
||||
*.lib
|
||||
*.dll
|
||||
*.exe
|
File diff suppressed because it is too large
Load Diff
|
@ -2,36 +2,53 @@ LIBRARY "Storm"
|
|||
|
||||
EXPORTS
|
||||
SNetCreateGame @101 NONAME
|
||||
SNetCreateGame@40 @101 NONAME
|
||||
SNetDestroy @102 NONAME
|
||||
SNetDestroy@0 @102 NONAME
|
||||
SNetEnumProviders @103 NONAME
|
||||
;SNetEnumDevices @104 NONAME
|
||||
SNetEnumGames @105 NONAME
|
||||
SNetDropPlayer @106 NONAME
|
||||
SNetDropPlayer@8 @106 NONAME
|
||||
SNetGetGameInfo @107 NONAME
|
||||
SNetGetGameInfo@16 @107 NONAME
|
||||
;SNetGetNetworkLatency @108 NONAME
|
||||
SNetGetNumPlayers @109 NONAME
|
||||
SNetGetOwnerTurnsWaiting @110 NONAME
|
||||
SNetGetOwnerTurnsWaiting@4 @110 NONAME
|
||||
;SNetGetPerformanceData @111 NONAME
|
||||
SNetGetPlayerCaps @112 NONAME
|
||||
SNetGetPlayerName @113 NONAME
|
||||
SNetGetProviderCaps @114 NONAME
|
||||
SNetGetProviderCaps@4 @114 NONAME
|
||||
SNetGetTurnsInTransit @115 NONAME
|
||||
SNetGetTurnsInTransit@4 @115 NONAME
|
||||
SNetInitializeDevice @116 NONAME
|
||||
SNetInitializeProvider @117 NONAME
|
||||
SNetInitializeProvider@20 @117 NONAME
|
||||
SNetJoinGame @118 NONAME
|
||||
SNetLeaveGame @119 NONAME
|
||||
SNetLeaveGame@4 @119 NONAME
|
||||
SNetPerformUpgrade @120 NONAME
|
||||
SNetPerformUpgrade@4 @120 NONAME
|
||||
SNetReceiveMessage @121 NONAME
|
||||
SNetReceiveMessage@12 @121 NONAME
|
||||
SNetReceiveTurns @122 NONAME
|
||||
SNetReceiveTurns@20 @122 NONAME
|
||||
SNetRegisterEventHandler @123 NONAME
|
||||
SNetRegisterEventHandler@8 @123 NONAME
|
||||
;SNetResetLatencyMeasurements @124 NONAME
|
||||
SNetSelectGame @125 NONAME
|
||||
;SNetSelectProvider @126 NONAME
|
||||
SNetSendMessage @127 NONAME
|
||||
SNetSendMessage@12 @127 NONAME
|
||||
SNetSendTurn @128 NONAME
|
||||
SNetSendTurn@8 @128 NONAME
|
||||
SNetSetBasePlayer @129 NONAME
|
||||
SNetSetBasePlayer@4 @129 NONAME
|
||||
SNetSetGameMode @130 NONAME
|
||||
SNetUnregisterEventHandler @131 NONAME
|
||||
SNetUnregisterEventHandler@8 @131 NONAME
|
||||
|
||||
SNetEnumGamesEx @133 NONAME
|
||||
SNetSendServerChatCommand @134 NONAME
|
||||
|
@ -57,7 +74,7 @@ EXPORTS
|
|||
;SDlgCreateDialogIndirectParam @204 NONAME
|
||||
;SDlgCreateDialogParam @205 NONAME
|
||||
SDlgDefDialogProc @206 NONAME
|
||||
|
||||
|
||||
SDlgDialogBoxIndirectParam @208 NONAME
|
||||
;SDlgDialogBoxParam @209 NONAME
|
||||
;SDlgDrawBitmap @210 NONAME
|
||||
|
@ -78,25 +95,41 @@ EXPORTS
|
|||
|
||||
;SFileAuthenticateArchive @251 NONAME
|
||||
SFileCloseArchive @252 NONAME
|
||||
SFileCloseArchive@4 @252 NONAME
|
||||
SFileCloseFile @253 NONAME
|
||||
SFileCloseFile@4 @253 NONAME
|
||||
;SFileDdaBegin @254 NONAME
|
||||
SFileDdaBeginEx @255 NONAME
|
||||
SFileDdaBeginEx@28 @255 NONAME
|
||||
SFileDdaDestroy @256 NONAME
|
||||
SFileDdaDestroy@0 @256 NONAME
|
||||
SFileDdaEnd @257 NONAME
|
||||
SFileDdaEnd@4 @257 NONAME
|
||||
SFileDdaGetPos @258 NONAME
|
||||
SFileDdaGetPos@12 @258 NONAME
|
||||
;SFileDdaGetVolume @259 NONAME
|
||||
SFileDdaInitialize @260 NONAME
|
||||
SFileDdaInitialize@4 @260 NONAME
|
||||
SFileDdaSetVolume @261 NONAME
|
||||
SFileDdaSetVolume@12 @261 NONAME
|
||||
SFileDestroy @262 NONAME
|
||||
;SFileEnableDirectAccess @263 NONAME
|
||||
SFileGetFileArchive @264 NONAME
|
||||
SFileGetFileArchive@8 @264 NONAME
|
||||
SFileGetFileSize @265 NONAME
|
||||
SFileGetFileSize@8 @265 NONAME
|
||||
SFileOpenArchive @266 NONAME
|
||||
SFileOpenArchive@16 @266 NONAME
|
||||
SFileOpenFile @267 NONAME
|
||||
SFileOpenFile@8 @267 NONAME
|
||||
SFileOpenFileEx @268 NONAME
|
||||
SFileOpenFileEx@16 @268 NONAME
|
||||
SFileReadFile @269 NONAME
|
||||
SFileReadFile@20 @269 NONAME
|
||||
SFileSetBasePath @270 NONAME
|
||||
SFileSetBasePath@4 @270 NONAME
|
||||
SFileSetFilePointer @271 NONAME
|
||||
SFileSetFilePointer@16 @271 NONAME
|
||||
SFileSetLocale @272 NONAME
|
||||
;SFileGetBasePath @273 NONAME
|
||||
SFileSetIoErrorMode @274 NONAME
|
||||
|
@ -145,7 +178,7 @@ EXPORTS
|
|||
|
||||
SCodeCompile @331 NONAME
|
||||
SCodeDelete @332 NONAME
|
||||
|
||||
|
||||
SCodeExecute @334 NONAME
|
||||
;SCodeGetPseudocode @335 NONAME
|
||||
|
||||
|
@ -155,17 +188,21 @@ EXPORTS
|
|||
SDrawDestroy @344 NONAME
|
||||
;SDrawFlipPage @345 NONAME
|
||||
SDrawGetFrameWindow @346 NONAME
|
||||
SDrawGetFrameWindow@4 @346 NONAME
|
||||
SDrawGetObjects @347 NONAME
|
||||
SDrawGetScreenSize @348 NONAME
|
||||
;SDrawGetServiceLevel @349 NONAME
|
||||
SDrawLockSurface @350 NONAME
|
||||
SDrawManualInitialize @351 NONAME
|
||||
SDrawManualInitialize@32 @351 NONAME
|
||||
SDrawMessageBox @352 NONAME
|
||||
SDrawMessageBox@12 @352 NONAME
|
||||
SDrawPostClose @353 NONAME
|
||||
SDrawRealizePalette @354 NONAME
|
||||
;SDrawSelectGdiSurface @355 NONAME
|
||||
SDrawUnlockSurface @356 NONAME
|
||||
SDrawUpdatePalette @357 NONAME
|
||||
SDrawUpdatePalette@16 @357 NONAME
|
||||
;SDrawUpdateScreen @358 NONAME
|
||||
;SDrawWaitForVerticalBlank @359 NONAME
|
||||
|
||||
|
@ -192,10 +229,12 @@ EXPORTS
|
|||
Ordinal393 @393 NONAME
|
||||
|
||||
;SMem399 @399 NONAME
|
||||
|
||||
|
||||
SMemAlloc @401 NONAME
|
||||
SMemAlloc@16 @401 NONAME
|
||||
;SMemDestroy @402 NONAME
|
||||
SMemFree @403 NONAME
|
||||
SMemFree@16 @403 NONAME
|
||||
;SMemGetSize @404 NONAME
|
||||
SMemReAlloc @405 NONAME
|
||||
;Storm406 @406 NONAME
|
||||
|
@ -210,11 +249,17 @@ EXPORTS
|
|||
;SMsgPushRegisterState @419 NONAME
|
||||
;SMsg420 @420 NONAME
|
||||
SRegLoadData @421 NONAME
|
||||
SRegLoadData@24 @421 NONAME
|
||||
SRegLoadString @422 NONAME
|
||||
SRegLoadString@20 @422 NONAME
|
||||
SRegLoadValue @423 NONAME
|
||||
SRegLoadValue@16 @423 NONAME
|
||||
SRegSaveData @424 NONAME
|
||||
SRegSaveData@20 @424 NONAME
|
||||
SRegSaveString @425 NONAME
|
||||
SRegSaveString@16 @425 NONAME
|
||||
SRegSaveValue @426 NONAME
|
||||
SRegSaveValue@16 @426 NONAME
|
||||
;SRegGetBaseKey @427 NONAME
|
||||
SRegDeleteValue @428 NONAME
|
||||
;SReg429 @429 NONAME
|
||||
|
@ -223,7 +268,7 @@ EXPORTS
|
|||
STransBltUsingMask @432 NONAME
|
||||
;STransCreateI @433 NONAME
|
||||
STransDelete @434 NONAME
|
||||
|
||||
|
||||
STransDuplicate @436 NONAME
|
||||
STransIntersectDirtyArray @437 NONAME
|
||||
STransInvertMask @438 NONAME
|
||||
|
@ -238,20 +283,27 @@ EXPORTS
|
|||
;STransLoadE @447 NONAME
|
||||
|
||||
SVidDestroy @451 NONAME
|
||||
SVidDestroy@0 @451 NONAME
|
||||
SVidGetSize @452 NONAME
|
||||
SVidInitialize @453 NONAME
|
||||
SVidInitialize@4 @453 NONAME
|
||||
SVidPlayBegin @454 NONAME
|
||||
SVidPlayBegin@28 @454 NONAME
|
||||
;SVidPlayBeginFromMemory @455 NONAME
|
||||
SVidPlayContinue @456 NONAME
|
||||
SVidPlayContinueSingle @457 NONAME
|
||||
SVidPlayEnd @458 NONAME
|
||||
SVidPlayEnd@4 @458 NONAME
|
||||
;SVidSetVolume @459 NONAME
|
||||
;Storm460 @460 NONAME
|
||||
SErrDisplayError @461 NONAME
|
||||
SErrGetErrorStr @462 NONAME
|
||||
SErrGetErrorStr@12 @462 NONAME
|
||||
SErrGetLastError @463 NONAME
|
||||
SErrGetLastError@0 @463 NONAME
|
||||
;SErrRegisterMessageSource @464 NONAME
|
||||
SErrSetLastError @465 NONAME
|
||||
SErrSetLastError@4 @465 NONAME
|
||||
;SErrReportNamedResourceLeak @466 NONAME
|
||||
;SErrReportResourceLeak @467 NONAME
|
||||
SErrSuppressErrors @468 NONAME
|
||||
|
@ -287,6 +339,7 @@ EXPORTS
|
|||
;Ordinal498 @498 NONAME
|
||||
|
||||
SStrCopy @501 NONAME
|
||||
SStrCopy@12 @501 NONAME
|
||||
SStrHash @502 NONAME
|
||||
SStrNCat @503 NONAME
|
||||
;SStrTokenize @504 NONAME
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -9,29 +9,29 @@
|
|||
*/
|
||||
|
||||
|
||||
void __cdecl UiDestroy(); // { return; }
|
||||
void __stdcall UiTitleDialog(int a1); // { return; }
|
||||
void __cdecl UiInitialize(); // { return; }
|
||||
void __stdcall UiCopyProtError(int a1); // { return; }
|
||||
void __stdcall UiAppActivate(int a1); // { return; }
|
||||
int __stdcall UiValidPlayerName(char *a1); // { return 0; }
|
||||
int __stdcall UiSelHeroMultDialog(void *fninfo, void *fncreate, void *fnremove, void *fnstats, int *a5, int *a6, char *name); // { return 0; }
|
||||
int __stdcall UiSelHeroSingDialog(void *fninfo, void *fncreate, void *fnremove, void *fnstats, int *a5, char *name, int *difficulty); // { return 0; }
|
||||
void __stdcall UiCreditsDialog(int a1); // { return; }
|
||||
int __stdcall UiMainMenuDialog(char *name, int *a2, void *fnSound, int a4); // { return 0; }
|
||||
int __stdcall UiProgressDialog(HWND window, char *msg, int a3, void *fnfunc, int a5); // { return 0; }
|
||||
int __cdecl UiProfileGetString(); // { return; }
|
||||
void __cdecl UiProfileCallback(); // { return; }
|
||||
void __cdecl UiProfileDraw(); // { return; }
|
||||
void __cdecl UiCategoryCallback(); // { return; }
|
||||
void __cdecl UiGetDataCallback(); // { return; }
|
||||
void __cdecl UiAuthCallback(); // { return; }
|
||||
void __cdecl UiSoundCallback(); // { return; }
|
||||
void __cdecl UiMessageBoxCallback(); // { return; }
|
||||
void __cdecl UiDrawDescCallback(); // { return; }
|
||||
void __cdecl UiCreateGameCallback(); // { return; }
|
||||
void __cdecl UiArtCallback(); // { return; }
|
||||
int __stdcall UiSelectGame(int a1, _SNETPROGRAMDATA *client_info, _SNETPLAYERDATA *user_info, _SNETUIDATA *ui_info, _SNETVERSIONDATA *file_info, int *a6); // { return 0; }
|
||||
int __stdcall UiSelectProvider(int a1, _SNETPROGRAMDATA *client_info, _SNETPLAYERDATA *user_info, _SNETUIDATA *ui_info, _SNETVERSIONDATA *file_info, int *type); // { return 0; }
|
||||
int __stdcall UiCreatePlayerDescription(_uiheroinfo *info, int mode, char *desc); // { return 0; }
|
||||
int __stdcall UiSetupPlayerInfo(char *str, _uiheroinfo *info, int mode); // { return 0; }
|
||||
extern "C" void UiDestroy(); // { return; }
|
||||
extern "C" void __stdcall UiTitleDialog(int a1); // { return; }
|
||||
extern "C" void __cdecl UiInitialize(); // { return; }
|
||||
extern "C" void __stdcall UiCopyProtError(int a1); // { return; }
|
||||
extern "C" void __stdcall UiAppActivate(int a1); // { return; }
|
||||
extern "C" int __stdcall UiValidPlayerName(char *a1); // { return 0; }
|
||||
extern "C" int __stdcall UiSelHeroMultDialog(void *fninfo, void *fncreate, void *fnremove, void *fnstats, int *a5, int *a6, char *name); // { return 0; }
|
||||
extern "C" int __stdcall UiSelHeroSingDialog(void *fninfo, void *fncreate, void *fnremove, void *fnstats, int *a5, char *name, int *difficulty); // { return 0; }
|
||||
extern "C" void __stdcall UiCreditsDialog(int a1); // { return; }
|
||||
extern "C" int __stdcall UiMainMenuDialog(char *name, int *a2, void *fnSound, int a4); // { return 0; }
|
||||
extern "C" int __stdcall UiProgressDialog(HWND window, char *msg, int a3, void *fnfunc, int a5); // { return 0; }
|
||||
extern "C" int __cdecl UiProfileGetString(); // { return; }
|
||||
extern "C" void __cdecl UiProfileCallback(); // { return; }
|
||||
extern "C" void __cdecl UiProfileDraw(); // { return; }
|
||||
extern "C" void __cdecl UiCategoryCallback(); // { return; }
|
||||
extern "C" void __cdecl UiGetDataCallback(); // { return; }
|
||||
extern "C" void __cdecl UiAuthCallback(); // { return; }
|
||||
extern "C" void __cdecl UiSoundCallback(); // { return; }
|
||||
extern "C" void __cdecl UiMessageBoxCallback(); // { return; }
|
||||
extern "C" void __cdecl UiDrawDescCallback(); // { return; }
|
||||
extern "C" void __cdecl UiCreateGameCallback(); // { return; }
|
||||
extern "C" void __cdecl UiArtCallback(); // { return; }
|
||||
extern "C" int __stdcall UiSelectGame(int a1, _SNETPROGRAMDATA *client_info, _SNETPLAYERDATA *user_info, _SNETUIDATA *ui_info, _SNETVERSIONDATA *file_info, int *a6); // { return 0; }
|
||||
extern "C" int __stdcall UiSelectProvider(int a1, _SNETPROGRAMDATA *client_info, _SNETPLAYERDATA *user_info, _SNETUIDATA *ui_info, _SNETVERSIONDATA *file_info, int *type); // { return 0; }
|
||||
extern "C" int __stdcall UiCreatePlayerDescription(_uiheroinfo *info, int mode, char *desc); // { return 0; }
|
||||
extern "C" int __stdcall UiSetupPlayerInfo(char *str, _uiheroinfo *info, int mode); // { return 0; }
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
DIABLO_SRC=$(wildcard Source/*.cpp)
|
||||
DIABLO_OBJ=$(DIABLO_SRC:.cpp=.o)
|
||||
|
||||
PKWARE_SRC=$(wildcard 3rdParty/PKWare/*.cpp)
|
||||
PKWARE_OBJ=$(PKWARE_SRC:.cpp=.o)
|
||||
|
||||
all: diablo.exe
|
||||
|
||||
diablo.exe: $(DIABLO_OBJ) $(PKWARE_OBJ) storm.lib
|
||||
i686-w64-mingw32-gcc -L./ -o $@ $^ -lgdi32 -lversion -ldiabloui -lstorm
|
||||
|
||||
%.o: %.cpp
|
||||
i686-w64-mingw32-gcc -c -fpermissive -o $@ $<
|
||||
|
||||
storm.lib: storm.dll
|
||||
i686-w64-mingw32-dlltool -d 3rdParty/Storm/Source/storm.def -D storm.dll -l storm.lib
|
||||
|
||||
storm.dll:
|
||||
echo "Please copy storm.dll (version 1.09b) here."
|
||||
|
||||
clean:
|
||||
rm -f $(DIABLO_OBJ) $(PKWARE_OBJ)
|
||||
|
||||
.PHONY: clean all
|
Loading…
Reference in New Issue