Skip to content

Commit

Permalink
v1.0.5.3 Updated Native Hashes
Browse files Browse the repository at this point in the history
grabbed latest natives from
https://alloc8or.github.io/rdr3-native-db/
credit to Unknown as always :)
  • Loading branch information
Saltyq committed Dec 18, 2019
1 parent 7f0cb02 commit 8136be7
Show file tree
Hide file tree
Showing 9 changed files with 1,091 additions and 907 deletions.
2 changes: 1 addition & 1 deletion source/core/DllMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace WinForms = System::Windows::Forms;
[assembly:AssemblyCompanyAttribute("Salty, SHVDN: crosire & contributors")];
[assembly:AssemblyProductAttribute("ScriptHookRDRDotNet")];
[assembly:AssemblyDescriptionAttribute("An ASI plugin for Red Dead Redemption 2, which allows running scripts written in any .NET language in-game.")];
[assembly:AssemblyVersionAttribute("1.0.5.2")];
[assembly:AssemblyVersionAttribute("1.0.5.3")];
[assembly:AssemblyCopyrightAttribute("Copyright © 2015 crosire | Copyright © 2019 Salty")];
// Sign with a strong name to distinguish from older versions and cause .NET framework runtime to bind the correct assemblies
// 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)
Expand Down
4 changes: 2 additions & 2 deletions source/scripting_v3/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@
// Build Number
// Revision
//
[assembly: AssemblyVersion("1.0.5.2")]
[assembly: AssemblyFileVersion("1.0.5.2")]
[assembly: AssemblyVersion("1.0.5.3")]
[assembly: AssemblyFileVersion("1.0.5.3")]
982 changes: 537 additions & 445 deletions source/scripting_v3/RDR2.Native/NativeHashes.cs

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions source/scripting_v3/RDR2.UI/Screen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,9 @@ public static void ShowSubtitle(string message)
try
{
string varString = Function.Call<string>(Hash.CREATE_STRING, 10, "LITERAL_STRING", message);
Function.Call(Hash._LOG_SET_CACHED_OBJECTIVE, varString);
Function.Call(Hash._LOG_PRINT_CACHED_OBJECTIVE);
Function.Call(Hash._LOG_CLEAR_CACHED_OBJECTIVE);
Function.Call(Hash._UILOG_SET_CACHED_OBJECTIVE, varString);
Function.Call(Hash._UILOG_PRINT_CACHED_OBJECTIVE);
Function.Call(Hash._UILOG_CLEAR_CACHED_OBJECTIVE);
}
catch (Exception ex)
{
Expand Down
2 changes: 1 addition & 1 deletion source/scripting_v3/RDR2.UI/TextElement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ void InternalDraw(SizeF offset, float screenWidth, float screenHeight)
Function.Call(Hash.SET_TEXT_SCALE, Scale, Scale);
Function.Call(Hash._SET_TEXT_COLOR, Color.R, Color.G, Color.B, Color.A);
string varString = Function.Call<string>(Hash.CREATE_STRING, 10, "LITERAL_STRING", _caption);
Function.Call(Hash._DRAW_TEXT, varString, x, y);
Function.Call(Hash._DISPLAY_TEXT, varString, x, y);

}
}
Expand Down
2 changes: 1 addition & 1 deletion source/scripting_v3/RDR2/GameplayCamera.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public static float RelativeHeading
set => Function.Call(Hash.SET_GAMEPLAY_CAM_RELATIVE_HEADING, value);
}

public static float Zoom => Function.Call<float>(Hash._GET_GAMEPLAY_CAM_ZOOM);
public static float Zoom => Function.Call<float>((Hash)0xB4132CA1B0EE1365);
public static float FieldOfView => Function.Call<float>(Hash.GET_GAMEPLAY_CAM_FOV);

public static bool IsRendering => Function.Call<bool>(Hash.IS_GAMEPLAY_CAM_RENDERING);
Expand Down
30 changes: 15 additions & 15 deletions source/scripting_v3/RDR2/Prompt.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using RDR2.Native;

namespace RDR2
namespace RDR2.UI
{
public sealed class Prompt : PoolObject, IEquatable<Prompt>
{
Expand All @@ -13,40 +13,40 @@ public string Text
set {
_text = value;
var strPtr = Function.Call<string>((Hash)0xFA925AC00EB830B9, 10, "LITERAL_STRING", value);
Function.Call(Hash._PROMPT_SET_TEXT, Handle, strPtr);
Function.Call(Hash._UIPROMPT_SET_TEXT, Handle, strPtr);
}
}

public bool IsVisible
{
get => Function.Call<bool>(Hash._PROMPT_IS_ACTIVE, Handle);
set => Function.Call(Hash._PROMPT_SET_VISIBLE, Handle, value);
get => Function.Call<bool>(Hash._UIPROMPT_IS_ACTIVE, Handle);
set => Function.Call(Hash._UIPROMPT_SET_VISIBLE, Handle, value);
}

public int HoldTime
{
set => Function.Call(Hash._PROMPT_SET_PRESSED_TIMED_MODE, value);
set => Function.Call(Hash._UIPROMPT_SET_PRESSED_TIMED_MODE, value);
}

public bool IsPressed => Function.Call<bool>(Hash._PROMPT_IS_PRESSED, Handle);
public bool IsJustPressed => Function.Call<bool>(Hash._PROMPT_IS_JUST_PRESSED, Handle);
public bool IsReleased => Function.Call<bool>(Hash._PROMPT_IS_RELEASED, Handle);
public bool IsJustReleased => Function.Call<bool>(Hash._PROMPT_IS_JUST_RELEASED, Handle);
public bool IsPressed => Function.Call<bool>(Hash._UIPROMPT_IS_PRESSED, Handle);
public bool IsJustPressed => Function.Call<bool>(Hash._UIPROMPT_IS_JUST_PRESSED, Handle);
public bool IsReleased => Function.Call<bool>(Hash._UIPROMPT_IS_RELEASED, Handle);
public bool IsJustReleased => Function.Call<bool>(Hash._UIPROMPT_IS_JUST_RELEASED, Handle);

public Control Control
{
set => Function.Call(Hash._PROMPT_SET_CONTROL_ACTION, (uint)value);
set => Function.Call(Hash._UIPROMPT_SET_CONTROL_ACTION, (uint)value);
}

public int Priority
{
set => Function.Call(Hash._PROMPT_SET_PRIORITY, Handle, value);
set => Function.Call(Hash._UIPROMPT_SET_PRIORITY, Handle, value);
}

public bool IsPulsating
{
get => Function.Call<bool>(Hash._PROMPT_GET_URGENT_PULSING_ENABLED, Handle);
set => Function.Call(Hash._PROMPT_SET_URGENT_PULSING_ENABLED, Handle, value);
get => Function.Call<bool>(Hash._UIPROMPT_GET_URGENT_PULSING_ENABLED, Handle);
set => Function.Call(Hash._UIPROMPT_SET_URGENT_PULSING_ENABLED, Handle, value);
}

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

public override bool Exists()
{
return Function.Call<bool>(Hash._PROMPT_IS_VALID, Handle);
return Function.Call<bool>(Hash._UIPROMPT_IS_VALID, Handle);
}

public override void Delete()
{
Function.Call(Hash._PROMPT_DELETE, Handle);
Function.Call(Hash._UIPROMPT_DELETE, Handle);
}

public override bool Equals(object obj)
Expand Down
Binary file modified tools/NativeGen.exe
Binary file not shown.
Loading

0 comments on commit 8136be7

Please sign in to comment.