Browse Source

Brute fix compile errors

pull/88/head
Anders Jenbo 7 years ago
parent
commit
631305035a
  1. 2
      DiabloUI/diabloui.h
  2. 2
      DiabloUI/progress.cpp
  3. 15
      Source/list.h
  4. 2
      Source/msg.cpp
  5. 2
      SourceS/miniwin.h
  6. 3
      SourceS/miniwin/misc.h
  7. 3
      SourceS/miniwin/misc_macro.h
  8. 3
      SourceX/DiabloUI/diabloui.cpp
  9. 3
      SourceX/DiabloUI/diabloui.h
  10. 10
      SourceX/dx.cpp
  11. 5
      SourceX/miniwin/misc.cpp

2
DiabloUI/diabloui.h

@ -35,7 +35,7 @@ BOOL __stdcall UiSelHeroMultDialog(BOOL(__stdcall *fninfo)(BOOL(__stdcall *fninf
BOOL __stdcall UiSelHeroSingDialog(BOOL(__stdcall *fninfo)(BOOL(__stdcall *fninfofunc)(_uiheroinfo *)), BOOL(__stdcall *fncreate)(_uiheroinfo *), BOOL(__stdcall *fnremove)(_uiheroinfo *), BOOL(__stdcall *fnstats)(unsigned int, _uidefaultstats *), int *dlgresult, char *name, int *difficulty);
BOOL __stdcall UiCreditsDialog(int a1);
BOOL __stdcall UiMainMenuDialog(char *name, int *pdwResult, void(__stdcall *fnSound)(char *file), int a4);
int __stdcall UiProgressDialog(HWND window, char *msg, int a3, void *fnfunc, int a5);
int UiProgressDialog(HWND window, char *msg, int a3, void *fnfunc, int a5);
int __stdcall UiProfileGetString();
void __cdecl UiProfileCallback();
void __cdecl UiProfileDraw();

2
DiabloUI/progress.cpp

@ -10,7 +10,7 @@ signed int Progress_10009480() { return 0; }
// 1002A2EC: using guessed type int dword_1002A2EC;
// ref: 0x1000948B
int __stdcall UiProgressDialog(HWND window, char *msg, int enable, int(__cdecl *fnfunc)(), int rate) { return 0; }
int UiProgressDialog(HWND window, char *msg, int enable, int(*fnfunc)(), int rate) { return 0; }
/* {
HWND v5; // eax
BOOL result; // eax

15
Source/list.h

@ -6,6 +6,7 @@
#include <stddef.h> // for offsetof
#include <typeinfo> // for typeid
DEVILUTION_BEGIN_NAMESPACE
#ifdef _MSC_VER
#pragma warning (disable : 4291) // no matching operator delete found
#endif
@ -63,13 +64,13 @@ private:
TList &operator=(const TList &);
// replacement new/delete operators for Storm objects
static __forceinline T *SNew(size_t extralen, int flags)
static __inline T *SNew(size_t extralen, int flags)
{
void *obj = SMemAlloc(sizeof(T) + extralen, (char *)OBJECT_NAME(T), SLOG_OBJECT, flags | (1<<3));
return new (obj) T();
}
static __forceinline void SDelete(T *node)
static __inline void SDelete(T *node)
{
node->~T();
SMemFree(node, (char *)OBJECT_NAME(T), SLOG_OBJECT, 0);
@ -105,14 +106,14 @@ void TList<T>::DeleteAll()
//=============================================================================
template <class T>
__forceinline T *TList<T>::Head()
__inline T *TList<T>::Head()
{
return m_link.Next();
}
//=============================================================================
template <class T>
__forceinline TLink<T> *TList<T>::GetLinkFromNode(T *node) const
__inline TLink<T> *TList<T>::GetLinkFromNode(T *node) const
{
// assert(m_offset != (size_t) -1);
// return (TLink<T> *) ((size_t) node + m_offset);
@ -196,9 +197,7 @@ public:
T *Next()
{
if ((int)m_nextNode <= 0)
return NULL;
return m_nextNode;
}
TLink<T> *NextLink(size_t offset = -1)
@ -225,7 +224,7 @@ public:
nextLink->m_prevLink = this;
}
__forceinline void InsertAfter(T *node, TLink<T> *prevLink, const size_t &offset)
__inline void InsertAfter(T *node, TLink<T> *prevLink, const size_t &offset)
{
m_prevLink = prevLink;
m_nextNode = prevLink->m_nextNode;
@ -257,3 +256,5 @@ void TLink<T>::Unlink()
m_nextNode = NULL;
}
}
DEVILUTION_END_NAMESPACE

2
Source/msg.cpp

@ -79,7 +79,7 @@ BOOL msg_wait_resync()
sgbRecvCmd = CMD_DLEVEL_END;
gbBufferMsgs = 1;
sgdwOwnerWait = GetTickCount();
success = UiProgressDialog(ghMainWnd, "Waiting for game data...", 1, msg_wait_for_turns, 20);
//success = UiProgressDialog(ghMainWnd, "Waiting for game data...", 1, msg_wait_for_turns, 20);
gbBufferMsgs = 0;
if (!success) {
msg_free_packets();

2
SourceS/miniwin.h

@ -31,8 +31,8 @@
#include "miniwin/thread.h"
#include "miniwin/rand.h"
#include "storm_full.h"
#include "miniwin/misc_macro.h"
#ifdef DEVILUTION_ENGINE
#include "miniwin/misc_macro.h"
#include "miniwin/com_macro.h"
#endif

3
SourceS/miniwin/misc.h

@ -332,6 +332,7 @@ UINT WINAPI GetSystemPaletteEntries(HDC hdc, UINT iStart, UINT cEntries, LPPALET
int WINAPIV wsprintfA(LPSTR, LPCSTR, ...);
int WINAPIV wvsprintfA(LPSTR dest, LPCSTR format, va_list arglist);
int __cdecl _strcmpi(const char *_Str1, const char *_Str2);
int __cdecl _strnicmp(const char *_Str1, const char *_Str2, int n);
char *__cdecl _itoa(int _Value, char *_Dest, int _Radix);
char *__cdecl _strlwr(char *str);
@ -354,7 +355,7 @@ typedef struct _WIN32_FIND_DATAA {
DWORD dwFileType;
DWORD dwCreatorType;
WORD wFinderFlags;
} WIN32_FIND_DATAA, *LPWIN32_FIND_DATAA;
} WIN32_FIND_DATAA, WIN32_FIND_DATA, *LPWIN32_FIND_DATAA;
typedef void *LPOVERLAPPED;

3
SourceS/miniwin/misc_macro.h

@ -42,6 +42,9 @@
#define WM_QUIT DVL_WM_QUIT
#define NOERROR 0
#define FILE_ATTRIBUTE_DIRECTORY 1
#define PeekMessage PeekMessageA
#define DispatchMessage DispatchMessageA
#define PostMessage PostMessageA

3
SourceX/DiabloUI/diabloui.cpp

@ -29,9 +29,6 @@ bool UiItemsWraps;
char *UiTextInput;
int UiTextInputLen;
int SCREEN_WIDTH = 640;
int SCREEN_HEIGHT = 480;
int fadeValue = 0;
int SelectedItem = 0;

3
SourceX/DiabloUI/diabloui.h

@ -81,9 +81,6 @@ extern Art ArtBackground;
extern Art ArtCursor;
extern Art ArtHero;
extern int SCREEN_WIDTH;
extern int SCREEN_HEIGHT;
typedef enum TXT_JUST {
JustLeft = 0,
JustCentre = 1,

10
SourceX/dx.cpp

@ -443,12 +443,16 @@ void sdl_present_surface()
surface_dirty = false;
}
void j_lock_buf_priv(BYTE idx)
void lock_buf(BYTE idx)
{
j_unlock_buf_priv(idx); // what is idx?
}
void j_unlock_buf_priv(BYTE idx)
void unlock_buf(BYTE idx)
{
unlock_buf_priv(); // what is idx?
}
void unlock_buf_priv()
{
gpBufEnd -= (uintptr_t)gpBufEnd;

5
SourceX/miniwin/misc.cpp

@ -49,6 +49,11 @@ int _strcmpi(const char *_Str1, const char *_Str2)
return strcasecmp(_Str1, _Str2);
}
int _strnicmp(const char *_Str1, const char *_Str2, int n) {
DUMMY();
return strcasecmp(_Str1, _Str2);
}
char *_itoa(int _Value, char *_Dest, int _Radix)
{
switch (_Radix) {

Loading…
Cancel
Save