Skip to content

Commit

Permalink
Revert the changes to ice arrows
Browse files Browse the repository at this point in the history
* Hide the new sparkle actors.
* Make ice arrows create ice platforms outside of Gyorg's room too.
  • Loading branch information
leoetlino committed Jul 7, 2019
1 parent c236a0b commit 566bab8
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 3 deletions.
8 changes: 5 additions & 3 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,13 @@ so playing on a New 3DS/2DS or Citra is recommended for a better experience.
* Reduced the number of cycles to make it less repetitive.
* Red Twinmold no longer resets its hit counter every time it burrows back into the sand. As a result, the battle is much less confusing for new players.

### Planned changes
* **Restored Ice Arrows**: Ice arrows that work everywhere
* Ice arrows now work in all locations, not just in Gyorg's room. This gives the player the freedom to experiment with ice arrows.
* Removed the sparkling water effects as they were an insult to the player's intelligence.

In a roughly increasing order of difficulty. Most tasks below require reverse engineering actors.
### Planned changes

* **Ice Arrows Everywhere**: There is no reason ice arrows should only work on a few sparkling spots and in Gyorg's boss room. The player should have the freedom to experiment with ice arrows. It's a frankly surprising limitation and worse, an inconsistent one because the water in the GBT boss room isn't even sparkling. I'm also considering removing the sparkling effects.
In a roughly increasing order of difficulty.

* **More Fluid Bomber's Notebook**: MM3D has annoying long popups and UI animations. It should be possible to decrease the transition durations and reduce pauses.

Expand Down
4 changes: 4 additions & 0 deletions source/game/actor.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ class Actor;
enum class Id : u16 {
Player = 0,
BossTwinmold = 0xcc,
// Ice platform created using ice arrows.
BgIcePlatform = 0x013E,
// New in MM3D. Actor that shows up as sparkles and spawns an ice platform (actor 0x13E) when hit.
BgSeaFreezablePoint = 0x0244,
};

// https://wiki.cloudmodding.com/oot/Actors#Categories
Expand Down
14 changes: 14 additions & 0 deletions source/rst/fixes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,4 +104,18 @@ void FixTwinmold() {
state->red_prev_hit_counter = red_twinmold->hit_counter;
}

void FixIceArrows() {
const auto* gctx = GetContext().gctx;
game::act::Actor* actor = gctx->actors.lists[u8(game::act::Type::Prop)].first;
while (actor) {
// Hide the new sparkle actors by moving them.
if (actor->id == game::act::Id::BgSeaFreezablePoint) {
actor->position.y = -100000.0;
}
actor = actor->next;
}

// The main fix is a code patch that removes the entrance restriction for ice arrows.
}

} // namespace rst
2 changes: 2 additions & 0 deletions source/rst/fixes.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ void FixTime();

void FixTwinmold();

void FixIceArrows();

} // namespace rst
1 change: 1 addition & 0 deletions source/rst/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ void Calc(game::GlobalContext* gctx) {
link::HandleFastOcarina();
// FixTime();
FixTwinmold();
FixIceArrows();
}

} // namespace rst
Expand Down
5 changes: 5 additions & 0 deletions v100/hooks.hks
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,11 @@ decouple_trigger_btns:
data: 12 00 00 EA # skips over the ZL/ZR checks
addr: 0x1166C8

ice_arrows:
type: patch
data: 00 F0 20 E3 # nop
addr: 0x31874C

main_hook:
type: softbranch
opcode: post
Expand Down
5 changes: 5 additions & 0 deletions v110/hooks.hks
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,11 @@ decouple_trigger_btns:
data: 12 00 00 EA # skips over the ZL/ZR checks
addr: 0x1167C8

ice_arrows:
type: patch
data: 00 F0 20 E3 # nop
addr: 0x318898

main_hook:
type: softbranch
opcode: post
Expand Down

0 comments on commit 566bab8

Please sign in to comment.