Skip to content

Commit 8136be7

Browse files
committed
v1.0.5.3 Updated Native Hashes
grabbed latest natives from https://alloc8or.github.io/rdr3-native-db/ credit to Unknown as always :)
1 parent 7f0cb02 commit 8136be7

File tree

9 files changed

+1091
-907
lines changed

9 files changed

+1091
-907
lines changed

source/core/DllMain.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ namespace WinForms = System::Windows::Forms;
1313
[assembly:AssemblyCompanyAttribute("Salty, SHVDN: crosire & contributors")];
1414
[assembly:AssemblyProductAttribute("ScriptHookRDRDotNet")];
1515
[assembly:AssemblyDescriptionAttribute("An ASI plugin for Red Dead Redemption 2, which allows running scripts written in any .NET language in-game.")];
16-
[assembly:AssemblyVersionAttribute("1.0.5.2")];
16+
[assembly:AssemblyVersionAttribute("1.0.5.3")];
1717
[assembly:AssemblyCopyrightAttribute("Copyright © 2015 crosire | Copyright © 2019 Salty")];
1818
// Sign with a strong name to distinguish from older versions and cause .NET framework runtime to bind the correct assemblies
1919
// There is no version check performed for assemblies without strong names (https://docs.microsoft.com/en-us/dotnet/framework/deployment/how-the-runtime-locates-assemblies)

source/scripting_v3/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,5 @@
2828
// Build Number
2929
// Revision
3030
//
31-
[assembly: AssemblyVersion("1.0.5.2")]
32-
[assembly: AssemblyFileVersion("1.0.5.2")]
31+
[assembly: AssemblyVersion("1.0.5.3")]
32+
[assembly: AssemblyFileVersion("1.0.5.3")]

source/scripting_v3/RDR2.Native/NativeHashes.cs

Lines changed: 537 additions & 445 deletions
Large diffs are not rendered by default.

source/scripting_v3/RDR2.UI/Screen.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,9 @@ public static void ShowSubtitle(string message)
147147
try
148148
{
149149
string varString = Function.Call<string>(Hash.CREATE_STRING, 10, "LITERAL_STRING", message);
150-
Function.Call(Hash._LOG_SET_CACHED_OBJECTIVE, varString);
151-
Function.Call(Hash._LOG_PRINT_CACHED_OBJECTIVE);
152-
Function.Call(Hash._LOG_CLEAR_CACHED_OBJECTIVE);
150+
Function.Call(Hash._UILOG_SET_CACHED_OBJECTIVE, varString);
151+
Function.Call(Hash._UILOG_PRINT_CACHED_OBJECTIVE);
152+
Function.Call(Hash._UILOG_CLEAR_CACHED_OBJECTIVE);
153153
}
154154
catch (Exception ex)
155155
{

source/scripting_v3/RDR2.UI/TextElement.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ void InternalDraw(SizeF offset, float screenWidth, float screenHeight)
280280
Function.Call(Hash.SET_TEXT_SCALE, Scale, Scale);
281281
Function.Call(Hash._SET_TEXT_COLOR, Color.R, Color.G, Color.B, Color.A);
282282
string varString = Function.Call<string>(Hash.CREATE_STRING, 10, "LITERAL_STRING", _caption);
283-
Function.Call(Hash._DRAW_TEXT, varString, x, y);
283+
Function.Call(Hash._DISPLAY_TEXT, varString, x, y);
284284

285285
}
286286
}

source/scripting_v3/RDR2/GameplayCamera.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public static float RelativeHeading
7575
set => Function.Call(Hash.SET_GAMEPLAY_CAM_RELATIVE_HEADING, value);
7676
}
7777

78-
public static float Zoom => Function.Call<float>(Hash._GET_GAMEPLAY_CAM_ZOOM);
78+
public static float Zoom => Function.Call<float>((Hash)0xB4132CA1B0EE1365);
7979
public static float FieldOfView => Function.Call<float>(Hash.GET_GAMEPLAY_CAM_FOV);
8080

8181
public static bool IsRendering => Function.Call<bool>(Hash.IS_GAMEPLAY_CAM_RENDERING);

source/scripting_v3/RDR2/Prompt.cs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using System;
22
using RDR2.Native;
33

4-
namespace RDR2
4+
namespace RDR2.UI
55
{
66
public sealed class Prompt : PoolObject, IEquatable<Prompt>
77
{
@@ -13,40 +13,40 @@ public string Text
1313
set {
1414
_text = value;
1515
var strPtr = Function.Call<string>((Hash)0xFA925AC00EB830B9, 10, "LITERAL_STRING", value);
16-
Function.Call(Hash._PROMPT_SET_TEXT, Handle, strPtr);
16+
Function.Call(Hash._UIPROMPT_SET_TEXT, Handle, strPtr);
1717
}
1818
}
1919

2020
public bool IsVisible
2121
{
22-
get => Function.Call<bool>(Hash._PROMPT_IS_ACTIVE, Handle);
23-
set => Function.Call(Hash._PROMPT_SET_VISIBLE, Handle, value);
22+
get => Function.Call<bool>(Hash._UIPROMPT_IS_ACTIVE, Handle);
23+
set => Function.Call(Hash._UIPROMPT_SET_VISIBLE, Handle, value);
2424
}
2525

2626
public int HoldTime
2727
{
28-
set => Function.Call(Hash._PROMPT_SET_PRESSED_TIMED_MODE, value);
28+
set => Function.Call(Hash._UIPROMPT_SET_PRESSED_TIMED_MODE, value);
2929
}
3030

31-
public bool IsPressed => Function.Call<bool>(Hash._PROMPT_IS_PRESSED, Handle);
32-
public bool IsJustPressed => Function.Call<bool>(Hash._PROMPT_IS_JUST_PRESSED, Handle);
33-
public bool IsReleased => Function.Call<bool>(Hash._PROMPT_IS_RELEASED, Handle);
34-
public bool IsJustReleased => Function.Call<bool>(Hash._PROMPT_IS_JUST_RELEASED, Handle);
31+
public bool IsPressed => Function.Call<bool>(Hash._UIPROMPT_IS_PRESSED, Handle);
32+
public bool IsJustPressed => Function.Call<bool>(Hash._UIPROMPT_IS_JUST_PRESSED, Handle);
33+
public bool IsReleased => Function.Call<bool>(Hash._UIPROMPT_IS_RELEASED, Handle);
34+
public bool IsJustReleased => Function.Call<bool>(Hash._UIPROMPT_IS_JUST_RELEASED, Handle);
3535

3636
public Control Control
3737
{
38-
set => Function.Call(Hash._PROMPT_SET_CONTROL_ACTION, (uint)value);
38+
set => Function.Call(Hash._UIPROMPT_SET_CONTROL_ACTION, (uint)value);
3939
}
4040

4141
public int Priority
4242
{
43-
set => Function.Call(Hash._PROMPT_SET_PRIORITY, Handle, value);
43+
set => Function.Call(Hash._UIPROMPT_SET_PRIORITY, Handle, value);
4444
}
4545

4646
public bool IsPulsating
4747
{
48-
get => Function.Call<bool>(Hash._PROMPT_GET_URGENT_PULSING_ENABLED, Handle);
49-
set => Function.Call(Hash._PROMPT_SET_URGENT_PULSING_ENABLED, Handle, value);
48+
get => Function.Call<bool>(Hash._UIPROMPT_GET_URGENT_PULSING_ENABLED, Handle);
49+
set => Function.Call(Hash._UIPROMPT_SET_URGENT_PULSING_ENABLED, Handle, value);
5050
}
5151

5252
public Prompt(int handle) : base(handle)
@@ -61,12 +61,12 @@ public bool Equals(Prompt other)
6161

6262
public override bool Exists()
6363
{
64-
return Function.Call<bool>(Hash._PROMPT_IS_VALID, Handle);
64+
return Function.Call<bool>(Hash._UIPROMPT_IS_VALID, Handle);
6565
}
6666

6767
public override void Delete()
6868
{
69-
Function.Call(Hash._PROMPT_DELETE, Handle);
69+
Function.Call(Hash._UIPROMPT_DELETE, Handle);
7070
}
7171

7272
public override bool Equals(object obj)

tools/NativeGen.exe

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)