1
0
Fork 0

Merge pull request #8 from galaxyhaxz/work

Linux compiling almost there
pull/10/head
galaxyhaxz 2018-06-09 03:15:38 -05:00 committed by GitHub
commit 4d5e0cc7d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
22 changed files with 977 additions and 375 deletions

4
.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
*.o
*.lib
*.dll
*.exe

View File

@ -60,6 +60,9 @@ typedef struct _WSIZE
#define GAMESTATE_STARTED 0x08
#define GAMESTATE_REPLAY 0x80
#ifdef __GNUC__
extern "C" {
#endif
BOOL STORMAPI SNetCreateGame(const char *pszGameName, const char *pszGamePassword, const char *pszGameStatString, DWORD dwGameType, char *GameTemplateData, int GameTemplateSize, int playerCount, char *creatorName, char *a11, int *playerID);
BOOL STORMAPI SNetDestroy();
@ -68,11 +71,11 @@ BOOL STORMAPI SNetEnumProviders(int (STORMAPI *callback)(DWORD, DWORD, DWORD, DW
BOOL STORMAPI SNetEnumGames(int (STORMAPI *callback)(DWORD, DWORD, DWORD), int *hintnextcall);
/* SNetDropPlayer @ 106
*
*
* Drops a player from the current game.
*
*
* playerid: The player ID for the player to be dropped.
* flags:
* flags:
*
* Returns TRUE if the function was called successfully and FALSE otherwise.
*/
@ -83,10 +86,10 @@ SNetDropPlayer(
DWORD flags);
/* SNetGetGameInfo @ 107
*
*
* Retrieves specific game information from Storm, such as name, password,
* stats, mode, game template, and players.
*
*
* type: The type of data to retrieve. See GAMEINFO_ flags.
* dst: The destination buffer for the data.
* length: The maximum size of the destination buffer.
@ -136,9 +139,9 @@ typedef struct _CAPS
BOOL STORMAPI SNetGetPlayerCaps(char playerid, PCAPS playerCaps);
/* SNetGetPlayerName @ 113
*
*
* Retrieves the name of a player given their player ID.
*
*
* playerid: The player's ID.
* buffer: The buffer that will receive the name.
* buffersize: The maximum size of buffer.
@ -148,28 +151,28 @@ BOOL STORMAPI SNetGetPlayerCaps(char playerid, PCAPS playerCaps);
BOOL
STORMAPI
SNetGetPlayerName(
int playerid,
char *buffer,
int playerid,
char *buffer,
size_t buffersize);
/* SNetGetProviderCaps @ 114
*
*
* Retrieves network provider capacity information.
*
*
* providerCaps: A pointer to a CAPS structure that will receive the information.
*
* Returns TRUE if the function was called successfully and FALSE otherwise.
*/
BOOL
STORMAPI
BOOL
STORMAPI
SNetGetProviderCaps(
_SNETCAPS *providerCaps);
/* SNetGetTurnsInTransit @ 115
*
*
* Retrieves the number of turns (buffers) that have been queued
* before sending them over the network.
*
*
* turns: A pointer to an integer that will receive the value.
*
* Returns TRUE if the function was called successfully and FALSE otherwise.
@ -285,16 +288,16 @@ typedef struct _storm_head
/* SNetInitializeProvider @ 117
*
*
* Initializes a provider by storing the provider callbacks, and calling
* spiInitialize() using the parameters passed to this function.
* Note: The use of the parameters is determined by the network
* module.
*
*
* providerName: The provider's identifier. Example: 'TENB' (BNET).
* gameClientInfo: A pointer to a clientInfo structure containing
* gameClientInfo: A pointer to a clientInfo structure containing
* information about the game client.
* userData: A pointer to a userInfo structure containing information
* userData: A pointer to a userInfo structure containing information
* about the player.
* bnCallbacks: A pointer to a battleInfo structure containing callbacks
* and other information that is specific to Battle.net.
@ -306,7 +309,7 @@ typedef struct _storm_head
BOOL
STORMAPI
SNetInitializeProvider(
DWORD providerName,
DWORD providerName,
_SNETPROGRAMDATA *gameClientInfo,
_SNETPLAYERDATA *userData,
_SNETUIDATA *bnCallbacks,
@ -316,10 +319,10 @@ SNetInitializeProvider(
BOOL STORMAPI SNetJoinGame(int id, char *gameName, char *gamePassword, char *playerName, char *userStats, int *playerid);
/* SNetLeaveGame @ 119
*
*
* Notifies Storm that the player has left the game. Storm will
* notify all connected peers through the network provider.
*
*
* type: The leave type. It doesn't appear to be important, no documentation available.
*
* Returns TRUE if the function was called successfully and FALSE otherwise.
@ -357,11 +360,11 @@ HANDLE STORMAPI SNetUnregisterEventHandler(int type, void (STORMAPI *sEvent)(_SN
int STORMAPI SNetSelectGame(int a1, int a2, int a3, int a4, int a5, int *playerid);
/* SNetSendMessage @ 127
*
*
* Sends a message to a player given their player ID. Network message
* is sent using class 01 and is retrieved by the other client using
* SNetReceiveMessage().
*
*
* playerID: The player index of the player to receive the data.
* Conversely, this field can be one of the following constants:
* SNPLAYER_ALL | Sends the message to all players, including oneself.
@ -385,11 +388,11 @@ SNetSendMessage(
/* SNetSendTurn @ 128
*
*
* Sends a turn (data packet) to all players in the game. Network data
* is sent using class 02 and is retrieved by the other client using
* SNetReceiveTurns().
*
*
* data: A pointer to the data.
* databytes: The amount of bytes that the data pointer contains.
*
@ -402,12 +405,12 @@ SNetSendTurn(
size_t databytes);
/* SNetSetGameMode @ 130
*
*
* Set's the game's mode flags, notifying the network
* provider that the state of the game has changed.
* For example: notifies Battle.net when the game is
* full.
*
*
* You should first call SNetGetGameInfo to retrieve
* the existing mode flags.
*
@ -458,7 +461,7 @@ BOOL STORMAPI SDlgEndDialog(HWND hDlg, HANDLE nResult);
BOOL STORMAPI SDlgSetControlBitmaps(HWND parentwindow, int *id, int a3, char *buffer2, char *buffer, int flags, int mask);
/*
// lpCursorName can only be IDC_ARROW
// lpCursorName can only be IDC_ARROW
BOOL STORMAPI SDlgSetSystemCursor(void *lpSrcBuffer, void *p_a2, LPSIZE lpSize, LPCSTR lpCursorName);
*/
@ -544,15 +547,15 @@ BOOL STORMAPI SBltROP3Clipped(void *lpDstBuffer, RECT *lpDstRect, POINT *lpDstPt
/* SBmpDecodeImage @ 321
*
*
* Decodes an image that has already been loaded into a buffer.
*
*
* dwImgType: Optional, the image type. See SBMP_ macros.
* pSrcBuffer: A pointer to the source buffer.
* dwSrcBuffersize: The size of the data in the source buffer.
* pPalette: An optional buffer that receives the image palette.
* pDstBuffer: A buffer that receives the image data.
* dwDstBuffersize: The size of the specified image buffer. If the size of the
* dwDstBuffersize: The size of the specified image buffer. If the size of the
* destination buffer is 0, then the destination buffer is not used.
* pdwWidth: An optional variable that receives the image width.
* pdwHeight: An optional variable that receives the image height.
@ -560,8 +563,8 @@ BOOL STORMAPI SBltROP3Clipped(void *lpDstBuffer, RECT *lpDstRect, POINT *lpDstPt
*
* Returns TRUE if the image was supported and decoded correctly, FALSE otherwise.
*/
BOOL
STORMAPI
BOOL
STORMAPI
SBmpDecodeImage(
DWORD dwImgType,
void *pSrcBuffer,
@ -575,9 +578,9 @@ SBmpDecodeImage(
/* SBmpLoadImage @ 323
*
*
* Load an image from an available archive into a buffer.
*
*
* pszFileName: The name of the graphic in an active archive.
* pPalette: An optional buffer that receives the image palette.
* pBuffer: A buffer that receives the image data.
@ -600,10 +603,10 @@ SBmpLoadImage(
DWORD *pdwBpp = NULL);
/* SBmpSaveImage @ 324
*
* Save an image from a buffer to a file. The image format is determined
*
* Save an image from a buffer to a file. The image format is determined
* from the filename and is either .gif, .pcx, .tga, or .bmp being the default.
*
*
* pszFileName: The name of the file to create.
* pPalette: A pointer to a palette array containing 256 entries.
* pBuffer: A buffer containing the image data.
@ -635,16 +638,16 @@ BOOL STORMAPI SDrawAutoInitialize(HINSTANCE hInst, LPCSTR lpClassName, LPCSTR lp
/* SDrawCaptureScreen @ 342
*
*
* Saves a screenshot from the primary surface being handled by Storm.
*
*
* pszOutput: The name of the output file. The save format is automatically set by the extension.
* The extensions supported are .gif, .pcx, .tga, and .bmp. It will write a bitmap by default.
*
* Returns TRUE if successful and FALSE otherwise.
*/
BOOL
STORMAPI
BOOL
STORMAPI
SDrawCaptureScreen(
const char *pszOutput);
@ -653,7 +656,7 @@ SDrawCaptureScreen(
*
* Retrieves the window handle that was specified in
* SDrawManualInitialize or created in SDrawAutoInitialize.
*
*
* sdraw_framewindow: Optional variable that receives the returned handle.
*
* Returns the handle of the window.
@ -665,10 +668,10 @@ SDrawGetFrameWindow(
/* SDrawGetObjects @ 347
*
*
* Retrieves the object information that was initialized using
* SDrawManualInitialize or SDrawAutoInitialize.
*
*
* ddInterface: The DirectDraw interface.
* primarySurface: The primary DirectDraw surface.
* surface2: A second unknown surface.
@ -692,7 +695,7 @@ SDrawGetObjects(
/* SDrawGetScreenSize @ 348
*
*
* Obtains information for the current screen resolution.
*
* pdwWidth: Optional variable that receives the screen width.
@ -714,7 +717,7 @@ BOOL STORMAPI SDrawLockSurface(int surfacenumber, RECT *lpDestRect, void **lplpS
/* SDrawManualInitialize @ 351
*
*
* Sets the DirectDraw variables to be referenced in Storm.
*
* hWnd: The handle of the DirectDraw window.
@ -746,7 +749,7 @@ SDrawManualInitialize(
/* SDrawPostClose @ 353
*
* Posts a WM_QUIT message to the active drawing window specified
* Posts a WM_QUIT message to the active drawing window specified
* in SDrawManualInitialize or created in SDrawAutoInitialize.
*
* Returns TRUE if successful and FALSE otherwise.
@ -776,10 +779,10 @@ BOOL STORMAPI Ordinal393(char *pszString, int, int);
/* SMemAlloc @ 401
*
*
* Allocates a block of memory. This block is different
* from the standard malloc by including a header containing
* information about the block.
* information about the block.
*
* amount: The amount of memory to allocate, in bytes.
* logfilename: The name of the file or object that this call belongs to.
@ -801,14 +804,14 @@ SMemAlloc(
/* SMemFree @ 403
*
* Frees a block of memory that was created using SMemAlloc,
*
* Frees a block of memory that was created using SMemAlloc,
* includes the log file and line for debugging purposes.
*
* location: The memory location to be freed.
* logfilename: The name of the file or object that this call belongs to.
* logline: The line in the file or one of the SLOG_ macros.
* defaultValue:
* defaultValue:
*
* Returns TRUE if the call was successful and FALSE otherwise.
*/
@ -824,8 +827,8 @@ SMemFree(
/* SMemReAlloc @ 405
*
* Reallocates a block of memory that was created using SMemAlloc,
*
* Reallocates a block of memory that was created using SMemAlloc,
* includes the log file and line for debugging purposes.
*
* location: The memory location to be re-allocated. If this parameter
@ -833,7 +836,7 @@ SMemFree(
* amount: The amount of memory to re-allocate.
* logfilename: The name of the file or object that this call belongs to.
* logline: The line in the file or one of the SLOG_ macros.
* defaultValue:
* defaultValue:
*
* Returns a pointer to the re-allocated memory. This pointer does NOT include
* the additional storm header.
@ -931,7 +934,7 @@ SErrDisplayError(
#define SEDisplayError(err) SErrDisplayError(e, __FILE__, __LINE__)
/* SErrGetErrorStr @ 462
*
*
* Retrieves a string that describes the specified error code for
* the system, Storm, DirectDraw, or DirectSound.
*
@ -952,7 +955,7 @@ SErrGetErrorStr(
/* SErrGetLastError @ 463
*
*
* Retrieves the last error that was specifically
* set for the Storm library.
*
@ -969,7 +972,7 @@ SErrGetLastError();
/* SErrSetLastError @ 465
*
*
* Sets the last error for the Storm library and the Kernel32 library.
*
* dwErrCode: The error code that will be set.
@ -979,7 +982,7 @@ STORMAPI
SErrSetLastError(
DWORD dwErrCode = NO_ERROR);
//
//
// void STORMAPI SErrReportNamedResourceLeak(const char *pszMsg, const char *pszSubMsg = nullptr)
// void STORMAPI SErrReportResourceLeak(const char *pszMsg)
@ -1023,7 +1026,7 @@ void STORMAPI SErrSuppressErrors(BOOL suppressErrors);
/* SMemCopy @ 491
*
*
* Copies a block of memory from source to destination.
* This function immediately calls memcpy. See online documentation
* of memcpy for more details.
@ -1035,14 +1038,14 @@ void STORMAPI SErrSuppressErrors(BOOL suppressErrors);
void
STORMAPI
SMemCopy(
void *dest,
const void *source,
void *dest,
const void *source,
size_t size);
#define SMCopy(d,s) ( SMemCopy(d, s, __STORM_SSIZEMIN(s,d)) )
/* SMemFill @ 492
*
*
* Fills a block of memory with the specified character.
* This function immediately calls memset. See online documentation
* of memset for more details.
@ -1061,14 +1064,14 @@ SMemFill(
#define SMFill(l,f) (SMemFill(l, sizeof(l), f))
/* SMemZero @ 494
*
*
* Fills a block of memory with the integer 0x00 (Zero).
*
* location: The location to write at.
* length: The amount of bytes to write.
*/
void
STORMAPI
void
STORMAPI
SMemZero(
void *location,
size_t length);
@ -1081,7 +1084,7 @@ int STORMAPI SMemCmp(void *location1, void *location2, DWORD size);
#define SMCmp(l,x) ( SMemCmp(l, x, __STORM_SSIZEMIN(x,l)) )
/* SStrCopy @ 501
*
*
* Copies a string from src to dest (including NULL terminator)
* until the max_length is reached.
*
@ -1094,7 +1097,7 @@ int STORMAPI SMemCmp(void *location1, void *location2, DWORD size);
int
STORMAPI
SStrCopy(
char *dest,
char *dest,
const char *src,
int max_length = 0x7FFFFFFF);
@ -1103,7 +1106,7 @@ SStrCopy(
#define STORM_HASH_ABSOLUTE 1
/* SStrHash @ 502
*
*
* Creates a simple hash for the string. This function
* should NOT be used for sensitive information.
*
@ -1127,7 +1130,7 @@ SStrHash(
int STORMAPI SStrNCat(char *dest, const char *src, DWORD max_length);
/* SStrLen @ 506
*
*
* Retrieves the length of a string.
*
* string: The input string of which to obtain a
@ -1141,7 +1144,7 @@ SStrLen(
const char *string);
/* SStrCmp @ 508
*
*
* Compares two strings case sensitive.
*
* string1: The first string.
@ -1153,14 +1156,14 @@ SStrLen(
int
STORMAPI
SStrCmp(
const char *string1,
const char *string2,
const char *string1,
const char *string2,
size_t size);
#define SSCmp(s,x) ( SStrCmp(s,x,__STORM_SSIZEMIN(s,x)) )
/* SStrCmpI @ 509
*
*
* Compares two strings case insensitive.
*
* string1: The first string.
@ -1172,18 +1175,18 @@ SStrCmp(
int
STORMAPI
SStrCmpI(
const char *string1,
const char *string2,
const char *string1,
const char *string2,
size_t size);
#define SSCmpI(s,x) ( SStrCmpI(s,x,__STORM_SSIZEMIN(s,x)) )
/* SStrUpper @ 510
*
*
* Converts all lower-case alpha characters of a string to upper-case.
*
* string: The string to convert.
*
*
* Returns the same pointer given in the input.
*/
char*
@ -1226,7 +1229,7 @@ SErrDisplayErrorFmt(
//#define SEDisplayErrorFmt(err,...) SErrDisplayErrorFmt(err, __FILE__, __LINE__, FALSE, 1, __VA_ARGS__)
/* SErrCatchUnhandledExceptions @ 567
*
*
* Registers a top-level exception filter managed entirely by Storm.
* The registered filter will display formatted exception information by calling SErrDisplayError.
*/
@ -1236,19 +1239,19 @@ SErrCatchUnhandledExceptions();
/* SStrChr @ 571
*
* Searches a string for the given character. See
*
* Searches a string for the given character. See
* strchr documentation for more details.
*
* string: The string to search.
* c: The character to search for.
*
*
* Returns a pointer to the first occurance of the character.
*/
char*
STORMAPI
SStrChr(
const char *string,
const char *string,
char c);
@ -1256,7 +1259,7 @@ char *STORMAPI SStrChrR(const char *string, char c);
/* SStrVPrintf @ 578
*
*
* Prints a formatted string to a destination buffer.
* This function calls vsnprintf with some extra error handling.
* See online documentation of vsnprintf for more details.
@ -1269,8 +1272,8 @@ char *STORMAPI SStrChrR(const char *string, char c);
*/
size_t
SStrVPrintf(
char *dest,
size_t size,
char *dest,
size_t size,
const char *format, ...);
@ -1295,4 +1298,9 @@ bool __stdcall SNetSetBasePlayer(int base_player_num);
int __stdcall SFileSetFilePointer(HANDLE file1, int offset, HANDLE file2, int whence);
void __stdcall SDrawMessageBox(char *text, char *caption, int type);
#ifdef __GNUC__
}
#endif
#endif

View File

@ -60,6 +60,9 @@ typedef struct _WSIZE
#define GAMESTATE_STARTED 0x08
#define GAMESTATE_REPLAY 0x80
#ifdef __GNUC__
extern "C" {
#endif
BOOL STORMAPI SNetCreateGame(const char *pszGameName, const char *pszGamePassword, const char *pszGameStatString, DWORD dwGameType, char *GameTemplateData, int GameTemplateSize, int playerCount, char *creatorName, char *a11, int *playerID);
BOOL STORMAPI SNetDestroy();
@ -68,11 +71,11 @@ BOOL STORMAPI SNetEnumProviders(int (STORMAPI *callback)(DWORD, DWORD, DWORD, DW
BOOL STORMAPI SNetEnumGames(int (STORMAPI *callback)(DWORD, DWORD, DWORD), int *hintnextcall);
/* SNetDropPlayer @ 106
*
*
* Drops a player from the current game.
*
*
* playerid: The player ID for the player to be dropped.
* flags:
* flags:
*
* Returns TRUE if the function was called successfully and FALSE otherwise.
*/
@ -83,10 +86,10 @@ SNetDropPlayer(
DWORD flags);
/* SNetGetGameInfo @ 107
*
*
* Retrieves specific game information from Storm, such as name, password,
* stats, mode, game template, and players.
*
*
* type: The type of data to retrieve. See GAMEINFO_ flags.
* dst: The destination buffer for the data.
* length: The maximum size of the destination buffer.
@ -136,9 +139,9 @@ typedef struct _CAPS
BOOL STORMAPI SNetGetPlayerCaps(char playerid, PCAPS playerCaps);
/* SNetGetPlayerName @ 113
*
*
* Retrieves the name of a player given their player ID.
*
*
* playerid: The player's ID.
* buffer: The buffer that will receive the name.
* buffersize: The maximum size of buffer.
@ -148,28 +151,28 @@ BOOL STORMAPI SNetGetPlayerCaps(char playerid, PCAPS playerCaps);
BOOL
STORMAPI
SNetGetPlayerName(
int playerid,
char *buffer,
int playerid,
char *buffer,
size_t buffersize);
/* SNetGetProviderCaps @ 114
*
*
* Retrieves network provider capacity information.
*
*
* providerCaps: A pointer to a CAPS structure that will receive the information.
*
* Returns TRUE if the function was called successfully and FALSE otherwise.
*/
BOOL
STORMAPI
BOOL
STORMAPI
SNetGetProviderCaps(
PCAPS providerCaps);
/* SNetGetTurnsInTransit @ 115
*
*
* Retrieves the number of turns (buffers) that have been queued
* before sending them over the network.
*
*
* turns: A pointer to an integer that will receive the value.
*
* Returns TRUE if the function was called successfully and FALSE otherwise.
@ -285,16 +288,16 @@ typedef struct _storm_head
/* SNetInitializeProvider @ 117
*
*
* Initializes a provider by storing the provider callbacks, and calling
* spiInitialize() using the parameters passed to this function.
* Note: The use of the parameters is determined by the network
* module.
*
*
* providerName: The provider's identifier. Example: 'TENB' (BNET).
* gameClientInfo: A pointer to a clientInfo structure containing
* gameClientInfo: A pointer to a clientInfo structure containing
* information about the game client.
* userData: A pointer to a userInfo structure containing information
* userData: A pointer to a userInfo structure containing information
* about the player.
* bnCallbacks: A pointer to a battleInfo structure containing callbacks
* and other information that is specific to Battle.net.
@ -306,7 +309,7 @@ typedef struct _storm_head
BOOL
STORMAPI
SNetInitializeProvider(
DWORD providerName,
DWORD providerName,
client_info *gameClientInfo,
user_info *userData,
battle_info *bnCallbacks,
@ -316,10 +319,10 @@ SNetInitializeProvider(
BOOL STORMAPI SNetJoinGame(int id, char *gameName, char *gamePassword, char *playerName, char *userStats, int *playerid);
/* SNetLeaveGame @ 119
*
*
* Notifies Storm that the player has left the game. Storm will
* notify all connected peers through the network provider.
*
*
* type: The leave type. It doesn't appear to be important, no documentation available.
*
* Returns TRUE if the function was called successfully and FALSE otherwise.
@ -356,11 +359,11 @@ HANDLE STORMAPI SNetRegisterEventHandler(int type, void (STORMAPI *sEvent)(PS_EV
int STORMAPI SNetSelectGame(int a1, int a2, int a3, int a4, int a5, int *playerid);
/* SNetSendMessage @ 127
*
*
* Sends a message to a player given their player ID. Network message
* is sent using class 01 and is retrieved by the other client using
* SNetReceiveMessage().
*
*
* playerID: The player index of the player to receive the data.
* Conversely, this field can be one of the following constants:
* SNPLAYER_ALL | Sends the message to all players, including oneself.
@ -384,11 +387,11 @@ SNetSendMessage(
/* SNetSendTurn @ 128
*
*
* Sends a turn (data packet) to all players in the game. Network data
* is sent using class 02 and is retrieved by the other client using
* SNetReceiveTurns().
*
*
* data: A pointer to the data.
* databytes: The amount of bytes that the data pointer contains.
*
@ -401,12 +404,12 @@ SNetSendTurn(
size_t databytes);
/* SNetSetGameMode @ 130
*
*
* Set's the game's mode flags, notifying the network
* provider that the state of the game has changed.
* For example: notifies Battle.net when the game is
* full.
*
*
* You should first call SNetGetGameInfo to retrieve
* the existing mode flags.
*
@ -457,7 +460,7 @@ BOOL STORMAPI SDlgEndDialog(HWND hDlg, HANDLE nResult);
BOOL STORMAPI SDlgSetControlBitmaps(HWND parentwindow, int *id, int a3, char *buffer2, char *buffer, int flags, int mask);
/*
// lpCursorName can only be IDC_ARROW
// lpCursorName can only be IDC_ARROW
BOOL STORMAPI SDlgSetSystemCursor(void *lpSrcBuffer, void *p_a2, LPSIZE lpSize, LPCSTR lpCursorName);
*/
@ -543,15 +546,15 @@ BOOL STORMAPI SBltROP3Clipped(void *lpDstBuffer, RECT *lpDstRect, POINT *lpDstPt
/* SBmpDecodeImage @ 321
*
*
* Decodes an image that has already been loaded into a buffer.
*
*
* dwImgType: Optional, the image type. See SBMP_ macros.
* pSrcBuffer: A pointer to the source buffer.
* dwSrcBuffersize: The size of the data in the source buffer.
* pPalette: An optional buffer that receives the image palette.
* pDstBuffer: A buffer that receives the image data.
* dwDstBuffersize: The size of the specified image buffer. If the size of the
* dwDstBuffersize: The size of the specified image buffer. If the size of the
* destination buffer is 0, then the destination buffer is not used.
* pdwWidth: An optional variable that receives the image width.
* pdwHeight: An optional variable that receives the image height.
@ -559,8 +562,8 @@ BOOL STORMAPI SBltROP3Clipped(void *lpDstBuffer, RECT *lpDstRect, POINT *lpDstPt
*
* Returns TRUE if the image was supported and decoded correctly, FALSE otherwise.
*/
BOOL
STORMAPI
BOOL
STORMAPI
SBmpDecodeImage(
DWORD dwImgType,
void *pSrcBuffer,
@ -574,9 +577,9 @@ SBmpDecodeImage(
/* SBmpLoadImage @ 323
*
*
* Load an image from an available archive into a buffer.
*
*
* pszFileName: The name of the graphic in an active archive.
* pPalette: An optional buffer that receives the image palette.
* pBuffer: A buffer that receives the image data.
@ -599,10 +602,10 @@ SBmpLoadImage(
DWORD *pdwBpp = NULL);
/* SBmpSaveImage @ 324
*
* Save an image from a buffer to a file. The image format is determined
*
* Save an image from a buffer to a file. The image format is determined
* from the filename and is either .gif, .pcx, .tga, or .bmp being the default.
*
*
* pszFileName: The name of the file to create.
* pPalette: A pointer to a palette array containing 256 entries.
* pBuffer: A buffer containing the image data.
@ -634,16 +637,16 @@ BOOL STORMAPI SDrawAutoInitialize(HINSTANCE hInst, LPCSTR lpClassName, LPCSTR lp
/* SDrawCaptureScreen @ 342
*
*
* Saves a screenshot from the primary surface being handled by Storm.
*
*
* pszOutput: The name of the output file. The save format is automatically set by the extension.
* The extensions supported are .gif, .pcx, .tga, and .bmp. It will write a bitmap by default.
*
* Returns TRUE if successful and FALSE otherwise.
*/
BOOL
STORMAPI
BOOL
STORMAPI
SDrawCaptureScreen(
const char *pszOutput);
@ -652,7 +655,7 @@ SDrawCaptureScreen(
*
* Retrieves the window handle that was specified in
* SDrawManualInitialize or created in SDrawAutoInitialize.
*
*
* sdraw_framewindow: Optional variable that receives the returned handle.
*
* Returns the handle of the window.
@ -664,10 +667,10 @@ SDrawGetFrameWindow(
/* SDrawGetObjects @ 347
*
*
* Retrieves the object information that was initialized using
* SDrawManualInitialize or SDrawAutoInitialize.
*
*
* ddInterface: The DirectDraw interface.
* primarySurface: The primary DirectDraw surface.
* surface2: A second unknown surface.
@ -691,7 +694,7 @@ SDrawGetObjects(
/* SDrawGetScreenSize @ 348
*
*
* Obtains information for the current screen resolution.
*
* pdwWidth: Optional variable that receives the screen width.
@ -713,7 +716,7 @@ BOOL STORMAPI SDrawLockSurface(int surfacenumber, RECT *lpDestRect, void **lplpS
/* SDrawManualInitialize @ 351
*
*
* Sets the DirectDraw variables to be referenced in Storm.
*
* hWnd: The handle of the DirectDraw window.
@ -745,7 +748,7 @@ SDrawManualInitialize(
/* SDrawPostClose @ 353
*
* Posts a WM_QUIT message to the active drawing window specified
* Posts a WM_QUIT message to the active drawing window specified
* in SDrawManualInitialize or created in SDrawAutoInitialize.
*
* Returns TRUE if successful and FALSE otherwise.
@ -775,10 +778,10 @@ BOOL STORMAPI Ordinal393(char *pszString, int, int);
/* SMemAlloc @ 401
*
*
* Allocates a block of memory. This block is different
* from the standard malloc by including a header containing
* information about the block.
* information about the block.
*
* amount: The amount of memory to allocate, in bytes.
* logfilename: The name of the file or object that this call belongs to.
@ -800,14 +803,14 @@ SMemAlloc(
/* SMemFree @ 403
*
* Frees a block of memory that was created using SMemAlloc,
*
* Frees a block of memory that was created using SMemAlloc,
* includes the log file and line for debugging purposes.
*
* location: The memory location to be freed.
* logfilename: The name of the file or object that this call belongs to.
* logline: The line in the file or one of the SLOG_ macros.
* defaultValue:
* defaultValue:
*
* Returns TRUE if the call was successful and FALSE otherwise.
*/
@ -823,8 +826,8 @@ SMemFree(
/* SMemReAlloc @ 405
*
* Reallocates a block of memory that was created using SMemAlloc,
*
* Reallocates a block of memory that was created using SMemAlloc,
* includes the log file and line for debugging purposes.
*
* location: The memory location to be re-allocated. If this parameter
@ -832,7 +835,7 @@ SMemFree(
* amount: The amount of memory to re-allocate.
* logfilename: The name of the file or object that this call belongs to.
* logline: The line in the file or one of the SLOG_ macros.
* defaultValue:
* defaultValue:
*
* Returns a pointer to the re-allocated memory. This pointer does NOT include
* the additional storm header.
@ -930,7 +933,7 @@ SErrDisplayError(
#define SEDisplayError(err) SErrDisplayError(e, __FILE__, __LINE__)
/* SErrGetErrorStr @ 462
*
*
* Retrieves a string that describes the specified error code for
* the system, Storm, DirectDraw, or DirectSound.
*
@ -951,7 +954,7 @@ SErrGetErrorStr(
/* SErrGetLastError @ 463
*
*
* Retrieves the last error that was specifically
* set for the Storm library.
*
@ -968,7 +971,7 @@ SErrGetLastError();
/* SErrSetLastError @ 465
*
*
* Sets the last error for the Storm library and the Kernel32 library.
*
* dwErrCode: The error code that will be set.
@ -978,7 +981,7 @@ STORMAPI
SErrSetLastError(
DWORD dwErrCode = NO_ERROR);
//
//
// void STORMAPI SErrReportNamedResourceLeak(const char *pszMsg, const char *pszSubMsg = nullptr)
// void STORMAPI SErrReportResourceLeak(const char *pszMsg)
@ -1022,7 +1025,7 @@ void STORMAPI SErrSuppressErrors(BOOL suppressErrors);
/* SMemCopy @ 491
*
*
* Copies a block of memory from source to destination.
* This function immediately calls memcpy. See online documentation
* of memcpy for more details.
@ -1034,14 +1037,14 @@ void STORMAPI SErrSuppressErrors(BOOL suppressErrors);
void
STORMAPI
SMemCopy(
void *dest,
const void *source,
void *dest,
const void *source,
size_t size);
#define SMCopy(d,s) ( SMemCopy(d, s, __STORM_SSIZEMIN(s,d)) )
/* SMemFill @ 492
*
*
* Fills a block of memory with the specified character.
* This function immediately calls memset. See online documentation
* of memset for more details.
@ -1060,14 +1063,14 @@ SMemFill(
#define SMFill(l,f) (SMemFill(l, sizeof(l), f))
/* SMemZero @ 494
*
*
* Fills a block of memory with the integer 0x00 (Zero).
*
* location: The location to write at.
* length: The amount of bytes to write.
*/
void
STORMAPI
void
STORMAPI
SMemZero(
void *location,
size_t length);
@ -1080,7 +1083,7 @@ int STORMAPI SMemCmp(void *location1, void *location2, DWORD size);
#define SMCmp(l,x) ( SMemCmp(l, x, __STORM_SSIZEMIN(x,l)) )
/* SStrCopy @ 501
*
*
* Copies a string from src to dest (including NULL terminator)
* until the max_length is reached.
*
@ -1093,7 +1096,7 @@ int STORMAPI SMemCmp(void *location1, void *location2, DWORD size);
int
STORMAPI
SStrCopy(
char *dest,
char *dest,
const char *src,
int max_length = 0x7FFFFFFF);
@ -1102,7 +1105,7 @@ SStrCopy(
#define STORM_HASH_ABSOLUTE 1
/* SStrHash @ 502
*
*
* Creates a simple hash for the string. This function
* should NOT be used for sensitive information.
*
@ -1126,7 +1129,7 @@ SStrHash(
int STORMAPI SStrNCat(char *dest, const char *src, DWORD max_length);
/* SStrLen @ 506
*
*
* Retrieves the length of a string.
*
* string: The input string of which to obtain a
@ -1140,7 +1143,7 @@ SStrLen(
const char *string);
/* SStrCmp @ 508
*
*
* Compares two strings case sensitive.
*
* string1: The first string.
@ -1152,14 +1155,14 @@ SStrLen(
int
STORMAPI
SStrCmp(
const char *string1,
const char *string2,
const char *string1,
const char *string2,
size_t size);
#define SSCmp(s,x) ( SStrCmp(s,x,__STORM_SSIZEMIN(s,x)) )
/* SStrCmpI @ 509
*
*
* Compares two strings case insensitive.
*
* string1: The first string.
@ -1171,18 +1174,18 @@ SStrCmp(
int
STORMAPI
SStrCmpI(
const char *string1,
const char *string2,
const char *string1,
const char *string2,
size_t size);
#define SSCmpI(s,x) ( SStrCmpI(s,x,__STORM_SSIZEMIN(s,x)) )
/* SStrUpper @ 510
*
*
* Converts all lower-case alpha characters of a string to upper-case.
*
* string: The string to convert.
*
*
* Returns the same pointer given in the input.
*/
char*
@ -1225,7 +1228,7 @@ SErrDisplayErrorFmt(
//#define SEDisplayErrorFmt(err,...) SErrDisplayErrorFmt(err, __FILE__, __LINE__, FALSE, 1, __VA_ARGS__)
/* SErrCatchUnhandledExceptions @ 567
*
*
* Registers a top-level exception filter managed entirely by Storm.
* The registered filter will display formatted exception information by calling SErrDisplayError.
*/
@ -1235,19 +1238,19 @@ SErrCatchUnhandledExceptions();
/* SStrChr @ 571
*
* Searches a string for the given character. See
*
* Searches a string for the given character. See
* strchr documentation for more details.
*
* string: The string to search.
* c: The character to search for.
*
*
* Returns a pointer to the first occurance of the character.
*/
char*
STORMAPI
SStrChr(
const char *string,
const char *string,
char c);
@ -1255,7 +1258,7 @@ char *STORMAPI SStrChrR(const char *string, char c);
/* SStrVPrintf @ 578
*
*
* Prints a formatted string to a destination buffer.
* This function calls vsnprintf with some extra error handling.
* See online documentation of vsnprintf for more details.
@ -1268,8 +1271,8 @@ char *STORMAPI SStrChrR(const char *string, char c);
*/
size_t
SStrVPrintf(
char *dest,
size_t size,
char *dest,
size_t size,
const char *format, ...);
@ -1296,4 +1299,9 @@ bool __stdcall SNetSetBasePlayer(int);
int __stdcall SNetInitializeProvider(unsigned long,struct _SNETPROGRAMDATA *,struct _SNETPLAYERDATA *,struct _SNETUIDATA *,struct _SNETVERSIONDATA *);
int __stdcall SNetGetProviderCaps(struct _SNETCAPS *);
int __stdcall SFileSetFilePointer(HANDLE,int,HANDLE,int);
#ifdef __GNUC__
}
#endif
#endif

494
3rdParty/Storm/Source/storm_gcc.def vendored Normal file
View File

@ -0,0 +1,494 @@
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
;SNetSendDatagram @135 NONAME
;SNetReceiveDatagram @136 NONAME
SNetDisconnectAll @137 NONAME
SNetCreateLadderGame @138 NONAME
SNetReportGameResult @139 NONAME
;SNetCheckDataFile @140 NONAME
SNetSendLeagueCommand @141 NONAME
SNetSendReplayPath @142 NONAME
SNetGetLeagueName @143 NONAME
SNetGetPlayerNames @144 NONAME
SNetLeagueLogout @145 NONAME
SNetGetLeaguePlayerName @146 NONAME
;Ordinal150 @150 NONAME
;Ordinal151 @151 NONAME
;SDlgBeginPaint @201 NONAME
;SDlgBltToWindowI @202 NONAME
;SDlgCheckTimers @203 NONAME
;SDlgCreateDialogIndirectParam @204 NONAME
;SDlgCreateDialogParam @205 NONAME
SDlgDefDialogProc @206 NONAME
SDlgDialogBoxIndirectParam @208 NONAME
;SDlgDialogBoxParam @209 NONAME
;SDlgDrawBitmap @210 NONAME
SDlgEndDialog @211 NONAME
;SDlgEndPaint @212 NONAME
;SDlgKillTimer @213 NONAME
;SDlgSetBaseFont @214 NONAME
;SDlgSetBitmapI @215 NONAME
SDlgSetControlBitmaps @216 NONAME
;SDlgSetCursor @217 NONAME
;SDlgSetSystemCursor @218 NONAME
;SDlgSetTimer @219 NONAME
;SDlgUpdateCursor @220 NONAME
SDlgBltToWindowE @221 NONAME
SDlgSetBitmapE @222 NONAME
;SDlgSetLocale @223 NONAME
Ordinal224 @224 NONAME
;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
SFileGetArchiveName @275 NONAME
SFileGetFileName @276 NONAME
;SFileGetArchiveInfo @277 NONAME
;SFileSetPlatform @278 NONAME
SFileLoadFile @279 NONAME
SFileUnloadFile @280 NONAME
SFileLoadFileEx @281 NONAME
;SFilePrioritizeRequest @282 NONAME
;SFileCancelRequest @283 NONAME
;SFileSetAsyncBudget @284 NONAME
;SFileSetDataChunkSize @285 NONAME
;SFileEnableSeekOptimization @286 NONAME
;SFileReadFileEx @287 NONAME
;SFileFileExists @288 NONAME
;SFileFileExistsEx @289 NONAME
;SFileReadFileEx2 @290 NONAME
;SFileReadFile2 @291 NONAME
;SFileLoadFile2 @292 NONAME
;SFileOpenFileAsArchive @293 NONAME
;SFileGetLocale @294 NONAME
;SFileRegisterLoadNotifyProc @295 NONAME
;SFileGetFileCompressedSize @296 NONAME
;Ordinal297 @297 NONAME
;Ordinal298 @298 NONAME
;SFileAuthenticateArchiveEx @299 NONAME
;SFileOpenPathAsArchive @300 NONAME
StormDestroy @301 NONAME
;StormGetInstance @302 NONAME
;StormGetOption @303 NONAME
;StormSetOption @304 NONAME
;SBltGetSCode @312 NONAME
SBltROP3 @313 NONAME
SBltROP3Clipped @314 NONAME
;SBltROP3Tiled @315 NONAME
SBmpDecodeImage @321 NONAME
SBmpLoadImage @323 NONAME
SBmpSaveImage @324 NONAME
SBmpAllocLoadImage @325 NONAME
;SBmpSaveImageEx @326 NONAME
SCodeCompile @331 NONAME
SCodeDelete @332 NONAME
SCodeExecute @334 NONAME
;SCodeGetPseudocode @335 NONAME
SDrawAutoInitialize @341 NONAME
SDrawCaptureScreen @342 NONAME
;SDrawClearSurface @343 NONAME
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
SEvtDispatch @372 NONAME
;SEvtRegisterHandler @373 NONAME
;SEvtUnregisterHandler @374 NONAME
;SEvtUnregisterType @375 NONAME
;SEvtPopState @376 NONAME
;SEvtPushState @377 NONAME
;SEvtBreakHandlerChain @378 NONAME
;SGdiBitBlt @381 NONAME
;SGdiCreateFont @382 NONAME
SGdiDeleteObject @383 NONAME
;SGdiDestroy @384 NONAME
SGdiExtTextOut @385 NONAME
SGdiImportFont @386 NONAME
;SGdiLoadFont @387 NONAME
;SGdiRectangle @388 NONAME
SGdiSelectObject @389 NONAME
SGdiSetPitch @390 NONAME
;SGdiTextOut @391 NONAME
;SGdi392 @392 NONAME
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
;SMsgDispatchMessage @412 NONAME
;SMsgDoMessageLoop @413 NONAME
;SMsgRegisterCommand @414 NONAME
;SMsgRegisterKeyDown @415 NONAME
;SMsgRegisterKeyUp @416 NONAME
;SMsgRegisterMessage @417 NONAME
;SMsgPopRegisterState @418 NONAME
;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
;SReg430 @430 NONAME
STransBlt @431 NONAME
STransBltUsingMask @432 NONAME
;STransCreateI @433 NONAME
STransDelete @434 NONAME
STransDuplicate @436 NONAME
STransIntersectDirtyArray @437 NONAME
STransInvertMask @438 NONAME
;STransLoadI @439 NONAME
STransSetDirtyArrayInfo @440 NONAME
;STransUpdateDirtyArray @441 NONAME
STransPointInMask @442 NONAME
STransCombineMasks @443 NONAME
;STransCreateI @444 NONAME
STransCreateE @445 NONAME
;STrans446 @446 NONAME
;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
;SErrRegisterHandler @469 NONAME
;SErrUnregisterHandler @470 NONAME
;Storm471 @471 NONAME
;SCmdGetBool @472 NONAME
;SCmdGetNum @473 NONAME
;SCmdGetString @474 NONAME
;SCmdProcess @475 NONAME
;SCmdRegisterArgList @476 NONAME
;SCmdRegisterArgument @477 NONAME
;SCmdStringExists @478 NONAME
;SCmdProcessCommandLine @479 NONAME
;Ordinal480 @480 NONAME
;SMemFindNextBlock @481 NONAME
;SMemFindNextHeap @482 NONAME
;SMemGetHeapByCaller @483 NONAME
;SMemGetHeapByPtr @484 NONAME
;SMemHeapAlloc @485 NONAME
;SMemHeapCreate @486 NONAME
;SMemHeapDestroy @487 NONAME
;SMemHeapFree @488 NONAME
;SMemHeapRealloc @489 NONAME
;SMemHeapSize @490 NONAME
SMemCopy @491 NONAME
SMemFill @492 NONAME
;SMemMove @493 NONAME
SMemZero @494 NONAME
SMemCmp @495 NONAME
;SMem496 @496 NONAME
;SMemDumpState @497 NONAME
;Ordinal498 @498 NONAME
SStrCopy @501 NONAME
SStrCopy@12 @501 NONAME
SStrHash @502 NONAME
SStrNCat @503 NONAME
;SStrTokenize @504 NONAME
;SStrPack @505 NONAME
SStrLen @506 NONAME
;SStrDup @507 NONAME
SStrCmp @508 NONAME
SStrCmpI @509 NONAME
SStrUpper @510 NONAME
;SMsgBreakHandlerChain @511 NONAME
;SMsgUnregisterCommand @512 NONAME
;SMsgUnregisterKeyDown @513 NONAME
;SMsgUnregisterKeyUp @514 NONAME
;SMsgUnregisterMessage @515 NONAME
;SMsgGetDispatcher @516 NONAME
;SMsgSetDefaultWindow @517 NONAME
;SMsgGetDefaultWindow @518 NONAME
;SMsg519 @519 NONAME
;SRgn521 @521 NONAME
SRgn523 @523 NONAME
SRgnCreateRegion @524 NONAME
SRgnDeleteRegion @525 NONAME
;SRgn527 @527 NONAME
;SRgn528i @528 NONAME
SRgn529i @529 NONAME
;SRgn530i @530 NONAME
;SRgn531i @531 NONAME
;SRgn532i @532 NONAME
;SRgn533i @533 NONAME
;SRgn534 @534 NONAME
;SRgn535f @535 NONAME
;SRgn536f @536 NONAME
;SRgn537f @537 NONAME
;SRgn538f @538 NONAME
;SRgn539f @539 NONAME
;SRgn540f @540 NONAME
;SLogClose @541 NONAME
;SLogCreate @542 NONAME
;SLog543 @543 NONAME
;SLogDump @544 NONAME
;SLogFlush @545 NONAME
;SLogFlushAll @546 NONAME
;SLogPend @547 NONAME
;SLogWrite @548 NONAME
;SLog549 @549 NONAME
;SLogCriticalLog @550 NONAME
;SCompCompress @551 NONAME
;SCompDecompress @552 NONAME
;SLogVWrite @553 NONAME
;Ordinal554 @554 NONAME
;Ordinal555 @555 NONAME
;Ordinal556 @556 NONAME
;Ordinal557 @557 NONAME
;Ordinal558 @558 NONAME
;Ordinal559 @559 NONAME
;Ordinal560 @560 NONAME
;SErrCheckDebugSymbolLibrary @561 NONAME
SErrDisplayErrorFmt @562 NONAME
;SErrIsDisplayingError @563 NONAME
;SErrPrepareAppFatal @564 NONAME
;SErrSetLogTitleString @565 NONAME
;SErrDisplayAppFatal @566 NONAME
SErrCatchUnhandledExceptions @567 NONAME
;Storm568 @568 NONAME
;SStrChr @569 NONAME
;SStrChrR @570 NONAME
SStrChr @571 NONAME
SStrChrR @572 NONAME
;SStrToDouble @573 NONAME
;SStrToFloat @574 NONAME
;SStrToInt @575 NONAME
;SStrToUnsigned @576 NONAME
;SStrToInt64 @577 NONAME
SStrVPrintf @578 NONAME
;SStrLower @579 NONAME
;SStrHash64 @580 NONAME
;SStrPrintf @581 NONAME
;SDrawSetClientRect @582 NONAME
;SDrawGetClientRect @583 NONAME
;SStrStrI @584 NONAME
;SStrStrI @585 NONAME
;SStrStr @586 NONAME
;SStrStr @587 NONAME
;SNet588 @588 NONAME
;SBigAdd @601 NONAME
;SBigAnd @602 NONAME
;SBigCompare @603 NONAME
;SBigCopy @604 NONAME
;SBigDec @605 NONAME
SBigDel @606 NONAME
;SBigDiv @607 NONAME
;SBigFindPrime @608 NONAME
SBigFromBinary @609 NONAME
;SBigFromStr @610 NONAME
;SBigFromStream @611 NONAME
;SBigFromUnsigned @612 NONAME
;SBigGcd @613 NONAME
;SBigInc @614 NONAME
;SBigInvMod @615 NONAME
;SBigIsEven @616 NONAME
;SBigIsOdd @617 NONAME
;SBigIsOne @618 NONAME
;SBigIsPrime @619 NONAME
;SBigIsZero @620 NONAME
;SBigMod @621 NONAME
;SBigMul @622 NONAME
;SBigMulMod @623 NONAME
SBigNew @624 NONAME
;SBigNot @625 NONAME
;SBigOr @626 NONAME
;SBigPow @627 NONAME
SBigPowMod @628 NONAME
;SBigRand @629 NONAME
;SBigSet2Exp @630 NONAME
;SBigSetOne @631 NONAME
;SBigSetZero @632 NONAME
;SBigShl @633 NONAME
;SBigShr @634 NONAME
;SBigSquare @635 NONAME
;SBigSub @636 NONAME
;SBigToBinaryArray @637 NONAME
SBigToBinaryBuffer @638 NONAME
;SBigToBinaryPtr @639 NONAME
;SBigToStrArray @640 NONAME
;SBigToStrBuffer @641 NONAME
;SBigToStrPtr @642 NONAME
;SBigToStreamArray @643 NONAME
;SBigToStreamBuffer @644 NONAME
;SBigToStreamPtr @645 NONAME
;SBigToUnsigned @646 NONAME
;SBigXor @647 NONAME
;SUniConvertUTF16to8Len @901 NONAME
;SUniConvertUTF16to8 @902 NONAME
;SUniConvertUTF8to16Len @903 NONAME
;SUniConvertUTF8to16 @904 NONAME
;SUniS905 @905 NONAME
;SUniS906 @906 NONAME
;SUniFindAfterUTF8Chr @907 NONAME
;SUniFindUTF8ChrStart @908 NONAME
;SUniConvertUTF16To909 @909 NONAME
;SUniConvertUTF16To910 @910 NONAME
;SUniConvertUTF16To911 @911 NONAME
;SUniConvert912 @912 NONAME
;SUniConvert913 @913 NONAME
;SUniConvert914 @914 NONAME
;SUniConvertUTF8ToWin @915 NONAME
; END

View File

@ -9,6 +9,10 @@
*/
#ifdef __GNUC__
extern "C" {
#endif
void __cdecl UiDestroy(); // { return; }
void __stdcall UiTitleDialog(int a1); // { return; }
void __cdecl UiInitialize(); // { return; }
@ -35,3 +39,7 @@ int __stdcall UiSelectGame(int a1, _SNETPROGRAMDATA *client_info, _SNETPLAYERDAT
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; }
#ifdef __GNUC__
}
#endif

48
DiabloUI/diabloui_gcc.def Normal file
View File

@ -0,0 +1,48 @@
LIBRARY "DiabloUI"
EXPORTS
UiValidPlayerName @1 NONAME
UiValidPlayerName@4 @1 NONAME
UiAppActivate @2 NONAME
UiAppActivate@4 @2 NONAME
UiArtCallback @3 NONAME
UiAuthCallback @4 NONAME
UiBetaDisclaimer @5 NONAME
UiCategoryCallback @6 NONAME
UiCopyProtError @7 NONAME
UiCreateGameCallback @8 NONAME
UiCreateGameCriteria @9 NONAME
UiCreatePlayerDescription @10 NONAME
UiCreatePlayerDescription@12 @10 NONAME
UiCreditsDialog @11 NONAME
UiCreditsDialog@4 @11 NONAME
UiDestroy @12 NONAME
UiDrawDescCallback @13 NONAME
UiGetDataCallback @14 NONAME
UiGetDefaultStats @15 NONAME
UiInitialize @16 NONAME
UiMainMenuDialog @17 NONAME
UiMainMenuDialog@16 @17 NONAME
UiMessageBoxCallback @18 NONAME
UiOnPaint @19 NONAME
UiProfileCallback @20 NONAME
UiProfileDraw @21 NONAME
UiProfileGetString @22 NONAME
UiProgressDialog @23 NONAME
UiProgressDialog@20 @23 NONAME
UiSelHeroMultDialog @24 NONAME
UiSelHeroMultDialog@28 @24 NONAME
UiSelHeroSingDialog @25 NONAME
UiSelHeroSingDialog@28 @25 NONAME
UiSelectGame @26 NONAME
UiSelectGame@24 @26 NONAME
UiSelectProvider @27 NONAME
UiSelectProvider@24 @27 NONAME
UiSelectRegion @28 NONAME
UiSetBackgroundBitmap @29 NONAME
UiSetSpawned @30 NONAME
UiSetupPlayerInfo @31 NONAME
UiSetupPlayerInfo@12 @31 NONAME
UiSoundCallback @32 NONAME
UiTitleDialog @33 NONAME
UiTitleDialog@4 @33 NONAME

32
Makefile Normal file
View File

@ -0,0 +1,32 @@
DIABLO_SRC=$(wildcard Source/*.cpp)
DIABLO_OBJ=$(DIABLO_SRC:.cpp=.o)
PKWARE_SRC=$(wildcard 3rdParty/PKWare/*.cpp)
PKWARE_OBJ=$(PKWARE_SRC:.cpp=.o)
all: devilution.exe
devilution.exe: $(DIABLO_OBJ) $(PKWARE_OBJ) diabloui.lib storm.lib
i686-w64-mingw32-gcc -L./ -o $@ $^ -lgdi32 -lversion -ldiabloui -lstorm
%.o: %.cpp
i686-w64-mingw32-gcc -c -fpermissive -o $@ $<
diabloui.lib: diabloui.dll DiabloUI/diabloui_gcc.def
i686-w64-mingw32-dlltool -d DiabloUI/diabloui_gcc.def -D diabloui.dll -l diabloui.lib
diabloui.dll:
echo "Please copy diabloui.dll (version 1.09b) here."
exit 1
storm.lib: storm.dll 3rdParty/Storm/Source/storm_gcc.def
i686-w64-mingw32-dlltool -d 3rdParty/Storm/Source/storm_gcc.def -D storm.dll -l storm.lib
storm.dll:
echo "Please copy storm.dll (version 1.09b) here."
exit 1
clean:
rm -f $(DIABLO_OBJ) $(PKWARE_OBJ)
.PHONY: clean all

View File

@ -485,7 +485,7 @@ LABEL_10:
}
v20 = &spelldata[1].sTownSpell;
v4 = 1;
v26 = 1i64;
v26 = (__int64)1;
v23 = 1;
v22 = xp - 216;
do
@ -621,7 +621,7 @@ LABEL_66:
LABEL_68:
v20 += 56;
++v4;
v26 *= 2i64;
v26 *= (__int64)2;
v23 = v4;
}
while ( (signed int)v20 < (signed int)&spelldata[37].sTownSpell );
@ -753,7 +753,7 @@ void __fastcall ToggleSpell(int slot)
v8 = plr[v3]._pAblSpells[0];
v9 = plr[v3]._pAblSpells[1];
}
if ( v9 & ((unsigned __int64)(1i64 << ((unsigned char)v2 - 1)) >> 32) | v8 & (unsigned int)(1i64 << ((unsigned char)v2 - 1)) )
if ( v9 & ((unsigned __int64)((__int64)1 << ((unsigned char)v2 - 1)) >> 32) | v8 & (unsigned int)((__int64)1 << ((unsigned char)v2 - 1)) )
{
drawpanflag = 255;
plr[v3]._pRSpell = v12;
@ -2754,7 +2754,7 @@ int __fastcall GetSBookTrans(int ii, unsigned char townok)
v7 = townok;
v6 = 1;
v3 = myplr;
if ( ((unsigned __int64)(1i64 << ((unsigned char)ii - 1)) >> 32) & plr[v3]._pISpells[1] | (unsigned int)(1i64 << ((unsigned char)ii - 1)) & plr[v3]._pISpells[0] )
if ( ((unsigned __int64)((__int64)1 << ((unsigned char)ii - 1)) >> 32) & plr[v3]._pISpells[1] | (unsigned int)((__int64)1 << ((unsigned char)ii - 1)) & plr[v3]._pISpells[0] )
v6 = 3;
result = plr[v3]._pAblSpells[1] & (1 << (ii - 1) >> 31) | plr[v3]._pAblSpells[0] & (1 << (ii - 1));
if ( result )
@ -2800,7 +2800,7 @@ void __cdecl DrawSpellBook()
{
v2 = *(&attribute_inc_rects[3].h + v9 + 7 * sbooktab);
if ( v2 != -1
&& v1 & ((unsigned __int64)(1i64 << ((unsigned char)v2 - 1)) >> 32) | v0 & (unsigned int)(1i64 << ((unsigned char)v2 - 1)) )
&& v1 & ((unsigned __int64)((__int64)1 << ((unsigned char)v2 - 1)) >> 32) | v0 & (unsigned int)((__int64)1 << ((unsigned char)v2 - 1)) )
{
v7 = GetSBookTrans(v2, 1u);
SetSpellTrans(v7);
@ -2929,7 +2929,7 @@ void __cdecl CheckSBook()
v3 = myplr;
LODWORD(v6) = plr[myplr]._pAblSpells[0];
HIDWORD(v6) = plr[myplr]._pAblSpells[1];
v4 = 1i64 << ((unsigned char)v2 - 1);
v4 = (__int64)1 << ((unsigned char)v2 - 1);
if ( HIDWORD(v4) & (HIDWORD(v6) | plr[myplr]._pISpells[1] | plr[myplr]._pMemSpells[1]) | (unsigned int)v4 & ((unsigned int)v6 | plr[myplr]._pISpells[0] | plr[myplr]._pMemSpells[0]) )
{
v5 = 3;

View File

@ -121,7 +121,7 @@ void __cdecl MaxSpellsCheat()
{
if ( spelldata[i].sBookLvl != -1 )
{
*(_QWORD *)plr[myplr]._pMemSpells |= 1i64 << (i - 1);
*(_QWORD *)plr[myplr]._pMemSpells |= (__int64)1 << (i - 1);
plr[myplr]._pSplLvl[i] = 10;
}
}

View File

@ -543,7 +543,7 @@ LRESULT __stdcall init_redraw_window(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM
}
//----- (0041B184) --------------------------------------------------------
LRESULT (__stdcall *__fastcall SetWindowProc(void *func))(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
LRESULT (__stdcall *SetWindowProc(void *func))(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
LRESULT (__stdcall *result)(HWND, UINT, WPARAM, LPARAM); // eax

View File

@ -40,7 +40,7 @@ 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);
LRESULT (__stdcall *__fastcall SetWindowProc(void *func))(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
LRESULT (__stdcall *SetWindowProc(void *func))(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
/* data */
extern int init_inf; // weak
@ -48,4 +48,4 @@ extern int init_inf; // weak
/* rdata */
extern char gszVersionNumber[260];
extern char gszProductName[260];
extern char gszProductName[260];

View File

@ -851,7 +851,7 @@ void __fastcall CalcPlrItemVals(int p, bool Loadgfx)
v60 = 0;
v52 = 0;
v61 = 0;
v37 = 0i64;
v37 = (__int64)0;
v49 = 0;
v48 = 0;
v47 = 0;
@ -878,7 +878,7 @@ void __fastcall CalcPlrItemVals(int p, bool Loadgfx)
v40 = v3;
v41 = v2;
if ( v7 )
v37 |= 1i64 << ((unsigned char)v7 - 1);
v37 |= (__int64)1 << ((unsigned char)v7 - 1);
if ( !*((_BYTE *)v6 - 296) || *(v6 - 75) )
{
v57 += *(v6 - 28);
@ -979,7 +979,7 @@ void __fastcall CalcPlrItemVals(int p, bool Loadgfx)
plr[v5]._pISpells[0] = v37;
plr[v5]._pISpells[1] = HIDWORD(v37);
plr[v5]._pDamageMod = v15 / v16;
if ( v17 && !(v37 & (1i64 << (_LOBYTE(plr[v5]._pRSpell) - 1))) )
if ( v17 && !(v37 & ((__int64)1 << (_LOBYTE(plr[v5]._pRSpell) - 1))) )
{
plr[v5]._pRSpell = -1;
_LOBYTE(plr[v5]._pRSplType) = 4;
@ -1143,7 +1143,7 @@ void __fastcall CalcPlrScrolls(int p)
{
if ( *(v3 - 53) != -1 && (*v3 == IMISC_SCROLL || *v3 == IMISC_SCROLLT) && v3[34] )
{
v5 = 1i64 << (*((_BYTE *)v3 + 4) - 1);
v5 = (__int64)1 << (*((_BYTE *)v3 + 4) - 1);
plr[v1]._pScrlSpells[0] |= v5;
plr[v1]._pScrlSpells[1] |= HIDWORD(v5);
}
@ -1158,7 +1158,7 @@ void __fastcall CalcPlrScrolls(int p)
{
if ( *(v6 - 53) != -1 && (*v6 == IMISC_SCROLL || *v6 == IMISC_SCROLLT) && v6[34] )
{
v8 = 1i64 << (*((_BYTE *)v6 + 4) - 1);
v8 = (__int64)1 << (*((_BYTE *)v6 + 4) - 1);
plr[v1]._pScrlSpells[0] |= v8;
plr[v1]._pScrlSpells[1] |= HIDWORD(v8);
}
@ -1192,7 +1192,7 @@ void __fastcall CalcPlrStaff(int pnum)
plr[v1]._pISpells[1] = 0;
if ( !v2 && plr[v1].InvBody[4]._iStatFlag && plr[v1].InvBody[4]._iCharges > 0 )
{
v3 = 1i64 << (_LOBYTE(plr[v1].InvBody[4]._iSpell) - 1);
v3 = (__int64)1 << (_LOBYTE(plr[v1].InvBody[4]._iSpell) - 1);
plr[v1]._pISpells[0] = v3;
plr[v1]._pISpells[1] = HIDWORD(v3);
}
@ -4668,7 +4668,7 @@ LABEL_71:
if ( v24 != 2 )
return;
v25 = p;
*(_QWORD *)plr[p]._pMemSpells |= 1i64 << ((unsigned char)spl - 1);
*(_QWORD *)plr[p]._pMemSpells |= (__int64)1 << ((unsigned char)spl - 1);
v26 = &plr[p]._pSplLvl[spl];
if ( *v26 < 15 )
++*v26;

View File

@ -912,40 +912,40 @@ int __fastcall GetDirection8(int x1, int y1, int x2, int y2)
v9 = y1;
v4 = x1;
strcpy((char *)Dirs, "c");
*(_QWORD *)&Dirs[0][2] = 0i64;
*(_QWORD *)&Dirs[0][2] = (__int64)0;
*(_DWORD *)&Dirs[0][10] = 0;
*(_WORD *)&Dirs[0][14] = 0;
*(_QWORD *)&Dirs[1][0] = 0x1010102i64;
*(_QWORD *)&Dirs[1][8] = 0i64;
*(_QWORD *)&Dirs[2][0] = 0x1010101010102i64;
*(_QWORD *)&Dirs[2][8] = 0i64;
*(_QWORD *)&Dirs[3][0] = 0x101010101010102i64;
*(_QWORD *)&Dirs[3][8] = 1i64;
*(_QWORD *)&Dirs[4][0] = 0x101010101010202i64;
*(_QWORD *)&Dirs[4][8] = 0x1010101i64;
*(_QWORD *)&Dirs[5][0] = 0x101010101010202i64;
*(_QWORD *)&Dirs[5][8] = 0x10101010101i64;
*(_QWORD *)&Dirs[6][0] = 0x101010101010202i64;
*(_QWORD *)&Dirs[6][8] = 0x101010101010101i64;
*(_QWORD *)&Dirs[7][0] = 0x101010101020202i64;
*(_QWORD *)&Dirs[7][8] = 0x101010101010101i64;
*(_QWORD *)&Dirs[8][0] = 0x101010101020202i64;
*(_QWORD *)&Dirs[8][8] = 0x101010101010101i64;
*(_QWORD *)&Dirs[9][0] = 0x101010102020202i64;
*(_QWORD *)&Dirs[9][8] = 0x101010101010101i64;
*(_QWORD *)&Dirs[10][0] = 0x101010102020202i64;
*(_QWORD *)&Dirs[10][8] = 0x101010101010101i64;
*(_QWORD *)&Dirs[11][0] = 0x101010102020202i64;
*(_QWORD *)&Dirs[11][8] = 0x101010101010101i64;
*(_QWORD *)&Dirs[12][0] = 0x101010202020202i64;
*(_QWORD *)&Dirs[12][8] = 0x101010101010101i64;
*(_QWORD *)&Dirs[13][0] = 0x101010202020202i64;
*(_QWORD *)&Dirs[13][8] = 0x101010101010101i64;
*(_QWORD *)&Dirs[14][0] = 0x101020202020202i64;
*(_QWORD *)&Dirs[14][8] = 0x101010101010101i64;
*(_QWORD *)&Dirs[1][0] = (__int64)0x1010102;
*(_QWORD *)&Dirs[1][8] = (__int64)0;
*(_QWORD *)&Dirs[2][0] = (__int64)0x1010101010102;
*(_QWORD *)&Dirs[2][8] = (__int64)0;
*(_QWORD *)&Dirs[3][0] = (__int64)0x101010101010102;
*(_QWORD *)&Dirs[3][8] = (__int64)1;
*(_QWORD *)&Dirs[4][0] = (__int64)0x101010101010202;
*(_QWORD *)&Dirs[4][8] = (__int64)0x1010101;
*(_QWORD *)&Dirs[5][0] = (__int64)0x101010101010202;
*(_QWORD *)&Dirs[5][8] = (__int64)0x10101010101;
*(_QWORD *)&Dirs[6][0] = (__int64)0x101010101010202;
*(_QWORD *)&Dirs[6][8] = (__int64)0x101010101010101;
*(_QWORD *)&Dirs[7][0] = (__int64)0x101010101020202;
*(_QWORD *)&Dirs[7][8] = (__int64)0x101010101010101;
*(_QWORD *)&Dirs[8][0] = (__int64)0x101010101020202;
*(_QWORD *)&Dirs[8][8] = (__int64)0x101010101010101;
*(_QWORD *)&Dirs[9][0] = (__int64)0x101010102020202;
*(_QWORD *)&Dirs[9][8] = (__int64)0x101010101010101;
*(_QWORD *)&Dirs[10][0] = (__int64)0x101010102020202;
*(_QWORD *)&Dirs[10][8] = (__int64)0x101010101010101;
*(_QWORD *)&Dirs[11][0] = (__int64)0x101010102020202;
*(_QWORD *)&Dirs[11][8] = (__int64)0x101010101010101;
*(_QWORD *)&Dirs[12][0] = (__int64)0x101010202020202;
*(_QWORD *)&Dirs[12][8] = (__int64)0x101010101010101;
*(_QWORD *)&Dirs[13][0] = (__int64)0x101010202020202;
*(_QWORD *)&Dirs[13][8] = (__int64)0x101010101010101;
*(_QWORD *)&Dirs[14][0] = (__int64)0x101020202020202;
*(_QWORD *)&Dirs[14][8] = (__int64)0x101010101010101;
lltour[1] = 0;
*(_QWORD *)&Dirs[15][0] = 0x101020202020202i64;
*(_QWORD *)&Dirs[15][8] = 0x101010101010101i64;
*(_QWORD *)&Dirs[15][0] = (__int64)0x101020202020202;
*(_QWORD *)&Dirs[15][8] = (__int64)0x101010101010101;
lrtoul[0] = 3;
lrtoul[1] = 4;
lrtoul[2] = 5;
@ -1000,40 +1000,40 @@ int __fastcall GetDirection16(int x1, int y1, int x2, int y2)
v9 = y1;
v4 = x1;
strcpy((char *)Dirs, "c");
*(_QWORD *)&Dirs[0][2] = 0i64;
*(_QWORD *)&Dirs[0][2] = (__int64)0;
*(_DWORD *)&Dirs[0][10] = 0;
*(_WORD *)&Dirs[0][14] = 0;
*(_QWORD *)&Dirs[1][0] = 0x1010204i64;
*(_QWORD *)&Dirs[1][8] = 0i64;
*(_QWORD *)&Dirs[2][0] = 0x101010101020304i64;
*(_QWORD *)&Dirs[2][8] = 0i64;
*(_QWORD *)&Dirs[3][0] = 0x101010202030304i64;
*(_QWORD *)&Dirs[3][8] = 0x1010101i64;
*(_QWORD *)&Dirs[4][0] = 0x101010202030404i64;
*(_QWORD *)&Dirs[4][8] = 0x101010101010101i64;
*(_QWORD *)&Dirs[5][0] = 0x102020203030404i64;
*(_QWORD *)&Dirs[5][8] = 0x101010101010101i64;
*(_QWORD *)&Dirs[6][0] = 0x202020203030404i64;
*(_QWORD *)&Dirs[6][8] = 0x101010101010102i64;
*(_QWORD *)&Dirs[7][0] = 0x202030303030404i64;
*(_QWORD *)&Dirs[7][8] = 0x101010101010202i64;
*(_QWORD *)&Dirs[8][0] = 0x202030303040404i64;
*(_QWORD *)&Dirs[8][8] = 0x101010101020202i64;
*(_QWORD *)&Dirs[9][0] = 0x203030303040404i64;
*(_QWORD *)&Dirs[9][8] = 0x101010102020202i64;
*(_QWORD *)&Dirs[10][0] = 0x303030303040404i64;
*(_QWORD *)&Dirs[10][8] = 0x101020202020202i64;
*(_QWORD *)&Dirs[11][0] = 0x303030303040404i64;
*(_QWORD *)&Dirs[11][8] = 0x102020202020203i64;
*(_QWORD *)&Dirs[12][0] = 0x303030304040404i64;
*(_QWORD *)&Dirs[12][8] = 0x202020202020303i64;
*(_QWORD *)&Dirs[13][0] = 0x303030304040404i64;
*(_QWORD *)&Dirs[13][8] = 0x202020202020303i64;
*(_QWORD *)&Dirs[14][0] = 0x303030304040404i64;
*(_QWORD *)&Dirs[14][8] = 0x202020202030303i64;
*(_QWORD *)&Dirs[1][0] = (__int64)0x1010204;
*(_QWORD *)&Dirs[1][8] = (__int64)0;
*(_QWORD *)&Dirs[2][0] = (__int64)0x101010101020304;
*(_QWORD *)&Dirs[2][8] = (__int64)0;
*(_QWORD *)&Dirs[3][0] = (__int64)0x101010202030304;
*(_QWORD *)&Dirs[3][8] = (__int64)0x1010101;
*(_QWORD *)&Dirs[4][0] = (__int64)0x101010202030404;
*(_QWORD *)&Dirs[4][8] = (__int64)0x101010101010101;
*(_QWORD *)&Dirs[5][0] = (__int64)0x102020203030404;
*(_QWORD *)&Dirs[5][8] = (__int64)0x101010101010101;
*(_QWORD *)&Dirs[6][0] = (__int64)0x202020203030404;
*(_QWORD *)&Dirs[6][8] = (__int64)0x101010101010102;
*(_QWORD *)&Dirs[7][0] = (__int64)0x202030303030404;
*(_QWORD *)&Dirs[7][8] = (__int64)0x101010101010202;
*(_QWORD *)&Dirs[8][0] = (__int64)0x202030303040404;
*(_QWORD *)&Dirs[8][8] = (__int64)0x101010101020202;
*(_QWORD *)&Dirs[9][0] = (__int64)0x203030303040404;
*(_QWORD *)&Dirs[9][8] = (__int64)0x101010102020202;
*(_QWORD *)&Dirs[10][0] = (__int64)0x303030303040404;
*(_QWORD *)&Dirs[10][8] = (__int64)0x101020202020202;
*(_QWORD *)&Dirs[11][0] = (__int64)0x303030303040404;
*(_QWORD *)&Dirs[11][8] = (__int64)0x102020202020203;
*(_QWORD *)&Dirs[12][0] = (__int64)0x303030304040404;
*(_QWORD *)&Dirs[12][8] = (__int64)0x202020202020303;
*(_QWORD *)&Dirs[13][0] = (__int64)0x303030304040404;
*(_QWORD *)&Dirs[13][8] = (__int64)0x202020202020303;
*(_QWORD *)&Dirs[14][0] = (__int64)0x303030304040404;
*(_QWORD *)&Dirs[14][8] = (__int64)0x202020202030303;
lrtoul[2] = 0;
*(_QWORD *)&Dirs[15][0] = 0x303030304040404i64;
*(_QWORD *)&Dirs[15][8] = 0x202020203030303i64;
*(_QWORD *)&Dirs[15][0] = (__int64)0x303030304040404;
*(_QWORD *)&Dirs[15][8] = (__int64)0x202020203030303;
urtoll[0] = 6;
urtoll[1] = 7;
urtoll[2] = 8;

View File

@ -141,105 +141,105 @@ int ObjTypeConv[113] =
};
ObjDataStruct AllObjects[99] =
{
{ 1, OFILE_L1BRAZ, 1, 4, 1, 255, 255, 1, 1, 26, 64, 1, 1, 0, 0, 0, 0 },
{ 1, OFILE_L1DOORS, 1, 4, 1, 255, 255, 0, 1, 0, 64, 0, 0, 1, 0, 3, 1 },
{ 1, OFILE_L1DOORS, 1, 4, 1, 255, 255, 0, 2, 0, 64, 0, 0, 1, 0, 3, 1 },
{ 3, OFILE_SKULFIRE, 0, 0, 0, 3, 255, 1, 2, 11, 96, 1, 1, 0, 0, 0, 0 },
{ 1, OFILE_LEVER, 1, 4, 1, 255, 255, 0, 1, 1, 96, 1, 1, 1, 0, 1, 1 },
{ 1, OFILE_CHEST1, 1, 16, 0, 255, 255, 0, 1, 0, 96, 1, 1, 1, 0, 1, 1 },
{ 1, OFILE_CHEST2, 1, 16, 0, 255, 255, 0, 1, 0, 96, 1, 1, 1, 0, 1, 1 },
{ 1, OFILE_CHEST3, 1, 16, 0, 255, 255, 0, 1, 0, 96, 1, 1, 1, 0, 1, 1 },
{ 2, OFILE_L1BRAZ, 0, 0, 0, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 3, OFILE_CANDLE2, 0, 0, 0, 1, 255, 1, 2, 4, 96, 1, 1, 1, 0, 0, 0 },
{ 2, OFILE_L1BRAZ, 0, 0, 0, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 3, OFILE_BANNER, 0, 0, 0, 3, 255, 0, 2, 0, 96, 1, 1, 1, 0, 0, 0 },
{ 3, OFILE_BANNER, 0, 0, 0, 3, 255, 0, 1, 0, 96, 1, 1, 1, 0, 0, 0 },
{ 3, OFILE_BANNER, 0, 0, 0, 3, 255, 0, 3, 0, 96, 1, 1, 1, 0, 0, 0 },
{ 2, OFILE_SKULPILE, 1, 4, 0, 255, 255, 0, 0, 1, 96, 1, 1, 1, 0, 0, 0 },
{ 2, OFILE_L1BRAZ, 0, 0, 0, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 2, OFILE_L1BRAZ, 0, 0, 0, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 2, OFILE_L1BRAZ, 0, 0, 0, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 2, OFILE_L1BRAZ, 0, 0, 0, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 2, OFILE_L1BRAZ, 0, 0, 0, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 2, OFILE_CRUXSK1, 0, 0, 0, 255, 255, 0, 1, 15, 96, 1, 0, 1, 1, 3, 0 },
{ 2, OFILE_CRUXSK2, 0, 0, 0, 255, 255, 0, 1, 15, 96, 1, 0, 1, 1, 3, 0 },
{ 2, OFILE_CRUXSK3, 0, 0, 0, 255, 255, 0, 1, 15, 96, 1, 0, 1, 1, 3, 0 },
{ 1, OFILE_ROCKSTAN, 5, 5, 0, 255, 255, 0, 1, 0, 96, 1, 1, 1, 0, 0, 0 },
{ 2, OFILE_ANGEL, 0, 0, 0, 255, 255, 0, 1, 0, 96, 1, 0, 1, 0, 0, 0 },
{ 2, OFILE_BOOK2, 0, 0, 0, 255, 255, 0, 1, 0, 96, 1, 1, 1, 0, 3, 0 },
{ 2, OFILE_BURNCROS, 0, 0, 0, 255, 255, 1, 0, 10, 160, 1, 0, 0, 0, 0, 0 },
{ 2, OFILE_NUDE2, 0, 0, 0, 255, 255, 1, 3, 6, 128, 1, 0, 1, 0, 0, 0 },
{ 1, OFILE_SWITCH4, 16, 16, 0, 255, 255, 0, 1, 0, 96, 1, 1, 1, 0, 1, 1 },
{ 1, OFILE_TNUDEM, 13, 16, 0, 255, 6, 0, 1, 0, 128, 1, 0, 1, 0, 0, 0 },
{ 1, OFILE_L1BRAZ, 1, 4, 1, -1, -1, 1, 1, 26, 64, 1, 1, 0, 0, 0, 0 },
{ 1, OFILE_L1DOORS, 1, 4, 1, -1, -1, 0, 1, 0, 64, 0, 0, 1, 0, 3, 1 },
{ 1, OFILE_L1DOORS, 1, 4, 1, -1, -1, 0, 2, 0, 64, 0, 0, 1, 0, 3, 1 },
{ 3, OFILE_SKULFIRE, 0, 0, 0, 3, -1, 1, 2, 11, 96, 1, 1, 0, 0, 0, 0 },
{ 1, OFILE_LEVER, 1, 4, 1, -1, -1, 0, 1, 1, 96, 1, 1, 1, 0, 1, 1 },
{ 1, OFILE_CHEST1, 1, 16, 0, -1, -1, 0, 1, 0, 96, 1, 1, 1, 0, 1, 1 },
{ 1, OFILE_CHEST2, 1, 16, 0, -1, -1, 0, 1, 0, 96, 1, 1, 1, 0, 1, 1 },
{ 1, OFILE_CHEST3, 1, 16, 0, -1, -1, 0, 1, 0, 96, 1, 1, 1, 0, 1, 1 },
{ 2, OFILE_L1BRAZ, 0, 0, 0, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 3, OFILE_CANDLE2, 0, 0, 0, 1, -1, 1, 2, 4, 96, 1, 1, 1, 0, 0, 0 },
{ 2, OFILE_L1BRAZ, 0, 0, 0, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 3, OFILE_BANNER, 0, 0, 0, 3, -1, 0, 2, 0, 96, 1, 1, 1, 0, 0, 0 },
{ 3, OFILE_BANNER, 0, 0, 0, 3, -1, 0, 1, 0, 96, 1, 1, 1, 0, 0, 0 },
{ 3, OFILE_BANNER, 0, 0, 0, 3, -1, 0, 3, 0, 96, 1, 1, 1, 0, 0, 0 },
{ 2, OFILE_SKULPILE, 1, 4, 0, -1, -1, 0, 0, 1, 96, 1, 1, 1, 0, 0, 0 },
{ 2, OFILE_L1BRAZ, 0, 0, 0, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 2, OFILE_L1BRAZ, 0, 0, 0, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 2, OFILE_L1BRAZ, 0, 0, 0, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 2, OFILE_L1BRAZ, 0, 0, 0, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 2, OFILE_L1BRAZ, 0, 0, 0, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
{ 2, OFILE_CRUXSK1, 0, 0, 0, -1, -1, 0, 1, 15, 96, 1, 0, 1, 1, 3, 0 },
{ 2, OFILE_CRUXSK2, 0, 0, 0, -1, -1, 0, 1, 15, 96, 1, 0, 1, 1, 3, 0 },
{ 2, OFILE_CRUXSK3, 0, 0, 0, -1, -1, 0, 1, 15, 96, 1, 0, 1, 1, 3, 0 },
{ 1, OFILE_ROCKSTAN, 5, 5, 0, -1, -1, 0, 1, 0, 96, 1, 1, 1, 0, 0, 0 },
{ 2, OFILE_ANGEL, 0, 0, 0, -1, -1, 0, 1, 0, 96, 1, 0, 1, 0, 0, 0 },
{ 2, OFILE_BOOK2, 0, 0, 0, -1, -1, 0, 1, 0, 96, 1, 1, 1, 0, 3, 0 },
{ 2, OFILE_BURNCROS, 0, 0, 0, -1, -1, 1, 0, 10, 160, 1, 0, 0, 0, 0, 0 },
{ 2, OFILE_NUDE2, 0, 0, 0, -1, -1, 1, 3, 6, 128, 1, 0, 1, 0, 0, 0 },
{ 1, OFILE_SWITCH4, 16, 16, 0, -1, -1, 0, 1, 0, 96, 1, 1, 1, 0, 1, 1 },
{ 1, OFILE_TNUDEM, 13, 16, 0, -1, 6, 0, 1, 0, 128, 1, 0, 1, 0, 0, 0 },
{ 1, OFILE_TNUDEM, 13, 16, 0, 6, 6, 0, 2, 0, 128, 1, 0, 1, 0, 0, 0 },
{ 1, OFILE_TNUDEM, 13, 16, 0, 6, 6, 0, 3, 0, 128, 1, 0, 1, 0, 0, 0 },
{ 1, OFILE_TNUDEM, 13, 16, 0, 6, 6, 0, 4, 0, 128, 1, 0, 1, 0, 0, 0 },
{ 1, OFILE_TNUDEW, 13, 16, 0, 6, 6, 0, 1, 0, 128, 1, 0, 1, 0, 0, 0 },
{ 1, OFILE_TNUDEW, 13, 16, 0, 6, 6, 0, 2, 0, 128, 1, 0, 1, 0, 0, 0 },
{ 1, OFILE_TNUDEW, 13, 16, 0, 6, 6, 0, 3, 0, 128, 1, 0, 1, 0, 0, 0 },
{ 1, OFILE_TSOUL, 13, 16, 0, 255, 6, 0, 1, 0, 128, 1, 0, 1, 0, 0, 0 },
{ 1, OFILE_TSOUL, 13, 16, 0, 255, 6, 0, 2, 0, 128, 1, 0, 1, 0, 0, 0 },
{ 1, OFILE_TSOUL, 13, 16, 0, 255, 6, 0, 3, 0, 128, 1, 0, 1, 0, 0, 0 },
{ 1, OFILE_TSOUL, 13, 16, 0, 255, 6, 0, 4, 0, 128, 1, 0, 1, 0, 0, 0 },
{ 1, OFILE_TSOUL, 13, 16, 0, 255, 6, 0, 5, 0, 128, 1, 0, 1, 0, 0, 0 },
{ 1, OFILE_BOOK2, 6, 6, 0, 255, 255, 0, 4, 0, 96, 1, 1, 1, 0, 3, 0 },
{ 1, OFILE_L2DOORS, 5, 8, 2, 255, 255, 0, 1, 0, 64, 0, 0, 1, 0, 3, 1 },
{ 1, OFILE_L2DOORS, 5, 8, 2, 255, 255, 0, 2, 0, 64, 0, 0, 1, 0, 3, 1 },
{ 1, OFILE_WTORCH4, 5, 8, 2, 255, 255, 1, 1, 9, 96, 0, 1, 0, 0, 0, 0 },
{ 1, OFILE_WTORCH3, 5, 8, 2, 255, 255, 1, 1, 9, 96, 0, 1, 0, 0, 0, 0 },
{ 1, OFILE_WTORCH1, 5, 8, 2, 255, 255, 1, 1, 9, 96, 0, 1, 0, 0, 0, 0 },
{ 1, OFILE_WTORCH2, 5, 8, 2, 255, 255, 1, 1, 9, 96, 0, 1, 0, 0, 0, 0 },
{ 1, OFILE_SARC, 1, 4, 1, 255, 255, 0, 1, 5, 128, 1, 1, 1, 0, 3, 1 },
{ 2, OFILE_FLAME1, 1, 4, 1, 255, 255, 0, 1, 20, 96, 0, 1, 1, 0, 0, 0 },
{ 2, OFILE_LEVER, 1, 4, 1, 255, 255, 0, 1, 2, 96, 1, 1, 1, 0, 1, 1 },
{ 2, OFILE_MINIWATR, 1, 4, 1, 255, 255, 1, 1, 10, 64, 1, 0, 1, 0, 0, 0 },
{ 1, OFILE_BOOK1, 3, 4, 1, 255, 255, 0, 1, 0, 96, 1, 1, 1, 0, 3, 0 },
{ 1, OFILE_TRAPHOLE, 1, 16, 0, 255, 255, 0, 1, 0, 64, 0, 1, 1, 0, 0, 0 },
{ 1, OFILE_TRAPHOLE, 1, 16, 0, 255, 255, 0, 2, 0, 64, 0, 1, 1, 0, 0, 0 },
{ 2, OFILE_BCASE, 0, 0, 0, 255, 255, 0, 1, 0, 96, 1, 0, 1, 0, 0, 0 },
{ 2, OFILE_WEAPSTND, 0, 0, 0, 255, 255, 0, 1, 0, 96, 1, 0, 1, 0, 0, 0 },
{ 1, OFILE_BARREL, 1, 16, 0, 255, 255, 0, 1, 9, 96, 1, 1, 1, 1, 3, 0 },
{ 1, OFILE_BARRELEX, 1, 16, 0, 255, 255, 0, 1, 10, 96, 1, 1, 1, 1, 3, 0 },
{ 3, OFILE_LSHRINEG, 0, 0, 0, 1, 255, 0, 1, 11, 128, 0, 0, 1, 0, 3, 0 },
{ 3, OFILE_RSHRINEG, 0, 0, 0, 1, 255, 0, 1, 11, 128, 0, 0, 1, 0, 3, 0 },
{ 3, OFILE_BOOK2, 0, 0, 0, 3, 255, 0, 4, 0, 96, 1, 1, 1, 0, 3, 0 },
{ 3, OFILE_BCASE, 0, 0, 0, 5, 255, 0, 3, 0, 96, 0, 0, 1, 0, 3, 0 },
{ 3, OFILE_BCASE, 0, 0, 0, 5, 255, 0, 4, 0, 96, 0, 0, 1, 0, 3, 0 },
{ 3, OFILE_BOOK2, 0, 0, 0, 5, 255, 0, 1, 0, 96, 1, 1, 1, 0, 3, 0 },
{ 3, OFILE_CANDLE2, 0, 0, 0, 5, 255, 1, 2, 4, 96, 1, 1, 1, 0, 0, 0 },
{ 3, OFILE_BLOODFNT, 0, 0, 0, 7, 255, 1, 2, 10, 96, 1, 1, 1, 0, 3, 0 },
{ 1, OFILE_DECAP, 13, 16, 0, 8, 255, 0, 1, 0, 96, 1, 1, 1, 0, 1, 0 },
{ 1, OFILE_CHEST1, 1, 16, 0, 255, 255, 0, 1, 0, 96, 1, 1, 1, 0, 1, 1 },
{ 1, OFILE_CHEST2, 1, 16, 0, 255, 255, 0, 1, 0, 96, 1, 1, 1, 0, 1, 1 },
{ 1, OFILE_CHEST3, 1, 16, 0, 255, 255, 0, 1, 0, 96, 1, 1, 1, 0, 1, 1 },
{ 1, OFILE_BOOK1, 7, 7, 2, 255, 8, 0, 1, 0, 96, 1, 1, 1, 0, 3, 0 },
{ 1, OFILE_BOOK1, 5, 5, 2, 255, 9, 0, 4, 0, 96, 1, 1, 1, 0, 3, 0 },
{ 1, OFILE_PEDISTL, 5, 5, 2, 255, 9, 0, 1, 0, 96, 1, 1, 1, 0, 3, 0 },
{ 1, OFILE_L3DOORS, 9, 12, 3, 255, 255, 0, 1, 0, 64, 0, 0, 1, 0, 3, 1 },
{ 1, OFILE_L3DOORS, 9, 12, 3, 255, 255, 0, 2, 0, 64, 0, 0, 1, 0, 3, 1 },
{ 3, OFILE_PFOUNTN, 0, 0, 0, 9, 255, 1, 2, 10, 128, 1, 1, 1, 0, 3, 0 },
{ 3, OFILE_ARMSTAND, 0, 0, 0, 10, 255, 0, 1, 0, 96, 1, 0, 1, 0, 3, 0 },
{ 3, OFILE_ARMSTAND, 0, 0, 0, 10, 255, 0, 2, 0, 96, 1, 0, 1, 0, 0, 0 },
{ 3, OFILE_GOATSHRN, 0, 0, 0, 11, 255, 1, 2, 10, 96, 1, 1, 1, 0, 3, 0 },
{ 1, OFILE_CAULDREN, 13, 16, 0, 255, 255, 0, 1, 0, 96, 1, 0, 1, 0, 3, 0 },
{ 3, OFILE_MFOUNTN, 0, 0, 0, 13, 255, 1, 2, 10, 128, 1, 1, 1, 0, 3, 0 },
{ 3, OFILE_TFOUNTN, 0, 0, 0, 14, 255, 1, 2, 4, 128, 1, 1, 1, 0, 3, 0 },
{ 1, OFILE_ALTBOY, 0, 0, 1, 255, 15, 0, 1, 0, 128, 1, 1, 1, 0, 0, 0 },
{ 1, OFILE_MCIRL, 0, 0, 1, 255, 15, 0, 1, 0, 96, 0, 1, 1, 0, 0, 0 },
{ 1, OFILE_MCIRL, 0, 0, 1, 255, 15, 0, 1, 0, 96, 0, 1, 1, 0, 0, 0 },
{ 1, OFILE_BKSLBRNT, 4, 12, 0, 255, 255, 0, 1, 0, 96, 1, 1, 1, 0, 3, 0 },
{ 1, OFILE_CANDLE2, 2, 12, 0, 255, 15, 1, 2, 4, 96, 1, 1, 1, 0, 0, 0 },
{ 1, OFILE_BOOK1, 13, 13, 4, 255, 11, 0, 4, 0, 96, 1, 1, 1, 0, 3, 0 },
{ 1, OFILE_ARMSTAND, 13, 13, 0, 255, 11, 0, 1, 0, 96, 1, 0, 1, 0, 3, 0 },
{ 2, OFILE_WEAPSTND, 13, 13, 0, 255, 11, 0, 1, 0, 96, 1, 0, 1, 0, 3, 0 },
{ 2, OFILE_BURNCROS, 0, 0, 0, 15, 255, 1, 0, 10, 160, 1, 0, 0, 0, 0, 0 },
{ 2, OFILE_WEAPSTND, 0, 0, 0, 16, 255, 0, 1, 0, 96, 1, 0, 1, 0, 3, 0 },
{ 2, OFILE_WEAPSTND, 0, 0, 0, 16, 255, 0, 2, 0, 96, 1, 0, 1, 0, 0, 0 },
{ 2, OFILE_MUSHPTCH, 0, 0, 0, 255, 1, 0, 1, 0, 96, 1, 1, 1, 0, 3, 1 },
{ 2, OFILE_LZSTAND, 0, 0, 0, 255, 15, 0, 1, 0, 128, 1, 0, 1, 0, 3, 0 },
{ 1, OFILE_DECAP, 9, 9, 3, 255, 255, 0, 2, 0, 96, 1, 1, 1, 0, 1, 0 },
{ 2, OFILE_CHEST3, 0, 0, 0, 255, 255, 0, 1, 0, 96, 1, 1, 1, 0, 1, 1 },
{ -1, 0, 0, 0, 255, 255, 255, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
{ 1, OFILE_TSOUL, 13, 16, 0, -1, 6, 0, 1, 0, 128, 1, 0, 1, 0, 0, 0 },
{ 1, OFILE_TSOUL, 13, 16, 0, -1, 6, 0, 2, 0, 128, 1, 0, 1, 0, 0, 0 },
{ 1, OFILE_TSOUL, 13, 16, 0, -1, 6, 0, 3, 0, 128, 1, 0, 1, 0, 0, 0 },
{ 1, OFILE_TSOUL, 13, 16, 0, -1, 6, 0, 4, 0, 128, 1, 0, 1, 0, 0, 0 },
{ 1, OFILE_TSOUL, 13, 16, 0, -1, 6, 0, 5, 0, 128, 1, 0, 1, 0, 0, 0 },
{ 1, OFILE_BOOK2, 6, 6, 0, -1, -1, 0, 4, 0, 96, 1, 1, 1, 0, 3, 0 },
{ 1, OFILE_L2DOORS, 5, 8, 2, -1, -1, 0, 1, 0, 64, 0, 0, 1, 0, 3, 1 },
{ 1, OFILE_L2DOORS, 5, 8, 2, -1, -1, 0, 2, 0, 64, 0, 0, 1, 0, 3, 1 },
{ 1, OFILE_WTORCH4, 5, 8, 2, -1, -1, 1, 1, 9, 96, 0, 1, 0, 0, 0, 0 },
{ 1, OFILE_WTORCH3, 5, 8, 2, -1, -1, 1, 1, 9, 96, 0, 1, 0, 0, 0, 0 },
{ 1, OFILE_WTORCH1, 5, 8, 2, -1, -1, 1, 1, 9, 96, 0, 1, 0, 0, 0, 0 },
{ 1, OFILE_WTORCH2, 5, 8, 2, -1, -1, 1, 1, 9, 96, 0, 1, 0, 0, 0, 0 },
{ 1, OFILE_SARC, 1, 4, 1, -1, -1, 0, 1, 5, 128, 1, 1, 1, 0, 3, 1 },
{ 2, OFILE_FLAME1, 1, 4, 1, -1, -1, 0, 1, 20, 96, 0, 1, 1, 0, 0, 0 },
{ 2, OFILE_LEVER, 1, 4, 1, -1, -1, 0, 1, 2, 96, 1, 1, 1, 0, 1, 1 },
{ 2, OFILE_MINIWATR, 1, 4, 1, -1, -1, 1, 1, 10, 64, 1, 0, 1, 0, 0, 0 },
{ 1, OFILE_BOOK1, 3, 4, 1, -1, -1, 0, 1, 0, 96, 1, 1, 1, 0, 3, 0 },
{ 1, OFILE_TRAPHOLE, 1, 16, 0, -1, -1, 0, 1, 0, 64, 0, 1, 1, 0, 0, 0 },
{ 1, OFILE_TRAPHOLE, 1, 16, 0, -1, -1, 0, 2, 0, 64, 0, 1, 1, 0, 0, 0 },
{ 2, OFILE_BCASE, 0, 0, 0, -1, -1, 0, 1, 0, 96, 1, 0, 1, 0, 0, 0 },
{ 2, OFILE_WEAPSTND, 0, 0, 0, -1, -1, 0, 1, 0, 96, 1, 0, 1, 0, 0, 0 },
{ 1, OFILE_BARREL, 1, 16, 0, -1, -1, 0, 1, 9, 96, 1, 1, 1, 1, 3, 0 },
{ 1, OFILE_BARRELEX, 1, 16, 0, -1, -1, 0, 1, 10, 96, 1, 1, 1, 1, 3, 0 },
{ 3, OFILE_LSHRINEG, 0, 0, 0, 1, -1, 0, 1, 11, 128, 0, 0, 1, 0, 3, 0 },
{ 3, OFILE_RSHRINEG, 0, 0, 0, 1, -1, 0, 1, 11, 128, 0, 0, 1, 0, 3, 0 },
{ 3, OFILE_BOOK2, 0, 0, 0, 3, -1, 0, 4, 0, 96, 1, 1, 1, 0, 3, 0 },
{ 3, OFILE_BCASE, 0, 0, 0, 5, -1, 0, 3, 0, 96, 0, 0, 1, 0, 3, 0 },
{ 3, OFILE_BCASE, 0, 0, 0, 5, -1, 0, 4, 0, 96, 0, 0, 1, 0, 3, 0 },
{ 3, OFILE_BOOK2, 0, 0, 0, 5, -1, 0, 1, 0, 96, 1, 1, 1, 0, 3, 0 },
{ 3, OFILE_CANDLE2, 0, 0, 0, 5, -1, 1, 2, 4, 96, 1, 1, 1, 0, 0, 0 },
{ 3, OFILE_BLOODFNT, 0, 0, 0, 7, -1, 1, 2, 10, 96, 1, 1, 1, 0, 3, 0 },
{ 1, OFILE_DECAP, 13, 16, 0, 8, -1, 0, 1, 0, 96, 1, 1, 1, 0, 1, 0 },
{ 1, OFILE_CHEST1, 1, 16, 0, -1, -1, 0, 1, 0, 96, 1, 1, 1, 0, 1, 1 },
{ 1, OFILE_CHEST2, 1, 16, 0, -1, -1, 0, 1, 0, 96, 1, 1, 1, 0, 1, 1 },
{ 1, OFILE_CHEST3, 1, 16, 0, -1, -1, 0, 1, 0, 96, 1, 1, 1, 0, 1, 1 },
{ 1, OFILE_BOOK1, 7, 7, 2, -1, 8, 0, 1, 0, 96, 1, 1, 1, 0, 3, 0 },
{ 1, OFILE_BOOK1, 5, 5, 2, -1, 9, 0, 4, 0, 96, 1, 1, 1, 0, 3, 0 },
{ 1, OFILE_PEDISTL, 5, 5, 2, -1, 9, 0, 1, 0, 96, 1, 1, 1, 0, 3, 0 },
{ 1, OFILE_L3DOORS, 9, 12, 3, -1, -1, 0, 1, 0, 64, 0, 0, 1, 0, 3, 1 },
{ 1, OFILE_L3DOORS, 9, 12, 3, -1, -1, 0, 2, 0, 64, 0, 0, 1, 0, 3, 1 },
{ 3, OFILE_PFOUNTN, 0, 0, 0, 9, -1, 1, 2, 10, 128, 1, 1, 1, 0, 3, 0 },
{ 3, OFILE_ARMSTAND, 0, 0, 0, 10, -1, 0, 1, 0, 96, 1, 0, 1, 0, 3, 0 },
{ 3, OFILE_ARMSTAND, 0, 0, 0, 10, -1, 0, 2, 0, 96, 1, 0, 1, 0, 0, 0 },
{ 3, OFILE_GOATSHRN, 0, 0, 0, 11, -1, 1, 2, 10, 96, 1, 1, 1, 0, 3, 0 },
{ 1, OFILE_CAULDREN, 13, 16, 0, -1, -1, 0, 1, 0, 96, 1, 0, 1, 0, 3, 0 },
{ 3, OFILE_MFOUNTN, 0, 0, 0, 13, -1, 1, 2, 10, 128, 1, 1, 1, 0, 3, 0 },
{ 3, OFILE_TFOUNTN, 0, 0, 0, 14, -1, 1, 2, 4, 128, 1, 1, 1, 0, 3, 0 },
{ 1, OFILE_ALTBOY, 0, 0, 1, -1, 15, 0, 1, 0, 128, 1, 1, 1, 0, 0, 0 },
{ 1, OFILE_MCIRL, 0, 0, 1, -1, 15, 0, 1, 0, 96, 0, 1, 1, 0, 0, 0 },
{ 1, OFILE_MCIRL, 0, 0, 1, -1, 15, 0, 1, 0, 96, 0, 1, 1, 0, 0, 0 },
{ 1, OFILE_BKSLBRNT, 4, 12, 0, -1, -1, 0, 1, 0, 96, 1, 1, 1, 0, 3, 0 },
{ 1, OFILE_CANDLE2, 2, 12, 0, -1, 15, 1, 2, 4, 96, 1, 1, 1, 0, 0, 0 },
{ 1, OFILE_BOOK1, 13, 13, 4, -1, 11, 0, 4, 0, 96, 1, 1, 1, 0, 3, 0 },
{ 1, OFILE_ARMSTAND, 13, 13, 0, -1, 11, 0, 1, 0, 96, 1, 0, 1, 0, 3, 0 },
{ 2, OFILE_WEAPSTND, 13, 13, 0, -1, 11, 0, 1, 0, 96, 1, 0, 1, 0, 3, 0 },
{ 2, OFILE_BURNCROS, 0, 0, 0, 15, -1, 1, 0, 10, 160, 1, 0, 0, 0, 0, 0 },
{ 2, OFILE_WEAPSTND, 0, 0, 0, 16, -1, 0, 1, 0, 96, 1, 0, 1, 0, 3, 0 },
{ 2, OFILE_WEAPSTND, 0, 0, 0, 16, -1, 0, 2, 0, 96, 1, 0, 1, 0, 0, 0 },
{ 2, OFILE_MUSHPTCH, 0, 0, 0, -1, 1, 0, 1, 0, 96, 1, 1, 1, 0, 3, 1 },
{ 2, OFILE_LZSTAND, 0, 0, 0, -1, 15, 0, 1, 0, 128, 1, 0, 1, 0, 3, 0 },
{ 1, OFILE_DECAP, 9, 9, 3, -1, -1, 0, 2, 0, 96, 1, 1, 1, 0, 1, 0 },
{ 2, OFILE_CHEST3, 0, 0, 0, -1, -1, 0, 1, 0, 96, 1, 1, 1, 0, 1, 1 },
{ -1, 0, 0, 0, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
};
char *ObjMasterLoadList[56] =
{
@ -5456,7 +5456,7 @@ LABEL_47:
v60 = random(v7, 37);
v7 = v60;
}
while ( !(plr[v53]._pMemSpells[1] & ((unsigned __int64)(1i64 << v60) >> 32) | plr[v53]._pMemSpells[0] & (unsigned int)(1i64 << v60)) );
while ( !(plr[v53]._pMemSpells[1] & ((unsigned __int64)((__int64)1 << v60) >> 32) | plr[v53]._pMemSpells[0] & (unsigned int)((__int64)1 << v60)) );
v61 = &plr[v53]._pSplLvl[v60 + 1];
if ( *v61 < 2 )
*v61 = 0;

View File

@ -3938,14 +3938,14 @@ int __fastcall PM_DoSpell(int pnum)
if ( !plr[v2]._pSplFrom )
{
if ( _LOBYTE(plr[v2]._pRSplType) == 2
&& !(plr[v2]._pScrlSpells[1] & ((unsigned __int64)(1i64 << (_LOBYTE(plr[v2]._pRSpell) - 1)) >> 32) | plr[v2]._pScrlSpells[0] & (unsigned int)(1i64 << (_LOBYTE(plr[v2]._pRSpell) - 1))) )
&& !(plr[v2]._pScrlSpells[1] & ((unsigned __int64)((__int64)1 << (_LOBYTE(plr[v2]._pRSpell) - 1)) >> 32) | plr[v2]._pScrlSpells[0] & (unsigned int)((__int64)1 << (_LOBYTE(plr[v2]._pRSpell) - 1))) )
{
plr[v2]._pRSpell = -1;
_LOBYTE(plr[v2]._pRSplType) = 4;
drawpanflag = 255;
}
if ( _LOBYTE(plr[v2]._pRSplType) == 3
&& !(plr[v2]._pISpells[1] & ((unsigned __int64)(1i64 << (_LOBYTE(plr[v2]._pRSpell) - 1)) >> 32) | plr[v2]._pISpells[0] & (unsigned int)(1i64 << (_LOBYTE(plr[v2]._pRSpell) - 1))) )
&& !(plr[v2]._pISpells[1] & ((unsigned __int64)((__int64)1 << (_LOBYTE(plr[v2]._pRSpell) - 1)) >> 32) | plr[v2]._pISpells[0] & (unsigned int)((__int64)1 << (_LOBYTE(plr[v2]._pRSpell) - 1))) )
{
plr[v2]._pRSpell = -1;
_LOBYTE(plr[v2]._pRSplType) = 4;
@ -4663,7 +4663,7 @@ void __cdecl ValidatePlayer()
__int64 v14; // [esp+Ch] [ebp-8h]
v0 = 0;
v14 = 0i64;
v14 = (__int64)0;
if ( (unsigned int)myplr >= 4 )
TermMsg("ValidatePlayer: illegal player %d", myplr);
v1 = myplr;
@ -4711,7 +4711,7 @@ void __cdecl ValidatePlayer()
{
if ( *v11 != -1 )
{
v14 |= 1i64 << ((unsigned char)v12 - 1);
v14 |= (__int64)1 << ((unsigned char)v12 - 1);
v13 = &plr[v1]._pSplLvl[v12];
if ( *v13 > 15 )
*v13 = 15;

View File

@ -27,21 +27,21 @@ int ReturnLvl; // idb
QuestData questlist[16] =
{
{ 5, 255, DTYPE_NONE, 0, 100, 0, 0, QUEST_INFRA5, "The Magic Rock" },
{ 9, 255, DTYPE_NONE, 1, 100, 0, 0, QUEST_MUSH8, "Black Mushroom" },
{ 4, 255, DTYPE_NONE, 2, 100, 0, 0, QUEST_GARBUD1, "Gharbad The Weak" },
{ 8, 255, DTYPE_NONE, 3, 100, 0, 0, QUEST_ZHAR1, "Zhar the Mad" },
{ 14, 255, DTYPE_NONE, 4, 100, 0, 0, QUEST_VEIL9, "Lachdanan" },
{ 15, 255, DTYPE_NONE, 5, 100, 0, 1, QUEST_VILE3, "Diablo" },
{ 5, -1, DTYPE_NONE, 0, 100, 0, 0, QUEST_INFRA5, "The Magic Rock" },
{ 9, -1, DTYPE_NONE, 1, 100, 0, 0, QUEST_MUSH8, "Black Mushroom" },
{ 4, -1, DTYPE_NONE, 2, 100, 0, 0, QUEST_GARBUD1, "Gharbad The Weak" },
{ 8, -1, DTYPE_NONE, 3, 100, 0, 0, QUEST_ZHAR1, "Zhar the Mad" },
{ 14, -1, DTYPE_NONE, 4, 100, 0, 0, QUEST_VEIL9, "Lachdanan" },
{ 15, -1, DTYPE_NONE, 5, 100, 0, 1, QUEST_VILE3, "Diablo" },
{ 2, 2, DTYPE_NONE, 6, 100, 0, 1, QUEST_BUTCH9, "The Butcher" },
{ 4, 255, DTYPE_NONE, 7, 100, 0, 0, QUEST_BANNER2, "Ogden's Sign" },
{ 7, 255, DTYPE_NONE, 8, 100, 0, 0, QUEST_BLINDING, "Halls of the Blind" },
{ 5, 255, DTYPE_NONE, 9, 100, 0, 0, QUEST_BLOODY, "Valor" },
{ 10, 255, DTYPE_NONE, 10, 100, 0, 0, QUEST_ANVIL5, "Anvil of Fury" },
{ 13, 255, DTYPE_NONE, 11, 100, 0, 0, QUEST_BLOODWAR, "Warlord of Blood" },
{ 4, -1, DTYPE_NONE, 7, 100, 0, 0, QUEST_BANNER2, "Ogden's Sign" },
{ 7, -1, DTYPE_NONE, 8, 100, 0, 0, QUEST_BLINDING, "Halls of the Blind" },
{ 5, -1, DTYPE_NONE, 9, 100, 0, 0, QUEST_BLOODY, "Valor" },
{ 10, -1, DTYPE_NONE, 10, 100, 0, 0, QUEST_ANVIL5, "Anvil of Fury" },
{ 13, -1, DTYPE_NONE, 11, 100, 0, 0, QUEST_BLOODWAR, "Warlord of Blood" },
{ 3, 3, DTYPE_CATHEDRAL, 12, 100, 1, 1, QUEST_KING2, "The Curse of King Leoric" },
{ 2, 255, DTYPE_CAVES, 13, 100, 4, 0, QUEST_POISON3, "Poisoned Water Supply" },
{ 6, 255, DTYPE_CATACOMBS, 14, 100, 2, 0, QUEST_BONER, "The Chamber of Bone" },
{ 2, -1, DTYPE_CAVES, 13, 100, 4, 0, QUEST_POISON3, "Poisoned Water Supply" },
{ 6, -1, DTYPE_CATACOMBS, 14, 100, 2, 0, QUEST_BONER, "The Chamber of Bone" },
{ 15, 15, DTYPE_CATHEDRAL, 15, 100, 5, 1, QUEST_VILE1, "Archbishop Lazarus" }
};
char questxoff[7] = { 0, -1, 0, -1, -2, -1, -2 };

View File

@ -38,7 +38,7 @@ char *sgszMusicTracks[6] =
"Music\\DLvlD.wav",
"Music\\Dintro.wav"
};
RECT8 QSRect[2] = { { { 15u, 240u }, { 15u, 240u } }, { { 30u, 225u }, { 30u, 225u } } }; /* psx version? */
RECT8 QSRect[2] = { { { 15, -16 }, { 15, -16 } }, { { 30, -31 }, { 30, -31 } } }; /* psx version? */
//----- (00456CC0) --------------------------------------------------------
struct sound_cpp_init

View File

@ -15,7 +15,7 @@ int world_4B325C = 0; // truncated with & 1, some kind of bool??
unsigned char world_4B3260[5] = { 0u, 0u, 0u, 0u, 0u }; // single mask, int nTileMask
int world_4B3265 = 0; // speed cel num
int world_4B3269[5] = { 0, 0, 0, 0, 0 }; // seems to be a single pointer, void *pTileMask
int tile_draw_masks[3][32] =
unsigned int tile_draw_masks[3][32] =
{
{
0xEAAAAAAA, 0xF5555555, 0xFEAAAAAA, 0xFF555555, 0xFFEAAAAA, 0xFFF55555, 0xFFFEAAAA, 0xFFFF5555,

View File

@ -23,7 +23,7 @@ extern int world_4B325C;
extern unsigned char world_4B3260[5];
extern int world_4B3265;
extern int world_4B3269[5];
extern int tile_draw_masks[3][32];
extern unsigned int tile_draw_masks[3][32];
extern int world_4B33FD[48];
extern int world_4B34BD[17];
extern int world_4B3501[17];

View File

@ -69,7 +69,7 @@ enum unique_base_item
UITYPE_GRISWOLD = 0x42,
UITYPE_LGTFORGE = 0x43,
UITYPE_LAZSTAFF = 0x44,
UITYPE_INVALID = 0xFF,
UITYPE_INVALID = -1,
};
enum item_effect_type
@ -145,7 +145,7 @@ enum item_effect_type
IPL_ADDMANAAC = 0x4D,
IPL_FIRERESCLVL = 0x4E,
IPL_AC_CURSE = 0x4F,
IPL_INVALID = 0xFF,
IPL_INVALID = -1,
};
enum affix_item_type
@ -1031,7 +1031,7 @@ enum item_equip_type
ILOC_AMULET = 0x6,
ILOC_UNEQUIPABLE = 0x7,
ILOC_BELT = 0x8,
ILOC_INVALID = 0xFF,
ILOC_INVALID = -1,
};
enum missile_id

View File

@ -813,7 +813,7 @@ struct PlayerStruct
char _pSBkSplType;
char _pSplLvl[64];
int remove_1;
int _pMemSpells[2]; // __declspec(align(8))
int _pMemSpells[2]; // __declspec(align(8))
int _pAblSpells[2];
int _pScrlSpells[2];
int _pSpellFlags;
@ -909,7 +909,7 @@ struct PlayerStruct
int _pIBonusAC;
int _pIBonusDamMod;
int remove_2;
int _pISpells[2]; //__declspec(align(8))
int _pISpells[2]; //__declspec(align(8))
int _pIFlags;
int _pIGetHit;
char _pISplLvlAdd;

View File

@ -32,7 +32,7 @@
#include "enums.h"
#include "structs.h"
#include "DiabloUI/_diabloui.h"
#include "DiabloUI/_DiabloUI.h"
#include "3rdParty/Storm/Source/_storm.h"
#include "3rdParty/PKWare/pkware.h"