Skip to content

Commit e64b805

Browse files
authored
13.0.3 Support (#589)
* ignore ds store * 13.0.3 offsets
1 parent e14b588 commit e64b805

File tree

4 files changed

+26
-23
lines changed

4 files changed

+26
-23
lines changed

.gitignore

+4-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,7 @@ Cargo.lock
1313

1414
# Ignore a folder and script I'm using for testing web stuff
1515
/resources/testing
16-
/resources/copy.py
16+
/resources/copy.py/resources/copy.py
17+
18+
# Mac moment
19+
**/.DS_Store

src/fixes.rs

+17-17
Original file line numberDiff line numberDiff line change
@@ -51,25 +51,25 @@ fn install_added_color_patches() {
5151
*/
5252
// OFFSETS ARE CURRENTLY HARDCODED TO VERSION 13.0.2
5353
static ADDED_COLOR_PATCHES: &[(usize, u32)] = &[
54-
(0x18355dc, 0xF104027F), // cmp x19, #256 (Issue related to Aegis)
55-
(0x183529c, 0xF104027F), // cmp x19, #256 (Issue related to Aegis)
56-
(0x18355f8, 0xF104011F), // cmp x8, #256 (Issue related to Aegis)
57-
(0x18359c8, 0xF10402FF), // cmp x23, #256 (Issue related to Aegis)
58-
(0x1835e5c, 0xF104011F), // cmp x8, #256 (Issue related to Aegis)
59-
(0x18365b4, 0xF104027F), // cmp x19, #256 (Issue related to Aegis)
60-
(0x18368d0, 0xF104013F), // cmp x9, #256 (Issue related to Aegis)
61-
(0x1a1cdd0, 0xF104011F), // cmp x8, #256 (Issue related to Aegis)
62-
(0x1a1ce14, 0xF104011F), // cmp x8, #256 (Issue related to Aegis)
54+
(0x18355fc, 0xF104027F), // cmp x19, #256 (Issue related to Aegis)
55+
(0x18352bc, 0xF104027F), // cmp x19, #256 (Issue related to Aegis)
56+
(0x1835618, 0xF104011F), // cmp x8, #256 (Issue related to Aegis)
57+
(0x18359e8, 0xF10402FF), // cmp x23, #256 (Issue related to Aegis)
58+
(0x1835e7c, 0xF104011F), // cmp x8, #256 (Issue related to Aegis)
59+
(0x18365d4, 0xF104027F), // cmp x19, #256 (Issue related to Aegis)
60+
(0x18368f0, 0xF104013F), // cmp x9, #256 (Issue related to Aegis)
61+
(0x1a1cdf0, 0xF104011F), // cmp x8, #256 (Issue related to Aegis)
62+
(0x1a1ce34, 0xF104011F), // cmp x8, #256 (Issue related to Aegis)
6363
(0x14de31c, 0x7104013F), // cmp w9, #256 (Issue related to Terry)
6464
(0x14e1624, 0x710402FF), // cmp w23, #256 (Issue related to Terry)
6565
(0x14e17b0, 0x7104011F), // cmp w8, #256 (Issue related to Terry)
66-
(0x1a56064, 0x52800020), // mov w0, #1 (Issue related to Tourney Mode Crash)
67-
(0x1a56194, 0xF104011F), // cmp x8, #256 (Issue related to Tourney Mode Crash)
68-
(0x1a55a54, 0x7104015F), // cmp w10, #256 (Issue related to Tourney Mode Crash)
69-
(0x1a55aec, 0x7104001F), // cmp w0, #256 (Issue related to Tourney Mode Crash)
70-
(0x1a55b18, 0xF104001F), // cmp x0, #256 (Issue related to Tourney Mode Crash)
71-
(0x1a55a80, 0xF104001F), // cmp x0, #256 (Issue related to Tourney Mode Crash)
72-
(0x1a55ab4, 0x7104017F), // cmp w11, #256 (Issue related to Tourney Mode Crash)
66+
(0x1a56084, 0x52800020), // mov w0, #1 (Issue related to Tourney Mode Crash)
67+
(0x1a561b4, 0xF104011F), // cmp x8, #256 (Issue related to Tourney Mode Crash)
68+
(0x1a55a74, 0x7104015F), // cmp w10, #256 (Issue related to Tourney Mode Crash)
69+
(0x1a55b0c, 0x7104001F), // cmp w0, #256 (Issue related to Tourney Mode Crash)
70+
(0x1a55b38, 0xF104001F), // cmp x0, #256 (Issue related to Tourney Mode Crash)
71+
(0x1a55aa0, 0xF104001F), // cmp x0, #256 (Issue related to Tourney Mode Crash)
72+
(0x1a55ad4, 0x7104017F), // cmp w11, #256 (Issue related to Tourney Mode Crash)
7373
];
7474

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

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

122122
// This takes the character_database and the ui_chara_hash to get the chara's respective echo (for loading it at the same time)

src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -435,8 +435,8 @@ pub fn main() {
435435
);
436436
}));
437437

438-
if utils::env::get_game_version() != semver::Version::new(13, 0, 2) {
439-
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");
438+
if utils::env::get_game_version() != semver::Version::new(13, 0, 3) {
439+
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");
440440
// Do not perform any of the hook installation and let the game proceed as normal.
441441
return;
442442
}

src/lua/lua.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ fn lua_getfield(lua_state: &mut lua_state, lua_registry: *const TValue, name: *c
2727
#[from_offset(offsets::lua_setmetatable())]
2828
fn lua_setmetatable(lua_state: &mut lua_state, obj_idx: i32);
2929

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

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

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

3939
#[from_offset(offsets::declare_namespace())]

0 commit comments

Comments
 (0)