mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Updated stdafx.h and other code/doc files
This commit is contained in:
+1
-1
@@ -569,7 +569,7 @@ StartGDialogFix=0
|
|||||||
AttackComplexFix=0
|
AttackComplexFix=0
|
||||||
|
|
||||||
;Set to 1 to fix the issue with the division operator treating negative integers as unsigned
|
;Set to 1 to fix the issue with the division operator treating negative integers as unsigned
|
||||||
;If you still want to perform the unsigned integer division, use the new 'div' operator
|
;Note: To perform the unsigned integer division, use the new 'div' operator
|
||||||
DivisionOperatorFix=1
|
DivisionOperatorFix=1
|
||||||
|
|
||||||
;Set to 1 to enable the balanced bullet distribution formula for burst attacks
|
;Set to 1 to enable the balanced bullet distribution formula for burst attacks
|
||||||
|
|||||||
@@ -99,7 +99,7 @@
|
|||||||
#define CFLG_SPECIAL 4096 // 0x00001000 - Special (has a special type of death)
|
#define CFLG_SPECIAL 4096 // 0x00001000 - Special (has a special type of death)
|
||||||
#define CFLG_RANGED 8192 // 0x00002000 - Range (has extra hand-to-hand range)
|
#define CFLG_RANGED 8192 // 0x00002000 - Range (has extra hand-to-hand range)
|
||||||
#define CFLG_NOKNOCKBACK 16384 // 0x00004000 - Knock (cannot be knocked back)
|
#define CFLG_NOKNOCKBACK 16384 // 0x00004000 - Knock (cannot be knocked back)
|
||||||
#define CFLG_NOKNOCKDOWN CFLG_NOKNOCKBACK // for old scripts
|
#define CFLG_NOKNOCKDOWN CFLG_NOKNOCKBACK // obsolete
|
||||||
|
|
||||||
/* Window flags */
|
/* Window flags */
|
||||||
#define WIN_FLAG_MOVEONTOP (0x4)
|
#define WIN_FLAG_MOVEONTOP (0x4)
|
||||||
|
|||||||
@@ -620,7 +620,7 @@ optional arguments:
|
|||||||
> int sfall_func2("get_window_attribute", int winType, int attrType)
|
> int sfall_func2("get_window_attribute", int winType, int attrType)
|
||||||
- returns the attribute of the specified interface window by the attrType argument
|
- returns the attribute of the specified interface window by the attrType argument
|
||||||
- winType: the type number of the interface window (see WINTYPE_* constants in sfall.h)
|
- winType: the type number of the interface window (see WINTYPE_* constants in sfall.h)
|
||||||
- attrType: 0 - returns a value of 1 if the specified interface window is created by the game (same as without the argument)
|
- attrType: 0 - checks and returns a value of 1 if the specified interface window is created by the game (same as without the argument)
|
||||||
1 - X position, 2 - Y position (relative to the top-left corner of the game screen)
|
1 - X position, 2 - Y position (relative to the top-left corner of the game screen)
|
||||||
- returns -1 if the specified attribute cannot be obtained
|
- returns -1 if the specified attribute cannot be obtained
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -301,7 +301,7 @@ enum CritterFlags : long
|
|||||||
CFLG_Invulnerable = 0x400, // Is Invulnerable (cannot be hurt)
|
CFLG_Invulnerable = 0x400, // Is Invulnerable (cannot be hurt)
|
||||||
CFLG_NoFlatten = 0x800, // Doesn't flatten on death (leaves no dead body)
|
CFLG_NoFlatten = 0x800, // Doesn't flatten on death (leaves no dead body)
|
||||||
CFLG_SpecialDeath = 0x1000, // Has a special type of death
|
CFLG_SpecialDeath = 0x1000, // Has a special type of death
|
||||||
CFLG_RangeHth = 0x2000, // Has extra hand-to-hand range
|
CFLG_RangeHtH = 0x2000, // Has extra hand-to-hand range
|
||||||
CFLG_NoKnockBack = 0x4000, // Can't be knocked back
|
CFLG_NoKnockBack = 0x4000, // Can't be knocked back
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1615,7 +1615,7 @@ enum WinNameType {
|
|||||||
WINTYPE_Character = 5,
|
WINTYPE_Character = 5,
|
||||||
WINTYPE_Skilldex = 6,
|
WINTYPE_Skilldex = 6,
|
||||||
WINTYPE_EscMenu = 7, // escape menu
|
WINTYPE_EscMenu = 7, // escape menu
|
||||||
// WINTYPE_Automap = 8 // for this window there is no global variable
|
//WINTYPE_Automap = 8 // for this window there is no global variable
|
||||||
};
|
};
|
||||||
|
|
||||||
WINinfo* GetUIWindow(long winType) {
|
WINinfo* GetUIWindow(long winType) {
|
||||||
|
|||||||
+3
-3
@@ -42,7 +42,7 @@ typedef IDirect3D9* (_stdcall *D3DCreateProc)(UINT version);
|
|||||||
|
|
||||||
#define UNUSEDFUNCTION { DEBUGMESS("\n[SFALL] Unused function called: %s", __FUNCTION__); return DDERR_GENERIC; }
|
#define UNUSEDFUNCTION { DEBUGMESS("\n[SFALL] Unused function called: %s", __FUNCTION__); return DDERR_GENERIC; }
|
||||||
|
|
||||||
IDirectDrawSurface* primaryDDSurface = nullptr;
|
static IDirectDrawSurface* primaryDDSurface = nullptr;
|
||||||
|
|
||||||
static DWORD ResWidth;
|
static DWORD ResWidth;
|
||||||
static DWORD ResHeight;
|
static DWORD ResHeight;
|
||||||
@@ -655,7 +655,7 @@ void Gfx_SetHeadTex(IDirect3DTexture9* tex, int width, int height, int xoff, int
|
|||||||
|
|
||||||
// adjust head texture position for HRP 4.1.8
|
// adjust head texture position for HRP 4.1.8
|
||||||
int h = Gfx_GetGameHeightRes();
|
int h = Gfx_GetGameHeightRes();
|
||||||
if (h > 480) yoff += ((h - 480) / 2) - 47;
|
if (h > 480) yoff += ((h - 480) / 2) - 47; // TODO: get dialog interface position
|
||||||
xoff += ((Gfx_GetGameWidthRes() - 640) / 2);
|
xoff += ((Gfx_GetGameWidthRes() - 640) / 2);
|
||||||
|
|
||||||
size[0] = (126.0f + xoff + ((388 - width) / 2)) * rcpres[0];
|
size[0] = (126.0f + xoff + ((388 - width) / 2)) * rcpres[0];
|
||||||
@@ -727,7 +727,7 @@ public:
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// X8B8G8R8 format
|
// X8B8G8R8 format
|
||||||
for (DWORD i = b; i < b + c; i++) { // swap color R <> B
|
for (DWORD i = b; i < b + c; i++) { // swap color B <> R
|
||||||
BYTE clr = *(BYTE*)((DWORD)&palette[i]); // B
|
BYTE clr = *(BYTE*)((DWORD)&palette[i]); // B
|
||||||
*(BYTE*)((DWORD)&palette[i]) = *(BYTE*)((DWORD)&palette[i] + 2); // R
|
*(BYTE*)((DWORD)&palette[i]) = *(BYTE*)((DWORD)&palette[i] + 2); // R
|
||||||
*(BYTE*)((DWORD)&palette[i] + 2) = clr;
|
*(BYTE*)((DWORD)&palette[i] + 2) = clr;
|
||||||
|
|||||||
+1
-5
@@ -17,16 +17,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#pragma warning(disable:4996)
|
#pragma warning(disable:4996)
|
||||||
|
|
||||||
#ifdef NDEBUG
|
#ifdef NDEBUG
|
||||||
#pragma warning(disable:4414)
|
#pragma warning(disable:4414)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <assert.h>
|
#include <cassert>
|
||||||
//#define WIN32_LEAN_AND_MEAN
|
|
||||||
#include <Windows.h>
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|||||||
+10
-4
@@ -2,11 +2,11 @@
|
|||||||
#pragma message("Compiling precompiled headers.\n")
|
#pragma message("Compiling precompiled headers.\n")
|
||||||
|
|
||||||
#ifdef WIN2K
|
#ifdef WIN2K
|
||||||
#define WINVER 0x0500
|
#define WINVER _WIN32_WINNT_WIN2K
|
||||||
#define _WIN32_WINNT 0x0500
|
#define _WIN32_WINNT _WIN32_WINNT_WIN2K
|
||||||
#else
|
#else
|
||||||
#define WINVER 0x0501
|
#define WINVER _WIN32_WINNT_WINXP
|
||||||
#define _WIN32_WINNT 0x0501
|
#define _WIN32_WINNT _WIN32_WINNT_WINXP
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
@@ -14,4 +14,10 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
//#define WIN32_LEAN_AND_MEAN
|
||||||
|
#define NOCRYPT
|
||||||
|
#define NOSERVICE
|
||||||
|
#define NOMCX
|
||||||
|
#define NOIME
|
||||||
#include <Windows.h>
|
#include <Windows.h>
|
||||||
|
|||||||
Reference in New Issue
Block a user