mirror of
https://github.com/diasurgical/devilution.git
synced 2026-05-21 05:40:54 +00:00
Add definition of j_lock_buf_priv and j_unlock_buf_priv for debug release.
Also add a debug target for MakefileVC.
This commit is contained in:
@@ -49,6 +49,9 @@ endif
|
||||
|
||||
all: Diablo.exe
|
||||
|
||||
debug: CFLAGS += /D "_DEBUG"
|
||||
debug: Diablo.exe
|
||||
|
||||
# fix compilation order to match the VC6 workspace files
|
||||
DIABLO_SRC=$(sort $(filter-out Source/render.cpp, $(wildcard Source/*.cpp)))
|
||||
DIABLO_SRC += Source/render.cpp
|
||||
|
||||
+13
-2
@@ -10,6 +10,9 @@ int sgdwLockCount;
|
||||
Screen *gpBuffer;
|
||||
IDirectDrawSurface *lpDDSBackBuf;
|
||||
IDirectDrawSurface *lpDDSPrimary;
|
||||
#ifdef _DEBUG
|
||||
int locktbl[256];
|
||||
#endif
|
||||
static CRITICAL_SECTION sgMemCrit;
|
||||
char gbBackBuf; // weak
|
||||
char gbEmulate; // weak
|
||||
@@ -184,7 +187,10 @@ HRESULT __fastcall dx_DirectDrawCreate(GUID *guid, IDirectDraw **DD, void *unkno
|
||||
return ((int (__stdcall *)(GUID *, IDirectDraw **, void *))v5)(v8, v3, unknown);
|
||||
}
|
||||
|
||||
void __fastcall j_lock_buf_priv(char a1) {
|
||||
void __fastcall j_lock_buf_priv(BYTE idx) {
|
||||
#ifdef _DEBUG
|
||||
++locktbl[idx];
|
||||
#endif
|
||||
lock_buf_priv();
|
||||
}
|
||||
|
||||
@@ -219,7 +225,12 @@ LABEL_9:
|
||||
}
|
||||
// 69CF0C: using guessed type int gpBufEnd;
|
||||
|
||||
void __fastcall j_unlock_buf_priv(char a1) {
|
||||
void __fastcall j_unlock_buf_priv(BYTE idx) {
|
||||
#ifdef _DEBUG
|
||||
if ( !locktbl[idx] )
|
||||
TermMsg("Draw lock underflow: 0x%x", idx);
|
||||
--locktbl[idx];
|
||||
#endif
|
||||
unlock_buf_priv();
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -23,9 +23,9 @@ void __fastcall dx_init(HWND hWnd);
|
||||
void __cdecl dx_create_back_buffer();
|
||||
void __cdecl dx_create_primary_surface();
|
||||
HRESULT __fastcall dx_DirectDrawCreate(GUID *guid, IDirectDraw **DD, void *unknown);
|
||||
void __fastcall j_lock_buf_priv(char a1);
|
||||
void __fastcall j_lock_buf_priv(BYTE idx);
|
||||
void __cdecl lock_buf_priv();
|
||||
void __fastcall j_unlock_buf_priv(char a1);
|
||||
void __fastcall j_unlock_buf_priv(BYTE idx);
|
||||
void __cdecl unlock_buf_priv();
|
||||
void __cdecl dx_cleanup();
|
||||
void __cdecl dx_reinit();
|
||||
|
||||
Reference in New Issue
Block a user