Skip to content

Commit

Permalink
CE support, rain fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomasak committed Aug 11, 2024
1 parent 927b283 commit 3f61ef4
Show file tree
Hide file tree
Showing 16 changed files with 13,161 additions and 6 deletions.
6 changes: 3 additions & 3 deletions ScriptHookDotNet/D3D_Device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@ namespace GTA {
if (Scripting::IsPauseMenuActive() || Scripting::IsScreenFadingOut() || Scripting::IsScreenFadedOut()) return;
bDrawing = true;
try {
cDevice->SetTexture(0, NULL);
cDevice->SetRenderState(D3DRS_ZENABLE, FALSE);
cDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, TRUE);
//cDevice->SetTexture(0, NULL);
//cDevice->SetRenderState(D3DRS_ZENABLE, FALSE);
//cDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, TRUE);

NetHook::Draw();

Expand Down
6 changes: 6 additions & 0 deletions ScriptHookDotNet/MemoryAccess.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,12 @@ namespace unmanaged {
ADDRESS_PEDPOOL = BaseAddress + 0x18219EC;
ADDRESS_VEHICLEPOOL = BaseAddress + 0x15C17B0;
break;
case GTA::GameVersion::v1259:
ADDRESS_BLIPLIST = BaseAddress + 0x114FD24;
ADDRESS_OBJECTPOOL = BaseAddress + 0x0E95CD8;
ADDRESS_PEDPOOL = BaseAddress + 0x14B6F1C;
ADDRESS_VEHICLEPOOL = BaseAddress + 0x0EE22A4;
break;
}
}

Expand Down
1 change: 1 addition & 0 deletions ScriptHookDotNet/NetHook.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ namespace GTA {
SupportedGameVersions->Add(GameVersion::v1070, cppHookVersion::v0_5_1);
SupportedGameVersions->Add(GameVersion::v1110, cppHookVersion::v0_5_1);
SupportedGameVersions->Add(GameVersion::v1120, cppHookVersion::v0_5_1);
SupportedGameVersions->Add(GameVersion::v1259, cppHookVersion::v0_5_1);

CallMutex->WaitOne();
try {
Expand Down
16 changes: 13 additions & 3 deletions ScriptHookDotNet/ScriptHookDotNet.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,14 @@
<CharacterSet>Unicode</CharacterSet>
<CLRSupport>true</CLRSupport>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<CLRSupport>true</CLRSupport>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v143</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
Expand Down Expand Up @@ -57,6 +59,9 @@
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<TargetExt>.asi</TargetExt>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
Expand Down Expand Up @@ -94,7 +99,7 @@
<Optimization>MaxSpeed</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
<EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(WindowsSdkDir)include;$(DXSDK_2008-03)Include</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(WindowsSdkDir)include;$(ProjectDir)dxsdk</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;_SHDN;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
Expand All @@ -107,7 +112,7 @@
<UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
</ProjectReference>
<Link>
<AdditionalDependencies>%(AdditionalDependencies);$(DXSDK_2008-03)Lib\x86\d3dx9.lib;..\ScriptHook\bin\ScriptHook.lib</AdditionalDependencies>
<AdditionalDependencies>%(AdditionalDependencies);$(ProjectDir)dxsdk\d3dx9.lib;$(ProjectDir)ScriptHook.lib</AdditionalDependencies>
<AdditionalManifestDependencies>%(AdditionalManifestDependencies)</AdditionalManifestDependencies>
<UACExecutionLevel>AsInvoker</UACExecutionLevel>
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
Expand All @@ -124,18 +129,23 @@
<CLRThreadAttribute>DefaultThreadingAttribute</CLRThreadAttribute>
</Link>
<PostBuildEvent>
<Command>..\bin\_postbuild.bat</Command>
<Command>
</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
<Reference Include="Microsoft.CSharp" />
<Reference Include="System">
<CopyLocalSatelliteAssemblies>true</CopyLocalSatelliteAssemblies>
<ReferenceOutputAssembly>true</ReferenceOutputAssembly>
</Reference>
<Reference Include="System.Core" />
<Reference Include="System.Drawing">
<CopyLocalSatelliteAssemblies>true</CopyLocalSatelliteAssemblies>
<ReferenceOutputAssembly>true</ReferenceOutputAssembly>
</Reference>
<Reference Include="System.Dynamic" />
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<Reference Include="System.Windows.Forms">
<CopyLocalSatelliteAssemblies>true</CopyLocalSatelliteAssemblies>
<ReferenceOutputAssembly>true</ReferenceOutputAssembly>
Expand Down
78 changes: 78 additions & 0 deletions ScriptHookDotNet/dxsdk/d3dx9.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
//////////////////////////////////////////////////////////////////////////////
//
// Copyright (C) Microsoft Corporation. All Rights Reserved.
//
// File: d3dx9.h
// Content: D3DX utility library
//
//////////////////////////////////////////////////////////////////////////////

#ifdef __D3DX_INTERNAL__
#error Incorrect D3DX header used
#endif

#ifndef __D3DX9_H__
#define __D3DX9_H__


// Defines
#include <limits.h>

#define D3DX_DEFAULT ((UINT) -1)
#define D3DX_DEFAULT_NONPOW2 ((UINT) -2)
#define D3DX_DEFAULT_FLOAT FLT_MAX
#define D3DX_FROM_FILE ((UINT) -3)
#define D3DFMT_FROM_FILE ((D3DFORMAT) -3)

#ifndef D3DXINLINE
#ifdef _MSC_VER
#if (_MSC_VER >= 1200)
#define D3DXINLINE __forceinline
#else
#define D3DXINLINE __inline
#endif
#else
#ifdef __cplusplus
#define D3DXINLINE inline
#else
#define D3DXINLINE
#endif
#endif
#endif



// Includes
#include "d3d9.h"
#include "d3dx9math.h"
#include "d3dx9core.h"
#include "d3dx9xof.h"
#include "d3dx9mesh.h"
#include "d3dx9shader.h"
#include "d3dx9effect.h"

#include "d3dx9tex.h"
#include "d3dx9shape.h"
#include "d3dx9anim.h"



// Errors
#define _FACDD 0x876
#define MAKE_DDHRESULT( code ) MAKE_HRESULT( 1, _FACDD, code )

enum _D3DXERR {
D3DXERR_CANNOTMODIFYINDEXBUFFER = MAKE_DDHRESULT(2900),
D3DXERR_INVALIDMESH = MAKE_DDHRESULT(2901),
D3DXERR_CANNOTATTRSORT = MAKE_DDHRESULT(2902),
D3DXERR_SKINNINGNOTSUPPORTED = MAKE_DDHRESULT(2903),
D3DXERR_TOOMANYINFLUENCES = MAKE_DDHRESULT(2904),
D3DXERR_INVALIDDATA = MAKE_DDHRESULT(2905),
D3DXERR_LOADEDMESHASNODATA = MAKE_DDHRESULT(2906),
D3DXERR_DUPLICATENAMEDFRAGMENT = MAKE_DDHRESULT(2907),
D3DXERR_CANNOTREMOVELASTITEM = MAKE_DDHRESULT(2908),
};


#endif //__D3DX9_H__

Loading

0 comments on commit 3f61ef4

Please sign in to comment.