Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

13.0.3 Support #589

Merged
merged 2 commits into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,7 @@ Cargo.lock

# Ignore a folder and script I'm using for testing web stuff
/resources/testing
/resources/copy.py
/resources/copy.py/resources/copy.py

# Mac moment
**/.DS_Store
34 changes: 17 additions & 17 deletions src/fixes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,25 +51,25 @@ fn install_added_color_patches() {
*/
// OFFSETS ARE CURRENTLY HARDCODED TO VERSION 13.0.2
static ADDED_COLOR_PATCHES: &[(usize, u32)] = &[
(0x18355dc, 0xF104027F), // cmp x19, #256 (Issue related to Aegis)
(0x183529c, 0xF104027F), // cmp x19, #256 (Issue related to Aegis)
(0x18355f8, 0xF104011F), // cmp x8, #256 (Issue related to Aegis)
(0x18359c8, 0xF10402FF), // cmp x23, #256 (Issue related to Aegis)
(0x1835e5c, 0xF104011F), // cmp x8, #256 (Issue related to Aegis)
(0x18365b4, 0xF104027F), // cmp x19, #256 (Issue related to Aegis)
(0x18368d0, 0xF104013F), // cmp x9, #256 (Issue related to Aegis)
(0x1a1cdd0, 0xF104011F), // cmp x8, #256 (Issue related to Aegis)
(0x1a1ce14, 0xF104011F), // cmp x8, #256 (Issue related to Aegis)
(0x18355fc, 0xF104027F), // cmp x19, #256 (Issue related to Aegis)
(0x18352bc, 0xF104027F), // cmp x19, #256 (Issue related to Aegis)
(0x1835618, 0xF104011F), // cmp x8, #256 (Issue related to Aegis)
(0x18359e8, 0xF10402FF), // cmp x23, #256 (Issue related to Aegis)
(0x1835e7c, 0xF104011F), // cmp x8, #256 (Issue related to Aegis)
(0x18365d4, 0xF104027F), // cmp x19, #256 (Issue related to Aegis)
(0x18368f0, 0xF104013F), // cmp x9, #256 (Issue related to Aegis)
(0x1a1cdf0, 0xF104011F), // cmp x8, #256 (Issue related to Aegis)
(0x1a1ce34, 0xF104011F), // cmp x8, #256 (Issue related to Aegis)
(0x14de31c, 0x7104013F), // cmp w9, #256 (Issue related to Terry)
(0x14e1624, 0x710402FF), // cmp w23, #256 (Issue related to Terry)
(0x14e17b0, 0x7104011F), // cmp w8, #256 (Issue related to Terry)
(0x1a56064, 0x52800020), // mov w0, #1 (Issue related to Tourney Mode Crash)
(0x1a56194, 0xF104011F), // cmp x8, #256 (Issue related to Tourney Mode Crash)
(0x1a55a54, 0x7104015F), // cmp w10, #256 (Issue related to Tourney Mode Crash)
(0x1a55aec, 0x7104001F), // cmp w0, #256 (Issue related to Tourney Mode Crash)
(0x1a55b18, 0xF104001F), // cmp x0, #256 (Issue related to Tourney Mode Crash)
(0x1a55a80, 0xF104001F), // cmp x0, #256 (Issue related to Tourney Mode Crash)
(0x1a55ab4, 0x7104017F), // cmp w11, #256 (Issue related to Tourney Mode Crash)
(0x1a56084, 0x52800020), // mov w0, #1 (Issue related to Tourney Mode Crash)
(0x1a561b4, 0xF104011F), // cmp x8, #256 (Issue related to Tourney Mode Crash)
(0x1a55a74, 0x7104015F), // cmp w10, #256 (Issue related to Tourney Mode Crash)
(0x1a55b0c, 0x7104001F), // cmp w0, #256 (Issue related to Tourney Mode Crash)
(0x1a55b38, 0xF104001F), // cmp x0, #256 (Issue related to Tourney Mode Crash)
(0x1a55aa0, 0xF104001F), // cmp x0, #256 (Issue related to Tourney Mode Crash)
(0x1a55ad4, 0x7104017F), // cmp w11, #256 (Issue related to Tourney Mode Crash)
];

for entry in ADDED_COLOR_PATCHES {
Expand Down Expand Up @@ -116,7 +116,7 @@ fn install_lazy_loading_patches() {
pub fn get_ui_chara_path_from_hash_color_and_type(ui_chara_hash: u64, color_slot: u32, ui_type: u32) -> u64;

// This takes the character_database and the ui_chara_hash to get the color_num
#[from_offset(0x32384a0)]
#[from_offset(0x32384c0)]
pub fn get_color_num_from_hash(character_database: u64, ui_chara_hash: u64) -> u8;

// This takes the character_database and the ui_chara_hash to get the chara's respective echo (for loading it at the same time)
Expand Down
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -435,8 +435,8 @@ pub fn main() {
);
}));

if utils::env::get_game_version() != semver::Version::new(13, 0, 2) {
skyline::error::show_error(69, "Smash Ultimate requires an update.\0", "ARCropolis cannot currently run on a Smash version other than 13.0.2\n\nConsider updating your game or uninstalling ARCropolis.\0");
if utils::env::get_game_version() != semver::Version::new(13, 0, 3) {
skyline::error::show_error(69, "Smash Ultimate requires an update.\0", "ARCropolis cannot currently run on a Smash version other than 13.0.3\n\nConsider updating your game or uninstalling ARCropolis.\0");
// Do not perform any of the hook installation and let the game proceed as normal.
return;
}
Expand Down
6 changes: 3 additions & 3 deletions src/lua/lua.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ fn lua_getfield(lua_state: &mut lua_state, lua_registry: *const TValue, name: *c
#[from_offset(offsets::lua_setmetatable())]
fn lua_setmetatable(lua_state: &mut lua_state, obj_idx: i32);

#[from_offset(0x38f68b0)]
#[from_offset(0x38f68d0)]
fn lua_tonumberx(lua_state: &mut lua_state, idx: i32, unk: *const u64) -> f32;

#[from_offset(0x38f3c00)]
#[from_offset(0x38f3c20)]
fn lua_tointegerx(lua_state: &mut lua_state, idx: i32, unk: *const u64) -> u64;

#[from_offset(0x38f3d80)]
#[from_offset(0x38f3da0)]
fn lua_tolstring(lua_state: &mut lua_state, idx: i32, unk: *const u64) -> *const u8;

#[from_offset(offsets::declare_namespace())]
Expand Down
Loading