Skip to content

Commit

Permalink
Merge branch 'fast_boat' into dev-fenhl
Browse files Browse the repository at this point in the history
# Conflicts:
#	Cutscenes.py
#	Patches.py
#	SettingsList.py
#	data/presets_default.json
  • Loading branch information
fenhl committed Aug 22, 2024
2 parents e97fc7b + f8b2a56 commit 65e3005
Show file tree
Hide file tree
Showing 7 changed files with 60 additions and 6 deletions.
23 changes: 21 additions & 2 deletions Cutscenes.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from typing import Optional

from Rom import Rom
from Settings import Settings

# The following helpers can be used when the cutscene is written in the form of CutsceneData instructions.
# This is the case for all cutscenes defined directly in their scenes, and some specific ones in their actor file.
Expand Down Expand Up @@ -73,8 +74,7 @@ def patch_cutscene_misc_command(rom: Rom, address: int, start_frame:int, end_fra
rom.write_int16(address + 2, start_frame)
rom.write_int16(address + 4, end_frame)

def patch_cutscenes(rom: Rom, songs_as_items:bool) -> None:

def patch_cutscenes(rom: Rom, songs_as_items: bool, settings: Settings) -> None:
# Speed obtaining Fairy Ocarina
patch_cutscene_destination_and_length(rom, 0x2151230, 60)
# Make Link cross the whole bridge instead of stopping in the middle by moving the destinate coordinate
Expand Down Expand Up @@ -344,6 +344,25 @@ def patch_cutscenes(rom: Rom, songs_as_items:bool) -> None:
# Set the "Drain Well" flag at the second frame (first frame is used by the "Fast Windmill" flag).
patch_cutscene_misc_command(rom, 0x20010D8, 2, 3)

# This cutscene is not written in the shadow temple scene or in the boat actor, but directly in z_onepointdemo.c instead.
# So not compatible with our functions.
if settings.fast_shadow_boat:
# bg_haka_ship changes to make the boat go faster.
rom.write_int16(0xD1923E, 0x0000) # Timer to start moving
rom.write_int16(0xD19426, 0x4348) # Speed x10
rom.write_int16(0xD19436, 0x447A) # Speed x10
# Cutscene changes so that it lasts just long enough to prevent jumping to the skulltula.
# Remove all camera cues of the cutscene past the first one by changing the size of keyFrameCount to 1.
rom.write_int16(0xAE010E, 0x0001)
# Change first camera cue point of view to be less awkward.
# Change viewFlags to 2121, this will make the camera focus on Link.
rom.write_int16(0xB697F6, 0x2121)
# Change the length to 4 sec instead of 2 sec.
rom.write_int16(0xB697F8, 0x0050)
# Change the at/eye camera values to follow Link from behind.
# New value : { 0.0f, 0.0f, 0.0f }, { 50.0f, 30.0f, -200.0f}
rom.write_int32s(0xB69804, [0x00000000, 0x00000000, 0x00000000, 0x42480000, 0x42480000, 0xC3480000])

# Speed learning Requiem of Spirit
if songs_as_items:
patch_cutscene_destination_and_length(rom, 0x0218B480, 1)
Expand Down
2 changes: 1 addition & 1 deletion Patches.py
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ def make_bytes(txt: str, size: int) -> list[int]:
if world.settings.shuffle_ocarinas:
rom.write_byte(rom.sym('OCARINAS_SHUFFLED'), 0x01)

patch_cutscenes(rom, songs_as_items)
patch_cutscenes(rom, songs_as_items, world.settings)
patch_wondertalk2(rom)

# Speed Pushing of All Pushable Objects (other than armos statues, which are handled in ASM)
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ This branch (`dev-fenhl`) is based on [Roman971](https://github.com/Roman971)'s
Differences between `dev-fenhl` and [`Dev-R`](https://github.com/Roman971/OoT-Randomizer):

* New settings and options:
* New “Fast Shadow Boat” setting to shorten the boat ride autoscroller in the Shadow temple ([#2239](https://github.com/OoTRandomizer/OoT-Randomizer/pull/2239))
* New “Shuffle Gerudo Fortress Heart Piece” setting to control the behavior of this check with “Shuffle Thieves' Hideout Entrances” ([#2179](https://github.com/OoTRandomizer/OoT-Randomizer/pull/2179))
* New “Frogs Ocarina Game” option for the “Randomize Ocarina Song Notes” setting ([#2064](https://github.com/OoTRandomizer/OoT-Randomizer/pull/2064))
* New “Shuffle Ganon's Tower Entrance” setting ([#2063](https://github.com/OoTRandomizer/OoT-Randomizer/pull/2063))
Expand Down
11 changes: 10 additions & 1 deletion SettingsList.py
Original file line number Diff line number Diff line change
Expand Up @@ -3918,7 +3918,16 @@ class SettingInfos:
Only applied in the original version of the dungeon, since
in Master Quest you don't need to bring Ruto up.
''',
default = False,
shared = True,
)

fast_shadow_boat = Checkbutton(
gui_text = 'Fast Shadow Boat',
gui_tooltip = '''\
The boat sequence in Shadow Temple will be massively sped up.
The two Stalfos will still fall on the boat, but you
won't have time to fight them.
''',
shared = True,
)

Expand Down
24 changes: 24 additions & 0 deletions data/presets_default.json
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@
"easier_fire_arrow_entry": false,
"fae_torch_count": 3,
"ruto_already_f1_jabu": false,
"fast_shadow_boat": true,
"ocarina_songs": [
"warp",
"frogs2"
Expand Down Expand Up @@ -388,6 +389,7 @@
"easier_fire_arrow_entry": false,
"fae_torch_count": 3,
"ruto_already_f1_jabu": false,
"fast_shadow_boat": true,
"ocarina_songs": [
"warp",
"frogs2"
Expand Down Expand Up @@ -599,6 +601,7 @@
"easier_fire_arrow_entry": false,
"fae_torch_count": 3,
"ruto_already_f1_jabu": false,
"fast_shadow_boat": false,
"ocarina_songs": [],
"correct_chest_appearances": "off",
"chest_textures_specific": [
Expand Down Expand Up @@ -783,6 +786,7 @@
"easier_fire_arrow_entry": false,
"fae_torch_count": 3,
"ruto_already_f1_jabu": false,
"fast_shadow_boat": true,
"ocarina_songs": [],
"correct_chest_appearances": "off",
"chest_textures_specific": [
Expand Down Expand Up @@ -980,6 +984,7 @@
"easier_fire_arrow_entry": false,
"fae_torch_count": 3,
"ruto_already_f1_jabu": false,
"fast_shadow_boat": false,
"ocarina_songs": [],
"correct_chest_appearances": "off",
"chest_textures_specific": [
Expand Down Expand Up @@ -1177,6 +1182,7 @@
"easier_fire_arrow_entry": false,
"fae_torch_count": 3,
"ruto_already_f1_jabu": false,
"fast_shadow_boat": true,
"ocarina_songs": [],
"correct_chest_appearances": "off",
"chest_textures_specific": [
Expand Down Expand Up @@ -1391,6 +1397,7 @@
"easier_fire_arrow_entry": false,
"fae_torch_count": 3,
"ruto_already_f1_jabu": true,
"fast_shadow_boat": false,
"ocarina_songs": [],
"correct_chest_appearances": "both",
"chest_textures_specific": [
Expand Down Expand Up @@ -1631,6 +1638,7 @@
"easier_fire_arrow_entry": false,
"fae_torch_count": 3,
"ruto_already_f1_jabu": true,
"fast_shadow_boat": false,
"ocarina_songs": [],
"correct_chest_appearances": "both",
"chest_textures_specific": [
Expand Down Expand Up @@ -2134,6 +2142,7 @@
"easier_fire_arrow_entry": false,
"fae_torch_count": 3,
"ruto_already_f1_jabu": true,
"fast_shadow_boat": true,
"ocarina_songs": [],
"correct_chest_appearances": "off",
"chest_textures_specific": [
Expand Down Expand Up @@ -2644,6 +2653,7 @@
"easier_fire_arrow_entry": false,
"fae_torch_count": 3,
"ruto_already_f1_jabu": true,
"fast_shadow_boat": true,
"ocarina_songs": [],
"correct_chest_appearances": "off",
"chest_textures_specific": [
Expand Down Expand Up @@ -2878,6 +2888,7 @@
"easier_fire_arrow_entry": false,
"fae_torch_count": 3,
"ruto_already_f1_jabu": false,
"fast_shadow_boat": false,
"ocarina_songs": [],
"correct_chest_appearances": "both",
"chest_textures_specific": [
Expand Down Expand Up @@ -3107,6 +3118,7 @@
"easier_fire_arrow_entry": false,
"fae_torch_count": 3,
"ruto_already_f1_jabu": false,
"fast_shadow_boat": false,
"ocarina_songs": [],
"correct_chest_appearances": "both",
"chest_textures_specific": [
Expand Down Expand Up @@ -3328,6 +3340,7 @@
"easier_fire_arrow_entry": false,
"fae_torch_count": 3,
"ruto_already_f1_jabu": true,
"fast_shadow_boat": false,
"ocarina_songs": [],
"correct_chest_appearances": "both",
"chest_textures_specific": [
Expand Down Expand Up @@ -3534,6 +3547,7 @@
"easier_fire_arrow_entry": false,
"fae_torch_count": 3,
"ruto_already_f1_jabu": false,
"fast_shadow_boat": false,
"ocarina_songs": [],
"correct_chest_appearances": "off",
"chest_textures_specific": [
Expand Down Expand Up @@ -3764,6 +3778,7 @@
"easier_fire_arrow_entry": false,
"fae_torch_count": 3,
"ruto_already_f1_jabu": false,
"fast_shadow_boat": false,
"ocarina_songs": [],
"correct_chest_appearances": "both",
"chest_textures_specific": [
Expand Down Expand Up @@ -3992,6 +4007,7 @@
"easier_fire_arrow_entry": false,
"fae_torch_count": 3,
"ruto_already_f1_jabu": true,
"fast_shadow_boat": false,
"ocarina_songs": [],
"correct_chest_appearances": "both",
"chest_textures_specific": [
Expand Down Expand Up @@ -4221,6 +4237,7 @@
"easier_fire_arrow_entry": false,
"fae_torch_count": 3,
"ruto_already_f1_jabu": false,
"fast_shadow_boat": false,
"ocarina_songs": [],
"correct_chest_appearances": "off",
"chest_textures_specific": [
Expand Down Expand Up @@ -4452,6 +4469,7 @@
"easier_fire_arrow_entry": false,
"fae_torch_count": 3,
"ruto_already_f1_jabu": true,
"fast_shadow_boat": false,
"ocarina_songs": [],
"correct_chest_appearances": "textures",
"chest_textures_specific": [
Expand Down Expand Up @@ -4677,6 +4695,7 @@
"easier_fire_arrow_entry": false,
"fae_torch_count": 3,
"ruto_already_f1_jabu": true,
"fast_shadow_boat": false,
"ocarina_songs": [],
"correct_chest_appearances": "textures",
"chest_textures_specific": [
Expand Down Expand Up @@ -5080,6 +5099,7 @@
"easier_fire_arrow_entry": false,
"fae_torch_count": 3,
"ruto_already_f1_jabu": false,
"fast_shadow_boat": false,
"ocarina_songs": [
"frog",
"warp",
Expand Down Expand Up @@ -5294,6 +5314,7 @@
"easier_fire_arrow_entry": false,
"fae_torch_count": 3,
"ruto_already_f1_jabu": false,
"fast_shadow_boat": false,
"ocarina_songs": [],
"correct_chest_appearances": "off",
"chest_textures_specific": [
Expand Down Expand Up @@ -5530,6 +5551,7 @@
"easier_fire_arrow_entry": false,
"fae_torch_count": 3,
"ruto_already_f1_jabu": true,
"fast_shadow_boat": false,
"ocarina_songs": [],
"correct_chest_appearances": "both",
"chest_textures_specific": [
Expand Down Expand Up @@ -5763,6 +5785,7 @@
"easier_fire_arrow_entry": true,
"fae_torch_count": 5,
"ruto_already_f1_jabu": false,
"fast_shadow_boat": false,
"ocarina_songs": [],
"correct_chest_appearances": "off",
"chest_textures_specific": [
Expand Down Expand Up @@ -5963,6 +5986,7 @@
"easier_fire_arrow_entry": false,
"fae_torch_count": 2,
"ruto_already_f1_jabu": false,
"fast_shadow_boat": false,
"ocarina_songs": [],
"correct_chest_appearances": "textures",
"chest_textures_specific": [
Expand Down
3 changes: 2 additions & 1 deletion data/settings_mapping.json
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,8 @@
"big_poe_count",
"easier_fire_arrow_entry",
"fae_torch_count",
"ruto_already_f1_jabu"
"ruto_already_f1_jabu",
"fast_shadow_boat"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion version.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
__version__ = '8.1.76'

# This is a supplemental version number for branches based off of main dev.
supplementary_version = 3
supplementary_version = 4

# Pick a unique identifier byte for your fork if you are intending to have a long-lasting branch.
# This will be 0x00 for main releases and 0x01 for main dev.
Expand Down

0 comments on commit 65e3005

Please sign in to comment.