Minor edits to Structs.h and HookScripts.cpp

Fixed Debug build configuration in project file.
This commit is contained in:
NovaRain
2019-11-05 09:18:46 +08:00
parent 2e39325521
commit 76cc0471d6
4 changed files with 9 additions and 7 deletions
+1 -1
View File
@@ -120,7 +120,7 @@
#define RMOBJ_RM_MULT_OBJS 4563866 #define RMOBJ_RM_MULT_OBJS 4563866
#define RMOBJ_REPLACE_WEAPON 4658526 #define RMOBJ_REPLACE_WEAPON 4658526
#define RMOBJ_THROW 4266040 #define RMOBJ_THROW 4266040
#define RMOBJ_SUB_CONTAINER 4683191 // search and remove the item from a container inside of an inventory #define RMOBJ_SUB_CONTAINER 4683191 // search and remove the item from nested containers in the inventory
// common prototype offsets for get/set_proto_data // common prototype offsets for get/set_proto_data
#define PROTO_PID (1) #define PROTO_PID (1)
+5 -4
View File
@@ -199,17 +199,18 @@ struct ScriptInstance {
struct Program { struct Program {
const char* fileName; const char* fileName;
long *codeStackPtr; long *codeStackPtr;
char gap_8[8]; long gap_8;
long gap_9;
long *codePtr; long *codePtr;
long field_14; long field_14;
char gap_18[4]; long gap_18;
long *dStackPtr; long *dStackPtr;
long *aStackPtr; long *aStackPtr;
long *dStackOffs; long *dStackOffs;
long *aStackOffs; long *aStackOffs;
char gap_2C[4]; long gap_2C;
long *stringRefPtr; long *stringRefPtr;
char gap_34[4]; long gap_34;
long *procTablePtr; long *procTablePtr;
}; };
+1 -1
View File
@@ -263,7 +263,7 @@ void HookScripts::init() {
LoadGameHook::OnAfterGameStarted() += SourceUseSkillOnInit; LoadGameHook::OnAfterGameStarted() += SourceUseSkillOnInit;
HookScripts::injectAllHooks = isDebug && (iniGetInt("Debugging", "InjectAllGameHooks", 0, ::sfall::ddrawIni) != 0); HookScripts::injectAllHooks = isDebug && (iniGetInt("Debugging", "InjectAllGameHooks", 0, ::sfall::ddrawIni) != 0);
if (HookScripts::injectAllHooks) dlogr("Injecting all game hooks", DL_HOOK); if (HookScripts::injectAllHooks) dlogr("Injecting all game hooks", DL_HOOK|DL_INIT);
} }
} }
+2 -1
View File
@@ -86,7 +86,7 @@
<ClCompile> <ClCompile>
<Optimization>Disabled</Optimization> <Optimization>Disabled</Optimization>
<PreprocessorDefinitions>INITGUID;WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions>INITGUID;WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> <BasicRuntimeChecks>UninitializedLocalUsageCheck</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>Use</PrecompiledHeader> <PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel> <WarningLevel>Level3</WarningLevel>
@@ -96,6 +96,7 @@
<ForcedIncludeFiles>stdafx.h;%(ForcedIncludeFiles)</ForcedIncludeFiles> <ForcedIncludeFiles>stdafx.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
<AdditionalIncludeDirectories>$(DXSDK_DIR)Include\</AdditionalIncludeDirectories> <AdditionalIncludeDirectories>$(DXSDK_DIR)Include\</AdditionalIncludeDirectories>
<AssemblerOutput>AssemblyAndSourceCode</AssemblerOutput> <AssemblerOutput>AssemblyAndSourceCode</AssemblerOutput>
<BufferSecurityCheck>false</BufferSecurityCheck>
</ClCompile> </ClCompile>
<Link> <Link>
<AdditionalDependencies>d3d9.lib;d3dx9.lib;dinput.lib;Strmiids.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>d3d9.lib;d3dx9.lib;dinput.lib;Strmiids.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>