Skip to content

Commit a648fba

Browse files
committed
Fix joystick rotation (vanilla bug)
1 parent 64f80db commit a648fba

File tree

4 files changed

+17
-2
lines changed

4 files changed

+17
-2
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ A randomizer for The Legend of Zelda: A Link Between Worlds.
8181
- Rosso
8282
- Now appears properly inside his house when rescued, instead of the "Crooked Chest".
8383
- Rupees will now be named correctly in shops instead of being referred to as "Play Coins"
84+
- Fix the vanilla joystick bug that causes all inputs to be rotated 5 degrees counterclockwise.
8485
- **Logic Changes**
8586
- All:
8687
- Dungeons now expect a certain amount of health to be available before entering logic.

presets/Example.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
// "Visit the project GitHub for details about each option: https://github.com/rickfay/z17-randomizer/tree/dev#game-options"
33
"seed": 0,
4-
"version": "v0.4.0 - Beta Build 2024-09-05",
4+
"version": "v0.4.0 - Beta Build 2024-12-02",
55
"settings": {
66

77

randomizer/src/constants.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//! Application Constants
22
33
/// Build Version
4-
pub const VERSION: &str = "v0.4.0 - Beta Build 2024-09-05";
4+
pub const VERSION: &str = "v0.4.0 - Beta Build 2024-12-02";
55
pub const CONFIG_FILE_NAME: &str = "config.json";

randomizer/src/patch/code/mod.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ pub fn create(patcher: &Patcher, seed_info: &SeedInfo) -> Code {
178178
// instant text
179179
code.overwrite(0x17A430, [0xFF]);
180180

181+
fix_joystick_rotation(&mut code);
181182
rental_items(&mut code);
182183
progressive_items(&mut code);
183184
bracelet(&mut code, &seed_info.settings);
@@ -350,6 +351,19 @@ fn do_dev_stuff(code: &mut Code, seed_info: &SeedInfo) {
350351
code.patch(0x2559c0, [add(R2, R2, amount)]);
351352
}
352353

354+
/// For what are certainly reasons, Nintendo decided to rotate all of Link's movements ever so
355+
/// slightly (about 5 degrees) counterclockwise in the vanilla game. This isn't often complained
356+
/// about by people who play on physical 3DS hardware because reasons, but is very jarring to folks
357+
/// who play on Emulators, and makes navigating the Ice Cave much more difficult than intended.
358+
///
359+
/// This code sets the rotation angle for each direction to zero, eliminating the issue.
360+
fn fix_joystick_rotation(code: &mut Code) {
361+
code.overwrite(0x6c3ae8, [0x0; 8]); // Fix Down
362+
code.overwrite(0x6c3ef0, [0x0; 8]); // Fix Right
363+
code.overwrite(0x6c42e8, [0x0; 8]); // Fix Up
364+
code.overwrite(0x6c46f0, [0x0; 8]); // Fix Left
365+
}
366+
353367
/// File Select Screen Background
354368
/// TODO Figure out how to make background permanent
355369
#[allow(unused)]

0 commit comments

Comments
 (0)