diff --git a/OTRExporter/assets/objects/object_triforce_completed/gTriforcePieceCompletedDL b/OTRExporter/assets/objects/object_triforce_completed/gTriforcePieceCompletedDL
new file mode 100644
index 000000000..966bef206
--- /dev/null
+++ b/OTRExporter/assets/objects/object_triforce_completed/gTriforcePieceCompletedDL
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/OTRExporter/assets/objects/object_triforce_completed/gTriforcePieceCompletedDL_tri_0 b/OTRExporter/assets/objects/object_triforce_completed/gTriforcePieceCompletedDL_tri_0
new file mode 100644
index 000000000..dea47708c
--- /dev/null
+++ b/OTRExporter/assets/objects/object_triforce_completed/gTriforcePieceCompletedDL_tri_0
@@ -0,0 +1,58 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/OTRExporter/assets/objects/object_triforce_completed/gTriforcePieceCompletedDL_tri_1 b/OTRExporter/assets/objects/object_triforce_completed/gTriforcePieceCompletedDL_tri_1
new file mode 100644
index 000000000..36be4333f
--- /dev/null
+++ b/OTRExporter/assets/objects/object_triforce_completed/gTriforcePieceCompletedDL_tri_1
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/OTRExporter/assets/objects/object_triforce_completed/gTriforcePieceCompletedDL_vtx_0 b/OTRExporter/assets/objects/object_triforce_completed/gTriforcePieceCompletedDL_vtx_0
new file mode 100644
index 000000000..6ca96db30
--- /dev/null
+++ b/OTRExporter/assets/objects/object_triforce_completed/gTriforcePieceCompletedDL_vtx_0
@@ -0,0 +1,54 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/OTRExporter/assets/objects/object_triforce_completed/gTriforcePieceCompletedDL_vtx_1 b/OTRExporter/assets/objects/object_triforce_completed/gTriforcePieceCompletedDL_vtx_1
new file mode 100644
index 000000000..3a653966d
--- /dev/null
+++ b/OTRExporter/assets/objects/object_triforce_completed/gTriforcePieceCompletedDL_vtx_1
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
diff --git a/OTRExporter/assets/objects/object_triforce_completed/mat_gTriforcePieceCompletedDL_f3dlite_triforce_edges b/OTRExporter/assets/objects/object_triforce_completed/mat_gTriforcePieceCompletedDL_f3dlite_triforce_edges
new file mode 100644
index 000000000..52591dfc8
--- /dev/null
+++ b/OTRExporter/assets/objects/object_triforce_completed/mat_gTriforcePieceCompletedDL_f3dlite_triforce_edges
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/OTRExporter/assets/objects/object_triforce_completed/mat_gTriforcePieceCompletedDL_f3dlite_triforce_surface b/OTRExporter/assets/objects/object_triforce_completed/mat_gTriforcePieceCompletedDL_f3dlite_triforce_surface
new file mode 100644
index 000000000..06193ae61
--- /dev/null
+++ b/OTRExporter/assets/objects/object_triforce_completed/mat_gTriforcePieceCompletedDL_f3dlite_triforce_surface
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/OTRExporter/assets/objects/object_triforce_completed/noise_tex b/OTRExporter/assets/objects/object_triforce_completed/noise_tex
new file mode 100644
index 000000000..a6d6cf945
Binary files /dev/null and b/OTRExporter/assets/objects/object_triforce_completed/noise_tex differ
diff --git a/OTRExporter/assets/objects/object_triforce_piece_0/gTriforcePiece0DL b/OTRExporter/assets/objects/object_triforce_piece_0/gTriforcePiece0DL
new file mode 100644
index 000000000..70d08c31d
--- /dev/null
+++ b/OTRExporter/assets/objects/object_triforce_piece_0/gTriforcePiece0DL
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/OTRExporter/assets/objects/object_triforce_piece_0/gTriforcePiece0DL_tri_0 b/OTRExporter/assets/objects/object_triforce_piece_0/gTriforcePiece0DL_tri_0
new file mode 100644
index 000000000..09e44f1b7
--- /dev/null
+++ b/OTRExporter/assets/objects/object_triforce_piece_0/gTriforcePiece0DL_tri_0
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/OTRExporter/assets/objects/object_triforce_piece_0/gTriforcePiece0DL_tri_1 b/OTRExporter/assets/objects/object_triforce_piece_0/gTriforcePiece0DL_tri_1
new file mode 100644
index 000000000..48001e3c3
--- /dev/null
+++ b/OTRExporter/assets/objects/object_triforce_piece_0/gTriforcePiece0DL_tri_1
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/OTRExporter/assets/objects/object_triforce_piece_0/gTriforcePiece0DL_tri_2 b/OTRExporter/assets/objects/object_triforce_piece_0/gTriforcePiece0DL_tri_2
new file mode 100644
index 000000000..e35e34492
--- /dev/null
+++ b/OTRExporter/assets/objects/object_triforce_piece_0/gTriforcePiece0DL_tri_2
@@ -0,0 +1,51 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/OTRExporter/assets/objects/object_triforce_piece_0/gTriforcePiece0DL_vtx_0 b/OTRExporter/assets/objects/object_triforce_piece_0/gTriforcePiece0DL_vtx_0
new file mode 100644
index 000000000..a86fa98bf
--- /dev/null
+++ b/OTRExporter/assets/objects/object_triforce_piece_0/gTriforcePiece0DL_vtx_0
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/OTRExporter/assets/objects/object_triforce_piece_0/gTriforcePiece0DL_vtx_1 b/OTRExporter/assets/objects/object_triforce_piece_0/gTriforcePiece0DL_vtx_1
new file mode 100644
index 000000000..230fbb7f8
--- /dev/null
+++ b/OTRExporter/assets/objects/object_triforce_piece_0/gTriforcePiece0DL_vtx_1
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/OTRExporter/assets/objects/object_triforce_piece_0/gTriforcePiece0DL_vtx_2 b/OTRExporter/assets/objects/object_triforce_piece_0/gTriforcePiece0DL_vtx_2
new file mode 100644
index 000000000..86d123825
--- /dev/null
+++ b/OTRExporter/assets/objects/object_triforce_piece_0/gTriforcePiece0DL_vtx_2
@@ -0,0 +1,49 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/OTRExporter/assets/objects/object_triforce_piece_0/mat_gTriforcePiece0DL_f3dlite_shard_edge b/OTRExporter/assets/objects/object_triforce_piece_0/mat_gTriforcePiece0DL_f3dlite_shard_edge
new file mode 100644
index 000000000..f62631793
--- /dev/null
+++ b/OTRExporter/assets/objects/object_triforce_piece_0/mat_gTriforcePiece0DL_f3dlite_shard_edge
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/OTRExporter/assets/objects/object_triforce_piece_0/mat_gTriforcePiece0DL_f3dlite_triforce_edges b/OTRExporter/assets/objects/object_triforce_piece_0/mat_gTriforcePiece0DL_f3dlite_triforce_edges
new file mode 100644
index 000000000..9355e7094
--- /dev/null
+++ b/OTRExporter/assets/objects/object_triforce_piece_0/mat_gTriforcePiece0DL_f3dlite_triforce_edges
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/OTRExporter/assets/objects/object_triforce_piece_0/mat_gTriforcePiece0DL_f3dlite_triforce_surface b/OTRExporter/assets/objects/object_triforce_piece_0/mat_gTriforcePiece0DL_f3dlite_triforce_surface
new file mode 100644
index 000000000..e863b31c5
--- /dev/null
+++ b/OTRExporter/assets/objects/object_triforce_piece_0/mat_gTriforcePiece0DL_f3dlite_triforce_surface
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/OTRExporter/assets/objects/object_triforce_piece_0/noise_tex b/OTRExporter/assets/objects/object_triforce_piece_0/noise_tex
new file mode 100644
index 000000000..a6d6cf945
Binary files /dev/null and b/OTRExporter/assets/objects/object_triforce_piece_0/noise_tex differ
diff --git a/OTRExporter/assets/objects/object_triforce_piece_1/gTriforcePiece1DL b/OTRExporter/assets/objects/object_triforce_piece_1/gTriforcePiece1DL
new file mode 100644
index 000000000..50a9264c6
--- /dev/null
+++ b/OTRExporter/assets/objects/object_triforce_piece_1/gTriforcePiece1DL
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/OTRExporter/assets/objects/object_triforce_piece_1/gTriforcePiece1DL_tri_0 b/OTRExporter/assets/objects/object_triforce_piece_1/gTriforcePiece1DL_tri_0
new file mode 100644
index 000000000..5f33f7347
--- /dev/null
+++ b/OTRExporter/assets/objects/object_triforce_piece_1/gTriforcePiece1DL_tri_0
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/OTRExporter/assets/objects/object_triforce_piece_1/gTriforcePiece1DL_tri_1 b/OTRExporter/assets/objects/object_triforce_piece_1/gTriforcePiece1DL_tri_1
new file mode 100644
index 000000000..43df6492b
--- /dev/null
+++ b/OTRExporter/assets/objects/object_triforce_piece_1/gTriforcePiece1DL_tri_1
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/OTRExporter/assets/objects/object_triforce_piece_1/gTriforcePiece1DL_vtx_0 b/OTRExporter/assets/objects/object_triforce_piece_1/gTriforcePiece1DL_vtx_0
new file mode 100644
index 000000000..e078b8246
--- /dev/null
+++ b/OTRExporter/assets/objects/object_triforce_piece_1/gTriforcePiece1DL_vtx_0
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/OTRExporter/assets/objects/object_triforce_piece_1/gTriforcePiece1DL_vtx_1 b/OTRExporter/assets/objects/object_triforce_piece_1/gTriforcePiece1DL_vtx_1
new file mode 100644
index 000000000..e0460194d
--- /dev/null
+++ b/OTRExporter/assets/objects/object_triforce_piece_1/gTriforcePiece1DL_vtx_1
@@ -0,0 +1,34 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/OTRExporter/assets/objects/object_triforce_piece_1/mat_gTriforcePiece1DL_f3dlite_shard_edge b/OTRExporter/assets/objects/object_triforce_piece_1/mat_gTriforcePiece1DL_f3dlite_shard_edge
new file mode 100644
index 000000000..b9e61293d
--- /dev/null
+++ b/OTRExporter/assets/objects/object_triforce_piece_1/mat_gTriforcePiece1DL_f3dlite_shard_edge
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/OTRExporter/assets/objects/object_triforce_piece_1/mat_gTriforcePiece1DL_f3dlite_triforce_surface b/OTRExporter/assets/objects/object_triforce_piece_1/mat_gTriforcePiece1DL_f3dlite_triforce_surface
new file mode 100644
index 000000000..5f8dc51f9
--- /dev/null
+++ b/OTRExporter/assets/objects/object_triforce_piece_1/mat_gTriforcePiece1DL_f3dlite_triforce_surface
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/OTRExporter/assets/objects/object_triforce_piece_1/noise_tex b/OTRExporter/assets/objects/object_triforce_piece_1/noise_tex
new file mode 100644
index 000000000..a6d6cf945
Binary files /dev/null and b/OTRExporter/assets/objects/object_triforce_piece_1/noise_tex differ
diff --git a/OTRExporter/assets/objects/object_triforce_piece_2/gTriforcePiece2DL b/OTRExporter/assets/objects/object_triforce_piece_2/gTriforcePiece2DL
new file mode 100644
index 000000000..5213cd53c
--- /dev/null
+++ b/OTRExporter/assets/objects/object_triforce_piece_2/gTriforcePiece2DL
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/OTRExporter/assets/objects/object_triforce_piece_2/gTriforcePiece2DL_tri_0 b/OTRExporter/assets/objects/object_triforce_piece_2/gTriforcePiece2DL_tri_0
new file mode 100644
index 000000000..b54e182d5
--- /dev/null
+++ b/OTRExporter/assets/objects/object_triforce_piece_2/gTriforcePiece2DL_tri_0
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/OTRExporter/assets/objects/object_triforce_piece_2/gTriforcePiece2DL_tri_1 b/OTRExporter/assets/objects/object_triforce_piece_2/gTriforcePiece2DL_tri_1
new file mode 100644
index 000000000..00a32bfd8
--- /dev/null
+++ b/OTRExporter/assets/objects/object_triforce_piece_2/gTriforcePiece2DL_tri_1
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/OTRExporter/assets/objects/object_triforce_piece_2/gTriforcePiece2DL_tri_2 b/OTRExporter/assets/objects/object_triforce_piece_2/gTriforcePiece2DL_tri_2
new file mode 100644
index 000000000..0993c1c1e
--- /dev/null
+++ b/OTRExporter/assets/objects/object_triforce_piece_2/gTriforcePiece2DL_tri_2
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/OTRExporter/assets/objects/object_triforce_piece_2/gTriforcePiece2DL_vtx_0 b/OTRExporter/assets/objects/object_triforce_piece_2/gTriforcePiece2DL_vtx_0
new file mode 100644
index 000000000..bf7dfcac6
--- /dev/null
+++ b/OTRExporter/assets/objects/object_triforce_piece_2/gTriforcePiece2DL_vtx_0
@@ -0,0 +1,36 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/OTRExporter/assets/objects/object_triforce_piece_2/gTriforcePiece2DL_vtx_1 b/OTRExporter/assets/objects/object_triforce_piece_2/gTriforcePiece2DL_vtx_1
new file mode 100644
index 000000000..e3237ab21
--- /dev/null
+++ b/OTRExporter/assets/objects/object_triforce_piece_2/gTriforcePiece2DL_vtx_1
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/OTRExporter/assets/objects/object_triforce_piece_2/gTriforcePiece2DL_vtx_2 b/OTRExporter/assets/objects/object_triforce_piece_2/gTriforcePiece2DL_vtx_2
new file mode 100644
index 000000000..ec4e73700
--- /dev/null
+++ b/OTRExporter/assets/objects/object_triforce_piece_2/gTriforcePiece2DL_vtx_2
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/OTRExporter/assets/objects/object_triforce_piece_2/mat_gTriforcePiece2DL_f3dlite_shard_edge b/OTRExporter/assets/objects/object_triforce_piece_2/mat_gTriforcePiece2DL_f3dlite_shard_edge
new file mode 100644
index 000000000..c222fe68d
--- /dev/null
+++ b/OTRExporter/assets/objects/object_triforce_piece_2/mat_gTriforcePiece2DL_f3dlite_shard_edge
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/OTRExporter/assets/objects/object_triforce_piece_2/mat_gTriforcePiece2DL_f3dlite_triforce_edges b/OTRExporter/assets/objects/object_triforce_piece_2/mat_gTriforcePiece2DL_f3dlite_triforce_edges
new file mode 100644
index 000000000..5968068f5
--- /dev/null
+++ b/OTRExporter/assets/objects/object_triforce_piece_2/mat_gTriforcePiece2DL_f3dlite_triforce_edges
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/OTRExporter/assets/objects/object_triforce_piece_2/mat_gTriforcePiece2DL_f3dlite_triforce_surface b/OTRExporter/assets/objects/object_triforce_piece_2/mat_gTriforcePiece2DL_f3dlite_triforce_surface
new file mode 100644
index 000000000..d903f00bb
--- /dev/null
+++ b/OTRExporter/assets/objects/object_triforce_piece_2/mat_gTriforcePiece2DL_f3dlite_triforce_surface
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/OTRExporter/assets/objects/object_triforce_piece_2/noise_tex b/OTRExporter/assets/objects/object_triforce_piece_2/noise_tex
new file mode 100644
index 000000000..a6d6cf945
Binary files /dev/null and b/OTRExporter/assets/objects/object_triforce_piece_2/noise_tex differ
diff --git a/OTRExporter/assets/textures/parameter_static/gTriforcePiece.rgba32.png b/OTRExporter/assets/textures/parameter_static/gTriforcePiece.rgba32.png
new file mode 100644
index 000000000..cc67b6a13
Binary files /dev/null and b/OTRExporter/assets/textures/parameter_static/gTriforcePiece.rgba32.png differ
diff --git a/README.md b/README.md
index 1604e5f88..ef96bd8e4 100644
--- a/README.md
+++ b/README.md
@@ -18,8 +18,7 @@ The Ship does not include any copyrighted assets. You are required to provide a
### 1. Verify your ROM dump
You can verify you have dumped a supported copy of the game by using the compatibility checker at https://ship.equipment/. If you'd prefer to manually validate your ROM dump, you can cross-reference its `sha1` hash with the hashes [here](docs/supportedHashes.json).
-### 2. Download The Ship of Harkinian from [Discord](https://discord.com/invite/shipofharkinian)
-The latest release is available in the most recent post in the `#downloads` channel.
+### 2. Download The Ship of Harkinian from [Releases](https://github.com/HarbourMasters/Shipwright/releases)
### 3. Launch the Game!
#### Windows
diff --git a/docs/BUILDING.md b/docs/BUILDING.md
index 00d8441e7..d6d061049 100644
--- a/docs/BUILDING.md
+++ b/docs/BUILDING.md
@@ -81,7 +81,7 @@ cd "build/x64"
```
## Linux
-Requires `gcc >= 10, x11, curl, python3, sdl2 >= 2.0.22, libpng, glew >= 2.2, ninja, cmake, lld`
+Requires `gcc >= 10, x11, curl, python3, sdl2 >= 2.0.22, libpng, glew >= 2.2, ninja, cmake, lld, pulseaudio-libs`
**Important: For maximum performance make sure you have ninja build tools installed!**
diff --git a/soh/assets/soh_assets.h b/soh/assets/soh_assets.h
index b1feac469..2b193053c 100644
--- a/soh/assets/soh_assets.h
+++ b/soh/assets/soh_assets.h
@@ -44,6 +44,18 @@ static const ALIGN_ASSET(2) char gTitleRandomizerSubtitleTex[] = dgTitleRandomiz
#define dgTitleBossRushSubtitleTex "__OTR__objects/object_mag/gTitleBossRushSubtitleTex"
static const ALIGN_ASSET(2) char gTitleBossRushSubtitleTex[] = dgTitleBossRushSubtitleTex;
+#define dgTriforcePiece0DL "__OTR__objects/object_triforce_piece_0/gTriforcePiece0DL"
+static const ALIGN_ASSET(2) char gTriforcePiece0DL[] = dgTriforcePiece0DL;
+
+#define dgTriforcePiece1DL "__OTR__objects/object_triforce_piece_1/gTriforcePiece1DL"
+static const ALIGN_ASSET(2) char gTriforcePiece1DL[] = dgTriforcePiece1DL;
+
+#define dgTriforcePiece2DL "__OTR__objects/object_triforce_piece_2/gTriforcePiece2DL"
+static const ALIGN_ASSET(2) char gTriforcePiece2DL[] = dgTriforcePiece2DL;
+
+#define dgTriforcePieceCompletedDL "__OTR__objects/object_triforce_completed/gTriforcePieceCompletedDL"
+static const ALIGN_ASSET(2) char gTriforcePieceCompletedDL[] = dgTriforcePieceCompletedDL;
+
// overlays
#define dgOptionsDividerChangeLangVtx "__OTR__overlays/ovl_file_choose/gOptionsDividerChangeLangVtx"
static const ALIGN_ASSET(2) char gOptionsDividerChangeLangVtx[] = dgOptionsDividerChangeLangVtx;
@@ -58,6 +70,9 @@ static const ALIGN_ASSET(2) char gArrowUpTex[] = dgArrowUp;
#define dgArrowDown "__OTR__textures/parameter_static/gArrowDown"
static const ALIGN_ASSET(2) char gArrowDownTex[] = dgArrowDown;
+#define dgTriforcePiece "__OTR__textures/parameter_static/gTriforcePiece"
+static const ALIGN_ASSET(2) char gTriforcePieceTex[] = dgTriforcePiece;
+
#define dgFileSelMQButtonTex "__OTR__textures/title_static/gFileSelMQButtonTex"
static const ALIGN_ASSET(2) char gFileSelMQButtonTex[] = dgFileSelMQButtonTex;
diff --git a/soh/include/functions.h b/soh/include/functions.h
index 2420d2a6a..6b7732ae9 100644
--- a/soh/include/functions.h
+++ b/soh/include/functions.h
@@ -1257,6 +1257,8 @@ void SkelAnime_DrawLod(PlayState* play, void** skeleton, Vec3s* jointTable,
void SkelAnime_DrawFlexLod(PlayState* play, void** skeleton, Vec3s* jointTable, s32 dListCount,
OverrideLimbDrawOpa overrideLimbDraw, PostLimbDrawOpa postLimbDraw, void* arg,
s32 dListIndex);
+void SkelAnime_DrawSkeletonOpa(PlayState* play, SkelAnime* skelAnime, OverrideLimbDrawOpa overrideLimbDraw,
+ PostLimbDrawOpa postLimbDraw, void* arg);
void SkelAnime_DrawOpa(PlayState* play, void** skeleton, Vec3s* jointTable,
OverrideLimbDrawOpa overrideLimbDraw, PostLimbDrawOpa postLimbDraw, void* arg);
void SkelAnime_DrawFlexOpa(PlayState* play, void** skeleton, Vec3s* jointTable, s32 dListCount,
diff --git a/soh/include/variables.h b/soh/include/variables.h
index 8fd457d18..ee73d003b 100644
--- a/soh/include/variables.h
+++ b/soh/include/variables.h
@@ -171,6 +171,7 @@ extern "C"
extern u8 gWalkSpeedToggle1;
extern u8 gWalkSpeedToggle2;
extern f32 iceTrapScale;
+ extern f32 triforcePieceScale;
extern const s16 D_8014A6C0[];
#define gTatumsPerBeat (D_8014A6C0[1])
diff --git a/soh/include/z64animation.h b/soh/include/z64animation.h
index e1ef1c073..b61627a27 100755
--- a/soh/include/z64animation.h
+++ b/soh/include/z64animation.h
@@ -16,6 +16,10 @@ struct SkelAnime;
#define ANIM_FLAG_UPDATEY (1 << 1)
#define ANIM_FLAG_NOMOVE (1 << 4)
+#define SKELANIME_TYPE_NORMAL 0
+#define SKELANIME_TYPE_FLEX 1
+#define SKELANIME_TYPE_CURVE 2
+
typedef enum {
/* 0 */ ANIMMODE_LOOP,
/* 1 */ ANIMMODE_LOOP_INTERP,
@@ -57,6 +61,7 @@ typedef struct LegacyLimb {
typedef struct {
/* 0x00 */ void** segment;
/* 0x04 */ u8 limbCount;
+ u8 skeletonType;
} SkeletonHeader; // size = 0x8
// Model has limbs with flexible meshes
@@ -261,6 +266,7 @@ typedef struct SkelAnime {
/* 0x36 */ s16 prevRot; // Previous rotation in worldspace.
/* 0x38 */ Vec3s prevTransl; // Previous modelspace translation.
/* 0x3E */ Vec3s baseTransl; // Base modelspace translation.
+ SkeletonHeader* skeletonHeader;
} SkelAnime; // size = 0x44
#endif
diff --git a/soh/include/z64item.h b/soh/include/z64item.h
index 65f6e93d9..2f0038872 100644
--- a/soh/include/z64item.h
+++ b/soh/include/z64item.h
@@ -511,6 +511,7 @@ typedef enum {
/* 0x79 */ GID_SONG_SUN,
/* 0x7A */ GID_SONG_TIME,
/* 0x7B */ GID_SONG_STORM,
+ /* 0x7C */ GID_TRIFORCE_PIECE,
/* 0x7C */ GID_MAXIMUM
} GetItemDrawID;
diff --git a/soh/include/z64player.h b/soh/include/z64player.h
index 99445f1d7..ff30cc170 100644
--- a/soh/include/z64player.h
+++ b/soh/include/z64player.h
@@ -409,7 +409,8 @@ typedef enum {
FLAG_ITEM_GET_INF,
FLAG_INF_TABLE,
FLAG_EVENT_INF,
- FLAG_RANDOMIZER_INF
+ FLAG_RANDOMIZER_INF,
+ FLAG_GS_TOKEN,
} FlagType;
typedef struct {
@@ -620,7 +621,7 @@ typedef struct Player {
/* 0x0858 */ f32 unk_858;
/* 0x085C */ f32 unk_85C; // stick length among other things
/* 0x0860 */ s16 unk_860; // stick flame timer among other things
- /* 0x0862 */ s8 unk_862; // get item draw ID + 1
+ /* 0x0862 */ s16 unk_862; // get item draw ID + 1
/* 0x0864 */ f32 unk_864;
/* 0x0868 */ f32 unk_868;
/* 0x086C */ f32 unk_86C;
diff --git a/soh/include/z64save.h b/soh/include/z64save.h
index e4aeb4e31..8d3acf22f 100644
--- a/soh/include/z64save.h
+++ b/soh/include/z64save.h
@@ -284,8 +284,7 @@ typedef struct {
/* 0x1428 */ u16 pendingSaleMod;
// #region SOH [General]
// Upstream TODO: Move these to their own struct or name to more obviously specific to SoH
- /* */ uint32_t isMasterQuest;
- /* */ uint32_t isBossRush;
+ /* */ uint8_t questId;
/* */ uint32_t isBossRushPaused;
/* */ uint8_t bossRushOptions[BOSSRUSH_OPTIONS_AMOUNT];
/* */ u8 mqDungeonCount;
@@ -324,9 +323,22 @@ typedef struct {
/* */ u8 seedIcons[5];
/* */ u16 randomizerInf[10];
/* */ u16 adultTradeItems;
+ /* */ u8 triforcePiecesCollected;
// #endregion
} SaveContext; // size = 0x1428
+typedef enum {
+ /* 00 */ QUEST_NORMAL,
+ /* 01 */ QUEST_MASTER,
+ /* 02 */ QUEST_RANDOMIZER,
+ /* 03 */ QUEST_BOSSRUSH,
+} Quest;
+
+#define IS_VANILLA (gSaveContext.questId == QUEST_NORMAL)
+#define IS_MASTER_QUEST (gSaveContext.questId == QUEST_MASTER)
+#define IS_RANDO (gSaveContext.questId == QUEST_RANDOMIZER)
+#define IS_BOSS_RUSH (gSaveContext.questId == QUEST_BOSSRUSH)
+
typedef enum {
/* 0x00 */ BTN_ENABLED,
/* 0xFF */ BTN_DISABLED = 0xFF
@@ -577,11 +589,16 @@ typedef enum {
// 0xDA-0xDE
#define EVENTCHKINF_SKULLTULA_REWARD_INDEX 13
-#define EVENTCHKINF_SKULLTULA_REWARD_10_MASK (1 << 10)
-#define EVENTCHKINF_SKULLTULA_REWARD_20_MASK (1 << 11)
-#define EVENTCHKINF_SKULLTULA_REWARD_30_MASK (1 << 12)
-#define EVENTCHKINF_SKULLTULA_REWARD_40_MASK (1 << 13)
-#define EVENTCHKINF_SKULLTULA_REWARD_50_MASK (1 << 14)
+#define EVENTCHKINF_SKULLTULA_REWARD_10_SHIFT 10
+#define EVENTCHKINF_SKULLTULA_REWARD_20_SHIFT 11
+#define EVENTCHKINF_SKULLTULA_REWARD_30_SHIFT 12
+#define EVENTCHKINF_SKULLTULA_REWARD_40_SHIFT 13
+#define EVENTCHKINF_SKULLTULA_REWARD_50_SHIFT 14
+#define EVENTCHKINF_SKULLTULA_REWARD_10_MASK (1 << EVENTCHKINF_SKULLTULA_REWARD_10_SHIFT)
+#define EVENTCHKINF_SKULLTULA_REWARD_20_MASK (1 << EVENTCHKINF_SKULLTULA_REWARD_20_SHIFT)
+#define EVENTCHKINF_SKULLTULA_REWARD_30_MASK (1 << EVENTCHKINF_SKULLTULA_REWARD_30_SHIFT)
+#define EVENTCHKINF_SKULLTULA_REWARD_40_MASK (1 << EVENTCHKINF_SKULLTULA_REWARD_40_SHIFT)
+#define EVENTCHKINF_SKULLTULA_REWARD_50_MASK (1 << EVENTCHKINF_SKULLTULA_REWARD_50_SHIFT)
/*
diff --git a/soh/soh/Enhancements/audio/AudioEditor.cpp b/soh/soh/Enhancements/audio/AudioEditor.cpp
index fd47b8e25..0e7244122 100644
--- a/soh/soh/Enhancements/audio/AudioEditor.cpp
+++ b/soh/soh/Enhancements/audio/AudioEditor.cpp
@@ -330,7 +330,7 @@ ImVec4 GetSequenceTypeColor(SeqType type) {
case SEQ_SFX:
return ImVec4(0.4f, 0.33f, 0.0f, 1.0f);
case SEQ_VOICE:
- return ImVec4(0.4f, 0.33f, 0.0f, 1.0f);
+ return ImVec4(0.3f, 0.42f, 0.09f, 1.0f);
case SEQ_INSTRUMENT:
return ImVec4(0.0f, 0.25f, 0.5f, 1.0f);
case SEQ_BGM_CUSTOM:
@@ -481,7 +481,7 @@ void AudioEditor::DrawElement() {
}
}
- ImGui::BeginTable("sequenceTypes", 8, ImGuiTableFlags_Resizable | ImGuiTableFlags_NoSavedSettings | ImGuiTableFlags_Borders);
+ ImGui::BeginTable("sequenceTypes", 9, ImGuiTableFlags_Resizable | ImGuiTableFlags_NoSavedSettings | ImGuiTableFlags_Borders);
ImGui::TableNextColumn();
ImGui::PushStyleColor(ImGuiCol_Header, GetSequenceTypeColor(SEQ_BGM_WORLD));
diff --git a/soh/soh/Enhancements/boss-rush/BossRush.cpp b/soh/soh/Enhancements/boss-rush/BossRush.cpp
index a4952148f..d35b8825e 100644
--- a/soh/soh/Enhancements/boss-rush/BossRush.cpp
+++ b/soh/soh/Enhancements/boss-rush/BossRush.cpp
@@ -235,7 +235,7 @@ void BossRush_HandleBlueWarpHeal(PlayState* play) {
}
void BossRush_HandleCompleteBoss(PlayState* play) {
- if (!gSaveContext.isBossRush) {
+ if (!IS_BOSS_RUSH) {
return;
}
diff --git a/soh/soh/Enhancements/debugger/debugSaveEditor.cpp b/soh/soh/Enhancements/debugger/debugSaveEditor.cpp
index 0f9c56669..6636f5407 100644
--- a/soh/soh/Enhancements/debugger/debugSaveEditor.cpp
+++ b/soh/soh/Enhancements/debugger/debugSaveEditor.cpp
@@ -10,6 +10,7 @@
#include
#include
#include
+#include "soh_assets.h"
extern "C" {
#include
@@ -144,6 +145,10 @@ std::map gregMapping = {
{ITEM_RUPEE_GREEN, {ITEM_RUPEE_GREEN, "ITEM_RUPEE_GREEN", "ITEM_RUPEE_GREEN_Faded", gRupeeCounterIconTex}}
};
+std::map triforcePieceMapping = {
+ {RG_TRIFORCE_PIECE, {RG_TRIFORCE_PIECE, "RG_TRIFORCE_PIECE", "RG_TRIFORCE_PIECE_Faded", gTriforcePieceTex}}
+};
+
// Maps entries in the GS flag array to the area name it represents
std::vector gsMapping = {
"Deku Tree",
@@ -509,6 +514,10 @@ void DrawInfoTab() {
}
UIWidgets::InsertHelpHoverText("Z-Targeting behavior");
+ if (gSaveContext.n64ddFlag && OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_TRIFORCE_HUNT)) {
+ ImGui::InputScalar("Triforce Pieces", ImGuiDataType_U16, &gSaveContext.triforcePiecesCollected);
+ UIWidgets::InsertHelpHoverText("Currently obtained Triforce Pieces. For Triforce Hunt.");
+ }
ImGui::PushItemWidth(ImGui::GetFontSize() * 10);
static std::array minigameHS = { "Horseback Archery",
@@ -699,7 +708,7 @@ void DrawInventoryTab() {
ImVec2(0, 0), ImVec2(1, 1), 0)) {
gSaveContext.inventory.items[selectedIndex] = slotEntry.id;
// Set adult trade item flag if you're playing adult trade shuffle in rando
- if (gSaveContext.n64ddFlag &&
+ if (IS_RANDO &&
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_SHUFFLE_ADULT_TRADE) &&
selectedIndex == SLOT_TRADE_ADULT &&
slotEntry.id >= ITEM_POCKET_EGG && slotEntry.id <= ITEM_CLAIM_CHECK) {
@@ -744,7 +753,7 @@ void DrawInventoryTab() {
// Trade quest flags are only used when shuffling the trade sequence, so
// don't show this if it isn't needed.
- if (gSaveContext.n64ddFlag && OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_SHUFFLE_ADULT_TRADE)
+ if (IS_RANDO && OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_SHUFFLE_ADULT_TRADE)
&& ImGui::TreeNode("Adult trade quest items")) {
for (int i = ITEM_POCKET_EGG; i <= ITEM_CLAIM_CHECK; i++) {
DrawBGSItemFlag(i);
@@ -1071,7 +1080,7 @@ void DrawFlagsTab() {
// If playing a Randomizer Save with Shuffle Skull Tokens on anything other than "Off" we don't want to keep
// GS Token Count updated, since Gold Skulltulas killed will not correlate to GS Tokens Collected.
- if (!(gSaveContext.n64ddFlag && OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_SHUFFLE_TOKENS) != RO_TOKENSANITY_OFF)) {
+ if (!(IS_RANDO && OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_SHUFFLE_TOKENS) != RO_TOKENSANITY_OFF)) {
static bool keepGsCountUpdated = true;
ImGui::Checkbox("Keep GS Count Updated", &keepGsCountUpdated);
UIWidgets::InsertHelpHoverText("Automatically adjust the number of gold skulltula tokens acquired based on set flags.");
@@ -1087,7 +1096,7 @@ void DrawFlagsTab() {
for (int i = 0; i < flagTables.size(); i++) {
const FlagTable& flagTable = flagTables[i];
- if (flagTable.flagTableType == RANDOMIZER_INF && !gSaveContext.n64ddFlag && !gSaveContext.isBossRush) {
+ if (flagTable.flagTableType == RANDOMIZER_INF && !IS_RANDO && !IS_BOSS_RUSH) {
continue;
}
@@ -1281,7 +1290,7 @@ void DrawEquipmentTab() {
"Giant (500)",
};
// only display Tycoon wallet if you're in a save file that would allow it.
- if (gSaveContext.n64ddFlag && OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_SHOPSANITY) > RO_SHOPSANITY_ZERO_ITEMS) {
+ if (IS_RANDO && OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_SHOPSANITY) > RO_SHOPSANITY_ZERO_ITEMS) {
const std::string walletName = "Tycoon (999)";
walletNamesImpl.push_back(walletName);
}
@@ -1790,6 +1799,10 @@ void SaveEditorWindow::InitElement() {
LUS::Context::GetInstance()->GetWindow()->GetGui()->LoadGuiTexture(entry.second.name, entry.second.texturePath, gregGreen);
LUS::Context::GetInstance()->GetWindow()->GetGui()->LoadGuiTexture(entry.second.nameFaded, entry.second.texturePath, gregFadedGreen);
}
+ for (const auto& entry : triforcePieceMapping) {
+ LUS::Context::GetInstance()->GetWindow()->GetGui()->LoadGuiTexture(entry.second.name, entry.second.texturePath, ImVec4(1, 1, 1, 1));
+ LUS::Context::GetInstance()->GetWindow()->GetGui()->LoadGuiTexture(entry.second.nameFaded, entry.second.texturePath, ImVec4(1, 1, 1, 0.3f));
+ }
for (const auto& entry : questMapping) {
LUS::Context::GetInstance()->GetWindow()->GetGui()->LoadGuiTexture(entry.second.name, entry.second.texturePath, ImVec4(1, 1, 1, 1));
LUS::Context::GetInstance()->GetWindow()->GetGui()->LoadGuiTexture(entry.second.nameFaded, entry.second.texturePath, ImVec4(1, 1, 1, 0.3f));
diff --git a/soh/soh/Enhancements/enemyrandomizer.cpp b/soh/soh/Enhancements/enemyrandomizer.cpp
index 454fe43c1..a89400844 100644
--- a/soh/soh/Enhancements/enemyrandomizer.cpp
+++ b/soh/soh/Enhancements/enemyrandomizer.cpp
@@ -234,7 +234,7 @@ extern "C" uint8_t GetRandomizedEnemy(PlayState* play, int16_t *actorId, f32 *po
EnemyEntry GetRandomizedEnemyEntry(uint32_t seed) {
if (CVarGetInteger("gRandomizedEnemies", ENEMY_RANDOMIZER_OFF) == ENEMY_RANDOMIZER_RANDOM_SEEDED) {
- uint32_t finalSeed = seed + (gSaveContext.n64ddFlag ? gSaveContext.finalSeed : gSaveContext.sohStats.fileCreatedAt);
+ uint32_t finalSeed = seed + (IS_RANDO ? gSaveContext.finalSeed : gSaveContext.sohStats.fileCreatedAt);
Random_Init(finalSeed);
}
diff --git a/soh/soh/Enhancements/game-interactor/GameInteractionEffect.cpp b/soh/soh/Enhancements/game-interactor/GameInteractionEffect.cpp
index 7b725b487..8a8120e70 100644
--- a/soh/soh/Enhancements/game-interactor/GameInteractionEffect.cpp
+++ b/soh/soh/Enhancements/game-interactor/GameInteractionEffect.cpp
@@ -47,6 +47,55 @@ GameInteractionEffectQueryResult GameInteractionEffectBase::Remove() {
namespace GameInteractionEffect {
+ // MARK: - Flags
+ GameInteractionEffectQueryResult SetSceneFlag::CanBeApplied() {
+ if (!GameInteractor::IsSaveLoaded()) {
+ return GameInteractionEffectQueryResult::TemporarilyNotPossible;
+ }
+
+ return GameInteractionEffectQueryResult::Possible;
+ }
+
+ void SetSceneFlag::_Apply() {
+ GameInteractor::RawAction::SetSceneFlag(parameters[0], parameters[1], parameters[2]);
+ }
+
+ GameInteractionEffectQueryResult UnsetSceneFlag::CanBeApplied() {
+ if (!GameInteractor::IsSaveLoaded()) {
+ return GameInteractionEffectQueryResult::TemporarilyNotPossible;
+ }
+
+ return GameInteractionEffectQueryResult::Possible;
+ }
+
+ void UnsetSceneFlag::_Apply() {
+ GameInteractor::RawAction::UnsetSceneFlag(parameters[0], parameters[1], parameters[2]);
+ }
+
+ GameInteractionEffectQueryResult SetFlag::CanBeApplied() {
+ if (!GameInteractor::IsSaveLoaded()) {
+ return GameInteractionEffectQueryResult::TemporarilyNotPossible;
+ }
+
+ return GameInteractionEffectQueryResult::Possible;
+ }
+
+ void SetFlag::_Apply() {
+ GameInteractor::RawAction::SetFlag(parameters[0], parameters[1]);
+ }
+
+ GameInteractionEffectQueryResult UnsetFlag::CanBeApplied() {
+ if (!GameInteractor::IsSaveLoaded()) {
+ return GameInteractionEffectQueryResult::TemporarilyNotPossible;
+ }
+
+ return GameInteractionEffectQueryResult::Possible;
+ }
+
+ void UnsetFlag::_Apply() {
+ GameInteractor::RawAction::UnsetFlag(parameters[0], parameters[1]);
+ }
+
// MARK: - ModifyHeartContainers
GameInteractionEffectQueryResult ModifyHeartContainers::CanBeApplied() {
if (!GameInteractor::IsSaveLoaded()) {
diff --git a/soh/soh/Enhancements/game-interactor/GameInteractionEffect.h b/soh/soh/Enhancements/game-interactor/GameInteractionEffect.h
index ab8cfb610..c4a7f7eac 100644
--- a/soh/soh/Enhancements/game-interactor/GameInteractionEffect.h
+++ b/soh/soh/Enhancements/game-interactor/GameInteractionEffect.h
@@ -18,7 +18,7 @@ public:
virtual GameInteractionEffectQueryResult CanBeRemoved();
GameInteractionEffectQueryResult Apply();
GameInteractionEffectQueryResult Remove();
- int32_t parameters[2];
+ int32_t parameters[3];
protected:
virtual void _Apply() = 0;
@@ -26,6 +26,26 @@ public:
};
namespace GameInteractionEffect {
+ class SetSceneFlag: public GameInteractionEffectBase {
+ GameInteractionEffectQueryResult CanBeApplied() override;
+ void _Apply() override;
+ };
+
+ class UnsetSceneFlag: public GameInteractionEffectBase {
+ GameInteractionEffectQueryResult CanBeApplied() override;
+ void _Apply() override;
+ };
+
+ class SetFlag: public GameInteractionEffectBase {
+ GameInteractionEffectQueryResult CanBeApplied() override;
+ void _Apply() override;
+ };
+
+ class UnsetFlag: public GameInteractionEffectBase {
+ GameInteractionEffectQueryResult CanBeApplied() override;
+ void _Apply() override;
+ };
+
class ModifyHeartContainers: public GameInteractionEffectBase {
GameInteractionEffectQueryResult CanBeApplied() override;
void _Apply() override;
diff --git a/soh/soh/Enhancements/game-interactor/GameInteractor.h b/soh/soh/Enhancements/game-interactor/GameInteractor.h
index cfb4483ac..5b866793c 100644
--- a/soh/soh/Enhancements/game-interactor/GameInteractor.h
+++ b/soh/soh/Enhancements/game-interactor/GameInteractor.h
@@ -83,6 +83,8 @@ uint8_t GameInteractor_GetRandomWindActive();
uint8_t GameInteractor_GetRandomBonksActive();
uint8_t GameInteractor_GetSlipperyFloorActive();
uint8_t GameInteractor_SecondCollisionUpdate();
+void GameInteractor_SetTriforceHuntPieceGiven(uint8_t state);
+void GameInteractor_SetTriforceHuntCreditsWarpActive(uint8_t state);
#ifdef __cplusplus
}
#endif
@@ -123,6 +125,8 @@ public:
static uint8_t RandomBonksActive;
static uint8_t SlipperyFloorActive;
static uint8_t SecondCollisionUpdate;
+ static uint8_t TriforceHuntPieceGiven;
+ static uint8_t TriforceHuntCreditsWarpActive;
static void SetPacifistMode(bool active);
};
@@ -148,6 +152,10 @@ public:
DEFINE_HOOK(OnSaleEnd, void(GetItemEntry itemEntry));
DEFINE_HOOK(OnTransitionEnd, void(int16_t sceneNum));
DEFINE_HOOK(OnSceneInit, void(int16_t sceneNum));
+ DEFINE_HOOK(OnSceneFlagSet, void(int16_t sceneNum, int16_t flagType, int16_t flag));
+ DEFINE_HOOK(OnSceneFlagUnset, void(int16_t sceneNum, int16_t flagType, int16_t flag));
+ DEFINE_HOOK(OnFlagSet, void(int16_t flagType, int16_t flag));
+ DEFINE_HOOK(OnFlagUnset, void(int16_t flagType, int16_t flag));
DEFINE_HOOK(OnSceneSpawnActors, void());
DEFINE_HOOK(OnPlayerUpdate, void());
DEFINE_HOOK(OnOcarinaSongAction, void());
@@ -194,6 +202,10 @@ public:
class RawAction {
public:
+ static void SetSceneFlag(int16_t sceneNum, int16_t flagType, int16_t flag);
+ static void UnsetSceneFlag(int16_t sceneNum, int16_t flagType, int16_t flag);
+ static void SetFlag(int16_t flagType, int16_t chestNum);
+ static void UnsetFlag(int16_t flagType, int16_t chestNum);
static void AddOrRemoveHealthContainers(int16_t amount);
static void AddOrRemoveMagic(int8_t amount);
static void HealOrDamagePlayer(int16_t hearts);
diff --git a/soh/soh/Enhancements/game-interactor/GameInteractor_Hooks.cpp b/soh/soh/Enhancements/game-interactor/GameInteractor_Hooks.cpp
index 190302fc8..d65ee300b 100644
--- a/soh/soh/Enhancements/game-interactor/GameInteractor_Hooks.cpp
+++ b/soh/soh/Enhancements/game-interactor/GameInteractor_Hooks.cpp
@@ -30,6 +30,22 @@ void GameInteractor_ExecuteOnSceneInitHooks(int16_t sceneNum) {
GameInteractor::Instance->ExecuteHooks(sceneNum);
}
+void GameInteractor_ExecuteOnSceneFlagSet(int16_t sceneNum, int16_t flagType, int16_t flag) {
+ GameInteractor::Instance->ExecuteHooks(sceneNum, flagType, flag);
+}
+
+void GameInteractor_ExecuteOnSceneFlagUnset(int16_t sceneNum, int16_t flagType, int16_t flag) {
+ GameInteractor::Instance->ExecuteHooks(sceneNum, flagType, flag);
+}
+
+void GameInteractor_ExecuteOnFlagSet(int16_t flagType, int16_t flag) {
+ GameInteractor::Instance->ExecuteHooks(flagType, flag);
+}
+
+void GameInteractor_ExecuteOnFlagUnset(int16_t flagType, int16_t flag) {
+ GameInteractor::Instance->ExecuteHooks(flagType, flag);
+}
+
void GameInteractor_ExecuteOnSceneSpawnActors() {
GameInteractor::Instance->ExecuteHooks();
}
diff --git a/soh/soh/Enhancements/game-interactor/GameInteractor_Hooks.h b/soh/soh/Enhancements/game-interactor/GameInteractor_Hooks.h
index 31d998a5d..11589cab6 100644
--- a/soh/soh/Enhancements/game-interactor/GameInteractor_Hooks.h
+++ b/soh/soh/Enhancements/game-interactor/GameInteractor_Hooks.h
@@ -11,6 +11,10 @@ void GameInteractor_ExecuteOnItemReceiveHooks(GetItemEntry itemEntry);
void GameInteractor_ExecuteOnSaleEndHooks(GetItemEntry itemEntry);
void GameInteractor_ExecuteOnTransitionEndHooks(int16_t sceneNum);
void GameInteractor_ExecuteOnSceneInit(int16_t sceneNum);
+void GameInteractor_ExecuteOnSceneFlagSet(int16_t sceneNum, int16_t flagType, int16_t flag);
+void GameInteractor_ExecuteOnSceneFlagUnset(int16_t sceneNum, int16_t flagType, int16_t flag);
+void GameInteractor_ExecuteOnFlagSet(int16_t flagType, int16_t flag);
+void GameInteractor_ExecuteOnFlagUnset(int16_t flagType, int16_t flag);
void GameInteractor_ExecuteOnSceneSpawnActors();
void GameInteractor_ExecuteOnPlayerUpdate();
void GameInteractor_ExecuteOnOcarinaSongAction();
diff --git a/soh/soh/Enhancements/game-interactor/GameInteractor_RawAction.cpp b/soh/soh/Enhancements/game-interactor/GameInteractor_RawAction.cpp
index e78da02e1..864eef427 100644
--- a/soh/soh/Enhancements/game-interactor/GameInteractor_RawAction.cpp
+++ b/soh/soh/Enhancements/game-interactor/GameInteractor_RawAction.cpp
@@ -127,6 +127,127 @@ void GameInteractor::RawAction::KnockbackPlayer(float strength) {
func_8002F71C(gPlayState, &player->actor, strength * 5, player->actor.world.rot.y + 0x8000, strength * 5);
}
+void GameInteractor::RawAction::SetSceneFlag(int16_t sceneNum, int16_t flagType, int16_t flag) {
+ switch (flagType) {
+ case FlagType::FLAG_SCENE_SWITCH:
+ if (sceneNum == gPlayState->sceneNum) {
+ if (flag < 0x20) {
+ gPlayState->actorCtx.flags.swch |= (1 << flag);
+ } else {
+ gPlayState->actorCtx.flags.tempSwch |= (1 << (flag - 0x20));
+ }
+ }
+ if (flag < 0x20) {
+ gSaveContext.sceneFlags[sceneNum].swch |= (1 << flag);
+ }
+ break;
+ case FlagType::FLAG_SCENE_CLEAR:
+ if (sceneNum == gPlayState->sceneNum) gPlayState->actorCtx.flags.clear |= (1 << flag);
+ gSaveContext.sceneFlags[sceneNum].clear |= (1 << flag);
+ break;
+ case FlagType::FLAG_SCENE_TREASURE:
+ if (sceneNum == gPlayState->sceneNum) gPlayState->actorCtx.flags.chest |= (1 << flag);
+ gSaveContext.sceneFlags[sceneNum].chest |= (1 << flag);
+ break;
+ case FlagType::FLAG_SCENE_COLLECTIBLE:
+ if (sceneNum == gPlayState->sceneNum) {
+ if (flag != 0) {
+ if (flag < 0x20) {
+ gPlayState->actorCtx.flags.collect |= (1 << flag);
+ } else {
+ gPlayState->actorCtx.flags.tempCollect |= (1 << (flag - 0x20));
+ }
+ }
+ }
+ if (flag != 0 && flag < 0x20) {
+ gSaveContext.sceneFlags[sceneNum].collect |= (1 << flag);
+ }
+ break;
+ }
+};
+
+void GameInteractor::RawAction::UnsetSceneFlag(int16_t sceneNum, int16_t flagType, int16_t flag) {
+ switch (flagType) {
+ case FlagType::FLAG_SCENE_SWITCH:
+ if (sceneNum == gPlayState->sceneNum) {
+ if (flag < 0x20) {
+ gPlayState->actorCtx.flags.swch &= ~(1 << flag);
+ } else {
+ gPlayState->actorCtx.flags.tempSwch &= ~(1 << (flag - 0x20));
+ }
+ }
+ if (flag < 0x20) {
+ gSaveContext.sceneFlags[sceneNum].swch &= ~(1 << flag);
+ }
+ break;
+ case FlagType::FLAG_SCENE_CLEAR:
+ if (sceneNum == gPlayState->sceneNum) gPlayState->actorCtx.flags.clear &= ~(1 << flag);
+ gSaveContext.sceneFlags[sceneNum].clear &= ~(1 << flag);
+ break;
+ case FlagType::FLAG_SCENE_TREASURE:
+ if (sceneNum == gPlayState->sceneNum) gPlayState->actorCtx.flags.chest &= ~(1 << flag);
+ gSaveContext.sceneFlags[sceneNum].chest &= ~(1 << flag);
+ break;
+ case FlagType::FLAG_SCENE_COLLECTIBLE:
+ if (sceneNum == gPlayState->sceneNum) {
+ if (flag != 0) {
+ if (flag < 0x20) {
+ gPlayState->actorCtx.flags.collect &= ~(1 << flag);
+ } else {
+ gPlayState->actorCtx.flags.tempCollect &= ~(1 << (flag - 0x20));
+ }
+ }
+ }
+ if (flag != 0 && flag < 0x20) {
+ gSaveContext.sceneFlags[sceneNum].collect &= ~(1 << flag);
+ }
+ break;
+ }
+};
+
+void GameInteractor::RawAction::SetFlag(int16_t flagType, int16_t flag) {
+ switch (flagType) {
+ case FlagType::FLAG_EVENT_CHECK_INF:
+ gSaveContext.eventChkInf[flag >> 4] |= (1 << (flag & 0xF));
+ break;
+ case FlagType::FLAG_ITEM_GET_INF:
+ gSaveContext.itemGetInf[flag >> 4] |= (1 << (flag & 0xF));
+ break;
+ case FlagType::FLAG_INF_TABLE:
+ gSaveContext.infTable[flag >> 4] |= (1 << (flag & 0xF));
+ break;
+ case FlagType::FLAG_EVENT_INF:
+ gSaveContext.eventInf[flag >> 4] |= (1 << (flag & 0xF));
+ break;
+ case FlagType::FLAG_RANDOMIZER_INF:
+ gSaveContext.randomizerInf[flag >> 4] |= (1 << (flag & 0xF));
+ break;
+ case FlagType::FLAG_GS_TOKEN:
+ SET_GS_FLAGS((flag & 0x1F00) >> 8, flag & 0xFF);
+ break;
+ }
+};
+
+void GameInteractor::RawAction::UnsetFlag(int16_t flagType, int16_t flag) {
+ switch (flagType) {
+ case FlagType::FLAG_EVENT_CHECK_INF:
+ gSaveContext.eventChkInf[flag >> 4] &= ~(1 << (flag & 0xF));
+ break;
+ case FlagType::FLAG_ITEM_GET_INF:
+ gSaveContext.itemGetInf[flag >> 4] &= ~(1 << (flag & 0xF));
+ break;
+ case FlagType::FLAG_INF_TABLE:
+ gSaveContext.infTable[flag >> 4] &= ~(1 << (flag & 0xF));
+ break;
+ case FlagType::FLAG_EVENT_INF:
+ gSaveContext.eventInf[flag >> 4] &= ~(1 << (flag & 0xF));
+ break;
+ case FlagType::FLAG_RANDOMIZER_INF:
+ gSaveContext.randomizerInf[flag >> 4] &= ~(1 << (flag & 0xF));
+ break;
+ }
+};
+
void GameInteractor::RawAction::GiveOrTakeShield(int32_t shield) {
// When taking a shield, make sure it is unequipped as well.
// When giving a shield and the player isn't wearing one yet,
diff --git a/soh/soh/Enhancements/game-interactor/GameInteractor_State.cpp b/soh/soh/Enhancements/game-interactor/GameInteractor_State.cpp
index 881fb7ff5..21642dded 100644
--- a/soh/soh/Enhancements/game-interactor/GameInteractor_State.cpp
+++ b/soh/soh/Enhancements/game-interactor/GameInteractor_State.cpp
@@ -20,6 +20,8 @@ uint8_t GameInteractor::State::RandomWindSecondsSinceLastDirectionChange = 0;
uint8_t GameInteractor::State::RandomBonksActive = 0;
uint8_t GameInteractor::State::SlipperyFloorActive = 0;
uint8_t GameInteractor::State::SecondCollisionUpdate = 0;
+uint8_t GameInteractor::State::TriforceHuntPieceGiven = 0;
+uint8_t GameInteractor::State::TriforceHuntCreditsWarpActive = 0;
void GameInteractor::State::SetPacifistMode(bool active) {
PacifistModeActive = active;
@@ -127,3 +129,13 @@ uint8_t GameInteractor_GetSlipperyFloorActive() {
uint8_t GameInteractor_SecondCollisionUpdate() {
return GameInteractor::State::SecondCollisionUpdate;
}
+
+// MARK: - GameInteractor::State::TriforceHuntPieceGiven
+void GameInteractor_SetTriforceHuntPieceGiven(uint8_t state) {
+ GameInteractor::State::TriforceHuntPieceGiven = state;
+}
+
+// MARK: - GameInteractor::State::TriforceHuntCreditsWarpActive
+void GameInteractor_SetTriforceHuntCreditsWarpActive(uint8_t state) {
+ GameInteractor::State::TriforceHuntCreditsWarpActive = state;
+}
diff --git a/soh/soh/Enhancements/gameplaystats.cpp b/soh/soh/Enhancements/gameplaystats.cpp
index 6276da8b2..ea95afe8e 100644
--- a/soh/soh/Enhancements/gameplaystats.cpp
+++ b/soh/soh/Enhancements/gameplaystats.cpp
@@ -793,6 +793,7 @@ void SetupDisplayNames() {
strcpy(itemTimestampDisplayName[TIMESTAMP_DEFEAT_GANON], "Ganon Defeated: ");
strcpy(itemTimestampDisplayName[TIMESTAMP_BOSSRUSH_FINISH], "Boss Rush Finished: ");
strcpy(itemTimestampDisplayName[TIMESTAMP_FOUND_GREG], "Greg Found: ");
+ strcpy(itemTimestampDisplayName[TIMESTAMP_TRIFORCE_COMPLETED], "Triforce Completed: ");
}
void SetupDisplayColors() {
@@ -839,6 +840,7 @@ void SetupDisplayColors() {
case ITEM_ARROW_LIGHT:
case TIMESTAMP_DEFEAT_GANONDORF:
case TIMESTAMP_DEFEAT_GANON:
+ case TIMESTAMP_TRIFORCE_COMPLETED:
itemTimestampDisplayColor[i] = COLOR_YELLOW;
break;
case ITEM_SONG_STORMS:
diff --git a/soh/soh/Enhancements/gameplaystats.h b/soh/soh/Enhancements/gameplaystats.h
index 8bcf524d8..8772dd37f 100644
--- a/soh/soh/Enhancements/gameplaystats.h
+++ b/soh/soh/Enhancements/gameplaystats.h
@@ -35,6 +35,7 @@ typedef enum {
/* 0xA9 */ TIMESTAMP_DEFEAT_GANON, // z_boss_ganon2.c
/* 0xA9 */ TIMESTAMP_BOSSRUSH_FINISH, // z_boss_ganon2.c
/* 0xAA */ TIMESTAMP_FOUND_GREG, // z_parameter.c
+ /* 0xAA */ TIMESTAMP_TRIFORCE_COMPLETED, // z_parameter.c
/* 0xAB */ TIMESTAMP_MAX
}GameplayStatTimestamp;
diff --git a/soh/soh/Enhancements/mods.cpp b/soh/soh/Enhancements/mods.cpp
index dc8995454..3e539360e 100644
--- a/soh/soh/Enhancements/mods.cpp
+++ b/soh/soh/Enhancements/mods.cpp
@@ -2,10 +2,12 @@
#include
#include "game-interactor/GameInteractor.h"
#include "tts/tts.h"
+#include "soh/OTRGlobals.h"
#include "soh/Enhancements/boss-rush/BossRushTypes.h"
#include "soh/Enhancements/enhancementTypes.h"
#include "soh/Enhancements/randomizer/3drando/random.hpp"
#include "soh/Enhancements/cosmetics/authenticGfxPatches.h"
+#include
#include "soh/Enhancements/nametag.h"
#include "src/overlays/actors/ovl_En_Bb/z_en_bb.h"
@@ -231,9 +233,9 @@ void RegisterOcarinaTimeTravel() {
gPlayState->msgCtx.lastPlayedSong == OCARINA_SONG_TIME && !nearbyTimeBlockEmpty && !nearbyTimeBlock &&
!nearbyOcarinaSpot && !nearbyFrogs) {
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
CVarSetInteger("gSwitchTimeline", 1);
- } else if (!gSaveContext.n64ddFlag && !nearbyDoorOfTime) {
+ } else if (!IS_RANDO && !nearbyDoorOfTime) {
// This check is made for when Link is learning the Song Of Time in a vanilla save file that load a
// Temple of Time scene where the only object present is the Door of Time
CVarSetInteger("gSwitchTimeline", 1);
@@ -469,7 +471,7 @@ void RegisterHyperBosses() {
uint8_t hyperBossesActive =
CVarGetInteger("gHyperBosses", 0) ||
- (gSaveContext.isBossRush &&
+ (IS_BOSS_RUSH &&
gSaveContext.bossRushOptions[BR_OPTIONS_HYPERBOSSES] == BR_CHOICE_HYPERBOSSES_YES);
// Don't apply during cutscenes because it causes weird behaviour and/or crashes on some bosses.
@@ -581,7 +583,7 @@ void UpdateMirrorModeState(int32_t sceneNum) {
(sceneNum == SCENE_GANON_BOSS);
if (mirroredMode == MIRRORED_WORLD_RANDOM_SEEDED || mirroredMode == MIRRORED_WORLD_DUNGEONS_RANDOM_SEEDED) {
- uint32_t seed = sceneNum + (gSaveContext.n64ddFlag ? gSaveContext.finalSeed : gSaveContext.sohStats.fileCreatedAt);
+ uint32_t seed = sceneNum + (IS_RANDO ? gSaveContext.finalSeed : gSaveContext.sohStats.fileCreatedAt);
Random_Init(seed);
}
@@ -615,6 +617,45 @@ void RegisterMirrorModeHandler() {
});
}
+f32 triforcePieceScale;
+
+void RegisterTriforceHunt() {
+ GameInteractor::Instance->RegisterGameHook([]() {
+ if (!GameInteractor::IsGameplayPaused() &&
+ OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_TRIFORCE_HUNT)) {
+
+ // Warp to credits
+ if (GameInteractor::State::TriforceHuntCreditsWarpActive) {
+ gPlayState->nextEntranceIndex = 0x6B;
+ gSaveContext.nextCutsceneIndex = 0xFFF2;
+ gPlayState->sceneLoadFlag = 0x14;
+ gPlayState->fadeTransition = 3;
+ GameInteractor::State::TriforceHuntCreditsWarpActive = 0;
+ }
+
+ // Reset Triforce Piece scale for GI animation. Triforce Hunt allows for multiple triforce models,
+ // and cycles through them based on the amount of triforce pieces collected. It takes a little while
+ // for the count to increase during the GI animation, so the model is entirely hidden until that piece
+ // has been added. That scale has to be reset after the textbox is closed, and this is the best way
+ // to ensure it's done at that point in time specifically.
+ if (GameInteractor::State::TriforceHuntPieceGiven) {
+ triforcePieceScale = 0.0f;
+ GameInteractor::State::TriforceHuntPieceGiven = 0;
+ }
+
+ uint8_t currentPieces = gSaveContext.triforcePiecesCollected;
+ uint8_t requiredPieces = OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_TRIFORCE_HUNT_PIECES_REQUIRED);
+
+ // Give Boss Key when player loads back into the savefile.
+ if (currentPieces >= requiredPieces && gPlayState->sceneLoadFlag != 0x14 &&
+ (1 << 0 & gSaveContext.inventory.dungeonItems[SCENE_GANONS_TOWER]) == 0) {
+ GetItemEntry getItemEntry = ItemTableManager::Instance->RetrieveItemEntry(MOD_RANDOMIZER, RG_GANONS_CASTLE_BOSS_KEY);
+ GiveItemEntryWithoutActor(gPlayState, getItemEntry);
+ }
+ }
+ });
+}
+
//this map is used for enemies that can be uniquely identified by their id
//and that are always counted
//enemies that can't be uniquely identified by their id
@@ -1008,6 +1049,7 @@ void InitMods() {
RegisterBonkDamage();
RegisterMenuPathFix();
RegisterMirrorModeHandler();
+ RegisterTriforceHunt();
RegisterEnemyDefeatCounts();
RegisterAltTrapTypes();
RegisterRandomizerSheikSpawn();
diff --git a/soh/soh/Enhancements/randomizer/3drando/hints.cpp b/soh/soh/Enhancements/randomizer/3drando/hints.cpp
index 0bae15676..c1610ce07 100644
--- a/soh/soh/Enhancements/randomizer/3drando/hints.cpp
+++ b/soh/soh/Enhancements/randomizer/3drando/hints.cpp
@@ -503,7 +503,9 @@ static std::vector CalculateBarrenRegions() {
if (Location(loc)->GetPlacedItem().IsMajorItem() || ElementInContainer(loc, wothLocations)) {
AddElementsToPool(potentiallyUsefulLocations, std::vector{loc});
} else {
- if (loc != LINKS_POCKET) { //Nobody cares to know if Link's Pocket is barren
+ // Link's Pocket & Triforce Hunt "reward" shouldn't be considered for barren areas because it's clear what
+ // they have to a player.
+ if (loc != LINKS_POCKET && loc != TRIFORCE_COMPLETED) {
AddElementsToPool(barrenLocations, std::vector{loc});
}
}
@@ -723,6 +725,9 @@ static Text BuildGanonBossKeyText() {
} else if (GanonsBossKey.Is(GANONSBOSSKEY_LACS_TOKENS)) {
ganonBossKeyText = BuildCountReq(LACS_TOKENS_HINT, LACSTokenCount);
+
+ } else if (GanonsBossKey.Is(GANONSBOSSKEY_TRIFORCE_HUNT)) {
+ ganonBossKeyText = Hint(GANON_BK_TRIFORCE_HINT).GetText();
}
return Text()+"$b"+ganonBossKeyText+"^";
diff --git a/soh/soh/Enhancements/randomizer/3drando/item_list.cpp b/soh/soh/Enhancements/randomizer/3drando/item_list.cpp
index dd7533b98..417203a5b 100644
--- a/soh/soh/Enhancements/randomizer/3drando/item_list.cpp
+++ b/soh/soh/Enhancements/randomizer/3drando/item_list.cpp
@@ -242,6 +242,7 @@ void ItemTable_Init() { // RandomizerGet
itemTable[BUY_RED_POTION_40] = Item(RG_BUY_RED_POTION_40, Text{"Buy Red Potion [40]", "Acheter: Potion Rouge [40]", "Comprar poción roja [40]"}, ITEMTYPE_SHOP, 0x30, false, &noVariable, BOTTLE_WITH_RED_POTION, 40);
itemTable[BUY_RED_POTION_50] = Item(RG_BUY_RED_POTION_50, Text{"Buy Red Potion [50]", "Acheter: Potion Rouge [50]", "Comprar poción roja [50]"}, ITEMTYPE_SHOP, 0x31, false, &noVariable, BOTTLE_WITH_RED_POTION, 50);
+ itemTable[TRIFORCE_PIECE] = Item(RG_TRIFORCE_PIECE, Text{"Triforce Piece", "Triforce Piece", "Triforce Piece"}, ITEMTYPE_ITEM, 0xDF, true, &TriforcePieces, TRIFORCE_PIECE);
itemTable[TRIFORCE] = Item(RG_TRIFORCE, Text{"Triforce", "Triforce", "Trifuerza"}, ITEMTYPE_EVENT, GI_RUPEE_RED_LOSE, false, &noVariable, NONE);
itemTable[HINT] = Item(RG_HINT, Text{"Hint", "Indice", "Pista"}, ITEMTYPE_EVENT, GI_RUPEE_BLUE_LOSE, false, &noVariable, NONE);
diff --git a/soh/soh/Enhancements/randomizer/3drando/item_location.cpp b/soh/soh/Enhancements/randomizer/3drando/item_location.cpp
index 2327a4a4d..1c085021c 100644
--- a/soh/soh/Enhancements/randomizer/3drando/item_location.cpp
+++ b/soh/soh/Enhancements/randomizer/3drando/item_location.cpp
@@ -918,6 +918,7 @@ void LocationTable_Init() {
locationTable[DMC_UPPER_GROTTO_GOSSIP_STONE] = ItemLocation::HintStone(RC_DMC_UPPER_GROTTO_GOSSIP_STONE, "DMC Upper Grotto Gossip Stone");
locationTable[GANONDORF_HINT] = ItemLocation::OtherHint(RC_GANONDORF_HINT, "Ganondorf Hint");
+ locationTable[TRIFORCE_COMPLETED] = ItemLocation::Reward (RC_TRIFORCE_COMPLETED, 0xFF, "Completed Triforce", NONE, TRIFORCE_COMPLETED, {}, SpoilerCollectionCheck::None(), SpoilerCollectionCheckGroup::GROUP_NO_GROUP);
for (int i = NONE; i != KEY_ENUM_MAX; i++)
locationLookupTable.insert(std::make_pair(locationTable[i].GetRandomizerCheck(), static_cast(i)));
@@ -1523,6 +1524,9 @@ void GenerateLocationPool() {
allLocations.clear();
AddLocation(LINKS_POCKET);
+ if (Settings::TriforceHunt.Is(TRIFORCE_HUNT_ON)) {
+ AddLocation(TRIFORCE_COMPLETED);
+ }
AddLocations(overworldLocations);
for (auto dungeon : Dungeon::dungeonList) {
diff --git a/soh/soh/Enhancements/randomizer/3drando/item_pool.cpp b/soh/soh/Enhancements/randomizer/3drando/item_pool.cpp
index 9b55eb0b4..485fc4154 100644
--- a/soh/soh/Enhancements/randomizer/3drando/item_pool.cpp
+++ b/soh/soh/Enhancements/randomizer/3drando/item_pool.cpp
@@ -662,9 +662,17 @@ void GenerateItemPool() {
IceTrapModels.push_back(0xD3);
}
+ if (TriforceHunt.Is(TRIFORCE_HUNT_ON)) {
+ IceTrapModels.push_back(0xDF);
+ AddItemToMainPool(TRIFORCE_PIECE, Settings::TriforceHuntTotal.Value());
+ PlaceItemInLocation(TRIFORCE_COMPLETED, TRIFORCE); // Win condition
+ PlaceItemInLocation(GANON, GetJunkItem(), false, true);
+ } else {
+ PlaceItemInLocation(GANON, TRIFORCE); // Win condition
+ }
+
//Fixed item locations
PlaceItemInLocation(HC_ZELDAS_LETTER, ZELDAS_LETTER);
- PlaceItemInLocation(GANON, TRIFORCE); //The Triforce is only used to make sure Ganon is accessible
PlaceItemInLocation(MARKET_BOMBCHU_BOWLING_BOMBCHUS, BOMBCHU_DROP);
if (ShuffleKokiriSword) {
@@ -1135,7 +1143,7 @@ void GenerateItemPool() {
if (GanonsBossKey.Is(GANONSBOSSKEY_FINAL_GS_REWARD)) {
PlaceItemInLocation(KAK_100_GOLD_SKULLTULA_REWARD, GANONS_CASTLE_BOSS_KEY);
- } else if (GanonsBossKey.Value() >= GANONSBOSSKEY_LACS_VANILLA) {
+ } else if (GanonsBossKey.Value() >= GANONSBOSSKEY_LACS_VANILLA && GanonsBossKey.IsNot(GANONSBOSSKEY_TRIFORCE_HUNT)) {
PlaceItemInLocation(TOT_LIGHT_ARROWS_CUTSCENE, GANONS_CASTLE_BOSS_KEY);
} else if (GanonsBossKey.Is(GANONSBOSSKEY_VANILLA)) {
PlaceItemInLocation(GANONS_TOWER_BOSS_KEY_CHEST, GANONS_CASTLE_BOSS_KEY);
diff --git a/soh/soh/Enhancements/randomizer/3drando/keys.hpp b/soh/soh/Enhancements/randomizer/3drando/keys.hpp
index 38011b8b8..6e9e87f4e 100644
--- a/soh/soh/Enhancements/randomizer/3drando/keys.hpp
+++ b/soh/soh/Enhancements/randomizer/3drando/keys.hpp
@@ -202,6 +202,7 @@ typedef enum {
TRIFORCE,
TRIFORCE_PIECE,
+ TRIFORCE_COMPLETED,
EPONA,
HINT,
diff --git a/soh/soh/Enhancements/randomizer/3drando/location_access.cpp b/soh/soh/Enhancements/randomizer/3drando/location_access.cpp
index a78d00a30..6be67ea84 100644
--- a/soh/soh/Enhancements/randomizer/3drando/location_access.cpp
+++ b/soh/soh/Enhancements/randomizer/3drando/location_access.cpp
@@ -256,7 +256,8 @@ void AreaTable_Init() {
//name, scene, hint text, events, locations, exits
areaTable[ROOT] = Area("Root", "", LINKS_POCKET, NO_DAY_NIGHT_CYCLE, {}, {
//Locations
- LocationAccess(LINKS_POCKET, {[]{return true;}})
+ LocationAccess(LINKS_POCKET, {[]{return true;}}),
+ LocationAccess(TRIFORCE_COMPLETED, { [] { return CanCompleteTriforce;}}),
}, {
//Exits
Entrance(ROOT_EXITS, {[]{return true;}})
diff --git a/soh/soh/Enhancements/randomizer/3drando/logic.cpp b/soh/soh/Enhancements/randomizer/3drando/logic.cpp
index 6fe26a417..ddf53824e 100644
--- a/soh/soh/Enhancements/randomizer/3drando/logic.cpp
+++ b/soh/soh/Enhancements/randomizer/3drando/logic.cpp
@@ -150,6 +150,9 @@ namespace Logic {
uint8_t BottomOfTheWellKeys = 0;
uint8_t TreasureGameKeys = 0;
+ //Triforce Pieces
+ uint8_t TriforcePieces = 0;
+
//Boss Keys
bool BossKeyForestTemple = false;
bool BossKeyFireTemple = false;
@@ -309,6 +312,7 @@ namespace Logic {
bool AtDay = false;
bool AtNight = false;
uint8_t Age = 0;
+ bool CanCompleteTriforce = false;
//Events
bool ShowedMidoSwordAndShield = false;
@@ -620,7 +624,7 @@ namespace Logic {
(LACSCondition == LACSCONDITION_REWARDS && StoneCount + MedallionCount + (Greg && GregInLogic ? 1 : 0) >= LACSRewardCount.Value()) ||
(LACSCondition == LACSCONDITION_DUNGEONS && DungeonCount + (Greg && GregInLogic ? 1 : 0) >= LACSDungeonCount.Value()) ||
(LACSCondition == LACSCONDITION_TOKENS && GoldSkulltulaTokens >= LACSTokenCount.Value());
-
+ CanCompleteTriforce = TriforcePieces >= TriforceHuntRequired.Value();
}
bool SmallKeys(Key dungeon, uint8_t requiredAmount) {
@@ -873,7 +877,8 @@ namespace Logic {
NumBottles = 0;
NoBottles = false;
-
+ //Triforce Pieces
+ TriforcePieces = 0;
//Drops and Bottle Contents Access
DekuNutDrop = false;
diff --git a/soh/soh/Enhancements/randomizer/3drando/logic.hpp b/soh/soh/Enhancements/randomizer/3drando/logic.hpp
index 77f942168..4d24fd3ff 100644
--- a/soh/soh/Enhancements/randomizer/3drando/logic.hpp
+++ b/soh/soh/Enhancements/randomizer/3drando/logic.hpp
@@ -143,6 +143,9 @@ extern uint8_t GerudoFortressKeys;
extern uint8_t GanonsCastleKeys;
extern uint8_t TreasureGameKeys;
+// Triforce Pieces
+extern uint8_t TriforcePieces;
+
// Boss Keys
extern bool BossKeyForestTemple;
extern bool BossKeyFireTemple;
@@ -298,6 +301,7 @@ extern bool AtDay;
extern bool AtNight;
extern bool LinksCow;
extern uint8_t Age;
+extern bool CanCompleteTriforce;
// Events
extern bool ShowedMidoSwordAndShield;
diff --git a/soh/soh/Enhancements/randomizer/3drando/settings.cpp b/soh/soh/Enhancements/randomizer/3drando/settings.cpp
index 286f249fc..42fdae5c1 100644
--- a/soh/soh/Enhancements/randomizer/3drando/settings.cpp
+++ b/soh/soh/Enhancements/randomizer/3drando/settings.cpp
@@ -101,6 +101,9 @@ namespace Settings {
Option BombchusInLogic = Option::Bool("Bombchus in Logic", {"Off", "On"});
Option AmmoDrops = Option::U8 ("Ammo Drops", {"On", "On + Bombchu", "Off"}, OptionCategory::Setting, AMMODROPS_BOMBCHU);
Option HeartDropRefill = Option::U8 ("Heart Drops and Refills",{"On", "No Drop", "No Refill", "Off"}, OptionCategory::Setting, HEARTDROPREFILL_VANILLA);
+ Option TriforceHunt = Option::U8 ("Triforce Hunt", {"Off", "On"});
+ Option TriforceHuntTotal = Option::U8 ("Triforce Hunt Total Pieces", {NumOpts(0, 100)});
+ Option TriforceHuntRequired = Option::U8 ("Triforce Hunt Required Pieces", {NumOpts(0, 100)});
Option MQDungeonCount = Option::U8(
"MQ Dungeon Count", { MultiVecOpts({ NumOpts(0, 12), { "Random" }, { "Selection" } }) });
uint8_t MQSet;
@@ -139,6 +142,9 @@ namespace Settings {
&BombchusInLogic,
&AmmoDrops,
&HeartDropRefill,
+ &TriforceHunt,
+ &TriforceHuntTotal,
+ &TriforceHuntRequired,
&MQDungeonCount,
&SetDungeonTypes,
&MQDeku,
@@ -219,7 +225,7 @@ namespace Settings {
Option Keysanity = Option::U8 ("Small Keys", {"Start With", "Vanilla", "Own Dungeon", "Any Dungeon", "Overworld", "Anywhere"}, OptionCategory::Setting, KEYSANITY_OWN_DUNGEON);
Option GerudoKeys = Option::U8 ("Gerudo Fortress Keys", {"Vanilla", "Any Dungeon", "Overworld", "Anywhere"});
Option BossKeysanity = Option::U8 ("Boss Keys", {"Start With", "Vanilla", "Own Dungeon", "Any Dungeon", "Overworld", "Anywhere"}, OptionCategory::Setting, BOSSKEYSANITY_OWN_DUNGEON);
- Option GanonsBossKey = Option::U8 ("Ganon's Boss Key", {"Vanilla", "Own dungeon", "Start with", "Any Dungeon", "Overworld", "Anywhere", "LACS-Vanilla", "LACS-Stones", "LACS-Medallions", "LACS-Rewards", "LACS-Dungeons", "LACS-Tokens", "100 GS Reward"}, OptionCategory::Setting, GANONSBOSSKEY_VANILLA);
+ Option GanonsBossKey = Option::U8 ("Ganon's Boss Key", {"Vanilla", "Own dungeon", "Start with", "Any Dungeon", "Overworld", "Anywhere", "LACS-Vanilla", "LACS-Stones", "LACS-Medallions", "LACS-Rewards", "LACS-Dungeons", "LACS-Tokens", "100 GS Reward", "Triforce Hunt"}, OptionCategory::Setting, GANONSBOSSKEY_VANILLA);
uint8_t LACSCondition = 0;
Option LACSStoneCount = Option::U8 ("Stone Count", {NumOpts(0, 4)}, OptionCategory::Setting, 1, true);
Option LACSMedallionCount = Option::U8 ("Medallion Count", {NumOpts(0, 7)}, OptionCategory::Setting, 1, true);
@@ -1685,6 +1691,13 @@ namespace Settings {
IncludeAndHide({KAK_100_GOLD_SKULLTULA_REWARD});
}
+ //Force include Triforce Hunt if it's off
+ if (TriforceHunt) {
+ Unhide({ TRIFORCE_COMPLETED });
+ } else {
+ IncludeAndHide({ TRIFORCE_COMPLETED });
+ }
+
//Force include Map and Compass Chests when Vanilla
std::vector mapChests = GetLocations(everyPossibleLocation, Category::cVanillaMap);
std::vector compassChests = GetLocations(everyPossibleLocation, Category::cVanillaCompass);
@@ -2365,7 +2378,11 @@ namespace Settings {
Keysanity.SetSelectedIndex(cvarSettings[RSK_KEYSANITY]);
GerudoKeys.SetSelectedIndex(cvarSettings[RSK_GERUDO_KEYS]);
BossKeysanity.SetSelectedIndex(cvarSettings[RSK_BOSS_KEYSANITY]);
- GanonsBossKey.SetSelectedIndex(cvarSettings[RSK_GANONS_BOSS_KEY]);
+ if (cvarSettings[RSK_TRIFORCE_HUNT]) {
+ GanonsBossKey.SetSelectedIndex(RO_GANON_BOSS_KEY_TRIFORCE_HUNT);
+ } else {
+ GanonsBossKey.SetSelectedIndex(cvarSettings[RSK_GANONS_BOSS_KEY]);
+ }
LACSStoneCount.SetSelectedIndex(cvarSettings[RSK_LACS_STONE_COUNT]);
LACSMedallionCount.SetSelectedIndex(cvarSettings[RSK_LACS_MEDALLION_COUNT]);
LACSRewardCount.SetSelectedIndex(cvarSettings[RSK_LACS_REWARD_COUNT]);
@@ -2470,6 +2487,10 @@ namespace Settings {
}
}
+ TriforceHunt.SetSelectedIndex(cvarSettings[RSK_TRIFORCE_HUNT]);
+ TriforceHuntTotal.SetSelectedIndex(cvarSettings[RSK_TRIFORCE_HUNT_PIECES_TOTAL]);
+ TriforceHuntRequired.SetSelectedIndex(cvarSettings[RSK_TRIFORCE_HUNT_PIECES_REQUIRED]);
+
//Set key ring for each dungeon
for (size_t i = 0; i < dungeons.size(); i++) {
dungeons[i]->ClearKeyRing();
diff --git a/soh/soh/Enhancements/randomizer/3drando/settings.hpp b/soh/soh/Enhancements/randomizer/3drando/settings.hpp
index dcb9f4e2c..0d3d3c898 100644
--- a/soh/soh/Enhancements/randomizer/3drando/settings.hpp
+++ b/soh/soh/Enhancements/randomizer/3drando/settings.hpp
@@ -91,6 +91,11 @@ typedef enum {
LACS_OPTION_WILDCARD,
} LACSRewardOptionsSetting;
+typedef enum {
+ TRIFORCE_HUNT_OFF,
+ TRIFORCE_HUNT_ON,
+} TriforceHuntSetting;
+
typedef enum {
AGE_CHILD,
AGE_ADULT,
@@ -249,6 +254,7 @@ typedef enum {
GANONSBOSSKEY_LACS_DUNGEONS,
GANONSBOSSKEY_LACS_TOKENS,
GANONSBOSSKEY_FINAL_GS_REWARD,
+ GANONSBOSSKEY_TRIFORCE_HUNT,
} GanonsBossKeySetting;
typedef enum {
@@ -780,6 +786,9 @@ void UpdateSettings(std::unordered_map cvarSettin
extern Option BombchusInLogic;
extern Option AmmoDrops;
extern Option HeartDropRefill;
+ extern Option TriforceHunt;
+ extern Option TriforceHuntTotal;
+ extern Option TriforceHuntRequired;
extern Option MQDungeonCount;
extern Option SetDungeonTypes;
diff --git a/soh/soh/Enhancements/randomizer/3drando/shops.cpp b/soh/soh/Enhancements/randomizer/3drando/shops.cpp
index ac6755da3..8c47ac976 100644
--- a/soh/soh/Enhancements/randomizer/3drando/shops.cpp
+++ b/soh/soh/Enhancements/randomizer/3drando/shops.cpp
@@ -13,7 +13,7 @@ using namespace Settings;
std::vector NonShopItems = {};
-static std::array, 0xD5> trickNameTable; //Table of trick names for ice traps
+static std::array, 0xE0> trickNameTable; // Table of trick names for ice traps
bool initTrickNames = false; //Indicates if trick ice trap names have been initialized yet
//Set vanilla shop item locations before potentially shuffling
@@ -698,6 +698,10 @@ void InitTrickNames() {
Text{"Crystal Heart", "Cœur de cristal", "Corazón de cristal"},
Text{"Life Heart", "Cœur de vie", "Vida Corazón"},
Text{"Lots of Love", "Beaucoup d'amour", "Mucho amor"}};
+ trickNameTable[0xDF] = {
+ Text{"Piece of Cheese", "Morceau de Fromage", "Piece of Cheese"},
+ Text{"Triforce Shard", "Éclat de Triforce", "Triforce Shard"},
+ Text{"Shiny Rock", "Caiiloux Brillant", "Shiny Rock"}};
/*
//Names for individual upgrades, in case progressive names are replaced
diff --git a/soh/soh/Enhancements/randomizer/3drando/starting_inventory.cpp b/soh/soh/Enhancements/randomizer/3drando/starting_inventory.cpp
index 26ea673bc..77b11203e 100644
--- a/soh/soh/Enhancements/randomizer/3drando/starting_inventory.cpp
+++ b/soh/soh/Enhancements/randomizer/3drando/starting_inventory.cpp
@@ -54,7 +54,9 @@ void GenerateStartingInventory() {
AddItemToInventory(SHADOW_TEMPLE_BOSS_KEY);
}
- if (GanonsBossKey.Is(GANONSBOSSKEY_START_WITH)) {
+ // Add Ganon's Boss key with Triforce Hunt so the game thinks it's obtainable from the start.
+ // During save init, the boss key isn't actually given and it's instead given when completing the triforce.
+ if (GanonsBossKey.Is(GANONSBOSSKEY_START_WITH) || GanonsBossKey.Is(GANONSBOSSKEY_TRIFORCE_HUNT)) {
AddItemToInventory(GANONS_CASTLE_BOSS_KEY);
}
diff --git a/soh/soh/Enhancements/randomizer/draw.cpp b/soh/soh/Enhancements/randomizer/draw.cpp
index 34c17356c..c2895dd62 100644
--- a/soh/soh/Enhancements/randomizer/draw.cpp
+++ b/soh/soh/Enhancements/randomizer/draw.cpp
@@ -3,17 +3,23 @@
#include "z64.h"
#include "macros.h"
#include "functions.h"
+#include "variables.h"
+#include "soh/OTRGlobals.h"
#include "randomizerTypes.h"
#include
#include "objects/object_gi_key/object_gi_key.h"
#include "objects/object_gi_bosskey/object_gi_bosskey.h"
#include "objects/object_gi_hearts/object_gi_hearts.h"
#include "objects/gameplay_field_keep/gameplay_field_keep.h"
+#include "soh_assets.h"
+
+extern "C" {
+extern SaveContext gSaveContext;
+}
extern "C" u8 Randomizer_GetSettingValue(RandomizerSettingKey randoSettingKey);
extern "C" void Randomizer_DrawSmallKey(PlayState* play, GetItemEntry* getItemEntry) {
- s32 pad;
s8 keysCanBeOutsideDungeon = getItemEntry->getItemId == RG_GERUDO_FORTRESS_SMALL_KEY ?
Randomizer_GetSettingValue(RSK_GERUDO_KEYS) != RO_GERUDO_KEYS_VANILLA :
DUNGEON_ITEMS_CAN_BE_OUTSIDE_DUNGEON(RSK_KEYSANITY);
@@ -53,7 +59,6 @@ extern "C" void Randomizer_DrawSmallKey(PlayState* play, GetItemEntry* getItemEn
}
extern "C" void Randomizer_DrawBossKey(PlayState* play, GetItemEntry* getItemEntry) {
- s32 pad;
s8 keysCanBeOutsideDungeon = getItemEntry->getItemId == RG_GANONS_CASTLE_BOSS_KEY ?
DUNGEON_ITEMS_CAN_BE_OUTSIDE_DUNGEON(RSK_GANONS_BOSS_KEY) :
DUNGEON_ITEMS_CAN_BE_OUTSIDE_DUNGEON(RSK_BOSS_KEYSANITY);
@@ -107,8 +112,6 @@ extern "C" void Randomizer_DrawBossKey(PlayState* play, GetItemEntry* getItemEnt
}
extern "C" void Randomizer_DrawKeyRing(PlayState* play, GetItemEntry* getItemEntry) {
- s32 pad;
-
s16 color_slot = getItemEntry->getItemId - RG_FOREST_TEMPLE_KEY_RING;
s16 colors[9][3] = {
{ 4, 195, 46 }, // Forest Temple
@@ -155,7 +158,6 @@ extern "C" void Randomizer_DrawKeyRing(PlayState* play, GetItemEntry* getItemEnt
}
extern "C" void Randomizer_DrawDoubleDefense(PlayState* play, GetItemEntry getItemEntry) {
- s32 pad;
OPEN_DISPS(play->state.gfxCtx);
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
@@ -173,3 +175,84 @@ extern "C" void Randomizer_DrawDoubleDefense(PlayState* play, GetItemEntry getIt
CLOSE_DISPS(play->state.gfxCtx);
}
+
+Gfx* Randomizer_GetTriforcePieceDL(uint8_t index) {
+ switch (index) {
+ case 1:
+ return (Gfx*)gTriforcePiece1DL;
+ case 2:
+ return (Gfx*)gTriforcePiece2DL;
+ default:
+ return (Gfx*)gTriforcePiece0DL;
+ }
+}
+
+extern "C" void Randomizer_DrawTriforcePiece(PlayState* play, GetItemEntry getItemEntry) {
+ OPEN_DISPS(play->state.gfxCtx);
+
+ Gfx_SetupDL_25Xlu(play->state.gfxCtx);
+
+ uint16_t current = gSaveContext.triforcePiecesCollected;
+
+ Matrix_Scale(0.035f, 0.035f, 0.035f, MTXMODE_APPLY);
+
+ gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, (char*)__FILE__, __LINE__),
+ G_MTX_MODELVIEW | G_MTX_LOAD);
+
+ Gfx* triforcePieceDL = Randomizer_GetTriforcePieceDL(current % 3);
+
+ gSPDisplayList(POLY_XLU_DISP++, triforcePieceDL);
+
+ CLOSE_DISPS(play->state.gfxCtx);
+}
+
+// Seperate draw function for drawing the Triforce piece when in the GI state.
+// Needed for delaying showing the triforce piece slightly so the triforce shard doesn't
+// suddenly snap to the new piece model or completed triforce because the piece is
+// given mid textbox. Also makes it so the overworld models don't turn into the completed
+// model when the player has exactly the required amount of pieces.
+extern "C" void Randomizer_DrawTriforcePieceGI(PlayState* play, GetItemEntry getItemEntry) {
+ OPEN_DISPS(play->state.gfxCtx);
+
+ Gfx_SetupDL_25Xlu(play->state.gfxCtx);
+
+ uint16_t current = gSaveContext.triforcePiecesCollected;
+ uint16_t required = OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_TRIFORCE_HUNT_PIECES_REQUIRED);
+
+ Matrix_Scale(triforcePieceScale, triforcePieceScale, triforcePieceScale, MTXMODE_APPLY);
+
+ // For creating a delay before showing the model so the model doesn't swap visually when the triforce piece
+ // is given when the textbox just appears.
+ if (triforcePieceScale < 0.0001f) {
+ triforcePieceScale += 0.00003f;
+ }
+
+ // Animation. When not the completed triforce, create delay before showing the piece to bypass interpolation.
+ // If the completed triforce, make it grow slowly.
+ if (current != required) {
+ if (triforcePieceScale > 0.00008f && triforcePieceScale < 0.034f) {
+ triforcePieceScale = 0.034f;
+ } else if (triforcePieceScale < 0.035f) {
+ triforcePieceScale += 0.0005f;
+ }
+ } else if (triforcePieceScale > 0.00008f && triforcePieceScale < 0.035f) {
+ triforcePieceScale += 0.0005f;
+ }
+
+ gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx, (char*)__FILE__, __LINE__),
+ G_MTX_MODELVIEW | G_MTX_LOAD);
+
+ // Show piece when not currently completing the triforce. Use the scale to create a delay so interpolation doesn't
+ // make the triforce twitch when the size is set to a higher value.
+ if (current != required && triforcePieceScale > 0.035f) {
+ // Get shard DL. Remove one before division to account for triforce piece given in the textbox
+ // to match up the shard from the overworld model.
+ Gfx* triforcePieceDL = Randomizer_GetTriforcePieceDL((current - 1) % 3);
+
+ gSPDisplayList(POLY_XLU_DISP++, triforcePieceDL);
+ } else if (current == required && triforcePieceScale > 0.00008f) {
+ gSPDisplayList(POLY_XLU_DISP++, (Gfx*)gTriforcePieceCompletedDL);
+ }
+
+ CLOSE_DISPS(play->state.gfxCtx);
+}
diff --git a/soh/soh/Enhancements/randomizer/draw.h b/soh/soh/Enhancements/randomizer/draw.h
index d9f0ed36b..19510c2f4 100644
--- a/soh/soh/Enhancements/randomizer/draw.h
+++ b/soh/soh/Enhancements/randomizer/draw.h
@@ -6,10 +6,18 @@
typedef struct PlayState PlayState;
-extern "C" void Randomizer_DrawSmallKey(PlayState* play, GetItemEntry* getItemEntry);
-extern "C" void Randomizer_DrawKeyRing(PlayState* play, GetItemEntry* getItemEntry);
-extern "C" void Randomizer_DrawBossKey(PlayState* play, GetItemEntry* getItemEntry);
-extern "C" void Randomizer_DrawDoubleDefense(PlayState* play, GetItemEntry getItemEntry);
-extern "C" void Randomizer_DrawIceTrap(PlayState* play, GetItemEntry getItemEntry);
+#ifdef __cplusplus
+extern "C" {
+#endif
+void Randomizer_DrawSmallKey(PlayState* play, GetItemEntry* getItemEntry);
+void Randomizer_DrawKeyRing(PlayState* play, GetItemEntry* getItemEntry);
+void Randomizer_DrawBossKey(PlayState* play, GetItemEntry* getItemEntry);
+void Randomizer_DrawDoubleDefense(PlayState* play, GetItemEntry getItemEntry);
+void Randomizer_DrawTriforcePiece(PlayState* play, GetItemEntry getItemEntry);
+void Randomizer_DrawTriforcePieceGI(PlayState* play, GetItemEntry getItemEntry);
+#ifdef __cplusplus
+};
+#endif
+
#endif
diff --git a/soh/soh/Enhancements/randomizer/randomizer.cpp b/soh/soh/Enhancements/randomizer/randomizer.cpp
index d50c23335..78a9d0525 100644
--- a/soh/soh/Enhancements/randomizer/randomizer.cpp
+++ b/soh/soh/Enhancements/randomizer/randomizer.cpp
@@ -55,6 +55,7 @@ const std::string Randomizer::getItemMessageTableID = "Randomizer";
const std::string Randomizer::hintMessageTableID = "RandomizerHints";
const std::string Randomizer::merchantMessageTableID = "RandomizerMerchants";
const std::string Randomizer::rupeeMessageTableID = "RandomizerRupees";
+const std::string Randomizer::triforcePieceMessageTableID = "RandomizerTriforcePiece";
const std::string Randomizer::NaviRandoMessageTableID = "RandomizerNavi";
const std::string Randomizer::IceTrapRandoMessageTableID = "RandomizerIceTrap";
const std::string Randomizer::randoMiscHintsTableID = "RandomizerMiscHints";
@@ -320,6 +321,9 @@ std::unordered_map SpoilerfileSettingNameToEn
{ "World Settings:Mix Interiors", RSK_MIX_INTERIOR_ENTRANCES },
{ "World Settings:Mix Grottos", RSK_MIX_GROTTO_ENTRANCES },
{ "World Settings:Decouple Entrances", RSK_DECOUPLED_ENTRANCES },
+ { "World Settings:Triforce Hunt", RSK_TRIFORCE_HUNT },
+ { "World Settings:Triforce Hunt Total Pieces", RSK_TRIFORCE_HUNT_PIECES_TOTAL },
+ { "World Settings:Triforce Hunt Required Pieces", RSK_TRIFORCE_HUNT_PIECES_REQUIRED },
{ "Misc Settings:Gossip Stone Hints", RSK_GOSSIP_STONE_HINTS },
{ "Misc Settings:Hint Clarity", RSK_HINT_CLARITY },
{ "Misc Settings:ToT Altar Hint", RSK_TOT_ALTAR_HINT },
@@ -799,6 +803,8 @@ void Randomizer::ParseRandomizerSettingsFile(const char* spoilerFileName) {
case RSK_BIG_POE_COUNT:
case RSK_CUCCO_COUNT:
case RSK_STARTING_SKULLTULA_TOKEN:
+ case RSK_TRIFORCE_HUNT_PIECES_TOTAL:
+ case RSK_TRIFORCE_HUNT_PIECES_REQUIRED:
numericValueString = it.value();
gSaveContext.randoSettings[index].value = std::stoi(numericValueString);
break;
@@ -908,6 +914,7 @@ void Randomizer::ParseRandomizerSettingsFile(const char* spoilerFileName) {
case RSK_DECOUPLED_ENTRANCES:
case RSK_SHOPSANITY_PRICES_AFFORDABLE:
case RSK_ALL_LOCATIONS_REACHABLE:
+ case RSK_TRIFORCE_HUNT:
if(it.value() == "Off") {
gSaveContext.randoSettings[index].value = RO_GENERIC_OFF;
} else if(it.value() == "On") {
@@ -1061,6 +1068,8 @@ void Randomizer::ParseRandomizerSettingsFile(const char* spoilerFileName) {
gSaveContext.randoSettings[index].value = RO_GANON_BOSS_KEY_LACS_TOKENS;
} else if(it.value() == "100 GS Reward") {
gSaveContext.randoSettings[index].value = RO_GANON_BOSS_KEY_KAK_TOKENS;
+ } else if(it.value() == "Triforce Hunt") {
+ gSaveContext.randoSettings[index].value = RO_GANON_BOSS_KEY_TRIFORCE_HUNT;
}
break;
case RSK_RANDOM_MQ_DUNGEONS:
@@ -1980,6 +1989,7 @@ ItemObtainability Randomizer::GetItemObtainabilityFromRandomizerGet(RandomizerGe
case RG_BUY_DEKU_NUT_10:
case RG_BUY_DEKU_STICK_1:
case RG_BUY_HEART:
+ case RG_TRIFORCE_PIECE:
default:
return CAN_OBTAIN;
}
@@ -2990,6 +3000,10 @@ void GenerateRandomizerImgui(std::string seed = "") {
cvarSettings[RSK_MQ_DUNGEON_COUNT] = 0;
}
+ cvarSettings[RSK_TRIFORCE_HUNT] = CVarGetInteger("gRandomizeTriforceHunt", 0);
+ cvarSettings[RSK_TRIFORCE_HUNT_PIECES_TOTAL] = CVarGetInteger("gRandomizeTriforceHuntTotalPieces", 30);
+ cvarSettings[RSK_TRIFORCE_HUNT_PIECES_REQUIRED] = CVarGetInteger("gRandomizeTriforceHuntRequiredPieces", 20);
+
cvarSettings[RSK_MQ_DEKU_TREE] = CVarGetInteger("gRandomizeMqDungeonsDekuTree", 0);
cvarSettings[RSK_MQ_DODONGOS_CAVERN] = CVarGetInteger("gRandomizeMqDungeonsDodongosCavern", 0);
cvarSettings[RSK_MQ_JABU_JABU] = CVarGetInteger("gRandomizeMqDungeonsJabuJabu", 0);
@@ -3502,6 +3516,7 @@ void RandomizerSettingsWindow::DrawElement() {
UIWidgets::PaddedSeparator();
+ // Master Quest Dungeons
if (OTRGlobals::Instance->HasMasterQuest() && OTRGlobals::Instance->HasOriginal()) {
ImGui::PushItemWidth(-FLT_MIN);
ImGui::Text("Master Quest Dungeons");
@@ -3549,8 +3564,43 @@ void RandomizerSettingsWindow::DrawElement() {
UIWidgets::EnhancementCheckbox("Ganon's Castle##RandomizeMqDungeons",
"gRandomizeMqDungeonsGanonsCastle");
}
+
+ UIWidgets::PaddedSeparator();
}
+ // Triforce Hunt
+ UIWidgets::EnhancementCheckbox("Triforce Hunt", "gRandomizeTriforceHunt");
+ UIWidgets::InsertHelpHoverText(
+ "Pieces of the Triforce of Courage have been scattered across the world. Find them all to finish the game!\n\n"
+ "When the required amount of pieces have been found, the game is saved and Ganon's Boss key is given "
+ "to you when you load back into the game if you desire to beat Ganon afterwards.\n\n"
+ "Keep in mind Ganon might not be logically beatable when \"All Locations Reachable\" is turned off."
+ );
+
+ if (CVarGetInteger("gRandomizeTriforceHunt", 0)) {
+ // Triforce Hunt (total pieces)
+ UIWidgets::Spacer(0);
+ int totalPieces = CVarGetInteger("gRandomizeTriforceHuntTotalPieces", 30);
+ ImGui::Text("Triforce Pieces in the world: %d", totalPieces);
+ UIWidgets::InsertHelpHoverText(
+ "The amount of Triforce pieces that will be placed in the world. "
+ "Keep in mind seed generation can fail if more pieces are placed than there are junk items in the item pool."
+ );
+ ImGui::SameLine();
+ UIWidgets::EnhancementSliderInt("", "##TriforceHuntTotalPieces", "gRandomizeTriforceHuntTotalPieces", 1, 100, "", 30);
+
+ // Triforce Hunt (required pieces)
+ int requiredPieces = CVarGetInteger("gRandomizeTriforceHuntRequiredPieces", 20);
+ ImGui::Text("Triforce Pieces to win: %d", requiredPieces);
+ UIWidgets::InsertHelpHoverText(
+ "The amount of Triforce pieces required to win the game."
+ );
+ ImGui::SameLine();
+ UIWidgets::EnhancementSliderInt("", "##TriforceHuntRequiredPieces", "gRandomizeTriforceHuntRequiredPieces", 1, totalPieces, "", 20);
+ }
+
+ UIWidgets::PaddedSeparator();
+
ImGui::EndChild();
// COLUMN 3 - Shuffle Entrances
@@ -4144,7 +4194,11 @@ void RandomizerSettingsWindow::DrawElement() {
"\n"
"100 GS Reward - Ganon's Boss Key will be awarded by the cursed rich man after you collect 100 Gold Skulltula Tokens."
);
- UIWidgets::EnhancementCombobox("gRandomizeShuffleGanonBossKey", randoShuffleGanonsBossKey, RO_GANON_BOSS_KEY_VANILLA);
+ bool disableGBK = CVarGetInteger("gRandomizeTriforceHunt", 0);
+ static const char* disableGBKText = "This option is disabled because Triforce Hunt is enabled. Ganon's Boss key\nwill instead be given to you after Triforce Hunt completion.";
+ UIWidgets::EnhancementCombobox("gRandomizeShuffleGanonBossKey", randoShuffleGanonsBossKey,
+ RO_GANON_BOSS_KEY_VANILLA, disableGBK, disableGBKText,
+ RO_GANON_BOSS_KEY_VANILLA);
ImGui::PopItemWidth();
switch (CVarGetInteger("gRandomizeShuffleGanonBossKey", RO_GANON_BOSS_KEY_VANILLA)) {
case RO_GANON_BOSS_KEY_LACS_STONES:
@@ -5461,6 +5515,70 @@ CustomMessage Randomizer::GetRupeeMessage(u16 rupeeTextId) {
return messageEntry;
}
+void CreateTriforcePieceMessages() {
+ CustomMessage TriforcePieceMessages[NUM_TRIFORCE_PIECE_MESSAGES] = {
+
+ { "You found a %yTriforce Piece%w!&%g{{current}}%w down, %c{{remaining}}%w to go. It's a start!",
+ "Ein %yTriforce-Splitter%w! Du hast&%g{{current}}%w von %c{{required}}%w gefunden. Es ist ein&Anfang!",
+ "Vous trouvez un %yFragment de la&Triforce%w! Vous en avez %g{{current}}%w, il en&reste %c{{remaining}}%w à trouver. C'est un début!" },
+
+ { "You found a %yTriforce Piece%w!&%g{{current}}%w down, %c{{remaining}}%w to go. Progress!",
+ "Ein %yTriforce-Splitter%w! Du hast&%g{{current}}%w von %c{{required}}%w gefunden. Es geht voran!",
+ "Vous trouvez un %yFragment de la&Triforce%w! Vous en avez %g{{current}}%w, il en&reste %c{{remaining}}%w à trouver. Ça avance!" },
+
+ { "You found a %yTriforce Piece%w!&%g{{current}}%w down, %c{{remaining}}%w to go. Over half-way&there!",
+ "Ein %yTriforce-Splitter%w! Du hast&schon %g{{current}}%w von %c{{required}}%w gefunden. Schon&über die Hälfte!",
+ "Vous trouvez un %yFragment de la&Triforce%w! Vous en avez %g{{current}}%w, il en&reste %c{{remaining}}%w à trouver. Il en reste un&peu moins que la moitié!" },
+
+ { "You found a %yTriforce Piece%w!&%g{{current}}%w down, %c{{remaining}}%w to go. Almost done!",
+ "Ein %yTriforce-Splitter%w! Du hast&schon %g{{current}}%w von %c{{required}}%w gefunden. Fast&geschafft!",
+ "Vous trouvez un %yFragment de la&Triforce%w! Vous en avez %g{{current}}%w, il en&reste %c{{remaining}}%w à trouver. C'est presque&terminé!" },
+
+ { "You completed the %yTriforce of&Courage%w! %gGG%w!",
+ "Das %yTriforce des Mutes%w! Du hast&alle Splitter gefunden. %gGut gemacht%w!",
+ "Vous avez complété la %yTriforce&du Courage%w! %gFélicitations%w!" },
+
+ { "You found a spare %yTriforce Piece%w!&You only needed %c{{required}}%w, but you have %g{{current}}%w!",
+ "Ein übriger %yTriforce-Splitter%w! Du&hast nun %g{{current}}%w von %c{{required}}%w nötigen gefunden.",
+ "Vous avez trouvé un %yFragment de&Triforce%w en plus! Vous n'aviez besoin&que de %c{{required}}%w, mais vous en avez %g{{current}}%w en&tout!" },
+ };
+ CustomMessageManager* customMessageManager = CustomMessageManager::Instance;
+ customMessageManager->AddCustomMessageTable(Randomizer::triforcePieceMessageTableID);
+ for (unsigned int i = 0; i <= (NUM_TRIFORCE_PIECE_MESSAGES - 1); i++) {
+ customMessageManager->CreateMessage(Randomizer::triforcePieceMessageTableID, i, TriforcePieceMessages[i]);
+ }
+}
+
+CustomMessage Randomizer::GetTriforcePieceMessage() {
+ // Item is only given after the textbox, so reflect that inside the textbox.
+ uint16_t current = gSaveContext.triforcePiecesCollected + 1;
+ uint16_t required = OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_TRIFORCE_HUNT_PIECES_REQUIRED);
+ uint16_t remaining = required - current;
+ float percentageCollected = (float)current / (float)required;
+ uint8_t messageIndex;
+
+ if (percentageCollected <= 0.25) {
+ messageIndex = TH_MESSAGE_START;
+ } else if (percentageCollected <= 0.5) {
+ messageIndex = TH_MESSAGE_PROGRESS;
+ } else if (percentageCollected <= 0.75) {
+ messageIndex = TH_MESSAGE_HALFWAY;
+ } else if (percentageCollected < 1) {
+ messageIndex = TH_MESSAGE_ALMOSTDONE;
+ } else if (current == required) {
+ messageIndex = TH_MESSAGE_FINISHED;
+ } else {
+ messageIndex = TH_MESSAGE_SURPLUS;
+ }
+
+ CustomMessage messageEntry =
+ CustomMessageManager::Instance->RetrieveMessage(Randomizer::triforcePieceMessageTableID, messageIndex);
+ messageEntry.Replace("{{current}}", std::to_string(current), std::to_string(current), std::to_string(current));
+ messageEntry.Replace("{{remaining}}", std::to_string(remaining), std::to_string(remaining), std::to_string(remaining));
+ messageEntry.Replace("{{required}}", std::to_string(required), std::to_string(required), std::to_string(required));
+ return messageEntry;
+}
+
void CreateNaviRandoMessages() {
CustomMessage NaviMessages[NUM_NAVI_MESSAGES] = {
@@ -5988,6 +6106,7 @@ void Randomizer::CreateCustomMessages() {
}};
CreateGetItemMessages(&getItemMessages);
CreateRupeeMessages();
+ CreateTriforcePieceMessages();
CreateNaviRandoMessages();
CreateIceTrapRandoMessages();
CreateFireTempleGoronMessages();
@@ -6098,6 +6217,7 @@ void InitRandoItemTable() {
GET_ITEM(RG_MAGIC_BEAN_PACK, OBJECT_GI_BEAN, GID_BEAN, TEXT_RANDOMIZER_CUSTOM_ITEM, 0x80, CHEST_ANIM_LONG, ITEM_CATEGORY_MAJOR, MOD_RANDOMIZER, RG_MAGIC_BEAN_PACK),
GET_ITEM(RG_TYCOON_WALLET, OBJECT_GI_PURSE, GID_WALLET_GIANT, TEXT_RANDOMIZER_CUSTOM_ITEM, 0x80, CHEST_ANIM_LONG, ITEM_CATEGORY_LESSER, MOD_RANDOMIZER, RG_TYCOON_WALLET),
GET_ITEM(RG_PROGRESSIVE_BOMBCHUS, OBJECT_GI_BOMB_2, GID_BOMBCHU, 0x33, 0x80, CHEST_ANIM_LONG, ITEM_CATEGORY_MAJOR, MOD_RANDOMIZER, RG_PROGRESSIVE_BOMBCHUS),
+ GET_ITEM(RG_TRIFORCE_PIECE, OBJECT_GI_BOMB_2, GID_TRIFORCE_PIECE, TEXT_RANDOMIZER_CUSTOM_ITEM, 0x80, CHEST_ANIM_LONG, ITEM_CATEGORY_MAJOR, MOD_RANDOMIZER, RG_TRIFORCE_PIECE),
};
ItemTableManager::Instance->AddItemTable(MOD_RANDOMIZER);
for (int i = 0; i < ARRAY_COUNT(extendedVanillaGetItemTable); i++) {
@@ -6113,6 +6233,8 @@ void InitRandoItemTable() {
randoGetItemTable[i].drawFunc = (CustomDrawFunc)Randomizer_DrawBossKey;
} else if (randoGetItemTable[i].itemId == RG_DOUBLE_DEFENSE) {
randoGetItemTable[i].drawFunc = (CustomDrawFunc)Randomizer_DrawDoubleDefense;
+ } else if (randoGetItemTable[i].itemId == RG_TRIFORCE_PIECE) {
+ randoGetItemTable[i].drawFunc = (CustomDrawFunc)Randomizer_DrawTriforcePiece;
}
ItemTableManager::Instance->AddItemEntry(MOD_RANDOMIZER, randoGetItemTable[i].itemId, randoGetItemTable[i]);
}
diff --git a/soh/soh/Enhancements/randomizer/randomizer.h b/soh/soh/Enhancements/randomizer/randomizer.h
index c8a333593..82347d994 100644
--- a/soh/soh/Enhancements/randomizer/randomizer.h
+++ b/soh/soh/Enhancements/randomizer/randomizer.h
@@ -14,6 +14,7 @@
#include "soh/Enhancements/item-tables/ItemTableTypes.h"
#define MAX_SEED_STRING_SIZE 1024
+#define NUM_TRIFORCE_PIECE_MESSAGES 6
#define NUM_NAVI_MESSAGES 19
#define NUM_ICE_TRAP_MESSAGES 23
#define NUM_GORON_MESSAGES 9
@@ -48,6 +49,7 @@ class Randomizer {
static const std::string hintMessageTableID;
static const std::string merchantMessageTableID;
static const std::string rupeeMessageTableID;
+ static const std::string triforcePieceMessageTableID;
static const std::string NaviRandoMessageTableID;
static const std::string IceTrapRandoMessageTableID;
static const std::string randoMiscHintsTableID;
@@ -102,6 +104,7 @@ class Randomizer {
CustomMessage GetMapGetItemMessageWithHint(GetItemEntry itemEntry);
static void CreateCustomMessages();
static CustomMessage GetRupeeMessage(u16 rupeeTextId);
+ static CustomMessage GetTriforcePieceMessage();
bool CheckContainsVanillaItem(RandomizerCheck randoCheck);
};
diff --git a/soh/soh/Enhancements/randomizer/randomizerTypes.h b/soh/soh/Enhancements/randomizer/randomizerTypes.h
index f80ef7595..9d77a9a29 100644
--- a/soh/soh/Enhancements/randomizer/randomizerTypes.h
+++ b/soh/soh/Enhancements/randomizer/randomizerTypes.h
@@ -847,6 +847,7 @@ typedef enum {
RC_ZR_NEAR_GROTTOS_GOSSIP_STONE,
RC_ZR_OPEN_GROTTO_GOSSIP_STONE,
RC_GANONDORF_HINT,
+ RC_TRIFORCE_COMPLETED,
RC_MAX
} RandomizerCheck;
@@ -1302,6 +1303,7 @@ typedef enum {
RG_BUY_RED_POTION_40,
RG_BUY_RED_POTION_50,
RG_TRIFORCE,
+ RG_TRIFORCE_PIECE,
RG_HINT,
RG_TYCOON_WALLET,
RG_MAX
@@ -1453,6 +1455,9 @@ typedef enum {
RSK_ALL_LOCATIONS_REACHABLE,
RSK_SHUFFLE_BOSS_ENTRANCES,
RSK_SHUFFLE_100_GS_REWARD,
+ RSK_TRIFORCE_HUNT,
+ RSK_TRIFORCE_HUNT_PIECES_TOTAL,
+ RSK_TRIFORCE_HUNT_PIECES_REQUIRED,
RSK_MAX
} RandomizerSettingKey;
@@ -1613,6 +1618,7 @@ typedef enum {
RO_GANON_BOSS_KEY_LACS_DUNGEONS,
RO_GANON_BOSS_KEY_LACS_TOKENS,
RO_GANON_BOSS_KEY_KAK_TOKENS,
+ RO_GANON_BOSS_KEY_TRIFORCE_HUNT,
} RandoOptionGanonsBossKey;
// LACS Reward Options settings (Standard rewards, Greg as reward, Greg as wildcard)
@@ -1806,3 +1812,12 @@ typedef enum {
TRACKER_COMBO_BUTTON_D_LEFT,
TRACKER_COMBO_BUTTON_D_RIGHT,
} TrackerComboButton;
+
+typedef enum {
+ TH_MESSAGE_START,
+ TH_MESSAGE_PROGRESS,
+ TH_MESSAGE_HALFWAY,
+ TH_MESSAGE_ALMOSTDONE,
+ TH_MESSAGE_FINISHED,
+ TH_MESSAGE_SURPLUS,
+} TriforceHuntMessages;
diff --git a/soh/soh/Enhancements/randomizer/randomizer_check_tracker.cpp b/soh/soh/Enhancements/randomizer/randomizer_check_tracker.cpp
index 1c880c21d..6a7f2dc6c 100644
--- a/soh/soh/Enhancements/randomizer/randomizer_check_tracker.cpp
+++ b/soh/soh/Enhancements/randomizer/randomizer_check_tracker.cpp
@@ -380,63 +380,63 @@ bool fortressFast;
bool fortressNormal;
void LoadSettings() {
- //If in randomzer (n64ddFlag), then get the setting and check if in general we should be showing the settings
+ //If in randomzer, then get the setting and check if in general we should be showing the settings
//If in vanilla, _try_ to show items that at least are needed for 100%
- showShops = gSaveContext.n64ddFlag ? (
+ showShops = IS_RANDO ? (
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_SHOPSANITY) != RO_SHOPSANITY_OFF &&
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_SHOPSANITY) != RO_SHOPSANITY_ZERO_ITEMS)
: false;
- showBeans = gSaveContext.n64ddFlag ?
+ showBeans = IS_RANDO ?
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_SHUFFLE_MAGIC_BEANS) == RO_GENERIC_YES
: true;
- showScrubs = gSaveContext.n64ddFlag ?
+ showScrubs = IS_RANDO ?
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_SHUFFLE_SCRUBS) != RO_SCRUBS_OFF
: false;
- showMerchants = gSaveContext.n64ddFlag ?
+ showMerchants = IS_RANDO ?
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_SHUFFLE_MERCHANTS) != RO_SHUFFLE_MERCHANTS_OFF
: true;
- showCows = gSaveContext.n64ddFlag ?
+ showCows = IS_RANDO ?
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_SHUFFLE_COWS) == RO_GENERIC_YES
: false;
- showAdultTrade = gSaveContext.n64ddFlag ?
+ showAdultTrade = IS_RANDO ?
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_SHUFFLE_ADULT_TRADE) == RO_GENERIC_YES
: true;
- showKokiriSword = gSaveContext.n64ddFlag ?
+ showKokiriSword = IS_RANDO ?
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_SHUFFLE_KOKIRI_SWORD) == RO_GENERIC_YES
: true;
- showWeirdEgg = gSaveContext.n64ddFlag ?
+ showWeirdEgg = IS_RANDO ?
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_SHUFFLE_WEIRD_EGG) == RO_GENERIC_YES
: true;
- showGerudoCard = gSaveContext.n64ddFlag ?
+ showGerudoCard = IS_RANDO ?
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_SHUFFLE_GERUDO_MEMBERSHIP_CARD) == RO_GENERIC_YES
: true;
- showFrogSongRupees = gSaveContext.n64ddFlag ?
+ showFrogSongRupees = IS_RANDO ?
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_SHUFFLE_FROG_SONG_RUPEES) == RO_GENERIC_YES
: false;
- showStartingMapsCompasses = gSaveContext.n64ddFlag ?
+ showStartingMapsCompasses = IS_RANDO ?
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_STARTING_MAPS_COMPASSES) != RO_DUNGEON_ITEM_LOC_VANILLA
: false;
- showKeysanity = gSaveContext.n64ddFlag ?
+ showKeysanity = IS_RANDO ?
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_KEYSANITY) != RO_DUNGEON_ITEM_LOC_VANILLA
: false;
- showBossKeysanity = gSaveContext.n64ddFlag ?
+ showBossKeysanity = IS_RANDO ?
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_BOSS_KEYSANITY) != RO_DUNGEON_ITEM_LOC_VANILLA
: false;
- showGerudoFortressKeys = gSaveContext.n64ddFlag ?
+ showGerudoFortressKeys = IS_RANDO ?
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_GERUDO_KEYS) != RO_GERUDO_KEYS_VANILLA
: false;
- showGanonBossKey = gSaveContext.n64ddFlag ?
+ showGanonBossKey = IS_RANDO ?
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_GANONS_BOSS_KEY) != RO_GANON_BOSS_KEY_VANILLA
: false;
- showOcarinas = gSaveContext.n64ddFlag ?
+ showOcarinas = IS_RANDO ?
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_SHUFFLE_OCARINA) == RO_GENERIC_YES
: false;
- show100SkullReward = gSaveContext.n64ddFlag ?
+ show100SkullReward = IS_RANDO ?
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_SHUFFLE_100_GS_REWARD) == RO_GENERIC_YES
: false;
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
switch (OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_SHUFFLE_TOKENS)) {
case RO_TOKENSANITY_ALL:
showOverworldTokens = true;
@@ -747,7 +747,7 @@ bool HasItemBeenCollected(RandomizerCheckObject obj) {
case SpoilerCollectionCheckType::SPOILER_CHK_GRAVEDIGGER:
// Gravedigger has a fix in place that means one of two save locations. Check both.
return (gSaveContext.itemGetInf[1] & 0x1000) || // vanilla flag
- ((gSaveContext.n64ddFlag || CVarGetInteger("gGravediggingTourFix", 0)) &&
+ ((IS_RANDO || CVarGetInteger("gGravediggingTourFix", 0)) &&
gSaveContext.sceneFlags[scene].collect & (1 << flag)); // rando/fix flag
default:
return false;
@@ -831,7 +831,7 @@ void DrawLocation(RandomizerCheckObject rcObj, RandomizerCheckShow* thisCheckSta
case RCSHOW_SAVED:
case RCSHOW_CHECKED:
case RCSHOW_SCUMMED:
- if (gSaveContext.n64ddFlag)
+ if (IS_RANDO)
txt = OTRGlobals::Instance->gRandomizer
->EnumToSpoilerfileGetName[gSaveContext.itemLocations[rcObj.rc].get.rgID][gSaveContext.language];
else if (gSaveContext.language == LANGUAGE_ENG)
@@ -843,7 +843,7 @@ void DrawLocation(RandomizerCheckObject rcObj, RandomizerCheckShow* thisCheckSta
txt = "Skipped"; //TODO language
break;
case RCSHOW_SEEN:
- if (gSaveContext.n64ddFlag)
+ if (IS_RANDO)
txt = OTRGlobals::Instance->gRandomizer
->EnumToSpoilerfileGetName[gSaveContext.itemLocations[rcObj.rc].get.fakeRgID][gSaveContext.language];
else if (gSaveContext.language == LANGUAGE_ENG)
diff --git a/soh/soh/Enhancements/randomizer/randomizer_item_tracker.cpp b/soh/soh/Enhancements/randomizer/randomizer_item_tracker.cpp
index 884f70071..bfb44c6c7 100644
--- a/soh/soh/Enhancements/randomizer/randomizer_item_tracker.cpp
+++ b/soh/soh/Enhancements/randomizer/randomizer_item_tracker.cpp
@@ -80,6 +80,10 @@ std::vector gregItems = {
ITEM_TRACKER_ITEM(ITEM_RUPEE_GREEN, 0, DrawItem),
};
+std::vector triforcePieces = {
+ ITEM_TRACKER_ITEM(RG_TRIFORCE_PIECE, 0, DrawItem),
+};
+
std::vector itemTrackerDungeonsWithMapsHorizontal = {
{ SCENE_DEKU_TREE, { ITEM_DUNGEON_MAP, ITEM_COMPASS } },
{ SCENE_DODONGOS_CAVERN, { ITEM_DUNGEON_MAP, ITEM_COMPASS } },
@@ -243,6 +247,11 @@ typedef enum {
KEYS_CURRENT_MAX
} ItemTrackerKeysNumberOption;
+typedef enum {
+ TRIFORCE_PIECE_COLLECTED_REQUIRED,
+ TRIFORCE_PIECE_COLLECTED_REQUIRED_MAX
+} ItemTrackerTriforcePieceNumberOption;
+
typedef enum {
SECTION_DISPLAY_HIDDEN,
SECTION_DISPLAY_MAIN_WINDOW,
@@ -488,6 +497,37 @@ void DrawItemCount(ItemTrackerItem item) {
ImGui::PushStyleColor(ImGuiCol_Text, maxColor);
ImGui::Text("%s", maxString.c_str());
ImGui::PopStyleColor();
+ } else if (item.id == RG_TRIFORCE_PIECE && gSaveContext.n64ddFlag &&
+ OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_TRIFORCE_HUNT) && IsValidSaveFile()) {
+ std::string currentString = "";
+ std::string requiredString = "";
+ std::string maxString = "";
+ uint8_t piecesRequired = OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_TRIFORCE_HUNT_PIECES_REQUIRED);
+ uint8_t piecesTotal = OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_TRIFORCE_HUNT_PIECES_TOTAL);
+ ImU32 currentColor = gSaveContext.triforcePiecesCollected >= piecesRequired ? IM_COL_GREEN : IM_COL_WHITE;
+ ImU32 maxColor = IM_COL_GREEN;
+ int32_t trackerTriforcePieceNumberDisplayMode = CVarGetInteger("gItemTrackerTriforcePieceTrack", TRIFORCE_PIECE_COLLECTED_REQUIRED_MAX);
+
+ currentString += std::to_string(gSaveContext.triforcePiecesCollected);
+ currentString += "/";
+ // gItemTrackerTriforcePieceTrack
+ if (trackerTriforcePieceNumberDisplayMode == TRIFORCE_PIECE_COLLECTED_REQUIRED_MAX) {
+ currentString += std::to_string(piecesRequired);
+ currentString += "/";
+ maxString += std::to_string(piecesTotal);
+ } else if (trackerTriforcePieceNumberDisplayMode == TRIFORCE_PIECE_COLLECTED_REQUIRED) {
+ maxString += std::to_string(piecesRequired);
+ }
+
+ ImGui::SetCursorScreenPos(
+ ImVec2(p.x + (iconSize / 2) - (ImGui::CalcTextSize((currentString + maxString).c_str()).x / 2), p.y - 14));
+ ImGui::PushStyleColor(ImGuiCol_Text, currentColor);
+ ImGui::Text(currentString.c_str());
+ ImGui::PopStyleColor();
+ ImGui::SameLine(0, 0.0f);
+ ImGui::PushStyleColor(ImGuiCol_Text, maxColor);
+ ImGui::Text(maxString.c_str());
+ ImGui::PopStyleColor();
} else {
ImGui::SetCursorScreenPos(ImVec2(p.x, p.y - 14));
ImGui::Text("");
@@ -520,9 +560,11 @@ void DrawQuest(ItemTrackerItem item) {
};
void DrawItem(ItemTrackerItem item) {
+
uint32_t actualItemId = INV_CONTENT(item.id);
int iconSize = CVarGetInteger("gItemTrackerIconSize", 36);
bool hasItem = actualItemId != ITEM_NONE;
+ std::string itemName = "";
if (item.id == ITEM_NONE) {
return;
@@ -562,6 +604,11 @@ void DrawItem(ItemTrackerItem item) {
actualItemId = item.id;
hasItem = Flags_GetRandomizerInf(RAND_INF_GREG_FOUND);
break;
+ case RG_TRIFORCE_PIECE:
+ actualItemId = item.id;
+ hasItem = gSaveContext.n64ddFlag && OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_TRIFORCE_HUNT);
+ itemName = "Triforce Piece";
+ break;
}
if (hasItem && item.id != actualItemId && actualItemTrackerItemMap.find(actualItemId) != actualItemTrackerItemMap.end()) {
@@ -569,13 +616,18 @@ void DrawItem(ItemTrackerItem item) {
}
ImGui::BeginGroup();
+
ImGui::Image(LUS::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName(hasItem && IsValidSaveFile() ? item.name : item.nameFaded),
ImVec2(iconSize, iconSize), ImVec2(0, 0), ImVec2(1, 1));
-
+
DrawItemCount(item);
ImGui::EndGroup();
- UIWidgets::SetLastItemHoverText(SohUtils::GetItemName(item.id));
+ if (itemName == "") {
+ itemName = SohUtils::GetItemName(item.id);
+ }
+
+ UIWidgets::SetLastItemHoverText(itemName);
}
void DrawBottle(ItemTrackerItem item) {
@@ -891,6 +943,19 @@ void UpdateVectors() {
mainWindowItems.insert(mainWindowItems.end(), gregItems.begin(), gregItems.end());
}
+ // If we're adding triforce pieces to the main window
+ if (CVarGetInteger("gItemTrackerTriforcePiecesDisplayType", SECTION_DISPLAY_HIDDEN) == SECTION_DISPLAY_MAIN_WINDOW) {
+ // If Greg isn't on the main window, add empty items to place the triforce pieces on a new row.
+ if (CVarGetInteger("gItemTrackerGregDisplayType", SECTION_DISPLAY_EXTENDED_HIDDEN) != SECTION_DISPLAY_EXTENDED_MAIN_WINDOW) {
+ while (mainWindowItems.size() % 6) {
+ mainWindowItems.push_back(ITEM_TRACKER_ITEM(ITEM_NONE, 0, DrawItem));
+ }
+ }
+
+ // Add triforce pieces
+ mainWindowItems.insert(mainWindowItems.end(), triforcePieces.begin(), triforcePieces.end());
+ }
+
shouldUpdateVectors = false;
}
@@ -914,6 +979,7 @@ void ItemTrackerWindow::DrawElement() {
(CVarGetInteger("gItemTrackerSongsDisplayType", SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_MAIN_WINDOW) ||
(CVarGetInteger("gItemTrackerDungeonItemsDisplayType", SECTION_DISPLAY_HIDDEN) == SECTION_DISPLAY_MAIN_WINDOW) ||
(CVarGetInteger("gItemTrackerGregDisplayType", SECTION_DISPLAY_EXTENDED_HIDDEN) == SECTION_DISPLAY_EXTENDED_MAIN_WINDOW) ||
+ (CVarGetInteger("gItemTrackerTriforcePiecesDisplayType", SECTION_DISPLAY_HIDDEN) == SECTION_DISPLAY_MAIN_WINDOW) ||
(CVarGetInteger("gItemTrackerNotesDisplayType", SECTION_DISPLAY_HIDDEN) == SECTION_DISPLAY_MAIN_WINDOW)
) {
BeginFloatingWindows("Item Tracker##main window");
@@ -984,6 +1050,12 @@ void ItemTrackerWindow::DrawElement() {
EndFloatingWindows();
}
+ if (CVarGetInteger("gItemTrackerTriforcePiecesDisplayType", SECTION_DISPLAY_HIDDEN) == SECTION_DISPLAY_SEPARATE) {
+ BeginFloatingWindows("Triforce Piece Tracker");
+ DrawItemsInRows(triforcePieces);
+ EndFloatingWindows();
+ }
+
if (CVarGetInteger("gItemTrackerNotesDisplayType", SECTION_DISPLAY_HIDDEN) == SECTION_DISPLAY_SEPARATE && CVarGetInteger("gItemTrackerDisplayType", TRACKER_DISPLAY_ALWAYS) == TRACKER_DISPLAY_ALWAYS) {
ImGui::SetNextWindowSize(ImVec2(400,300), ImGuiCond_FirstUseEver);
BeginFloatingWindows("Personal Notes", ImGuiWindowFlags_NoFocusOnAppearing);
@@ -995,6 +1067,7 @@ void ItemTrackerWindow::DrawElement() {
static const char* itemTrackerCapacityTrackOptions[5] = { "No Numbers", "Current Capacity", "Current Ammo", "Current Capacity / Max Capacity", "Current Ammo / Current Capacity" };
static const char* itemTrackerKeyTrackOptions[3] = { "Collected / Max", "Current / Collected / Max", "Current / Max" };
+static const char* itemTrackerTriforcePieceTrackOptions[2] = { "Collected / Required", "Collected / Required / Max" };
static const char* windowTypes[2] = { "Floating", "Window" };
static const char* displayModes[2] = { "Always", "Combo Button Hold" };
static const char* buttons[14] = { "A", "B", "C-Up", "C-Down", "C-Left", "C-Right", "L", "Z", "R", "Start", "D-Up", "D-Down", "D-Left", "D-Right" };
@@ -1002,7 +1075,7 @@ static const char* displayTypes[3] = { "Hidden", "Main Window", "Separate" };
static const char* extendedDisplayTypes[4] = { "Hidden", "Main Window", "Misc Window", "Separate" };
void ItemTrackerSettingsWindow::DrawElement() {
- ImGui::SetNextWindowSize(ImVec2(600,375), ImGuiCond_FirstUseEver);
+ ImGui::SetNextWindowSize(ImVec2(733, 472), ImGuiCond_FirstUseEver);
if (!ImGui::Begin("Item Tracker Settings", &mIsVisible, ImGuiWindowFlags_NoFocusOnAppearing)) {
ImGui::End();
@@ -1055,6 +1128,8 @@ void ItemTrackerSettingsWindow::DrawElement() {
UIWidgets::EnhancementSliderInt("Icon size : %dpx", "##ITEMTRACKERICONSIZE", "gItemTrackerIconSize", 25, 128, "", 36);
UIWidgets::EnhancementSliderInt("Icon margins : %dpx", "##ITEMTRACKERSPACING", "gItemTrackerIconSpacing", -5, 50, "", 12);
+ UIWidgets::Spacer(0);
+
ImGui::Text("Ammo/Capacity Tracking");
UIWidgets::EnhancementCombobox("gItemTrackerCapacityTrack", itemTrackerCapacityTrackOptions, ITEM_TRACKER_NUMBER_CURRENT_CAPACITY_ONLY);
UIWidgets::InsertHelpHoverText("Customize what the numbers under each item are tracking."
@@ -1064,10 +1139,19 @@ void ItemTrackerSettingsWindow::DrawElement() {
shouldUpdateVectors = true;
}
}
+
+ UIWidgets::Spacer(0);
+
ImGui::Text("Key Count Tracking");
UIWidgets::EnhancementCombobox("gItemTrackerKeyTrack", itemTrackerKeyTrackOptions, KEYS_COLLECTED_MAX);
UIWidgets::InsertHelpHoverText("Customize what numbers are shown for key tracking.");
+ UIWidgets::Spacer(0);
+
+ ImGui::Text("Triforce Piece Count Tracking");
+ UIWidgets::EnhancementCombobox("gItemTrackerTriforcePieceTrack", itemTrackerTriforcePieceTrackOptions, TRIFORCE_PIECE_COLLECTED_REQUIRED_MAX);
+ UIWidgets::InsertHelpHoverText("Customize what numbers are shown for triforce piece tracking.");
+
ImGui::TableNextColumn();
if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Inventory", "gItemTrackerInventoryItemsDisplayType", displayTypes, SECTION_DISPLAY_MAIN_WINDOW)) {
@@ -1107,6 +1191,10 @@ void ItemTrackerSettingsWindow::DrawElement() {
shouldUpdateVectors = true;
}
+ if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Triforce Pieces", "gItemTrackerTriforcePiecesDisplayType", displayTypes, SECTION_DISPLAY_HIDDEN)) {
+ shouldUpdateVectors = true;
+ }
+
if (CVarGetInteger("gItemTrackerDisplayType", TRACKER_DISPLAY_ALWAYS) == TRACKER_DISPLAY_ALWAYS) {
if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Personal notes", "gItemTrackerNotesDisplayType", displayTypes, SECTION_DISPLAY_HIDDEN)) {
shouldUpdateVectors = true;
diff --git a/soh/soh/Enhancements/randomizer/savefile.cpp b/soh/soh/Enhancements/randomizer/savefile.cpp
index a6984fac0..ed7443910 100644
--- a/soh/soh/Enhancements/randomizer/savefile.cpp
+++ b/soh/soh/Enhancements/randomizer/savefile.cpp
@@ -436,5 +436,8 @@ extern "C" void Randomizer_InitSaveFile() {
gSaveContext.itemGetInf[3] |= 0x8000; // Obtained Mask of Truth
}
+ // Reset triforce pieces collected
+ gSaveContext.triforcePiecesCollected = 0;
+
SetStartingItems();
}
diff --git a/soh/soh/Enhancements/tts/tts.cpp b/soh/soh/Enhancements/tts/tts.cpp
index 3387bfd21..0fde40656 100644
--- a/soh/soh/Enhancements/tts/tts.cpp
+++ b/soh/soh/Enhancements/tts/tts.cpp
@@ -722,22 +722,22 @@ void RegisterOnUpdateMainMenuSelection() {
if (!CVarGetInteger("gA11yTTS", 0)) return;
switch (questIndex) {
- case FS_QUEST_NORMAL: {
+ case QUEST_NORMAL: {
auto translation = GetParameritizedText("quest_sel_vanilla", TEXT_BANK_FILECHOOSE, nullptr);
SpeechSynthesizer::Instance->Speak(translation.c_str(), GetLanguageCode());
break;
}
- case FS_QUEST_MASTER: {
+ case QUEST_MASTER: {
auto translation = GetParameritizedText("quest_sel_mq", TEXT_BANK_FILECHOOSE, nullptr);
SpeechSynthesizer::Instance->Speak(translation.c_str(), GetLanguageCode());
break;
}
- case FS_QUEST_RANDOMIZER: {
+ case QUEST_RANDOMIZER: {
auto translation = GetParameritizedText("quest_sel_randomizer", TEXT_BANK_FILECHOOSE, nullptr);
SpeechSynthesizer::Instance->Speak(translation.c_str(), GetLanguageCode());
break;
}
- case FS_QUEST_BOSSRUSH: {
+ case QUEST_BOSSRUSH: {
auto translation = GetParameritizedText("quest_sel_boss_rush", TEXT_BANK_FILECHOOSE, nullptr);
SpeechSynthesizer::Instance->Speak(translation.c_str(), GetLanguageCode());
break;
diff --git a/soh/soh/OTRGlobals.cpp b/soh/soh/OTRGlobals.cpp
index 7e1845dd0..74ca8dc07 100644
--- a/soh/soh/OTRGlobals.cpp
+++ b/soh/soh/OTRGlobals.cpp
@@ -1110,11 +1110,11 @@ uint32_t IsSceneMasterQuest(s16 sceneNum) {
if (OTRGlobals::Instance->HasMasterQuest()) {
if (!OTRGlobals::Instance->HasOriginal()) {
value = 1;
- } else if (gSaveContext.isMasterQuest) {
+ } else if (IS_MASTER_QUEST) {
value = 1;
} else {
value = 0;
- if (gSaveContext.n64ddFlag &&
+ if (IS_RANDO &&
!OTRGlobals::Instance->gRandomizer->masterQuestDungeons.empty() &&
OTRGlobals::Instance->gRandomizer->masterQuestDungeons.contains(sceneNum)) {
value = 1;
@@ -1966,7 +1966,7 @@ extern "C" int CustomMessage_RetrieveIfExists(PlayState* play) {
const int maxBufferSize = sizeof(font->msgBuf);
CustomMessage messageEntry;
s16 actorParams = 0;
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
Player* player = GET_PLAYER(play);
if (textId == TEXT_RANDOMIZER_CUSTOM_ITEM) {
if (player->getItemEntry.getItemId == RG_ICE_TRAP) {
@@ -1975,6 +1975,8 @@ extern "C" int CustomMessage_RetrieveIfExists(PlayState* play) {
if (CVarGetInteger("gLetItSnow", 0)) {
messageEntry = CustomMessageManager::Instance->RetrieveMessage(Randomizer::IceTrapRandoMessageTableID, NUM_ICE_TRAP_MESSAGES + 1);
}
+ } else if (player->getItemEntry.getItemId == RG_TRIFORCE_PIECE) {
+ messageEntry = Randomizer::GetTriforcePieceMessage();
} else {
messageEntry = Randomizer_GetCustomGetItemMessage(player);
}
@@ -2129,14 +2131,14 @@ extern "C" int CustomMessage_RetrieveIfExists(PlayState* play) {
// RANDOTODO: Implement a way to determine if an item came from a skulltula and
// inject the auto-dismiss control code if it did.
if (CVarGetInteger("gSkulltulaFreeze", 0) != 0 &&
- !(gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_TOKENS) != RO_TOKENSANITY_OFF)) {
+ !(IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_TOKENS) != RO_TOKENSANITY_OFF)) {
textId = TEXT_GS_NO_FREEZE;
} else {
textId = TEXT_GS_FREEZE;
}
// In vanilla, GS token count is incremented prior to the text box displaying
// In rando we need to bump the token count by one to show the correct count
- s16 gsCount = gSaveContext.inventory.gsTokens + (gSaveContext.n64ddFlag ? 1 : 0);
+ s16 gsCount = gSaveContext.inventory.gsTokens + (IS_RANDO ? 1 : 0);
messageEntry = CustomMessageManager::Instance->RetrieveMessage(customMessageTableID, textId);
messageEntry.Replace("{{gsCount}}", std::to_string(gsCount));
}
diff --git a/soh/soh/SaveManager.cpp b/soh/soh/SaveManager.cpp
index b17b2cbfe..4e84bfab5 100644
--- a/soh/soh/SaveManager.cpp
+++ b/soh/soh/SaveManager.cpp
@@ -136,6 +136,8 @@ void SaveManager::LoadRandomizerVersion1() {
SaveManager::Instance->LoadData("adultTradeItems", gSaveContext.adultTradeItems);
+ SaveManager::Instance->LoadData("triforcePiecesCollected", gSaveContext.triforcePiecesCollected);
+
SaveManager::Instance->LoadData("pendingIceTrapCount", gSaveContext.pendingIceTrapCount);
std::shared_ptr randomizer = OTRGlobals::Instance->gRandomizer;
@@ -251,6 +253,8 @@ void SaveManager::LoadRandomizerVersion2() {
SaveManager::Instance->LoadData("adultTradeItems", gSaveContext.adultTradeItems);
+ SaveManager::Instance->LoadData("triforcePiecesCollected", gSaveContext.triforcePiecesCollected);
+
SaveManager::Instance->LoadData("pendingIceTrapCount", gSaveContext.pendingIceTrapCount);
std::shared_ptr randomizer = OTRGlobals::Instance->gRandomizer;
@@ -282,7 +286,7 @@ void SaveManager::LoadRandomizerVersion2() {
void SaveManager::SaveRandomizer(SaveContext* saveContext, int sectionID, bool fullSave) {
- if(!saveContext->n64ddFlag) return;
+ if(saveContext->questId != QUEST_RANDOMIZER) return;
SaveManager::Instance->SaveArray("itemLocations", RC_MAX, [&](size_t i) {
SaveManager::Instance->SaveStruct("", [&]() {
@@ -338,6 +342,8 @@ void SaveManager::SaveRandomizer(SaveContext* saveContext, int sectionID, bool f
SaveManager::Instance->SaveData("adultTradeItems", saveContext->adultTradeItems);
+ SaveManager::Instance->SaveData("triforcePiecesCollected", gSaveContext.triforcePiecesCollected);
+
SaveManager::Instance->SaveData("pendingIceTrapCount", saveContext->pendingIceTrapCount);
std::shared_ptr randomizer = OTRGlobals::Instance->gRandomizer;
@@ -450,12 +456,12 @@ void SaveManager::InitMeta(int fileNum) {
fileMetaInfo[fileNum].seedHash[i] = gSaveContext.seedIcons[i];
}
- fileMetaInfo[fileNum].randoSave = gSaveContext.n64ddFlag;
+ fileMetaInfo[fileNum].randoSave = IS_RANDO;
// If the file is marked as a Master Quest file or if we're randomized and have at least one master quest dungeon, we need the mq otr.
- fileMetaInfo[fileNum].requiresMasterQuest = gSaveContext.isMasterQuest > 0 || (gSaveContext.n64ddFlag && gSaveContext.mqDungeonCount > 0);
+ fileMetaInfo[fileNum].requiresMasterQuest = IS_MASTER_QUEST || (IS_RANDO && gSaveContext.mqDungeonCount > 0);
// If the file is not marked as Master Quest, it could still theoretically be a rando save with all 12 MQ dungeons, in which case
// we don't actually require a vanilla OTR.
- fileMetaInfo[fileNum].requiresOriginal = !gSaveContext.isMasterQuest && (!gSaveContext.n64ddFlag || gSaveContext.mqDungeonCount < 12);
+ fileMetaInfo[fileNum].requiresOriginal = !IS_MASTER_QUEST && (!IS_RANDO || gSaveContext.mqDungeonCount < 12);
fileMetaInfo[fileNum].buildVersionMajor = gSaveContext.sohStats.buildVersionMajor;
fileMetaInfo[fileNum].buildVersionMinor = gSaveContext.sohStats.buildVersionMinor;
@@ -611,7 +617,7 @@ void SaveManager::InitFileNormal() {
gSaveContext.pendingSale = ITEM_NONE;
gSaveContext.pendingSaleMod = MOD_NONE;
- if (gSaveContext.isBossRush) {
+ if (IS_BOSS_RUSH) {
BossRush_InitSave();
}
@@ -891,8 +897,8 @@ void SaveManager::SaveFileThreaded(int fileNum, SaveContext* saveContext, int se
nlohmann::json& sectionBlock = saveBlock["sections"][saveFuncInfo.name];
sectionBlock["version"] = sectionHandlerPair.second.version;
// If any save file is loaded for medatata, or a spoiler log is loaded (not sure which at this point), there is still data in the "randomizer" section
- // This clears the randomizer data block if and only if the section being called is "randomizer" and n64ddFlag is false.
- if (sectionHandlerPair.second.name == "randomizer" && !gSaveContext.n64ddFlag) {
+ // This clears the randomizer data block if and only if the section being called is "randomizer" and the current save file is not a randomizer save file.
+ if (sectionHandlerPair.second.name == "randomizer" && !IS_RANDO) {
sectionBlock["data"] = nlohmann::json::object();
continue;
}
@@ -1113,7 +1119,11 @@ void SaveManager::LoadBaseVersion1() {
SaveManager::Instance->LoadArray("playerName", ARRAY_COUNT(gSaveContext.playerName), [](size_t i) {
SaveManager::Instance->LoadData("", gSaveContext.playerName[i]);
});
- SaveManager::Instance->LoadData("n64ddFlag", gSaveContext.n64ddFlag);
+ int isRando = 0;
+ SaveManager::Instance->LoadData("n64ddFlag", isRando);
+ if (isRando) {
+ gSaveContext.questId = QUEST_RANDOMIZER;
+ }
SaveManager::Instance->LoadData("healthCapacity", gSaveContext.healthCapacity);
SaveManager::Instance->LoadData("health", gSaveContext.health);
SaveManager::Instance->LoadData("magicLevel", gSaveContext.magicLevel);
@@ -1254,7 +1264,11 @@ void SaveManager::LoadBaseVersion2() {
SaveManager::Instance->LoadArray("playerName", ARRAY_COUNT(gSaveContext.playerName), [](size_t i) {
SaveManager::Instance->LoadData("", gSaveContext.playerName[i]);
});
- SaveManager::Instance->LoadData("n64ddFlag", gSaveContext.n64ddFlag);
+ int isRando = 0;
+ SaveManager::Instance->LoadData("n64ddFlag", isRando);
+ if (isRando) {
+ gSaveContext.questId = QUEST_RANDOMIZER;
+ }
SaveManager::Instance->LoadData("healthCapacity", gSaveContext.healthCapacity);
SaveManager::Instance->LoadData("health", gSaveContext.health);
SaveManager::Instance->LoadData("magicLevel", gSaveContext.magicLevel);
@@ -1420,7 +1434,11 @@ void SaveManager::LoadBaseVersion2() {
SaveManager::Instance->LoadArray("randomizerInf", ARRAY_COUNT(gSaveContext.randomizerInf), [](size_t i) {
SaveManager::Instance->LoadData("", gSaveContext.randomizerInf[i]);
});
- SaveManager::Instance->LoadData("isMasterQuest", gSaveContext.isMasterQuest);
+ int isMQ = 0;
+ SaveManager::Instance->LoadData("isMasterQuest", isMQ);
+ if (isMQ) {
+ gSaveContext.questId = QUEST_MASTER;
+ }
// Workaround for breaking save compatibility from 5.0.2 -> 5.1.0 in commit d7c35221421bf712b5ead56a360f81f624aca4bc
if (!gSaveContext.isMagicAcquired) {
@@ -1462,7 +1480,11 @@ void SaveManager::LoadBaseVersion3() {
SaveManager::Instance->LoadArray("playerName", ARRAY_COUNT(gSaveContext.playerName), [](size_t i) {
SaveManager::Instance->LoadData("", gSaveContext.playerName[i]);
});
- SaveManager::Instance->LoadData("n64ddFlag", gSaveContext.n64ddFlag);
+ int isRando = 0;
+ SaveManager::Instance->LoadData("n64ddFlag", isRando);
+ if (isRando) {
+ gSaveContext.questId = QUEST_RANDOMIZER;
+ }
SaveManager::Instance->LoadData("healthCapacity", gSaveContext.healthCapacity);
SaveManager::Instance->LoadData("health", gSaveContext.health);
SaveManager::Instance->LoadData("magicLevel", gSaveContext.magicLevel);
@@ -1650,7 +1672,11 @@ void SaveManager::LoadBaseVersion3() {
SaveManager::Instance->LoadArray("randomizerInf", ARRAY_COUNT(gSaveContext.randomizerInf), [](size_t i) {
SaveManager::Instance->LoadData("", gSaveContext.randomizerInf[i]);
});
- SaveManager::Instance->LoadData("isMasterQuest", gSaveContext.isMasterQuest);
+ int isMQ = 0;
+ SaveManager::Instance->LoadData("isMasterQuest", isMQ);
+ if (isMQ) {
+ gSaveContext.questId = QUEST_MASTER;
+ }
SaveManager::Instance->LoadStruct("backupFW", []() {
SaveManager::Instance->LoadStruct("pos", []() {
SaveManager::Instance->LoadData("x", gSaveContext.backupFW.pos.x);
@@ -1680,7 +1706,11 @@ void SaveManager::LoadBaseVersion4() {
SaveManager::Instance->LoadArray("playerName", ARRAY_COUNT(gSaveContext.playerName), [](size_t i) {
SaveManager::Instance->LoadData("", gSaveContext.playerName[i]);
});
- SaveManager::Instance->LoadData("n64ddFlag", gSaveContext.n64ddFlag);
+ int isRando = 0;
+ SaveManager::Instance->LoadData("n64ddFlag", isRando);
+ if (isRando) {
+ gSaveContext.questId = QUEST_RANDOMIZER;
+ }
SaveManager::Instance->LoadData("healthCapacity", gSaveContext.healthCapacity);
SaveManager::Instance->LoadData("health", gSaveContext.health);
SaveManager::Instance->LoadData("magicLevel", gSaveContext.magicLevel);
@@ -1823,7 +1853,11 @@ void SaveManager::LoadBaseVersion4() {
SaveManager::Instance->LoadArray("randomizerInf", ARRAY_COUNT(gSaveContext.randomizerInf), [](size_t i) {
SaveManager::Instance->LoadData("", gSaveContext.randomizerInf[i]);
});
- SaveManager::Instance->LoadData("isMasterQuest", gSaveContext.isMasterQuest);
+ int isMQ = 0;
+ SaveManager::Instance->LoadData("isMasterQuest", isMQ);
+ if (isMQ) {
+ gSaveContext.questId = QUEST_MASTER;
+ }
SaveManager::Instance->LoadStruct("backupFW", []() {
SaveManager::Instance->LoadStruct("pos", []() {
SaveManager::Instance->LoadData("x", gSaveContext.backupFW.pos.x);
@@ -1853,7 +1887,7 @@ void SaveManager::SaveBase(SaveContext* saveContext, int sectionID, bool fullSav
SaveManager::Instance->SaveArray("playerName", ARRAY_COUNT(saveContext->playerName), [&](size_t i) {
SaveManager::Instance->SaveData("", saveContext->playerName[i]);
});
- SaveManager::Instance->SaveData("n64ddFlag", saveContext->n64ddFlag);
+ SaveManager::Instance->SaveData("n64ddFlag", saveContext->questId == QUEST_RANDOMIZER);
SaveManager::Instance->SaveData("healthCapacity", saveContext->healthCapacity);
SaveManager::Instance->SaveData("health", saveContext->health);
SaveManager::Instance->SaveData("magicLevel", saveContext->magicLevel);
@@ -1992,7 +2026,7 @@ void SaveManager::SaveBase(SaveContext* saveContext, int sectionID, bool fullSav
SaveManager::Instance->SaveArray("randomizerInf", ARRAY_COUNT(saveContext->randomizerInf), [&](size_t i) {
SaveManager::Instance->SaveData("", saveContext->randomizerInf[i]);
});
- SaveManager::Instance->SaveData("isMasterQuest", saveContext->isMasterQuest);
+ SaveManager::Instance->SaveData("isMasterQuest", saveContext->questId == QUEST_MASTER);
SaveManager::Instance->SaveStruct("backupFW", [&]() {
SaveManager::Instance->SaveStruct("pos", [&]() {
SaveManager::Instance->SaveData("x", saveContext->backupFW.pos.x);
@@ -2149,7 +2183,7 @@ void SaveManager::DeleteZeldaFile(int fileNum) {
}
bool SaveManager::IsRandoFile() {
- return gSaveContext.n64ddFlag != 0 ? true : false;
+ return IS_RANDO;
}
// Functionality required to convert old saves into versioned saves
diff --git a/soh/soh/SohMenuBar.cpp b/soh/soh/SohMenuBar.cpp
index 8f505bc05..fc73cd656 100644
--- a/soh/soh/SohMenuBar.cpp
+++ b/soh/soh/SohMenuBar.cpp
@@ -527,7 +527,7 @@ void DrawEnhancementsMenu() {
UIWidgets::PaddedEnhancementCheckbox("Better Owl", "gBetterOwl", true, false);
UIWidgets::Tooltip("The default response to Kaepora Gaebora is always that you understood what he said");
UIWidgets::PaddedEnhancementCheckbox("Fast Ocarina Playback", "gFastOcarinaPlayback", true, false);
- bool forceSkipScarecrow = gSaveContext.n64ddFlag &&
+ bool forceSkipScarecrow = IS_RANDO &&
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_SKIP_SCARECROWS_SONG);
static const char* forceSkipScarecrowText =
"This setting is forcefully enabled because a savefile\nwith \"Skip Scarecrow Song\" is loaded";
@@ -647,7 +647,7 @@ void DrawEnhancementsMenu() {
UIWidgets::Tooltip("Respawn with full health instead of 3 Hearts");
UIWidgets::PaddedEnhancementCheckbox("No Random Drops", "gNoRandomDrops", true, false);
UIWidgets::Tooltip("Disables random drops, except from the Goron Pot, Dampe, and bosses");
- bool forceEnableBombchuDrops = gSaveContext.n64ddFlag &&
+ bool forceEnableBombchuDrops = IS_RANDO &&
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_ENABLE_BOMBCHU_DROPS) == 1;
static const char* forceEnableBombchuDropsText =
"This setting is forcefully enabled because a savefile\nwith \"Enable Bombchu Drops\" is loaded.";
@@ -851,7 +851,7 @@ void DrawEnhancementsMenu() {
UIWidgets::Tooltip("Removes the input requirement on textboxes after defeating Ganon, allowing Credits sequence to continue to progress");
// Blue Fire Arrows
- bool forceEnableBlueFireArrows = gSaveContext.n64ddFlag &&
+ bool forceEnableBlueFireArrows = IS_RANDO &&
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_BLUE_FIRE_ARROWS);
static const char* forceEnableBlueFireArrowsText =
"This setting is forcefully enabled because a savefile\nwith \"Blue Fire Arrows\" is loaded.";
@@ -860,7 +860,7 @@ void DrawEnhancementsMenu() {
UIWidgets::Tooltip("Allows Ice Arrows to melt red ice.\nMay require a room reload if toggled during gameplay.");
// Sunlight Arrows
- bool forceEnableSunLightArrows = gSaveContext.n64ddFlag &&
+ bool forceEnableSunLightArrows = IS_RANDO &&
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_SUNLIGHT_ARROWS);
static const char* forceEnableSunLightArrowsText =
"This setting is forcefully enabled because a savefile\nwith \"Sunlight Arrows\" is loaded.";
@@ -1520,7 +1520,7 @@ void DrawRandomizerMenu() {
(OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_GANONS_BOSS_KEY) != RO_GANON_BOSS_KEY_VANILLA &&
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_GANONS_BOSS_KEY) != RO_GANON_BOSS_KEY_OWN_DUNGEON &&
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_GANONS_BOSS_KEY) != RO_GANON_BOSS_KEY_STARTWITH) ||
- !gSaveContext.n64ddFlag) {
+ !IS_RANDO) {
disableKeyColors = false;
}
diff --git a/soh/soh/resource/importer/SkeletonFactory.cpp b/soh/soh/resource/importer/SkeletonFactory.cpp
index 4920d47c9..559da0cea 100644
--- a/soh/soh/resource/importer/SkeletonFactory.cpp
+++ b/soh/soh/resource/importer/SkeletonFactory.cpp
@@ -96,6 +96,8 @@ void SkeletonFactoryV0::ParseFileBinary(std::shared_ptr reader,
} else {
SPDLOG_ERROR("unknown skeleton type {}", (uint32_t)skeleton->type);
}
+
+ skeleton->skeletonData.skeletonHeader.skeletonType = (uint8_t)skeleton->type;
}
void SkeletonFactoryV0::ParseFileXML(tinyxml2::XMLElement* reader, std::shared_ptr resource)
{
@@ -150,6 +152,7 @@ void SkeletonFactoryV0::ParseFileXML(tinyxml2::XMLElement* reader, std::shared_p
skel->skeletonData.flexSkeletonHeader.sh.limbCount = skel->limbCount;
skel->skeletonData.flexSkeletonHeader.sh.segment = (void**)skel->skeletonHeaderSegments.data();
skel->skeletonData.flexSkeletonHeader.dListCount = skel->dListCount;
+ skel->skeletonData.skeletonHeader.skeletonType = (uint8_t)skel->type;
}
} // namespace LUS
diff --git a/soh/soh/resource/type/Skeleton.cpp b/soh/soh/resource/type/Skeleton.cpp
index 2cb155cf3..13798d3c5 100644
--- a/soh/soh/resource/type/Skeleton.cpp
+++ b/soh/soh/resource/type/Skeleton.cpp
@@ -66,15 +66,17 @@ void SkeletonPatcher::ClearSkeletons()
void SkeletonPatcher::UpdateSkeletons() {
bool isHD = CVarGetInteger("gAltAssets", 0);
- for (auto skel : skeletons)
- {
+ for (auto skel : skeletons) {
Skeleton* newSkel =
(Skeleton*)LUS::Context::GetInstance()->GetResourceManager()
->LoadResource((isHD ? LUS::IResource::gAltAssetPrefix : "") + skel.vanillaSkeletonPath, true)
.get();
- if (newSkel != nullptr)
+ if (newSkel != nullptr) {
skel.skelAnime->skeleton = newSkel->skeletonData.skeletonHeader.segment;
+ uintptr_t skelPtr = (uintptr_t)newSkel->GetPointer();
+ memcpy(&skel.skelAnime->skeletonHeader, &skelPtr, sizeof(uintptr_t)); // Dumb thing that needs to be done because cast is not cooperating
+ }
}
}
} // namespace LUS
diff --git a/soh/soh/resource/type/Skeleton.h b/soh/soh/resource/type/Skeleton.h
index 98548d9fd..490614a44 100644
--- a/soh/soh/resource/type/Skeleton.h
+++ b/soh/soh/resource/type/Skeleton.h
@@ -24,6 +24,7 @@ enum class SkeletonType {
typedef struct {
/* 0x00 */ void** segment;
/* 0x04 */ uint8_t limbCount;
+ uint8_t skeletonType;
} SkeletonHeader; // size = 0x8
// Model has limbs with flexible meshes
diff --git a/soh/soh/z_play_otr.cpp b/soh/soh/z_play_otr.cpp
index 1f5e21c94..5e54da8ed 100644
--- a/soh/soh/z_play_otr.cpp
+++ b/soh/soh/z_play_otr.cpp
@@ -76,7 +76,7 @@ void OTRPlay_InitScene(PlayState* play, s32 spawn) {
OTRScene_ExecuteCommands(play, (LUS::Scene*)play->sceneSegment);
Play_InitEnvironment(play, play->skyboxId);
// Unpause the timer for Boss Rush when the scene loaded isn't the Chamber of Sages.
- if (gSaveContext.isBossRush && play->sceneNum != SCENE_CHAMBER_OF_THE_SAGES) {
+ if (IS_BOSS_RUSH && play->sceneNum != SCENE_CHAMBER_OF_THE_SAGES) {
gSaveContext.isBossRushPaused = 0;
}
/* auto data = static_cast(LUS::Context::GetInstance()
diff --git a/soh/src/code/z_actor.c b/soh/src/code/z_actor.c
index 750419966..1a122cc9b 100644
--- a/soh/src/code/z_actor.c
+++ b/soh/src/code/z_actor.c
@@ -668,6 +668,7 @@ void Flags_SetSwitch(PlayState* play, s32 flag) {
} else {
play->actorCtx.flags.tempSwch |= (1 << (flag - 0x20));
}
+ GameInteractor_ExecuteOnSceneFlagSet(play->sceneNum, FLAG_SCENE_SWITCH, flag);
}
/**
@@ -680,6 +681,7 @@ void Flags_UnsetSwitch(PlayState* play, s32 flag) {
} else {
play->actorCtx.flags.tempSwch &= ~(1 << (flag - 0x20));
}
+ GameInteractor_ExecuteOnSceneFlagUnset(play->sceneNum, FLAG_SCENE_SWITCH, flag);
}
/**
@@ -728,6 +730,7 @@ s32 Flags_GetTreasure(PlayState* play, s32 flag) {
void Flags_SetTreasure(PlayState* play, s32 flag) {
lusprintf(__FILE__, __LINE__, 2, "Treasure Flag Set - %#x", flag);
play->actorCtx.flags.chest |= (1 << flag);
+ GameInteractor_ExecuteOnSceneFlagSet(play->sceneNum, FLAG_SCENE_TREASURE, flag);
}
/**
@@ -742,6 +745,7 @@ s32 Flags_GetClear(PlayState* play, s32 flag) {
*/
void Flags_SetClear(PlayState* play, s32 flag) {
play->actorCtx.flags.clear |= (1 << flag);
+ GameInteractor_ExecuteOnSceneFlagSet(play->sceneNum, FLAG_SCENE_CLEAR, flag);
}
/**
@@ -749,6 +753,7 @@ void Flags_SetClear(PlayState* play, s32 flag) {
*/
void Flags_UnsetClear(PlayState* play, s32 flag) {
play->actorCtx.flags.clear &= ~(1 << flag);
+ GameInteractor_ExecuteOnSceneFlagUnset(play->sceneNum, FLAG_SCENE_CLEAR, flag);
}
/**
@@ -795,6 +800,7 @@ void Flags_SetCollectible(PlayState* play, s32 flag) {
play->actorCtx.flags.tempCollect |= (1 << (flag - 0x20));
}
}
+ GameInteractor_ExecuteOnSceneFlagSet(play->sceneNum, FLAG_SCENE_COLLECTIBLE, flag);
}
void func_8002CDE4(PlayState* play, TitleCardContext* titleCtx) {
@@ -1982,7 +1988,7 @@ s32 GiveItemEntryWithoutActor(PlayState* play, GetItemEntry getItemEntry) {
if (!(player->stateFlags1 & 0x3C7080) && Player_GetExplosiveHeld(player) < 0) {
if (((player->heldActor != NULL) && ((getItemEntry.getItemId > GI_NONE) && (getItemEntry.getItemId < GI_MAX)) ||
- (gSaveContext.n64ddFlag && (getItemEntry.getItemId > RG_NONE) && (getItemEntry.getItemId < RG_MAX))) ||
+ (IS_RANDO && (getItemEntry.getItemId > RG_NONE) && (getItemEntry.getItemId < RG_MAX))) ||
(!(player->stateFlags1 & 0x20000800))) {
if ((getItemEntry.getItemId != GI_NONE)) {
player->getItemEntry = getItemEntry;
@@ -2018,8 +2024,8 @@ s32 GiveItemEntryFromActor(Actor* actor, PlayState* play, GetItemEntry getItemEn
if (!(player->stateFlags1 & 0x3C7080) && Player_GetExplosiveHeld(player) < 0) {
if ((((player->heldActor != NULL) || (actor == player->targetActor)) &&
- ((!gSaveContext.n64ddFlag && ((getItemEntry.getItemId > GI_NONE) && (getItemEntry.getItemId < GI_MAX))) ||
- (gSaveContext.n64ddFlag && ((getItemEntry.getItemId > RG_NONE) && (getItemEntry.getItemId < RG_MAX))))) ||
+ ((!IS_RANDO && ((getItemEntry.getItemId > GI_NONE) && (getItemEntry.getItemId < GI_MAX))) ||
+ (IS_RANDO && ((getItemEntry.getItemId > RG_NONE) && (getItemEntry.getItemId < RG_MAX))))) ||
(!(player->stateFlags1 & 0x20000800))) {
if ((actor->xzDistToPlayer < xzRange) && (fabsf(actor->yDistToPlayer) < yRange)) {
s16 yawDiff = actor->yawTowardsPlayer - player->actor.shape.rot.y;
@@ -2060,7 +2066,7 @@ s32 func_8002F434(Actor* actor, PlayState* play, s32 getItemId, f32 xzRange, f32
if (!(player->stateFlags1 & 0x3C7080) && Player_GetExplosiveHeld(player) < 0) {
if ((((player->heldActor != NULL) || (actor == player->targetActor)) &&
- ((!gSaveContext.n64ddFlag && ((getItemId > GI_NONE) && (getItemId < GI_MAX))) || (gSaveContext.n64ddFlag && ((getItemId > RG_NONE) && (getItemId < RG_MAX))))) ||
+ ((!IS_RANDO && ((getItemId > GI_NONE) && (getItemId < GI_MAX))) || (IS_RANDO && ((getItemId > RG_NONE) && (getItemId < RG_MAX))))) ||
(!(player->stateFlags1 & 0x20000800))) {
if ((actor->xzDistToPlayer < xzRange) && (fabsf(actor->yDistToPlayer) < yRange)) {
s16 yawDiff = actor->yawTowardsPlayer - player->actor.shape.rot.y;
@@ -4718,6 +4724,7 @@ s32 Flags_GetEventChkInf(s32 flag) {
*/
void Flags_SetEventChkInf(s32 flag) {
gSaveContext.eventChkInf[flag >> 4] |= (1 << (flag & 0xF));
+ GameInteractor_ExecuteOnFlagSet(FLAG_EVENT_CHECK_INF, flag);
}
/**
@@ -4725,6 +4732,7 @@ void Flags_SetEventChkInf(s32 flag) {
*/
void Flags_UnsetEventChkInf(s32 flag) {
gSaveContext.eventChkInf[flag >> 4] &= ~(1 << (flag & 0xF));
+ GameInteractor_ExecuteOnFlagUnset(FLAG_EVENT_CHECK_INF, flag);
}
/**
@@ -4739,6 +4747,7 @@ s32 Flags_GetItemGetInf(s32 flag) {
*/
void Flags_SetItemGetInf(s32 flag) {
gSaveContext.itemGetInf[flag >> 4] |= (1 << (flag & 0xF));
+ GameInteractor_ExecuteOnFlagSet(FLAG_ITEM_GET_INF, flag);
}
/**
@@ -4746,6 +4755,7 @@ void Flags_SetItemGetInf(s32 flag) {
*/
void Flags_UnsetItemGetInf(s32 flag) {
gSaveContext.itemGetInf[flag >> 4] &= ~(1 << (flag & 0xF));
+ GameInteractor_ExecuteOnFlagUnset(FLAG_ITEM_GET_INF, flag);
}
/**
@@ -4760,6 +4770,7 @@ s32 Flags_GetInfTable(s32 flag) {
*/
void Flags_SetInfTable(s32 flag) {
gSaveContext.infTable[flag >> 4] |= (1 << (flag & 0xF));
+ GameInteractor_ExecuteOnFlagSet(FLAG_INF_TABLE, flag);
}
/**
@@ -4767,6 +4778,7 @@ void Flags_SetInfTable(s32 flag) {
*/
void Flags_UnsetInfTable(s32 flag) {
gSaveContext.infTable[flag >> 4] &= ~(1 << (flag & 0xF));
+ GameInteractor_ExecuteOnFlagUnset(FLAG_INF_TABLE, flag);
}
/**
@@ -4781,6 +4793,7 @@ s32 Flags_GetEventInf(s32 flag) {
*/
void Flags_SetEventInf(s32 flag) {
gSaveContext.eventInf[flag >> 4] |= (1 << (flag & 0xF));
+ GameInteractor_ExecuteOnFlagSet(FLAG_EVENT_INF, flag);
}
/**
@@ -4788,6 +4801,7 @@ void Flags_SetEventInf(s32 flag) {
*/
void Flags_UnsetEventInf(s32 flag) {
gSaveContext.eventInf[flag >> 4] &= ~(1 << (flag & 0xF));
+ GameInteractor_ExecuteOnFlagUnset(FLAG_EVENT_INF, flag);
}
/**
@@ -4802,6 +4816,7 @@ s32 Flags_GetRandomizerInf(RandomizerInf flag) {
*/
void Flags_SetRandomizerInf(RandomizerInf flag) {
gSaveContext.randomizerInf[flag >> 4] |= (1 << (flag & 0xF));
+ GameInteractor_ExecuteOnFlagSet(FLAG_RANDOMIZER_INF, flag);
}
/**
@@ -4809,6 +4824,7 @@ void Flags_SetRandomizerInf(RandomizerInf flag) {
*/
void Flags_UnsetRandomizerInf(RandomizerInf flag) {
gSaveContext.randomizerInf[flag >> 4] &= ~(1 << (flag & 0xF));
+ GameInteractor_ExecuteOnFlagUnset(FLAG_RANDOMIZER_INF, flag);
}
u32 func_80035BFC(PlayState* play, s16 arg1) {
diff --git a/soh/src/code/z_demo.c b/soh/src/code/z_demo.c
index bba12161f..e0b17fe72 100644
--- a/soh/src/code/z_demo.c
+++ b/soh/src/code/z_demo.c
@@ -246,7 +246,7 @@ void func_80064824(PlayState* play, CutsceneContext* csCtx, CsCmdBase* cmd) {
case 3:
if (sp3F != 0) {
Flags_SetEnv(play, 0);
- if (gSaveContext.entranceIndex == 0x0053 || (gSaveContext.n64ddFlag && gSaveContext.entranceIndex == 0x05F4)) {
+ if (gSaveContext.entranceIndex == 0x0053 || (IS_RANDO && gSaveContext.entranceIndex == 0x05F4)) {
Flags_SetEnv(play, 2);
}
}
@@ -497,7 +497,7 @@ void Cutscene_Command_Terminator(PlayState* play, CutsceneContext* csCtx, CsCmdB
// cmd->base == 8: Traveling back/forward in time cutscene
// cmd->base == 24: Dropping a fish for Jabu Jabu
// cmd->base == 33: Zelda escaping with impa cutscene
- bool randoCsSkip = (gSaveContext.n64ddFlag && (cmd->base == 8 || cmd->base == 24 || cmd->base == 33));
+ bool randoCsSkip = (IS_RANDO && (cmd->base == 8 || cmd->base == 24 || cmd->base == 33));
bool debugCsSkip = (CHECK_BTN_ALL(play->state.input[0].press.button, BTN_START) &&
(gSaveContext.fileNum != 0xFEDC) && CVarGetInteger("gDebugEnabled", 0));
@@ -2113,7 +2113,7 @@ void Cutscene_HandleEntranceTriggers(PlayState* play) {
u8 requiredAge;
s16 i;
- if (gSaveContext.n64ddFlag &&
+ if (IS_RANDO &&
// don't skip epona escape cutscenes
gSaveContext.entranceIndex != 650 &&
gSaveContext.entranceIndex != 654 &&
@@ -2151,9 +2151,9 @@ void Cutscene_HandleConditionalTriggers(PlayState* play) {
if ((gSaveContext.gameMode == 0) && (gSaveContext.respawnFlag <= 0) && (gSaveContext.cutsceneIndex < 0xFFF0)) {
const bool bShouldTowerRandoSkip =
- (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SKIP_TOWER_ESCAPE));
+ (IS_RANDO && Randomizer_GetSettingValue(RSK_SKIP_TOWER_ESCAPE));
if ((gSaveContext.entranceIndex == 0x01E1) && !Flags_GetEventChkInf(EVENTCHKINF_LEARNED_REQUIEM_OF_SPIRIT)) {
- if (!gSaveContext.n64ddFlag) {
+ if (!IS_RANDO) {
Flags_SetEventChkInf(EVENTCHKINF_LEARNED_REQUIEM_OF_SPIRIT);
gSaveContext.entranceIndex = 0x0123;
gSaveContext.cutsceneIndex = 0xFFF0;
@@ -2161,12 +2161,12 @@ void Cutscene_HandleConditionalTriggers(PlayState* play) {
} else if ((gSaveContext.entranceIndex == 0x00DB) && LINK_IS_ADULT && (Flags_GetEventChkInf(EVENTCHKINF_USED_FOREST_TEMPLE_BLUE_WARP)) &&
(Flags_GetEventChkInf(EVENTCHKINF_USED_FIRE_TEMPLE_BLUE_WARP)) && (Flags_GetEventChkInf(EVENTCHKINF_USED_WATER_TEMPLE_BLUE_WARP)) &&
!Flags_GetEventChkInf(EVENTCHKINF_BONGO_BONGO_ESCAPED_FROM_WELL)) {
- if (!gSaveContext.n64ddFlag) {
+ if (!IS_RANDO) {
Flags_SetEventChkInf(EVENTCHKINF_BONGO_BONGO_ESCAPED_FROM_WELL);
gSaveContext.cutsceneIndex = 0xFFF0;
}
} else if ((gSaveContext.entranceIndex == 0x05E0) && !Flags_GetEventChkInf(EVENTCHKINF_SPOKE_TO_SARIA_ON_BRIDGE)) {
- if (!gSaveContext.n64ddFlag) {
+ if (!IS_RANDO) {
Flags_SetEventChkInf(EVENTCHKINF_SPOKE_TO_SARIA_ON_BRIDGE);
Item_Give(play, ITEM_OCARINA_FAIRY);
gSaveContext.entranceIndex = 0x011E;
@@ -2175,7 +2175,7 @@ void Cutscene_HandleConditionalTriggers(PlayState* play) {
} else if (CHECK_QUEST_ITEM(QUEST_MEDALLION_SPIRIT) && CHECK_QUEST_ITEM(QUEST_MEDALLION_SHADOW) &&
LINK_IS_ADULT && !Flags_GetEventChkInf(EVENTCHKINF_RETURNED_TO_TEMPLE_OF_TIME_WITH_ALL_MEDALLIONS) &&
(gEntranceTable[((void)0, gSaveContext.entranceIndex)].scene == SCENE_TEMPLE_OF_TIME)) {
- if (!gSaveContext.n64ddFlag) {
+ if (!IS_RANDO) {
Flags_SetEventChkInf(EVENTCHKINF_RETURNED_TO_TEMPLE_OF_TIME_WITH_ALL_MEDALLIONS);
gSaveContext.entranceIndex = 0x0053;
gSaveContext.cutsceneIndex = 0xFFF8;
@@ -2187,7 +2187,7 @@ void Cutscene_HandleConditionalTriggers(PlayState* play) {
Flags_SetEventChkInf(EVENTCHKINF_WATCHED_GANONS_CASTLE_COLLAPSE_CAUGHT_BY_GERUDO);
gSaveContext.entranceIndex = 0x0517;
// In rando, skip the cutscene for the tower falling down after the escape.
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
return;
}
gSaveContext.cutsceneIndex = 0xFFF0;
diff --git a/soh/src/code/z_draw.c b/soh/src/code/z_draw.c
index 7c6b71c6c..cb28a498e 100644
--- a/soh/src/code/z_draw.c
+++ b/soh/src/code/z_draw.c
@@ -78,6 +78,8 @@
#include "objects/object_gi_sword_1/object_gi_sword_1.h"
#include "objects/object_st/object_st.h"
+#include "soh_assets.h"
+
// "Get Item" Model Draw Functions
void GetItem_DrawMaskOrBombchu(PlayState* play, s16 drawId);
void GetItem_DrawSoldOut(PlayState* play, s16 drawId);
@@ -110,6 +112,7 @@ void GetItem_DrawJewelKokiri(PlayState* play, s16 drawId);
void GetItem_DrawJewelGoron(PlayState* play, s16 drawId);
void GetItem_DrawJewelZora(PlayState* play, s16 drawId);
void GetItem_DrawGenericMusicNote(PlayState* play, s16 drawId);
+void GetItem_DrawTriforcePiece(PlayState* play, s16 drawId);
typedef struct {
/* 0x00 */ void (*drawFunc)(PlayState*, s16);
@@ -384,7 +387,8 @@ DrawItemTableEntry sDrawItemTable[] = {
{ GetItem_DrawGenericMusicNote, { gGiSongNoteDL } }, //Saria's song
{ GetItem_DrawGenericMusicNote, { gGiSongNoteDL } }, //Sun's song
{ GetItem_DrawGenericMusicNote, { gGiSongNoteDL } }, //Song of time
- { GetItem_DrawGenericMusicNote, { gGiSongNoteDL } } //Song of storms
+ { GetItem_DrawGenericMusicNote, { gGiSongNoteDL } }, //Song of storms
+ { GetItem_DrawTriforcePiece, { gTriforcePiece0DL } } // Triforce Piece
};
/**
@@ -1031,3 +1035,33 @@ void GetItem_DrawWallet(PlayState* play, s16 drawId) {
CLOSE_DISPS(play->state.gfxCtx);
}
+
+void GetItem_DrawTriforcePiece(PlayState* play, s16 drawId) {
+ OPEN_DISPS(play->state.gfxCtx);
+
+ Gfx_SetupDL_25Opa(play->state.gfxCtx);
+
+ Matrix_Scale(0.035f, 0.035f, 0.035f, MTXMODE_APPLY);
+
+ uint16_t index = gSaveContext.triforcePiecesCollected % 3;
+ Gfx* triforcePieceDL;
+
+ switch (index) {
+ case 1:
+ triforcePieceDL = (Gfx*) gTriforcePiece1DL;
+ break;
+ case 2:
+ triforcePieceDL = (Gfx*) gTriforcePiece2DL;
+ break;
+ default:
+ triforcePieceDL = (Gfx*) gTriforcePiece0DL;
+ break;
+ }
+
+ gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx, (char*)__FILE__, __LINE__),
+ G_MTX_MODELVIEW | G_MTX_LOAD);
+
+ gSPDisplayList(POLY_OPA_DISP++, triforcePieceDL);
+
+ CLOSE_DISPS(play->state.gfxCtx);
+}
diff --git a/soh/src/code/z_en_item00.c b/soh/src/code/z_en_item00.c
index fc8bbd669..42ea78f90 100644
--- a/soh/src/code/z_en_item00.c
+++ b/soh/src/code/z_en_item00.c
@@ -381,7 +381,7 @@ void EnItem00_Init(Actor* thisx, PlayState* play) {
Actor_SetScale(&this->actor, 0.03f);
this->scale = 0.03f;
// Offset keys in randomizer slightly higher for their GID replacement
- if (!gSaveContext.n64ddFlag) {
+ if (!IS_RANDO) {
yOffset = 350.0f;
} else {
yOffset = 430.0f;
@@ -488,7 +488,7 @@ void EnItem00_Init(Actor* thisx, PlayState* play) {
RandomizerCheck randoCheck =
Randomizer_GetCheckFromActor(this->actor.id, play->sceneNum, this->ogParams);
- if (gSaveContext.n64ddFlag && randoCheck != RC_UNKNOWN_CHECK) {
+ if (IS_RANDO && randoCheck != RC_UNKNOWN_CHECK) {
this->randoGiEntry =
Randomizer_GetItemFromKnownCheck(randoCheck, getItemId);
this->randoGiEntry.getItemFrom = ITEM_FROM_FREESTANDING;
@@ -578,7 +578,7 @@ void EnItem00_Init(Actor* thisx, PlayState* play) {
if (!Actor_HasParent(&this->actor, play)) {
if (getItemId != GI_NONE) {
- if (!gSaveContext.n64ddFlag || this->randoGiEntry.getItemId == GI_NONE) {
+ if (!IS_RANDO || this->randoGiEntry.getItemId == GI_NONE) {
func_8002F554(&this->actor, play, getItemId);
} else {
GiveItemEntryFromActorWithFixedRange(&this->actor, play, this->randoGiEntry);
@@ -731,7 +731,7 @@ void func_8001E5C8(EnItem00* this, PlayState* play) {
Player* player = GET_PLAYER(play);
if (this->getItemId != GI_NONE) {
if (!Actor_HasParent(&this->actor, play)) {
- if (!gSaveContext.n64ddFlag) {
+ if (!IS_RANDO) {
func_8002F434(&this->actor, play, this->getItemId, 50.0f, 80.0f);
} else {
GiveItemEntryFromActor(&this->actor, play, this->randoGiEntry, 50.0f, 80.0f);
@@ -783,7 +783,7 @@ void EnItem00_Update(Actor* thisx, PlayState* play) {
this->actor.params == ITEM00_BOMBS_SPECIAL || this->actor.params == ITEM00_BOMBCHU) {
if (CVarGetInteger("gNewDrops", 0) ||
// Keys in randomizer need to always rotate for their GID replacement
- (gSaveContext.n64ddFlag && this->actor.params == ITEM00_SMALL_KEY)) {
+ (IS_RANDO && this->actor.params == ITEM00_SMALL_KEY)) {
this->actor.shape.rot.y += 960;
} else {
this->actor.shape.rot.y = 0;
@@ -951,7 +951,7 @@ void EnItem00_Update(Actor* thisx, PlayState* play) {
params = &this->actor.params;
if ((getItemId != GI_NONE) && !Actor_HasParent(&this->actor, play)) {
- if (!gSaveContext.n64ddFlag || this->randoGiEntry.getItemId == GI_NONE) {
+ if (!IS_RANDO || this->randoGiEntry.getItemId == GI_NONE) {
func_8002F554(&this->actor, play, getItemId);
} else {
getItemId = this->randoGiEntry.getItemId;
@@ -1046,7 +1046,7 @@ void EnItem00_Draw(Actor* thisx, PlayState* play) {
}
break;
case ITEM00_HEART_PIECE:
- if (CVarGetInteger("gNewDrops", 0) && !gSaveContext.n64ddFlag) {
+ if (CVarGetInteger("gNewDrops", 0) && !IS_RANDO) {
mtxScale = 21.0f;
Matrix_Scale(mtxScale, mtxScale, mtxScale, MTXMODE_APPLY);
GetItem_Draw(play, GID_HEART_PIECE);
@@ -1156,7 +1156,7 @@ void EnItem00_Draw(Actor* thisx, PlayState* play) {
break;
}
case ITEM00_SMALL_KEY:
- if (CVarGetInteger("gNewDrops", 0) && !gSaveContext.n64ddFlag) {
+ if (CVarGetInteger("gNewDrops", 0) && !IS_RANDO) {
mtxScale = 8.0f;
Matrix_Scale(mtxScale, mtxScale, mtxScale, MTXMODE_APPLY);
GetItem_Draw(play, GID_KEY_SMALL);
@@ -1362,7 +1362,7 @@ static const Vtx customDropVtx[] = {
* Draw Function used for most collectible types of En_Item00 (ammo, bombs, sticks, nuts, magic...).
*/
void EnItem00_DrawCollectible(EnItem00* this, PlayState* play) {
- if (gSaveContext.n64ddFlag && (this->getItemId != GI_NONE || this->actor.params == ITEM00_SMALL_KEY)) {
+ if (IS_RANDO && (this->getItemId != GI_NONE || this->actor.params == ITEM00_SMALL_KEY)) {
RandomizerCheck randoCheck =
Randomizer_GetCheckFromActor(this->actor.id, play->sceneNum, this->ogParams);
@@ -1456,7 +1456,7 @@ void EnItem00_DrawHeartContainer(EnItem00* this, PlayState* play) {
* Draw Function used for the Piece of Heart type of En_Item00.
*/
void EnItem00_DrawHeartPiece(EnItem00* this, PlayState* play) {
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
RandomizerCheck randoCheck =
Randomizer_GetCheckFromActor(this->actor.id, play->sceneNum, this->ogParams);
@@ -1533,7 +1533,7 @@ s16 func_8001F404(s16 dropId) {
}
if ((CVarGetInteger("gBombchuDrops", 0) ||
- (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_ENABLE_BOMBCHU_DROPS) == 1)) &&
+ (IS_RANDO && Randomizer_GetSettingValue(RSK_ENABLE_BOMBCHU_DROPS) == 1)) &&
(dropId == ITEM00_BOMBS_A || dropId == ITEM00_BOMBS_B || dropId == ITEM00_BOMBS_SPECIAL)) {
dropId = EnItem00_ConvertBombDropToBombchu(dropId);
}
diff --git a/soh/src/code/z_game_over.c b/soh/src/code/z_game_over.c
index 315199000..4b10cb5e2 100644
--- a/soh/src/code/z_game_over.c
+++ b/soh/src/code/z_game_over.c
@@ -33,7 +33,7 @@ void GameOver_Update(PlayState* play) {
gSaveContext.eventInf[1] &= ~1;
// search inventory for spoiling items and revert if necessary
- if (!(gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_ADULT_TRADE))) {
+ if (!(IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_ADULT_TRADE))) {
for (i = 0; i < ARRAY_COUNT(gSpoilingItems); i++) {
if (INV_CONTENT(ITEM_POCKET_EGG) == gSpoilingItems[i]) {
INV_CONTENT(gSpoilingItemReverts[i]) = gSpoilingItemReverts[i];
diff --git a/soh/src/code/z_horse.c b/soh/src/code/z_horse.c
index 3d63a467a..c36e6095e 100644
--- a/soh/src/code/z_horse.c
+++ b/soh/src/code/z_horse.c
@@ -73,8 +73,8 @@ void func_8006D0EC(PlayState* play, Player* player) {
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, -25.0f, 0.0f, -1600.0f, 0, -0x4000, 0, 1, true);
assert(horseActor != NULL);
} else if ((play->sceneNum == gSaveContext.horseData.scene) &&
- (((Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED) != 0) && (!gSaveContext.n64ddFlag ||
- (gSaveContext.n64ddFlag && CHECK_QUEST_ITEM(QUEST_SONG_EPONA) &&
+ (((Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED) != 0) && (!IS_RANDO ||
+ (IS_RANDO && CHECK_QUEST_ITEM(QUEST_SONG_EPONA) &&
(INV_CONTENT(ITEM_OCARINA_FAIRY) != ITEM_NONE)))) || DREG(1) != 0)) {
// "Set by existence of horse %d %d %d"
osSyncPrintf("馬存在によるセット %d %d %d\n", gSaveContext.horseData.scene, Flags_GetEventChkInf(EVENTCHKINF_EPONA_OBTAINED),
diff --git a/soh/src/code/z_kaleido_scope_call.c b/soh/src/code/z_kaleido_scope_call.c
index 12f539011..5c5703529 100644
--- a/soh/src/code/z_kaleido_scope_call.c
+++ b/soh/src/code/z_kaleido_scope_call.c
@@ -60,7 +60,7 @@ void KaleidoScopeCall_Update(PlayState* play) {
GameInteractor_ExecuteOnPauseMenu();
if (!gSaveContext.sohStats.gameComplete &&
- (!gSaveContext.isBossRush || !gSaveContext.isBossRushPaused)) {
+ (!IS_BOSS_RUSH || !gSaveContext.isBossRushPaused)) {
gSaveContext.sohStats.pauseTimer++;
}
diff --git a/soh/src/code/z_map_exp.c b/soh/src/code/z_map_exp.c
index caeef6887..c4db0098b 100644
--- a/soh/src/code/z_map_exp.c
+++ b/soh/src/code/z_map_exp.c
@@ -394,8 +394,8 @@ void Map_InitData(PlayState* play, s16 room) {
}
} else if (play->sceneNum == SCENE_LAKE_HYLIA) {
if ((LINK_AGE_IN_YEARS == YEARS_ADULT) &&
- ((!gSaveContext.n64ddFlag && !CHECK_QUEST_ITEM(QUEST_MEDALLION_WATER)) ||
- (gSaveContext.n64ddFlag && !Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_WATER_TEMPLE)))) {
+ ((!IS_RANDO && !CHECK_QUEST_ITEM(QUEST_MEDALLION_WATER)) ||
+ (IS_RANDO && !Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_WATER_TEMPLE)))) {
extendedMapIndex = 0x15;
}
} else if (play->sceneNum == SCENE_GERUDO_VALLEY) {
@@ -403,8 +403,8 @@ void Map_InitData(PlayState* play, s16 room) {
extendedMapIndex = 0x16;
}
} else if (play->sceneNum == SCENE_GERUDOS_FORTRESS) {
- if ((!gSaveContext.n64ddFlag && GET_EVENTCHKINF_CARPENTERS_FREE_ALL()) ||
- (gSaveContext.n64ddFlag && CHECK_QUEST_ITEM(QUEST_GERUDO_CARD))) {
+ if ((!IS_RANDO && GET_EVENTCHKINF_CARPENTERS_FREE_ALL()) ||
+ (IS_RANDO && CHECK_QUEST_ITEM(QUEST_GERUDO_CARD))) {
extendedMapIndex = 0x17;
}
}
diff --git a/soh/src/code/z_message_PAL.c b/soh/src/code/z_message_PAL.c
index 91f9003a2..c88c698c7 100644
--- a/soh/src/code/z_message_PAL.c
+++ b/soh/src/code/z_message_PAL.c
@@ -1617,9 +1617,9 @@ void Message_OpenText(PlayState* play, u16 textId) {
// Increments text id based on piece of heart count, assumes the piece of heart text is all
// in order and that you don't have more than the intended amount of heart pieces.
textId += (gSaveContext.inventory.questItems & 0xF0000000 & 0xF0000000) >> 0x1C;
- } else if (!gSaveContext.n64ddFlag && (msgCtx->textId == 0xC && CHECK_OWNED_EQUIP(EQUIP_SWORD, 2))) {
+ } else if (!IS_RANDO && (msgCtx->textId == 0xC && CHECK_OWNED_EQUIP(EQUIP_SWORD, 2))) {
textId = 0xB; // Traded Giant's Knife for Biggoron Sword
- } else if (!gSaveContext.n64ddFlag && (msgCtx->textId == 0xB4 && (Flags_GetEventChkInf(EVENTCHKINF_SPOKE_TO_CURSED_MAN_IN_SKULL_HOUSE)))) {
+ } else if (!IS_RANDO && (msgCtx->textId == 0xB4 && (Flags_GetEventChkInf(EVENTCHKINF_SPOKE_TO_CURSED_MAN_IN_SKULL_HOUSE)))) {
textId = 0xB5; // Destroyed Gold Skulltula
}
// Ocarina Staff + Dialog
@@ -2517,7 +2517,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
if (msgCtx->lastPlayedSong < OCARINA_SONG_SARIAS &&
(msgCtx->ocarinaAction < OCARINA_ACTION_PLAYBACK_MINUET ||
msgCtx->ocarinaAction >= OCARINA_ACTION_PLAYBACK_SARIA)) {
- if (msgCtx->disableWarpSongs || (interfaceCtx->restrictions.warpSongs == 3 && !gSaveContext.n64ddFlag)) {
+ if (msgCtx->disableWarpSongs || (interfaceCtx->restrictions.warpSongs == 3 && !IS_RANDO)) {
Message_StartTextbox(play, 0x88C, NULL); // "You can't warp here!"
play->msgCtx.ocarinaMode = OCARINA_MODE_04;
} else if ((gSaveContext.eventInf[0] & 0xF) != 1) {
@@ -2603,7 +2603,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
msgCtx->lastPlayedSong = msgCtx->ocarinaStaff->state;
msgCtx->msgMode = MSGMODE_SONG_PLAYBACK_SUCCESS;
- if (!gSaveContext.n64ddFlag) {
+ if (!IS_RANDO) {
Item_Give(play, ITEM_SONG_MINUET + gOcarinaSongItemMap[msgCtx->ocarinaStaff->state]);
}
diff --git a/soh/src/code/z_onepointdemo.c b/soh/src/code/z_onepointdemo.c
index 704c28585..ab62692cc 100644
--- a/soh/src/code/z_onepointdemo.c
+++ b/soh/src/code/z_onepointdemo.c
@@ -792,7 +792,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 camIdx, s16 csId, Actor* actor
case 4100:
csInfo->keyFrames = D_801225D4;
// RANDO: Waterfall opening cutscene skips to the end of the cutscene data earlier by doing this
- if (!(gSaveContext.n64ddFlag)) {
+ if (!(IS_RANDO)) {
csInfo->keyFrameCnt = 5;
} else {
csInfo->keyFrameCnt = 2;
diff --git a/soh/src/code/z_parameter.c b/soh/src/code/z_parameter.c
index 82cb8a6b6..75c85e3e4 100644
--- a/soh/src/code/z_parameter.c
+++ b/soh/src/code/z_parameter.c
@@ -884,7 +884,7 @@ void func_80083108(PlayState* play) {
}
}
// Don't hide the HUD in the Chamber of Sages when in Boss Rush.
- } else if (play->sceneNum == SCENE_CHAMBER_OF_THE_SAGES && !gSaveContext.isBossRush) {
+ } else if (play->sceneNum == SCENE_CHAMBER_OF_THE_SAGES && !IS_BOSS_RUSH) {
Interface_ChangeAlpha(1);
} else if (play->sceneNum == SCENE_FISHING_POND) {
gSaveContext.unk_13E7 = 2;
@@ -1413,7 +1413,7 @@ void Inventory_SwapAgeEquipment(void) {
// When becoming adult, remove swordless flag since we'll get master sword
// Only in rando to keep swordless link bugs in vanilla
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
Flags_UnsetInfTable(INFTABLE_SWORDLESS);
}
@@ -1467,7 +1467,7 @@ void Inventory_SwapAgeEquipment(void) {
} else {
// When becoming child, set swordless flag if player doesn't have kokiri sword
// Only in rando to keep swordless link bugs in vanilla
- if (gSaveContext.n64ddFlag && (1 << 0 & gSaveContext.inventory.equipment) == 0) {
+ if (IS_RANDO && (1 << 0 & gSaveContext.inventory.equipment) == 0) {
Flags_SetInfTable(INFTABLE_SWORDLESS);
}
@@ -1533,7 +1533,7 @@ void Inventory_SwapAgeEquipment(void) {
gSaveContext.equips.equipment = gSaveContext.childEquips.equipment;
gSaveContext.equips.equipment &= 0xFFF0;
gSaveContext.equips.equipment |= 0x0001;
- } else if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_STARTING_AGE) == RO_AGE_ADULT) {
+ } else if (IS_RANDO && Randomizer_GetSettingValue(RSK_STARTING_AGE) == RO_AGE_ADULT) {
/*If in rando and starting age is adult, childEquips is not initialized and buttonItems[0]
will be ITEM_NONE. When changing age from adult -> child, reset equips to "default"
(only kokiri tunic/boots equipped, no sword, no C-button items, no D-Pad items).
@@ -1837,7 +1837,7 @@ u8 Item_Give(PlayState* play, u8 item) {
// In rando, when buying Giant's Knife, also check
// for 0xE in case we don't have Kokiri Sword
- if (ALL_EQUIP_VALUE(EQUIP_SWORD) == 0xF || (gSaveContext.n64ddFlag && ALL_EQUIP_VALUE(EQUIP_SWORD) == 0xE)) {
+ if (ALL_EQUIP_VALUE(EQUIP_SWORD) == 0xF || (IS_RANDO && ALL_EQUIP_VALUE(EQUIP_SWORD) == 0xE)) {
gSaveContext.inventory.equipment ^= 8 << gEquipShifts[EQUIP_SWORD];
@@ -1944,13 +1944,13 @@ u8 Item_Give(PlayState* play, u8 item) {
return Return_Item(item, MOD_NONE, ITEM_NONE);
} else if (item == ITEM_WALLET_ADULT) {
Inventory_ChangeUpgrade(UPG_WALLET, 1);
- if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_FULL_WALLETS)) {
+ if (IS_RANDO && Randomizer_GetSettingValue(RSK_FULL_WALLETS)) {
Rupees_ChangeBy(200);
}
return Return_Item(item, MOD_NONE, ITEM_NONE);
} else if (item == ITEM_WALLET_GIANT) {
Inventory_ChangeUpgrade(UPG_WALLET, 2);
- if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_FULL_WALLETS)) {
+ if (IS_RANDO && Randomizer_GetSettingValue(RSK_FULL_WALLETS)) {
Rupees_ChangeBy(500);
}
return Return_Item(item, MOD_NONE, ITEM_NONE);
@@ -1994,7 +1994,7 @@ u8 Item_Give(PlayState* play, u8 item) {
}
}
// update the adult/child equips when rando'd (accounting for equp swapped hookshot as child)
- if (gSaveContext.n64ddFlag && LINK_IS_CHILD) {
+ if (IS_RANDO && LINK_IS_CHILD) {
for (i = 1; i < ARRAY_COUNT(gSaveContext.adultEquips.buttonItems); i++) {
if (gSaveContext.adultEquips.buttonItems[i] == ITEM_HOOKSHOT) {
gSaveContext.adultEquips.buttonItems[i] = ITEM_LONGSHOT;
@@ -2004,7 +2004,7 @@ u8 Item_Give(PlayState* play, u8 item) {
}
}
}
- if (gSaveContext.n64ddFlag && LINK_IS_ADULT) {
+ if (IS_RANDO && LINK_IS_ADULT) {
for (i = 1; i < ARRAY_COUNT(gSaveContext.childEquips.buttonItems); i++) {
if (gSaveContext.childEquips.buttonItems[i] == ITEM_HOOKSHOT) {
gSaveContext.childEquips.buttonItems[i] = ITEM_LONGSHOT;
@@ -2149,7 +2149,7 @@ u8 Item_Give(PlayState* play, u8 item) {
}
// update the adult/child equips when rando'd
- if (gSaveContext.n64ddFlag && LINK_IS_CHILD) {
+ if (IS_RANDO && LINK_IS_CHILD) {
for (i = 1; i < ARRAY_COUNT(gSaveContext.adultEquips.buttonItems); i++) {
if (gSaveContext.adultEquips.buttonItems[i] == ITEM_OCARINA_FAIRY) {
gSaveContext.adultEquips.buttonItems[i] = ITEM_OCARINA_TIME;
@@ -2159,7 +2159,7 @@ u8 Item_Give(PlayState* play, u8 item) {
}
}
}
- if (gSaveContext.n64ddFlag && LINK_IS_ADULT) {
+ if (IS_RANDO && LINK_IS_ADULT) {
for (i = 1; i < ARRAY_COUNT(gSaveContext.childEquips.buttonItems); i++) {
if (gSaveContext.childEquips.buttonItems[i] == ITEM_OCARINA_FAIRY) {
gSaveContext.childEquips.buttonItems[i] = ITEM_OCARINA_TIME;
@@ -2515,7 +2515,7 @@ u16 Randomizer_Item_Give(PlayState* play, GetItemEntry giEntry) {
if (item == RG_TYCOON_WALLET) {
Inventory_ChangeUpgrade(UPG_WALLET, 3);
- if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_FULL_WALLETS)) {
+ if (IS_RANDO && Randomizer_GetSettingValue(RSK_FULL_WALLETS)) {
Rupees_ChangeBy(999);
}
return Return_Item_Entry(giEntry, RG_NONE);
@@ -2528,6 +2528,21 @@ u16 Randomizer_Item_Give(PlayState* play, GetItemEntry giEntry) {
return Return_Item_Entry(giEntry, RG_NONE);
}
+ if (item == RG_TRIFORCE_PIECE) {
+ gSaveContext.triforcePiecesCollected++;
+ GameInteractor_SetTriforceHuntPieceGiven(true);
+
+ // Teleport to credits when goal is reached.
+ if (gSaveContext.triforcePiecesCollected == Randomizer_GetSettingValue(RSK_TRIFORCE_HUNT_PIECES_REQUIRED)) {
+ gSaveContext.sohStats.itemTimestamp[TIMESTAMP_TRIFORCE_COMPLETED] = GAMEPLAYSTAT_TOTAL_TIME;
+ gSaveContext.sohStats.gameComplete = 1;
+ Play_PerformSave(play);
+ GameInteractor_SetTriforceHuntCreditsWarpActive(true);
+ }
+
+ return Return_Item_Entry(giEntry, RG_NONE);
+ }
+
if (item == RG_PROGRESSIVE_BOMBCHUS) {
if (INV_CONTENT(ITEM_BOMBCHU) == ITEM_NONE) {
INV_CONTENT(ITEM_BOMBCHU) = ITEM_BOMBCHU;
@@ -2561,7 +2576,7 @@ u8 Item_CheckObtainability(u8 item) {
osSyncPrintf("item_get_non_setting=%d pt=%d z=%x\n", item, slot, gSaveContext.inventory.items[slot]);
osSyncPrintf(VT_RST);
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
if (item == ITEM_SINGLE_MAGIC || item == ITEM_DOUBLE_MAGIC || item == ITEM_DOUBLE_DEFENSE) {
return ITEM_NONE;
}
@@ -2578,25 +2593,25 @@ u8 Item_CheckObtainability(u8 item) {
return ITEM_NONE;
} else if ((gBitFlags[item - ITEM_SWORD_KOKIRI] << gEquipShifts[EQUIP_SWORD]) &
gSaveContext.inventory.equipment) {
- return gSaveContext.n64ddFlag ? ITEM_NONE : item;
+ return IS_RANDO ? ITEM_NONE : item;
} else {
return ITEM_NONE;
}
} else if ((item >= ITEM_SHIELD_DEKU) && (item <= ITEM_SHIELD_MIRROR)) {
if ((gBitFlags[item - ITEM_SHIELD_DEKU] << gEquipShifts[EQUIP_SHIELD]) & gSaveContext.inventory.equipment) {
- return gSaveContext.n64ddFlag ? ITEM_NONE : item;
+ return IS_RANDO ? ITEM_NONE : item;
} else {
return ITEM_NONE;
}
} else if ((item >= ITEM_TUNIC_KOKIRI) && (item <= ITEM_TUNIC_ZORA)) {
if ((gBitFlags[item - ITEM_TUNIC_KOKIRI] << gEquipShifts[EQUIP_TUNIC]) & gSaveContext.inventory.equipment) {
- return gSaveContext.n64ddFlag ? ITEM_NONE : item;
+ return IS_RANDO ? ITEM_NONE : item;
} else {
return ITEM_NONE;
}
} else if ((item >= ITEM_BOOTS_KOKIRI) && (item <= ITEM_BOOTS_HOVER)) {
if ((gBitFlags[item - ITEM_BOOTS_KOKIRI] << gEquipShifts[EQUIP_BOOTS]) & gSaveContext.inventory.equipment) {
- return gSaveContext.n64ddFlag ? ITEM_NONE : item;
+ return IS_RANDO ? ITEM_NONE : item;
} else {
return ITEM_NONE;
}
@@ -2813,7 +2828,7 @@ s32 Inventory_ConsumeFairy(PlayState* play) {
}
bool Inventory_HatchPocketCucco(PlayState* play) {
- if (!gSaveContext.n64ddFlag) {
+ if (!IS_RANDO) {
return Inventory_ReplaceItem(play, ITEM_POCKET_EGG, ITEM_POCKET_CUCCO);
}
@@ -5081,7 +5096,7 @@ void Interface_Draw(PlayState* play) {
}
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, rColor.r, rColor.g, rColor.b, interfaceCtx->magicAlpha);
// Draw Rupee icon. Hide in Boss Rush.
- if (!gSaveContext.isBossRush) {
+ if (!IS_BOSS_RUSH) {
OVERLAY_DISP = Gfx_TextureIA8(OVERLAY_DISP, gRupeeCounterIconTex, 16, 16, PosX_RC, PosY_RC, 16, 16, 1 << 10, 1 << 10);
}
@@ -5199,7 +5214,7 @@ void Interface_Draw(PlayState* play) {
svar5 = rupeeDigitsCount[CUR_UPG_VALUE(UPG_WALLET)];
// Draw Rupee Counter. Hide in Boss Rush.
- if (!gSaveContext.isBossRush) {
+ if (!IS_BOSS_RUSH) {
for (svar1 = 0, svar3 = 16; svar1 < svar5; svar1++, svar2++, svar3 += 8) {
OVERLAY_DISP = Gfx_TextureI8(OVERLAY_DISP, ((u8*)digitTextures[interfaceCtx->counterDigits[svar2]]),
8, 16, PosX_RC + svar3, PosY_RC, 8, 16, 1 << 10, 1 << 10);
@@ -6137,7 +6152,7 @@ void Interface_Draw(PlayState* play) {
void Interface_DrawTotalGameplayTimer(PlayState* play) {
// Draw timer based on the Gameplay Stats total time.
- if ((gSaveContext.isBossRush && gSaveContext.bossRushOptions[BR_OPTIONS_TIMER] == BR_CHOICE_TIMER_YES) ||
+ if ((IS_BOSS_RUSH && gSaveContext.bossRushOptions[BR_OPTIONS_TIMER] == BR_CHOICE_TIMER_YES) ||
(CVarGetInteger("gGameplayStats.ShowIngameTimer", 0) && gSaveContext.fileNum >= 0 && gSaveContext.fileNum <= 2)) {
s32 X_Margins_Timer = 0;
@@ -6624,7 +6639,7 @@ void Interface_Update(PlayState* play) {
play->nextEntranceIndex = gSaveContext.entranceIndex;
// In ER, handle sun song respawn from last entrance from grottos
- if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_ENTRANCES)) {
+ if (IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_ENTRANCES)) {
Grotto_ForceGrottoReturn();
}
diff --git a/soh/src/code/z_play.c b/soh/src/code/z_play.c
index 4232bf5ea..45977b6e7 100644
--- a/soh/src/code/z_play.c
+++ b/soh/src/code/z_play.c
@@ -179,7 +179,7 @@ void Play_Destroy(GameState* thisx) {
}
// In ER, remove link from epona when entering somewhere that doesn't support epona
- if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_OVERWORLD_ENTRANCES)) {
+ if (IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_OVERWORLD_ENTRANCES)) {
Entrance_HandleEponaState();
}
@@ -469,7 +469,7 @@ void Play_Init(GameState* thisx) {
// eventChkInf[5] & 0x200 = Got Impa's reward
// entranceIndex 0x7A, Castle Courtyard - Day from crawlspace
// entranceIndex 0x400, Zelda's Courtyard
- if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SKIP_CHILD_STEALTH) &&
+ if (IS_RANDO && Randomizer_GetSettingValue(RSK_SKIP_CHILD_STEALTH) &&
!Flags_GetEventChkInf(EVENTCHKINF_OBTAINED_ZELDAS_LETTER) && !Flags_GetEventChkInf(EVENTCHKINF_LEARNED_ZELDAS_LULLABY)) {
if (gSaveContext.entranceIndex == 0x7A) {
gSaveContext.entranceIndex = 0x400;
@@ -1181,7 +1181,7 @@ void Play_Update(PlayState* play) {
play->gameplayFrames++;
// Gameplay stat tracking
if (!gSaveContext.sohStats.gameComplete &&
- (!gSaveContext.isBossRush || (gSaveContext.isBossRush && !gSaveContext.isBossRushPaused))) {
+ (!IS_BOSS_RUSH || (IS_BOSS_RUSH && !gSaveContext.isBossRushPaused))) {
gSaveContext.sohStats.playTimer++;
gSaveContext.sohStats.sceneTimer++;
gSaveContext.sohStats.roomTimer++;
@@ -1419,7 +1419,7 @@ skip:
Environment_Update(play, &play->envCtx, &play->lightCtx, &play->pauseCtx, &play->msgCtx,
&play->gameOverCtx, play->state.gfxCtx);
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
GivePlayerRandoRewardSariaGift(play, RC_LW_GIFT_FROM_SARIA);
GivePlayerRandoRewardSongOfTime(play, RC_SONG_FROM_OCARINA_OF_TIME);
GivePlayerRandoRewardZeldaLightArrowsGift(play, RC_TOT_LIGHT_ARROWS_CUTSCENE);
@@ -1918,7 +1918,7 @@ void* Play_LoadFile(PlayState* play, RomFile* file) {
void Play_InitEnvironment(PlayState* play, s16 skyboxId) {
// For entrance rando, ensure the correct weather state and sky mode is applied
- if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_ENTRANCES)) {
+ if (IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_ENTRANCES)) {
Entrance_OverrideWeatherState();
}
Skybox_Init(&play->state, &play->skyboxCtx, skyboxId);
@@ -1955,7 +1955,7 @@ void Play_SpawnScene(PlayState* play, s32 sceneNum, s32 spawn) {
OTRPlay_SpawnScene(play, sceneNum, spawn);
- if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_ENTRANCES)) {
+ if (IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_ENTRANCES)) {
Entrance_OverrideSpawnScene(sceneNum, spawn);
}
}
@@ -2318,7 +2318,10 @@ void Play_PerformSave(PlayState* play) {
} else {
Save_SaveFile();
}
- if (CVarGetInteger("gAutosave", AUTOSAVE_OFF) != AUTOSAVE_OFF) {
+ uint8_t triforceHuntCompleted =
+ gSaveContext.n64ddFlag && gSaveContext.triforcePiecesCollected == Randomizer_GetSettingValue(RSK_TRIFORCE_HUNT_PIECES_REQUIRED) &&
+ Randomizer_GetSettingValue(RSK_TRIFORCE_HUNT);
+ if (CVarGetInteger("gAutosave", AUTOSAVE_OFF) != AUTOSAVE_OFF || triforceHuntCompleted) {
Overlay_DisplayText(3.0f, "Game Saved");
}
}
diff --git a/soh/src/code/z_player_lib.c b/soh/src/code/z_player_lib.c
index 934df5f1b..98dacc982 100644
--- a/soh/src/code/z_player_lib.c
+++ b/soh/src/code/z_player_lib.c
@@ -7,6 +7,7 @@
#include "overlays/actors/ovl_Demo_Effect/z_demo_effect.h"
#include "soh/Enhancements/game-interactor/GameInteractor.h"
+#include "soh/Enhancements/randomizer/draw.h"
#include
@@ -1292,6 +1293,8 @@ void Player_DrawGetItemImpl(PlayState* play, Player* this, Vec3f* refPos, s32 dr
if (this->getItemEntry.modIndex == MOD_RANDOMIZER && this->getItemEntry.getItemId == RG_ICE_TRAP) {
Player_DrawGetItemIceTrap(play, this, refPos, drawIdPlusOne, height);
+ } else if (this->getItemEntry.modIndex == MOD_RANDOMIZER && this->getItemEntry.getItemId == RG_TRIFORCE_PIECE) {
+ Randomizer_DrawTriforcePieceGI(play, this->getItemEntry);
} else if (this->getItemEntry.drawFunc != NULL) {
this->getItemEntry.drawFunc(play, &this->getItemEntry);
} else {
diff --git a/soh/src/code/z_room.c b/soh/src/code/z_room.c
index 72b163ef7..ccbc93d0d 100644
--- a/soh/src/code/z_room.c
+++ b/soh/src/code/z_room.c
@@ -403,9 +403,10 @@ BgImage* func_80096A74(PolygonType1* polygon1, PlayState* play) {
camera = GET_ACTIVE_CAM(play);
camId = camera->camDataIdx;
- if (camId == -1 && CVarGetInteger("gNoRestrictItems", 0)) {
+ if (camId == -1 && (CVarGetInteger("gNoRestrictItems", 0) || CVarGetInteger("gCrowdControl", 0))) {
// This prevents a crash when using items that change the
- // camera (such as din's fire) on scenes with prerendered backgrounds
+ // camera (such as din's fire), voiding out or dying on
+ // scenes with prerendered backgrounds.
return NULL;
}
@@ -578,7 +579,7 @@ s32 func_8009728C(PlayState* play, RoomContext* roomCtx, s32 roomNum) {
size_t size;
// In ER, override roomNum to load based on scene and spawn
- if (gSaveContext.n64ddFlag && gSaveContext.respawnFlag <= 0 &&
+ if (IS_RANDO && gSaveContext.respawnFlag <= 0 &&
Randomizer_GetSettingValue(RSK_SHUFFLE_ENTRANCES)) {
roomNum = Entrance_OverrideSpawnSceneRoom(play->sceneNum, play->curSpawn, roomNum);
}
diff --git a/soh/src/code/z_scene_table.c b/soh/src/code/z_scene_table.c
index 00593d0dd..d1065533c 100644
--- a/soh/src/code/z_scene_table.c
+++ b/soh/src/code/z_scene_table.c
@@ -2091,7 +2091,7 @@ void func_8009EE44(PlayState* play) {
gDPSetEnvColor(POLY_OPA_DISP++, 128, 128, 128, 128);
bool playerHasCojiro = INV_CONTENT(ITEM_COJIRO) == ITEM_COJIRO;
- if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_ADULT_TRADE)) {
+ if (IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_ADULT_TRADE)) {
playerHasCojiro = PLAYER_HAS_SHUFFLED_ADULT_TRADE_ITEM(ITEM_COJIRO);
}
if ((play->roomCtx.unk_74[0] == 0) && playerHasCojiro) {
diff --git a/soh/src/code/z_skelanime.c b/soh/src/code/z_skelanime.c
index 5b687e97c..7440640a0 100644
--- a/soh/src/code/z_skelanime.c
+++ b/soh/src/code/z_skelanime.c
@@ -284,6 +284,20 @@ void SkelAnime_DrawLimbOpa(PlayState* play, s32 limbIndex, void** skeleton, Vec3
CLOSE_DISPS(play->state.gfxCtx);
}
+// Checks the skeleton header to draw the appropriate skeleton type instead of harcoding the type in the actor's draw function...
+void SkelAnime_DrawSkeletonOpa(PlayState* play, SkelAnime* skelAnime, OverrideLimbDrawOpa overrideLimbDraw,
+ PostLimbDrawOpa postLimbDraw, void* arg) {
+ if (skelAnime->skeletonHeader->skeletonType == SKELANIME_TYPE_NORMAL) {
+ SkelAnime_DrawOpa(play, skelAnime->skeleton, skelAnime->jointTable, overrideLimbDraw, postLimbDraw, arg);
+ }
+ else if (skelAnime->skeletonHeader->skeletonType == SKELANIME_TYPE_FLEX)
+ {
+ FlexSkeletonHeader* flexHeader = (FlexSkeletonHeader*)skelAnime->skeletonHeader;
+ SkelAnime_DrawFlexOpa(play, skelAnime->skeleton, skelAnime->jointTable, flexHeader->dListCount,
+ overrideLimbDraw, postLimbDraw, arg);
+ }
+}
+
/**
* Draw all limbs of type `StandardLimb` in a given skeleton to the polyOpa buffer
*/
@@ -1436,6 +1450,7 @@ s32 SkelAnime_Init(PlayState* play, SkelAnime* skelAnime, SkeletonHeader* skelet
SkeletonHeader* skeletonHeader = SEGMENTED_TO_VIRTUAL(skeletonHeaderSeg);
+ skelAnime->skeletonHeader = skeletonHeader;
skelAnime->limbCount = skeletonHeader->limbCount + 1;
skelAnime->skeleton = SEGMENTED_TO_VIRTUAL(skeletonHeader->segment);
if (jointTable == NULL) {
@@ -1469,6 +1484,7 @@ s32 SkelAnime_InitFlex(PlayState* play, SkelAnime* skelAnime, FlexSkeletonHeader
FlexSkeletonHeader* skeletonHeader = SEGMENTED_TO_VIRTUAL(skeletonHeaderSeg);
+ skelAnime->skeletonHeader = skeletonHeader;
skelAnime->limbCount = skeletonHeader->sh.limbCount + 1;
skelAnime->dListCount = skeletonHeader->dListCount;
skelAnime->skeleton = SEGMENTED_TO_VIRTUAL(skeletonHeader->sh.segment);
@@ -1506,6 +1522,7 @@ s32 SkelAnime_InitSkin(PlayState* play, SkelAnime* skelAnime, SkeletonHeader* sk
SkeletonHeader* skeletonHeader = SEGMENTED_TO_VIRTUAL(skeletonHeaderSeg);
+ skelAnime->skeletonHeader = skeletonHeader;
skelAnime->limbCount = skeletonHeader->limbCount + 1;
skelAnime->skeleton = SEGMENTED_TO_VIRTUAL(skeletonHeader->segment);
skelAnime->jointTable =
diff --git a/soh/src/code/z_sram.c b/soh/src/code/z_sram.c
index 8dbb96087..fd2b5ebd9 100644
--- a/soh/src/code/z_sram.c
+++ b/soh/src/code/z_sram.c
@@ -155,7 +155,7 @@ void Sram_OpenSave() {
}
// if zelda cutscene has been watched but lullaby was not obtained, restore cutscene and take away letter
- if ((Flags_GetEventChkInf(EVENTCHKINF_OBTAINED_ZELDAS_LETTER)) && !CHECK_QUEST_ITEM(QUEST_SONG_LULLABY) && !gSaveContext.n64ddFlag) {
+ if ((Flags_GetEventChkInf(EVENTCHKINF_OBTAINED_ZELDAS_LETTER)) && !CHECK_QUEST_ITEM(QUEST_SONG_LULLABY) && !IS_RANDO) {
i = gSaveContext.eventChkInf[4] & ~1;
gSaveContext.eventChkInf[4] = i;
@@ -176,7 +176,7 @@ void Sram_OpenSave() {
gSaveContext.equips.equipment |= 2;
}
- if (!(gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_ADULT_TRADE))) {
+ if (!(IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_ADULT_TRADE))) {
for (i = 0; i < ARRAY_COUNT(gSpoilingItems); i++) {
if (INV_CONTENT(ITEM_TRADE_ADULT) == gSpoilingItems[i]) {
INV_CONTENT(gSpoilingItemReverts[i]) = gSpoilingItemReverts[i];
@@ -218,11 +218,10 @@ void Sram_InitSave(FileChooseContext* fileChooseCtx) {
gSaveContext.playerName[offset] = Save_GetSaveMetaInfo(fileChooseCtx->buttonIndex)->playerName[offset];
}
+ gSaveContext.n64ddFlag = fileChooseCtx->n64ddFlag;
+
if (fileChooseCtx->questType[fileChooseCtx->buttonIndex] == 2 && strnlen(CVarGetString("gSpoilerLog", ""), 1) != 0) {
- // Set N64DD Flags for save file
- fileChooseCtx->n64ddFlags[fileChooseCtx->buttonIndex] = 1;
- fileChooseCtx->n64ddFlag = 1;
- gSaveContext.n64ddFlag = 1;
+ gSaveContext.questId = 2;
Randomizer_InitSaveFile();
}
diff --git a/soh/src/overlays/actors/ovl_Bg_Breakwall/z_bg_breakwall.c b/soh/src/overlays/actors/ovl_Bg_Breakwall/z_bg_breakwall.c
index 925a66ba2..58f11a7f3 100644
--- a/soh/src/overlays/actors/ovl_Bg_Breakwall/z_bg_breakwall.c
+++ b/soh/src/overlays/actors/ovl_Bg_Breakwall/z_bg_breakwall.c
@@ -106,7 +106,7 @@ void BgBreakwall_Init(Actor* thisx, PlayState* play) {
s32 wallType = ((this->dyna.actor.params >> 13) & 3) & 0xFF;
// Initialize this with the mud wall, so it can't be affected by toggling while the actor is loaded
- blueFireArrowsEnabledOnMudwallLoad = CVarGetInteger("gBlueFireArrows", 0) || (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_BLUE_FIRE_ARROWS));
+ blueFireArrowsEnabledOnMudwallLoad = CVarGetInteger("gBlueFireArrows", 0) || (IS_RANDO && Randomizer_GetSettingValue(RSK_BLUE_FIRE_ARROWS));
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
DynaPolyActor_Init(&this->dyna, DPM_UNK);
@@ -275,7 +275,7 @@ void BgBreakwall_Wait(BgBreakwall* this, PlayState* play) {
}
// Break the floor immediately in Boss Rush so the player can jump in the hole immediately.
- if (this->collider.base.acFlags & 2 || blueFireArrowHit || gSaveContext.isBossRush) {
+ if (this->collider.base.acFlags & 2 || blueFireArrowHit || IS_BOSS_RUSH) {
Vec3f effectPos;
s32 wallType = ((this->dyna.actor.params >> 13) & 3) & 0xFF;
diff --git a/soh/src/overlays/actors/ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.c b/soh/src/overlays/actors/ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.c
index c5a50a87c..7223e936f 100644
--- a/soh/src/overlays/actors/ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.c
+++ b/soh/src/overlays/actors/ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.c
@@ -199,7 +199,7 @@ void BgDyYoseizo_CheckMagicAcquired(BgDyYoseizo* this, PlayState* play) {
if (Flags_GetSwitch(play, 0x38)) {
play->msgCtx.ocarinaMode = OCARINA_MODE_04;
- if(gSaveContext.n64ddFlag) {
+ if(IS_RANDO) {
gSaveContext.healthAccumulator = 0x140;
Magic_Fill(play);
if(Flags_GetTreasure(play, this->fountainType + 1)) {
@@ -934,8 +934,7 @@ void BgDyYoseizo_Draw(Actor* thisx, PlayState* play) {
gSPSegment(POLY_OPA_DISP++, 0x0A, SEGMENTED_TO_VIRTUAL(sMouthTextures[this->mouthState]));
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable,
- this->skelAnime.dListCount, BgDyYoseizo_OverrideLimbDraw, NULL, this);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, BgDyYoseizo_OverrideLimbDraw, NULL, this);
}
CLOSE_DISPS(play->state.gfxCtx);
BgDyYoseizo_ParticleDraw(this, play);
diff --git a/soh/src/overlays/actors/ovl_Bg_Gate_Shutter/z_bg_gate_shutter.c b/soh/src/overlays/actors/ovl_Bg_Gate_Shutter/z_bg_gate_shutter.c
index 847f8da43..3307b6148 100644
--- a/soh/src/overlays/actors/ovl_Bg_Gate_Shutter/z_bg_gate_shutter.c
+++ b/soh/src/overlays/actors/ovl_Bg_Gate_Shutter/z_bg_gate_shutter.c
@@ -45,8 +45,8 @@ void BgGateShutter_Init(Actor* thisx, PlayState* play) {
this->somePos.y = thisx->world.pos.y;
this->somePos.z = thisx->world.pos.z;
if (((Flags_GetInfTable(INFTABLE_SHOWED_ZELDAS_LETTER_TO_GATE_GUARD)) ||
- (!gSaveContext.n64ddFlag && (Flags_GetEventChkInf(EVENTCHKINF_PULLED_MASTER_SWORD_FROM_PEDESTAL))) ||
- (gSaveContext.n64ddFlag && (Randomizer_GetSettingValue(RSK_KAK_GATE) == RO_KAK_GATE_OPEN))) &&
+ (!IS_RANDO && (Flags_GetEventChkInf(EVENTCHKINF_PULLED_MASTER_SWORD_FROM_PEDESTAL))) ||
+ (IS_RANDO && (Randomizer_GetSettingValue(RSK_KAK_GATE) == RO_KAK_GATE_OPEN))) &&
(play->sceneNum == SCENE_KAKARIKO_VILLAGE)) {
thisx->world.pos.x = -89.0f;
thisx->world.pos.z = -1375.0f;
diff --git a/soh/src/overlays/actors/ovl_Bg_Gjyo_Bridge/z_bg_gjyo_bridge.c b/soh/src/overlays/actors/ovl_Bg_Gjyo_Bridge/z_bg_gjyo_bridge.c
index b79020309..b592edcd5 100644
--- a/soh/src/overlays/actors/ovl_Bg_Gjyo_Bridge/z_bg_gjyo_bridge.c
+++ b/soh/src/overlays/actors/ovl_Bg_Gjyo_Bridge/z_bg_gjyo_bridge.c
@@ -51,7 +51,7 @@ void BgGjyoBridge_Init(Actor* thisx, PlayState* play) {
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, thisx, colHeader);
int bridge = Randomizer_GetSettingValue(RSK_RAINBOW_BRIDGE);
- if (Flags_GetEventChkInf(EVENTCHKINF_RAINBOW_BRIDGE_BUILT) || (gSaveContext.n64ddFlag && bridge == RO_BRIDGE_ALWAYS_OPEN)) {
+ if (Flags_GetEventChkInf(EVENTCHKINF_RAINBOW_BRIDGE_BUILT) || (IS_RANDO && bridge == RO_BRIDGE_ALWAYS_OPEN)) {
this->actionFunc = func_808787A4;
} else {
this->dyna.actor.draw = NULL;
@@ -84,7 +84,7 @@ u8 CheckPlayerPosition(Player* player, PlayState* play) {
void BgGjyoBridge_TriggerCutscene(BgGjyoBridge* this, PlayState* play) {
Player* player = GET_PLAYER(play);
- if (!gSaveContext.n64ddFlag) {
+ if (!IS_RANDO) {
if (CHECK_QUEST_ITEM(QUEST_MEDALLION_SPIRIT) && CHECK_QUEST_ITEM(QUEST_MEDALLION_SHADOW) &&
(INV_CONTENT(ITEM_ARROW_LIGHT) == ITEM_ARROW_LIGHT) && CheckPlayerPosition(player, play)) {
LaunchBridgeCutscene(this, play);
@@ -146,7 +146,7 @@ void BgGjyoBridge_TriggerCutscene(BgGjyoBridge* this, PlayState* play) {
}
void BgGjyoBridge_SpawnBridge(BgGjyoBridge* this, PlayState* play) {
- if (gSaveContext.n64ddFlag || (play->csCtx.state != CS_STATE_IDLE) && (play->csCtx.npcActions[2] != NULL) &&
+ if (IS_RANDO || (play->csCtx.state != CS_STATE_IDLE) && (play->csCtx.npcActions[2] != NULL) &&
(play->csCtx.npcActions[2]->action == 2)) {
this->dyna.actor.draw = BgGjyoBridge_Draw;
func_8003EC50(play, &play->colCtx.dyna, this->dyna.bgId);
diff --git a/soh/src/overlays/actors/ovl_Bg_Ice_Shelter/z_bg_ice_shelter.c b/soh/src/overlays/actors/ovl_Bg_Ice_Shelter/z_bg_ice_shelter.c
index 04018c9a8..36666ed15 100644
--- a/soh/src/overlays/actors/ovl_Bg_Ice_Shelter/z_bg_ice_shelter.c
+++ b/soh/src/overlays/actors/ovl_Bg_Ice_Shelter/z_bg_ice_shelter.c
@@ -105,7 +105,7 @@ void func_80890740(BgIceShelter* this, PlayState* play) {
s32 type = (this->dyna.actor.params >> 8) & 7;
// Initialize this with the red ice, so it can't be affected by toggling while the actor is loaded
- blueFireArrowsEnabledOnRedIceLoad = CVarGetInteger("gBlueFireArrows", 0) || (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_BLUE_FIRE_ARROWS));
+ blueFireArrowsEnabledOnRedIceLoad = CVarGetInteger("gBlueFireArrows", 0) || (IS_RANDO && Randomizer_GetSettingValue(RSK_BLUE_FIRE_ARROWS));
Collider_InitCylinder(play, &this->cylinder1);
// If "Blue Fire Arrows" is enabled, set up a collider on the red ice that responds to them
diff --git a/soh/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.c b/soh/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.c
index 0ab03c081..8019d414e 100644
--- a/soh/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.c
+++ b/soh/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.c
@@ -82,7 +82,7 @@ void BgSpot00Hanebasi_Init(Actor* thisx, PlayState* play) {
if (gSaveContext.sceneSetupIndex != 6) {
// Don't close the bridge in rando to accomodate hyrule castle exit
if (CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD) && CHECK_QUEST_ITEM(QUEST_GORON_RUBY) &&
- CHECK_QUEST_ITEM(QUEST_ZORA_SAPPHIRE) && !Flags_GetEventChkInf(EVENTCHKINF_ZELDA_FLED_HYRULE_CASTLE) && !(gSaveContext.n64ddFlag)) {
+ CHECK_QUEST_ITEM(QUEST_ZORA_SAPPHIRE) && !Flags_GetEventChkInf(EVENTCHKINF_ZELDA_FLED_HYRULE_CASTLE) && !(IS_RANDO)) {
this->dyna.actor.shape.rot.x = -0x4000;
}
}
diff --git a/soh/src/overlays/actors/ovl_Bg_Spot01_Idosoko/z_bg_spot01_idosoko.c b/soh/src/overlays/actors/ovl_Bg_Spot01_Idosoko/z_bg_spot01_idosoko.c
index f08878ec2..905106dce 100644
--- a/soh/src/overlays/actors/ovl_Bg_Spot01_Idosoko/z_bg_spot01_idosoko.c
+++ b/soh/src/overlays/actors/ovl_Bg_Spot01_Idosoko/z_bg_spot01_idosoko.c
@@ -49,7 +49,7 @@ void BgSpot01Idosoko_Init(Actor* thisx, PlayState* play) {
this->dyna.bgId = DynaPoly_SetBgActor(play, &play->colCtx.dyna, &this->dyna.actor, colHeader);
// If dungeon entrance randomizer is on, remove the well stone as adult Link when
// child Link has drained the water to the well
- if (!LINK_IS_ADULT || (gSaveContext.n64ddFlag &&
+ if (!LINK_IS_ADULT || (IS_RANDO &&
Randomizer_GetSettingValue(RSK_SHUFFLE_DUNGEON_ENTRANCES) != RO_DUNGEON_ENTRANCE_SHUFFLE_OFF &&
Flags_GetEventChkInf(EVENTCHKINF_DRAINED_WELL_IN_KAKARIKO))) {
Actor_Kill(&this->dyna.actor);
diff --git a/soh/src/overlays/actors/ovl_Bg_Spot02_Objects/z_bg_spot02_objects.c b/soh/src/overlays/actors/ovl_Bg_Spot02_Objects/z_bg_spot02_objects.c
index f63f427db..2eb3faeda 100644
--- a/soh/src/overlays/actors/ovl_Bg_Spot02_Objects/z_bg_spot02_objects.c
+++ b/soh/src/overlays/actors/ovl_Bg_Spot02_Objects/z_bg_spot02_objects.c
@@ -131,7 +131,7 @@ void func_808AC908(BgSpot02Objects* this, PlayState* play) {
// We want to do most of the same things in rando, but we're not in a cutscene and the flag for
// destroying the royal tombstone is already set.
- if (gSaveContext.n64ddFlag && Flags_GetEventChkInf(EVENTCHKINF_DESTROYED_ROYAL_FAMILY_TOMB)) {
+ if (IS_RANDO && Flags_GetEventChkInf(EVENTCHKINF_DESTROYED_ROYAL_FAMILY_TOMB)) {
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_GRAVE_EXPLOSION);
this->timer = 25;
pos.x = (Math_SinS(this->dyna.actor.shape.rot.y) * 50.0f) + this->dyna.actor.world.pos.x;
@@ -174,7 +174,7 @@ void func_808ACA08(BgSpot02Objects* this, PlayState* play) {
// This shouldn't execute in rando even without the check since we never
// enter the cutscene context.
- if (play->csCtx.frames == 402 && !(gSaveContext.n64ddFlag)) {
+ if (play->csCtx.frames == 402 && !(IS_RANDO)) {
if (!LINK_IS_ADULT) {
Player_PlaySfx(&player->actor, NA_SE_VO_LI_DEMO_DAMAGE_KID);
} else {
@@ -220,7 +220,7 @@ void func_808ACC34(BgSpot02Objects* this, PlayState* play) {
// This is the actionFunc that the game settles on when you load the Graveyard
// When we're in rando and the flag for the gravestone being destroyed gets set,
// set the actionFunc to the function where the gravestone explodes.
- if (gSaveContext.n64ddFlag && Flags_GetEventChkInf(EVENTCHKINF_DESTROYED_ROYAL_FAMILY_TOMB)) {
+ if (IS_RANDO && Flags_GetEventChkInf(EVENTCHKINF_DESTROYED_ROYAL_FAMILY_TOMB)) {
this->actionFunc = func_808AC908;
}
diff --git a/soh/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.c b/soh/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.c
index 42f946b53..816f96aa4 100644
--- a/soh/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.c
+++ b/soh/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.c
@@ -217,7 +217,7 @@ void BgSpot06Objects_Destroy(Actor* thisx, PlayState* play) {
// Due to Ships resource caching, the water box collisions for the river have to be manually reset
play->colCtx.colHeader->waterBoxes[LHWB_GERUDO_VALLEY_RIVER_LOWER].zMin = WATER_LEVEL_RIVER_LOWER_Z;
- if (gSaveContext.n64ddFlag && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_WATER_TEMPLE)) {
+ if (IS_RANDO && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_WATER_TEMPLE)) {
// For randomizer when leaving lake hylia while the water level is lowered,
// reset the "raise lake hylia water" flag back to on if the water temple is cleared
Flags_SetEventChkInf(EVENTCHKINF_RAISED_LAKE_HYLIA_WATER);
@@ -451,7 +451,7 @@ void BgSpot06Objects_Update(Actor* thisx, PlayState* play) {
}
// Bail early for water control system for child or non-rando
- if (LINK_IS_CHILD || !gSaveContext.n64ddFlag) {
+ if (LINK_IS_CHILD || !IS_RANDO) {
return;
}
@@ -596,7 +596,7 @@ void BgSpot06Objects_WaterPlaneCutsceneRise(BgSpot06Objects* this, PlayState* pl
this->actionFunc = BgSpot06Objects_DoNothing;
// On rando, this is used with the water control system switch to finalize raising the water
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
this->lakeHyliaWaterLevel = 0;
play->colCtx.colHeader->waterBoxes[LHWB_GERUDO_VALLEY_RIVER_LOWER].ySurface = WATER_LEVEL_RIVER_RAISED;
play->colCtx.colHeader->waterBoxes[LHWB_GERUDO_VALLEY_RIVER_LOWER].zMin = WATER_LEVEL_RIVER_LOWER_Z;
diff --git a/soh/src/overlays/actors/ovl_Bg_Spot12_Saku/z_bg_spot12_saku.c b/soh/src/overlays/actors/ovl_Bg_Spot12_Saku/z_bg_spot12_saku.c
index 790e06dd3..519767534 100644
--- a/soh/src/overlays/actors/ovl_Bg_Spot12_Saku/z_bg_spot12_saku.c
+++ b/soh/src/overlays/actors/ovl_Bg_Spot12_Saku/z_bg_spot12_saku.c
@@ -60,7 +60,7 @@ void BgSpot12Saku_Init(Actor* thisx, PlayState* play) {
// If ER is on, force the gate to always use its permanent flag
// (which it only uses in Child Gerudo Fortress in the vanilla game)
- if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_DUNGEON_ENTRANCES) != RO_DUNGEON_ENTRANCE_SHUFFLE_OFF) {
+ if (IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_DUNGEON_ENTRANCES) != RO_DUNGEON_ENTRANCE_SHUFFLE_OFF) {
thisx->params = 0x0002;
}
@@ -132,7 +132,7 @@ void BgSpot12Saku_Update(Actor* thisx, PlayState* play) {
BgSpot12Saku* this = (BgSpot12Saku*)thisx;
// If ER is on, when the guard opens the GtG gate its permanent flag will be set.
- if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_DUNGEON_ENTRANCES) != RO_DUNGEON_ENTRANCE_SHUFFLE_OFF &&
+ if (IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_DUNGEON_ENTRANCES) != RO_DUNGEON_ENTRANCE_SHUFFLE_OFF &&
Flags_GetSwitch(play, 0x3A)) {
Flags_SetSwitch(play, 0x2);
}
diff --git a/soh/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.c b/soh/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.c
index 6c8db2fdf..4fe2c817c 100644
--- a/soh/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.c
+++ b/soh/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.c
@@ -74,7 +74,7 @@ void BgTokiSwd_Init(Actor* thisx, PlayState* play) {
BgTokiSwd_SetupAction(this, func_808BAF40);
if (LINK_IS_ADULT) {
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
if (!CUR_UPG_VALUE(UPG_BOMB_BAG)) {
for (size_t i = 0; i < 8; i++) {
if (gSaveContext.equips.buttonItems[i] == ITEM_BOMB) {
@@ -84,7 +84,7 @@ void BgTokiSwd_Init(Actor* thisx, PlayState* play) {
}
}
this->actor.draw = NULL;
- } else if (gSaveContext.n64ddFlag) {
+ } else if (IS_RANDO) {
// don't give child link a kokiri sword if we don't have one
uint32_t kokiriSwordBitMask = 1 << 0;
if (!(gSaveContext.inventory.equipment & kokiriSwordBitMask)) {
@@ -119,7 +119,7 @@ void func_808BAF40(BgTokiSwd* this, PlayState* play) {
gSaveContext.cutsceneTrigger = 1;
}
- if (!LINK_IS_ADULT || (Flags_GetEventChkInf(EVENTCHKINF_LEARNED_PRELUDE_OF_LIGHT) && !gSaveContext.n64ddFlag) || gSaveContext.n64ddFlag) {
+ if (!LINK_IS_ADULT || (Flags_GetEventChkInf(EVENTCHKINF_LEARNED_PRELUDE_OF_LIGHT) && !IS_RANDO) || IS_RANDO) {
if (Actor_HasParent(&this->actor, play)) {
if (!LINK_IS_ADULT) {
Item_Give(play, ITEM_SWORD_MASTER);
@@ -135,7 +135,7 @@ void func_808BAF40(BgTokiSwd* this, PlayState* play) {
} else {
Player* player = GET_PLAYER(play);
if (Actor_IsFacingPlayer(&this->actor, 0x2000) &&
- (!gSaveContext.n64ddFlag || (gSaveContext.n64ddFlag && player->getItemId == GI_NONE))) {
+ (!IS_RANDO || (IS_RANDO && player->getItemId == GI_NONE))) {
func_8002F580(&this->actor, play);
}
}
diff --git a/soh/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth.c b/soh/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth.c
index a7f4905e7..75e920b29 100644
--- a/soh/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth.c
+++ b/soh/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth.c
@@ -75,7 +75,7 @@ void BgTreemouth_Init(Actor* thisx, PlayState* play) {
BgTreemouth_SetupAction(this, func_808BC8B8);
// If dungeon entrance randomizer is on, keep the tree mouth open
// when Link is adult and sword & shield have been shown to Mido
- } else if ((LINK_IS_ADULT && (!gSaveContext.n64ddFlag ||
+ } else if ((LINK_IS_ADULT && (!IS_RANDO ||
Randomizer_GetSettingValue(RSK_SHUFFLE_DUNGEON_ENTRANCES) == RO_DUNGEON_ENTRANCE_SHUFFLE_OFF) ||
!Flags_GetEventChkInf(EVENTCHKINF_SHOWED_MIDO_SWORD_SHIELD)) || (gSaveContext.sceneSetupIndex == 7)) {
this->unk_168 = 0.0f;
diff --git a/soh/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.c b/soh/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.c
index 4a015a4f8..e90e36e80 100644
--- a/soh/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.c
+++ b/soh/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.c
@@ -1165,8 +1165,7 @@ void BossDodongo_Draw(Actor* thisx, PlayState* play) {
Matrix_RotateZ(this->unk_23C, MTXMODE_APPLY);
Matrix_RotateX((this->unk_1C4 / 32768.0f) * 3.14159f, MTXMODE_APPLY);
- SkelAnime_DrawOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, BossDodongo_OverrideLimbDraw,
- BossDodongo_PostLimbDraw, this);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, BossDodongo_OverrideLimbDraw, BossDodongo_PostLimbDraw, this);
POLY_OPA_DISP = Play_SetFog(play, POLY_OPA_DISP);
@@ -1632,7 +1631,7 @@ void BossDodongo_DeathCutscene(BossDodongo* this, PlayState* play) {
if (this->unk_1DA == 820) {
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_BOSS_CLEAR);
- if (!gSaveContext.isBossRush) {
+ if (!IS_BOSS_RUSH) {
Actor_Spawn(
&play->actorCtx, play, ACTOR_ITEM_B_HEART,
Math_SinS(this->actor.shape.rot.y) * -50.0f + this->actor.world.pos.x, this->actor.world.pos.y,
@@ -1651,7 +1650,7 @@ void BossDodongo_DeathCutscene(BossDodongo* this, PlayState* play) {
Play_ChangeCameraStatus(play, MAIN_CAM, CAM_STAT_ACTIVE);
func_80064534(play, &play->csCtx);
func_8002DF54(play, &this->actor, 7);
- if (!gSaveContext.isBossRush) {
+ if (!IS_BOSS_RUSH) {
Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_DOOR_WARP1, -890.0f, -1523.76f, -3304.0f, 0, 0, 0, WARP_DUNGEON_CHILD);
} else {
Actor_Spawn(&play->actorCtx, play, ACTOR_DOOR_WARP1, -890.0f, -1523.76f, -3304.0f, 0, 0, 0, WARP_DUNGEON_ADULT, false);
diff --git a/soh/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c b/soh/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c
index e56858317..e74f3c0e4 100644
--- a/soh/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c
+++ b/soh/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c
@@ -913,7 +913,7 @@ void BossFd_Fly(BossFd* this, PlayState* play) {
this->actionFunc = BossFd_Wait;
this->actor.world.pos.y -= 1000.0f;
}
- if (this->timers[0] == 7 && !gSaveContext.isBossRush) {
+ if (this->timers[0] == 7 && !IS_BOSS_RUSH) {
Actor_Spawn(&play->actorCtx, play, ACTOR_ITEM_B_HEART, this->actor.world.pos.x,
this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, 0, true);
}
@@ -1857,7 +1857,7 @@ void BossFd_DrawBody(PlayState* play, BossFd* this) {
Matrix_RotateX(-this->bodySegsRot[segIndex].x, MTXMODE_APPLY);
Matrix_Translate(-13.0f, -5.0f, 13.0f, MTXMODE_APPLY);
Matrix_Scale(this->actor.scale.x * 0.1f, this->actor.scale.y * 0.1f, this->actor.scale.z * 0.1f, MTXMODE_APPLY);
- SkelAnime_DrawOpa(play, this->skelAnimeRightArm.skeleton, this->skelAnimeRightArm.jointTable,
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnimeRightArm,
BossFd_OverrideRightArmDraw, NULL, this);
Matrix_Pop();
osSyncPrintf("RH\n");
@@ -1869,7 +1869,7 @@ void BossFd_DrawBody(PlayState* play, BossFd* this) {
Matrix_RotateX(-this->bodySegsRot[segIndex].x, MTXMODE_APPLY);
Matrix_Translate(13.0f, -5.0f, 13.0f, MTXMODE_APPLY);
Matrix_Scale(this->actor.scale.x * 0.1f, this->actor.scale.y * 0.1f, this->actor.scale.z * 0.1f, MTXMODE_APPLY);
- SkelAnime_DrawOpa(play, this->skelAnimeLeftArm.skeleton, this->skelAnimeLeftArm.jointTable,
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnimeLeftArm,
BossFd_OverrideLeftArmDraw, NULL, this);
Matrix_Pop();
osSyncPrintf("BD\n");
@@ -1966,7 +1966,7 @@ void BossFd_DrawBody(PlayState* play, BossFd* this) {
Matrix_Pop();
osSyncPrintf("BHCE\n");
Matrix_Scale(this->actor.scale.x * 0.1f, this->actor.scale.y * 0.1f, this->actor.scale.z * 0.1f, MTXMODE_APPLY);
- SkelAnime_DrawOpa(play, this->skelAnimeHead.skeleton, this->skelAnimeHead.jointTable, BossFd_OverrideHeadDraw,
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnimeHead, BossFd_OverrideHeadDraw,
BossFd_PostHeadDraw, &this->actor);
osSyncPrintf("SK\n");
{
diff --git a/soh/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c b/soh/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c
index b001f09e8..fb14c5ebe 100644
--- a/soh/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c
+++ b/soh/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c
@@ -789,7 +789,7 @@ void BossFd2_Death(BossFd2* this, PlayState* play) {
this->deathCamera = 0;
func_80064534(play, &play->csCtx);
func_8002DF54(play, &this->actor, 7);
- if (!gSaveContext.isBossRush) {
+ if (!IS_BOSS_RUSH) {
Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_DOOR_WARP1, 0.0f, 100.0f, 0.0f, 0, 0,
0, WARP_DUNGEON_ADULT);
} else {
@@ -1226,8 +1226,7 @@ void BossFd2_Draw(Actor* thisx, PlayState* play) {
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 255, 255);
gDPSetEnvColor(POLY_OPA_DISP++, 255, 255, 255, 128);
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable,
- this->skelAnime.dListCount, BossFd2_OverrideLimbDraw, BossFd2_PostLimbDraw, &this->actor);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, BossFd2_OverrideLimbDraw, BossFd2_PostLimbDraw, &this->actor);
BossFd2_DrawMane(this, play);
POLY_OPA_DISP = Play_SetFog(play, POLY_OPA_DISP);
}
diff --git a/soh/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c b/soh/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c
index 5601823ab..6b8d2df5c 100644
--- a/soh/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c
+++ b/soh/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c
@@ -570,7 +570,7 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) {
Play_ChangeCameraStatus(play, this->csCamIndex, CAM_STAT_ACTIVE);
this->csCamFov = 60.0f;
- if (Flags_GetEventChkInf(EVENTCHKINF_BEGAN_GANONDORF_BATTLE) || gSaveContext.n64ddFlag || gSaveContext.isBossRush) {
+ if (Flags_GetEventChkInf(EVENTCHKINF_BEGAN_GANONDORF_BATTLE) || IS_RANDO || IS_BOSS_RUSH) {
// watched cutscene already, skip most of it
this->csState = 17;
this->csTimer = 0;
@@ -581,7 +581,7 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) {
BossGanon_SetIntroCsCamera(this, 11);
this->unk_198 = 2;
this->timers[2] = 110;
- if (!(gSaveContext.isBossRush && gSaveContext.bossRushOptions[BR_OPTIONS_HEAL] == BR_CHOICE_HEAL_NEVER)) {
+ if (!(IS_BOSS_RUSH && gSaveContext.bossRushOptions[BR_OPTIONS_HEAL] == BR_CHOICE_HEAL_NEVER)) {
gSaveContext.healthAccumulator = 0x140;
}
Audio_QueueSeqCmd(NA_BGM_STOP);
@@ -904,7 +904,7 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) {
this->csTimer = 0;
this->csCamFov = 60.0f;
BossGanon_SetIntroCsCamera(this, 12);
- if (!gSaveContext.n64ddFlag && !gSaveContext.isBossRush) {
+ if (!IS_RANDO && !IS_BOSS_RUSH) {
Message_StartTextbox(play, 0x70CB, NULL);
}
}
@@ -928,7 +928,7 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) {
this->csState = 19;
this->csTimer = 0;
- if (!gSaveContext.isBossRush) {
+ if (!IS_BOSS_RUSH) {
Message_StartTextbox(play, 0x70CC, NULL);
}
Animation_MorphToPlayOnce(&this->skelAnime, &gGanondorfRaiseHandStartAnim, -5.0f);
@@ -972,7 +972,7 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) {
if ((this->csTimer > 80) && (Message_GetState(&play->msgCtx) == TEXT_STATE_NONE)) {
// In rando, skip past dark waves section straight to title card phase of the cutscene.
- if (gSaveContext.n64ddFlag || gSaveContext.isBossRush) {
+ if (IS_RANDO || IS_BOSS_RUSH) {
this->timers[2] = 30;
this->csCamAt.x = this->unk_1FC.x - 10.0f;
this->csCamAt.y = this->unk_1FC.y + 30.0f;
@@ -1282,7 +1282,7 @@ void BossGanon_DeathAndTowerCutscene(BossGanon* this, PlayState* play) {
// Skip Ganondorf dying and go straight to next scene.
// The cutscene skip met a mixed reaction, so until we figure out a better way of doing it,
// it will stay not-skipped outside of Boss Rush (originally implemented for randomizer).
- if (!gSaveContext.isBossRush) {
+ if (!IS_BOSS_RUSH) {
this->csState = 1;
this->csTimer = 0;
} else {
@@ -1539,7 +1539,7 @@ void BossGanon_DeathAndTowerCutscene(BossGanon* this, PlayState* play) {
if (this->csTimer == 180) {
play->sceneLoadFlag = 0x14;
- if ((gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SKIP_TOWER_ESCAPE) || gSaveContext.isBossRush)) {
+ if ((IS_RANDO && Randomizer_GetSettingValue(RSK_SKIP_TOWER_ESCAPE) || IS_BOSS_RUSH)) {
Flags_SetEventChkInf(EVENTCHKINF_WATCHED_GANONS_CASTLE_COLLAPSE_CAUGHT_BY_GERUDO);
play->nextEntranceIndex = 0x517;
}
@@ -1562,7 +1562,7 @@ void BossGanon_DeathAndTowerCutscene(BossGanon* this, PlayState* play) {
sBossGanonZelda = (EnZl3*)Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_EN_ZL3, 0.0f,
6000.0f, 0.0f, 0, 0, 0, 0x2000);
- if (!gSaveContext.n64ddFlag && !gSaveContext.isBossRush) {
+ if (!IS_RANDO && !IS_BOSS_RUSH) {
this->csState = 101;
} else {
this->skelAnime.playSpeed = 1.0f;
@@ -1690,7 +1690,7 @@ void BossGanon_DeathAndTowerCutscene(BossGanon* this, PlayState* play) {
// fallthrough
case 104:
// In rando, fade out the white here as the earlier part is skipped.
- if (gSaveContext.n64ddFlag || gSaveContext.isBossRush) {
+ if (IS_RANDO || IS_BOSS_RUSH) {
Math_ApproachZeroF(&this->whiteFillAlpha, 1.0f, 10.0f);
}
@@ -1712,7 +1712,7 @@ void BossGanon_DeathAndTowerCutscene(BossGanon* this, PlayState* play) {
if (this->csTimer == 50) {
// In rando, skip the rest of the cutscene after the crystal around Zelda dissapears.
- if (!gSaveContext.n64ddFlag && !gSaveContext.isBossRush) {
+ if (!IS_RANDO && !IS_BOSS_RUSH) {
sBossGanonZelda->unk_3C8 = 4;
} else {
this->csState = 108;
@@ -3891,8 +3891,7 @@ void BossGanon_Draw(Actor* thisx, PlayState* play) {
gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(gGanondorfNormalEyeTex));
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
- BossGanon_OverrideLimbDraw, BossGanon_PostLimbDraw, &this->actor);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, BossGanon_OverrideLimbDraw, BossGanon_PostLimbDraw, &this->actor);
this->unk_2EC[0].x = this->unk_2EC[1].x;
this->unk_2EC[0].y = this->unk_2EC[1].y + 30.0f;
diff --git a/soh/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c b/soh/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c
index f29d5beb9..13cc46e38 100644
--- a/soh/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c
+++ b/soh/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c
@@ -234,7 +234,7 @@ void func_808FD5F4(BossGanon2* this, PlayState* play) {
sBossGanon2Zelda->actor.shape.rot.y = -0x7000;
// In rando, skip past the cutscene to the part where the player takes control again.
- if (!gSaveContext.n64ddFlag && !gSaveContext.isBossRush) {
+ if (!IS_RANDO && !IS_BOSS_RUSH) {
this->csState = 1;
this->csTimer = 0;
} else {
@@ -2819,8 +2819,7 @@ void BossGanon2_Draw(Actor* thisx, PlayState* play) {
BossGanon2_SetObjectSegment(this, play, OBJECT_GANON, true);
gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(gGanondorfEmptyEyeTex));
gSPSegment(POLY_XLU_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(gGanondorfEmptyEyeTex));
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable,
- this->skelAnime.dListCount, NULL, BossGanon2_PostLimbDraw2, this);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, NULL, BossGanon2_PostLimbDraw2, this);
break;
case 1:
case 2:
@@ -2837,9 +2836,7 @@ void BossGanon2_Draw(Actor* thisx, PlayState* play) {
Matrix_Translate(0.0f, 4000.0f, -4000.0f, MTXMODE_APPLY);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable,
- this->skelAnime.dListCount, BossGanon2_OverrideLimbDraw, BossGanon2_PostLimbDraw,
- this);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, BossGanon2_OverrideLimbDraw, BossGanon2_PostLimbDraw, this);
POLY_OPA_DISP = Play_SetFog(play, POLY_OPA_DISP);
BossGanon2_GenShadowTexture(shadowTexture, this, play);
BossGanon2_DrawShadowTexture(shadowTexture, this, play);
diff --git a/soh/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c b/soh/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c
index aac63ed8c..111380f0b 100644
--- a/soh/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c
+++ b/soh/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c
@@ -959,12 +959,12 @@ void BossGanondrof_Death(BossGanondrof* this, PlayState* play) {
case DEATH_THROES:
switch (this->work[GND_ACTION_STATE]) {
case DEATH_SPASM:
- if (Animation_OnFrame(&this->skelAnime, this->fwork[GND_END_FRAME]) && !gSaveContext.n64ddFlag && !gSaveContext.isBossRush) {
+ if (Animation_OnFrame(&this->skelAnime, this->fwork[GND_END_FRAME]) && !IS_RANDO && !IS_BOSS_RUSH) {
this->fwork[GND_END_FRAME] = Animation_GetLastFrame(&gPhantomGanonAirDamageAnim);
Animation_Change(&this->skelAnime, &gPhantomGanonAirDamageAnim, 0.5f, 0.0f,
this->fwork[GND_END_FRAME], ANIMMODE_ONCE_INTERP, 0.0f);
this->work[GND_ACTION_STATE] = DEATH_LIMP;
- } else if (gSaveContext.n64ddFlag || gSaveContext.isBossRush) {
+ } else if (IS_RANDO || IS_BOSS_RUSH) {
// Skip to death scream animation and move ganondrof to middle
this->deathState = DEATH_SCREAM;
this->timers[0] = 50;
@@ -991,7 +991,7 @@ void BossGanondrof_Death(BossGanondrof* this, PlayState* play) {
bodyDecayLevel = 1;
break;
}
- if (gSaveContext.n64ddFlag || gSaveContext.isBossRush) {
+ if (IS_RANDO || IS_BOSS_RUSH) {
break;
}
Math_ApproachS(&this->actor.shape.rot.y, this->work[GND_VARIANCE_TIMER] * -100, 5, 0xBB8);
@@ -1105,7 +1105,7 @@ void BossGanondrof_Death(BossGanondrof* this, PlayState* play) {
this->deathCamera = 0;
func_80064534(play, &play->csCtx);
func_8002DF54(play, &this->actor, 7);
- if (!gSaveContext.isBossRush) {
+ if (!IS_BOSS_RUSH) {
Actor_Spawn(&play->actorCtx, play, ACTOR_ITEM_B_HEART, GND_BOSSROOM_CENTER_X, GND_BOSSROOM_CENTER_Y,
GND_BOSSROOM_CENTER_Z + 200.0f, 0, 0, 0, 0, true);
}
@@ -1511,7 +1511,8 @@ void BossGanondrof_Draw(Actor* thisx, PlayState* play) {
gSPSegment(POLY_OPA_DISP++, 0x08, BossGanondrof_GetNullDList(play->state.gfxCtx));
}
- SkelAnime_DrawOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, BossGanondrof_OverrideLimbDraw,
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime,
+ BossGanondrof_OverrideLimbDraw,
BossGanondrof_PostLimbDraw, this);
osSyncPrintf("DRAW 22\n");
POLY_OPA_DISP = Play_SetFog(play, POLY_OPA_DISP);
diff --git a/soh/src/overlays/actors/ovl_Boss_Goma/z_boss_goma.c b/soh/src/overlays/actors/ovl_Boss_Goma/z_boss_goma.c
index 72623af22..6de72fd2d 100644
--- a/soh/src/overlays/actors/ovl_Boss_Goma/z_boss_goma.c
+++ b/soh/src/overlays/actors/ovl_Boss_Goma/z_boss_goma.c
@@ -1118,7 +1118,7 @@ void BossGoma_Defeated(BossGoma* this, PlayState* play) {
this->timer = 70;
this->decayingProgress = 0;
this->subCameraFollowSpeed = 0.0f;
- if (!gSaveContext.isBossRush) {
+ if (!IS_BOSS_RUSH) {
Actor_Spawn(&play->actorCtx, play, ACTOR_ITEM_B_HEART, this->actor.world.pos.x,
this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, 0, true);
}
@@ -1152,7 +1152,7 @@ void BossGoma_Defeated(BossGoma* this, PlayState* play) {
}
}
- if (!gSaveContext.isBossRush) {
+ if (!IS_BOSS_RUSH) {
Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_DOOR_WARP1, childPos.x,
this->actor.world.pos.y, childPos.z, 0, 0, 0, WARP_DUNGEON_CHILD);
} else {
@@ -2148,7 +2148,8 @@ void BossGoma_Draw(Actor* thisx, PlayState* play) {
gSPSegment(POLY_OPA_DISP++, 0x08, BossGoma_EmptyDlist(play->state.gfxCtx));
}
- SkelAnime_DrawOpa(play, this->skelanime.skeleton, this->skelanime.jointTable, BossGoma_OverrideLimbDraw,
+ SkelAnime_DrawSkeletonOpa(play, &this->skelanime,
+ BossGoma_OverrideLimbDraw,
BossGoma_PostLimbDraw, this);
CLOSE_DISPS(play->state.gfxCtx);
diff --git a/soh/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c b/soh/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c
index a6bb6e8ae..a8d992ca9 100644
--- a/soh/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c
+++ b/soh/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c
@@ -1116,7 +1116,7 @@ void BossMo_Tentacle(BossMo* this, PlayState* play) {
BossMo_SpawnDroplet(MO_FX_DROPLET, (BossMoEffect*)play->specialEffects, &spD4, &spE0,
((300 - indS1) * .0015f) + 0.13f);
}
- if (!gSaveContext.isBossRush) {
+ if (!IS_BOSS_RUSH) {
Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_DOOR_WARP1,
this->actor.world.pos.x, -280.0f, this->actor.world.pos.z, 0, 0, 0,
WARP_DUNGEON_ADULT);
diff --git a/soh/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c b/soh/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c
index 48f47047f..f7a48f873 100644
--- a/soh/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c
+++ b/soh/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c
@@ -1204,7 +1204,7 @@ void BossSst_HeadFinish(BossSst* this, PlayState* play) {
} else if (this->effects[0].alpha == 0) {
Actor_Spawn(&play->actorCtx, play, ACTOR_DOOR_WARP1, ROOM_CENTER_X, ROOM_CENTER_Y, ROOM_CENTER_Z, 0, 0, 0,
WARP_DUNGEON_ADULT, true);
- if (!gSaveContext.isBossRush) {
+ if (!IS_BOSS_RUSH) {
Actor_Spawn(&play->actorCtx, play, ACTOR_ITEM_B_HEART,
(Math_SinS(this->actor.shape.rot.y) * 200.0f) + ROOM_CENTER_X, ROOM_CENTER_Y,
Math_CosS(this->actor.shape.rot.y) * 200.0f + ROOM_CENTER_Z, 0, 0, 0, 0, true);
@@ -2737,8 +2737,7 @@ void BossSst_DrawHand(Actor* thisx, PlayState* play) {
gSPSegment(POLY_OPA_DISP++, 0x08, sBodyStaticDList);
}
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
- BossSst_OverrideHandDraw, BossSst_PostHandDraw, this);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, BossSst_OverrideHandDraw, BossSst_PostHandDraw, this);
if (this->trailCount >= 2) {
BossSstHandTrail* trail;
BossSstHandTrail* trail2;
diff --git a/soh/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c b/soh/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c
index 0719e143a..5360eef02 100644
--- a/soh/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c
+++ b/soh/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c
@@ -2365,7 +2365,7 @@ void BossTw_DeathCSMsgSfx(BossTw* this, PlayState* play) {
sp35 = 0;
// Skip ahead to last part of the cutscene in rando
- if (this->work[CS_TIMER_2] == 10 && (gSaveContext.n64ddFlag || gSaveContext.isBossRush)) {
+ if (this->work[CS_TIMER_2] == 10 && (IS_RANDO || IS_BOSS_RUSH)) {
this->work[CS_TIMER_2] = 860;
}
@@ -2550,7 +2550,7 @@ void BossTw_DeathCSMsgSfx(BossTw* this, PlayState* play) {
// Add separate timings for the "beam" that opens and closes around the sisters
// Needed because we skip ahead in cutscene timer value so it never gets called otherwise
- if (gSaveContext.n64ddFlag || gSaveContext.isBossRush) {
+ if (IS_RANDO || IS_BOSS_RUSH) {
if (this->work[CS_TIMER_2] < 900) {
Math_ApproachF(&this->workf[UNK_F18], 255.0f, 0.1f, 5.0f);
} else if (this->work[CS_TIMER_2] > 910) {
@@ -2795,7 +2795,7 @@ void BossTw_TwinrovaDeathCS(BossTw* this, PlayState* play) {
func_80064534(play, &play->csCtx);
func_8002DF54(play, &this->actor, 7);
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_BOSS_CLEAR);
- if (!gSaveContext.isBossRush) {
+ if (!IS_BOSS_RUSH) {
Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_DOOR_WARP1, 600.0f, 230.0f, 0.0f, 0,
0, 0, WARP_DUNGEON_ADULT);
Actor_Spawn(&play->actorCtx, play, ACTOR_ITEM_B_HEART, -600.0f, 230.f, 0.0f, 0, 0, 0, 0, true);
@@ -3510,8 +3510,7 @@ void BossTw_Draw(Actor* thisx, PlayState* play2) {
}
Matrix_Push();
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable,
- this->skelAnime.dListCount, BossTw_OverrideLimbDraw, BossTw_PostLimbDraw, this);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, BossTw_OverrideLimbDraw, BossTw_PostLimbDraw, this);
Matrix_Pop();
POLY_OPA_DISP = Play_SetFog(play, POLY_OPA_DISP);
}
@@ -3866,9 +3865,7 @@ void BossTw_TwinrovaDraw(Actor* thisx, PlayState* play2) {
(u32)this->fogB, 0, this->fogNear, this->fogFar);
Matrix_Push();
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable,
- this->skelAnime.dListCount, BossTw_TwinrovaOverrideLimbDraw, BossTw_TwinrovaPostLimbDraw,
- thisx);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, BossTw_TwinrovaOverrideLimbDraw, BossTw_TwinrovaPostLimbDraw, thisx);
Matrix_Pop();
Matrix_MultVec3f(&D_8094A9EC, &this->beamOrigin);
diff --git a/soh/src/overlays/actors/ovl_Boss_Va/z_boss_va.c b/soh/src/overlays/actors/ovl_Boss_Va/z_boss_va.c
index 005759565..ee62b141e 100644
--- a/soh/src/overlays/actors/ovl_Boss_Va/z_boss_va.c
+++ b/soh/src/overlays/actors/ovl_Boss_Va/z_boss_va.c
@@ -1653,7 +1653,7 @@ void BossVa_BodyDeath(BossVa* this, PlayState* play) {
func_8002DF54(play, &this->actor, 7);
sCsState++;
- if (!gSaveContext.isBossRush) {
+ if (!IS_BOSS_RUSH) {
Actor_Spawn(&play->actorCtx, play, ACTOR_ITEM_B_HEART, this->actor.world.pos.x,
this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, 0, true);
}
@@ -1665,7 +1665,7 @@ void BossVa_BodyDeath(BossVa* this, PlayState* play) {
}
}
- if (!gSaveContext.isBossRush) {
+ if (!IS_BOSS_RUSH) {
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_RU1, sWarpPos[sp7C].x, sWarpPos[sp7C].y,
sWarpPos[sp7C].z, 0, 0, 0, 0, true);
} else {
@@ -3231,7 +3231,7 @@ void BossVa_Draw(Actor* thisx, PlayState* play) {
gSPSegment(POLY_OPA_DISP++, 0x09,
Gfx_TwoTexScroll(play->state.gfxCtx, 0, 0, (play->gameplayFrames * -10) % 32, 16,
0x20, 1, 0, (play->gameplayFrames * -5) % 32, 16, 32));
- SkelAnime_DrawOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable,
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime,
BossVa_BodyOverrideLimbDraw, BossVa_BodyPostLimbDraw, this);
}
break;
@@ -3239,8 +3239,7 @@ void BossVa_Draw(Actor* thisx, PlayState* play) {
case BOSSVA_SUPPORT_2:
case BOSSVA_SUPPORT_3:
if (!this->isDead) {
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable,
- this->skelAnime.dListCount, BossVa_SupportOverrideLimbDraw,
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, BossVa_SupportOverrideLimbDraw,
BossVa_SupportPostLimbDraw, this);
}
break;
@@ -3248,20 +3247,18 @@ void BossVa_Draw(Actor* thisx, PlayState* play) {
case BOSSVA_ZAPPER_2:
case BOSSVA_ZAPPER_3:
if (!this->isDead) {
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable,
- this->skelAnime.dListCount, BossVa_ZapperOverrideLimbDraw,
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, BossVa_ZapperOverrideLimbDraw,
BossVa_ZapperPostLimbDraw, this);
}
break;
case BOSSVA_STUMP_1:
case BOSSVA_STUMP_2:
case BOSSVA_STUMP_3:
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable,
- this->skelAnime.dListCount, NULL, NULL, NULL);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, NULL, NULL, NULL);
break;
default:
if (!this->isDead) {
- SkelAnime_DrawOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable,
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime,
BossVa_BariOverrideLimbDraw, BossVa_BariPostLimbDraw, this);
Collider_UpdateSpheres(0, &this->colliderSph);
if (sCsState < BOSSVA_BATTLE) {
diff --git a/soh/src/overlays/actors/ovl_Demo_Du/z_demo_du.c b/soh/src/overlays/actors/ovl_Demo_Du/z_demo_du.c
index 18f85675a..1c2f4c16b 100644
--- a/soh/src/overlays/actors/ovl_Demo_Du/z_demo_du.c
+++ b/soh/src/overlays/actors/ovl_Demo_Du/z_demo_du.c
@@ -1012,8 +1012,7 @@ void DemoDu_Draw_01(Actor* thisx, PlayState* play2) {
gSPSegment(POLY_OPA_DISP++, 0x0C, &D_80116280[2]);
- SkelAnime_DrawFlexOpa(play, skelAnime->skeleton, skelAnime->jointTable, skelAnime->dListCount, NULL, NULL,
- this);
+ SkelAnime_DrawSkeletonOpa(play, skelAnime, NULL, NULL, this);
CLOSE_DISPS(play->state.gfxCtx);
}
diff --git a/soh/src/overlays/actors/ovl_Demo_Effect/z_demo_effect.c b/soh/src/overlays/actors/ovl_Demo_Effect/z_demo_effect.c
index 28224864c..7125984e2 100644
--- a/soh/src/overlays/actors/ovl_Demo_Effect/z_demo_effect.c
+++ b/soh/src/overlays/actors/ovl_Demo_Effect/z_demo_effect.c
@@ -142,7 +142,7 @@ f32 DemoEffect_InterpolateCsFrames(PlayState* play, s32 csActionId) {
*/
void DemoEffect_InitJewel(PlayState* play, DemoEffect* this) {
this->initDrawFunc = DemoEffect_DrawJewel;
- if (gSaveContext.n64ddFlag && play->sceneNum == SCENE_JABU_JABU) {
+ if (IS_RANDO && play->sceneNum == SCENE_JABU_JABU) {
this->initDrawFunc = DemoEffect_DrawGetItem;
}
if (!LINK_IS_ADULT) {
@@ -156,7 +156,7 @@ void DemoEffect_InitJewel(PlayState* play, DemoEffect* this) {
Actor_SetScale(&this->actor, 0.10f);
}
this->csActionId = 1;
- this->actor.shape.rot.x = (gSaveContext.n64ddFlag && play->sceneNum == SCENE_JABU_JABU) ? 0 : 16384;
+ this->actor.shape.rot.x = (IS_RANDO && play->sceneNum == SCENE_JABU_JABU) ? 0 : 16384;
DemoEffect_InitJewelColor(this);
this->jewel.alpha = 0;
this->jewelCsRotation.x = this->jewelCsRotation.y = this->jewelCsRotation.z = 0;
@@ -635,7 +635,7 @@ void DemoEffect_UpdateGetItem(DemoEffect* this, PlayState* play) {
Actor_SetScale(thisx, 0.20f);
- if (gSaveContext.entranceIndex == 0x0053 || (gSaveContext.n64ddFlag && gSaveContext.entranceIndex == 0x05F4)) {
+ if (gSaveContext.entranceIndex == 0x0053 || (IS_RANDO && gSaveContext.entranceIndex == 0x05F4)) {
switch (play->csCtx.npcActions[this->csActionId]->action) {
case 2:
DemoEffect_MedalSparkle(this, play, 0);
@@ -648,7 +648,7 @@ void DemoEffect_UpdateGetItem(DemoEffect* this, PlayState* play) {
switch (play->csCtx.npcActions[this->csActionId]->action) {
case 2:
if (gSaveContext.entranceIndex == 0x0053 ||
- (gSaveContext.n64ddFlag && gSaveContext.entranceIndex == 0x05F4)) {
+ (IS_RANDO && gSaveContext.entranceIndex == 0x05F4)) {
Audio_PlayActorSound2(thisx, NA_SE_EV_MEDAL_APPEAR_L - SFX_FLAG);
} else {
func_800788CC(NA_SE_EV_MEDAL_APPEAR_S - SFX_FLAG);
@@ -664,7 +664,7 @@ void DemoEffect_UpdateGetItem(DemoEffect* this, PlayState* play) {
this->actor.shape.rot.y += this->getItem.rotation;
}
if (gSaveContext.entranceIndex == 0x0053 ||
- (gSaveContext.n64ddFlag && gSaveContext.entranceIndex == 0x05F4)) {
+ (IS_RANDO && gSaveContext.entranceIndex == 0x05F4)) {
Audio_PlayActorSound2(thisx, NA_SE_EV_MEDAL_APPEAR_L - SFX_FLAG);
} else {
func_800788CC(NA_SE_EV_MEDAL_APPEAR_S - SFX_FLAG);
@@ -1545,7 +1545,7 @@ void DemoEffect_UpdateJewelAdult(DemoEffect* this, PlayState* play) {
this->actor.shape.rot.y += 0x0400;
DemoEffect_PlayJewelSfx(this, play);
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
switch (this->jewel.type) {
case DEMO_EFFECT_JEWEL_KOKIRI:
if (CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD)) {
@@ -1615,14 +1615,14 @@ void DemoEffect_UpdateJewelChild(DemoEffect* this, PlayState* play) {
default:
DemoEffect_MoveToCsEndpoint(this, play, this->csActionId, 0);
if (gSaveContext.entranceIndex == 0x0053 ||
- (gSaveContext.n64ddFlag && gSaveContext.entranceIndex == 0x05F4)) {
+ (IS_RANDO && gSaveContext.entranceIndex == 0x05F4)) {
DemoEffect_MoveJewelSplit(&thisx->world, this);
}
break;
}
}
- if (gSaveContext.entranceIndex == 0x0053 || (gSaveContext.n64ddFlag && gSaveContext.entranceIndex == 0x05F4)) {
+ if (gSaveContext.entranceIndex == 0x0053 || (IS_RANDO && gSaveContext.entranceIndex == 0x05F4)) {
if (!Flags_GetEventChkInf(EVENTCHKINF_OPENED_THE_DOOR_OF_TIME)) {
hasCmdAction = play->csCtx.state && play->csCtx.npcActions[this->csActionId];
if (!hasCmdAction) {
@@ -1636,7 +1636,7 @@ void DemoEffect_UpdateJewelChild(DemoEffect* this, PlayState* play) {
DemoEffect_PlayJewelSfx(this, play);
this->effectFlags &= ~1;
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
switch (this->jewel.type) {
case DEMO_EFFECT_JEWEL_KOKIRI:
if (CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD)) {
@@ -2087,7 +2087,7 @@ void DemoEffect_DrawGetItem(Actor* thisx, PlayState* play) {
this->getItem.isLoaded = 1;
return;
}
- if (gSaveContext.n64ddFlag && play->sceneNum == SCENE_JABU_JABU) {
+ if (IS_RANDO && play->sceneNum == SCENE_JABU_JABU) {
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_BARINADE, RG_ZORA_SAPPHIRE);
this->getItem.drawId = getItemEntry.gid;
func_8002EBCC(thisx, play, 0);
diff --git a/soh/src/overlays/actors/ovl_Demo_Go/z_demo_go.c b/soh/src/overlays/actors/ovl_Demo_Go/z_demo_go.c
index db665b7f8..8c7c981a4 100644
--- a/soh/src/overlays/actors/ovl_Demo_Go/z_demo_go.c
+++ b/soh/src/overlays/actors/ovl_Demo_Go/z_demo_go.c
@@ -337,8 +337,7 @@ void func_8097D29C(DemoGo* this, PlayState* play) {
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(eyeTexture));
gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(mouthTexture));
- SkelAnime_DrawFlexOpa(play, skelAnime->skeleton, skelAnime->jointTable, skelAnime->dListCount, NULL, NULL,
- this);
+ SkelAnime_DrawSkeletonOpa(play, skelAnime, NULL, NULL, this);
CLOSE_DISPS(play->state.gfxCtx);
}
diff --git a/soh/src/overlays/actors/ovl_Demo_Ik/z_demo_ik.c b/soh/src/overlays/actors/ovl_Demo_Ik/z_demo_ik.c
index c6f4cd34f..07219945a 100644
--- a/soh/src/overlays/actors/ovl_Demo_Ik/z_demo_ik.c
+++ b/soh/src/overlays/actors/ovl_Demo_Ik/z_demo_ik.c
@@ -292,7 +292,7 @@ void DemoIk_Type1Draw(DemoIk* this, PlayState* play) {
gSPSegment(POLY_OPA_DISP++, 0x08, DemoIk_SetColors(gfxCtx, 245, 225, 155, 30, 30, 0));
gSPSegment(POLY_OPA_DISP++, 0x09, DemoIk_SetColors(gfxCtx, 255, 40, 0, 40, 0, 0));
gSPSegment(POLY_OPA_DISP++, 0x0A, DemoIk_SetColors(gfxCtx, 255, 255, 255, 20, 40, 30));
- SkelAnime_DrawOpa(play, skelAnime->skeleton, skelAnime->jointTable, NULL, DemoIk_Type1PostLimbDraw, this);
+ SkelAnime_DrawSkeletonOpa(play, skelAnime, NULL, DemoIk_Type1PostLimbDraw, this);
CLOSE_DISPS(gfxCtx);
}
@@ -460,8 +460,7 @@ void DemoIk_Type2Draw(DemoIk* this, PlayState* play) {
gSPSegment(POLY_OPA_DISP++, 0x08, DemoIk_SetColors(gfxCtx, 245, 225, 155, 30, 30, 0));
gSPSegment(POLY_OPA_DISP++, 0x09, DemoIk_SetColors(gfxCtx, 255, 40, 0, 40, 0, 0));
gSPSegment(POLY_OPA_DISP++, 0x0A, DemoIk_SetColors(gfxCtx, 255, 255, 255, 20, 40, 30));
- SkelAnime_DrawFlexOpa(play, skelAnime->skeleton, skelAnime->jointTable, skelAnime->dListCount,
- DemoIk_Type2OverrideLimbDraw, DemoIk_Type2PostLimbDraw, this);
+ SkelAnime_DrawSkeletonOpa(play, skelAnime, DemoIk_Type2OverrideLimbDraw, DemoIk_Type2PostLimbDraw, this);
CLOSE_DISPS(gfxCtx);
}
diff --git a/soh/src/overlays/actors/ovl_Demo_Im/z_demo_im.c b/soh/src/overlays/actors/ovl_Demo_Im/z_demo_im.c
index d55cfe45f..c72fdc4fd 100644
--- a/soh/src/overlays/actors/ovl_Demo_Im/z_demo_im.c
+++ b/soh/src/overlays/actors/ovl_Demo_Im/z_demo_im.c
@@ -868,7 +868,7 @@ void func_80986B2C(PlayState* play) {
Player* player = GET_PLAYER(play);
// In entrance rando have impa bring link back to the front of castle grounds
- if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_OVERWORLD_ENTRANCES)) {
+ if (IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_OVERWORLD_ENTRANCES)) {
play->nextEntranceIndex = 0x0138;
} else {
play->nextEntranceIndex = 0xCD;
@@ -928,7 +928,7 @@ void GivePlayerRandoRewardImpa(Actor* impa, PlayState* play, RandomizerCheck che
void func_80986C30(DemoIm* this, PlayState* play) {
if (func_80986A5C(this, play)) {
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
GivePlayerRandoRewardImpa(this, play, RC_SONG_FROM_IMPA);
} else {
play->csCtx.segment = SEGMENTED_TO_VIRTUAL(gZeldasCourtyardLullabyCs);
@@ -960,7 +960,7 @@ void func_80986D40(DemoIm* this, PlayState* play) {
if (gSaveContext.sceneSetupIndex == 6) {
this->action = 19;
this->drawConfig = 1;
- } else if ((Flags_GetEventChkInf(EVENTCHKINF_ZELDA_FLED_HYRULE_CASTLE)) && !gSaveContext.n64ddFlag) {
+ } else if ((Flags_GetEventChkInf(EVENTCHKINF_ZELDA_FLED_HYRULE_CASTLE)) && !IS_RANDO) {
Actor_Kill(&this->actor);
} else if (!Flags_GetEventChkInf(EVENTCHKINF_LEARNED_ZELDAS_LULLABY)) {
this->action = 23;
@@ -1231,8 +1231,7 @@ void DemoIm_DrawSolid(DemoIm* this, PlayState* play) {
gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, 255);
gSPSegment(POLY_OPA_DISP++, 0x0C, &D_80116280[2]);
- SkelAnime_DrawFlexOpa(play, skelAnime->skeleton, skelAnime->jointTable, skelAnime->dListCount,
- DemoIm_OverrideLimbDraw, DemoIm_PostLimbDraw, this);
+ SkelAnime_DrawSkeletonOpa(play, skelAnime, DemoIm_OverrideLimbDraw, DemoIm_PostLimbDraw, this);
CLOSE_DISPS(play->state.gfxCtx);
}
diff --git a/soh/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.c b/soh/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.c
index f34482503..daa843d16 100644
--- a/soh/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.c
+++ b/soh/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.c
@@ -428,7 +428,7 @@ void DemoKankyo_Update(Actor* thisx, PlayState* play) {
this->actionFunc(this, play);
// In ER, override the warp song locations. Also removes the warp song cutscene
- if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_ENTRANCES) &&
+ if (IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_ENTRANCES) &&
thisx->params == 0x000F) { // Warp Song particles
Entrance_SetWarpSongEntrance();
}
@@ -808,7 +808,7 @@ void DemoKankyo_DrawWarpSparkles(Actor* thisx, PlayState* play) {
this->unk_150[i].unk_23 = 0;
// Skip the first part of warp song cutscenes in rando
- if (gSaveContext.n64ddFlag && this->actor.params == DEMOKANKYO_WARP_OUT) {
+ if (IS_RANDO && this->actor.params == DEMOKANKYO_WARP_OUT) {
this->unk_150[i].unk_22 = 2;
} else {
this->unk_150[i].unk_22++;
diff --git a/soh/src/overlays/actors/ovl_Demo_Kekkai/z_demo_kekkai.c b/soh/src/overlays/actors/ovl_Demo_Kekkai/z_demo_kekkai.c
index 9e6c3acb7..01a2ab047 100644
--- a/soh/src/overlays/actors/ovl_Demo_Kekkai/z_demo_kekkai.c
+++ b/soh/src/overlays/actors/ovl_Demo_Kekkai/z_demo_kekkai.c
@@ -88,7 +88,7 @@ s32 DemoKekkai_CheckEventFlag(s32 params) {
if ((params < KEKKAI_TOWER) || (params > KEKKAI_FOREST)) {
return true;
}
- if (gSaveContext.n64ddFlag && params > KEKKAI_TOWER) {
+ if (IS_RANDO && params > KEKKAI_TOWER) {
return Flags_GetRandomizerInf(trialParamToRandInf(params));
}
return Flags_GetEventChkInf(eventFlags[params]);
@@ -148,7 +148,7 @@ void DemoKekkai_Init(Actor* thisx, PlayState* play) {
this->collider2.dim.height = thisx->scale.y * 5000.0f;
this->collider2.dim.yShift = 300;
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
if (TrialsDoneCount() == NUM_TRIALS) {
Actor_Kill(thisx);
return;
@@ -161,7 +161,7 @@ void DemoKekkai_Init(Actor* thisx, PlayState* play) {
case KEKKAI_SHADOW:
case KEKKAI_SPIRIT:
case KEKKAI_FOREST:
- if (gSaveContext.n64ddFlag && Flags_GetRandomizerInf(trialParamToRandInf(thisx->params))) {
+ if (IS_RANDO && Flags_GetRandomizerInf(trialParamToRandInf(thisx->params))) {
Actor_Kill(thisx);
return;
}
@@ -270,7 +270,7 @@ void DemoKekkai_TrialBarrierDispel(Actor* thisx, PlayState* play) {
s32 pad;
DemoKekkai* this = (DemoKekkai*)thisx;
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
Flags_SetRandomizerInf(trialParamToRandInf(thisx->params));
// May or may not be needed. Not sure if needed for anything
// that randoInf isn't already covering. Leaving it for safety.
diff --git a/soh/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.c b/soh/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.c
index 9449086cf..6da87ab3c 100644
--- a/soh/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.c
+++ b/soh/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.c
@@ -254,7 +254,7 @@ void func_8098E960(DemoSa* this, PlayState* play) {
if ((gSaveContext.chamberCutsceneNum == 0) && (gSaveContext.sceneSetupIndex < 4)) {
player = GET_PLAYER(play);
- if (!gSaveContext.isBossRush) {
+ if (!IS_BOSS_RUSH) {
this->action = 1;
play->csCtx.segment = D_8099010C;
gSaveContext.cutsceneTrigger = 2;
@@ -821,8 +821,7 @@ void DemoSa_DrawOpa(DemoSa* this, PlayState* play) {
gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, 255);
gSPSegment(POLY_OPA_DISP++, 0x0C, &D_80116280[2]);
- SkelAnime_DrawFlexOpa(play, skelAnime->skeleton, skelAnime->jointTable, skelAnime->dListCount,
- DemoSa_OverrideLimbDraw, NULL, &this->actor);
+ SkelAnime_DrawSkeletonOpa(play, skelAnime, DemoSa_OverrideLimbDraw, NULL, &this->actor);
CLOSE_DISPS(play->state.gfxCtx);
}
diff --git a/soh/src/overlays/actors/ovl_Door_Ana/z_door_ana.c b/soh/src/overlays/actors/ovl_Door_Ana/z_door_ana.c
index 917959e2f..d5d5f7ea1 100644
--- a/soh/src/overlays/actors/ovl_Door_Ana/z_door_ana.c
+++ b/soh/src/overlays/actors/ovl_Door_Ana/z_door_ana.c
@@ -146,7 +146,7 @@ void DoorAna_WaitOpen(DoorAna* this, PlayState* play) {
play->nextEntranceIndex = entrances[destinationIdx];
// In ER, load the correct entrance based on the grotto link is falling into
- if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_ENTRANCES)) {
+ if (IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_ENTRANCES)) {
Grotto_OverrideActorEntrance(&this->actor);
}
diff --git a/soh/src/overlays/actors/ovl_Door_Killer/z_door_killer.c b/soh/src/overlays/actors/ovl_Door_Killer/z_door_killer.c
index d93862d63..058b5cb23 100644
--- a/soh/src/overlays/actors/ovl_Door_Killer/z_door_killer.c
+++ b/soh/src/overlays/actors/ovl_Door_Killer/z_door_killer.c
@@ -532,8 +532,7 @@ void DoorKiller_DrawDoor(Actor* thisx, PlayState* play) {
Gfx_SetupDL_37Opa(play->state.gfxCtx);
DoorKiller_SetTexture(&this->actor, play);
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
- NULL, NULL, NULL);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, NULL, NULL, NULL);
}
void DoorKiller_DrawRubble(Actor* thisx, PlayState* play) {
diff --git a/soh/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c b/soh/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c
index 9b1ce5a59..5940f8c03 100644
--- a/soh/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c
+++ b/soh/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c
@@ -252,7 +252,7 @@ void DoorWarp1_SetupBlueCrystal(DoorWarp1* this, PlayState* play) {
-255;
}
- if (!gSaveContext.isBossRush) {
+ if (!IS_BOSS_RUSH) {
play->envCtx.adjFogNear = -500;
this->warpTimer = 30;
} else {
@@ -299,7 +299,7 @@ void DoorWarp1_SetPlayerPos(DoorWarp1* this, PlayState* play) {
player->actor.velocity.y = 0.0f;
player->actor.world.pos.x = this->actor.world.pos.x;
- if (!gSaveContext.isBossRush) {
+ if (!IS_BOSS_RUSH) {
player->actor.world.pos.y = this->actor.world.pos.y + 55.0f;
} else {
player->actor.world.pos.y = this->actor.world.pos.y;
@@ -323,7 +323,7 @@ void func_80999214(DoorWarp1* this, PlayState* play) {
Math_SmoothStepToF(&this->crystalAlpha, 255.0f, 0.2f, 5.0f, 0.1f);
- if (!gSaveContext.isBossRush) {
+ if (!IS_BOSS_RUSH) {
darkness = (f32)(40 - this->warpTimer) / 40.0f;
darkness = CLAMP_MIN(darkness, 0);
} else {
@@ -366,7 +366,7 @@ void func_80999348(DoorWarp1* this, PlayState* play) {
void DoorWarp1_FloatPlayer(DoorWarp1* this, PlayState* play) {
Player* player = GET_PLAYER(play);
- if (!gSaveContext.isBossRush) {
+ if (!IS_BOSS_RUSH) {
player->actor.gravity = -0.1f;
}
}
@@ -533,7 +533,7 @@ void DoorWarp1_ChildWarpIdle(DoorWarp1* this, PlayState* play) {
if (DoorWarp1_PlayerInRange(this, play)) {
player = GET_PLAYER(play);
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
GivePlayerRandoReward(this, player, play, 0, 0);
return;
}
@@ -573,7 +573,7 @@ void DoorWarp1_ChildWarpOut(DoorWarp1* this, PlayState* play) {
if (!Flags_GetEventChkInf(EVENTCHKINF_USED_DODONGOS_CAVERN_BLUE_WARP)) {
Flags_SetEventChkInf(EVENTCHKINF_USED_DODONGOS_CAVERN_BLUE_WARP);
Flags_SetRandomizerInf(RAND_INF_DUNGEONS_DONE_DODONGOS_CAVERN);
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
play->nextEntranceIndex = 0x47A;
gSaveContext.nextCutsceneIndex = 0;
} else {
@@ -586,11 +586,11 @@ void DoorWarp1_ChildWarpOut(DoorWarp1* this, PlayState* play) {
gSaveContext.nextCutsceneIndex = 0;
}
} else if (play->sceneNum == SCENE_DEKU_TREE_BOSS) {
- if (!Flags_GetEventChkInf(EVENTCHKINF_OBTAINED_KOKIRI_EMERALD_DEKU_TREE_DEAD) || gSaveContext.n64ddFlag) {
+ if (!Flags_GetEventChkInf(EVENTCHKINF_OBTAINED_KOKIRI_EMERALD_DEKU_TREE_DEAD) || IS_RANDO) {
Flags_SetEventChkInf(EVENTCHKINF_OBTAINED_KOKIRI_EMERALD_DEKU_TREE_DEAD);
Flags_SetEventChkInf(EVENTCHKINF_USED_DEKU_TREE_BLUE_WARP);
Flags_SetRandomizerInf(RAND_INF_DUNGEONS_DONE_DEKU_TREE);
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
play->nextEntranceIndex = 0x0457;
gSaveContext.nextCutsceneIndex = 0;
// Skip Mido complaining about dead Deku tree
@@ -609,7 +609,7 @@ void DoorWarp1_ChildWarpOut(DoorWarp1* this, PlayState* play) {
gSaveContext.nextCutsceneIndex = 0;
}
- if (gSaveContext.n64ddFlag && (Randomizer_GetSettingValue(RSK_SHUFFLE_DUNGEON_ENTRANCES) != RO_DUNGEON_ENTRANCE_SHUFFLE_OFF ||
+ if (IS_RANDO && (Randomizer_GetSettingValue(RSK_SHUFFLE_DUNGEON_ENTRANCES) != RO_DUNGEON_ENTRANCE_SHUFFLE_OFF ||
Randomizer_GetSettingValue(RSK_SHUFFLE_BOSS_ENTRANCES) != RO_BOSS_ROOM_ENTRANCE_SHUFFLE_OFF)) {
Entrance_OverrideBlueWarp();
}
@@ -636,7 +636,7 @@ void DoorWarp1_RutoWarpIdle(DoorWarp1* this, PlayState* play) {
if (this->rutoWarpState != WARP_BLUE_RUTO_STATE_INITIAL && DoorWarp1_PlayerInRange(this, play)) {
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
GivePlayerRandoReward(this, GET_PLAYER(play), play, 1, 0);
return;
}
@@ -670,7 +670,7 @@ void func_80999EE0(DoorWarp1* this, PlayState* play) {
Play_CameraSetAtEye(play, sRutoWarpSubCamId, &at, &eye);
Play_CameraSetFov(play, sRutoWarpSubCamId, 90.0f);
this->rutoWarpState = WARP_BLUE_RUTO_STATE_TALKING;
- if (!gSaveContext.n64ddFlag) {
+ if (!IS_RANDO) {
Message_StartTextbox(play, 0x4022, NULL);
}
DoorWarp1_SetupAction(this, func_80999FE4);
@@ -707,7 +707,7 @@ void DoorWarp1_RutoWarpOut(DoorWarp1* this, PlayState* play) {
Flags_SetEventChkInf(EVENTCHKINF_USED_JABU_JABUS_BELLY_BLUE_WARP);
Flags_SetRandomizerInf(RAND_INF_DUNGEONS_DONE_JABU_JABUS_BELLY);
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
play->nextEntranceIndex = 0x10E;
gSaveContext.nextCutsceneIndex = 0;
} else {
@@ -716,7 +716,7 @@ void DoorWarp1_RutoWarpOut(DoorWarp1* this, PlayState* play) {
gSaveContext.nextCutsceneIndex = 0xFFF0;
}
- if (gSaveContext.n64ddFlag && (Randomizer_GetSettingValue(RSK_SHUFFLE_DUNGEON_ENTRANCES) != RO_DUNGEON_ENTRANCE_SHUFFLE_OFF ||
+ if (IS_RANDO && (Randomizer_GetSettingValue(RSK_SHUFFLE_DUNGEON_ENTRANCES) != RO_DUNGEON_ENTRANCE_SHUFFLE_OFF ||
Randomizer_GetSettingValue(RSK_SHUFFLE_BOSS_ENTRANCES) != RO_BOSS_ROOM_ENTRANCE_SHUFFLE_OFF)) {
Entrance_OverrideBlueWarp();
}
@@ -761,13 +761,13 @@ void DoorWarp1_AdultWarpIdle(DoorWarp1* this, PlayState* play) {
if (DoorWarp1_PlayerInRange(this, play)) {
// Heal player in Boss Rush
- if (gSaveContext.isBossRush) {
+ if (IS_BOSS_RUSH) {
BossRush_HandleBlueWarpHeal(play);
}
player = GET_PLAYER(play);
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
GivePlayerRandoReward(this, player, play, 0, 1);
return;
}
@@ -826,14 +826,14 @@ void DoorWarp1_AdultWarpOut(DoorWarp1* this, PlayState* play) {
this->warpTimer++;
if (this->warpTimer > sWarpTimerTarget && gSaveContext.nextCutsceneIndex == 0xFFEF) {
- if (gSaveContext.isBossRush) {
+ if (IS_BOSS_RUSH) {
BossRush_HandleBlueWarp(play, this->actor.world.pos.x, this->actor.world.pos.z);
} else if (play->sceneNum == SCENE_FOREST_TEMPLE_BOSS) {
if (!Flags_GetEventChkInf(EVENTCHKINF_USED_FOREST_TEMPLE_BLUE_WARP)) {
Flags_SetEventChkInf(EVENTCHKINF_USED_FOREST_TEMPLE_BLUE_WARP);
Flags_SetRandomizerInf(RAND_INF_DUNGEONS_DONE_FOREST_TEMPLE);
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
play->nextEntranceIndex = 0x608;
gSaveContext.nextCutsceneIndex = 0;
} else {
@@ -855,7 +855,7 @@ void DoorWarp1_AdultWarpOut(DoorWarp1* this, PlayState* play) {
Flags_SetEventChkInf(EVENTCHKINF_USED_FIRE_TEMPLE_BLUE_WARP);
Flags_SetRandomizerInf(RAND_INF_DUNGEONS_DONE_FIRE_TEMPLE);
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
play->nextEntranceIndex = 0x564;
gSaveContext.nextCutsceneIndex = 0;
// Change Death Mountain cloud since we aren't warping to the cutscene
@@ -878,7 +878,7 @@ void DoorWarp1_AdultWarpOut(DoorWarp1* this, PlayState* play) {
Flags_SetEventChkInf(EVENTCHKINF_USED_WATER_TEMPLE_BLUE_WARP);
Flags_SetRandomizerInf(RAND_INF_DUNGEONS_DONE_WATER_TEMPLE);
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
play->nextEntranceIndex = 0x60C;
gSaveContext.nextCutsceneIndex = 0;
// Fill Lake Hylia since we aren't warping to the cutscene
@@ -898,10 +898,10 @@ void DoorWarp1_AdultWarpOut(DoorWarp1* this, PlayState* play) {
gSaveContext.nextCutsceneIndex = 0;
}
} else if (play->sceneNum == SCENE_SPIRIT_TEMPLE_BOSS) {
- if (!CHECK_QUEST_ITEM(QUEST_MEDALLION_SPIRIT) || gSaveContext.n64ddFlag) {
+ if (!CHECK_QUEST_ITEM(QUEST_MEDALLION_SPIRIT) || IS_RANDO) {
Flags_SetRandomizerInf(RAND_INF_DUNGEONS_DONE_SPIRIT_TEMPLE);
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
play->nextEntranceIndex = 0x610;
gSaveContext.nextCutsceneIndex = 0;
} else {
@@ -919,10 +919,10 @@ void DoorWarp1_AdultWarpOut(DoorWarp1* this, PlayState* play) {
gSaveContext.nextCutsceneIndex = 0;
}
} else if (play->sceneNum == SCENE_SHADOW_TEMPLE_BOSS) {
- if (!CHECK_QUEST_ITEM(QUEST_MEDALLION_SHADOW) || gSaveContext.n64ddFlag) {
+ if (!CHECK_QUEST_ITEM(QUEST_MEDALLION_SHADOW) || IS_RANDO) {
Flags_SetRandomizerInf(RAND_INF_DUNGEONS_DONE_SHADOW_TEMPLE);
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
play->nextEntranceIndex = 0x580;
gSaveContext.nextCutsceneIndex = 0;
} else {
@@ -941,7 +941,7 @@ void DoorWarp1_AdultWarpOut(DoorWarp1* this, PlayState* play) {
}
}
- if (gSaveContext.n64ddFlag && (Randomizer_GetSettingValue(RSK_SHUFFLE_DUNGEON_ENTRANCES) != RO_DUNGEON_ENTRANCE_SHUFFLE_OFF ||
+ if (IS_RANDO && (Randomizer_GetSettingValue(RSK_SHUFFLE_DUNGEON_ENTRANCES) != RO_DUNGEON_ENTRANCE_SHUFFLE_OFF ||
Randomizer_GetSettingValue(RSK_SHUFFLE_BOSS_ENTRANCES) != RO_BOSS_ROOM_ENTRANCE_SHUFFLE_OFF)) {
Entrance_OverrideBlueWarp();
}
diff --git a/soh/src/overlays/actors/ovl_En_Am/z_en_am.c b/soh/src/overlays/actors/ovl_En_Am/z_en_am.c
index e89981431..c5ca6686a 100644
--- a/soh/src/overlays/actors/ovl_En_Am/z_en_am.c
+++ b/soh/src/overlays/actors/ovl_En_Am/z_en_am.c
@@ -961,7 +961,8 @@ void EnAm_Draw(Actor* thisx, PlayState* play) {
Gfx_SetupDL_25Opa(play->state.gfxCtx);
gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, this->textureBlend);
- SkelAnime_DrawOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, NULL, EnAm_PostLimbDraw, this);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, NULL, EnAm_PostLimbDraw,
+ this);
if (this->iceTimer != 0) {
this->dyna.actor.colorFilterTimer++;
diff --git a/soh/src/overlays/actors/ovl_En_Ani/z_en_ani.c b/soh/src/overlays/actors/ovl_En_Ani/z_en_ani.c
index 075286901..15ebd759c 100644
--- a/soh/src/overlays/actors/ovl_En_Ani/z_en_ani.c
+++ b/soh/src/overlays/actors/ovl_En_Ani/z_en_ani.c
@@ -128,7 +128,7 @@ void func_809B0558(EnAni* this, PlayState* play) {
}
Flags_SetItemGetInf(ITEMGETINF_15);
} else {
- if (!gSaveContext.n64ddFlag) {
+ if (!IS_RANDO) {
func_8002F434(&this->actor, play, GI_HEART_PIECE, 10000.0f, 200.0f);
} else {
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_KAK_MAN_ON_ROOF, GI_HEART_PIECE);
@@ -142,7 +142,7 @@ void func_809B05F0(EnAni* this, PlayState* play) {
EnAni_SetupAction(this, func_809B0558);
}
- if (!gSaveContext.n64ddFlag) {
+ if (!IS_RANDO) {
func_8002F434(&this->actor, play, GI_HEART_PIECE, 10000.0f, 200.0f);
} else {
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_KAK_MAN_ON_ROOF, GI_HEART_PIECE);
@@ -338,8 +338,7 @@ void EnAni_Draw(Actor* thisx, PlayState* play) {
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(eyeTextures[this->eyeIndex]));
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
- EnAni_OverrideLimbDraw, EnAni_PostLimbDraw, this);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnAni_OverrideLimbDraw, EnAni_PostLimbDraw, this);
CLOSE_DISPS(play->state.gfxCtx);
}
diff --git a/soh/src/overlays/actors/ovl_En_Anubice/z_en_anubice.c b/soh/src/overlays/actors/ovl_En_Anubice/z_en_anubice.c
index ec725959c..07a47e5bd 100644
--- a/soh/src/overlays/actors/ovl_En_Anubice/z_en_anubice.c
+++ b/soh/src/overlays/actors/ovl_En_Anubice/z_en_anubice.c
@@ -497,6 +497,6 @@ void EnAnubice_Draw(Actor* thisx, PlayState* play) {
EnAnubice* this = (EnAnubice*)thisx;
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
- SkelAnime_DrawOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, EnAnubice_OverrideLimbDraw,
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnAnubice_OverrideLimbDraw,
EnAnubice_PostLimbDraw, this);
}
diff --git a/soh/src/overlays/actors/ovl_En_Attack_Niw/z_en_attack_niw.c b/soh/src/overlays/actors/ovl_En_Attack_Niw/z_en_attack_niw.c
index 1ddba826b..0fd7a83e1 100644
--- a/soh/src/overlays/actors/ovl_En_Attack_Niw/z_en_attack_niw.c
+++ b/soh/src/overlays/actors/ovl_En_Attack_Niw/z_en_attack_niw.c
@@ -401,6 +401,5 @@ void EnAttackNiw_Draw(Actor* thisx, PlayState* play) {
EnAttackNiw* this = (EnAttackNiw*)thisx;
Gfx_SetupDL_25Opa(play->state.gfxCtx);
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
- func_809B5F98, NULL, this);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, func_809B5F98, NULL, this);
}
diff --git a/soh/src/overlays/actors/ovl_En_Bb/z_en_bb.c b/soh/src/overlays/actors/ovl_En_Bb/z_en_bb.c
index 9f2822986..39c0e54e9 100644
--- a/soh/src/overlays/actors/ovl_En_Bb/z_en_bb.c
+++ b/soh/src/overlays/actors/ovl_En_Bb/z_en_bb.c
@@ -1292,7 +1292,7 @@ void EnBb_Draw(Actor* thisx, PlayState* play) {
if (this->moveMode != BBMOVE_HIDDEN) {
if (this->actor.params <= ENBB_BLUE) {
Gfx_SetupDL_25Opa(play->state.gfxCtx);
- SkelAnime_DrawOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, NULL, EnBb_PostLimbDraw,
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, NULL, EnBb_PostLimbDraw,
this);
if (this->fireIceTimer != 0) {
diff --git a/soh/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.c b/soh/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.c
index 0ddb1a486..2f1c4abe4 100644
--- a/soh/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.c
+++ b/soh/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.c
@@ -892,8 +892,7 @@ void EnBigokuta_Draw(Actor* thisx, PlayState* play) {
Matrix_RotateY(-rotY, MTXMODE_APPLY);
}
}
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable,
- this->skelAnime.dListCount, EnBigokuta_OverrideLimbDraw, NULL, this);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnBigokuta_OverrideLimbDraw, NULL, this);
} else {
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
gSPSegment(POLY_XLU_DISP++, 0x0C, D_80116280);
diff --git a/soh/src/overlays/actors/ovl_En_Bird/z_en_bird.c b/soh/src/overlays/actors/ovl_En_Bird/z_en_bird.c
index f521e1718..6b6c1f847 100644
--- a/soh/src/overlays/actors/ovl_En_Bird/z_en_bird.c
+++ b/soh/src/overlays/actors/ovl_En_Bird/z_en_bird.c
@@ -132,5 +132,5 @@ void EnBird_Update(Actor* thisx, PlayState* play) {
void EnBird_Draw(Actor* thisx, PlayState* play) {
EnBird* this = (EnBird*)thisx;
- SkelAnime_DrawOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, NULL, NULL, NULL);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, NULL, NULL, NULL);
}
diff --git a/soh/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c b/soh/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c
index 7ad117ccf..76c0feac3 100644
--- a/soh/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c
+++ b/soh/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c
@@ -83,7 +83,7 @@ void EnBomBowlMan_Init(Actor* thisx, PlayState* play2) {
}
}
- this->prizeSelect = gSaveContext.n64ddFlag ? 0 : (s16)Rand_ZeroFloat(4.99f);
+ this->prizeSelect = IS_RANDO ? 0 : (s16)Rand_ZeroFloat(4.99f);
this->actor.targetMode = 1;
this->actionFunc = EnBomBowMan_SetupWaitAsleep;
}
@@ -142,7 +142,7 @@ void EnBomBowMan_BlinkAwake(EnBomBowlMan* this, PlayState* play) {
this->dialogState = TEXT_STATE_EVENT;
// Check for beaten Dodongo's Cavern if Rando is disabled
- if (!gSaveContext.n64ddFlag) {
+ if (!IS_RANDO) {
if ((Flags_GetEventChkInf(EVENTCHKINF_USED_DODONGOS_CAVERN_BLUE_WARP)) || BREG(2)) {
this->actor.textId = 0xBF;
} else {
@@ -152,7 +152,7 @@ void EnBomBowMan_BlinkAwake(EnBomBowlMan* this, PlayState* play) {
// In randomizer, only check for bomb bag when bombchus aren't in logic
// and only check for bombchus when bombchus are in logic
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
u8 bombchusInLogic = Randomizer_GetSettingValue(RSK_BOMBCHUS_IN_LOGIC);
if ((!bombchusInLogic && INV_CONTENT(ITEM_BOMB) == ITEM_NONE) ||
(bombchusInLogic && INV_CONTENT(ITEM_BOMBCHU) == ITEM_NONE)) {
@@ -187,7 +187,7 @@ void EnBomBowMan_CheckBeatenDC(EnBomBowlMan* this, PlayState* play) {
this->blinkTimer = (s16)Rand_ZeroFloat(60.0f) + 20;
bool bombchuBowlingClosed;
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
// when rando'd, check if we have bombchus if chus are in logic
// and check if we have a bomb bag if chus aren't in logic
u8 explosive = Randomizer_GetSettingValue(RSK_BOMBCHUS_IN_LOGIC) ? ITEM_BOMBCHU : ITEM_BOMB;
@@ -431,7 +431,7 @@ void EnBomBowMan_ChooseShowPrize(EnBomBowlMan* this, PlayState* play) {
}
break;
case 1:
- if (!gSaveContext.n64ddFlag) {
+ if (!IS_RANDO) {
prizeTemp = EXITEM_PURPLE_RUPEE_BOWLING;
} else {
prizeTemp = EXITEM_HEART_PIECE_BOWLING;
@@ -444,7 +444,7 @@ void EnBomBowMan_ChooseShowPrize(EnBomBowlMan* this, PlayState* play) {
prizeTemp = EXITEM_BOMBCHUS_BOWLING;
break;
case 3:
- if (!gSaveContext.n64ddFlag) {
+ if (!IS_RANDO) {
prizeTemp = EXITEM_HEART_PIECE_BOWLING;
if (Flags_GetItemGetInf(ITEMGETINF_12)) {
prizeTemp = EXITEM_PURPLE_RUPEE_BOWLING;
@@ -577,8 +577,7 @@ void EnBomBowlMan_Draw(Actor* thisx, PlayState* play) {
Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(eyeTextures[this->eyeTextureIndex]));
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
- EnBomBowlMan_OverrideLimbDraw, NULL, this);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnBomBowlMan_OverrideLimbDraw, NULL, this);
CLOSE_DISPS(play->state.gfxCtx);
}
diff --git a/soh/src/overlays/actors/ovl_En_Bom_Bowl_Pit/z_en_bom_bowl_pit.c b/soh/src/overlays/actors/ovl_En_Bom_Bowl_Pit/z_en_bom_bowl_pit.c
index b92b22d3f..a6d3afda5 100644
--- a/soh/src/overlays/actors/ovl_En_Bom_Bowl_Pit/z_en_bom_bowl_pit.c
+++ b/soh/src/overlays/actors/ovl_En_Bom_Bowl_Pit/z_en_bom_bowl_pit.c
@@ -183,7 +183,7 @@ void EnBomBowlPit_GivePrize(EnBomBowlPit* this, PlayState* play) {
this->getItemId = GI_BOMB_BAG_40;
}
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
switch (this->prizeIndex) {
case EXITEM_BOMB_BAG_BOWLING:
this->getItemEntry = Randomizer_GetItemFromKnownCheck(RC_MARKET_BOMBCHU_BOWLING_FIRST_PRIZE, GI_BOMB_BAG_20);
@@ -202,7 +202,7 @@ void EnBomBowlPit_GivePrize(EnBomBowlPit* this, PlayState* play) {
player->stateFlags1 &= ~0x20000000;
this->actor.parent = NULL;
- if (!gSaveContext.n64ddFlag || this->getItemEntry.getItemId == GI_NONE) {
+ if (!IS_RANDO || this->getItemEntry.getItemId == GI_NONE) {
func_8002F434(&this->actor, play, this->getItemId, 2000.0f, 1000.0f);
} else {
GiveItemEntryFromActor(&this->actor, play, this->getItemEntry, 2000.0f, 1000.0f);
@@ -215,7 +215,7 @@ void EnBomBowlPit_WaitTillPrizeGiven(EnBomBowlPit* this, PlayState* play) {
if (Actor_HasParent(&this->actor, play)) {
this->actionFunc = EnBomBowlPit_Reset;
} else {
- if (!gSaveContext.n64ddFlag || this->getItemEntry.getItemId == GI_NONE) {
+ if (!IS_RANDO || this->getItemEntry.getItemId == GI_NONE) {
func_8002F434(&this->actor, play, this->getItemId, 2000.0f, 1000.0f);
} else {
GiveItemEntryFromActor(&this->actor, play, this->getItemEntry, 2000.0f, 1000.0f);
@@ -226,7 +226,7 @@ void EnBomBowlPit_WaitTillPrizeGiven(EnBomBowlPit* this, PlayState* play) {
void EnBomBowlPit_Reset(EnBomBowlPit* this, PlayState* play) {
if (((Message_GetState(&play->msgCtx) == TEXT_STATE_DONE) &&
Message_ShouldAdvance(play)) ||
- (gSaveContext.n64ddFlag && this->getItemId == GI_ICE_TRAP)) {
+ (IS_RANDO && this->getItemId == GI_ICE_TRAP)) {
// "Normal termination"/"completion"
osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ 正常終了 ☆☆☆☆☆ \n" VT_RST);
if (this->getItemId == GI_HEART_PIECE) {
diff --git a/soh/src/overlays/actors/ovl_En_Box/z_en_box.c b/soh/src/overlays/actors/ovl_En_Box/z_en_box.c
index 6d5131732..1e2c4d6cd 100644
--- a/soh/src/overlays/actors/ovl_En_Box/z_en_box.c
+++ b/soh/src/overlays/actors/ovl_En_Box/z_en_box.c
@@ -192,7 +192,7 @@ void EnBox_Init(Actor* thisx, PlayState* play2) {
SkelAnime_Init(play, &this->skelanime, &gTreasureChestSkel, anim, this->jointTable, this->morphTable, 5);
Animation_Change(&this->skelanime, anim, 1.5f, animFrameStart, endFrame, ANIMMODE_ONCE, 0.0f);
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
this->getItemEntry = Randomizer_GetItemFromActor(this->dyna.actor.id, play->sceneNum, this->dyna.actor.params, this->dyna.actor.params >> 5 & 0x7F);
} else {
this->getItemEntry = ItemTable_RetrieveEntry(MOD_NONE, this->dyna.actor.params >> 5 & 0x7F);
@@ -206,7 +206,7 @@ void EnBox_Init(Actor* thisx, PlayState* play2) {
}
// Delete chests in Boss Rush. Mainly for the chest in King Dodongo's boss room.
- if (gSaveContext.isBossRush) {
+ if (IS_BOSS_RUSH) {
EnBox_SetupAction(this, EnBox_Destroy);
}
}
@@ -448,7 +448,7 @@ void EnBox_WaitOpen(EnBox* this, PlayState* play) {
// treasure chest game rando
if (Randomizer_GetSettingValue(RSK_SHUFFLE_CHEST_MINIGAME)) {
- if (gSaveContext.n64ddFlag && play->sceneNum == 16 && (this->dyna.actor.params & 0x60) != 0x20) {
+ if (IS_RANDO && play->sceneNum == 16 && (this->dyna.actor.params & 0x60) != 0x20) {
if((this->dyna.actor.params & 0xF) < 2) {
Flags_SetCollectible(play, 0x1B);
}
@@ -476,7 +476,7 @@ void EnBox_WaitOpen(EnBox* this, PlayState* play) {
// RANDOTODO treasure chest game rando
if (Randomizer_GetSettingValue(RSK_SHUFFLE_CHEST_MINIGAME)) {
- if (gSaveContext.n64ddFlag && play->sceneNum == 16 && (this->dyna.actor.params & 0x60) != 0x20) {
+ if (IS_RANDO && play->sceneNum == 16 && (this->dyna.actor.params & 0x60) != 0x20) {
if((this->dyna.actor.params & 0xF) < 2) {
if(Flags_GetCollectible(play, 0x1B)) {
sItem = blueRupee;
@@ -506,7 +506,7 @@ void EnBox_WaitOpen(EnBox* this, PlayState* play) {
}
// Chests need to have a negative getItemId in order to not immediately give their item
// when approaching.
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
sItem.getItemId = 0 - sItem.getItemId;
sItem.getItemFrom = ITEM_FROM_CHEST;
GiveItemEntryFromActorWithFixedRange(&this->dyna.actor, play, sItem);
@@ -626,8 +626,8 @@ void EnBox_Update(Actor* thisx, PlayState* play) {
Actor_SetFocus(&this->dyna.actor, 40.0f);
}
- if (((!gSaveContext.n64ddFlag && ((this->dyna.actor.params >> 5 & 0x7F) == 0x7C)) ||
- (gSaveContext.n64ddFlag && ABS(sItem.getItemId) == RG_ICE_TRAP)) &&
+ if (((!IS_RANDO && ((this->dyna.actor.params >> 5 & 0x7F) == 0x7C)) ||
+ (IS_RANDO && ABS(sItem.getItemId) == RG_ICE_TRAP)) &&
this->actionFunc == EnBox_Open && this->skelanime.curFrame > 45 && this->iceSmokeTimer < 100) {
if (!CVarGetInteger("gAddTraps.enabled", 0)) {
EnBox_SpawnIceSmoke(this, play);
diff --git a/soh/src/overlays/actors/ovl_En_Brob/z_en_brob.c b/soh/src/overlays/actors/ovl_En_Brob/z_en_brob.c
index cf4a2db89..a7d1b7a6c 100644
--- a/soh/src/overlays/actors/ovl_En_Brob/z_en_brob.c
+++ b/soh/src/overlays/actors/ovl_En_Brob/z_en_brob.c
@@ -326,6 +326,5 @@ void EnBrob_Draw(Actor* thisx, PlayState* play) {
Gfx_SetupDL_25Opa(play->state.gfxCtx);
Matrix_Translate(0.0f, this->unk_1AE, 0.0f, MTXMODE_APPLY);
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
- NULL, EnBrob_PostLimbDraw, this);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, NULL, EnBrob_PostLimbDraw, this);
}
diff --git a/soh/src/overlays/actors/ovl_En_Butte/z_en_butte.c b/soh/src/overlays/actors/ovl_En_Butte/z_en_butte.c
index 60d40947c..7dac97580 100644
--- a/soh/src/overlays/actors/ovl_En_Butte/z_en_butte.c
+++ b/soh/src/overlays/actors/ovl_En_Butte/z_en_butte.c
@@ -427,7 +427,7 @@ void EnButte_Draw(Actor* thisx, PlayState* play) {
if (this->drawSkelAnime) {
Gfx_SetupDL_25Opa(play->state.gfxCtx);
- SkelAnime_DrawOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, NULL, NULL, NULL);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, NULL, NULL, NULL);
Collider_UpdateSpheres(0, &this->collider);
}
diff --git a/soh/src/overlays/actors/ovl_En_Cow/z_en_cow.c b/soh/src/overlays/actors/ovl_En_Cow/z_en_cow.c
index 2bbfecb49..04123c7b3 100644
--- a/soh/src/overlays/actors/ovl_En_Cow/z_en_cow.c
+++ b/soh/src/overlays/actors/ovl_En_Cow/z_en_cow.c
@@ -107,7 +107,7 @@ void EnCow_Init(Actor* thisx, PlayState* play) {
EnCow* this = (EnCow*)thisx;
s32 pad;
- if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_COWS)) {
+ if (IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_COWS)) {
EnCow_MoveForRandomizer(thisx, play);
}
@@ -311,7 +311,7 @@ void func_809DF96C(EnCow* this, PlayState* play) {
// when randomized with cowsanity, if we haven't gotten the
// reward from this cow yet, give that, otherwise use the
// vanilla cow behavior
- if (gSaveContext.n64ddFlag &&
+ if (IS_RANDO &&
Randomizer_GetSettingValue(RSK_SHUFFLE_COWS) &&
!EnCow_HasBeenMilked(this, play)) {
EnCow_SetCowMilked(this, play);
@@ -442,14 +442,12 @@ void EnCow_Draw(Actor* thisx, PlayState* play) {
EnCow* this = (EnCow*)thisx;
Gfx_SetupDL_37Opa(play->state.gfxCtx);
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
- EnCow_OverrideLimbDraw, EnCow_PostLimbDraw, this);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnCow_OverrideLimbDraw, EnCow_PostLimbDraw, this);
}
void func_809E0070(Actor* thisx, PlayState* play) {
EnCow* this = (EnCow*)thisx;
Gfx_SetupDL_37Opa(play->state.gfxCtx);
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
- NULL, NULL, this);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, NULL, NULL, this);
}
diff --git a/soh/src/overlays/actors/ovl_En_Crow/z_en_crow.c b/soh/src/overlays/actors/ovl_En_Crow/z_en_crow.c
index 3fafc008a..24650142d 100644
--- a/soh/src/overlays/actors/ovl_En_Crow/z_en_crow.c
+++ b/soh/src/overlays/actors/ovl_En_Crow/z_en_crow.c
@@ -513,6 +513,5 @@ void EnCrow_Draw(Actor* thisx, PlayState* play) {
EnCrow* this = (EnCrow*)thisx;
Gfx_SetupDL_25Opa(play->state.gfxCtx);
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
- EnCrow_OverrideLimbDraw, EnCrow_PostLimbDraw, this);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnCrow_OverrideLimbDraw, EnCrow_PostLimbDraw, this);
}
diff --git a/soh/src/overlays/actors/ovl_En_Cs/z_en_cs.c b/soh/src/overlays/actors/ovl_En_Cs/z_en_cs.c
index 6ce7b3485..d1659d21c 100644
--- a/soh/src/overlays/actors/ovl_En_Cs/z_en_cs.c
+++ b/soh/src/overlays/actors/ovl_En_Cs/z_en_cs.c
@@ -469,8 +469,7 @@ void EnCs_Draw(Actor* thisx, PlayState* play) {
Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(eyeTextures[this->eyeIndex]));
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
- EnCs_OverrideLimbDraw, EnCs_PostLimbDraw, &this->actor);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnCs_OverrideLimbDraw, EnCs_PostLimbDraw, &this->actor);
if (Flags_GetItemGetInf(ITEMGETINF_3A)) {
s32 childLinkObjectIndex = Object_GetIndex(&play->objectCtx, OBJECT_LINK_CHILD);
diff --git a/soh/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c b/soh/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c
index ca38f7151..8df2f8c0b 100644
--- a/soh/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c
+++ b/soh/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c
@@ -1,6 +1,7 @@
#include "z_en_daiku.h"
#include "overlays/actors/ovl_En_GeldB/z_en_geldb.h"
#include "objects/object_daiku/object_daiku.h"
+#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_WHILE_CULLED)
@@ -403,6 +404,7 @@ void EnDaiku_InitEscape(EnDaiku* this, PlayState* play) {
this->stateFlags &= ~(ENDAIKU_STATEFLAG_1 | ENDAIKU_STATEFLAG_2);
gSaveContext.eventChkInf[EVENTCHKINF_CARPENTERS_FREE_INDEX] |= EVENTCHKINF_CARPENTERS_FREE_MASK(this->actor.params & 3);
+ GameInteractor_ExecuteOnFlagSet(FLAG_EVENT_CHECK_INF, (EVENTCHKINF_CARPENTERS_FREE_INDEX << 4) + (this->actor.params & 3));
this->actor.gravity = -1.0f;
this->escapeSubCamTimer = sEscapeSubCamParams[this->actor.params & 3].maxFramesActive;
@@ -602,8 +604,7 @@ void EnDaiku_Draw(Actor* thisx, PlayState* play) {
gDPSetEnvColor(POLY_OPA_DISP++, 200, 0, 150, 255);
}
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
- EnDaiku_OverrideLimbDraw, EnDaiku_PostLimbDraw, this);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnDaiku_OverrideLimbDraw, EnDaiku_PostLimbDraw, this);
CLOSE_DISPS(play->state.gfxCtx);
}
diff --git a/soh/src/overlays/actors/ovl_En_Daiku_Kakariko/z_en_daiku_kakariko.c b/soh/src/overlays/actors/ovl_En_Daiku_Kakariko/z_en_daiku_kakariko.c
index 04f6fe0ca..6cc91e0c7 100644
--- a/soh/src/overlays/actors/ovl_En_Daiku_Kakariko/z_en_daiku_kakariko.c
+++ b/soh/src/overlays/actors/ovl_En_Daiku_Kakariko/z_en_daiku_kakariko.c
@@ -559,8 +559,7 @@ void EnDaikuKakariko_Draw(Actor* thisx, PlayState* play) {
gDPSetEnvColor(POLY_OPA_DISP++, 200, 0, 150, 255);
}
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
- EnDaikuKakariko_OverrideLimbDraw, EnDaikuKakariko_PostLimbDraw, thisx);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnDaikuKakariko_OverrideLimbDraw, EnDaikuKakariko_PostLimbDraw, thisx);
CLOSE_DISPS(play->state.gfxCtx);
}
diff --git a/soh/src/overlays/actors/ovl_En_Dekubaba/z_en_dekubaba.c b/soh/src/overlays/actors/ovl_En_Dekubaba/z_en_dekubaba.c
index 0633158dc..2b4344f68 100644
--- a/soh/src/overlays/actors/ovl_En_Dekubaba/z_en_dekubaba.c
+++ b/soh/src/overlays/actors/ovl_En_Dekubaba/z_en_dekubaba.c
@@ -1289,7 +1289,7 @@ void EnDekubaba_Draw(Actor* thisx, PlayState* play) {
Gfx_SetupDL_25Opa(play->state.gfxCtx);
if (this->actionFunc != EnDekubaba_DeadStickDrop) {
- SkelAnime_DrawOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, NULL,
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, NULL,
EnDekubaba_PostLimbDraw, this);
if (this->actionFunc == EnDekubaba_Wait) {
diff --git a/soh/src/overlays/actors/ovl_En_Dekunuts/z_en_dekunuts.c b/soh/src/overlays/actors/ovl_En_Dekunuts/z_en_dekunuts.c
index 7f2f8b42c..79ed4433e 100644
--- a/soh/src/overlays/actors/ovl_En_Dekunuts/z_en_dekunuts.c
+++ b/soh/src/overlays/actors/ovl_En_Dekunuts/z_en_dekunuts.c
@@ -535,7 +535,7 @@ void EnDekunuts_Draw(Actor* thisx, PlayState* play) {
if (this->actor.params == DEKUNUTS_FLOWER) {
Gfx_DrawDListOpa(play, gDekuNutsFlowerDL);
} else {
- SkelAnime_DrawOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, EnDekunuts_OverrideLimbDraw,
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnDekunuts_OverrideLimbDraw,
NULL, this);
}
}
diff --git a/soh/src/overlays/actors/ovl_En_Dha/z_en_dha.c b/soh/src/overlays/actors/ovl_En_Dha/z_en_dha.c
index f485cf3d9..4f58b1937 100644
--- a/soh/src/overlays/actors/ovl_En_Dha/z_en_dha.c
+++ b/soh/src/overlays/actors/ovl_En_Dha/z_en_dha.c
@@ -463,6 +463,5 @@ void EnDha_Draw(Actor* thisx, PlayState* play) {
EnDha* this = (EnDha*)thisx;
Gfx_SetupDL_25Opa(play->state.gfxCtx);
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
- EnDha_OverrideLimbDraw, EnDha_PostLimbDraw, this);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnDha_OverrideLimbDraw, EnDha_PostLimbDraw, this);
}
diff --git a/soh/src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.c b/soh/src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.c
index f3bed2351..df00c3cf5 100644
--- a/soh/src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.c
+++ b/soh/src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.c
@@ -455,7 +455,7 @@ void func_809EEA00(EnDivingGame* this, PlayState* play) {
if ((this->unk_292 == Message_GetState(&play->msgCtx) && Message_ShouldAdvance(play))) {
Message_CloseTextbox(play);
this->actor.parent = NULL;
- if (!gSaveContext.n64ddFlag) {
+ if (!IS_RANDO) {
func_8002F434(&this->actor, play, GI_SCALE_SILVER, 90.0f, 10.0f);
} else {
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_ZD_DIVING_MINIGAME, GI_SCALE_SILVER);
@@ -470,7 +470,7 @@ void func_809EEA90(EnDivingGame* this, PlayState* play) {
if (Actor_HasParent(&this->actor, play)) {
this->actionFunc = func_809EEAF8;
} else {
- if (!gSaveContext.n64ddFlag) {
+ if (!IS_RANDO) {
func_8002F434(&this->actor, play, GI_SCALE_SILVER, 90.0f, 10.0f);
} else {
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_ZD_DIVING_MINIGAME, GI_SCALE_SILVER);
@@ -578,7 +578,6 @@ void EnDivingGame_Draw(Actor* thisx, PlayState* play) {
gSPSegment(POLY_OPA_DISP++, 0x0C, EnDivingGame_EmptyDList(play->state.gfxCtx));
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sEyeTextures[this->eyeTexIndex]));
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
- EnDivingGame_OverrideLimbDraw, NULL, this);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnDivingGame_OverrideLimbDraw, NULL, this);
CLOSE_DISPS(play->state.gfxCtx);
}
diff --git a/soh/src/overlays/actors/ovl_En_Dns/z_en_dns.c b/soh/src/overlays/actors/ovl_En_Dns/z_en_dns.c
index d99a48f4d..85d47753a 100644
--- a/soh/src/overlays/actors/ovl_En_Dns/z_en_dns.c
+++ b/soh/src/overlays/actors/ovl_En_Dns/z_en_dns.c
@@ -168,7 +168,7 @@ void EnDns_Init(Actor* thisx, PlayState* play) {
this->actor.gravity = -1.0f;
this->actor.textId = D_809F040C[this->actor.params];
this->dnsItemEntry = sItemEntries[this->actor.params];
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
// Ugly, but the best way we can identify which grotto we are in, same method 3DRando uses, but we'll need to account for entrance rando
s16 respawnData = gSaveContext.respawn[RESPAWN_MODE_RETURN].data & ((1 << 8) - 1);
this->scrubIdentity = Randomizer_IdentifyScrub(play->sceneNum, this->actor.params, respawnData);
@@ -412,7 +412,7 @@ void EnDns_Talk(EnDns* this, PlayState* play) {
void func_809EFDD0(EnDns* this, PlayState* play) {
u16 pendingGetItemId;
- if (!gSaveContext.n64ddFlag || !this->scrubIdentity.isShuffled) {
+ if (!IS_RANDO || !this->scrubIdentity.isShuffled) {
if (this->actor.params == 0x9) {
if (CUR_UPG_VALUE(UPG_STICKS) < 2) {
pendingGetItemId = GI_STICK_UPGRADE_20;
@@ -533,7 +533,7 @@ void EnDns_Update(Actor* thisx, PlayState* play) {
this->dustTimer++;
this->actor.textId = D_809F040C[this->actor.params];
- if (gSaveContext.n64ddFlag && this->scrubIdentity.isShuffled) {
+ if (IS_RANDO && this->scrubIdentity.isShuffled) {
this->actor.textId = 0x9000 + (this->scrubIdentity.randomizerInf - RAND_INF_SCRUBS_PURCHASED_DODONGOS_CAVERN_DEKU_SCRUB_NEAR_BOMB_BAG_LEFT);
}
Actor_SetFocus(&this->actor, 60.0f);
@@ -554,6 +554,5 @@ void EnDns_Draw(Actor* thisx, PlayState* play) {
EnDns* this = (EnDns*)thisx;
Gfx_SetupDL_25Opa(play->state.gfxCtx);
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
- NULL, NULL, &this->actor);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, NULL, NULL, &this->actor);
}
diff --git a/soh/src/overlays/actors/ovl_En_Dnt_Demo/z_en_dnt_demo.c b/soh/src/overlays/actors/ovl_En_Dnt_Demo/z_en_dnt_demo.c
index 4f2ecf93d..eb9942fba 100644
--- a/soh/src/overlays/actors/ovl_En_Dnt_Demo/z_en_dnt_demo.c
+++ b/soh/src/overlays/actors/ovl_En_Dnt_Demo/z_en_dnt_demo.c
@@ -135,7 +135,7 @@ void EnDntDemo_Judge(EnDntDemo* this, PlayState* play) {
this->judgeTimer = 0;
}
} else {
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
Player* player = GET_PLAYER(play);
switch (Player_GetMask(play)) {
case PLAYER_MASK_SKULL:
diff --git a/soh/src/overlays/actors/ovl_En_Dnt_Jiji/z_en_dnt_jiji.c b/soh/src/overlays/actors/ovl_En_Dnt_Jiji/z_en_dnt_jiji.c
index 9b44e0cfc..ae09cb438 100644
--- a/soh/src/overlays/actors/ovl_En_Dnt_Jiji/z_en_dnt_jiji.c
+++ b/soh/src/overlays/actors/ovl_En_Dnt_Jiji/z_en_dnt_jiji.c
@@ -437,7 +437,7 @@ void EnDntJiji_Draw(Actor* thisx, PlayState* play) {
Gfx_SetupDL_25Opa(play->state.gfxCtx);
Matrix_Push();
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(blinkTex[this->eyeState]));
- SkelAnime_DrawOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, NULL, NULL, this);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, NULL, NULL, this);
Matrix_Pop();
Matrix_Translate(this->flowerPos.x, this->flowerPos.y, this->flowerPos.z, MTXMODE_NEW);
Matrix_Scale(0.01f, 0.01f, 0.01f, MTXMODE_APPLY);
diff --git a/soh/src/overlays/actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.c b/soh/src/overlays/actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.c
index ecd84158a..f3dff79fe 100644
--- a/soh/src/overlays/actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.c
+++ b/soh/src/overlays/actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.c
@@ -252,7 +252,7 @@ void EnDntNomal_TargetWait(EnDntNomal* this, PlayState* play) {
if (!LINK_IS_ADULT && !Flags_GetItemGetInf(ITEMGETINF_1D)) {
this->hitCounter++;
if (this->hitCounter >= 3) {
- if(gSaveContext.n64ddFlag) {
+ if(IS_RANDO) {
this->actionFunc = EnDntNomal_TargetGivePrize;
} else {
OnePointCutscene_Init(play, 4140, -99, &this->actor, MAIN_CAM);
@@ -862,7 +862,7 @@ void EnDntNomal_DrawStageScrub(Actor* thisx, PlayState* play) {
OPEN_DISPS(play->state.gfxCtx);
Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(blinkTex[this->eyeState]));
- SkelAnime_DrawOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, EnDntNomal_OverrideLimbDraw,
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnDntNomal_OverrideLimbDraw,
EnDntNomal_PostLimbDraw, this);
Matrix_Translate(this->flowerPos.x, this->flowerPos.y, this->flowerPos.z, MTXMODE_NEW);
Matrix_Scale(0.01f, 0.01f, 0.01f, MTXMODE_APPLY);
@@ -883,7 +883,7 @@ void EnDntNomal_DrawTargetScrub(Actor* thisx, PlayState* play) {
OPEN_DISPS(play->state.gfxCtx);
Gfx_SetupDL_25Opa(play->state.gfxCtx);
- SkelAnime_DrawOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, NULL, EnDntNomal_PostLimbDraw,
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, NULL, EnDntNomal_PostLimbDraw,
this);
Matrix_Translate(this->flowerPos.x, this->flowerPos.y, this->flowerPos.z, MTXMODE_NEW);
Matrix_Scale(0.01f, 0.01f, 0.01f, MTXMODE_APPLY);
diff --git a/soh/src/overlays/actors/ovl_En_Dodojr/z_en_dodojr.c b/soh/src/overlays/actors/ovl_En_Dodojr/z_en_dodojr.c
index 7afd537bd..96b18b372 100644
--- a/soh/src/overlays/actors/ovl_En_Dodojr/z_en_dodojr.c
+++ b/soh/src/overlays/actors/ovl_En_Dodojr/z_en_dodojr.c
@@ -648,7 +648,8 @@ void EnDodojr_Draw(Actor* thisx, PlayState* play) {
if ((this->actionFunc != func_809F73AC) && (this->actionFunc != func_809F7BE4)) {
Gfx_SetupDL_25Opa(play->state.gfxCtx);
- SkelAnime_DrawOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, func_809F7D50, func_809F7DFC,
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, func_809F7D50,
+ func_809F7DFC,
&this->actor);
}
}
diff --git a/soh/src/overlays/actors/ovl_En_Dodongo/z_en_dodongo.c b/soh/src/overlays/actors/ovl_En_Dodongo/z_en_dodongo.c
index bca95bdc4..359477614 100644
--- a/soh/src/overlays/actors/ovl_En_Dodongo/z_en_dodongo.c
+++ b/soh/src/overlays/actors/ovl_En_Dodongo/z_en_dodongo.c
@@ -923,7 +923,7 @@ void EnDodongo_Draw(Actor* thisx, PlayState* play2) {
s32 index;
Gfx_SetupDL_25Opa(play->state.gfxCtx);
- SkelAnime_DrawOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, EnDodongo_OverrideLimbDraw,
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnDodongo_OverrideLimbDraw,
EnDodongo_PostLimbDraw, this);
if (this->iceTimer != 0) {
diff --git a/soh/src/overlays/actors/ovl_En_Dog/z_en_dog.c b/soh/src/overlays/actors/ovl_En_Dog/z_en_dog.c
index 6d69969de..38a1cf95b 100644
--- a/soh/src/overlays/actors/ovl_En_Dog/z_en_dog.c
+++ b/soh/src/overlays/actors/ovl_En_Dog/z_en_dog.c
@@ -515,8 +515,7 @@ void EnDog_Draw(Actor* thisx, PlayState* play) {
gDPSetEnvColor(POLY_OPA_DISP++, colors[this->actor.params & 0xF].r, colors[this->actor.params & 0xF].g,
colors[this->actor.params & 0xF].b, 0);
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
- EnDog_OverrideLimbDraw, EnDog_PostLimbDraw, this);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnDog_OverrideLimbDraw, EnDog_PostLimbDraw, this);
CLOSE_DISPS(play->state.gfxCtx);
}
diff --git a/soh/src/overlays/actors/ovl_En_Door/z_en_door.c b/soh/src/overlays/actors/ovl_En_Door/z_en_door.c
index 8f65d464e..f0442821a 100644
--- a/soh/src/overlays/actors/ovl_En_Door/z_en_door.c
+++ b/soh/src/overlays/actors/ovl_En_Door/z_en_door.c
@@ -338,7 +338,8 @@ void EnDoor_Draw(Actor* thisx, PlayState* play) {
OPEN_DISPS(play->state.gfxCtx);
Gfx_SetupDL_25Opa(play->state.gfxCtx);
- SkelAnime_DrawOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, EnDoor_OverrideLimbDraw,
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime,
+ EnDoor_OverrideLimbDraw,
NULL, &this->actor);
if (this->actor.world.rot.y != 0) {
if (this->actor.world.rot.y > 0) {
diff --git a/soh/src/overlays/actors/ovl_En_Ds/z_en_ds.c b/soh/src/overlays/actors/ovl_En_Ds/z_en_ds.c
index 21891b219..6da75b1e7 100644
--- a/soh/src/overlays/actors/ovl_En_Ds/z_en_ds.c
+++ b/soh/src/overlays/actors/ovl_En_Ds/z_en_ds.c
@@ -96,7 +96,7 @@ void EnDs_GiveOddPotion(EnDs* this, PlayState* play) {
gSaveContext.timer2State = 0;
} else {
u32 itemId = GI_ODD_POTION;
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
GetItemEntry itemEntry = Randomizer_GetItemFromKnownCheck(RC_KAK_TRADE_ODD_MUSHROOM, GI_ODD_POTION);
GiveItemEntryFromActor(&this->actor, play, itemEntry, 10000.0f, 50.0f);
Randomizer_ConsumeAdultTradeItem(play, ITEM_ODD_MUSHROOM);
@@ -111,7 +111,7 @@ void EnDs_TalkAfterBrewOddPotion(EnDs* this, PlayState* play) {
Message_CloseTextbox(play);
this->actionFunc = EnDs_GiveOddPotion;
u32 itemId = GI_ODD_POTION;
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
GetItemEntry itemEntry = Randomizer_GetItemFromKnownCheck(RC_KAK_TRADE_ODD_MUSHROOM, GI_ODD_POTION);
GiveItemEntryFromActor(&this->actor, play, itemEntry, 10000.0f, 50.0f);
Randomizer_ConsumeAdultTradeItem(play, ITEM_ODD_MUSHROOM);
@@ -138,7 +138,7 @@ void EnDs_BrewOddPotion2(EnDs* this, PlayState* play) {
this->brewTimer -= 1;
} else {
this->actionFunc = EnDs_BrewOddPotion3;
- this->brewTimer = gSaveContext.n64ddFlag ? 0 : 60;
+ this->brewTimer = IS_RANDO ? 0 : 60;
Flags_UnsetSwitch(play, 0x3F);
}
}
@@ -148,7 +148,7 @@ void EnDs_BrewOddPotion1(EnDs* this, PlayState* play) {
this->brewTimer -= 1;
} else {
this->actionFunc = EnDs_BrewOddPotion2;
- this->brewTimer = gSaveContext.n64ddFlag ? 0 : 20;
+ this->brewTimer = IS_RANDO ? 0 : 20;
}
Math_StepToF(&this->unk_1E4, 1.0f, 0.01f);
@@ -162,7 +162,7 @@ void EnDs_OfferOddPotion(EnDs* this, PlayState* play) {
switch (play->msgCtx.choiceIndex) {
case 0: // yes
this->actionFunc = EnDs_BrewOddPotion1;
- this->brewTimer = gSaveContext.n64ddFlag ? 0 : 60;
+ this->brewTimer = IS_RANDO ? 0 : 60;
Flags_SetSwitch(play, 0x3F);
play->msgCtx.msgMode = MSGMODE_PAUSED;
player->exchangeItemId = EXCH_ITEM_NONE;
@@ -175,7 +175,7 @@ void EnDs_OfferOddPotion(EnDs* this, PlayState* play) {
}
u8 EnDs_RandoCanGetGrannyItem() {
- return gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_MERCHANTS) != RO_SHUFFLE_MERCHANTS_OFF &&
+ return IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_MERCHANTS) != RO_SHUFFLE_MERCHANTS_OFF &&
!Flags_GetRandomizerInf(RAND_INF_MERCHANTS_GRANNYS_SHOP) &&
// Traded odd mushroom when adult trade is on
((Randomizer_GetSettingValue(RSK_SHUFFLE_ADULT_TRADE) && Flags_GetItemGetInf(ITEMGETINF_30)) ||
@@ -263,7 +263,7 @@ void EnDs_Wait(EnDs* this, PlayState* play) {
this->actionFunc = EnDs_OfferOddPotion;
} else if (
// Always offer blue potion when adult trade is off
- (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_ADULT_TRADE) == RO_GENERIC_OFF) ||
+ (IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_ADULT_TRADE) == RO_GENERIC_OFF) ||
Flags_GetItemGetInf(ITEMGETINF_30)) { // Traded odd mushroom
player->actor.textId = 0x500C;
this->actionFunc = EnDs_OfferBluePotion;
@@ -328,6 +328,5 @@ void EnDs_Draw(Actor* thisx, PlayState* play) {
EnDs* this = (EnDs*)thisx;
Gfx_SetupDL_37Opa(play->state.gfxCtx);
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
- EnDs_OverrideLimbDraw, EnDs_PostLimbDraw, this);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnDs_OverrideLimbDraw, EnDs_PostLimbDraw, this);
}
diff --git a/soh/src/overlays/actors/ovl_En_Du/z_en_du.c b/soh/src/overlays/actors/ovl_En_Du/z_en_du.c
index 21f34dc9f..acd64e308 100644
--- a/soh/src/overlays/actors/ovl_En_Du/z_en_du.c
+++ b/soh/src/overlays/actors/ovl_En_Du/z_en_du.c
@@ -344,7 +344,7 @@ void func_809FE4A4(EnDu* this, PlayState* play) {
play->msgCtx.ocarinaMode = OCARINA_MODE_00;
EnDu_SetupAction(this, func_809FE3C0);
} else if (play->msgCtx.ocarinaMode >= OCARINA_MODE_06) {
- if (!gSaveContext.n64ddFlag) {
+ if (!IS_RANDO) {
play->csCtx.segment = SEGMENTED_TO_VIRTUAL(gGoronCityDaruniaWrongCs);
gSaveContext.cutsceneTrigger = 1;
}
@@ -353,7 +353,7 @@ void func_809FE4A4(EnDu* this, PlayState* play) {
play->msgCtx.ocarinaMode = OCARINA_MODE_04;
} else if (play->msgCtx.ocarinaMode == OCARINA_MODE_03) {
Audio_PlaySoundGeneral(NA_SE_SY_CORRECT_CHIME, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
- if (!gSaveContext.n64ddFlag) {
+ if (!IS_RANDO) {
play->csCtx.segment = SEGMENTED_TO_VIRTUAL(gGoronCityDaruniaCorrectCs);
gSaveContext.cutsceneTrigger = 1;
}
@@ -442,8 +442,8 @@ void func_809FE890(EnDu* this, PlayState* play) {
Vec3f velocity = { 0.0f, 0.0f, 0.0f };
CsCmdActorAction* csAction;
- if (play->csCtx.state == CS_STATE_IDLE || gSaveContext.n64ddFlag) {
- if (gSaveContext.n64ddFlag) {
+ if (play->csCtx.state == CS_STATE_IDLE || IS_RANDO) {
+ if (IS_RANDO) {
play->csCtx.state = CS_STATE_IDLE;
}
func_8002DF54(play, &this->actor, 1);
@@ -518,9 +518,9 @@ void func_809FEB08(EnDu* this, PlayState* play) {
EnDu_SetupAction(this, func_809FE3C0);
return;
}
- if ((!gSaveContext.n64ddFlag && CUR_UPG_VALUE(UPG_STRENGTH) <= 0) ||
- (gSaveContext.n64ddFlag && !Flags_GetTreasure(play, 0x1E))) {
- if (gSaveContext.n64ddFlag) {
+ if ((!IS_RANDO && CUR_UPG_VALUE(UPG_STRENGTH) <= 0) ||
+ (IS_RANDO && !Flags_GetTreasure(play, 0x1E))) {
+ if (IS_RANDO) {
Flags_SetTreasure(play, 0x1E);
}
this->actor.textId = 0x301C;
@@ -548,7 +548,7 @@ void func_809FEC70(EnDu* this, PlayState* play) {
EnDu_SetupAction(this, func_809FECE4);
} else {
f32 xzRange = this->actor.xzDistToPlayer + 1.0f;
- if (!gSaveContext.n64ddFlag) {
+ if (!IS_RANDO) {
func_8002F434(&this->actor, play, GI_BRACELET, xzRange, fabsf(this->actor.yDistToPlayer) + 1.0f);
} else {
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_GC_DARUNIAS_JOY, GI_BRACELET);
diff --git a/soh/src/overlays/actors/ovl_En_Ex_Item/z_en_ex_item.c b/soh/src/overlays/actors/ovl_En_Ex_Item/z_en_ex_item.c
index d5941d348..8d8c2c543 100644
--- a/soh/src/overlays/actors/ovl_En_Ex_Item/z_en_ex_item.c
+++ b/soh/src/overlays/actors/ovl_En_Ex_Item/z_en_ex_item.c
@@ -137,7 +137,7 @@ void EnExItem_WaitForObject(EnExItem* this, PlayState* play) {
onCounter = true;
case EXITEM_BOMB_BAG_BOWLING:
this->unk_17C = func_8002EBCC;
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
this->giDrawId =
Randomizer_GetItemFromKnownCheck(RC_MARKET_BOMBCHU_BOWLING_FIRST_PRIZE, GI_BOMB_BAG_20).gid;
} else {
@@ -150,7 +150,7 @@ void EnExItem_WaitForObject(EnExItem* this, PlayState* play) {
this->actionFunc = EnExItem_BowlPrize;
} else {
this->actionFunc = EnExItem_SetupBowlCounter;
- this->actor.shape.yOffset = gSaveContext.n64ddFlag ? -10.0f : -18.0f;
+ this->actor.shape.yOffset = IS_RANDO ? -10.0f : -18.0f;
}
break;
case EXITEM_HEART_PIECE_COUNTER:
@@ -172,7 +172,7 @@ void EnExItem_WaitForObject(EnExItem* this, PlayState* play) {
onCounter = true;
case EXITEM_BOMBCHUS_BOWLING:
this->unk_17C = func_8002EBCC;
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
this->giDrawId = Randomizer_GetItemFromKnownCheck(RC_MARKET_BOMBCHU_BOWLING_BOMBCHUS, GI_BOMBCHUS_10).gid;
} else {
this->giDrawId = GID_BOMBCHU;
@@ -228,7 +228,7 @@ void EnExItem_WaitForObject(EnExItem* this, PlayState* play) {
this->scale = 0.5f;
this->unkFloat = 0.5f;
this->actor.velocity.y = 10.0f;
- if (!gSaveContext.n64ddFlag || !Randomizer_GetSettingValue(RSK_SHUFFLE_CHEST_MINIGAME)) {
+ if (!IS_RANDO || !Randomizer_GetSettingValue(RSK_SHUFFLE_CHEST_MINIGAME)) {
switch (this->type) {
case EXITEM_GREEN_RUPEE_CHEST:
this->giDrawId = GID_RUPEE_GREEN;
@@ -376,7 +376,7 @@ void EnExItem_TargetPrizeApproach(EnExItem* this, PlayState* play) {
Math_SmoothStepToS(&this->actor.shape.rot.y, -0x4000, 5, 0x1000, 0);
}
- if (!gSaveContext.n64ddFlag && this->timer != 0) {
+ if (!IS_RANDO && this->timer != 0) {
if (this->prizeRotateTimer != 0) {
tmpf1 = play->view.lookAt.x - play->view.eye.x;
tmpf2 = play->view.lookAt.y - 10.0f - play->view.eye.y;
@@ -402,7 +402,7 @@ void EnExItem_TargetPrizeApproach(EnExItem* this, PlayState* play) {
this->actor.draw = NULL;
func_8002DF54(play, NULL, 7);
this->actor.parent = NULL;
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
GET_PLAYER(play)->stateFlags1 &= ~(PLAYER_STATE1_GETTING_ITEM | PLAYER_STATE1_ITEM_OVER_HEAD);
getItemEntry = Randomizer_GetItemFromKnownCheck(RC_LW_TARGET_IN_WOODS, GI_BULLET_BAG_50);
getItemId = getItemEntry.getItemId;
@@ -414,7 +414,7 @@ void EnExItem_TargetPrizeApproach(EnExItem* this, PlayState* play) {
}
}
- if (!gSaveContext.n64ddFlag || getItemEntry.getItemId == GI_NONE) {
+ if (!IS_RANDO || getItemEntry.getItemId == GI_NONE) {
func_8002F434(&this->actor, play, getItemId, 2000.0f, 1000.0f);
} else {
GiveItemEntryFromActor(&this->actor, play, getItemEntry, 2000.0f, 1000.0f);
@@ -427,7 +427,7 @@ void EnExItem_TargetPrizeGive(EnExItem* this, PlayState* play) {
if (Actor_HasParent(&this->actor, play)) {
this->actionFunc = EnExItem_TargetPrizeFinish;
} else {
- if (!gSaveContext.n64ddFlag) {
+ if (!IS_RANDO) {
s32 getItemId = (CUR_UPG_VALUE(UPG_BULLET_BAG) == 2) ? GI_BULLET_BAG_50 : GI_BULLET_BAG_40;
func_8002F434(&this->actor, play, getItemId, 2000.0f, 1000.0f);
} else {
@@ -510,7 +510,7 @@ void EnExItem_DrawItems(EnExItem* this, PlayState* play) {
}
if (this) {}
func_8002ED80(&this->actor, play, 0);
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
GetItemEntry randoGetItem = (GetItemEntry)GET_ITEM_NONE;
switch (this->type) {
case EXITEM_BOMB_BAG_BOWLING:
@@ -539,7 +539,7 @@ void EnExItem_DrawItems(EnExItem* this, PlayState* play) {
void EnExItem_DrawHeartPiece(EnExItem* this, PlayState* play) {
func_8002ED80(&this->actor, play, 0);
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
GetItemEntry randoGetItem =
Randomizer_GetItemFromKnownCheck(RC_MARKET_BOMBCHU_BOWLING_SECOND_PRIZE, GI_HEART_PIECE);
EnItem00_CustomItemsParticles(&this->actor, play, randoGetItem);
diff --git a/soh/src/overlays/actors/ovl_En_Fish/z_en_fish.c b/soh/src/overlays/actors/ovl_En_Fish/z_en_fish.c
index ceb9bd759..785d1fbca 100644
--- a/soh/src/overlays/actors/ovl_En_Fish/z_en_fish.c
+++ b/soh/src/overlays/actors/ovl_En_Fish/z_en_fish.c
@@ -764,7 +764,6 @@ void EnFish_Draw(Actor* thisx, PlayState* play) {
EnFish* this = (EnFish*)thisx;
Gfx_SetupDL_25Opa(play->state.gfxCtx);
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
- NULL, NULL, NULL);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, NULL, NULL, NULL);
Collider_UpdateSpheres(0, &this->collider);
}
diff --git a/soh/src/overlays/actors/ovl_En_Fr/z_en_fr.c b/soh/src/overlays/actors/ovl_En_Fr/z_en_fr.c
index 38c54471f..11a7eb026 100644
--- a/soh/src/overlays/actors/ovl_En_Fr/z_en_fr.c
+++ b/soh/src/overlays/actors/ovl_En_Fr/z_en_fr.c
@@ -3,6 +3,7 @@
#include "vt.h"
#include "objects/object_fr/object_fr.h"
#include
+#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_WHILE_CULLED | ACTOR_FLAG_NO_FREEZE_OCARINA)
@@ -103,6 +104,17 @@ static u16 sSongIndex[] = {
0x0002, 0x0004, 0x0010, 0x0008, 0x0020, 0x0040, 0x0001, 0x0000,
};
+static u16 sSongIndexShift[] = {
+ EVENTCHKINF_SONGS_FOR_FROGS_ZL_SHIFT,
+ EVENTCHKINF_SONGS_FOR_FROGS_EPONA_SHIFT,
+ EVENTCHKINF_SONGS_FOR_FROGS_SARIA_SHIFT,
+ EVENTCHKINF_SONGS_FOR_FROGS_SUNS_SHIFT,
+ EVENTCHKINF_SONGS_FOR_FROGS_SOT_SHIFT,
+ EVENTCHKINF_SONGS_FOR_FROGS_STORMS_SHIFT,
+ EVENTCHKINF_SONGS_FOR_FROGS_CHOIR_SHIFT,
+ 0x0, // FROG_NO_SONG
+};
+
// Frog to Index for Song Flag (sSongIndex) Mapping
static u8 sFrogToSongIndex[] = {
FROG_SARIA, FROG_SUNS, FROG_SOT, FROG_ZL, FROG_EPONA,
@@ -955,7 +967,8 @@ void EnFr_SetReward(EnFr* this, PlayState* play) {
if ((songIndex >= FROG_ZL) && (songIndex <= FROG_SOT)) {
if (!(gSaveContext.eventChkInf[13] & sSongIndex[songIndex])) {
gSaveContext.eventChkInf[13] |= sSongIndex[songIndex];
- if (!gSaveContext.n64ddFlag) {
+ GameInteractor_ExecuteOnFlagSet(FLAG_EVENT_CHECK_INF, (EVENTCHKINF_SONGS_FOR_FROGS_INDEX << 4) + sSongIndexShift[songIndex]);
+ if (!IS_RANDO) {
this->reward = GI_RUPEE_PURPLE;
} else {
this->getItemEntry = Randomizer_GetItemFromKnownCheck(EnFr_RandomizerCheckFromSongIndex(songIndex), GI_RUPEE_PURPLE);
@@ -967,7 +980,8 @@ void EnFr_SetReward(EnFr* this, PlayState* play) {
} else if (songIndex == FROG_STORMS) {
if (!(gSaveContext.eventChkInf[13] & sSongIndex[songIndex])) {
gSaveContext.eventChkInf[13] |= sSongIndex[songIndex];
- if (!gSaveContext.n64ddFlag) {
+ GameInteractor_ExecuteOnFlagSet(FLAG_EVENT_CHECK_INF, (EVENTCHKINF_SONGS_FOR_FROGS_INDEX << 4) + sSongIndexShift[songIndex]);
+ if (!IS_RANDO) {
this->reward = GI_HEART_PIECE;
} else {
this->getItemEntry = Randomizer_GetItemFromKnownCheck(RC_ZR_FROGS_IN_THE_RAIN, GI_HEART_PIECE);
@@ -979,7 +993,8 @@ void EnFr_SetReward(EnFr* this, PlayState* play) {
} else if (songIndex == FROG_CHOIR_SONG) {
if (!(gSaveContext.eventChkInf[13] & sSongIndex[songIndex])) {
gSaveContext.eventChkInf[13] |= sSongIndex[songIndex];
- if (!gSaveContext.n64ddFlag) {
+ GameInteractor_ExecuteOnFlagSet(FLAG_EVENT_CHECK_INF, (EVENTCHKINF_SONGS_FOR_FROGS_INDEX << 4) + sSongIndexShift[songIndex]);
+ if (!IS_RANDO) {
this->reward = GI_HEART_PIECE;
} else {
this->getItemEntry = Randomizer_GetItemFromKnownCheck(RC_ZR_FROGS_OCARINA_GAME, GI_HEART_PIECE);
@@ -1034,7 +1049,7 @@ void EnFr_Deactivate(EnFr* this, PlayState* play) {
this->actionFunc = EnFr_Idle;
} else {
this->actionFunc = EnFr_GiveReward;
- if (!gSaveContext.n64ddFlag || this->getItemEntry.getItemId == GI_NONE) {
+ if (!IS_RANDO || this->getItemEntry.getItemId == GI_NONE) {
func_8002F434(&this->actor, play, this->reward, 30.0f, 100.0f);
} else {
GiveItemEntryFromActor(&this->actor, play, this->getItemEntry, 30.0f, 100.0f);
@@ -1047,7 +1062,7 @@ void EnFr_GiveReward(EnFr* this, PlayState* play) {
this->actor.parent = NULL;
this->actionFunc = EnFr_SetIdle;
} else {
- if (!gSaveContext.n64ddFlag || this->getItemEntry.getItemId == GI_NONE) {
+ if (!IS_RANDO || this->getItemEntry.getItemId == GI_NONE) {
func_8002F434(&this->actor, play, this->reward, 30.0f, 100.0f);
} else {
GiveItemEntryFromActor(&this->actor, play, this->getItemEntry, 30.0f, 100.0f);
@@ -1056,7 +1071,7 @@ void EnFr_GiveReward(EnFr* this, PlayState* play) {
}
void EnFr_SetIdle(EnFr* this, PlayState* play) {
- if ((Message_GetState(&play->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(play) || (gSaveContext.n64ddFlag && this->reward == RG_ICE_TRAP)) {
+ if ((Message_GetState(&play->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(play) || (IS_RANDO && this->reward == RG_ICE_TRAP)) {
this->actionFunc = EnFr_Idle;
}
}
@@ -1115,13 +1130,13 @@ void EnFr_Draw(Actor* thisx, PlayState* play) {
gDPSetEnvColor(POLY_OPA_DISP++, sEnFrColor[frogIndex].r, sEnFrColor[frogIndex].g, sEnFrColor[frogIndex].b, 255);
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(eyeTextures[this->eyeTexIndex]));
gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(eyeTextures[this->eyeTexIndex]));
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
- EnFr_OverrideLimbDraw, EnFr_PostLimbDraw, this);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnFr_OverrideLimbDraw, EnFr_PostLimbDraw, this);
if (this->isButterflyDrawn) {
Matrix_Translate(this->posButterfly.x, this->posButterfly.y, this->posButterfly.z, MTXMODE_NEW);
Matrix_Scale(0.015f, 0.015f, 0.015f, MTXMODE_APPLY);
Matrix_RotateZYX(this->actor.shape.rot.x, this->actor.shape.rot.y, this->actor.shape.rot.z, MTXMODE_APPLY);
- SkelAnime_DrawOpa(play, this->skelAnimeButterfly.skeleton, this->skelAnimeButterfly.jointTable, NULL, NULL,
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnimeButterfly, NULL,
+ NULL,
NULL);
}
CLOSE_DISPS(play->state.gfxCtx);
diff --git a/soh/src/overlays/actors/ovl_En_Fu/z_en_fu.c b/soh/src/overlays/actors/ovl_En_Fu/z_en_fu.c
index 58c0fc67f..278fb18e2 100644
--- a/soh/src/overlays/actors/ovl_En_Fu/z_en_fu.c
+++ b/soh/src/overlays/actors/ovl_En_Fu/z_en_fu.c
@@ -172,7 +172,7 @@ void func_80A1DB60(EnFu* this, PlayState* play) {
play->msgCtx.ocarinaMode = OCARINA_MODE_04;
}
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
this->actionFunc = func_WaitForSongGive;
}
}
@@ -186,7 +186,7 @@ void func_80A1DBA0(EnFu* this, PlayState* play) {
void func_80A1DBD4(EnFu* this, PlayState* play) {
Player* player = GET_PLAYER(play);
- if (gSaveContext.n64ddFlag && (Message_GetState(&play->msgCtx) == TEXT_STATE_CLOSING)) {
+ if (IS_RANDO && (Message_GetState(&play->msgCtx) == TEXT_STATE_CLOSING)) {
play->msgCtx.ocarinaMode = OCARINA_MODE_03;
}
@@ -199,7 +199,7 @@ void func_80A1DBD4(EnFu* this, PlayState* play) {
this->actionFunc = func_80A1DB60;
this->actor.flags &= ~ACTOR_FLAG_WILL_TALK;
- if (!gSaveContext.n64ddFlag) {
+ if (!IS_RANDO) {
play->csCtx.segment = SEGMENTED_TO_VIRTUAL(gSongOfStormsCs);
gSaveContext.cutsceneTrigger = 1;
Item_Give(play, ITEM_SONG_STORMS);
@@ -249,7 +249,7 @@ void EnFu_WaitAdult(EnFu* this, PlayState* play) {
} else if (player->stateFlags2 & 0x1000000) {
this->actor.textId = 0x5035;
Message_StartTextbox(play, this->actor.textId, NULL);
- this->actionFunc = gSaveContext.n64ddFlag ? func_80A1DBD4 : EnFu_TeachSong;
+ this->actionFunc = IS_RANDO ? func_80A1DBD4 : EnFu_TeachSong;
this->behaviorFlags |= FU_WAIT;
} else if (Actor_ProcessTalkRequest(&this->actor, play)) {
this->actionFunc = func_80A1DBA0;
@@ -332,8 +332,7 @@ void EnFu_Draw(Actor* thisx, PlayState* play) {
Gfx_SetupDL_37Opa(play->state.gfxCtx);
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sEyesSegments[this->facialExpression]));
gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(sMouthSegments[this->facialExpression]));
- SkelAnime_DrawFlexOpa(play, this->skelanime.skeleton, this->skelanime.jointTable, this->skelanime.dListCount,
- EnFu_OverrideLimbDraw, EnFu_PostLimbDraw, this);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelanime, EnFu_OverrideLimbDraw, EnFu_PostLimbDraw, this);
CLOSE_DISPS(play->state.gfxCtx);
}
diff --git a/soh/src/overlays/actors/ovl_En_Fw/z_en_fw.c b/soh/src/overlays/actors/ovl_En_Fw/z_en_fw.c
index 3960d8544..61f009e47 100644
--- a/soh/src/overlays/actors/ovl_En_Fw/z_en_fw.c
+++ b/soh/src/overlays/actors/ovl_En_Fw/z_en_fw.c
@@ -406,8 +406,7 @@ void EnFw_Draw(Actor* thisx, PlayState* play) {
EnFw_DrawDust(this, play);
Matrix_Pop();
Gfx_SetupDL_25Opa(play->state.gfxCtx);
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
- EnFw_OverrideLimbDraw, EnFw_PostLimbDraw, this);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnFw_OverrideLimbDraw, EnFw_PostLimbDraw, this);
}
void EnFw_AddDust(EnFw* this, Vec3f* initialPos, Vec3f* initialSpeed, Vec3f* accel, u8 initialTimer, f32 scale,
diff --git a/soh/src/overlays/actors/ovl_En_Gb/z_en_gb.c b/soh/src/overlays/actors/ovl_En_Gb/z_en_gb.c
index ab4344f53..9cbdf05c9 100644
--- a/soh/src/overlays/actors/ovl_En_Gb/z_en_gb.c
+++ b/soh/src/overlays/actors/ovl_En_Gb/z_en_gb.c
@@ -359,7 +359,7 @@ void func_80A2FA50(EnGb* this, PlayState* play) {
void func_80A2FB40(EnGb* this, PlayState* play) {
if (Message_GetState(&play->msgCtx) == TEXT_STATE_DONE && Message_ShouldAdvance(play)) {
- if (!gSaveContext.n64ddFlag) {
+ if (!IS_RANDO) {
func_8002F434(&this->dyna.actor, play, GI_BOTTLE, 100.0f, 10.0f);
} else {
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_MARKET_10_BIG_POES, GI_BOTTLE);
@@ -374,7 +374,7 @@ void func_80A2FBB0(EnGb* this, PlayState* play) {
this->dyna.actor.parent = NULL;
this->actionFunc = func_80A2FC0C;
} else {
- if (!gSaveContext.n64ddFlag) {
+ if (!IS_RANDO) {
func_8002F434(&this->dyna.actor, play, GI_BOTTLE, 100.0f, 10.0f);
} else {
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_MARKET_10_BIG_POES, GI_BOTTLE);
@@ -451,8 +451,7 @@ void EnGb_Draw(Actor* thisx, PlayState* play) {
Lights_PointNoGlowSetInfo(&this->lightInfo, this->dyna.actor.world.pos.x, this->dyna.actor.world.pos.y,
this->dyna.actor.world.pos.z, this->lightColor.r, this->lightColor.g, this->lightColor.b,
this->lightColor.a);
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
- NULL, NULL, &this->dyna.actor);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, NULL, NULL, &this->dyna.actor);
EnGb_DrawCagedSouls(this, play);
CLOSE_DISPS(play->state.gfxCtx);
}
diff --git a/soh/src/overlays/actors/ovl_En_Ge1/z_en_ge1.c b/soh/src/overlays/actors/ovl_En_Ge1/z_en_ge1.c
index a442f582a..813ed9373 100644
--- a/soh/src/overlays/actors/ovl_En_Ge1/z_en_ge1.c
+++ b/soh/src/overlays/actors/ovl_En_Ge1/z_en_ge1.c
@@ -95,7 +95,7 @@ void EnGe1_Init(Actor* thisx, PlayState* play) {
EnGe1* this = (EnGe1*)thisx;
// When spawning the gate operator, also spawn an extra gate operator on the wasteland side
- if (gSaveContext.n64ddFlag && (Randomizer_GetSettingValue(RSK_SHUFFLE_GERUDO_MEMBERSHIP_CARD) ||
+ if (IS_RANDO && (Randomizer_GetSettingValue(RSK_SHUFFLE_GERUDO_MEMBERSHIP_CARD) ||
Randomizer_GetSettingValue(RSK_SHUFFLE_OVERWORLD_ENTRANCES)) && (this->actor.params & 0xFF) == GE1_TYPE_GATE_OPERATOR) {
// Spawn the extra gaurd with params matching the custom type added (0x0300 + 0x02)
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_GE1, -1358.0f, 88.0f, -3018.0f, 0, 0x95B0, 0,
@@ -185,7 +185,7 @@ void EnGe1_Init(Actor* thisx, PlayState* play) {
if (EnGe1_CheckCarpentersFreed()) {
// If the gtg gate is permanently open, don't let the gaurd charge to open it again
- if (gSaveContext.n64ddFlag && gSaveContext.sceneFlags[93].swch & 0x00000004) {
+ if (IS_RANDO && gSaveContext.sceneFlags[93].swch & 0x00000004) {
this->actionFunc = EnGe1_SetNormalText;
} else {
this->actionFunc = EnGe1_CheckForCard_GTGGuard;
@@ -235,7 +235,7 @@ void EnGe1_SetAnimationIdle(EnGe1* this) {
}
s32 EnGe1_CheckCarpentersFreed(void) {
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
if (CHECK_QUEST_ITEM(QUEST_GERUDO_CARD)) {
return 1;
} else {
@@ -269,7 +269,7 @@ void EnGe1_KickPlayer(EnGe1* this, PlayState* play) {
play->nextEntranceIndex = 0x3B4;
}
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
Entrance_OverrideGeurdoGuardCapture();
}
@@ -532,7 +532,7 @@ void EnGe1_WaitTillItemGiven_Archery(EnGe1* this, PlayState* play) {
s32 getItemId;
if (Actor_HasParent(&this->actor, play)) {
- if (gSaveContext.n64ddFlag && gSaveContext.minigameScore >= 1500 && !Flags_GetInfTable(INFTABLE_190)) {
+ if (IS_RANDO && gSaveContext.minigameScore >= 1500 && !Flags_GetInfTable(INFTABLE_190)) {
Flags_SetItemGetInf(ITEMGETINF_0F);
Flags_SetInfTable(INFTABLE_190);
this->stateFlags |= GE1_STATE_GIVE_QUIVER;
@@ -549,7 +549,7 @@ void EnGe1_WaitTillItemGiven_Archery(EnGe1* this, PlayState* play) {
}
} else {
if (this->stateFlags & GE1_STATE_GIVE_QUIVER) {
- if (!gSaveContext.n64ddFlag) {
+ if (!IS_RANDO) {
switch (CUR_UPG_VALUE(UPG_QUIVER)) {
//! @bug Asschest. See next function for details
case 1:
@@ -564,7 +564,7 @@ void EnGe1_WaitTillItemGiven_Archery(EnGe1* this, PlayState* play) {
getItemId = getItemEntry.getItemId;
}
} else {
- if (!gSaveContext.n64ddFlag) {
+ if (!IS_RANDO) {
getItemId = GI_HEART_PIECE;
} else {
getItemEntry = Randomizer_GetItemFromKnownCheck(RC_GF_HBA_1000_POINTS, GI_HEART_PIECE);
@@ -572,7 +572,7 @@ void EnGe1_WaitTillItemGiven_Archery(EnGe1* this, PlayState* play) {
}
}
- if (!gSaveContext.n64ddFlag || getItemEntry.getItemId == GI_NONE) {
+ if (!IS_RANDO || getItemEntry.getItemId == GI_NONE) {
func_8002F434(&this->actor, play, getItemId, 10000.0f, 50.0f);
} else {
GiveItemEntryFromActor(&this->actor, play, getItemEntry, 10000.0f, 50.0f);
@@ -590,7 +590,7 @@ void EnGe1_BeginGiveItem_Archery(EnGe1* this, PlayState* play) {
}
if (this->stateFlags & GE1_STATE_GIVE_QUIVER) {
- if (!gSaveContext.n64ddFlag) {
+ if (!IS_RANDO) {
switch (CUR_UPG_VALUE(UPG_QUIVER)) {
//! @bug Asschest. See next function for details
case 1:
@@ -605,7 +605,7 @@ void EnGe1_BeginGiveItem_Archery(EnGe1* this, PlayState* play) {
getItemId = getItemEntry.getItemId;
}
} else {
- if (!gSaveContext.n64ddFlag) {
+ if (!IS_RANDO) {
getItemId = GI_HEART_PIECE;
} else {
getItemEntry = Randomizer_GetItemFromKnownCheck(RC_GF_HBA_1000_POINTS, GI_HEART_PIECE);
@@ -613,7 +613,7 @@ void EnGe1_BeginGiveItem_Archery(EnGe1* this, PlayState* play) {
}
}
- if (!gSaveContext.n64ddFlag || getItemEntry.getItemId == GI_NONE) {
+ if (!IS_RANDO || getItemEntry.getItemId == GI_NONE) {
func_8002F434(&this->actor, play, getItemId, 10000.0f, 50.0f);
} else {
GiveItemEntryFromActor(&this->actor, play, getItemEntry, 10000.0f, 50.0f);
@@ -880,8 +880,7 @@ void EnGe1_Draw(Actor* thisx, PlayState* play) {
Gfx_SetupDL_37Opa(play->state.gfxCtx);
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sEyeTextures[this->eyeIndex]));
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
- EnGe1_OverrideLimbDraw, EnGe1_PostLimbDraw, this);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnGe1_OverrideLimbDraw, EnGe1_PostLimbDraw, this);
CLOSE_DISPS(play->state.gfxCtx);
}
diff --git a/soh/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c b/soh/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c
index faccea3ef..eba22b432 100644
--- a/soh/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c
+++ b/soh/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c
@@ -227,7 +227,7 @@ s32 Ge2_DetectPlayerInUpdate(PlayState* play, EnGe2* this, Vec3f* pos, s16 yRot,
}
s32 EnGe2_CheckCarpentersFreed(void) {
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
if (CHECK_QUEST_ITEM(QUEST_GERUDO_CARD)) {
return 1;
} else {
@@ -259,7 +259,7 @@ void EnGe2_CaptureClose(EnGe2* this, PlayState* play) {
play->nextEntranceIndex = 0x3B4;
}
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
Entrance_OverrideGeurdoGuardCapture();
}
@@ -289,7 +289,7 @@ void EnGe2_CaptureCharge(EnGe2* this, PlayState* play) {
play->nextEntranceIndex = 0x3B4;
}
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
Entrance_OverrideGeurdoGuardCapture();
}
@@ -471,7 +471,7 @@ void EnGe2_WaitTillCardGiven(EnGe2* this, PlayState* play) {
this->actor.parent = NULL;
this->actionFunc = EnGe2_SetActionAfterTalk;
} else {
- if (!gSaveContext.n64ddFlag) {
+ if (!IS_RANDO) {
func_8002F434(&this->actor, play, GI_GERUDO_CARD, 10000.0f, 50.0f);
} else {
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_GF_GERUDO_MEMBERSHIP_CARD, GI_GERUDO_CARD);
@@ -485,7 +485,7 @@ void EnGe2_GiveCard(EnGe2* this, PlayState* play) {
Message_CloseTextbox(play);
this->actor.flags &= ~ACTOR_FLAG_WILL_TALK;
this->actionFunc = EnGe2_WaitTillCardGiven;
- if (!gSaveContext.n64ddFlag) {
+ if (!IS_RANDO) {
func_8002F434(&this->actor, play, GI_GERUDO_CARD, 10000.0f, 50.0f);
} else {
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_GF_GERUDO_MEMBERSHIP_CARD, GI_GERUDO_CARD);
@@ -683,8 +683,7 @@ void EnGe2_Draw(Actor* thisx, PlayState* play) {
Gfx_SetupDL_37Opa(play->state.gfxCtx);
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(eyeTextures[this->eyeIndex]));
func_8002EBCC(&this->actor, play, 0);
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
- EnGe2_OverrideLimbDraw, EnGe2_PostLimbDraw, this);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnGe2_OverrideLimbDraw, EnGe2_PostLimbDraw, this);
CLOSE_DISPS(play->state.gfxCtx);
}
diff --git a/soh/src/overlays/actors/ovl_En_Ge3/z_en_ge3.c b/soh/src/overlays/actors/ovl_En_Ge3/z_en_ge3.c
index a4d060502..90d2981f0 100644
--- a/soh/src/overlays/actors/ovl_En_Ge3/z_en_ge3.c
+++ b/soh/src/overlays/actors/ovl_En_Ge3/z_en_ge3.c
@@ -144,7 +144,7 @@ void EnGe3_WaitTillCardGiven(EnGe3* this, PlayState* play) {
this->actor.parent = NULL;
this->actionFunc = EnGe3_Wait;
} else {
- if (!gSaveContext.n64ddFlag) {
+ if (!IS_RANDO) {
func_8002F434(&this->actor, play, GI_GERUDO_CARD, 10000.0f, 50.0f);
} else {
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_GF_GERUDO_MEMBERSHIP_CARD, GI_GERUDO_CARD);
@@ -158,7 +158,7 @@ void EnGe3_GiveCard(EnGe3* this, PlayState* play) {
Message_CloseTextbox(play);
this->actor.flags &= ~ACTOR_FLAG_WILL_TALK;
this->actionFunc = EnGe3_WaitTillCardGiven;
- if (!gSaveContext.n64ddFlag) {
+ if (!IS_RANDO) {
func_8002F434(&this->actor, play, GI_GERUDO_CARD, 10000.0f, 50.0f);
} else {
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_GF_GERUDO_MEMBERSHIP_CARD, GI_GERUDO_CARD);
@@ -303,8 +303,7 @@ void EnGe3_Draw(Actor* thisx, PlayState* play2) {
Gfx_SetupDL_37Opa(play->state.gfxCtx);
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(eyeTextures[this->eyeIndex]));
func_8002EBCC(&this->actor, play, 0);
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
- EnGe3_OverrideLimbDraw, EnGe3_PostLimbDraw, this);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime,EnGe3_OverrideLimbDraw, EnGe3_PostLimbDraw, this);
CLOSE_DISPS(play->state.gfxCtx);
}
diff --git a/soh/src/overlays/actors/ovl_En_GeldB/z_en_geldb.c b/soh/src/overlays/actors/ovl_En_GeldB/z_en_geldb.c
index aa2b4f404..f556a6c7f 100644
--- a/soh/src/overlays/actors/ovl_En_GeldB/z_en_geldb.c
+++ b/soh/src/overlays/actors/ovl_En_GeldB/z_en_geldb.c
@@ -1575,7 +1575,7 @@ void EnGeldB_Draw(Actor* thisx, PlayState* play) {
play->nextEntranceIndex = 0x3B4;
}
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
Entrance_OverrideGeurdoGuardCapture();
}
@@ -1588,8 +1588,7 @@ void EnGeldB_Draw(Actor* thisx, PlayState* play) {
if ((this->action != GELDB_WAIT) || !this->invisible) {
Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(eyeTextures[this->blinkState]));
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable,
- this->skelAnime.dListCount, EnGeldB_OverrideLimbDraw, EnGeldB_PostLimbDraw, this);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnGeldB_OverrideLimbDraw, EnGeldB_PostLimbDraw, this);
if (this->action == GELDB_BLOCK) {
s32 i;
Vec3f blockTrisVtx0[3];
diff --git a/soh/src/overlays/actors/ovl_En_GirlA/z_en_girla.c b/soh/src/overlays/actors/ovl_En_GirlA/z_en_girla.c
index f575f60af..bb9ee05c2 100644
--- a/soh/src/overlays/actors/ovl_En_GirlA/z_en_girla.c
+++ b/soh/src/overlays/actors/ovl_En_GirlA/z_en_girla.c
@@ -416,7 +416,7 @@ void EnGirlA_InitItem(EnGirlA* this, PlayState* play) {
return;
}
- if (!gSaveContext.n64ddFlag || Randomizer_GetSettingValue(RSK_SHOPSANITY) == RO_SHOPSANITY_OFF) {
+ if (!IS_RANDO || Randomizer_GetSettingValue(RSK_SHOPSANITY) == RO_SHOPSANITY_OFF) {
this->objBankIndex = Object_GetIndex(&play->objectCtx, shopItemEntries[params].objID);
} else {
s16 objectId = shopItemEntries[params].objID;
@@ -474,7 +474,7 @@ s32 EnGirlA_CanBuy_Arrows(PlayState* play, EnGirlA* this) {
}
s32 EnGirlA_CanBuy_Bombs(PlayState* play, EnGirlA* this) {
- if (!gSaveContext.n64ddFlag && !CHECK_QUEST_ITEM(QUEST_GORON_RUBY)) {
+ if (!IS_RANDO && !CHECK_QUEST_ITEM(QUEST_GORON_RUBY)) {
return CANBUY_RESULT_CANT_GET_NOW;
}
if (AMMO(ITEM_BOMB) >= CUR_CAPACITY(UPG_BOMB_BAG)) {
@@ -605,7 +605,7 @@ s32 EnGirlA_CanBuy_DekuShield(PlayState* play, EnGirlA* this) {
s32 EnGirlA_CanBuy_GoronTunic(PlayState* play, EnGirlA* this) {
if (LINK_AGE_IN_YEARS == YEARS_CHILD &&
- (!gSaveContext.n64ddFlag || Randomizer_GetSettingValue(RSK_SHOPSANITY) == RO_SHOPSANITY_OFF)) {
+ (!IS_RANDO || Randomizer_GetSettingValue(RSK_SHOPSANITY) == RO_SHOPSANITY_OFF)) {
return CANBUY_RESULT_CANT_GET_NOW;
}
if (gBitFlags[9] & gSaveContext.inventory.equipment) {
@@ -622,7 +622,7 @@ s32 EnGirlA_CanBuy_GoronTunic(PlayState* play, EnGirlA* this) {
s32 EnGirlA_CanBuy_ZoraTunic(PlayState* play, EnGirlA* this) {
if (LINK_AGE_IN_YEARS == YEARS_CHILD &&
- (!gSaveContext.n64ddFlag || Randomizer_GetSettingValue(RSK_SHOPSANITY) == RO_SHOPSANITY_OFF)) {
+ (!IS_RANDO || Randomizer_GetSettingValue(RSK_SHOPSANITY) == RO_SHOPSANITY_OFF)) {
return CANBUY_RESULT_CANT_GET_NOW;
}
if (gBitFlags[10] & gSaveContext.inventory.equipment) {
@@ -678,7 +678,7 @@ s32 EnGirlA_CanBuy_Unk20(PlayState* play, EnGirlA* this) {
s32 EnGirlA_CanBuy_Bombchus(PlayState* play, EnGirlA* this) {
// When in rando, don't allow buying bombchus when the player doesn't have required explosives
// If bombchus are in logic, the player needs to have bombchus; otherwise they need a bomb bag
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
u8 bombchusInLogic = Randomizer_GetSettingValue(RSK_BOMBCHUS_IN_LOGIC);
if ((!bombchusInLogic && CUR_CAPACITY(UPG_BOMB_BAG) == 0) ||
(bombchusInLogic && INV_CONTENT(ITEM_BOMBCHU) == ITEM_NONE)) {
@@ -1027,7 +1027,7 @@ void EnGirlA_BuyEvent_ObtainBombchuPack(PlayState* play, EnGirlA* this) {
// Normally, buying a bombchu pack sets a flag indicating the pack is now sold out
// If they're in logic for rando, skip setting that flag so they can be purchased repeatedly
- if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_BOMBCHUS_IN_LOGIC)) {
+ if (IS_RANDO && Randomizer_GetSettingValue(RSK_BOMBCHUS_IN_LOGIC)) {
return;
}
@@ -1254,7 +1254,7 @@ void EnGirlA_InitializeItemAction(EnGirlA* this, PlayState* play) {
this->itemGiveFunc = itemEntry->itemGiveFunc;
this->buyEventFunc = itemEntry->buyEventFunc;
// If chus are in logic, make the 10 pack affordable without a wallet upgrade
- if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_BOMBCHUS_IN_LOGIC) &&
+ if (IS_RANDO && Randomizer_GetSettingValue(RSK_BOMBCHUS_IN_LOGIC) &&
this->getItemId == GI_BOMBCHUS_10) {
this->basePrice = 99;
} else {
diff --git a/soh/src/overlays/actors/ovl_En_Gm/z_en_gm.c b/soh/src/overlays/actors/ovl_En_Gm/z_en_gm.c
index dfbd02309..f461e781c 100644
--- a/soh/src/overlays/actors/ovl_En_Gm/z_en_gm.c
+++ b/soh/src/overlays/actors/ovl_En_Gm/z_en_gm.c
@@ -96,7 +96,7 @@ void EnGm_Destroy(Actor* thisx, PlayState* play) {
s32 func_80A3D7C8(void) {
if (LINK_AGE_IN_YEARS == YEARS_CHILD) {
return 0;
- } else if ((gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_MERCHANTS) != RO_SHUFFLE_MERCHANTS_OFF) &&
+ } else if ((IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_MERCHANTS) != RO_SHUFFLE_MERCHANTS_OFF) &&
!Flags_GetRandomizerInf(RAND_INF_MERCHANTS_MEDIGORON)) {
return 1;
} else if (!(gBitFlags[2] & gSaveContext.inventory.equipment)) { // Don't have giant's knife
@@ -215,7 +215,7 @@ void func_80A3DC44(EnGm* this, PlayState* play) {
return;
case 1:
Flags_SetInfTable(INFTABLE_B1);
- if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_MERCHANTS) != RO_SHUFFLE_MERCHANTS_OFF &&
+ if (IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_MERCHANTS) != RO_SHUFFLE_MERCHANTS_OFF &&
!Flags_GetRandomizerInf(RAND_INF_MERCHANTS_MEDIGORON)) {
//Resets "Talked to Medigoron" flag in infTable to restore initial conversation state
Flags_UnsetInfTable(INFTABLE_B1);
@@ -256,7 +256,7 @@ void EnGm_ProcessChoiceIndex(EnGm* this, PlayState* play) {
} else {
GetItemEntry itemEntry;
- if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_MERCHANTS) != RO_SHUFFLE_MERCHANTS_OFF &&
+ if (IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_MERCHANTS) != RO_SHUFFLE_MERCHANTS_OFF &&
!Flags_GetRandomizerInf(RAND_INF_MERCHANTS_MEDIGORON)) {
itemEntry = Randomizer_GetItemFromKnownCheck(RC_GC_MEDIGORON, GI_SWORD_KNIFE);
GiveItemEntryFromActor(&this->actor, play, itemEntry, 415.0f, 10.0f);
@@ -281,7 +281,7 @@ void EnGm_ProcessChoiceIndex(EnGm* this, PlayState* play) {
void func_80A3DF00(EnGm* this, PlayState* play) {
if (Actor_HasParent(&this->actor, play)) {
- if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_MERCHANTS) != RO_SHUFFLE_MERCHANTS_OFF &&
+ if (IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_MERCHANTS) != RO_SHUFFLE_MERCHANTS_OFF &&
!Flags_GetRandomizerInf(RAND_INF_MERCHANTS_MEDIGORON)) {
Flags_SetRandomizerInf(RAND_INF_MERCHANTS_MEDIGORON);
}
@@ -289,7 +289,7 @@ void func_80A3DF00(EnGm* this, PlayState* play) {
this->actor.parent = NULL;
this->actionFunc = func_80A3DF60;
} else {
- if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_MERCHANTS) != RO_SHUFFLE_MERCHANTS_OFF &&
+ if (IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_MERCHANTS) != RO_SHUFFLE_MERCHANTS_OFF &&
!Flags_GetRandomizerInf(RAND_INF_MERCHANTS_MEDIGORON)) {
GetItemEntry itemEntry = Randomizer_GetItemFromKnownCheck(RC_GC_MEDIGORON, GI_SWORD_KNIFE);
GiveItemEntryFromActor(&this->actor, play, itemEntry, 415.0f, 10.0f);
@@ -362,8 +362,7 @@ void EnGm_Draw(Actor* thisx, PlayState* play) {
Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(eyeTextures[this->eyeTexIndex]));
gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(gGoronCsMouthNeutralTex));
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
- NULL, NULL, &this->actor);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, NULL, NULL, &this->actor);
CLOSE_DISPS(play->state.gfxCtx);
diff --git a/soh/src/overlays/actors/ovl_En_Go/z_en_go.c b/soh/src/overlays/actors/ovl_En_Go/z_en_go.c
index 8a0286def..ea9b13561 100644
--- a/soh/src/overlays/actors/ovl_En_Go/z_en_go.c
+++ b/soh/src/overlays/actors/ovl_En_Go/z_en_go.c
@@ -95,7 +95,7 @@ u16 EnGo_GetTextID(PlayState* play, Actor* thisx) {
switch (thisx->params & 0xF0) {
case 0x90:
- if (!gSaveContext.n64ddFlag && gSaveContext.bgsFlag) {
+ if (!IS_RANDO && gSaveContext.bgsFlag) {
return 0x305E;
} else if (INV_CONTENT(ITEM_TRADE_ADULT) >= ITEM_CLAIM_CHECK) {
if (Environment_GetBgsDayCount() >= CVarGetInteger("gForgeTime", 3)) {
@@ -113,8 +113,8 @@ u16 EnGo_GetTextID(PlayState* play, Actor* thisx) {
return 0x3053;
}
case 0x00:
- if ((!gSaveContext.n64ddFlag && CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE)) ||
- (gSaveContext.n64ddFlag && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_FIRE_TEMPLE))) {
+ if ((!IS_RANDO && CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE)) ||
+ (IS_RANDO && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_FIRE_TEMPLE))) {
if (Flags_GetInfTable(INFTABLE_10F)) {
return 0x3042;
} else {
@@ -859,7 +859,7 @@ void func_80A405CC(EnGo* this, PlayState* play) {
void EnGo_BiggoronActionFunc(EnGo* this, PlayState* play) {
if (((this->actor.params & 0xF0) == 0x90) && (this->interactInfo.talkState == NPC_TALK_STATE_ACTION)) {
- if (!gSaveContext.n64ddFlag && gSaveContext.bgsFlag) {
+ if (!IS_RANDO && gSaveContext.bgsFlag) {
this->interactInfo.talkState = NPC_TALK_STATE_IDLE;
} else {
if (INV_CONTENT(ITEM_TRADE_ADULT) == ITEM_EYEDROPS) {
@@ -958,7 +958,7 @@ void EnGo_GetItem(EnGo* this, PlayState* play) {
this->unk_20C = 0;
if ((this->actor.params & 0xF0) == 0x90) {
if (INV_CONTENT(ITEM_TRADE_ADULT) == ITEM_CLAIM_CHECK) {
- if (!gSaveContext.n64ddFlag) {
+ if (!IS_RANDO) {
getItemId = GI_SWORD_BGS;
} else {
getItemEntry = Randomizer_GetItemFromKnownCheck(RC_DMT_TRADE_CLAIM_CHECK, GI_SWORD_BGS);
@@ -967,7 +967,7 @@ void EnGo_GetItem(EnGo* this, PlayState* play) {
this->unk_20C = 1;
}
if (INV_CONTENT(ITEM_TRADE_ADULT) == ITEM_EYEDROPS) {
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
getItemEntry = Randomizer_GetItemFromKnownCheck(RC_DMT_TRADE_EYEDROPS, GI_CLAIM_CHECK);
getItemId = getItemEntry.getItemId;
Randomizer_ConsumeAdultTradeItem(play, ITEM_EYEDROPS);
@@ -976,7 +976,7 @@ void EnGo_GetItem(EnGo* this, PlayState* play) {
}
}
if (INV_CONTENT(ITEM_TRADE_ADULT) == ITEM_SWORD_BROKEN) {
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
getItemEntry = Randomizer_GetItemFromKnownCheck(RC_DMT_TRADE_BROKEN_SWORD, GI_PRESCRIPTION);
Randomizer_ConsumeAdultTradeItem(play, ITEM_SWORD_BROKEN);
getItemId = getItemEntry.getItemId;
@@ -992,7 +992,7 @@ void EnGo_GetItem(EnGo* this, PlayState* play) {
yDist = fabsf(this->actor.yDistToPlayer) + 1.0f;
xzDist = this->actor.xzDistToPlayer + 1.0f;
- if (!gSaveContext.n64ddFlag || getItemEntry.getItemId == GI_NONE) {
+ if (!IS_RANDO || getItemEntry.getItemId == GI_NONE) {
func_8002F434(&this->actor, play, getItemId, xzDist, yDist);
} else {
GiveItemEntryFromActor(&this->actor, play, getItemEntry, xzDist, yDist);
@@ -1166,8 +1166,7 @@ void EnGo_Draw(Actor* thisx, PlayState* play) {
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(gGoronCsEyeOpenTex));
gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(gGoronCsMouthNeutralTex));
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable,
- this->skelAnime.dListCount, EnGo_OverrideLimbDraw, EnGo_PostLimbDraw, &this->actor);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnGo_OverrideLimbDraw, EnGo_PostLimbDraw, &this->actor);
EnGo_DrawDust(this, play);
}
CLOSE_DISPS(play->state.gfxCtx);
diff --git a/soh/src/overlays/actors/ovl_En_Go2/z_en_go2.c b/soh/src/overlays/actors/ovl_En_Go2/z_en_go2.c
index 69180ee62..02c4d37a7 100644
--- a/soh/src/overlays/actors/ovl_En_Go2/z_en_go2.c
+++ b/soh/src/overlays/actors/ovl_En_Go2/z_en_go2.c
@@ -335,7 +335,7 @@ u16 EnGo2_GoronFireGenericGetTextId(EnGo2* this) {
u16 EnGo2_GetTextIdGoronCityRollingBig(PlayState* play, EnGo2* this) {
if (Flags_GetInfTable(INFTABLE_11E)) {
return 0x3013;
- } else if ((CUR_CAPACITY(UPG_BOMB_BAG) >= 20 || gSaveContext.n64ddFlag) && this->waypoint > 7 && this->waypoint < 12) {
+ } else if ((CUR_CAPACITY(UPG_BOMB_BAG) >= 20 || IS_RANDO) && this->waypoint > 7 && this->waypoint < 12) {
return 0x3012;
} else {
return 0x3011;
@@ -350,7 +350,7 @@ s16 EnGo2_UpdateTalkStateGoronCityRollingBig(PlayState* play, EnGo2* this) {
if (Message_ShouldAdvance(play)) {
if (this->actor.textId == 0x3012) {
this->actionFunc = EnGo2_SetupGetItem;
- if(!gSaveContext.n64ddFlag) {
+ if(!IS_RANDO) {
EnGo2_GetItem(this, play, CUR_CAPACITY(UPG_BOMB_BAG) == 30 ? GI_BOMB_BAG_40 : GI_BOMB_BAG_30);
} else {
EnGo2_GetItemEntry(this, play, Randomizer_GetItemFromKnownCheck(RC_GC_ROLLING_GORON_AS_CHILD, GI_BOMB_BAG_40));
@@ -416,11 +416,11 @@ s16 EnGo2_UpdateTalkStateGoronDmtRollingSmall(PlayState* play, EnGo2* this) {
}
u16 EnGo2_GetTextIdGoronDmtDcEntrance(PlayState* play, EnGo2* this) {
- if (((!gSaveContext.n64ddFlag && CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE)) ||
- (gSaveContext.n64ddFlag && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_FIRE_TEMPLE))) && LINK_IS_ADULT) {
+ if (((!IS_RANDO && CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE)) ||
+ (IS_RANDO && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_FIRE_TEMPLE))) && LINK_IS_ADULT) {
return 0x3043;
- } else if ((!gSaveContext.n64ddFlag && CHECK_QUEST_ITEM(QUEST_GORON_RUBY)) ||
- (gSaveContext.n64ddFlag && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_DODONGOS_CAVERN))) {
+ } else if ((!IS_RANDO && CHECK_QUEST_ITEM(QUEST_GORON_RUBY)) ||
+ (IS_RANDO && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_DODONGOS_CAVERN))) {
return 0x3027;
} else {
return Flags_GetEventChkInf(EVENTCHKINF_BOMBED_DODONGOS_CAVERN_ENTRANCE) ? 0x3021 : Flags_GetInfTable(INFTABLE_E0) ? 0x302A : 0x3008;
@@ -439,11 +439,11 @@ s16 EnGo2_UpdateTalkStateGoronDmtDcEntrance(PlayState* play, EnGo2* this) {
}
u16 EnGo2_GetTextIdGoronCityEntrance(PlayState* play, EnGo2* this) {
- if (((!gSaveContext.n64ddFlag && CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE)) ||
- (gSaveContext.n64ddFlag && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_FIRE_TEMPLE))) && LINK_IS_ADULT) {
+ if (((!IS_RANDO && CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE)) ||
+ (IS_RANDO && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_FIRE_TEMPLE))) && LINK_IS_ADULT) {
return 0x3043;
- } else if ((!gSaveContext.n64ddFlag && CHECK_QUEST_ITEM(QUEST_GORON_RUBY)) ||
- (gSaveContext.n64ddFlag && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_DODONGOS_CAVERN))) {
+ } else if ((!IS_RANDO && CHECK_QUEST_ITEM(QUEST_GORON_RUBY)) ||
+ (IS_RANDO && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_DODONGOS_CAVERN))) {
return 0x3027;
} else {
return Flags_GetInfTable(INFTABLE_F0) ? 0x3015 : 0x3014;
@@ -462,11 +462,11 @@ s16 EnGo2_UpdateTalkStateGoronCityEntrance(PlayState* play, EnGo2* this) {
}
u16 EnGo2_GetTextIdGoronCityIsland(PlayState* play, EnGo2* this) {
- if (((!gSaveContext.n64ddFlag && CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE)) ||
- (gSaveContext.n64ddFlag && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_FIRE_TEMPLE))) && LINK_IS_ADULT) {
+ if (((!IS_RANDO && CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE)) ||
+ (IS_RANDO && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_FIRE_TEMPLE))) && LINK_IS_ADULT) {
return 0x3043;
- } else if ((!gSaveContext.n64ddFlag && CHECK_QUEST_ITEM(QUEST_GORON_RUBY)) ||
- (gSaveContext.n64ddFlag && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_DODONGOS_CAVERN))) {
+ } else if ((!IS_RANDO && CHECK_QUEST_ITEM(QUEST_GORON_RUBY)) ||
+ (IS_RANDO && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_DODONGOS_CAVERN))) {
return 0x3027;
} else {
return Flags_GetInfTable(INFTABLE_F4) ? 0x3017 : 0x3016;
@@ -485,11 +485,11 @@ s16 EnGo2_UpdateTalkStateGoronCityIsland(PlayState* play, EnGo2* this) {
}
u16 EnGo2_GetTextIdGoronCityLowestFloor(PlayState* play, EnGo2* this) {
- if (((!gSaveContext.n64ddFlag && CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE)) ||
- (gSaveContext.n64ddFlag && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_FIRE_TEMPLE))) && LINK_IS_ADULT) {
+ if (((!IS_RANDO && CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE)) ||
+ (IS_RANDO && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_FIRE_TEMPLE))) && LINK_IS_ADULT) {
return 0x3043;
- } else if ((!gSaveContext.n64ddFlag && CHECK_QUEST_ITEM(QUEST_GORON_RUBY)) ||
- (gSaveContext.n64ddFlag && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_DODONGOS_CAVERN))) {
+ } else if ((!IS_RANDO && CHECK_QUEST_ITEM(QUEST_GORON_RUBY)) ||
+ (IS_RANDO && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_DODONGOS_CAVERN))) {
return 0x3027;
} else {
return CUR_UPG_VALUE(UPG_STRENGTH) != 0 ? 0x302C
@@ -513,7 +513,7 @@ s16 EnGo2_UpdateTalkStateGoronCityLowestFloor(PlayState* play, EnGo2* this) {
u16 EnGo2_GetTextIdGoronCityLink(PlayState* play, EnGo2* this) {
// For rando, prioritize opening the doors in GC when Link the goron has been stopped when
// the doors are not opened, otherwise let him talk about the DMC exit or that gorons are saved
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
if (!Flags_GetInfTable(INFTABLE_STOPPED_GORON_LINKS_ROLLING)) {
return 0x3030;
} else if (!Flags_GetInfTable(INFTABLE_GORON_CITY_DOORS_UNLOCKED)) {
@@ -543,7 +543,7 @@ s16 EnGo2_UpdateTalkStateGoronCityLink(PlayState* play, EnGo2* this) {
case TEXT_STATE_CLOSING:
switch (this->actor.textId) {
case 0x3036:
- if (!gSaveContext.n64ddFlag) {
+ if (!IS_RANDO) {
EnGo2_GetItem(this, play, GI_TUNIC_GORON);
this->actionFunc = EnGo2_SetupGetItem;
return NPC_TALK_STATE_ACTION;
@@ -605,7 +605,7 @@ s16 EnGo2_UpdateTalkStateGoronCityLink(PlayState* play, EnGo2* this) {
u16 EnGo2_GetTextIdGoronDmtBiggoron(PlayState* play, EnGo2* this) {
Player* player = GET_PLAYER(play);
- if (!gSaveContext.n64ddFlag && gSaveContext.bgsFlag) {
+ if (!IS_RANDO && gSaveContext.bgsFlag) {
player->exchangeItemId = EXCH_ITEM_CLAIM_CHECK;
return 0x305E;
} else if (INV_CONTENT(ITEM_TRADE_ADULT) >= ITEM_CLAIM_CHECK) {
@@ -627,11 +627,11 @@ s16 EnGo2_UpdateTalkStateGoronDmtBiggoron(PlayState* play, EnGo2* this) {
switch (EnGo2_GetDialogState(this, play)) {
case TEXT_STATE_DONE:
if (this->actor.textId == 0x305E) {
- if((!gSaveContext.n64ddFlag && gSaveContext.bgsFlag) || (gSaveContext.n64ddFlag && Flags_GetTreasure(play, 0x1F))) {
+ if((!IS_RANDO && gSaveContext.bgsFlag) || (IS_RANDO && Flags_GetTreasure(play, 0x1F))) {
return NPC_TALK_STATE_IDLE;
}
- if(gSaveContext.n64ddFlag) {
+ if(IS_RANDO) {
EnGo2_GetItemEntry(this, play, Randomizer_GetItemFromKnownCheck(RC_DMT_TRADE_CLAIM_CHECK, GI_SWORD_BGS));
Flags_SetTreasure(play, 0x1F);
} else {
@@ -663,7 +663,7 @@ s16 EnGo2_UpdateTalkStateGoronDmtBiggoron(PlayState* play, EnGo2* this) {
if (Message_ShouldAdvance(play)) {
if ((this->actor.textId == 0x3054) || (this->actor.textId == 0x3055)) {
if (play->msgCtx.choiceIndex == 0) {
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_DMT_TRADE_BROKEN_SWORD, GI_PRESCRIPTION);
Randomizer_ConsumeAdultTradeItem(play, ITEM_SWORD_BROKEN);
EnGo2_GetItemEntry(this, play, getItemEntry);
@@ -1070,7 +1070,7 @@ void EnGo2_BiggoronSetTextId(EnGo2* this, PlayState* play, Player* player) {
u16 textId;
if ((this->actor.params & 0x1F) == GORON_DMT_BIGGORON) {
- if ((!gSaveContext.n64ddFlag && gSaveContext.bgsFlag)) {
+ if ((!IS_RANDO && gSaveContext.bgsFlag)) {
if (func_8002F368(play) == EXCH_ITEM_CLAIM_CHECK) {
this->actor.textId = 0x3003;
} else {
@@ -1080,7 +1080,7 @@ void EnGo2_BiggoronSetTextId(EnGo2* this, PlayState* play, Player* player) {
} else if (INV_CONTENT(ITEM_TRADE_ADULT) == ITEM_CLAIM_CHECK) {
if (func_8002F368(play) == EXCH_ITEM_CLAIM_CHECK) {
- if (gSaveContext.n64ddFlag && Flags_GetTreasure(play, 0x1F)) {
+ if (IS_RANDO && Flags_GetTreasure(play, 0x1F)) {
textId = 0x3003;
} else if (Environment_GetBgsDayCount() >= CVarGetInteger("gForgeTime", 3)) {
textId = 0x305E;
@@ -1089,7 +1089,7 @@ void EnGo2_BiggoronSetTextId(EnGo2* this, PlayState* play, Player* player) {
}
this->actor.textId = textId;
} else {
- if (gSaveContext.n64ddFlag && Flags_GetTreasure(play, 0x1F)) {
+ if (IS_RANDO && Flags_GetTreasure(play, 0x1F)) {
textId = 0x305E;
} else if (Environment_GetBgsDayCount() >= CVarGetInteger("gForgeTime", 3)) {
textId = 0x3002;
@@ -1219,8 +1219,8 @@ s32 EnGo2_IsCameraModified(EnGo2* this, PlayState* play) {
(this->actor.params & 0x1F) == GORON_CITY_STAIRWELL || (this->actor.params & 0x1F) == GORON_DMT_BIGGORON ||
(this->actor.params & 0x1F) == GORON_MARKET_BAZAAR) {
return true;
- } else if (((!gSaveContext.n64ddFlag && !CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE)) ||
- (gSaveContext.n64ddFlag && !Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_FIRE_TEMPLE))) &&
+ } else if (((!IS_RANDO && !CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE)) ||
+ (IS_RANDO && !Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_FIRE_TEMPLE))) &&
CHECK_OWNED_EQUIP(EQUIP_TUNIC, 1)) {
return true;
} else {
@@ -1278,8 +1278,8 @@ void EnGo2_SelectGoronWakingUp(EnGo2* this) {
EnGo2_BiggoronWakingUp(this);
break;
case GORON_CITY_LINK:
- if (((!gSaveContext.n64ddFlag && !CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE)) ||
- (gSaveContext.n64ddFlag && !Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_FIRE_TEMPLE))) &&
+ if (((!IS_RANDO && !CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE)) ||
+ (IS_RANDO && !Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_FIRE_TEMPLE))) &&
CHECK_OWNED_EQUIP(EQUIP_TUNIC, 1)) {
EnGo2_WakingUp(this);
break;
@@ -1624,8 +1624,8 @@ void EnGo2_Init(Actor* thisx, PlayState* play) {
case GORON_CITY_LOWEST_FLOOR:
case GORON_CITY_STAIRWELL:
case GORON_CITY_LOST_WOODS:
- if (((!gSaveContext.n64ddFlag && !CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE)) ||
- (gSaveContext.n64ddFlag && !Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_FIRE_TEMPLE))) && LINK_IS_ADULT) {
+ if (((!IS_RANDO && !CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE)) ||
+ (IS_RANDO && !Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_FIRE_TEMPLE))) && LINK_IS_ADULT) {
Actor_Kill(&this->actor);
}
this->actionFunc = EnGo2_CurledUp;
@@ -1640,8 +1640,8 @@ void EnGo2_Init(Actor* thisx, PlayState* play) {
if ((Flags_GetInfTable(INFTABLE_GORON_CITY_DOORS_UNLOCKED))) {
Path_CopyLastPoint(this->path, &this->actor.world.pos);
this->actor.home.pos = this->actor.world.pos;
- if (((!gSaveContext.n64ddFlag && !CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE)) ||
- (gSaveContext.n64ddFlag && !Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_FIRE_TEMPLE))) &&
+ if (((!IS_RANDO && !CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE)) ||
+ (IS_RANDO && !Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_FIRE_TEMPLE))) &&
CHECK_OWNED_EQUIP(EQUIP_TUNIC, 1)) {
EnGo2_GetItemAnimation(this, play);
} else {
@@ -1862,7 +1862,7 @@ void EnGo2_SetupGetItem(EnGo2* this, PlayState* play) {
this->actor.parent = NULL;
this->actionFunc = EnGo2_SetGetItem;
} else {
- if (!gSaveContext.n64ddFlag || this->getItemEntry.getItemId == GI_NONE) {
+ if (!IS_RANDO || this->getItemEntry.getItemId == GI_NONE) {
func_8002F434(&this->actor, play, this->getItemId, this->actor.xzDistToPlayer + 1.0f, fabsf(this->actor.yDistToPlayer) + 1.0f);
} else {
GiveItemEntryFromActor(&this->actor, play, this->getItemEntry, this->actor.xzDistToPlayer + 1.0f, fabsf(this->actor.yDistToPlayer) + 1.0f);
@@ -1876,7 +1876,7 @@ void EnGo2_SetGetItem(EnGo2* this, PlayState* play) {
// For randomizer, handle updating the states for the gorons after receiving the item based on
// the goron type rather then the item being received
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
switch (this->actor.params & 0x1F) {
case GORON_DMT_BIGGORON:
// Resolves #1301. unk_13EE is used to set the opacity of the HUD. The trade sequence discussion with Biggoron
@@ -1925,12 +1925,12 @@ void EnGo2_BiggoronEyedrops(EnGo2* this, PlayState* play) {
this->actor.flags &= ~ACTOR_FLAG_TARGETABLE;
this->actor.shape.rot.y += 0x5B0;
this->trackingMode = NPC_TRACKING_NONE;
- this->animTimer = gSaveContext.n64ddFlag ? 0 : (this->skelAnime.endFrame + 60.0f + 60.0f); // eyeDrops animation timer
+ this->animTimer = IS_RANDO ? 0 : (this->skelAnime.endFrame + 60.0f + 60.0f); // eyeDrops animation timer
this->eyeMouthTexState = 2;
this->unk_20C = 0;
this->goronState++;
func_800F483C(0x28, 5);
- if (!gSaveContext.n64ddFlag) {
+ if (!IS_RANDO) {
OnePointCutscene_Init(play, 4190, -99, &this->actor, MAIN_CAM);
}
break;
@@ -1959,7 +1959,7 @@ void EnGo2_BiggoronEyedrops(EnGo2* this, PlayState* play) {
this->trackingMode = NPC_TRACKING_HEAD_AND_TORSO;
this->skelAnime.playSpeed = 0.0f;
this->skelAnime.curFrame = this->skelAnime.endFrame;
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_DMT_TRADE_EYEDROPS, GI_CLAIM_CHECK);
Randomizer_ConsumeAdultTradeItem(play, ITEM_EYEDROPS);
EnGo2_GetItemEntry(this, play, getItemEntry);
@@ -2190,8 +2190,7 @@ void EnGo2_Draw(Actor* thisx, PlayState* play) {
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(eyeTextures[this->eyeTexIndex]));
gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(mouthTextures[this->mouthTexIndex]));
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable,
- this->skelAnime.dListCount, EnGo2_OverrideLimbDraw, EnGo2_PostLimbDraw, this);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnGo2_OverrideLimbDraw, EnGo2_PostLimbDraw, this);
CLOSE_DISPS(play->state.gfxCtx);
}
}
diff --git a/soh/src/overlays/actors/ovl_En_Goma/z_en_goma.c b/soh/src/overlays/actors/ovl_En_Goma/z_en_goma.c
index 729aaa485..efaaed84c 100644
--- a/soh/src/overlays/actors/ovl_En_Goma/z_en_goma.c
+++ b/soh/src/overlays/actors/ovl_En_Goma/z_en_goma.c
@@ -804,7 +804,8 @@ void EnGoma_Draw(Actor* thisx, PlayState* play) {
Matrix_RotateX(this->actor.shape.rot.x / (f32)0x8000 * M_PI, MTXMODE_APPLY);
Matrix_RotateZ(this->actor.shape.rot.z / (f32)0x8000 * M_PI, MTXMODE_APPLY);
Matrix_Scale(this->actor.scale.x, this->actor.scale.y, this->actor.scale.z, MTXMODE_APPLY);
- SkelAnime_DrawOpa(play, this->skelanime.skeleton, this->skelanime.jointTable, EnGoma_OverrideLimbDraw,
+ SkelAnime_DrawSkeletonOpa(play, &this->skelanime,
+ EnGoma_OverrideLimbDraw,
NULL, this);
break;
diff --git a/soh/src/overlays/actors/ovl_En_Gs/z_en_gs.c b/soh/src/overlays/actors/ovl_En_Gs/z_en_gs.c
index a2be28dce..e2a4cdaa0 100644
--- a/soh/src/overlays/actors/ovl_En_Gs/z_en_gs.c
+++ b/soh/src/overlays/actors/ovl_En_Gs/z_en_gs.c
@@ -189,7 +189,7 @@ void func_80A4E648(EnGs* this, PlayState* play) {
Actor_GetScreenPos(play, &this->actor, &sp26, &sp24);
if ((sp26 >= 0) && (sp26 <= SCREEN_WIDTH) && (sp24 >= 0) && (sp24 <= SCREEN_HEIGHT) && (this->unk_19C != 3)) {
if (func_8002F2CC(&this->actor, play, 40.0f) == 1) {
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
// if we're rando'd, always use the non-mask text id
this->actor.textId = 0x2053;
} else {
diff --git a/soh/src/overlays/actors/ovl_En_Guest/z_en_guest.c b/soh/src/overlays/actors/ovl_En_Guest/z_en_guest.c
index 81c7ae38e..2d09ea016 100644
--- a/soh/src/overlays/actors/ovl_En_Guest/z_en_guest.c
+++ b/soh/src/overlays/actors/ovl_En_Guest/z_en_guest.c
@@ -231,8 +231,7 @@ void EnGuest_Draw(Actor* thisx, PlayState* play) {
gSPSegment(POLY_OPA_DISP++, 0x09, func_80A50708(play->state.gfxCtx, 160, 60, 220, 255));
gSPSegment(POLY_OPA_DISP++, 0x0A, SEGMENTED_TO_VIRTUAL(D_80A50BA4[this->unk_30E]));
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
- EnGuest_OverrideLimbDraw, NULL, this);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnGuest_OverrideLimbDraw, NULL, this);
CLOSE_DISPS(play->state.gfxCtx);
}
diff --git a/soh/src/overlays/actors/ovl_En_Hata/z_en_hata.c b/soh/src/overlays/actors/ovl_En_Hata/z_en_hata.c
index 3499a8120..6e36e2027 100644
--- a/soh/src/overlays/actors/ovl_En_Hata/z_en_hata.c
+++ b/soh/src/overlays/actors/ovl_En_Hata/z_en_hata.c
@@ -141,6 +141,7 @@ void EnHata_Draw(Actor* thisx, PlayState* play) {
Gfx_SetupDL_37Opa(play->state.gfxCtx);
Matrix_Scale(1.0f, 1.1f, 1.0f, MTXMODE_APPLY);
- SkelAnime_DrawOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, EnHata_OverrideLimbDraw,
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime,
+ EnHata_OverrideLimbDraw,
EnHata_PostLimbDraw, this);
}
diff --git a/soh/src/overlays/actors/ovl_En_Heishi1/z_en_heishi1.c b/soh/src/overlays/actors/ovl_En_Heishi1/z_en_heishi1.c
index 99c130e60..1b4529448 100644
--- a/soh/src/overlays/actors/ovl_En_Heishi1/z_en_heishi1.c
+++ b/soh/src/overlays/actors/ovl_En_Heishi1/z_en_heishi1.c
@@ -124,16 +124,16 @@ void EnHeishi1_Init(Actor* thisx, PlayState* play) {
if (this->type != 5) {
if ((gSaveContext.dayTime < 0xB888 || IS_DAY) &&
- ((!gSaveContext.n64ddFlag && !Flags_GetEventChkInf(EVENTCHKINF_ZELDA_FLED_HYRULE_CASTLE)) ||
- (gSaveContext.n64ddFlag && !metZelda))) {
+ ((!IS_RANDO && !Flags_GetEventChkInf(EVENTCHKINF_ZELDA_FLED_HYRULE_CASTLE)) ||
+ (IS_RANDO && !metZelda))) {
this->actionFunc = EnHeishi1_SetupWalk;
} else {
Actor_Kill(&this->actor);
}
} else {
if ((gSaveContext.dayTime >= 0xB889) || !IS_DAY ||
- (!gSaveContext.n64ddFlag && Flags_GetEventChkInf(EVENTCHKINF_ZELDA_FLED_HYRULE_CASTLE)) ||
- (gSaveContext.n64ddFlag && metZelda)) {
+ (!IS_RANDO && Flags_GetEventChkInf(EVENTCHKINF_ZELDA_FLED_HYRULE_CASTLE)) ||
+ (IS_RANDO && metZelda)) {
this->actionFunc = EnHeishi1_SetupWaitNight;
} else {
Actor_Kill(&this->actor);
@@ -506,7 +506,8 @@ void EnHeishi1_Draw(Actor* thisx, PlayState* play) {
Vec3f matrixScale = { 0.3f, 0.3f, 0.3f };
Gfx_SetupDL_25Opa(play->state.gfxCtx);
- SkelAnime_DrawOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, EnHeishi1_OverrideLimbDraw, NULL,
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnHeishi1_OverrideLimbDraw,
+ NULL,
this);
func_80033C30(&this->actor.world.pos, &matrixScale, 0xFF, play);
diff --git a/soh/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c b/soh/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c
index 60f6039e1..379ce2893 100644
--- a/soh/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c
+++ b/soh/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c
@@ -846,7 +846,7 @@ void EnHeishi2_Draw(Actor* thisx, PlayState* play) {
Gfx_SetupDL_25Opa(play->state.gfxCtx);
- SkelAnime_DrawOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, EnHeishi2_OverrideLimbDraw,
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnHeishi2_OverrideLimbDraw,
EnHeishi2_PostLimbDraw, this);
if ((this->type == 5) && (Flags_GetInfTable(INFTABLE_GATE_GUARD_PUT_ON_KEATON_MASK))) {
linkObjBankIndex = Object_GetIndex(&play->objectCtx, OBJECT_LINK_CHILD);
diff --git a/soh/src/overlays/actors/ovl_En_Heishi3/z_en_heishi3.c b/soh/src/overlays/actors/ovl_En_Heishi3/z_en_heishi3.c
index 04069f762..1ffae3633 100644
--- a/soh/src/overlays/actors/ovl_En_Heishi3/z_en_heishi3.c
+++ b/soh/src/overlays/actors/ovl_En_Heishi3/z_en_heishi3.c
@@ -251,6 +251,7 @@ void EnHeishi3_Draw(Actor* thisx, PlayState* play) {
EnHeishi3* this = (EnHeishi3*)thisx;
Gfx_SetupDL_25Opa(play->state.gfxCtx);
- SkelAnime_DrawOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, EnHeishi3_OverrideLimbDraw, NULL,
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnHeishi3_OverrideLimbDraw,
+ NULL,
this);
}
diff --git a/soh/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.c b/soh/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.c
index 4af0b6280..bab56427d 100644
--- a/soh/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.c
+++ b/soh/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.c
@@ -357,7 +357,7 @@ void EnHeishi4_MarketSneak(EnHeishi4* this, PlayState* play) {
if (Message_GetState(&play->msgCtx) == TEXT_STATE_CHOICE && Message_ShouldAdvance(play)) {
switch (play->msgCtx.choiceIndex) {
case 0: //yes
- if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_OVERWORLD_ENTRANCES) != RO_GENERIC_OFF){
+ if (IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_OVERWORLD_ENTRANCES) != RO_GENERIC_OFF){
play->nextEntranceIndex = Entrance_OverrideNextIndex(0x01FD); // Market Entrance -> HF
} else {
play->nextEntranceIndex = 0x00CD; // HF Near bridge (OoT cutscene entrance) to not fall in the water
@@ -418,6 +418,5 @@ void EnHeishi4_Draw(Actor* thisx, PlayState* play) {
EnHeishi4* this = (EnHeishi4*)thisx;
Gfx_SetupDL_25Opa(play->state.gfxCtx);
- SkelAnime_DrawOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, EnHeishi_OverrideLimbDraw, NULL,
- this);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnHeishi_OverrideLimbDraw, NULL, this);
}
diff --git a/soh/src/overlays/actors/ovl_En_Hintnuts/z_en_hintnuts.c b/soh/src/overlays/actors/ovl_En_Hintnuts/z_en_hintnuts.c
index a30854bb8..93df97cd3 100644
--- a/soh/src/overlays/actors/ovl_En_Hintnuts/z_en_hintnuts.c
+++ b/soh/src/overlays/actors/ovl_En_Hintnuts/z_en_hintnuts.c
@@ -542,7 +542,8 @@ void EnHintnuts_Draw(Actor* thisx, PlayState* play) {
if (this->actor.params == 0xA) {
Gfx_DrawDListOpa(play, gHintNutsFlowerDL);
} else {
- SkelAnime_DrawOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, EnHintnuts_OverrideLimbDraw,
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime,
+ EnHintnuts_OverrideLimbDraw,
NULL, this);
}
}
diff --git a/soh/src/overlays/actors/ovl_En_Hs/z_en_hs.c b/soh/src/overlays/actors/ovl_En_Hs/z_en_hs.c
index 246af740f..14b3703b8 100644
--- a/soh/src/overlays/actors/ovl_En_Hs/z_en_hs.c
+++ b/soh/src/overlays/actors/ovl_En_Hs/z_en_hs.c
@@ -81,7 +81,7 @@ void EnHs_Init(Actor* thisx, PlayState* play) {
func_80A6E3A0(this, func_80A6E9AC);
bool shouldSpawn;
bool tradedMushroom = Flags_GetItemGetInf(ITEMGETINF_30);
- if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_ADULT_TRADE)) {
+ if (IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_ADULT_TRADE)) {
// To explain the logic because Fado and Grog are linked:
// - If you have Cojiro, then spawn Grog and not Fado.
// - If you don't have Cojiro but do have Odd Potion, spawn Fado and not Grog.
@@ -148,7 +148,7 @@ void func_80A6E5EC(EnHs* this, PlayState* play) {
void func_80A6E630(EnHs* this, PlayState* play) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(play)) {
- if (!gSaveContext.n64ddFlag) {
+ if (!IS_RANDO) {
func_80088AA0(180);
}
func_80A6E3A0(this, func_80A6E6B0);
@@ -179,7 +179,7 @@ void func_80A6E740(EnHs* this, PlayState* play) {
this->actor.parent = NULL;
func_80A6E3A0(this, func_80A6E630);
} else {
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
GetItemEntry itemEntry = Randomizer_GetItemFromKnownCheck(RC_LW_TRADE_COJIRO, GI_ODD_MUSHROOM);
Randomizer_ConsumeAdultTradeItem(play, ITEM_COJIRO);
GiveItemEntryFromActor(&this->actor, play, itemEntry, 10000.0f, 50.0f);
@@ -198,7 +198,7 @@ void func_80A6E7BC(EnHs* this, PlayState* play) {
switch (play->msgCtx.choiceIndex) {
case 0:
func_80A6E3A0(this, func_80A6E740);
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
GetItemEntry itemEntry = Randomizer_GetItemFromKnownCheck(RC_LW_TRADE_COJIRO, GI_ODD_MUSHROOM);
Randomizer_ConsumeAdultTradeItem(play, ITEM_COJIRO);
GiveItemEntryFromActor(&this->actor, play, itemEntry, 10000.0f, 50.0f);
@@ -334,6 +334,5 @@ void EnHs_Draw(Actor* thisx, PlayState* play) {
EnHs* this = (EnHs*)thisx;
Gfx_SetupDL_37Opa(play->state.gfxCtx);
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
- EnHs_OverrideLimbDraw, EnHs_PostLimbDraw, this);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnHs_OverrideLimbDraw, EnHs_PostLimbDraw, this);
}
diff --git a/soh/src/overlays/actors/ovl_En_Hs2/z_en_hs2.c b/soh/src/overlays/actors/ovl_En_Hs2/z_en_hs2.c
index aeeaca357..3f8e61481 100644
--- a/soh/src/overlays/actors/ovl_En_Hs2/z_en_hs2.c
+++ b/soh/src/overlays/actors/ovl_En_Hs2/z_en_hs2.c
@@ -166,6 +166,5 @@ void EnHs2_Draw(Actor* thisx, PlayState* play) {
EnHs2* this = (EnHs2*)thisx;
Gfx_SetupDL_37Opa(play->state.gfxCtx);
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
- EnHs2_OverrideLimbDraw, EnHs2_PostLimbDraw, this);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnHs2_OverrideLimbDraw, EnHs2_PostLimbDraw, this);
}
diff --git a/soh/src/overlays/actors/ovl_En_Hy/z_en_hy.c b/soh/src/overlays/actors/ovl_En_Hy/z_en_hy.c
index 5c425b234..819a432c0 100644
--- a/soh/src/overlays/actors/ovl_En_Hy/z_en_hy.c
+++ b/soh/src/overlays/actors/ovl_En_Hy/z_en_hy.c
@@ -662,7 +662,7 @@ s16 func_80A70058(PlayState* play, Actor* thisx) {
if (Flags_GetInfTable(INFTABLE_191)) { // Already brought the lost dog back
func_80A6F7CC(this, play, GI_RUPEE_BLUE);
} else {
- if (!gSaveContext.n64ddFlag) {
+ if (!IS_RANDO) {
func_80A6F7CC(this, play, GI_HEART_PIECE);
} else {
this->getItemEntry = Randomizer_GetItemFromKnownCheck(RC_MARKET_LOST_DOG, GI_HEART_PIECE);
@@ -1068,7 +1068,7 @@ void func_80A714C4(EnHy* this, PlayState* play) {
if (Actor_HasParent(&this->actor, play)) {
this->actionFunc = func_80A71530;
} else {
- if (!gSaveContext.n64ddFlag || this->getItemEntry.getItemId == GI_NONE) {
+ if (!IS_RANDO || this->getItemEntry.getItemId == GI_NONE) {
func_8002F434(&this->actor, play, this->unkGetItemId, this->actor.xzDistToPlayer + 1.0f, fabsf(this->actor.yDistToPlayer) + 1.0f);
} else {
GiveItemEntryFromActor(&this->actor, play, this->getItemEntry, this->actor.xzDistToPlayer + 1.0f, fabsf(this->actor.yDistToPlayer) + 1.0f);
@@ -1078,7 +1078,7 @@ void func_80A714C4(EnHy* this, PlayState* play) {
void func_80A71530(EnHy* this, PlayState* play) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(play)) {
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
if (!Flags_GetInfTable(INFTABLE_191)) {
Flags_SetInfTable(INFTABLE_191);
}
@@ -1260,8 +1260,7 @@ void EnHy_Draw(Actor* thisx, PlayState* play) {
break;
}
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable,
- this->skelAnime.dListCount, EnHy_OverrideLimbDraw, EnHy_PostLimbDraw, &this->actor);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnHy_OverrideLimbDraw, EnHy_PostLimbDraw, &this->actor);
}
CLOSE_DISPS(play->state.gfxCtx);
diff --git a/soh/src/overlays/actors/ovl_En_Ik/z_en_ik.c b/soh/src/overlays/actors/ovl_En_Ik/z_en_ik.c
index 535612094..aaf0e0342 100644
--- a/soh/src/overlays/actors/ovl_En_Ik/z_en_ik.c
+++ b/soh/src/overlays/actors/ovl_En_Ik/z_en_ik.c
@@ -970,8 +970,7 @@ void func_80A76798(Actor* thisx, PlayState* play) {
gSPSegment(POLY_OPA_DISP++, 0x09, func_80A761B0(play->state.gfxCtx, 225, 205, 115, 25, 20, 0));
gSPSegment(POLY_OPA_DISP++, 0x0A, func_80A761B0(play->state.gfxCtx, 225, 205, 115, 25, 20, 0));
}
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
- EnIk_OverrideLimbDraw3, EnIk_PostLimbDraw3, this);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnIk_OverrideLimbDraw3, EnIk_PostLimbDraw3, this);
CLOSE_DISPS(play->state.gfxCtx);
}
@@ -1240,8 +1239,7 @@ void func_80A77844(EnIk* this, PlayState* play) {
gSPSegment(POLY_OPA_DISP++, 0x08, func_80A761B0(gfxCtx, 245, 225, 155, 30, 30, 0));
gSPSegment(POLY_OPA_DISP++, 0x09, func_80A761B0(gfxCtx, 255, 40, 0, 40, 0, 0));
gSPSegment(POLY_OPA_DISP++, 0x0A, func_80A761B0(gfxCtx, 255, 255, 255, 20, 40, 30));
- SkelAnime_DrawFlexOpa(play, skelAnime->skeleton, skelAnime->jointTable, skelAnime->dListCount,
- EnIk_OverrideLimbDraw2, EnIk_PostLimbDraw2, this);
+ SkelAnime_DrawSkeletonOpa(play, skelAnime, EnIk_OverrideLimbDraw2, EnIk_PostLimbDraw2, this);
CLOSE_DISPS(gfxCtx);
}
@@ -1394,8 +1392,7 @@ void func_80A77EDC(EnIk* this, PlayState* play) {
gSPSegment(POLY_OPA_DISP++, 0x08, func_80A761B0(gfxCtx, 245, 225, 155, 30, 30, 0));
gSPSegment(POLY_OPA_DISP++, 0x09, func_80A761B0(gfxCtx, 255, 40, 0, 40, 0, 0));
gSPSegment(POLY_OPA_DISP++, 0x0A, func_80A761B0(gfxCtx, 255, 255, 255, 20, 40, 30));
- SkelAnime_DrawFlexOpa(play, skelAnime->skeleton, skelAnime->jointTable, skelAnime->dListCount,
- EnIk_OverrideLimbDraw1, EnIk_PostLimbDraw1, this);
+ SkelAnime_DrawSkeletonOpa(play, skelAnime, EnIk_OverrideLimbDraw1, EnIk_PostLimbDraw1, this);
CLOSE_DISPS(gfxCtx);
}
@@ -1443,7 +1440,7 @@ void func_80A781CC(Actor* thisx, PlayState* play) {
this->actor.update = EnIk_Update;
this->actor.draw = EnIk_Draw;
// Don't initiate nabooru defeat CS in rando
- if (!(gSaveContext.n64ddFlag)) {
+ if (!(IS_RANDO)) {
Cutscene_SetSegment(play, gSpiritBossNabooruKnuckleDefeatCs);
gSaveContext.cutsceneTrigger = 1;
Actor_SetScale(&this->actor, 0.01f);
diff --git a/soh/src/overlays/actors/ovl_En_In/z_en_in.c b/soh/src/overlays/actors/ovl_En_In/z_en_in.c
index f94365378..13014352a 100644
--- a/soh/src/overlays/actors/ovl_En_In/z_en_in.c
+++ b/soh/src/overlays/actors/ovl_En_In/z_en_in.c
@@ -1000,8 +1000,7 @@ void EnIn_Draw(Actor* thisx, PlayState* play) {
Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(eyeTextures[this->eyeIndex]));
gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(gIngoHeadGradient2Tex));
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable,
- this->skelAnime.dListCount, EnIn_OverrideLimbDraw, EnIn_PostLimbDraw, &this->actor);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnIn_OverrideLimbDraw, EnIn_PostLimbDraw, &this->actor);
}
CLOSE_DISPS(play->state.gfxCtx);
}
diff --git a/soh/src/overlays/actors/ovl_En_Insect/z_en_insect.c b/soh/src/overlays/actors/ovl_En_Insect/z_en_insect.c
index a6877ea6f..f1dff358a 100644
--- a/soh/src/overlays/actors/ovl_En_Insect/z_en_insect.c
+++ b/soh/src/overlays/actors/ovl_En_Insect/z_en_insect.c
@@ -795,7 +795,7 @@ void EnInsect_Draw(Actor* thisx, PlayState* play) {
EnInsect* this = (EnInsect*)thisx;
Gfx_SetupDL_25Opa(play->state.gfxCtx);
- SkelAnime_DrawOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, NULL, NULL, NULL);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, NULL, NULL, NULL);
Collider_UpdateSpheres(0, &this->collider);
D_80A7DEB4 = 0;
}
diff --git a/soh/src/overlays/actors/ovl_En_Ishi/z_en_ishi.c b/soh/src/overlays/actors/ovl_En_Ishi/z_en_ishi.c
index 2fcc58949..b933aec84 100644
--- a/soh/src/overlays/actors/ovl_En_Ishi/z_en_ishi.c
+++ b/soh/src/overlays/actors/ovl_En_Ishi/z_en_ishi.c
@@ -332,7 +332,7 @@ void EnIshi_Init(Actor* thisx, PlayState* play) {
}
// If dungeon entrance randomizer is on, remove the grey boulders that normally
// block child Link from reaching the Fire Temple entrance.
- if (type == ROCK_LARGE && gSaveContext.n64ddFlag &&
+ if (type == ROCK_LARGE && IS_RANDO &&
Randomizer_GetSettingValue(RSK_SHUFFLE_DUNGEON_ENTRANCES) != RO_DUNGEON_ENTRANCE_SHUFFLE_OFF &&
play->sceneNum == 0x061) { // Death Mountain Creater
Actor_Kill(&this->actor);
diff --git a/soh/src/overlays/actors/ovl_En_Jj/z_en_jj.c b/soh/src/overlays/actors/ovl_En_Jj/z_en_jj.c
index 2bd4db7eb..28d8967c2 100644
--- a/soh/src/overlays/actors/ovl_En_Jj/z_en_jj.c
+++ b/soh/src/overlays/actors/ovl_En_Jj/z_en_jj.c
@@ -318,8 +318,7 @@ void EnJj_Draw(Actor* thisx, PlayState* play2) {
Matrix_Translate(0.0f, (cosf(this->skelAnime.curFrame * (M_PI / 41.0f)) * 10.0f) - 10.0f, 0.0f, MTXMODE_APPLY);
Matrix_Scale(10.0f, 10.0f, 10.0f, MTXMODE_APPLY);
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(eyeTextures[this->eyeIndex]));
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
- NULL, NULL, this);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, NULL, NULL, this);
CLOSE_DISPS(play->state.gfxCtx);
}
diff --git a/soh/src/overlays/actors/ovl_En_Js/z_en_js.c b/soh/src/overlays/actors/ovl_En_Js/z_en_js.c
index 30ed425f4..50be2e458 100644
--- a/soh/src/overlays/actors/ovl_En_Js/z_en_js.c
+++ b/soh/src/overlays/actors/ovl_En_Js/z_en_js.c
@@ -131,7 +131,7 @@ void func_80A89160(EnJs* this, PlayState* play) {
this->actor.parent = NULL;
En_Js_SetupAction(this, func_80A8910C);
} else {
- if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_MERCHANTS) != RO_SHUFFLE_MERCHANTS_OFF &&
+ if (IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_MERCHANTS) != RO_SHUFFLE_MERCHANTS_OFF &&
!Flags_GetRandomizerInf(RAND_INF_MERCHANTS_CARPET_SALESMAN)) {
GetItemEntry itemEntry = Randomizer_GetItemFromKnownCheck(RC_WASTELAND_BOMBCHU_SALESMAN, GI_BOMBCHUS_10);
gSaveContext.pendingSale = itemEntry.itemId;
@@ -241,6 +241,5 @@ void EnJs_Draw(Actor* thisx, PlayState* play) {
EnJs* this = (EnJs*)thisx;
Gfx_SetupDL_37Opa(play->state.gfxCtx);
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
- EnJs_OverrideLimbDraw, EnJs_PostLimbDraw, this);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnJs_OverrideLimbDraw, EnJs_PostLimbDraw, this);
}
diff --git a/soh/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.c b/soh/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.c
index 376a647dd..8c3104e9b 100644
--- a/soh/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.c
+++ b/soh/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.c
@@ -344,6 +344,5 @@ void EnKakasi_Draw(Actor* thisx, PlayState* play) {
osSyncPrintf(VT_FGCOL(YELLOW) "☆☆☆☆☆ フラグ! ☆☆☆☆☆ %d\n" VT_RST, gSaveContext.scarecrowLongSongSet);
}
Gfx_SetupDL_25Opa(play->state.gfxCtx);
- SkelAnime_DrawFlexOpa(play, this->skelanime.skeleton, this->skelanime.jointTable, this->skelanime.dListCount,
- NULL, NULL, this);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelanime, NULL, NULL, this);
}
diff --git a/soh/src/overlays/actors/ovl_En_Kakasi2/z_en_kakasi2.c b/soh/src/overlays/actors/ovl_En_Kakasi2/z_en_kakasi2.c
index 61fd404c6..0a118916b 100644
--- a/soh/src/overlays/actors/ovl_En_Kakasi2/z_en_kakasi2.c
+++ b/soh/src/overlays/actors/ovl_En_Kakasi2/z_en_kakasi2.c
@@ -119,7 +119,7 @@ void func_80A90264(EnKakasi2* this, PlayState* play) {
bool skipScarecrow = play->msgCtx.msgMode == MSGMODE_OCARINA_PLAYING &&
((CVarGetInteger("gSkipScarecrow", 0) && gSaveContext.scarecrowSpawnSongSet) ||
- (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SKIP_SCARECROWS_SONG)));
+ (IS_RANDO && Randomizer_GetSettingValue(RSK_SKIP_SCARECROWS_SONG)));
if ((BREG(1) != 0) || skipScarecrow && (this->actor.xzDistToPlayer < this->maxSpawnDistance.x) &&
(fabsf(player->actor.world.pos.y - this->actor.world.pos.y) < this->maxSpawnDistance.y)) {
@@ -245,6 +245,5 @@ void func_80A90948(Actor* thisx, PlayState* play) {
EnKakasi2* this = (EnKakasi2*)thisx;
Gfx_SetupDL_25Opa(play->state.gfxCtx);
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
- NULL, NULL, this);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, NULL, NULL, this);
}
diff --git a/soh/src/overlays/actors/ovl_En_Kakasi3/z_en_kakasi3.c b/soh/src/overlays/actors/ovl_En_Kakasi3/z_en_kakasi3.c
index dd11e900e..bc2fb7632 100644
--- a/soh/src/overlays/actors/ovl_En_Kakasi3/z_en_kakasi3.c
+++ b/soh/src/overlays/actors/ovl_En_Kakasi3/z_en_kakasi3.c
@@ -436,6 +436,5 @@ void EnKakasi3_Draw(Actor* thisx, PlayState* play) {
EnKakasi3* this = (EnKakasi3*)thisx;
Gfx_SetupDL_25Opa(play->state.gfxCtx);
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
- NULL, NULL, this);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, NULL, NULL, this);
}
diff --git a/soh/src/overlays/actors/ovl_En_Karebaba/z_en_karebaba.c b/soh/src/overlays/actors/ovl_En_Karebaba/z_en_karebaba.c
index 9cd6d544b..d78cf0820 100644
--- a/soh/src/overlays/actors/ovl_En_Karebaba/z_en_karebaba.c
+++ b/soh/src/overlays/actors/ovl_En_Karebaba/z_en_karebaba.c
@@ -483,7 +483,7 @@ void EnKarebaba_Draw(Actor* thisx, PlayState* play) {
}
} else if (this->actionFunc != EnKarebaba_Dead) {
func_80026230(play, &black, 1, 2);
- SkelAnime_DrawOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, NULL, NULL, NULL);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, NULL, NULL, NULL);
Matrix_Translate(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, MTXMODE_NEW);
if ((this->actionFunc == EnKarebaba_Regrow) || (this->actionFunc == EnKarebaba_Grow)) {
diff --git a/soh/src/overlays/actors/ovl_En_Ko/z_en_ko.c b/soh/src/overlays/actors/ovl_En_Ko/z_en_ko.c
index 497d7acc9..25299f5b0 100644
--- a/soh/src/overlays/actors/ovl_En_Ko/z_en_ko.c
+++ b/soh/src/overlays/actors/ovl_En_Ko/z_en_ko.c
@@ -1027,7 +1027,7 @@ s32 EnKo_CanSpawn(EnKo* this, PlayState* play) {
}
case SCENE_LOST_WOODS:
- if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_ADULT_TRADE)) {
+ if (IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_ADULT_TRADE)) {
// To explain the logic because Fado and Grog are linked:
// - If you have Cojiro, then spawn Grog and not Fado.
// - If you don't have Cojiro but do have Odd Potion, spawn Fado and not Grog.
@@ -1186,7 +1186,7 @@ void func_80A99048(EnKo* this, PlayState* play) {
Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_EN_ELF, this->actor.world.pos.x,
this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, 3);
if (ENKO_TYPE == ENKO_TYPE_CHILD_3) {
- if (!gSaveContext.n64ddFlag) {
+ if (!IS_RANDO) {
if (!CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD)) {
this->collider.dim.height += 200;
this->actionFunc = func_80A995CC;
@@ -1234,7 +1234,7 @@ void func_80A99504(EnKo* this, PlayState* play) {
this->actor.parent = NULL;
this->actionFunc = func_80A99560;
} else {
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
GetItemEntry itemEntry = Randomizer_GetItemFromKnownCheck(RC_LW_TRADE_ODD_POTION, GI_SAW);
Randomizer_ConsumeAdultTradeItem(play, ITEM_ODD_POTION);
GiveItemEntryFromActor(&this->actor, play, itemEntry, 120.0f, 10.0f);
diff --git a/soh/src/overlays/actors/ovl_En_Kusa/z_en_kusa.c b/soh/src/overlays/actors/ovl_En_Kusa/z_en_kusa.c
index 344691067..75e54c140 100644
--- a/soh/src/overlays/actors/ovl_En_Kusa/z_en_kusa.c
+++ b/soh/src/overlays/actors/ovl_En_Kusa/z_en_kusa.c
@@ -278,7 +278,7 @@ void EnKusa_Destroy(Actor* thisx, PlayState* play2) {
void EnKusa_SetupWaitObject(EnKusa* this) {
// Kill bushes in Boss Rush. Used in Gohma's arena.
- if (gSaveContext.isBossRush) {
+ if (IS_BOSS_RUSH) {
Actor_Kill(this);
}
diff --git a/soh/src/overlays/actors/ovl_En_Kz/z_en_kz.c b/soh/src/overlays/actors/ovl_En_Kz/z_en_kz.c
index 322088618..75b7479f3 100644
--- a/soh/src/overlays/actors/ovl_En_Kz/z_en_kz.c
+++ b/soh/src/overlays/actors/ovl_En_Kz/z_en_kz.c
@@ -73,10 +73,10 @@ static AnimationInfo sAnimationInfo[] = {
u16 EnKz_GetTextNoMaskChild(PlayState* play, EnKz* this) {
Player* player = GET_PLAYER(play);
- if ((gSaveContext.n64ddFlag && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_JABU_JABUS_BELLY)) ||
- (!gSaveContext.n64ddFlag && CHECK_QUEST_ITEM(QUEST_ZORA_SAPPHIRE))) {
+ if ((IS_RANDO && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_JABU_JABUS_BELLY)) ||
+ (!IS_RANDO && CHECK_QUEST_ITEM(QUEST_ZORA_SAPPHIRE))) {
// Allow turning in Ruto's letter even if you have already rescued her
- if (gSaveContext.n64ddFlag && !Flags_GetEventChkInf(EVENTCHKINF_KING_ZORA_MOVED)) {
+ if (IS_RANDO && !Flags_GetEventChkInf(EVENTCHKINF_KING_ZORA_MOVED)) {
player->exchangeItemId = EXCH_ITEM_LETTER_RUTO;
}
return 0x402B;
@@ -94,7 +94,7 @@ u16 EnKz_GetTextNoMaskAdult(PlayState* play, EnKz* this) {
// this works because both ITEM_NONE and later trade items are > ITEM_FROG
if (INV_CONTENT(ITEM_TRADE_ADULT) >= ITEM_FROG) {
if (!Flags_GetInfTable(INFTABLE_139)) {
- if (!gSaveContext.n64ddFlag) {
+ if (!IS_RANDO) {
return CHECK_OWNED_EQUIP(EQUIP_TUNIC, 2) ? 0x401F : 0x4012;
} else {
return 0x4012;
@@ -243,7 +243,7 @@ void func_80A9CB18(EnKz* this, PlayState* play) {
Player* player = GET_PLAYER(play);
if (func_80A9C95C(play, this, &this->interactInfo.talkState, 340.0f, EnKz_GetText, func_80A9C6C0)) {
- if (((gSaveContext.n64ddFlag && LINK_IS_CHILD) || this->actor.textId == 0x401A) && !Flags_GetEventChkInf(EVENTCHKINF_KING_ZORA_MOVED)) {
+ if (((IS_RANDO && LINK_IS_CHILD) || this->actor.textId == 0x401A) && !Flags_GetEventChkInf(EVENTCHKINF_KING_ZORA_MOVED)) {
if (func_8002F368(play) == EXCH_ITEM_LETTER_RUTO) {
this->actor.textId = 0x401B;
this->sfxPlayed = false;
@@ -257,7 +257,7 @@ void func_80A9CB18(EnKz* this, PlayState* play) {
if (LINK_IS_ADULT) {
if ((INV_CONTENT(ITEM_TRADE_ADULT) == ITEM_PRESCRIPTION) &&
(func_8002F368(play) == EXCH_ITEM_PRESCRIPTION)) {
- if (!gSaveContext.n64ddFlag || !Flags_GetTreasure(play, 0x1F)) {
+ if (!IS_RANDO || !Flags_GetTreasure(play, 0x1F)) {
this->actor.textId = 0x4014;
this->sfxPlayed = false;
player->actor.textId = this->actor.textId;
@@ -271,7 +271,7 @@ void func_80A9CB18(EnKz* this, PlayState* play) {
this->actor.textId = CHECK_QUEST_ITEM(QUEST_SONG_SERENADE) ? 0x4045 : 0x401A;
player->actor.textId = this->actor.textId;
} else {
- if (!gSaveContext.n64ddFlag) {
+ if (!IS_RANDO) {
this->actor.textId = CHECK_OWNED_EQUIP(EQUIP_TUNIC, 2) ? 0x401F : 0x4012;
} else {
this->actor.textId = 0x4012;
@@ -344,7 +344,7 @@ void EnKz_Init(Actor* thisx, PlayState* play) {
this->interactInfo.talkState = NPC_TALK_STATE_IDLE;
Animation_ChangeByInfo(&this->skelanime, sAnimationInfo, ENKZ_ANIM_0);
- if (!gSaveContext.n64ddFlag) {
+ if (!IS_RANDO) {
if (Flags_GetEventChkInf(EVENTCHKINF_KING_ZORA_MOVED)) {
EnKz_SetMovedPos(this, play);
}
@@ -470,7 +470,7 @@ void EnKz_SetupGetItem(EnKz* this, PlayState* play) {
this->interactInfo.talkState = NPC_TALK_STATE_TALKING;
this->actionFunc = EnKz_StartTimer;
} else {
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
if (this->isTrading) {
getItemEntry = Randomizer_GetItemFromKnownCheck(RC_ZD_TRADE_PRESCRIPTION, GI_FROG);
getItemId = getItemEntry.getItemId;
@@ -485,7 +485,7 @@ void EnKz_SetupGetItem(EnKz* this, PlayState* play) {
}
yRange = fabsf(this->actor.yDistToPlayer) + 1.0f;
xzRange = this->actor.xzDistToPlayer + 1.0f;
- if (!gSaveContext.n64ddFlag || getItemEntry.getItemId == GI_NONE) {
+ if (!IS_RANDO || getItemEntry.getItemId == GI_NONE) {
func_8002F434(&this->actor, play, getItemId, xzRange, yRange);
} else {
GiveItemEntryFromActor(&this->actor, play, getItemEntry, xzRange, yRange);
@@ -495,7 +495,7 @@ void EnKz_SetupGetItem(EnKz* this, PlayState* play) {
void EnKz_StartTimer(EnKz* this, PlayState* play) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(play)) {
- if (INV_CONTENT(ITEM_TRADE_ADULT) == ITEM_FROG && !gSaveContext.n64ddFlag) {
+ if (INV_CONTENT(ITEM_TRADE_ADULT) == ITEM_FROG && !IS_RANDO) {
func_80088AA0(180); // start timer2 with 3 minutes
gSaveContext.eventInf[1] &= ~1;
}
@@ -554,8 +554,7 @@ void EnKz_Draw(Actor* thisx, PlayState* play) {
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sEyeSegments[this->eyeIdx]));
Gfx_SetupDL_37Opa(play->state.gfxCtx);
- SkelAnime_DrawFlexOpa(play, this->skelanime.skeleton, this->skelanime.jointTable, this->skelanime.dListCount,
- EnKz_OverrideLimbDraw, EnKz_PostLimbDraw, this);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelanime, EnKz_OverrideLimbDraw, EnKz_PostLimbDraw, this);
CLOSE_DISPS(play->state.gfxCtx);
}
diff --git a/soh/src/overlays/actors/ovl_En_Ma1/z_en_ma1.c b/soh/src/overlays/actors/ovl_En_Ma1/z_en_ma1.c
index 8c9221307..f388d4989 100644
--- a/soh/src/overlays/actors/ovl_En_Ma1/z_en_ma1.c
+++ b/soh/src/overlays/actors/ovl_En_Ma1/z_en_ma1.c
@@ -97,7 +97,7 @@ bool Randomizer_ObtainedMalonHCReward() {
u16 EnMa1_GetText(PlayState* play, Actor* thisx) {
// Special case for Malon Hyrule Castle Text. Placing it here at the beginning
// has the added benefit of circumventing mask text if wearing bunny hood.
- if (gSaveContext.n64ddFlag && play->sceneNum == SCENE_HYRULE_CASTLE) {
+ if (IS_RANDO && play->sceneNum == SCENE_HYRULE_CASTLE) {
return Randomizer_ObtainedMalonHCReward() ? 0x2044 : 0x2043;
}
u16 faceReaction = Text_GetFaceReaction(play, 0x17);
@@ -105,7 +105,7 @@ u16 EnMa1_GetText(PlayState* play, Actor* thisx) {
if (faceReaction != 0) {
return faceReaction;
}
- if (!gSaveContext.n64ddFlag) {
+ if (!IS_RANDO) {
if (CHECK_QUEST_ITEM(QUEST_SONG_EPONA)) {
return 0x204A;
}
@@ -207,7 +207,7 @@ s32 func_80AA08C4(EnMa1* this, PlayState* play) {
}
if ((play->sceneNum == SCENE_HYRULE_CASTLE) && // if we're at hyrule castle
(!Flags_GetEventChkInf(EVENTCHKINF_TALON_RETURNED_FROM_CASTLE) || // and talon hasn't left
- (gSaveContext.n64ddFlag &&
+ (IS_RANDO &&
!Randomizer_ObtainedMalonHCReward()))) { // or we're rando'd and haven't gotten malon's HC check
if (Flags_GetInfTable(INFTABLE_ENTERED_HYRULE_CASTLE)) { // if we've met malon
return 1; // make her appear at the castle
@@ -227,7 +227,7 @@ s32 func_80AA08C4(EnMa1* this, PlayState* play) {
// If we've gotten this far, we're in Lon Lon Ranch. Spawn Malon if it is daytime, Talon has left Hyrule Castle, and
// either we are not randomized, or we are and we have received Malon's item at Hyrule Castle.
if ((this->actor.shape.rot.z == 3) && IS_DAY && (Flags_GetEventChkInf(EVENTCHKINF_TALON_RETURNED_FROM_CASTLE)) &&
- ((gSaveContext.n64ddFlag && Randomizer_ObtainedMalonHCReward()) || !gSaveContext.n64ddFlag)) {
+ ((IS_RANDO && Randomizer_ObtainedMalonHCReward()) || !IS_RANDO)) {
return 1;
}
return 0;
@@ -292,7 +292,7 @@ void EnMa1_Init(Actor* thisx, PlayState* play) {
Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit);
CollisionCheck_SetInfo2(&this->actor.colChkInfo, DamageTable_Get(22), &sColChkInfoInit);
- if (gSaveContext.n64ddFlag) { // Skip Malon's multiple textboxes before getting an item
+ if (IS_RANDO) { // Skip Malon's multiple textboxes before getting an item
Flags_SetInfTable(INFTABLE_ENTERED_HYRULE_CASTLE);
Flags_SetInfTable(INFTABLE_MET_CHILD_MALON_AT_CASTLE_OR_MARKET);
Flags_SetEventChkInf(EVENTCHKINF_SPOKE_TO_CHILD_MALON_AT_CASTLE_OR_MARKET);
@@ -313,13 +313,13 @@ void EnMa1_Init(Actor* thisx, PlayState* play) {
// 1. Talon has not left Hyrule Castle.
// 2. We are Randomized and have not obtained Malon's Weird Egg Check.
// 3. We are not Randomized and have obtained Epona's Song
- if (!Flags_GetEventChkInf(EVENTCHKINF_TALON_RETURNED_FROM_CASTLE) || (gSaveContext.n64ddFlag && !Randomizer_ObtainedMalonHCReward()) || (CHECK_QUEST_ITEM(QUEST_SONG_EPONA) && !gSaveContext.n64ddFlag) ||
- (gSaveContext.n64ddFlag && Flags_GetTreasure(play, 0x1F))) {
+ if (!Flags_GetEventChkInf(EVENTCHKINF_TALON_RETURNED_FROM_CASTLE) || (IS_RANDO && !Randomizer_ObtainedMalonHCReward()) || (CHECK_QUEST_ITEM(QUEST_SONG_EPONA) && !IS_RANDO) ||
+ (IS_RANDO && Flags_GetTreasure(play, 0x1F))) {
this->actionFunc = func_80AA0D88;
EnMa1_ChangeAnim(this, ENMA1_ANIM_2);
// If none of the above conditions were true, set Malon up to teach Epona's Song.
} else {
- if (gSaveContext.n64ddFlag) { // Skip straight to "let's sing it together" textbox in the ranch
+ if (IS_RANDO) { // Skip straight to "let's sing it together" textbox in the ranch
Flags_SetEventChkInf(EVENTCHKINF_INVITED_TO_SING_WITH_CHILD_MALON);
}
@@ -349,13 +349,13 @@ void func_80AA0D88(EnMa1* this, PlayState* play) {
// We want to Kill Malon's Actor outside of randomizer when Talon is freed. In Randomizer we don't kill Malon's
// Actor here, otherwise if we wake up Talon first and then get her check she will spontaneously
// disappear.
- if ((play->sceneNum == SCENE_HYRULE_CASTLE) && (!gSaveContext.n64ddFlag && Flags_GetEventChkInf(EVENTCHKINF_TALON_RETURNED_FROM_CASTLE))) {
+ if ((play->sceneNum == SCENE_HYRULE_CASTLE) && (!IS_RANDO && Flags_GetEventChkInf(EVENTCHKINF_TALON_RETURNED_FROM_CASTLE))) {
Actor_Kill(&this->actor);
// We want Malon to give the Weird Egg Check (see function below) in the following situations:
// 1. Talon as not left Hyrule Castle (Vanilla) OR
// 2. We haven't obtained Malon's Weird Egg Check (Randomizer only) OR
// 3. We have Epona's Song? (Vanilla only, not sure why it's here but I didn't write that one)
- } else if ((!Flags_GetEventChkInf(EVENTCHKINF_TALON_RETURNED_FROM_CASTLE) || (gSaveContext.n64ddFlag && !Randomizer_ObtainedMalonHCReward())) || (CHECK_QUEST_ITEM(QUEST_SONG_EPONA) && !gSaveContext.n64ddFlag)) {
+ } else if ((!Flags_GetEventChkInf(EVENTCHKINF_TALON_RETURNED_FROM_CASTLE) || (IS_RANDO && !Randomizer_ObtainedMalonHCReward())) || (CHECK_QUEST_ITEM(QUEST_SONG_EPONA) && !IS_RANDO)) {
if (this->interactInfo.talkState == NPC_TALK_STATE_ACTION) {
this->actionFunc = func_80AA0EA0;
play->msgCtx.stateTimer = 4;
@@ -369,7 +369,7 @@ void func_80AA0EA0(EnMa1* this, PlayState* play) {
this->actor.parent = NULL;
this->actionFunc = func_80AA0EFC;
} else {
- if (!gSaveContext.n64ddFlag) {
+ if (!IS_RANDO) {
func_8002F434(&this->actor, play, GI_WEIRD_EGG, 120.0f, 10.0f);
} else {
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_HC_MALON_EGG, GI_WEIRD_EGG);
@@ -428,7 +428,7 @@ void func_80AA0F44(EnMa1* this, PlayState* play) {
this->interactInfo.talkState = NPC_TALK_STATE_TALKING;
this->actor.flags |= ACTOR_FLAG_WILL_TALK;
// when rando'ed, skip to the Item Giving. Otherwise go to the song teaching code.
- this->actionFunc = gSaveContext.n64ddFlag ? func_80AA1150 : func_80AA106C;
+ this->actionFunc = IS_RANDO ? func_80AA1150 : func_80AA106C;
} else if (this->actor.xzDistToPlayer < 30.0f + (f32)this->collider.dim.radius) {
// somehow flags that the player is close to malon so that pulling out the Ocarina
// triggers the code above this.
@@ -436,7 +436,7 @@ void func_80AA0F44(EnMa1* this, PlayState* play) {
}
// If rando'ed, a textbox is closing, it's malon's 'my mom wrote this song' text, AND we do have an ocarina
// in our inventory. This allows us to grant the check when talking to malon with the ocarina in our inventory.
- if (gSaveContext.n64ddFlag && (Actor_TextboxIsClosing(&this->actor, play) && play->msgCtx.textId == 0x2049) &&
+ if (IS_RANDO && (Actor_TextboxIsClosing(&this->actor, play) && play->msgCtx.textId == 0x2049) &&
(INV_CONTENT(ITEM_OCARINA_FAIRY) != ITEM_NONE || INV_CONTENT(ITEM_OCARINA_TIME) != ITEM_NONE)) {
this->actionFunc = EnMa1_WaitForSongGive;
}
@@ -474,7 +474,7 @@ void EnMa1_EndTeachSong(EnMa1* this, PlayState* play) {
play->msgCtx.ocarinaMode = OCARINA_MODE_04;
}
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
// Transition to the giving the song check on the next update run.
this->actionFunc = EnMa1_WaitForSongGive;
}
@@ -484,12 +484,12 @@ void func_80AA1150(EnMa1* this, PlayState* play) {
GET_PLAYER(play)->stateFlags2 |= 0x800000;
// When rando'ed, trigger the "song learned" Ocarina mode.
- if (gSaveContext.n64ddFlag && (Message_GetState(&play->msgCtx) == TEXT_STATE_CLOSING)) {
+ if (IS_RANDO && (Message_GetState(&play->msgCtx) == TEXT_STATE_CLOSING)) {
play->msgCtx.ocarinaMode = OCARINA_MODE_03;
}
if (play->msgCtx.ocarinaMode == OCARINA_MODE_03) {
- if (!gSaveContext.n64ddFlag) {
+ if (!IS_RANDO) {
play->nextEntranceIndex = 0x157;
gSaveContext.nextCutsceneIndex = 0xFFF1;
play->fadeTransition = 42;
@@ -573,8 +573,7 @@ void EnMa1_Draw(Actor* thisx, PlayState* play) {
gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(sMouthTextures[this->mouthIndex]));
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sEyeTextures[this->eyeIndex]));
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
- EnMa1_OverrideLimbDraw, EnMa1_PostLimbDraw, this);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnMa1_OverrideLimbDraw, EnMa1_PostLimbDraw, this);
CLOSE_DISPS(play->state.gfxCtx);
}
diff --git a/soh/src/overlays/actors/ovl_En_Ma2/z_en_ma2.c b/soh/src/overlays/actors/ovl_En_Ma2/z_en_ma2.c
index 24bb301e0..dc50b0e0e 100644
--- a/soh/src/overlays/actors/ovl_En_Ma2/z_en_ma2.c
+++ b/soh/src/overlays/actors/ovl_En_Ma2/z_en_ma2.c
@@ -387,8 +387,7 @@ void EnMa2_Draw(Actor* thisx, PlayState* play) {
gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(sMouthTextures[this->mouthIndex]));
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sEyeTextures[this->eyeIndex]));
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
- EnMa2_OverrideLimbDraw, EnMa2_PostLimbDraw, this);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnMa2_OverrideLimbDraw, EnMa2_PostLimbDraw, this);
CLOSE_DISPS(play->state.gfxCtx);
}
diff --git a/soh/src/overlays/actors/ovl_En_Ma3/z_en_ma3.c b/soh/src/overlays/actors/ovl_En_Ma3/z_en_ma3.c
index 95c5df3e7..a424f8244 100644
--- a/soh/src/overlays/actors/ovl_En_Ma3/z_en_ma3.c
+++ b/soh/src/overlays/actors/ovl_En_Ma3/z_en_ma3.c
@@ -367,8 +367,7 @@ void EnMa3_Draw(Actor* thisx, PlayState* play) {
gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(sMouthTextures[this->mouthIndex]));
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sEyeTextures[this->eyeIndex]));
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
- EnMa3_OverrideLimbDraw, EnMa3_PostLimbDraw, this);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnMa3_OverrideLimbDraw, EnMa3_PostLimbDraw, this);
CLOSE_DISPS(play->state.gfxCtx);
}
diff --git a/soh/src/overlays/actors/ovl_En_Mag/z_en_mag.c b/soh/src/overlays/actors/ovl_En_Mag/z_en_mag.c
index c75988adc..5bde19542 100644
--- a/soh/src/overlays/actors/ovl_En_Mag/z_en_mag.c
+++ b/soh/src/overlays/actors/ovl_En_Mag/z_en_mag.c
@@ -461,7 +461,7 @@ void EnMag_UpdateVanilla(Actor* thisx, PlayState* play) {
if (this->effectFadeInTimer == 0) {
this->effectPrimLodFrac = 128.0f;
-
+
this->effectPrimColor[2] = 170.0f;
this->effectEnvColor[1] = 100.0f;
@@ -544,7 +544,7 @@ void EnMag_DrawEffectTextures(Gfx** gfxp, const void* maskTex, void* effectTex,
s16 effectWidth, s16 effectHeight, s16 rectLeft, s16 rectTop, s16 rectWidth,
s16 rectHeight, u16 dsdx, u16 dtdy, u16 shifts, u16 shiftt, u16 flag, EnMag* this) {
Gfx* gfx = *gfxp;
-
+
gDPLoadMultiBlock_4b(gfx++, maskTex, 0x0000, 0, G_IM_FMT_I, maskWidth, maskHeight, 0, G_TX_NOMIRROR | G_TX_WRAP,
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
@@ -574,21 +574,21 @@ void EnMag_DrawImageRGBA32(Gfx** gfxp, s16 centerX, s16 centerY, const char* sou
s32 i;
Gfx_SetupDL_56Ptr(&gfx);
-
+
rectLeft = centerX - (width / 2);
rectTop = centerY - (height / 2);
-
+
gDPSetTileCustom(gfx++, G_IM_FMT_RGBA, G_IM_SIZ_32b, width, height, 0, G_TX_NOMIRROR | G_TX_CLAMP,
G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
-
+
gDPSetTextureImage(gfx++, G_IM_FMT_RGBA, G_IM_SIZ_32b, width, source);
-
+
gDPLoadSync(gfx++);
gDPLoadTile(gfx++, G_TX_LOADTILE, 0, 0, (width - 1) << 2, (height - 1) << 2);
-
- gSPTextureRectangle(gfx++, rectLeft << 2, rectTop << 2, (rectLeft + (s32)width) << 2,
- (rectTop + height) << 2, G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10);
-
+
+ gSPTextureRectangle(gfx++, rectLeft << 2, rectTop << 2, (rectLeft + (s32)width) << 2, (rectTop + height) << 2,
+ G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10);
+
*gfxp = gfx;
}
@@ -738,9 +738,8 @@ void EnMag_DrawInnerMq(Actor* thisx, PlayState* play, Gfx** gfxp) {
(s16)this->copyrightAlpha);
if ((s16)this->copyrightAlpha != 0) {
- gDPLoadTextureBlock(gfx++, copy_tex, G_IM_FMT_IA, G_IM_SIZ_8b, copy_width, 16, 0,
- G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK,
- G_TX_NOLOD, G_TX_NOLOD);
+ gDPLoadTextureBlock(gfx++, copy_tex, G_IM_FMT_IA, G_IM_SIZ_8b, copy_width, 16, 0, G_TX_NOMIRROR | G_TX_CLAMP,
+ G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
gSPTextureRectangle(gfx++, copy_xl, 792, copy_xh, 856, G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10);
}
@@ -924,7 +923,6 @@ void EnMag_DrawInnerVanilla(Actor* thisx, PlayState* play, Gfx** gfxp) {
EnMag_DrawTextureI8(&gfx, gTitleTheLegendOfTextTex, 72, 8, 153, 72, 72, 8, 1024, 1024);
EnMag_DrawTextureI8(&gfx, gTitleOcarinaOfTimeTMTextTex, 96, 8, 151, 126, 96, 8, 1024, 1024);
-
}
Gfx_SetupDL_39Ptr(&gfx);
@@ -936,9 +934,8 @@ void EnMag_DrawInnerVanilla(Actor* thisx, PlayState* play, Gfx** gfxp) {
(s16)this->copyrightAlpha);
if ((s16)this->copyrightAlpha != 0) {
- gDPLoadTextureBlock(gfx++, copy_tex, G_IM_FMT_IA, G_IM_SIZ_8b, copy_width, 16, 0,
- G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK,
- G_TX_NOLOD, G_TX_NOLOD);
+ gDPLoadTextureBlock(gfx++, copy_tex, G_IM_FMT_IA, G_IM_SIZ_8b, copy_width, 16, 0, G_TX_NOMIRROR | G_TX_CLAMP,
+ G_TX_NOMIRROR | G_TX_CLAMP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
gSPTextureRectangle(gfx++, copy_xl, 792, copy_xh, 856, G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10);
}
@@ -1054,4 +1051,4 @@ void EnMag_Draw(Actor* thisx, PlayState* play) {
POLY_OPA_DISP = gfx;
CLOSE_DISPS(play->state.gfxCtx);
-}
+}
\ No newline at end of file
diff --git a/soh/src/overlays/actors/ovl_En_Mag/z_en_mag.h b/soh/src/overlays/actors/ovl_En_Mag/z_en_mag.h
index bb1f01041..c3799502e 100644
--- a/soh/src/overlays/actors/ovl_En_Mag/z_en_mag.h
+++ b/soh/src/overlays/actors/ovl_En_Mag/z_en_mag.h
@@ -44,4 +44,4 @@ typedef enum {
#define dgTitleCopyright1998Tex "__OTR__objects/object_mag/gTitleCopyright1998Tex"
static const ALIGN_ASSET(2) char gTitleCopyright1998Tex[] = dgTitleCopyright1998Tex;
-#endif
+#endif
\ No newline at end of file
diff --git a/soh/src/overlays/actors/ovl_En_Mb/z_en_mb.c b/soh/src/overlays/actors/ovl_En_Mb/z_en_mb.c
index 03c807fba..59bee3ee5 100644
--- a/soh/src/overlays/actors/ovl_En_Mb/z_en_mb.c
+++ b/soh/src/overlays/actors/ovl_En_Mb/z_en_mb.c
@@ -1569,8 +1569,7 @@ void EnMb_Draw(Actor* thisx, PlayState* play) {
EnMb* this = (EnMb*)thisx;
Gfx_SetupDL_25Opa(play->state.gfxCtx);
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
- NULL, EnMb_PostLimbDraw, thisx);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, NULL, EnMb_PostLimbDraw, thisx);
if (thisx->params != ENMB_TYPE_CLUB) {
if (this->attack > ENMB_ATTACK_NONE) {
diff --git a/soh/src/overlays/actors/ovl_En_Md/z_en_md.c b/soh/src/overlays/actors/ovl_En_Md/z_en_md.c
index c66229094..d757a5a02 100644
--- a/soh/src/overlays/actors/ovl_En_Md/z_en_md.c
+++ b/soh/src/overlays/actors/ovl_En_Md/z_en_md.c
@@ -373,8 +373,8 @@ u16 EnMd_GetTextKokiriForest(PlayState* play, EnMd* this) {
this->unk_209 = TEXT_STATE_NONE;
// In rando, skip talking about the tree being dead so we can have the prompt for sword and shield instead
- if ((!gSaveContext.n64ddFlag && CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD)) ||
- (gSaveContext.n64ddFlag && Flags_GetEventChkInf(EVENTCHKINF_SHOWED_MIDO_SWORD_SHIELD) &&
+ if ((!IS_RANDO && CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD)) ||
+ (IS_RANDO && Flags_GetEventChkInf(EVENTCHKINF_SHOWED_MIDO_SWORD_SHIELD) &&
Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_DEKU_TREE) &&
!Flags_GetEventChkInf(EVENTCHKINF_SPOKE_TO_MIDO_AFTER_DEKU_TREES_DEATH))) {
return 0x1045;
@@ -489,7 +489,7 @@ u8 EnMd_ShouldSpawn(EnMd* this, PlayState* play) {
// He will spawn in the forest if you haven't showed the sword and shield, and will remain
// in the forest until you've obtained Zelda's letter or Deku Tree dies
// This is to ensure Deku Tree can still be opened in dungeon entrance rando even if Ghoma is defeated
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
if (play->sceneNum == SCENE_LOST_WOODS) {
return 1;
}
@@ -681,8 +681,8 @@ void EnMd_Init(Actor* thisx, PlayState* play) {
if (((play->sceneNum == SCENE_KOKIRI_FOREST) && !Flags_GetEventChkInf(EVENTCHKINF_SHOWED_MIDO_SWORD_SHIELD)) ||
((play->sceneNum == SCENE_KOKIRI_FOREST) && (Flags_GetEventChkInf(EVENTCHKINF_SHOWED_MIDO_SWORD_SHIELD)) &&
- ((!gSaveContext.n64ddFlag && CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD)) ||
- (gSaveContext.n64ddFlag && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_DEKU_TREE)))) ||
+ ((!IS_RANDO && CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD)) ||
+ (IS_RANDO && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_DEKU_TREE)))) ||
((play->sceneNum == SCENE_LOST_WOODS) && !Flags_GetEventChkInf(EVENTCHKINF_PLAYED_SARIAS_SONG_FOR_MIDO_AS_ADULT))) {
this->actor.home.pos = this->actor.world.pos;
this->actionFunc = func_80AAB948;
@@ -745,8 +745,8 @@ void func_80AAB948(EnMd* this, PlayState* play) {
}
if (this->interactInfo.talkState == NPC_TALK_STATE_ACTION) {
- if ((!gSaveContext.n64ddFlag && CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD) ||
- gSaveContext.n64ddFlag && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_DEKU_TREE) &&
+ if ((!IS_RANDO && CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD) ||
+ IS_RANDO && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_DEKU_TREE) &&
Flags_GetEventChkInf(EVENTCHKINF_SHOWED_MIDO_SWORD_SHIELD)) && !Flags_GetEventChkInf(EVENTCHKINF_SPOKE_TO_MIDO_AFTER_DEKU_TREES_DEATH) &&
(play->sceneNum == SCENE_KOKIRI_FOREST)) {
play->msgCtx.msgMode = MSGMODE_PAUSED;
@@ -814,8 +814,8 @@ void func_80AABD0C(EnMd* this, PlayState* play) {
return;
}
- if ((!gSaveContext.n64ddFlag && CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD) ||
- gSaveContext.n64ddFlag && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_DEKU_TREE) &&
+ if ((!IS_RANDO && CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD) ||
+ IS_RANDO && Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_DEKU_TREE) &&
Flags_GetEventChkInf(EVENTCHKINF_SHOWED_MIDO_SWORD_SHIELD)) && !Flags_GetEventChkInf(EVENTCHKINF_SPOKE_TO_MIDO_AFTER_DEKU_TREES_DEATH) &&
(play->sceneNum == SCENE_KOKIRI_FOREST)) {
Message_CloseTextbox(play);
diff --git a/soh/src/overlays/actors/ovl_En_Mk/z_en_mk.c b/soh/src/overlays/actors/ovl_En_Mk/z_en_mk.c
index e056a4b04..e5501858c 100644
--- a/soh/src/overlays/actors/ovl_En_Mk/z_en_mk.c
+++ b/soh/src/overlays/actors/ovl_En_Mk/z_en_mk.c
@@ -96,12 +96,12 @@ void func_80AACA94(EnMk* this, PlayState* play) {
if (Actor_HasParent(&this->actor, play) != 0) {
this->actor.parent = NULL;
this->actionFunc = func_80AACA40;
- if (!gSaveContext.n64ddFlag) {
+ if (!IS_RANDO) {
func_80088AA0(240);
gSaveContext.eventInf[1] &= ~1;
}
} else {
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_LH_TRADE_FROG, GI_EYEDROPS);
Randomizer_ConsumeAdultTradeItem(play, ITEM_FROG);
GiveItemEntryFromActor(&this->actor, play, getItemEntry, 10000.0f, 50.0f);
@@ -116,7 +116,7 @@ void func_80AACA94(EnMk* this, PlayState* play) {
void func_80AACB14(EnMk* this, PlayState* play) {
if (Actor_TextboxIsClosing(&this->actor, play)) {
this->actionFunc = func_80AACA94;
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_LH_TRADE_FROG, GI_EYEDROPS);
Randomizer_ConsumeAdultTradeItem(play, ITEM_FROG);
GiveItemEntryFromActor(&this->actor, play, getItemEntry, 10000.0f, 50.0f);
@@ -150,7 +150,7 @@ void func_80AACC04(EnMk* this, PlayState* play) {
if (this->timer > 0) {
this->timer--;
} else {
- this->timer = gSaveContext.n64ddFlag ? 0 : 16;
+ this->timer = IS_RANDO ? 0 : 16;
this->actionFunc = func_80AACBAC;
Animation_Change(&this->skelAnime, &object_mk_Anim_000D88, 1.0f, 0.0f,
Animation_GetLastFrame(&object_mk_Anim_000D88), ANIMMODE_LOOP, -4.0f);
@@ -163,7 +163,7 @@ void func_80AACCA0(EnMk* this, PlayState* play) {
this->timer--;
this->actor.shape.rot.y += 0x800;
} else {
- this->timer = gSaveContext.n64ddFlag ? 0 : 120;
+ this->timer = IS_RANDO ? 0 : 120;
this->actionFunc = func_80AACC04;
Animation_Change(&this->skelAnime, &object_mk_Anim_000724, 1.0f, 0.0f,
Animation_GetLastFrame(&object_mk_Anim_000724), ANIMMODE_LOOP, -4.0f);
@@ -179,7 +179,7 @@ void func_80AACD48(EnMk* this, PlayState* play) {
this->actionFunc = func_80AACCA0;
play->msgCtx.msgMode = MSGMODE_PAUSED;
player->exchangeItemId = EXCH_ITEM_NONE;
- this->timer = gSaveContext.n64ddFlag ? 0 : 16;
+ this->timer = IS_RANDO ? 0 : 16;
Animation_Change(&this->skelAnime, &object_mk_Anim_000D88, 1.0f, 0.0f,
Animation_GetLastFrame(&object_mk_Anim_000D88), ANIMMODE_LOOP, -4.0f);
this->flags &= ~2;
@@ -219,7 +219,7 @@ void func_80AACFA0(EnMk* this, PlayState* play) {
Flags_SetItemGetInf(ITEMGETINF_10);
} else {
// not sure when/how/if this is getting called
- if (!gSaveContext.n64ddFlag) {
+ if (!IS_RANDO) {
func_8002F434(&this->actor, play, GI_HEART_PIECE, 10000.0f, 50.0f);
} else {
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_LH_LAB_DIVE, GI_HEART_PIECE);
@@ -231,7 +231,7 @@ void func_80AACFA0(EnMk* this, PlayState* play) {
void func_80AAD014(EnMk* this, PlayState* play) {
if (Actor_TextboxIsClosing(&this->actor, play)) {
this->actionFunc = func_80AACFA0;
- if (!gSaveContext.n64ddFlag) {
+ if (!IS_RANDO) {
func_8002F434(&this->actor, play, GI_HEART_PIECE, 10000.0f, 50.0f);
} else {
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_LH_LAB_DIVE, GI_HEART_PIECE);
@@ -257,7 +257,7 @@ void EnMk_Wait(EnMk* this, PlayState* play) {
} else {
// Skip eye drop text on rando if Link went in the water, so you can still receive the dive check
if (INV_CONTENT(ITEM_ODD_MUSHROOM) == ITEM_EYEDROPS &&
- (!gSaveContext.n64ddFlag || this->swimFlag == 0)) {
+ (!IS_RANDO || this->swimFlag == 0)) {
player->actor.textId = 0x4032;
this->actionFunc = func_80AACA40;
} else {
@@ -401,6 +401,5 @@ void EnMk_Draw(Actor* thisx, PlayState* play) {
EnMk* this = (EnMk*)thisx;
Gfx_SetupDL_37Opa(play->state.gfxCtx);
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
- EnMk_OverrideLimbDraw, EnMk_PostLimbDraw, &this->actor);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnMk_OverrideLimbDraw, EnMk_PostLimbDraw, &this->actor);
}
diff --git a/soh/src/overlays/actors/ovl_En_Mm/z_en_mm.c b/soh/src/overlays/actors/ovl_En_Mm/z_en_mm.c
index dbd9a2af6..f76c61674 100644
--- a/soh/src/overlays/actors/ovl_En_Mm/z_en_mm.c
+++ b/soh/src/overlays/actors/ovl_En_Mm/z_en_mm.c
@@ -521,8 +521,7 @@ void EnMm_Draw(Actor* thisx, PlayState* play) {
Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(mouthTextures[this->mouthTexIndex]));
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
- EnMm_OverrideLimbDraw, EnMm_PostLimbDraw, this);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnMm_OverrideLimbDraw, EnMm_PostLimbDraw, this);
if (Flags_GetItemGetInf(ITEMGETINF_3B)) {
s32 linkChildObjBankIndex = Object_GetIndex(&play->objectCtx, OBJECT_LINK_CHILD);
diff --git a/soh/src/overlays/actors/ovl_En_Mm2/z_en_mm2.c b/soh/src/overlays/actors/ovl_En_Mm2/z_en_mm2.c
index fc3164edf..b1bbc09a5 100644
--- a/soh/src/overlays/actors/ovl_En_Mm2/z_en_mm2.c
+++ b/soh/src/overlays/actors/ovl_En_Mm2/z_en_mm2.c
@@ -315,8 +315,7 @@ void EnMm2_Draw(Actor* thisx, PlayState* play) {
OPEN_DISPS(play->state.gfxCtx);
Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(mouthTextures[this->mouthTexIndex]));
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
- EnMm2_OverrideLimbDraw, EnMm2_PostLimbDraw, this);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnMm2_OverrideLimbDraw, EnMm2_PostLimbDraw, this);
CLOSE_DISPS(play->state.gfxCtx);
}
diff --git a/soh/src/overlays/actors/ovl_En_Ms/z_en_ms.c b/soh/src/overlays/actors/ovl_En_Ms/z_en_ms.c
index 039e7297f..8c4f78a0c 100644
--- a/soh/src/overlays/actors/ovl_En_Ms/z_en_ms.c
+++ b/soh/src/overlays/actors/ovl_En_Ms/z_en_ms.c
@@ -128,13 +128,13 @@ void EnMs_Talk(EnMs* this, PlayState* play) {
switch (play->msgCtx.choiceIndex) {
case 0: // yes
if (gSaveContext.rupees <
- ((gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_MAGIC_BEANS))
+ ((IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_MAGIC_BEANS))
? 60
: sPrices[BEANS_BOUGHT])) {
Message_ContinueTextbox(play, 0x4069); // not enough rupees text
return;
}
- if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_MAGIC_BEANS)) {
+ if (IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_MAGIC_BEANS)) {
GiveItemEntryFromActor(&this->actor, play,
Randomizer_GetItemFromKnownCheck(RC_ZR_MAGIC_BEAN_SALESMAN, GI_BEAN), 90.0f, 10.0f);
} else {
@@ -152,12 +152,12 @@ void EnMs_Talk(EnMs* this, PlayState* play) {
void EnMs_Sell(EnMs* this, PlayState* play) {
if (Actor_HasParent(&this->actor, play)) {
- Rupees_ChangeBy((gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_MAGIC_BEANS)) ? -60 : -sPrices[BEANS_BOUGHT]);
+ Rupees_ChangeBy((IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_MAGIC_BEANS)) ? -60 : -sPrices[BEANS_BOUGHT]);
this->actor.parent = NULL;
this->actionFunc =
- (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_MAGIC_BEANS)) ? EnMs_Wait : EnMs_TalkAfterPurchase;
+ (IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_MAGIC_BEANS)) ? EnMs_Wait : EnMs_TalkAfterPurchase;
} else {
- if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_MAGIC_BEANS)) {
+ if (IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_MAGIC_BEANS)) {
GetItemEntry itemEntry = Randomizer_GetItemFromKnownCheck(RC_ZR_MAGIC_BEAN_SALESMAN, GI_BEAN);
gSaveContext.pendingSale = itemEntry.itemId;
gSaveContext.pendingSaleMod = itemEntry.modIndex;
@@ -204,6 +204,5 @@ void EnMs_Draw(Actor* thisx, PlayState* play) {
EnMs* this = (EnMs*)thisx;
Gfx_SetupDL_25Opa(play->state.gfxCtx);
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
- NULL, NULL, this);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, NULL, NULL, this);
}
diff --git a/soh/src/overlays/actors/ovl_En_Mu/z_en_mu.c b/soh/src/overlays/actors/ovl_En_Mu/z_en_mu.c
index 2af75934c..d37b8d1ff 100644
--- a/soh/src/overlays/actors/ovl_En_Mu/z_en_mu.c
+++ b/soh/src/overlays/actors/ovl_En_Mu/z_en_mu.c
@@ -216,7 +216,6 @@ void EnMu_Draw(Actor* thisx, PlayState* play) {
colors[this->actor.params][i].g, colors[this->actor.params][i].b,
colors[this->actor.params][i].a));
}
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
- EnMu_OverrideLimbDraw, EnMu_PostLimbDraw, this);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnMu_OverrideLimbDraw, EnMu_PostLimbDraw, this);
CLOSE_DISPS(play->state.gfxCtx);
}
diff --git a/soh/src/overlays/actors/ovl_En_Nb/z_en_nb.c b/soh/src/overlays/actors/ovl_En_Nb/z_en_nb.c
index e5b3723cf..a519209aa 100644
--- a/soh/src/overlays/actors/ovl_En_Nb/z_en_nb.c
+++ b/soh/src/overlays/actors/ovl_En_Nb/z_en_nb.c
@@ -964,8 +964,7 @@ void func_80AB2E70(EnNb* this, PlayState* play) {
gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(gNabooruEyeWideTex));
gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, 255);
gSPSegment(POLY_OPA_DISP++, 0x0C, &D_80116280[2]);
- SkelAnime_DrawFlexOpa(play, skelAnime->skeleton, skelAnime->jointTable, skelAnime->dListCount, NULL, NULL,
- &this->actor);
+ SkelAnime_DrawSkeletonOpa(play, skelAnime, NULL, NULL, &this->actor);
CLOSE_DISPS(play->state.gfxCtx);
}
@@ -994,8 +993,7 @@ void func_80AB2FE4(EnNb* this, PlayState* play) {
gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(eyeTexture));
gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, 255);
gSPSegment(POLY_OPA_DISP++, 0x0C, &D_80116280[2]);
- SkelAnime_DrawFlexOpa(play, skelAnime->skeleton, skelAnime->jointTable, skelAnime->dListCount, func_80AB2FC0,
- NULL, &this->actor);
+ SkelAnime_DrawSkeletonOpa(play, skelAnime, func_80AB2FC0, NULL, &this->actor);
CLOSE_DISPS(play->state.gfxCtx);
}
@@ -1102,7 +1100,7 @@ void EnNb_LookUp(EnNb* this, PlayState* play) {
}
void EnNb_CrawlspaceSpawnCheck(EnNb* this, PlayState* play) {
- if (!gSaveContext.n64ddFlag && !Flags_GetEventChkInf(EVENTCHKINF_NABOORU_CAPTURED_BY_TWINROVA) && LINK_IS_CHILD) {
+ if (!IS_RANDO && !Flags_GetEventChkInf(EVENTCHKINF_NABOORU_CAPTURED_BY_TWINROVA) && LINK_IS_CHILD) {
EnNb_UpdatePath(this, play);
// looking into crawlspace
@@ -1509,8 +1507,7 @@ void EnNb_DrawDefault(EnNb* this, PlayState* play) {
gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(eyeTexture));
gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, 255);
gSPSegment(POLY_OPA_DISP++, 0x0C, &D_80116280[2]);
- SkelAnime_DrawFlexOpa(play, skelAnime->skeleton, skelAnime->jointTable, skelAnime->dListCount,
- EnNb_OverrideLimbDraw, EnNb_PostLimbDraw, &this->actor);
+ SkelAnime_DrawSkeletonOpa(play, skelAnime, EnNb_OverrideLimbDraw, EnNb_PostLimbDraw, &this->actor);
CLOSE_DISPS(play->state.gfxCtx);
}
diff --git a/soh/src/overlays/actors/ovl_En_Niw/z_en_niw.c b/soh/src/overlays/actors/ovl_En_Niw/z_en_niw.c
index a8b967876..ddc9aea65 100644
--- a/soh/src/overlays/actors/ovl_En_Niw/z_en_niw.c
+++ b/soh/src/overlays/actors/ovl_En_Niw/z_en_niw.c
@@ -1138,8 +1138,7 @@ void EnNiw_Draw(Actor* thisx, PlayState* play) {
GraphicsContext* gfxCtx = play->state.gfxCtx;
Gfx_SetupDL_25Opa(play->state.gfxCtx);
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
- EnNiw_OverrideLimbDraw, NULL, this);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnNiw_OverrideLimbDraw, NULL, this);
if (this->actionFunc == func_80AB6450) {
func_80033C30(&this->actor.world.pos, &scale, 255, play);
diff --git a/soh/src/overlays/actors/ovl_En_Niw_Girl/z_en_niw_girl.c b/soh/src/overlays/actors/ovl_En_Niw_Girl/z_en_niw_girl.c
index aecbd0224..5113b8a68 100644
--- a/soh/src/overlays/actors/ovl_En_Niw_Girl/z_en_niw_girl.c
+++ b/soh/src/overlays/actors/ovl_En_Niw_Girl/z_en_niw_girl.c
@@ -258,8 +258,7 @@ void EnNiwGirl_Draw(Actor* thisx, PlayState* play) {
Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(eyeTextures[this->eyeIndex]));
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
- EnNiwGirlOverrideLimbDraw, NULL, this);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnNiwGirlOverrideLimbDraw, NULL, this);
func_80033C30(&this->actor.world.pos, &sp4C, 255, play);
CLOSE_DISPS(play->state.gfxCtx);
diff --git a/soh/src/overlays/actors/ovl_En_Niw_Lady/z_en_niw_lady.c b/soh/src/overlays/actors/ovl_En_Niw_Lady/z_en_niw_lady.c
index 29ac48373..8ddf52fad 100644
--- a/soh/src/overlays/actors/ovl_En_Niw_Lady/z_en_niw_lady.c
+++ b/soh/src/overlays/actors/ovl_En_Niw_Lady/z_en_niw_lady.c
@@ -204,7 +204,7 @@ void func_80ABA244(EnNiwLady* this, PlayState* play) {
EnNiw* currentCucco;
s32 phi_s1;
- this->cuccosInPen = gSaveContext.n64ddFlag ? (7 - Randomizer_GetSettingValue(RSK_CUCCO_COUNT)) : 0;
+ this->cuccosInPen = IS_RANDO ? (7 - Randomizer_GetSettingValue(RSK_CUCCO_COUNT)) : 0;
currentCucco = (EnNiw*)play->actorCtx.actorLists[ACTORCAT_PROP].head;
while (currentCucco != NULL) {
if (currentCucco->actor.id == ACTOR_EN_NIW) {
@@ -308,7 +308,7 @@ void func_80ABA654(EnNiwLady* this, PlayState* play) {
if (!Flags_GetItemGetInf(ITEMGETINF_0C)) {
this->actor.parent = NULL;
- if (!gSaveContext.n64ddFlag) {
+ if (!IS_RANDO) {
this->getItemId = GI_BOTTLE;
func_8002F434(&this->actor, play, GI_BOTTLE, 100.0f, 50.0f);
} else {
@@ -398,7 +398,7 @@ void func_80ABA9B8(EnNiwLady* this, PlayState* play) {
Message_CloseTextbox(play);
this->actor.parent = NULL;
- if (!gSaveContext.n64ddFlag) {
+ if (!IS_RANDO) {
func_8002F434(&this->actor, play, GI_POCKET_EGG, 200.0f, 100.0f);
} else {
this->getItemEntry = Randomizer_GetItemFromKnownCheck(RC_KAK_ANJU_AS_ADULT, GI_POCKET_EGG);
@@ -433,7 +433,7 @@ void func_80ABAB08(EnNiwLady* this, PlayState* play) {
case 0:
Message_CloseTextbox(play);
this->actor.parent = NULL;
- if (!gSaveContext.n64ddFlag) {
+ if (!IS_RANDO) {
func_8002F434(&this->actor, play, GI_COJIRO, 200.0f, 100.0f);
} else {
this->getItemEntry = Randomizer_GetItemFromKnownCheck(RC_KAK_TRADE_POCKET_CUCCO, GI_COJIRO);
@@ -462,7 +462,7 @@ void func_80ABAC00(EnNiwLady* this, PlayState* play) {
if (Actor_HasParent(&this->actor, play)) {
this->actionFunc = func_80ABAC84;
} else {
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
getItemId = this->getItemEntry.getItemId;
GiveItemEntryFromActor(&this->actor, play, this->getItemEntry, 200.0f, 100.0f);
return;
@@ -483,7 +483,7 @@ void func_80ABAC84(EnNiwLady* this, PlayState* play) {
osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ 正常終了 ☆☆☆☆☆ \n" VT_RST);
if (LINK_IS_ADULT) {
// Flags for randomizer gives are set in the original message prompt choice handling
- if (!gSaveContext.n64ddFlag) {
+ if (!IS_RANDO) {
if (!Flags_GetItemGetInf(ITEMGETINF_2C)) {
Flags_SetItemGetInf(ITEMGETINF_2C);
} else {
@@ -612,8 +612,7 @@ void EnNiwLady_Draw(Actor* thisx, PlayState* play) {
gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, 255);
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sEyeTextures[this->faceState]));
gSPSegment(POLY_OPA_DISP++, 0x0C, func_80ABB0A0(play->state.gfxCtx));
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable,
- this->skelAnime.dListCount, EnNiwLady_OverrideLimbDraw, NULL, this);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnNiwLady_OverrideLimbDraw, NULL, this);
}
CLOSE_DISPS(play->state.gfxCtx);
}
diff --git a/soh/src/overlays/actors/ovl_En_Okarina_Tag/z_en_okarina_tag.c b/soh/src/overlays/actors/ovl_En_Okarina_Tag/z_en_okarina_tag.c
index 84cf88997..74afaacff 100644
--- a/soh/src/overlays/actors/ovl_En_Okarina_Tag/z_en_okarina_tag.c
+++ b/soh/src/overlays/actors/ovl_En_Okarina_Tag/z_en_okarina_tag.c
@@ -234,7 +234,7 @@ void func_80ABF4C8(EnOkarinaTag* this, PlayState* play) {
if (play->msgCtx.ocarinaMode == OCARINA_MODE_04) {
this->actionFunc = func_80ABF28C;
} else if (play->msgCtx.ocarinaMode == OCARINA_MODE_03) {
- if (!gSaveContext.n64ddFlag || (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_DOOR_OF_TIME) != RO_DOOROFTIME_CLOSED)) {
+ if (!IS_RANDO || (IS_RANDO && Randomizer_GetSettingValue(RSK_DOOR_OF_TIME) != RO_DOOROFTIME_CLOSED)) {
func_80078884(NA_SE_SY_CORRECT_CHIME);
}
if (this->switchFlag >= 0) {
@@ -246,7 +246,7 @@ void func_80ABF4C8(EnOkarinaTag* this, PlayState* play) {
Flags_SetEventChkInf(EVENTCHKINF_OPENED_ZORAS_DOMAIN);
break;
case 2:
- if (!gSaveContext.n64ddFlag) {
+ if (!IS_RANDO) {
play->csCtx.segment = D_80ABF9D0;
gSaveContext.cutsceneTrigger = 1;
} else {
@@ -256,7 +256,7 @@ void func_80ABF4C8(EnOkarinaTag* this, PlayState* play) {
func_800F574C(1.18921f, 0x5A);
break;
case 4:
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
if (Randomizer_GetSettingValue(RSK_DOOR_OF_TIME) == RO_DOOROFTIME_CLOSED &&
(INV_CONTENT(ITEM_OCARINA_FAIRY) != ITEM_OCARINA_TIME ||
!CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD) || !CHECK_QUEST_ITEM(QUEST_GORON_RUBY) ||
@@ -274,7 +274,7 @@ void func_80ABF4C8(EnOkarinaTag* this, PlayState* play) {
break;
case 6:
// Don't start the cutscene in a rando save.
- if (!(gSaveContext.n64ddFlag)) {
+ if (!(IS_RANDO)) {
play->csCtx.segment = LINK_IS_ADULT ? SEGMENTED_TO_VIRTUAL(&spot02_scene_Cs_003C80)
: SEGMENTED_TO_VIRTUAL(&spot02_scene_Cs_005020);
gSaveContext.cutsceneTrigger = 1;
@@ -311,7 +311,7 @@ void func_80ABF708(EnOkarinaTag* this, PlayState* play) {
yawDiff = this->actor.yawTowardsPlayer - this->actor.world.rot.y;
this->unk_15A++;
if (!(this->actor.xzDistToPlayer > 120.0f)) {
- if (CHECK_QUEST_ITEM(QUEST_SONG_SUN) || gSaveContext.n64ddFlag) {
+ if (CHECK_QUEST_ITEM(QUEST_SONG_SUN) || IS_RANDO) {
this->actor.textId = 0x5021;
}
yawDiffNew = ABS(yawDiff);
@@ -335,10 +335,10 @@ void func_80ABF7CC(EnOkarinaTag* this, PlayState* play) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(play)) {
Message_CloseTextbox(play);
- if (!gSaveContext.n64ddFlag && !CHECK_QUEST_ITEM(QUEST_SONG_SUN)) {
+ if (!IS_RANDO && !CHECK_QUEST_ITEM(QUEST_SONG_SUN)) {
play->csCtx.segment = SEGMENTED_TO_VIRTUAL(&gSunSongGraveSunSongTeachCs);
gSaveContext.cutsceneTrigger = 1;
- } else if (gSaveContext.n64ddFlag && !Flags_GetTreasure(play, 0x1F)) {
+ } else if (IS_RANDO && !Flags_GetTreasure(play, 0x1F)) {
GivePlayerRandoRewardSunSong(this, play, RC_SONG_FROM_ROYAL_FAMILYS_TOMB);
}
this->actionFunc = func_80ABF708;
diff --git a/soh/src/overlays/actors/ovl_En_Okuta/z_en_okuta.c b/soh/src/overlays/actors/ovl_En_Okuta/z_en_okuta.c
index 0140290e6..017d1e9ae 100644
--- a/soh/src/overlays/actors/ovl_En_Okuta/z_en_okuta.c
+++ b/soh/src/overlays/actors/ovl_En_Okuta/z_en_okuta.c
@@ -758,7 +758,7 @@ void EnOkuta_Draw(Actor* thisx, PlayState* play) {
Gfx_SetupDL_25Opa(play->state.gfxCtx);
if (this->actor.params == 0) {
- SkelAnime_DrawOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, EnOkuta_OverrideLimbDraw,
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnOkuta_OverrideLimbDraw,
NULL, this);
} else {
OPEN_DISPS(play->state.gfxCtx);
diff --git a/soh/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c b/soh/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c
index df1c64f1e..5d3ebd5eb 100644
--- a/soh/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c
+++ b/soh/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c
@@ -430,7 +430,7 @@ void EnOssan_SpawnItemsOnShelves(EnOssan* this, PlayState* play, ShopItem* shopI
this->shelfSlots[i] = NULL;
} else {
itemParams = sShopItemReplaceFunc[shopItems->shopItemIndex](shopItems->shopItemIndex);
- if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHOPSANITY) != RO_SHOPSANITY_OFF) {
+ if (IS_RANDO && Randomizer_GetSettingValue(RSK_SHOPSANITY) != RO_SHOPSANITY_OFF) {
ShopItemIdentity shopItemIdentity = Randomizer_IdentifyShopItem(play->sceneNum, i);
if (shopItemIdentity.randomizerCheck != RC_UNKNOWN_CHECK) {
itemParams = shopItemIdentity.enGirlAShopItem;
@@ -450,7 +450,7 @@ void EnOssan_SpawnItemsOnShelves(EnOssan* this, PlayState* play, ShopItem* shopI
shelves->actor.world.pos.y + shopItems->yOffset, shelves->actor.world.pos.z + shopItems->zOffset,
shelves->actor.shape.rot.x, shelves->actor.shape.rot.y + sItemShelfRot[i],
shelves->actor.shape.rot.z, itemParams, true);
- if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHOPSANITY) != RO_SHOPSANITY_OFF) {
+ if (IS_RANDO && Randomizer_GetSettingValue(RSK_SHOPSANITY) != RO_SHOPSANITY_OFF) {
this->shelfSlots[i]->randoSlotIndex = i;
}
}
@@ -533,8 +533,8 @@ void EnOssan_TalkGoronShopkeeper(PlayState* play) {
} else {
Message_ContinueTextbox(play, 0x300F);
}
- } else if ((!gSaveContext.n64ddFlag && !CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE)) ||
- (gSaveContext.n64ddFlag && !Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_FIRE_TEMPLE))) {
+ } else if ((!IS_RANDO && !CHECK_QUEST_ITEM(QUEST_MEDALLION_FIRE)) ||
+ (IS_RANDO && !Flags_GetRandomizerInf(RAND_INF_DUNGEONS_DONE_FIRE_TEMPLE))) {
Message_ContinueTextbox(play, 0x3057);
} else {
Message_ContinueTextbox(play, 0x305B);
@@ -607,7 +607,7 @@ void EnOssan_Init(Actor* thisx, PlayState* play) {
// If you haven't given Zelda's Letter to the Kakariko Guard
// or are rando'd and haven't gotten gotten the letter from zelda yet
if (this->actor.params == OSSAN_TYPE_MASK && (!Flags_GetInfTable(INFTABLE_SHOWED_ZELDAS_LETTER_TO_GATE_GUARD) ||
- (gSaveContext.n64ddFlag && !Flags_GetEventChkInf(EVENTCHKINF_OBTAINED_ZELDAS_LETTER)))) {
+ (IS_RANDO && !Flags_GetEventChkInf(EVENTCHKINF_OBTAINED_ZELDAS_LETTER)))) {
Actor_Kill(&this->actor);
return;
}
@@ -619,7 +619,7 @@ void EnOssan_Init(Actor* thisx, PlayState* play) {
// Don't kill bombchu shop actor in rando, making it so the shop is immediately open
// Flags_GetEventChkInf(EVENTCHKINF_USED_DODONGOS_CAVERN_BLUE_WARP) - Completed Dodongo's Cavern
- if (this->actor.params == OSSAN_TYPE_BOMBCHUS && !Flags_GetEventChkInf(EVENTCHKINF_USED_DODONGOS_CAVERN_BLUE_WARP) && !gSaveContext.n64ddFlag) {
+ if (this->actor.params == OSSAN_TYPE_BOMBCHUS && !Flags_GetEventChkInf(EVENTCHKINF_USED_DODONGOS_CAVERN_BLUE_WARP) && !IS_RANDO) {
Actor_Kill(&this->actor);
return;
}
@@ -946,7 +946,7 @@ void EnOssan_State_StartConversation(EnOssan* this, PlayState* play, Player* pla
return;
case OSSAN_HAPPY_STATE_ANGRY:
// In ER, handle happy mask throwing link out with not enough rupees
- if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_ENTRANCES)) {
+ if (IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_ENTRANCES)) {
play->nextEntranceIndex = Entrance_OverrideNextIndex(0x1D1);
} else {
play->nextEntranceIndex = 0x1D1;
@@ -1383,7 +1383,7 @@ void EnOssan_GiveItemWithFanfare(PlayState* play, EnOssan* this) {
Player* player = GET_PLAYER(play);
osSyncPrintf("\n" VT_FGCOL(YELLOW) "初めて手にいれた!!" VT_RST "\n\n");
- if (!gSaveContext.n64ddFlag) {
+ if (!IS_RANDO) {
func_8002F434(&this->actor, play, this->shelfSlots[this->cursorIndex]->getItemId, 120.0f, 120.0f);
} else {
ShopItemIdentity shopItemIdentity = Randomizer_IdentifyShopItem(play->sceneNum, this->cursorIndex);
@@ -1538,7 +1538,7 @@ void EnOssan_BuyGoronCityBombs(PlayState* play, EnOssan* this) {
// Let players buy the right side of the goron shop in rando regardless of DC completion
// Players will still need a bomb bag to buy bombs (handled by vanilla behaviour)
// Flags_GetEventChkInf(EVENTCHKINF_USED_DODONGOS_CAVERN_BLUE_WARP) - Completed Dodongo's Cavern
- if (!gSaveContext.n64ddFlag && !Flags_GetEventChkInf(EVENTCHKINF_USED_DODONGOS_CAVERN_BLUE_WARP)) {
+ if (!IS_RANDO && !Flags_GetEventChkInf(EVENTCHKINF_USED_DODONGOS_CAVERN_BLUE_WARP)) {
if (Flags_GetInfTable(INFTABLE_FC)) {
EnOssan_SetStateCantGetItem(play, this, 0x302E);
} else {
@@ -1730,7 +1730,7 @@ void EnOssan_State_GiveItemWithFanfare(EnOssan* this, PlayState* play, Player* p
this->stateFlag = OSSAN_STATE_ITEM_PURCHASED;
return;
}
- if (!gSaveContext.n64ddFlag) {
+ if (!IS_RANDO) {
func_8002F434(&this->actor, play, this->shelfSlots[this->cursorIndex]->getItemId, 120.0f, 120.0f);
} else {
ShopItemIdentity shopItemIdentity = Randomizer_IdentifyShopItem(play->sceneNum, this->cursorIndex);
@@ -2461,8 +2461,7 @@ void EnOssan_DrawBazaarShopkeeper(Actor* thisx, PlayState* play) {
Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sBazaarShopkeeperEyeTextures[this->eyeTextureIdx]));
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
- EnOssan_OverrideLimbDrawDefaultShopkeeper, NULL, this);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnOssan_OverrideLimbDrawDefaultShopkeeper, NULL, this);
EnOssan_DrawCursor(play, this, this->cursorX, this->cursorY, this->cursorZ, this->drawCursor);
EnOssan_DrawStickDirectionPrompts(play, this);
@@ -2520,8 +2519,7 @@ void EnOssan_DrawKokiriShopkeeper(Actor* thisx, PlayState* play) {
gSPSegment(POLY_OPA_DISP++, 0x09, EnOssan_SetEnvColor(play->state.gfxCtx, 110, 170, 20, 255));
gSPSegment(POLY_OPA_DISP++, 0x0C, EnOssan_EndDList(play->state.gfxCtx));
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
- EnOssan_OverrideLimbDrawKokiriShopkeeper, NULL, this);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnOssan_OverrideLimbDrawKokiriShopkeeper, NULL, this);
EnOssan_DrawCursor(play, this, this->cursorX, this->cursorY, this->cursorZ, this->drawCursor);
EnOssan_DrawStickDirectionPrompts(play, this);
@@ -2538,8 +2536,7 @@ void EnOssan_DrawGoronShopkeeper(Actor* thisx, PlayState* play) {
Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sGoronShopkeeperEyeTextures[this->eyeTextureIdx]));
gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(gGoronCsMouthNeutralTex));
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
- NULL, NULL, this);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, NULL, NULL, this);
EnOssan_DrawCursor(play, this, this->cursorX, this->cursorY, this->cursorZ, this->drawCursor);
EnOssan_DrawStickDirectionPrompts(play, this);
@@ -2568,8 +2565,7 @@ void EnOssan_DrawZoraShopkeeper(Actor* thisx, PlayState* play) {
gSPSegment(POLY_OPA_DISP++, 0x0C, EnOssan_EndDList(play->state.gfxCtx));
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sZoraShopkeeperEyeTextures[this->eyeTextureIdx]));
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
- EnOssan_OverrideLimbDrawZoraShopkeeper, NULL, this);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnOssan_OverrideLimbDrawZoraShopkeeper, NULL, this);
EnOssan_DrawCursor(play, this, this->cursorX, this->cursorY, this->cursorZ, this->drawCursor);
EnOssan_DrawStickDirectionPrompts(play, this);
@@ -2586,8 +2582,7 @@ void EnOssan_DrawPotionShopkeeper(Actor* thisx, PlayState* play) {
Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sPotionShopkeeperEyeTextures[this->eyeTextureIdx]));
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
- NULL, NULL, this);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, NULL, NULL, this);
EnOssan_DrawCursor(play, this, this->cursorX, this->cursorY, this->cursorZ, this->drawCursor);
EnOssan_DrawStickDirectionPrompts(play, this);
@@ -2605,8 +2600,7 @@ void EnOssan_DrawHappyMaskShopkeeper(Actor* thisx, PlayState* play) {
gSPSegment(POLY_OPA_DISP++, 0x08,
SEGMENTED_TO_VIRTUAL(sHappyMaskShopkeeperEyeTextures[this->happyMaskShopkeeperEyeIdx]));
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
- NULL, NULL, this);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, NULL, NULL, this);
EnOssan_DrawCursor(play, this, this->cursorX, this->cursorY, this->cursorZ, this->drawCursor);
EnOssan_DrawStickDirectionPrompts(play, this);
@@ -2624,8 +2618,7 @@ void EnOssan_DrawBombchuShopkeeper(Actor* thisx, PlayState* play) {
Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sBombchuShopkeeperEyeTextures[this->eyeTextureIdx]));
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
- NULL, NULL, this);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, NULL, NULL, this);
EnOssan_DrawCursor(play, this, this->cursorX, this->cursorY, this->cursorZ, this->drawCursor);
EnOssan_DrawStickDirectionPrompts(play, this);
diff --git a/soh/src/overlays/actors/ovl_En_Owl/z_en_owl.c b/soh/src/overlays/actors/ovl_En_Owl/z_en_owl.c
index 6d4d153be..b99c15f62 100644
--- a/soh/src/overlays/actors/ovl_En_Owl/z_en_owl.c
+++ b/soh/src/overlays/actors/ovl_En_Owl/z_en_owl.c
@@ -139,7 +139,7 @@ void EnOwl_Init(Actor* thisx, PlayState* play) {
if (((owlType != OWL_DEFAULT) && (switchFlag < 0x20) && Flags_GetSwitch(play, switchFlag)) ||
// Owl shortcuts at SPOT06: Lake Hylia and SPOT16: Death Mountain Trail
- (gSaveContext.n64ddFlag && !(play->sceneNum == SCENE_LAKE_HYLIA || play->sceneNum == SCENE_DEATH_MOUNTAIN_TRAIL))) {
+ (IS_RANDO && !(play->sceneNum == SCENE_LAKE_HYLIA || play->sceneNum == SCENE_DEATH_MOUNTAIN_TRAIL))) {
osSyncPrintf("savebitでフクロウ退避\n"); // "Save owl with savebit"
Actor_Kill(&this->actor);
return;
@@ -634,7 +634,7 @@ void func_80ACB274(EnOwl* this, PlayState* play) {
void EnOwl_WaitDeathMountainShortcut(EnOwl* this, PlayState* play) {
EnOwl_LookAtLink(this, play);
- if (!gSaveContext.isMagicAcquired && !gSaveContext.n64ddFlag) {
+ if (!gSaveContext.isMagicAcquired && !IS_RANDO) {
if (func_80ACA558(this, play, 0x3062)) {
Audio_PlayFanfare(NA_BGM_OWL);
this->actionFunc = func_80ACB274;
@@ -961,7 +961,7 @@ void func_80ACC00C(EnOwl* this, PlayState* play) {
osSyncPrintf(VT_FGCOL(CYAN));
osSyncPrintf("SPOT 06 の デモがはしった\n"); // "Demo of SPOT 06 has been completed"
osSyncPrintf(VT_RST);
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
if (Randomizer_GetSettingValue(RSK_SHUFFLE_OWL_DROPS)) {
play->nextEntranceIndex = Entrance_OverrideNextIndex(0x027E);
} else {
@@ -976,7 +976,7 @@ void func_80ACC00C(EnOwl* this, PlayState* play) {
break;
case 8:
case 9:
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
if (Randomizer_GetSettingValue(RSK_SHUFFLE_OWL_DROPS)) {
play->nextEntranceIndex = Entrance_OverrideNextIndex(0x0554);
} else {
@@ -1363,8 +1363,7 @@ void EnOwl_Draw(Actor* thisx, PlayState* play) {
Gfx_SetupDL_37Opa(play->state.gfxCtx);
gSPSegment(POLY_OPA_DISP++, 8, SEGMENTED_TO_VIRTUAL(eyeTextures[this->eyeTexIndex]));
- SkelAnime_DrawFlexOpa(play, this->curSkelAnime->skeleton, this->curSkelAnime->jointTable,
- this->curSkelAnime->dListCount, EnOwl_OverrideLimbDraw, EnOwl_PostLimbUpdate, this);
+ SkelAnime_DrawSkeletonOpa(play, this->curSkelAnime, EnOwl_OverrideLimbDraw, EnOwl_PostLimbUpdate, this);
CLOSE_DISPS(play->state.gfxCtx);
}
diff --git a/soh/src/overlays/actors/ovl_En_Peehat/z_en_peehat.c b/soh/src/overlays/actors/ovl_En_Peehat/z_en_peehat.c
index 27326234a..7b444f241 100644
--- a/soh/src/overlays/actors/ovl_En_Peehat/z_en_peehat.c
+++ b/soh/src/overlays/actors/ovl_En_Peehat/z_en_peehat.c
@@ -1079,7 +1079,7 @@ void EnPeehat_Draw(Actor* thisx, PlayState* play) {
EnPeehat* this = (EnPeehat*)thisx;
Gfx_SetupDL_25Opa(play->state.gfxCtx);
- SkelAnime_DrawOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, EnPeehat_OverrideLimbDraw,
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnPeehat_OverrideLimbDraw,
EnPeehat_PostLimbDraw, this);
if (this->actor.speedXZ != 0.0f || this->actor.velocity.y != 0.0f) {
Matrix_MultVec3f(&D_80AD285C[0], &this->colQuad.dim.quad[1]);
diff --git a/soh/src/overlays/actors/ovl_En_Po_Relay/z_en_po_relay.c b/soh/src/overlays/actors/ovl_En_Po_Relay/z_en_po_relay.c
index df1b79652..8489b1032 100644
--- a/soh/src/overlays/actors/ovl_En_Po_Relay/z_en_po_relay.c
+++ b/soh/src/overlays/actors/ovl_En_Po_Relay/z_en_po_relay.c
@@ -143,8 +143,8 @@ void EnPoRelay_SetupRace(EnPoRelay* this) {
EnPoRelay_Vec3sToVec3f(&vec, &D_80AD8C30[this->pathIndex]);
this->actionTimer = ((s16)(this->actor.shape.rot.y - this->actor.world.rot.y - 0x8000) >> 0xB) % 32U;
func_80088B34(0);
- this->hookshotSlotFull = (INV_CONTENT(ITEM_HOOKSHOT) != ITEM_NONE && !gSaveContext.n64ddFlag) ||
- (gSaveContext.n64ddFlag && Flags_GetTreasure(gPlayState, 0x1E));
+ this->hookshotSlotFull = (INV_CONTENT(ITEM_HOOKSHOT) != ITEM_NONE && !IS_RANDO) ||
+ (IS_RANDO && Flags_GetTreasure(gPlayState, 0x1E));
this->unk_19A = Actor_WorldYawTowardPoint(&this->actor, &vec);
this->actor.flags |= ACTOR_FLAG_NO_LOCKON;
Audio_PlayActorSound2(&this->actor, NA_SE_EN_PO_LAUGH);
@@ -331,7 +331,7 @@ void EnPoRelay_DisappearAndReward(EnPoRelay* this, PlayState* play) {
}
}
if (Math_StepToF(&this->actor.scale.x, 0.0f, 0.001f) != 0) {
- if(!gSaveContext.n64ddFlag) {
+ if(!IS_RANDO) {
if (this->hookshotSlotFull != 0) {
sp60.x = this->actor.world.pos.x;
sp60.y = this->actor.floorHeight;
@@ -433,7 +433,6 @@ void EnPoRelay_Draw(Actor* thisx, PlayState* play) {
OPEN_DISPS(play->state.gfxCtx);
Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sEyesTextures[this->eyeTextureIdx]));
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
- NULL, EnPoRelay_PostLimbDraw, &this->actor);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, NULL, EnPoRelay_PostLimbDraw, &this->actor);
CLOSE_DISPS(play->state.gfxCtx);
}
diff --git a/soh/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c b/soh/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c
index ecfdac68d..ea324c5a5 100644
--- a/soh/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c
+++ b/soh/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c
@@ -184,7 +184,7 @@ void EnPoSisters_Init(Actor* thisx, PlayState* play) {
this->epoch++;
// Skip Poe Intro Cutscene
- if (gSaveContext.n64ddFlag && thisx->params == 4124 && !Randomizer_GetSettingValue(RSK_ENABLE_GLITCH_CUTSCENES)) {
+ if (IS_RANDO && thisx->params == 4124 && !Randomizer_GetSettingValue(RSK_ENABLE_GLITCH_CUTSCENES)) {
Flags_SetSwitch(play, 0x1B);
Actor_Kill(thisx);
}
@@ -864,7 +864,7 @@ void func_80ADB338(EnPoSisters* this, PlayState* play) {
this->unk_19C--;
// Force Meg to respawn instantly after getting hit
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
this->unk_19C = 0;
}
}
diff --git a/soh/src/overlays/actors/ovl_En_Reeba/z_en_reeba.c b/soh/src/overlays/actors/ovl_En_Reeba/z_en_reeba.c
index 0d2a6ecca..76e5ae871 100644
--- a/soh/src/overlays/actors/ovl_En_Reeba/z_en_reeba.c
+++ b/soh/src/overlays/actors/ovl_En_Reeba/z_en_reeba.c
@@ -667,7 +667,7 @@ void EnReeba_Draw(Actor* thisx, PlayState* play) {
gDPSetPrimColor(POLY_OPA_DISP++, 0x0, 0x01, 255, 255, 255, 255);
}
- SkelAnime_DrawOpa(play, this->skelanime.skeleton, this->skelanime.jointTable, NULL, NULL, this);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelanime, NULL, NULL, this);
CLOSE_DISPS(play->state.gfxCtx);
diff --git a/soh/src/overlays/actors/ovl_En_River_Sound/z_en_river_sound.c b/soh/src/overlays/actors/ovl_En_River_Sound/z_en_river_sound.c
index 60c0c627c..9c9816365 100644
--- a/soh/src/overlays/actors/ovl_En_River_Sound/z_en_river_sound.c
+++ b/soh/src/overlays/actors/ovl_En_River_Sound/z_en_river_sound.c
@@ -41,7 +41,7 @@ void EnRiverSound_Init(Actor* thisx, PlayState* play) {
Actor_Kill(&this->actor);
} else if (this->actor.params == RS_SARIAS_SONG) {
// Always have leading music in rando
- if ((!CHECK_QUEST_ITEM(QUEST_SONG_LULLABY) || CHECK_QUEST_ITEM(QUEST_SONG_SARIA)) && !gSaveContext.n64ddFlag) {
+ if ((!CHECK_QUEST_ITEM(QUEST_SONG_LULLABY) || CHECK_QUEST_ITEM(QUEST_SONG_SARIA)) && !IS_RANDO) {
Actor_Kill(&this->actor);
}
}
diff --git a/soh/src/overlays/actors/ovl_En_Rl/z_en_rl.c b/soh/src/overlays/actors/ovl_En_Rl/z_en_rl.c
index 0cf1e87e2..73996d58f 100644
--- a/soh/src/overlays/actors/ovl_En_Rl/z_en_rl.c
+++ b/soh/src/overlays/actors/ovl_En_Rl/z_en_rl.c
@@ -359,8 +359,7 @@ void func_80AE7FDC(EnRl* this, PlayState* play) {
gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, 255);
gSPSegment(POLY_OPA_DISP++, 0x0C, &D_80116280[2]);
- SkelAnime_DrawFlexOpa(play, skelAnime->skeleton, skelAnime->jointTable, skelAnime->dListCount, NULL, NULL,
- &this->actor);
+ SkelAnime_DrawSkeletonOpa(play, skelAnime, NULL, NULL, &this->actor);
CLOSE_DISPS(play->state.gfxCtx);
}
diff --git a/soh/src/overlays/actors/ovl_En_Rr/z_en_rr.c b/soh/src/overlays/actors/ovl_En_Rr/z_en_rr.c
index 24577211d..49207d643 100644
--- a/soh/src/overlays/actors/ovl_En_Rr/z_en_rr.c
+++ b/soh/src/overlays/actors/ovl_En_Rr/z_en_rr.c
@@ -305,7 +305,7 @@ void EnRr_SetupReleasePlayer(EnRr* this, PlayState* play) {
this->retreat = true;
}
}
- if (CUR_EQUIP_VALUE(EQUIP_TUNIC) != 1 /* Kokiri tunic */ && !gSaveContext.n64ddFlag /* Randomizer Save File */) {
+ if (CUR_EQUIP_VALUE(EQUIP_TUNIC) != 1 /* Kokiri tunic */ && !IS_RANDO /* Randomizer Save File */) {
tunic = Inventory_DeleteEquipment(play, EQUIP_TUNIC);
if (tunic != 0) {
this->eatenTunic = tunic;
diff --git a/soh/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c b/soh/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c
index 5ee3f325a..97a3c0091 100644
--- a/soh/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c
+++ b/soh/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c
@@ -767,7 +767,7 @@ void func_80AEC2C0(EnRu1* this, PlayState* play) {
bool shouldSpawnRuto() {
// Flags_GetInfTable(INFTABLE_146) check is to prevent Ruto from spawning during the short period of time when
// she's on the Zora's Sapphire pedestal but hasn't been kidnapped yet (would result in multiple Rutos otherwise)
- return !Flags_GetInfTable(INFTABLE_145) || (gSaveContext.n64ddFlag && (Flags_GetInfTable(INFTABLE_146)));
+ return !Flags_GetInfTable(INFTABLE_145) || (IS_RANDO && (Flags_GetInfTable(INFTABLE_146)));
}
void func_80AEC320(EnRu1* this, PlayState* play) {
diff --git a/soh/src/overlays/actors/ovl_En_Ru2/z_en_ru2.c b/soh/src/overlays/actors/ovl_En_Ru2/z_en_ru2.c
index 4e5630dd8..6be42b42d 100644
--- a/soh/src/overlays/actors/ovl_En_Ru2/z_en_ru2.c
+++ b/soh/src/overlays/actors/ovl_En_Ru2/z_en_ru2.c
@@ -813,8 +813,7 @@ void func_80AF3F20(EnRu2* this, PlayState* play) {
gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, 255);
gSPSegment(POLY_OPA_DISP++, 0x0C, &D_80116280[2]);
- SkelAnime_DrawFlexOpa(play, skelAnime->skeleton, skelAnime->jointTable, skelAnime->dListCount, NULL, NULL,
- this);
+ SkelAnime_DrawSkeletonOpa(play, skelAnime, NULL, NULL, this);
CLOSE_DISPS(play->state.gfxCtx);
}
diff --git a/soh/src/overlays/actors/ovl_En_Sa/z_en_sa.c b/soh/src/overlays/actors/ovl_En_Sa/z_en_sa.c
index 8714457c7..825dc8ef8 100644
--- a/soh/src/overlays/actors/ovl_En_Sa/z_en_sa.c
+++ b/soh/src/overlays/actors/ovl_En_Sa/z_en_sa.c
@@ -390,7 +390,7 @@ s32 func_80AF5DFC(EnSa* this, PlayState* play) {
return 1;
}
if (play->sceneNum == SCENE_SACRED_FOREST_MEADOW && (Flags_GetEventChkInf(EVENTCHKINF_OBTAINED_ZELDAS_LETTER))) {
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
return 5;
}
return CHECK_QUEST_ITEM(QUEST_SONG_SARIA) ? 2 : 5;
@@ -636,7 +636,7 @@ void func_80AF683C(EnSa* this, PlayState* play) {
Player* player = GET_PLAYER(play);
if (!(player->actor.world.pos.z >= -2220.0f) && !Play_InCsMode(play)) {
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
GivePlayerRandoRewardSaria(this, play, RC_SONG_FROM_SARIA);
return;
}
diff --git a/soh/src/overlays/actors/ovl_En_Sb/z_en_sb.c b/soh/src/overlays/actors/ovl_En_Sb/z_en_sb.c
index 0c40a02cb..ad279d22c 100644
--- a/soh/src/overlays/actors/ovl_En_Sb/z_en_sb.c
+++ b/soh/src/overlays/actors/ovl_En_Sb/z_en_sb.c
@@ -488,8 +488,7 @@ void EnSb_Draw(Actor* thisx, PlayState* play) {
s16 fireDecr;
func_8002EBCC(&this->actor, play, 1);
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
- NULL, EnSb_PostLimbDraw, this);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, NULL, EnSb_PostLimbDraw, this);
if (this->fire != 0) {
this->actor.colorFilterTimer++;
fireDecr = this->fire - 1;
diff --git a/soh/src/overlays/actors/ovl_En_Shopnuts/z_en_shopnuts.c b/soh/src/overlays/actors/ovl_En_Shopnuts/z_en_shopnuts.c
index 45e3b4e91..6f48314ff 100644
--- a/soh/src/overlays/actors/ovl_En_Shopnuts/z_en_shopnuts.c
+++ b/soh/src/overlays/actors/ovl_En_Shopnuts/z_en_shopnuts.c
@@ -69,7 +69,7 @@ void EnShopnuts_Init(Actor* thisx, PlayState* play) {
CollisionCheck_SetInfo(&this->actor.colChkInfo, NULL, &sColChkInfoInit);
Collider_UpdateCylinder(&this->actor, &this->collider);
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
s16 respawnData = gSaveContext.respawn[RESPAWN_MODE_RETURN].data & ((1 << 8) - 1);
ScrubIdentity scrubIdentity = Randomizer_IdentifyScrub(play->sceneNum, this->actor.params, respawnData);
@@ -313,6 +313,5 @@ void EnShopnuts_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s*
void EnShopnuts_Draw(Actor* thisx, PlayState* play) {
EnShopnuts* this = (EnShopnuts*)thisx;
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
- EnShopnuts_OverrideLimbDraw, EnShopnuts_PostLimbDraw, this);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnShopnuts_OverrideLimbDraw, EnShopnuts_PostLimbDraw, this);
}
diff --git a/soh/src/overlays/actors/ovl_En_Si/z_en_si.c b/soh/src/overlays/actors/ovl_En_Si/z_en_si.c
index ba9f3ccd2..49e88f903 100644
--- a/soh/src/overlays/actors/ovl_En_Si/z_en_si.c
+++ b/soh/src/overlays/actors/ovl_En_Si/z_en_si.c
@@ -5,6 +5,7 @@
*/
#include "z_en_si.h"
+#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
extern void func_8083C148(Player*, PlayState*);
extern void func_80078884(uint16_t);
@@ -104,7 +105,7 @@ void func_80AFB768(EnSi* this, PlayState* play) {
if (this->collider.base.ocFlags2 & OC2_HIT_PLAYER) {
this->collider.base.ocFlags2 &= ~OC2_HIT_PLAYER;
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
Randomizer_UpdateSkullReward(this, play);
} else {
Item_Give(play, giveItemId);
@@ -120,7 +121,7 @@ void func_80AFB768(EnSi* this, PlayState* play) {
Message_StartTextbox(play, textId, NULL);
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
if (getItemId != RG_ICE_TRAP) {
Randomizer_GiveSkullReward(this, play);
Audio_PlayFanfare_Rando(getItem);
@@ -150,7 +151,7 @@ void func_80AFB89C(EnSi* this, PlayState* play) {
this->actor.shape.rot.y += 0x400;
if (!CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_HOOKSHOT_ATTACHED)) {
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
Randomizer_UpdateSkullReward(this, play);
} else {
Item_Give(play, giveItemId);
@@ -158,7 +159,7 @@ void func_80AFB89C(EnSi* this, PlayState* play) {
Message_StartTextbox(play, textId, NULL);
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
if (getItemId != RG_ICE_TRAP) {
Randomizer_GiveSkullReward(this, play);
Audio_PlayFanfare_Rando(getItem);
@@ -183,6 +184,7 @@ void func_80AFB950(EnSi* this, PlayState* play) {
player->actor.freezeTimer = 10;
} else {
SET_GS_FLAGS((this->actor.params & 0x1F00) >> 8, this->actor.params & 0xFF);
+ GameInteractor_ExecuteOnFlagSet(FLAG_GS_TOKEN, this->actor.params);
Actor_Kill(&this->actor);
if (gSaveContext.pendingIceTrapCount > 0 && player->heldItemId == 11) {
player->actor.freezeTimer = 0;
@@ -208,7 +210,7 @@ void EnSi_Draw(Actor* thisx, PlayState* play) {
if (this->actionFunc != func_80AFB950) {
func_8002ED80(&this->actor, play, 0);
func_8002EBCC(&this->actor, play, 0);
- if (!gSaveContext.n64ddFlag) {
+ if (!IS_RANDO) {
GetItem_Draw(play, GID_SKULL_TOKEN_2);
} else {
getItem = Randomizer_GetItemFromActor(this->actor.id, play->sceneNum, this->actor.params, GI_SKULL_TOKEN);
diff --git a/soh/src/overlays/actors/ovl_En_Skb/z_en_skb.c b/soh/src/overlays/actors/ovl_En_Skb/z_en_skb.c
index 956256ec4..6a5862747 100644
--- a/soh/src/overlays/actors/ovl_En_Skb/z_en_skb.c
+++ b/soh/src/overlays/actors/ovl_En_Skb/z_en_skb.c
@@ -556,6 +556,6 @@ void EnSkb_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot,
void EnSkb_Draw(Actor* thisx, PlayState* play) {
EnSkb* this = (EnSkb*)thisx;
Gfx_SetupDL_25Opa(play->state.gfxCtx);
- SkelAnime_DrawOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, EnSkb_OverrideLimbDraw,
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnSkb_OverrideLimbDraw,
EnSkb_PostLimbDraw, &this->actor);
}
diff --git a/soh/src/overlays/actors/ovl_En_Skj/z_en_skj.c b/soh/src/overlays/actors/ovl_En_Skj/z_en_skj.c
index aecef5036..3492d6de9 100644
--- a/soh/src/overlays/actors/ovl_En_Skj/z_en_skj.c
+++ b/soh/src/overlays/actors/ovl_En_Skj/z_en_skj.c
@@ -1039,7 +1039,7 @@ void EnSkj_SariaSongTalk(EnSkj* this, PlayState* play) {
EnSkj_SetupWaitInRange(this);
} else {
func_80AFFE24(this);
- if (!gSaveContext.n64ddFlag) {
+ if (!IS_RANDO) {
func_8002F434(&this->actor, play, GI_HEART_PIECE, EnSkj_GetItemXzRange(this), EnSkj_GetItemYRange(this));
} else {
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_LW_SKULL_KID, GI_HEART_PIECE);
@@ -1058,7 +1058,7 @@ void func_80AFFE44(EnSkj* this, PlayState* play) {
this->actor.parent = NULL;
EnSkj_SetupPostSariasSong(this);
} else {
- if (!gSaveContext.n64ddFlag) {
+ if (!IS_RANDO) {
func_8002F434(&this->actor, play, GI_HEART_PIECE, EnSkj_GetItemXzRange(this), EnSkj_GetItemYRange(this));
} else {
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_LW_SKULL_KID, GI_HEART_PIECE);
@@ -1540,7 +1540,7 @@ void EnSkj_WonOcarinaMiniGame(EnSkj* this, PlayState* play) {
void EnSkj_WaitToGiveReward(EnSkj* this, PlayState* play) {
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(play)) {
- if (gSaveContext.n64ddFlag && gSaveContext.ocarinaGameRoundNum != 3) {
+ if (IS_RANDO && gSaveContext.ocarinaGameRoundNum != 3) {
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_LW_OCARINA_MEMORY_GAME, GI_HEART_PIECE);
GiveItemEntryFromActor(&this->actor, play, getItemEntry, 26.0f, 26.0f);
} else {
@@ -1556,7 +1556,7 @@ void EnSkj_GiveOcarinaGameReward(EnSkj* this, PlayState* play) {
this->actor.parent = NULL;
this->actionFunc = EnSkj_FinishOcarinaGameRound;
} else {
- if (gSaveContext.n64ddFlag && gSaveContext.ocarinaGameRoundNum != 3) {
+ if (IS_RANDO && gSaveContext.ocarinaGameRoundNum != 3) {
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_LW_OCARINA_MEMORY_GAME, GI_HEART_PIECE);
GiveItemEntryFromActor(&this->actor, play, getItemEntry, 26.0f, 26.0f);
} else {
@@ -1573,11 +1573,11 @@ void EnSkj_FinishOcarinaGameRound(EnSkj* this, PlayState* play) {
gSaveContext.ocarinaGameRoundNum++;
}
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
gSaveContext.ocarinaGameRoundNum = 3;
}
- if (ocarinaGameRoundNum == 2 || gSaveContext.n64ddFlag) {
+ if (ocarinaGameRoundNum == 2 || IS_RANDO) {
Flags_SetItemGetInf(ITEMGETINF_17);
this->actionFunc = EnSkj_CleanupOcarinaGame;
} else {
@@ -1683,8 +1683,7 @@ void EnSkj_Draw(Actor* thisx, PlayState* play) {
gSPSegment(POLY_OPA_DISP++, 0x0C, EnSkj_OpaqueDL(play->state.gfxCtx, this->alpha));
}
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
- EnSkj_OverrideLimbDraw, EnSkj_PostLimbDraw, this);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnSkj_OverrideLimbDraw, EnSkj_PostLimbDraw, this);
CLOSE_DISPS(play->state.gfxCtx);
}
diff --git a/soh/src/overlays/actors/ovl_En_Ssh/z_en_ssh.c b/soh/src/overlays/actors/ovl_En_Ssh/z_en_ssh.c
index 98910ffef..4751d049d 100644
--- a/soh/src/overlays/actors/ovl_En_Ssh/z_en_ssh.c
+++ b/soh/src/overlays/actors/ovl_En_Ssh/z_en_ssh.c
@@ -882,6 +882,6 @@ void EnSsh_Draw(Actor* thisx, PlayState* play) {
OPEN_DISPS(play->state.gfxCtx);
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(blinkTex[this->blinkState]));
CLOSE_DISPS(play->state.gfxCtx);
- SkelAnime_DrawOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, EnSsh_OverrideLimbDraw,
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnSsh_OverrideLimbDraw,
EnSsh_PostLimbDraw, &this->actor);
}
diff --git a/soh/src/overlays/actors/ovl_En_St/z_en_st.c b/soh/src/overlays/actors/ovl_En_St/z_en_st.c
index 9bb4a5720..59d4be6f3 100644
--- a/soh/src/overlays/actors/ovl_En_St/z_en_st.c
+++ b/soh/src/overlays/actors/ovl_En_St/z_en_st.c
@@ -1088,6 +1088,6 @@ void EnSt_Draw(Actor* thisx, PlayState* play) {
EnSt_CheckBodyStickHit(this, play);
Gfx_SetupDL_25Opa(play->state.gfxCtx);
- SkelAnime_DrawOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, EnSt_OverrideLimbDraw,
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnSt_OverrideLimbDraw,
EnSt_PostLimbDraw, this);
}
diff --git a/soh/src/overlays/actors/ovl_En_Sth/z_en_sth.c b/soh/src/overlays/actors/ovl_En_Sth/z_en_sth.c
index 59204c6ca..81242aa77 100644
--- a/soh/src/overlays/actors/ovl_En_Sth/z_en_sth.c
+++ b/soh/src/overlays/actors/ovl_En_Sth/z_en_sth.c
@@ -9,6 +9,7 @@
#include "objects/object_ahg/object_ahg.h"
#include "objects/object_boj/object_boj.h"
#include
+#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY | ACTOR_FLAG_UPDATE_WHILE_CULLED)
@@ -81,7 +82,21 @@ static EnSthActionFunc sRewardObtainedWaitActions[6] = {
};
static u16 sEventFlags[6] = {
- 0, EVENTCHKINF_SKULLTULA_REWARD_10_MASK, EVENTCHKINF_SKULLTULA_REWARD_20_MASK, EVENTCHKINF_SKULLTULA_REWARD_30_MASK, EVENTCHKINF_SKULLTULA_REWARD_40_MASK, EVENTCHKINF_SKULLTULA_REWARD_50_MASK,
+ 0,
+ EVENTCHKINF_SKULLTULA_REWARD_10_MASK,
+ EVENTCHKINF_SKULLTULA_REWARD_20_MASK,
+ EVENTCHKINF_SKULLTULA_REWARD_30_MASK,
+ EVENTCHKINF_SKULLTULA_REWARD_40_MASK,
+ EVENTCHKINF_SKULLTULA_REWARD_50_MASK,
+};
+
+static u16 sEventFlagsShift[6] = {
+ 0,
+ EVENTCHKINF_SKULLTULA_REWARD_10_SHIFT,
+ EVENTCHKINF_SKULLTULA_REWARD_20_SHIFT,
+ EVENTCHKINF_SKULLTULA_REWARD_30_SHIFT,
+ EVENTCHKINF_SKULLTULA_REWARD_40_SHIFT,
+ EVENTCHKINF_SKULLTULA_REWARD_50_SHIFT,
};
static s16 sGetItemIds[6] = {
@@ -244,7 +259,7 @@ void EnSth_GivePlayerItem(EnSth* this, PlayState* play) {
u16 getItemId = sGetItemIds[this->actor.params];
GetItemEntry getItemEntry = (GetItemEntry)GET_ITEM_NONE;
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
switch (getItemId) {
case GI_RUPEE_GOLD:
if (!Flags_GetRandomizerInf(RAND_INF_KAK_100_GOLD_SKULLTULA_REWARD)) {
@@ -286,7 +301,7 @@ void EnSth_GivePlayerItem(EnSth* this, PlayState* play) {
}
}
- if (!gSaveContext.n64ddFlag || getItemEntry.getItemId == GI_NONE) {
+ if (!IS_RANDO || getItemEntry.getItemId == GI_NONE) {
func_8002F434(&this->actor, play, getItemId, 10000.0f, 50.0f);
} else {
GiveItemEntryFromActor(&this->actor, play, getItemEntry, 10000.0f, 50.0f);
@@ -298,6 +313,7 @@ void EnSth_GiveReward(EnSth* this, PlayState* play) {
this->actor.parent = NULL;
EnSth_SetupAction(this, EnSth_RewardObtainedTalk);
gSaveContext.eventChkInf[EVENTCHKINF_SKULLTULA_REWARD_INDEX] |= this->eventFlag;
+ GameInteractor_ExecuteOnFlagSet(FLAG_EVENT_CHECK_INF, (EVENTCHKINF_SKULLTULA_REWARD_INDEX << 4) + sEventFlagsShift[this->actor.params]);
} else {
EnSth_GivePlayerItem(this, play);
}
@@ -441,8 +457,7 @@ void EnSth_Draw(Actor* thisx, PlayState* play) {
} else {
gSPSegment(POLY_OPA_DISP++, 0x09, EnSth_AllocColorDList(play->state.gfxCtx, 90, 110, 130, 255));
}
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
- EnSth_OverrideLimbDraw, EnSth_PostLimbDraw, &this->actor);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnSth_OverrideLimbDraw, EnSth_PostLimbDraw, &this->actor);
CLOSE_DISPS(play->state.gfxCtx);
}
diff --git a/soh/src/overlays/actors/ovl_En_Sw/z_en_sw.c b/soh/src/overlays/actors/ovl_En_Sw/z_en_sw.c
index 8152e2e84..0a6825c0e 100644
--- a/soh/src/overlays/actors/ovl_En_Sw/z_en_sw.c
+++ b/soh/src/overlays/actors/ovl_En_Sw/z_en_sw.c
@@ -1034,7 +1034,7 @@ void EnSw_Draw(Actor* thisx, PlayState* play) {
}
Gfx_SetupDL_25Opa(play->state.gfxCtx);
- SkelAnime_DrawOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, EnSw_OverrideLimbDraw,
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnSw_OverrideLimbDraw,
EnSw_PostLimbDraw, this);
if (this->actionFunc == func_80B0E728) {
func_80B0EEA4(play);
diff --git a/soh/src/overlays/actors/ovl_En_Syateki_Man/z_en_syateki_man.c b/soh/src/overlays/actors/ovl_En_Syateki_Man/z_en_syateki_man.c
index e74ef9732..888b0ef34 100644
--- a/soh/src/overlays/actors/ovl_En_Syateki_Man/z_en_syateki_man.c
+++ b/soh/src/overlays/actors/ovl_En_Syateki_Man/z_en_syateki_man.c
@@ -155,7 +155,7 @@ void EnSyatekiMan_Init(Actor* thisx, PlayState* play) {
s32 pad;
EnSyatekiMan* this = (EnSyatekiMan*)thisx;
- if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_INTERIOR_ENTRANCES)) {
+ if (IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_INTERIOR_ENTRANCES)) {
// If child is in the adult shooting gallery or adult in the child shooting gallery, then despawn the shooting gallery man
if ((LINK_IS_CHILD && Entrance_SceneAndSpawnAre(SCENE_SHOOTING_GALLERY, 0x00)) || //Kakariko Village -> Adult Shooting Gallery, index 003B in the entrance table
(LINK_IS_ADULT && Entrance_SceneAndSpawnAre(SCENE_SHOOTING_GALLERY, 0x01))) { //Market -> Child Shooting Gallery, index 016D in the entrance table
@@ -354,11 +354,11 @@ void EnSyatekiMan_EndGame(EnSyatekiMan* this, PlayState* play) {
this->tempGallery = this->actor.parent;
this->actor.parent = NULL;
if (!LINK_IS_ADULT) {
- if(gSaveContext.n64ddFlag && !Flags_GetTreasure(play, 0x1E)) {
+ if(IS_RANDO && !Flags_GetTreasure(play, 0x1E)) {
this->getItemEntry = Randomizer_GetItemFromKnownCheck(RC_MARKET_SHOOTING_GALLERY_REWARD, GI_BULLET_BAG_50);
this->getItemId = this->getItemEntry.getItemId;
Flags_SetTreasure(play, 0x1E);
- } else if (!gSaveContext.n64ddFlag && !Flags_GetItemGetInf(ITEMGETINF_0D)) {
+ } else if (!IS_RANDO && !Flags_GetItemGetInf(ITEMGETINF_0D)) {
osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ Equip_Pachinko ☆☆☆☆☆ %d\n" VT_RST,
CUR_UPG_VALUE(UPG_BULLET_BAG));
if (CUR_UPG_VALUE(UPG_BULLET_BAG) == 1) {
@@ -371,11 +371,11 @@ void EnSyatekiMan_EndGame(EnSyatekiMan* this, PlayState* play) {
this->getItemId = GI_RUPEE_PURPLE;
}
} else {
- if(gSaveContext.n64ddFlag && !Flags_GetTreasure(play, 0x1F)) {
+ if(IS_RANDO && !Flags_GetTreasure(play, 0x1F)) {
this->getItemEntry = Randomizer_GetItemFromKnownCheck(RC_KAK_SHOOTING_GALLERY_REWARD, GI_QUIVER_50);
this->getItemId = this->getItemEntry.getItemId;
Flags_SetTreasure(play, 0x1F);
- } else if (!gSaveContext.n64ddFlag && !Flags_GetItemGetInf(ITEMGETINF_0E)) {
+ } else if (!IS_RANDO && !Flags_GetItemGetInf(ITEMGETINF_0E)) {
osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ Equip_Bow ☆☆☆☆☆ %d\n" VT_RST,
CUR_UPG_VALUE(UPG_QUIVER));
switch (CUR_UPG_VALUE(UPG_QUIVER)) {
@@ -394,7 +394,7 @@ void EnSyatekiMan_EndGame(EnSyatekiMan* this, PlayState* play) {
this->getItemId = GI_RUPEE_PURPLE;
}
}
- if (!gSaveContext.n64ddFlag || this->getItemEntry.getItemId == GI_NONE) {
+ if (!IS_RANDO || this->getItemEntry.getItemId == GI_NONE) {
func_8002F434(&this->actor, play, this->getItemId, 2000.0f, 1000.0f);
} else {
GiveItemEntryFromActor(&this->actor, play, this->getItemEntry, 2000.0f, 1000.0f);
@@ -431,7 +431,7 @@ void EnSyatekiMan_GivePrize(EnSyatekiMan* this, PlayState* play) {
if (Actor_HasParent(&this->actor, play)) {
this->actionFunc = EnSyatekiMan_FinishPrize;
} else {
- if (!gSaveContext.n64ddFlag || this->getItemEntry.getItemId == GI_NONE) {
+ if (!IS_RANDO || this->getItemEntry.getItemId == GI_NONE) {
func_8002F434(&this->actor, play, this->getItemId, 2000.0f, 1000.0f);
} else {
GiveItemEntryFromActor(&this->actor, play, this->getItemEntry, 2000.0f, 1000.0f);
@@ -540,8 +540,7 @@ void EnSyatekiMan_Draw(Actor* thisx, PlayState* play) {
EnSyatekiMan* this = (EnSyatekiMan*)thisx;
Gfx_SetupDL_25Opa(play->state.gfxCtx);
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
- EnSyatekiMan_OverrideLimbDraw, NULL, this);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnSyatekiMan_OverrideLimbDraw, NULL, this);
}
void EnSyatekiMan_SetBgm(void) {
diff --git a/soh/src/overlays/actors/ovl_En_Syateki_Niw/z_en_syateki_niw.c b/soh/src/overlays/actors/ovl_En_Syateki_Niw/z_en_syateki_niw.c
index c9831115b..367831fca 100644
--- a/soh/src/overlays/actors/ovl_En_Syateki_Niw/z_en_syateki_niw.c
+++ b/soh/src/overlays/actors/ovl_En_Syateki_Niw/z_en_syateki_niw.c
@@ -703,8 +703,7 @@ void EnSyatekiNiw_Draw(Actor* thisx, PlayState* play) {
func_80026230(play, &sp30, 0, 0x14);
}
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable,
- this->skelAnime.dListCount, SyatekiNiw_OverrideLimbDraw, NULL, this);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, SyatekiNiw_OverrideLimbDraw, NULL, this);
func_80026608(play);
func_80B13464(this, play);
}
diff --git a/soh/src/overlays/actors/ovl_En_Ta/z_en_ta.c b/soh/src/overlays/actors/ovl_En_Ta/z_en_ta.c
index b0fcc2ac6..9b0dc07e2 100644
--- a/soh/src/overlays/actors/ovl_En_Ta/z_en_ta.c
+++ b/soh/src/overlays/actors/ovl_En_Ta/z_en_ta.c
@@ -466,7 +466,7 @@ void func_80B14B6C(EnTa* this, PlayState* play) {
func_80B13AA0(this, func_80B14AF4, func_80B167C0);
this->unk_2CC = 5;
Flags_SetEventChkInf(EVENTCHKINF_TALON_RETURNED_FROM_CASTLE);
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
OnePointCutscene_EndCutscene(play, csCamIdx);
}
Animation_PlayOnce(&this->skelAnime, &gTalonRunTransitionAnim);
@@ -878,7 +878,7 @@ void func_80B15E80(EnTa* this, PlayState* play) {
} else if (this->unk_2E0 & 2) {
func_8002F434(&this->actor, play, GI_MILK, 10000.0f, 50.0f);
} else {
- if (!gSaveContext.n64ddFlag) {
+ if (!IS_RANDO) {
func_8002F434(&this->actor, play, GI_MILK_BOTTLE, 10000.0f, 50.0f);
} else {
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_LLR_TALONS_CHICKENS, GI_MILK_BOTTLE);
@@ -893,7 +893,7 @@ void func_80B15F54(EnTa* this, PlayState* play) {
Message_CloseTextbox(play);
this->unk_2E0 &= ~0x2;
func_80B13AA0(this, func_80B15E80, func_80B16938);
- if (!gSaveContext.n64ddFlag) {
+ if (!IS_RANDO) {
func_8002F434(&this->actor, play, GI_MILK_BOTTLE, 10000.0f, 50.0f);
} else {
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_LLR_TALONS_CHICKENS, GI_MILK_BOTTLE);
@@ -1236,8 +1236,7 @@ void EnTa_Draw(Actor* thisx, PlayState* play) {
gSPSegment(POLY_OPA_DISP++, 0x8, SEGMENTED_TO_VIRTUAL(eyeTextures[this->eyeIndex]));
gSPSegment(POLY_OPA_DISP++, 0x9, SEGMENTED_TO_VIRTUAL(gTalonHeadSkinTex));
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
- EnTa_OverrideLimbDraw, EnTa_PostLimbDraw, this);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnTa_OverrideLimbDraw, EnTa_PostLimbDraw, this);
CLOSE_DISPS(play->state.gfxCtx);
}
diff --git a/soh/src/overlays/actors/ovl_En_Takara_Man/z_en_takara_man.c b/soh/src/overlays/actors/ovl_En_Takara_Man/z_en_takara_man.c
index dd157185a..f614e0f4c 100644
--- a/soh/src/overlays/actors/ovl_En_Takara_Man/z_en_takara_man.c
+++ b/soh/src/overlays/actors/ovl_En_Takara_Man/z_en_takara_man.c
@@ -234,8 +234,7 @@ void EnTakaraMan_Draw(Actor* thisx, PlayState* play) {
Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(eyeTextures[this->eyeTextureIdx]));
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
- EnTakaraMan_OverrideLimbDraw, NULL, this);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnTakaraMan_OverrideLimbDraw, NULL, this);
CLOSE_DISPS(play->state.gfxCtx);
}
diff --git a/soh/src/overlays/actors/ovl_En_Test/z_en_test.c b/soh/src/overlays/actors/ovl_En_Test/z_en_test.c
index f3a2c89f4..46e9edc9e 100644
--- a/soh/src/overlays/actors/ovl_En_Test/z_en_test.c
+++ b/soh/src/overlays/actors/ovl_En_Test/z_en_test.c
@@ -1958,7 +1958,7 @@ void EnTest_Draw(Actor* thisx, PlayState* play) {
func_8002EBCC(&this->actor, play, 1);
if ((thisx->params <= STALFOS_TYPE_CEILING) || (thisx->child == NULL)) {
- SkelAnime_DrawOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, EnTest_OverrideLimbDraw,
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnTest_OverrideLimbDraw,
EnTest_PostLimbDraw, this);
}
diff --git a/soh/src/overlays/actors/ovl_En_Tg/z_en_tg.c b/soh/src/overlays/actors/ovl_En_Tg/z_en_tg.c
index a378c7edd..247db92f3 100644
--- a/soh/src/overlays/actors/ovl_En_Tg/z_en_tg.c
+++ b/soh/src/overlays/actors/ovl_En_Tg/z_en_tg.c
@@ -190,7 +190,6 @@ void EnTg_Draw(Actor* thisx, PlayState* play) {
// Set the girl's shirt to white
gSPSegment(POLY_OPA_DISP++, 0x09, EnTg_SetColor(play->state.gfxCtx, 255, 255, 255, 0));
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
- EnTg_OverrideLimbDraw, EnTg_PostLimbDraw, this);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnTg_OverrideLimbDraw, EnTg_PostLimbDraw, this);
CLOSE_DISPS(play->state.gfxCtx);
}
diff --git a/soh/src/overlays/actors/ovl_En_Tite/z_en_tite.c b/soh/src/overlays/actors/ovl_En_Tite/z_en_tite.c
index 926e668ab..ba583c155 100644
--- a/soh/src/overlays/actors/ovl_En_Tite/z_en_tite.c
+++ b/soh/src/overlays/actors/ovl_En_Tite/z_en_tite.c
@@ -995,7 +995,7 @@ void EnTite_Draw(Actor* thisx, PlayState* play) {
gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(object_tite_Tex_001F00));
gSPSegment(POLY_OPA_DISP++, 0x0A, SEGMENTED_TO_VIRTUAL(object_tite_Tex_002100));
}
- SkelAnime_DrawOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, NULL, EnTite_PostLimbDraw,
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, NULL, EnTite_PostLimbDraw,
thisx);
CLOSE_DISPS(play->state.gfxCtx);
diff --git a/soh/src/overlays/actors/ovl_En_Tk/z_en_tk.c b/soh/src/overlays/actors/ovl_En_Tk/z_en_tk.c
index c35be7c7f..738db714d 100644
--- a/soh/src/overlays/actors/ovl_En_Tk/z_en_tk.c
+++ b/soh/src/overlays/actors/ovl_En_Tk/z_en_tk.c
@@ -408,7 +408,7 @@ s32 EnTk_ChooseReward(EnTk* this) {
f32 luck;
s32 reward;
- if ((gSaveContext.n64ddFlag || CVarGetInteger("gDampeWin", 0)) && !Flags_GetCollectible(gPlayState, 0x1F) && this->heartPieceSpawned == 0) {
+ if ((IS_RANDO || CVarGetInteger("gDampeWin", 0)) && !Flags_GetCollectible(gPlayState, 0x1F) && this->heartPieceSpawned == 0) {
return 3;
}
@@ -610,7 +610,7 @@ void EnTk_Dig(EnTk* this, PlayState* play) {
this->rewardTimer = 0;
- if (this->validDigHere == 1 || gSaveContext.n64ddFlag || CVarGetInteger("gDampeWin", 0)) {
+ if (this->validDigHere == 1 || IS_RANDO || CVarGetInteger("gDampeWin", 0)) {
rewardOrigin.x = 0.0f;
rewardOrigin.y = 0.0f;
rewardOrigin.z = -40.0f;
@@ -626,21 +626,21 @@ void EnTk_Dig(EnTk* this, PlayState* play) {
// merging in dampe tour fix seems messy, so i'm just wrapping this whole thing
// in an n64dd check for now
- if (gSaveContext.n64ddFlag || CVarGetInteger("gDampeWin", 0)) {
+ if (IS_RANDO || CVarGetInteger("gDampeWin", 0)) {
if (this->currentReward == 3) {
/*
* Upgrade the purple rupee reward to the heart piece if this
* is the first grand prize dig.
*/
- if (!Flags_GetItemGetInf(ITEMGETINF_1C) && !(gSaveContext.n64ddFlag || CVarGetInteger("gDampeWin", 0))) {
+ if (!Flags_GetItemGetInf(ITEMGETINF_1C) && !(IS_RANDO || CVarGetInteger("gDampeWin", 0))) {
Flags_SetItemGetInf(ITEMGETINF_1C);
this->currentReward = 4;
- } else if ((gSaveContext.n64ddFlag || CVarGetInteger("gDampeWin", 0)) && !Flags_GetCollectible(gPlayState, 0x1F) && this->heartPieceSpawned == 0) {
+ } else if ((IS_RANDO || CVarGetInteger("gDampeWin", 0)) && !Flags_GetCollectible(gPlayState, 0x1F) && this->heartPieceSpawned == 0) {
this->currentReward = 4;
}
}
- if ((gSaveContext.n64ddFlag || CVarGetInteger("gDampeWin", 0)) && this->currentReward == 4) {
+ if ((IS_RANDO || CVarGetInteger("gDampeWin", 0)) && this->currentReward == 4) {
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_ITEM00, rewardPos.x, rewardPos.y, rewardPos.z, 0,
0, 0, 0x1F06, true);
this->heartPieceSpawned = 1;
@@ -676,7 +676,7 @@ void EnTk_Dig(EnTk* this, PlayState* play) {
if (this->skelAnime.curFrame >= 32.0f && this->rewardTimer == 10) {
/* Play a reward sound shortly after digging */
- if (!(gSaveContext.n64ddFlag || CVarGetInteger("gDampeWin", 0)) && this->validDigHere == 0) {
+ if (!(IS_RANDO || CVarGetInteger("gDampeWin", 0)) && this->validDigHere == 0) {
/* Bad dig spot */
Audio_PlayActorSound2(&this->actor, NA_SE_SY_ERROR);
} else if (this->currentReward == 4) {
@@ -786,8 +786,7 @@ void EnTk_Draw(Actor* thisx, PlayState* play) {
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sEyesSegments[this->eyeTextureIdx]));
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
- EnTk_OverrideLimbDraw, EnTk_PostLimbDraw, this);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnTk_OverrideLimbDraw, EnTk_PostLimbDraw, this);
CLOSE_DISPS(play->state.gfxCtx);
}
diff --git a/soh/src/overlays/actors/ovl_En_Toryo/z_en_toryo.c b/soh/src/overlays/actors/ovl_En_Toryo/z_en_toryo.c
index 73ccc2c2b..d52b82d8d 100644
--- a/soh/src/overlays/actors/ovl_En_Toryo/z_en_toryo.c
+++ b/soh/src/overlays/actors/ovl_En_Toryo/z_en_toryo.c
@@ -319,7 +319,7 @@ void func_80B20768(EnToryo* this, PlayState* play) {
this->actor.parent = NULL;
this->unk_1E4 = 5;
} else {
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
GetItemEntry itemEntry = Randomizer_GetItemFromKnownCheck(RC_GV_TRADE_SAW, GI_SWORD_BROKEN);
Randomizer_ConsumeAdultTradeItem(play, ITEM_SAW);
GiveItemEntryFromActor(&this->actor, play, itemEntry, 100.0f, 10.0f);
@@ -395,8 +395,7 @@ void EnToryo_Draw(Actor* thisx, PlayState* play) {
EnToryo* this = (EnToryo*)thisx;
Gfx_SetupDL_25Opa(play->state.gfxCtx);
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
- EnToryo_OverrideLimbDraw, EnToryo_PostLimbDraw, this);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnToryo_OverrideLimbDraw, EnToryo_PostLimbDraw, this);
}
s32 EnToryo_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot,
diff --git a/soh/src/overlays/actors/ovl_En_Tr/z_en_tr.c b/soh/src/overlays/actors/ovl_En_Tr/z_en_tr.c
index e78405a1a..adf6c3ddc 100644
--- a/soh/src/overlays/actors/ovl_En_Tr/z_en_tr.c
+++ b/soh/src/overlays/actors/ovl_En_Tr/z_en_tr.c
@@ -443,8 +443,7 @@ void EnTr_Draw(Actor* thisx, PlayState* play) {
Gfx_SetupDL_37Opa(play->state.gfxCtx);
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sEyeTextures[this->eyeIndex]));
func_8002EBCC(&this->actor, play, 0);
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable,
- this->skelAnime.dListCount, EnTr_OverrideLimbDraw, NULL, this);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnTr_OverrideLimbDraw, NULL, this);
CLOSE_DISPS(play->state.gfxCtx);
}
}
diff --git a/soh/src/overlays/actors/ovl_En_Viewer/z_en_viewer.c b/soh/src/overlays/actors/ovl_En_Viewer/z_en_viewer.c
index 4eefc3580..56d126a2c 100644
--- a/soh/src/overlays/actors/ovl_En_Viewer/z_en_viewer.c
+++ b/soh/src/overlays/actors/ovl_En_Viewer/z_en_viewer.c
@@ -557,23 +557,21 @@ void EnViewer_DrawGanondorf(EnViewer* this, PlayState* play) {
}
if (type == ENVIEWER_TYPE_9_GANONDORF) {
- SkelAnime_DrawFlexOpa(play, this->skin.skelAnime.skeleton, this->skin.skelAnime.jointTable,
- this->skin.skelAnime.dListCount, NULL, EnViewer_Ganondorf9PostLimbDraw, this);
+ SkelAnime_DrawSkeletonOpa(play, &this->skin.skelAnime, NULL, EnViewer_Ganondorf9PostLimbDraw, this);
} else if (type == ENVIEWER_TYPE_3_GANONDORF) {
- SkelAnime_DrawFlexOpa(play, this->skin.skelAnime.skeleton, this->skin.skelAnime.jointTable,
- this->skin.skelAnime.dListCount, EnViewer_Ganondorf3OverrideLimbDraw,
+ SkelAnime_DrawSkeletonOpa(play, &this->skin.skelAnime, EnViewer_Ganondorf3OverrideLimbDraw,
EnViewer_GanondorfPostLimbDrawUpdateCapeVec, this);
EnViewer_UpdateGanondorfCape(play, this);
} else if (type == ENVIEWER_TYPE_3_GANONDORF || type == ENVIEWER_TYPE_5_GANONDORF ||
type == ENVIEWER_TYPE_7_GANONDORF || type == ENVIEWER_TYPE_8_GANONDORF) {
if ((play->csCtx.state != CS_STATE_IDLE) && (play->csCtx.npcActions[1] != NULL)) {
- SkelAnime_DrawFlexOpa(play, this->skin.skelAnime.skeleton, this->skin.skelAnime.jointTable,
- this->skin.skelAnime.dListCount, NULL, EnViewer_GanondorfPostLimbDrawUpdateCapeVec,
+ SkelAnime_DrawSkeletonOpa(play, &this->skin.skelAnime, NULL, EnViewer_GanondorfPostLimbDrawUpdateCapeVec,
this);
EnViewer_UpdateGanondorfCape(play, this);
}
} else {
- SkelAnime_DrawOpa(play, this->skin.skelAnime.skeleton, this->skin.skelAnime.jointTable, NULL, NULL, this);
+ SkelAnime_DrawSkeletonOpa(play, &this->skin.skelAnime, NULL, NULL,
+ this);
}
CLOSE_DISPS(play->state.gfxCtx);
}
@@ -661,8 +659,7 @@ void EnViewer_DrawZelda(EnViewer* this, PlayState* play) {
gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(gChildZeldaEyeShutTex));
gSPSegment(POLY_OPA_DISP++, 0x0A, SEGMENTED_TO_VIRTUAL(gChildZeldaMouthWorriedTex));
}
- SkelAnime_DrawFlexOpa(play, this->skin.skelAnime.skeleton, this->skin.skelAnime.jointTable,
- this->skin.skelAnime.dListCount, EnViewer_ZeldaOverrideLimbDraw, EnViewer_ZeldaPostLimbDraw,
+ SkelAnime_DrawSkeletonOpa(play, &this->skin.skelAnime, EnViewer_ZeldaOverrideLimbDraw, EnViewer_ZeldaPostLimbDraw,
this);
CLOSE_DISPS(play->state.gfxCtx);
}
@@ -681,8 +678,7 @@ void EnViewer_DrawImpa(EnViewer* this, PlayState* play) {
gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(gImpaEyeOpenTex));
gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, 255);
gSPSegment(POLY_OPA_DISP++, 0x0C, &D_80116280[2]);
- SkelAnime_DrawFlexOpa(play, this->skin.skelAnime.skeleton, this->skin.skelAnime.jointTable,
- this->skin.skelAnime.dListCount, EnViewer_ImpaOverrideLimbDraw, NULL, this);
+ SkelAnime_DrawSkeletonOpa(play, &this->skin.skelAnime, EnViewer_ImpaOverrideLimbDraw, NULL, this);
CLOSE_DISPS(play->state.gfxCtx);
}
diff --git a/soh/src/overlays/actors/ovl_En_Vm/z_en_vm.c b/soh/src/overlays/actors/ovl_En_Vm/z_en_vm.c
index b567b0735..ba0a75613 100644
--- a/soh/src/overlays/actors/ovl_En_Vm/z_en_vm.c
+++ b/soh/src/overlays/actors/ovl_En_Vm/z_en_vm.c
@@ -528,7 +528,7 @@ void EnVm_Draw(Actor* thisx, PlayState* play2) {
Gfx_SetupDL_25Opa(play->state.gfxCtx);
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
- SkelAnime_DrawOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, EnVm_OverrideLimbDraw,
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnVm_OverrideLimbDraw,
EnVm_PostLimbDraw, this);
actorPos = this->actor.world.pos;
func_80033C30(&actorPos, &D_80B2EB7C, 255, play);
diff --git a/soh/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c b/soh/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c
index 965c5b7af..9991f20eb 100644
--- a/soh/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c
+++ b/soh/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c
@@ -672,8 +672,7 @@ void EnWallmas_Draw(Actor* thisx, PlayState* play) {
if (this->actionFunc != EnWallmas_WaitToDrop) {
Gfx_SetupDL_25Opa(play->state.gfxCtx);
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable,
- this->skelAnime.dListCount, EnWallMas_OverrideLimbDraw, EnWallMas_PostLimbDraw, this);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnWallMas_OverrideLimbDraw, EnWallMas_PostLimbDraw, this);
}
EnWallmas_DrawXlu(this, play);
diff --git a/soh/src/overlays/actors/ovl_En_Wf/z_en_wf.c b/soh/src/overlays/actors/ovl_En_Wf/z_en_wf.c
index 9ebac2a90..41a485bbc 100644
--- a/soh/src/overlays/actors/ovl_En_Wf/z_en_wf.c
+++ b/soh/src/overlays/actors/ovl_En_Wf/z_en_wf.c
@@ -1449,8 +1449,7 @@ void EnWf_Draw(Actor* thisx, PlayState* play) {
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sWolfosWhiteEyeTextures[this->eyeIndex]));
}
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable,
- this->skelAnime.dListCount, EnWf_OverrideLimbDraw, EnWf_PostLimbDraw, &this->actor);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnWf_OverrideLimbDraw, EnWf_PostLimbDraw, &this->actor);
if (this->fireTimer != 0) {
this->actor.colorFilterTimer++;
diff --git a/soh/src/overlays/actors/ovl_En_Wonder_Talk/z_en_wonder_talk.c b/soh/src/overlays/actors/ovl_En_Wonder_Talk/z_en_wonder_talk.c
index 1355481c1..98a6a01b5 100644
--- a/soh/src/overlays/actors/ovl_En_Wonder_Talk/z_en_wonder_talk.c
+++ b/soh/src/overlays/actors/ovl_En_Wonder_Talk/z_en_wonder_talk.c
@@ -142,7 +142,7 @@ void func_80B3943C(EnWonderTalk* this, PlayState* play) {
if ((Actor_ProcessTalkRequest(&this->actor, play))) {
if (this->unk_156 != TEXT_STATE_DONE) {
// not if we're rando'd in the temple of time talking to the altar
- if(!(gSaveContext.n64ddFlag && play->sceneNum == 67)) {
+ if(!(IS_RANDO && play->sceneNum == 67)) {
this->actionFunc = func_80B395F0;
}
} else {
diff --git a/soh/src/overlays/actors/ovl_En_Wonder_Talk2/z_en_wonder_talk2.c b/soh/src/overlays/actors/ovl_En_Wonder_Talk2/z_en_wonder_talk2.c
index 9c9007a57..509d66027 100644
--- a/soh/src/overlays/actors/ovl_En_Wonder_Talk2/z_en_wonder_talk2.c
+++ b/soh/src/overlays/actors/ovl_En_Wonder_Talk2/z_en_wonder_talk2.c
@@ -254,7 +254,7 @@ void func_80B3A4F8(EnWonderTalk2* this, PlayState* play) {
if (!this->unk_156) {
// Whether or not to skip the text in rando
bool randoSkipText = false;
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
// Scenes for which all of this type of wonder talk should be skipped.
switch (play->sceneNum) {
case 0x0007: // Shadow Temple
diff --git a/soh/src/overlays/actors/ovl_En_Xc/z_en_xc.c b/soh/src/overlays/actors/ovl_En_Xc/z_en_xc.c
index afd8e7c5e..ffc6717d4 100644
--- a/soh/src/overlays/actors/ovl_En_Xc/z_en_xc.c
+++ b/soh/src/overlays/actors/ovl_En_Xc/z_en_xc.c
@@ -277,7 +277,7 @@ void func_80B3C9EC(EnXc* this) {
this->action = SHEIK_ACTION_BLOCK_PEDESTAL;
this->drawMode = SHEIK_DRAW_DEFAULT;
this->unk_30C = 1;
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
Actor_Kill(&this->actor);
}
return;
@@ -317,7 +317,7 @@ s32 EnXc_MinuetCS(EnXc* this, PlayState* play) {
if (z < -2225.0f) {
if (!Play_InCsMode(play)) {
- if (!gSaveContext.n64ddFlag) {
+ if (!IS_RANDO) {
play->csCtx.segment = SEGMENTED_TO_VIRTUAL(&gMinuetCs);
gSaveContext.cutsceneTrigger = 1;
Flags_SetEventChkInf(EVENTCHKINF_LEARNED_MINUET_OF_FOREST);
@@ -353,7 +353,7 @@ s32 EnXc_BoleroCS(EnXc* this, PlayState* play) {
if ((posRot->pos.x > -784.0f) && (posRot->pos.x < -584.0f) && (posRot->pos.y > 447.0f) &&
(posRot->pos.y < 647.0f) && (posRot->pos.z > -446.0f) && (posRot->pos.z < -246.0f) &&
!Play_InCsMode(play)) {
- if (!gSaveContext.n64ddFlag) {
+ if (!IS_RANDO) {
play->csCtx.segment = SEGMENTED_TO_VIRTUAL(&gDeathMountainCraterBoleroCs);
gSaveContext.cutsceneTrigger = 1;
Flags_SetEventChkInf(EVENTCHKINF_LEARNED_BOLERO_OF_FIRE);
@@ -370,7 +370,7 @@ s32 EnXc_BoleroCS(EnXc* this, PlayState* play) {
}
void EnXc_SetupSerenadeAction(EnXc* this, PlayState* play) {
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
this->action = SHEIK_ACTION_SERENADE;
return;
}
@@ -390,11 +390,11 @@ s32 EnXc_SerenadeCS(EnXc* this, PlayState* play) {
Player* player = GET_PLAYER(play);
s32 stateFlags = player->stateFlags1;
- if (((CHECK_OWNED_EQUIP(EQUIP_BOOTS, 1) && !gSaveContext.n64ddFlag) ||
- (Flags_GetTreasure(play, 2) && gSaveContext.n64ddFlag)) &&
+ if (((CHECK_OWNED_EQUIP(EQUIP_BOOTS, 1) && !IS_RANDO) ||
+ (Flags_GetTreasure(play, 2) && IS_RANDO)) &&
!Flags_GetEventChkInf(EVENTCHKINF_LEARNED_SERENADE_OF_WATER) && !(stateFlags & 0x20000000) &&
!Play_InCsMode(play)) {
- if (!gSaveContext.n64ddFlag) {
+ if (!IS_RANDO) {
Cutscene_SetSegment(play, &gIceCavernSerenadeCs);
gSaveContext.cutsceneTrigger = 1;
Flags_SetEventChkInf(EVENTCHKINF_LEARNED_SERENADE_OF_WATER); // Learned Serenade of Water Flag
@@ -1150,8 +1150,7 @@ void EnXc_DrawPullingOutHarp(Actor* thisx, PlayState* play) {
Gfx_SetupDL_25Opa(gfxCtx);
func_8002EBCC(&this->actor, play, 0);
- SkelAnime_DrawFlexOpa(play, skelAnime->skeleton, skelAnime->jointTable, skelAnime->dListCount,
- EnXc_PullingOutHarpOverrideLimbDraw, NULL, this);
+ SkelAnime_DrawSkeletonOpa(play, skelAnime, EnXc_PullingOutHarpOverrideLimbDraw, NULL, this);
CLOSE_DISPS(gfxCtx);
}
@@ -1173,8 +1172,7 @@ void EnXc_DrawHarp(Actor* thisx, PlayState* play) {
Gfx_SetupDL_25Opa(gfxCtx);
func_8002EBCC(&this->actor, play, 0);
- SkelAnime_DrawFlexOpa(play, skelAnime->skeleton, skelAnime->jointTable, skelAnime->dListCount,
- EnXc_HarpOverrideLimbDraw, NULL, this);
+ SkelAnime_DrawSkeletonOpa(play, skelAnime, EnXc_HarpOverrideLimbDraw, NULL, this);
CLOSE_DISPS(gfxCtx);
}
@@ -1801,8 +1799,7 @@ void EnXc_DrawTriforce(Actor* thisx, PlayState* play) {
Gfx_SetupDL_25Opa(play->state.gfxCtx);
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(eyeTexture));
gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(eyeTexture));
- SkelAnime_DrawFlexOpa(play, skelAnime->skeleton, skelAnime->jointTable, skelAnime->dListCount,
- EnXc_TriforceOverrideLimbDraw, EnXc_TriforcePostLimbDraw, this);
+ SkelAnime_DrawSkeletonOpa(play, skelAnime, EnXc_TriforceOverrideLimbDraw, EnXc_TriforcePostLimbDraw, this);
CLOSE_DISPS(gfxCtx);
}
@@ -2203,7 +2200,7 @@ void EnXc_DrawSquintingEyes(Actor* thisx, PlayState* play) {
Gfx_SetupDL_25Opa(gfxCtx);
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(gSheikEyeSquintingTex));
gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(gSheikEyeSquintingTex));
- SkelAnime_DrawFlexOpa(play, skelAnime->skeleton, skelAnime->jointTable, skelAnime->dListCount, NULL, NULL,
+ SkelAnime_DrawSkeletonOpa(play, skelAnime, NULL, NULL,
NULL);
CLOSE_DISPS(gfxCtx);
}
@@ -2216,10 +2213,10 @@ void EnXc_InitTempleOfTime(EnXc* this, PlayState* play) {
gSaveContext.cutsceneTrigger = 1;
func_80B3EBF0(this, play);
} else if ((!Flags_GetEventChkInf(EVENTCHKINF_LEARNED_PRELUDE_OF_LIGHT) && (Flags_GetEventChkInf(EVENTCHKINF_USED_FOREST_TEMPLE_BLUE_WARP)) &&
- !gSaveContext.n64ddFlag) ||
+ !IS_RANDO) ||
(!Flags_GetEventChkInf(EVENTCHKINF_LEARNED_PRELUDE_OF_LIGHT) && CHECK_QUEST_ITEM(QUEST_MEDALLION_FOREST) &&
- gSaveContext.n64ddFlag)) {
- if (!gSaveContext.n64ddFlag) {
+ IS_RANDO)) {
+ if (!IS_RANDO) {
Flags_SetEventChkInf(EVENTCHKINF_LEARNED_PRELUDE_OF_LIGHT);
Item_Give(play, ITEM_SONG_PRELUDE);
play->csCtx.segment = SEGMENTED_TO_VIRTUAL(gTempleOfTimePreludeCs);
@@ -2382,7 +2379,7 @@ void EnXc_Update(Actor* thisx, PlayState* play) {
s32 action = this->action;
if (this->actor.params == SHEIK_TYPE_9) {
- if (gSaveContext.n64ddFlag && LINK_IS_ADULT) {
+ if (IS_RANDO && LINK_IS_ADULT) {
if (CHECK_QUEST_ITEM(QUEST_MEDALLION_FOREST) && !Flags_GetEventChkInf(EVENTCHKINF_LEARNED_PRELUDE_OF_LIGHT)) {
GivePlayerRandoRewardSheikSong(this, play, RC_SHEIK_AT_TEMPLE, 0x20, RG_PRELUDE_OF_LIGHT);
}
@@ -2492,8 +2489,7 @@ void EnXc_DrawDefault(Actor* thisx, PlayState* play) {
Gfx_SetupDL_25Opa(gfxCtx);
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(eyeSegment));
gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(eyeSegment));
- SkelAnime_DrawFlexOpa(play, skelAnime->skeleton, skelAnime->jointTable, skelAnime->dListCount,
- EnXc_OverrideLimbDraw, EnXc_PostLimbDraw, this);
+ SkelAnime_DrawSkeletonOpa(play, skelAnime, EnXc_OverrideLimbDraw, EnXc_PostLimbDraw, this);
CLOSE_DISPS(gfxCtx);
}
diff --git a/soh/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c b/soh/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c
index 4a5759862..133556f52 100644
--- a/soh/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c
+++ b/soh/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c
@@ -623,8 +623,7 @@ void EnZl1_Draw(Actor* thisx, PlayState* play) {
gSPSegment(POLY_OPA_DISP++, 0x0A, SEGMENTED_TO_VIRTUAL(this->unk_1EC));
Gfx_SetupDL_25Opa(play->state.gfxCtx);
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
- EnZl1_OverrideLimbDraw, EnZl1_PostLimbDraw, this);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnZl1_OverrideLimbDraw, EnZl1_PostLimbDraw, this);
CLOSE_DISPS(play->state.gfxCtx);
}
diff --git a/soh/src/overlays/actors/ovl_En_Zl4/z_en_zl4.c b/soh/src/overlays/actors/ovl_En_Zl4/z_en_zl4.c
index 405d96407..3f5412b05 100644
--- a/soh/src/overlays/actors/ovl_En_Zl4/z_en_zl4.c
+++ b/soh/src/overlays/actors/ovl_En_Zl4/z_en_zl4.c
@@ -389,7 +389,7 @@ void EnZl4_Init(Actor* thisx, PlayState* play) {
this->actor.textId = -1;
this->eyeExpression = this->mouthExpression = ZL4_MOUTH_NEUTRAL;
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ZL4_ANIM_0);
this->actionFunc = EnZl4_Idle;
return;
@@ -1226,7 +1226,7 @@ void EnZl4_Idle(EnZl4* this, PlayState* play) {
EnZl4_GetText, func_80B5B9B0);
func_80B5BB78(this, play);
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
GivePlayerRandoRewardZeldaChild(this, play, RC_HC_ZELDAS_LETTER);
return;
}
@@ -1327,7 +1327,6 @@ void EnZl4_Draw(Actor* thisx, PlayState* play) {
gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(eyeTex[this->leftEyeState]));
gSPSegment(POLY_OPA_DISP++, 0x0A, SEGMENTED_TO_VIRTUAL(mouthTex[this->mouthState]));
Gfx_SetupDL_25Opa(play->state.gfxCtx);
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
- EnZl4_OverrideLimbDraw, EnZl4_PostLimbDraw, this);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, EnZl4_OverrideLimbDraw, EnZl4_PostLimbDraw, this);
CLOSE_DISPS(play->state.gfxCtx);
}
diff --git a/soh/src/overlays/actors/ovl_Fishing/z_fishing.c b/soh/src/overlays/actors/ovl_Fishing/z_fishing.c
index 75157d6ef..fbf82d2a6 100644
--- a/soh/src/overlays/actors/ovl_Fishing/z_fishing.c
+++ b/soh/src/overlays/actors/ovl_Fishing/z_fishing.c
@@ -4329,16 +4329,14 @@ void Fishing_DrawFish(Actor* thisx, PlayState* play) {
Matrix_RotateY((this->unk_16C * (M_PI / 32768)) - (M_PI / 2), MTXMODE_APPLY);
Matrix_Translate(0.0f, 0.0f, this->unk_16C * 10.0f * 0.01f, MTXMODE_APPLY);
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable,
- this->skelAnime.dListCount, Fishing_FishOverrideLimbDraw, Fishing_FishPostLimbDraw, this);
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, Fishing_FishOverrideLimbDraw, Fishing_FishPostLimbDraw, this);
} else {
Matrix_Translate(0.0f, 0.0f, 3000.0f, MTXMODE_APPLY);
Matrix_RotateY(this->unk_16C * (M_PI / 32768), MTXMODE_APPLY);
Matrix_Translate(0.0f, 0.0f, -3000.0f, MTXMODE_APPLY);
Matrix_RotateY(-(M_PI / 2), MTXMODE_APPLY);
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable,
- this->skelAnime.dListCount, Fishing_LoachOverrideLimbDraw, Fishing_LoachPostLimbDraw,
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, Fishing_LoachOverrideLimbDraw, Fishing_LoachPostLimbDraw,
this);
}
}
@@ -4923,7 +4921,7 @@ void Fishing_HandleOwnerDialog(Fishing* this, PlayState* play) {
if (D_80B7A670 == 0.0f) {
this->actor.textId = 0x408C;
this->unk_15C = 20;
- } else if (D_80B7E07C == 0 && !gSaveContext.n64ddFlag) {
+ } else if (D_80B7E07C == 0 && !IS_RANDO) {
D_80B7A678 = D_80B7A670;
if ((s16)D_80B7E078 < (s16)D_80B7A670) {
if (D_80B7E07E == 2) {
@@ -4936,7 +4934,7 @@ void Fishing_HandleOwnerDialog(Fishing* this, PlayState* play) {
this->actor.textId = 0x408B;
this->unk_15C = 20;
}
- } else if (!gSaveContext.n64ddFlag) {
+ } else if (!IS_RANDO) {
this->actor.textId = 0x409B;
this->unk_15C = 11;
}
@@ -5054,7 +5052,7 @@ void Fishing_HandleOwnerDialog(Fishing* this, PlayState* play) {
HIGH_SCORE(HS_FISHING) |= 0x400;
Flags_SetRandomizerInf(RAND_INF_CHILD_FISHING);
sSinkingLureLocation = (u8)Rand_ZeroFloat(3.999f) + 1;
- if (!gSaveContext.n64ddFlag) {
+ if (!IS_RANDO) {
getItemId = GI_HEART_PIECE;
} else {
getItemEntry = Randomizer_GetItemFromKnownCheck(RC_LH_CHILD_FISHING, GI_HEART_PIECE);
@@ -5071,7 +5069,7 @@ void Fishing_HandleOwnerDialog(Fishing* this, PlayState* play) {
HIGH_SCORE(HS_FISHING) |= 0x800;
Flags_SetRandomizerInf(RAND_INF_ADULT_FISHING);
sSinkingLureLocation = (u8)Rand_ZeroFloat(3.999f) + 1;
- if (!gSaveContext.n64ddFlag) {
+ if (!IS_RANDO) {
getItemId = GI_SCALE_GOLD;
} else {
getItemEntry = Randomizer_GetItemFromKnownCheck(RC_LH_ADULT_FISHING, GI_SCALE_GOLD);
@@ -5086,7 +5084,7 @@ void Fishing_HandleOwnerDialog(Fishing* this, PlayState* play) {
}
this->actor.parent = NULL;
- if (!gSaveContext.n64ddFlag || getItemEntry.getItemId == GI_NONE) {
+ if (!IS_RANDO || getItemEntry.getItemId == GI_NONE) {
func_8002F434(&this->actor, play, getItemId, 2000.0f, 1000.0f);
} else {
GiveItemEntryFromActor(&this->actor, play, getItemEntry, 2000.0f, 1000.0f);
@@ -5151,7 +5149,7 @@ void Fishing_HandleOwnerDialog(Fishing* this, PlayState* play) {
if (Actor_HasParent(&this->actor, play)) {
this->unk_15C = 24;
} else {
- if (!gSaveContext.n64ddFlag) {
+ if (!IS_RANDO) {
func_8002F434(&this->actor, play, GI_SCALE_GOLD, 2000.0f, 1000.0f);
} else {
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_LH_ADULT_FISHING, GI_SCALE_GOLD);
@@ -5163,7 +5161,7 @@ void Fishing_HandleOwnerDialog(Fishing* this, PlayState* play) {
case 24:
D_80B7A674 = false;
if (((Message_GetState(&play->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(play)) ||
- (gSaveContext.n64ddFlag && GET_PLAYER(play)->getItemId == GI_ICE_TRAP)) {
+ (IS_RANDO && GET_PLAYER(play)->getItemId == GI_ICE_TRAP)) {
if (D_80B7E07C == 0) {
this->unk_15C = 0;
} else {
@@ -5840,8 +5838,7 @@ void Fishing_DrawOwner(Actor* thisx, PlayState* play) {
(fabsf(this->actor.projectedPos.x) < (100.0f + this->actor.projectedPos.z))) {
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sFishingOwnerEyeTexs[this->unk_160]));
- SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable,
- this->skelAnime.dListCount, Fishing_OwnerOverrideLimbDraw, Fishing_OwnerPostLimbDraw,
+ SkelAnime_DrawSkeletonOpa(play, &this->skelAnime, Fishing_OwnerOverrideLimbDraw, Fishing_OwnerPostLimbDraw,
this);
}
diff --git a/soh/src/overlays/actors/ovl_Item_B_Heart/z_item_b_heart.c b/soh/src/overlays/actors/ovl_Item_B_Heart/z_item_b_heart.c
index 35f6d5457..abb65c191 100644
--- a/soh/src/overlays/actors/ovl_Item_B_Heart/z_item_b_heart.c
+++ b/soh/src/overlays/actors/ovl_Item_B_Heart/z_item_b_heart.c
@@ -59,7 +59,7 @@ void ItemBHeart_Update(Actor* thisx, PlayState* play) {
Flags_SetCollectible(play, 0x1F);
Actor_Kill(&this->actor);
} else {
- if (!gSaveContext.n64ddFlag) {
+ if (!IS_RANDO) {
func_8002F434(&this->actor, play, GI_HEART_CONTAINER_2, 30.0f, 40.0f);
} else {
GetItemEntry getItemEntry = Randomizer_GetItemFromActor(this->actor.id, play->sceneNum, this->actor.params, GI_HEART_CONTAINER_2);
@@ -98,7 +98,7 @@ void ItemBHeart_Draw(Actor* thisx, PlayState* play) {
actorIt = actorIt->next;
}
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
GetItemEntry_Draw(play, Randomizer_GetItemFromActor(this->actor.id,
play->sceneNum,this->actor.params, GI_HEART_CONTAINER_2));
} else {
diff --git a/soh/src/overlays/actors/ovl_Item_Etcetera/z_item_etcetera.c b/soh/src/overlays/actors/ovl_Item_Etcetera/z_item_etcetera.c
index e7822399c..189f9cfe7 100644
--- a/soh/src/overlays/actors/ovl_Item_Etcetera/z_item_etcetera.c
+++ b/soh/src/overlays/actors/ovl_Item_Etcetera/z_item_etcetera.c
@@ -83,8 +83,8 @@ void ItemEtcetera_Init(Actor* thisx, PlayState* play) {
case ITEM_ETC_LETTER:
Actor_SetScale(&this->actor, 0.5f);
this->futureActionFunc = func_80B858B4;
- if ((Flags_GetEventChkInf(EVENTCHKINF_OBTAINED_RUTOS_LETTER) && !gSaveContext.n64ddFlag) ||
- (gSaveContext.n64ddFlag && Flags_GetTreasure(play, 0x1E))) {
+ if ((Flags_GetEventChkInf(EVENTCHKINF_OBTAINED_RUTOS_LETTER) && !IS_RANDO) ||
+ (IS_RANDO && Flags_GetTreasure(play, 0x1E))) {
Actor_Kill(&this->actor);
}
break;
@@ -122,7 +122,7 @@ void func_80B857D0(ItemEtcetera* this, PlayState* play) {
void func_80B85824(ItemEtcetera* this, PlayState* play) {
if (Actor_HasParent(&this->actor, play)) {
if ((this->actor.params & 0xFF) == 7) {
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
Flags_SetTreasure(play, 0x1F);
}
}
@@ -133,7 +133,7 @@ void func_80B85824(ItemEtcetera* this, PlayState* play) {
}
Actor_Kill(&this->actor);
} else {
- if (!gSaveContext.n64ddFlag) {
+ if (!IS_RANDO) {
func_8002F434(&this->actor, play, this->getItemId, 30.0f, 50.0f);
} else {
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_LH_SUN, GI_ARROW_FIRE);
@@ -148,7 +148,7 @@ void func_80B858B4(ItemEtcetera* this, PlayState* play) {
Flags_SetEventChkInf(EVENTCHKINF_OBTAINED_RUTOS_LETTER);
Flags_SetSwitch(play, 0xB);
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
Flags_SetTreasure(play, 0x1E);
}
}
@@ -156,7 +156,7 @@ void func_80B858B4(ItemEtcetera* this, PlayState* play) {
} else {
if (0) {} // Necessary to match
- if (!gSaveContext.n64ddFlag) {
+ if (!IS_RANDO) {
func_8002F434(&this->actor, play, this->getItemId, 30.0f, 50.0f);
} else {
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_LH_UNDERWATER_ITEM, GI_LETTER_RUTO);
@@ -229,7 +229,7 @@ void ItemEtcetera_DrawThroughLens(Actor* thisx, PlayState* play) {
func_8002EBCC(&this->actor, play, 0);
func_8002ED80(&this->actor, play, 0);
- if(gSaveContext.n64ddFlag && play->sceneNum == 16) {
+ if(IS_RANDO && play->sceneNum == 16) {
GetItemEntry randoGetItem = GetChestGameRandoGetItem(this->actor.room, this->giDrawId, play);
EnItem00_CustomItemsParticles(&this->actor, play, randoGetItem);
if (randoGetItem.itemId != ITEM_NONE) {
@@ -246,7 +246,7 @@ void ItemEtcetera_Draw(Actor* thisx, PlayState* play) {
ItemEtcetera* this = (ItemEtcetera*)thisx;
s32 type = this->actor.params & 0xFF;
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
GetItemEntry randoGetItem = (GetItemEntry)GET_ITEM_NONE;
if (type == ITEM_ETC_ARROW_FIRE) {
randoGetItem = Randomizer_GetItemFromKnownCheck(RC_LH_SUN, GI_ARROW_FIRE);
diff --git a/soh/src/overlays/actors/ovl_Item_Ocarina/z_item_ocarina.c b/soh/src/overlays/actors/ovl_Item_Ocarina/z_item_ocarina.c
index 3e4694423..5cfb6b81f 100644
--- a/soh/src/overlays/actors/ovl_Item_Ocarina/z_item_ocarina.c
+++ b/soh/src/overlays/actors/ovl_Item_Ocarina/z_item_ocarina.c
@@ -169,7 +169,7 @@ void ItemOcarina_DoNothing(ItemOcarina* this, PlayState* play) {
void ItemOcarina_StartSoTCutscene(ItemOcarina* this, PlayState* play) {
if (Actor_TextboxIsClosing(&this->actor, play)) {
- if (!gSaveContext.n64ddFlag) {
+ if (!IS_RANDO) {
play->csCtx.segment = SEGMENTED_TO_VIRTUAL(gHyruleFieldZeldaSongOfTimeCs);
gSaveContext.cutsceneTrigger = 1;
} else {
@@ -189,7 +189,7 @@ void ItemOcarina_WaitInWater(ItemOcarina* this, PlayState* play) {
this->actionFunc = ItemOcarina_StartSoTCutscene;
this->actor.draw = NULL;
} else {
- if (!gSaveContext.n64ddFlag) {
+ if (!IS_RANDO) {
func_8002F434(&this->actor, play, GI_OCARINA_OOT, 30.0f, 50.0f);
} else {
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_HF_OCARINA_OF_TIME_ITEM, GI_OCARINA_OOT);
@@ -214,7 +214,7 @@ void ItemOcarina_Draw(Actor* thisx, PlayState* play) {
func_8002EBCC(thisx, play, 0);
func_8002ED80(thisx, play, 0);
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
GetItemEntry randoGetItem = Randomizer_GetItemFromKnownCheck(RC_HF_OCARINA_OF_TIME_ITEM, GI_OCARINA_OOT);
EnItem00_CustomItemsParticles(&this->actor, play, randoGetItem);
GetItemEntry_Draw(play, randoGetItem);
diff --git a/soh/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.c b/soh/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.c
index 7a893b50a..217fc434f 100644
--- a/soh/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.c
+++ b/soh/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.c
@@ -123,7 +123,7 @@ void ObjLightswitch_InitCollider(ObjLightswitch* this, PlayState* play) {
s32 pad;
// Initialize this with the sun switch, so it can't be affected by toggling while the actor is loaded
- sunLightArrowsEnabledOnSunSwitchLoad = CVarGetInteger("gSunlightArrows", 0) || (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SUNLIGHT_ARROWS));
+ sunLightArrowsEnabledOnSunSwitchLoad = CVarGetInteger("gSunlightArrows", 0) || (IS_RANDO && Randomizer_GetSettingValue(RSK_SUNLIGHT_ARROWS));
Collider_InitJntSph(play, &this->collider);
// If "Sunlight Arrows" is enabled, set up the collider to allow Light Arrow hits
diff --git a/soh/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c b/soh/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c
index 4fe1d1e02..27b4c17cd 100644
--- a/soh/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c
+++ b/soh/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c
@@ -275,7 +275,7 @@ void ObjOshihiki_Init(Actor* thisx, PlayState* play2) {
// In MQ Spirit, remove the large silver block in the hole as child so the chest in the silver block hallway
// can be guaranteed accessible
- if (gSaveContext.n64ddFlag && LINK_IS_CHILD && ResourceMgr_IsGameMasterQuest() &&
+ if (IS_RANDO && LINK_IS_CHILD && ResourceMgr_IsGameMasterQuest() &&
play->sceneNum == SCENE_SPIRIT_TEMPLE && thisx->room == 6 && // Spirit Temple silver block hallway
thisx->params == 0x9C7) { // Silver block that is marked as in the hole
Actor_Kill(thisx);
diff --git a/soh/src/overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.c b/soh/src/overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.c
index 6cecb0fa7..2346b34ff 100644
--- a/soh/src/overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.c
+++ b/soh/src/overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.c
@@ -222,7 +222,7 @@ void ObjTsubo_WaterBreak(ObjTsubo* this, PlayState* play) {
void ObjTsubo_SetupWaitForObject(ObjTsubo* this) {
// Remove pots in Boss Rush. Present in Barinade's and Ganondorf's arenas.
- if (gSaveContext.isBossRush) {
+ if (IS_BOSS_RUSH) {
Actor_Kill(this);
}
diff --git a/soh/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.c b/soh/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.c
index 1cbc48473..e5d1410ea 100644
--- a/soh/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.c
+++ b/soh/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.c
@@ -136,7 +136,7 @@ void ObjectKankyo_Init(Actor* thisx, PlayState* play) {
this->effects[5].size = 0.0f;
}
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
if (Flags_GetRandomizerInf(RAND_INF_TRIALS_DONE_FOREST_TRIAL)) {
this->effects[0].size = 0.0f;
}
diff --git a/soh/src/overlays/actors/ovl_Shot_Sun/z_shot_sun.c b/soh/src/overlays/actors/ovl_Shot_Sun/z_shot_sun.c
index d85770a32..0c280171f 100644
--- a/soh/src/overlays/actors/ovl_Shot_Sun/z_shot_sun.c
+++ b/soh/src/overlays/actors/ovl_Shot_Sun/z_shot_sun.c
@@ -162,8 +162,8 @@ void ShotSun_UpdateHyliaSun(ShotSun* this, PlayState* play) {
if (this->collider.base.acFlags & AC_HIT) {
func_80078884(NA_SE_SY_CORRECT_CHIME);
osSyncPrintf(VT_FGCOL(CYAN) "SHOT_SUN HIT!!!!!!!\n" VT_RST);
- if ((INV_CONTENT(ITEM_ARROW_FIRE) == ITEM_NONE && !gSaveContext.n64ddFlag) ||
- (!Flags_GetTreasure(play, 0x1F) && gSaveContext.n64ddFlag)) {
+ if ((INV_CONTENT(ITEM_ARROW_FIRE) == ITEM_NONE && !IS_RANDO) ||
+ (!Flags_GetTreasure(play, 0x1F) && IS_RANDO)) {
Actor_Spawn(&play->actorCtx, play, ACTOR_ITEM_ETCETERA, 700.0f, -800.0f, 7261.0f, 0, 0, 0, 7, true);
play->csCtx.segment = SEGMENTED_TO_VIRTUAL(gLakeHyliaFireArrowsCS);
gSaveContext.cutsceneTrigger = 1;
diff --git a/soh/src/overlays/actors/ovl_player_actor/z_player.c b/soh/src/overlays/actors/ovl_player_actor/z_player.c
index 4023f6449..d0c4b362e 100644
--- a/soh/src/overlays/actors/ovl_player_actor/z_player.c
+++ b/soh/src/overlays/actors/ovl_player_actor/z_player.c
@@ -4275,7 +4275,7 @@ s32 func_80839034(PlayState* play, Player* this, CollisionPoly* poly, u32 bgId)
play->nextEntranceIndex = play->setupExitList[sp3C - 1];
// Main override for entrance rando and entrance skips
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
play->nextEntranceIndex = Entrance_OverrideNextIndex(play->nextEntranceIndex);
}
@@ -4286,7 +4286,7 @@ s32 func_80839034(PlayState* play, Player* this, CollisionPoly* poly, u32 bgId)
gSaveContext.nextTransitionType = 3;
} else if (play->nextEntranceIndex >= 0x7FF9) {
// handle dynamic exits
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
play->nextEntranceIndex = Entrance_OverrideDynamicExit(D_80854514[play->nextEntranceIndex - 0x7FF9] + play->curSpawn);
} else {
play->nextEntranceIndex =
@@ -4446,7 +4446,7 @@ s32 func_80839800(Player* this, PlayState* play) {
(!(this->stateFlags1 & PLAYER_STATE1_ITEM_OVER_HEAD) ||
((this->heldActor != NULL) && (this->heldActor->id == ACTOR_EN_RU1)))) {
// Disable doors in Boss Rush so the player can't leave the boss rooms backwards.
- if ((CHECK_BTN_ALL(sControlInput->press.button, BTN_A) || (func_8084F9A0 == this->func_674)) && !gSaveContext.isBossRush) {
+ if ((CHECK_BTN_ALL(sControlInput->press.button, BTN_A) || (func_8084F9A0 == this->func_674)) && !IS_BOSS_RUSH) {
doorActor = this->doorActor;
if (this->doorType <= PLAYER_DOORTYPE_AJAR) {
@@ -6358,7 +6358,7 @@ s32 func_8083E5A8(Player* this, PlayState* play) {
iREG(67) = false;
- if (gSaveContext.n64ddFlag && giEntry.getItemId == RG_ICE_TRAP && giEntry.getItemFrom == ITEM_FROM_FREESTANDING) {
+ if (IS_RANDO && giEntry.getItemId == RG_ICE_TRAP && giEntry.getItemFrom == ITEM_FROM_FREESTANDING) {
this->actor.freezeTimer = 30;
Player_SetPendingFlag(this, play);
Message_StartTextbox(play, 0xF8, NULL);
@@ -6370,7 +6370,7 @@ s32 func_8083E5A8(Player* this, PlayState* play) {
// Show the cutscene for picking up an item. In vanilla, this happens in bombchu bowling alley (because getting bombchus need to show the cutscene)
// and whenever the player doesn't have the item yet. In rando, we're overruling this because we need to keep showing the cutscene
// because those items can be randomized and thus it's important to keep showing the cutscene.
- uint8_t showItemCutscene = play->sceneNum == SCENE_BOMBCHU_BOWLING_ALLEY || Item_CheckObtainability(giEntry.itemId) == ITEM_NONE || gSaveContext.n64ddFlag;
+ uint8_t showItemCutscene = play->sceneNum == SCENE_BOMBCHU_BOWLING_ALLEY || Item_CheckObtainability(giEntry.itemId) == ITEM_NONE || IS_RANDO;
// Only skip cutscenes for drops when they're items/consumables from bushes/rocks/enemies.
uint8_t isDropToSkip = (interactedActor->id == ACTOR_EN_ITEM00 && interactedActor->params != 6 && interactedActor->params != 17) ||
@@ -6384,7 +6384,7 @@ s32 func_8083E5A8(Player* this, PlayState* play) {
// Same as above but for rando. Rando is different because we want to enable cutscenes for items that the player already has because
// those items could be a randomized item coming from scrubs, freestanding PoH's and keys. So we need to once again overrule
// this specifically for items coming from bushes/rocks/enemies when the player has already picked that item up.
- uint8_t skipItemCutsceneRando = gSaveContext.n64ddFlag && Item_CheckObtainability(giEntry.itemId) != ITEM_NONE && isDropToSkip;
+ uint8_t skipItemCutsceneRando = IS_RANDO && Item_CheckObtainability(giEntry.itemId) != ITEM_NONE && isDropToSkip;
// Show cutscene when picking up a item.
if (showItemCutscene && !skipItemCutscene && !skipItemCutsceneRando) {
@@ -9658,7 +9658,7 @@ void Player_Init(Actor* thisx, PlayState* play2) {
s32 sp4C;
// In ER, once Link has spawned we know the scene has loaded, so we can sanitize the last known entrance type
- if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_ENTRANCES)) {
+ if (IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_ENTRANCES)) {
Grotto_SanitizeEntranceType();
}
@@ -12706,7 +12706,7 @@ s32 func_8084DFF4(PlayState* play, Player* this) {
// Use this if we do have a getItemEntry
if (giEntry.modIndex == MOD_NONE) {
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
Audio_PlayFanfare_Rando(giEntry);
} else if (((giEntry.itemId >= ITEM_RUPEE_GREEN) && (giEntry.itemId <= ITEM_RUPEE_RED)) ||
((giEntry.itemId >= ITEM_RUPEE_PURPLE) && (giEntry.itemId <= ITEM_RUPEE_GOLD)) ||
@@ -12724,7 +12724,7 @@ s32 func_8084DFF4(PlayState* play, Player* this) {
Audio_PlayFanfare(temp1);
}
} else if (giEntry.modIndex == MOD_RANDOMIZER) {
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
Audio_PlayFanfare_Rando(giEntry);
} else if (giEntry.itemId == RG_DOUBLE_DEFENSE || giEntry.itemId == RG_MAGIC_SINGLE ||
giEntry.itemId == RG_MAGIC_DOUBLE) {
@@ -12763,7 +12763,7 @@ s32 func_8084DFF4(PlayState* play, Player* this) {
play->msgCtx.msgMode = MSGMODE_TEXT_DONE;
} else {
if (Message_GetState(&play->msgCtx) == TEXT_STATE_CLOSING) {
- if (this->getItemId == GI_GAUNTLETS_SILVER && !gSaveContext.n64ddFlag) {
+ if (this->getItemId == GI_GAUNTLETS_SILVER && !IS_RANDO) {
play->nextEntranceIndex = 0x0123;
play->sceneLoadFlag = 0x14;
gSaveContext.nextCutsceneIndex = 0xFFF1;
@@ -12941,16 +12941,16 @@ void func_8084E6D4(Player* this, PlayState* play) {
}
} else {
func_80832DBC(this);
- if ((this->getItemId == GI_ICE_TRAP && !gSaveContext.n64ddFlag) ||
- (gSaveContext.n64ddFlag && (this->getItemId == RG_ICE_TRAP || this->getItemEntry.getItemId == RG_ICE_TRAP))) {
+ if ((this->getItemId == GI_ICE_TRAP && !IS_RANDO) ||
+ (IS_RANDO && (this->getItemId == RG_ICE_TRAP || this->getItemEntry.getItemId == RG_ICE_TRAP))) {
this->stateFlags1 &= ~(PLAYER_STATE1_GETTING_ITEM | PLAYER_STATE1_ITEM_OVER_HEAD);
- if ((this->getItemId != GI_ICE_TRAP && !gSaveContext.n64ddFlag) ||
- (gSaveContext.n64ddFlag && (this->getItemId != RG_ICE_TRAP || this->getItemEntry.getItemId != RG_ICE_TRAP))) {
+ if ((this->getItemId != GI_ICE_TRAP && !IS_RANDO) ||
+ (IS_RANDO && (this->getItemId != RG_ICE_TRAP || this->getItemEntry.getItemId != RG_ICE_TRAP))) {
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_CLEAR_TAG, this->actor.world.pos.x,
this->actor.world.pos.y + 100.0f, this->actor.world.pos.z, 0, 0, 0, 0, true);
func_8083C0E8(this, play);
- } else if (gSaveContext.n64ddFlag) {
+ } else if (IS_RANDO) {
gSaveContext.pendingIceTrapCount++;
Player_SetPendingFlag(this, play);
func_8083C0E8(this, play);
@@ -13490,7 +13490,7 @@ void func_8084F88C(Player* this, PlayState* play) {
} else if (this->unk_84F < 0) {
Play_TriggerRespawn(play);
// In ER, handle DMT and other special void outs to respawn from last entrance from grotto
- if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_ENTRANCES)) {
+ if (IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_ENTRANCES)) {
Grotto_ForceRegularVoidOut();
}
} else {
diff --git a/soh/src/overlays/gamestates/ovl_file_choose/file_choose.h b/soh/src/overlays/gamestates/ovl_file_choose/file_choose.h
index 3f76ebd0d..d77517996 100644
--- a/soh/src/overlays/gamestates/ovl_file_choose/file_choose.h
+++ b/soh/src/overlays/gamestates/ovl_file_choose/file_choose.h
@@ -173,13 +173,6 @@ typedef enum {
/* 99 */ FS_KBD_BTN_NONE = 99
} KeyboardButton;
-typedef enum {
- /* 00 */ FS_QUEST_NORMAL,
- /* 01 */ FS_QUEST_MASTER,
- /* 02 */ FS_QUEST_RANDOMIZER,
- /* 03 */ FS_QUEST_BOSSRUSH,
-} FileSelectQuest;
-
void FileChoose_SetupCopySource(GameState* thisx);
void FileChoose_SelectCopySource(GameState* thisx);
void FileChoose_SetupCopyDest1(GameState* thisx);
diff --git a/soh/src/overlays/gamestates/ovl_file_choose/z_file_choose.c b/soh/src/overlays/gamestates/ovl_file_choose/z_file_choose.c
index 5cf7b3202..ef95b6a71 100644
--- a/soh/src/overlays/gamestates/ovl_file_choose/z_file_choose.c
+++ b/soh/src/overlays/gamestates/ovl_file_choose/z_file_choose.c
@@ -20,6 +20,7 @@
#include "soh/Enhancements/enhancementTypes.h"
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
#include
+#include "z64save.h"
typedef struct {
s16 left;
@@ -664,8 +665,8 @@ static void DrawMoreInfo(FileChooseContext* this, s16 fileIndex, u8 alpha) {
DrawCounters(this, fileIndex, alpha);
}
-#define MIN_QUEST (ResourceMgr_GameHasOriginal() ? FS_QUEST_NORMAL : FS_QUEST_MASTER)
-#define MAX_QUEST FS_QUEST_BOSSRUSH
+#define MIN_QUEST (ResourceMgr_GameHasOriginal() ? QUEST_NORMAL : QUEST_MASTER)
+#define MAX_QUEST QUEST_BOSSRUSH
void Sram_InitDebugSave(void);
void Sram_InitBossRushSave();
@@ -962,7 +963,7 @@ void DrawSeedHashSprites(FileChooseContext* this) {
// Draw icons on the main menu, when a rando file is selected, and when quest selection is set to rando
if ((this->configMode == CM_MAIN_MENU &&
(this->selectMode != SM_CONFIRM_FILE || Save_GetSaveMetaInfo(this->selectedFileIndex)->randoSave == 1)) ||
- (this->configMode == CM_QUEST_MENU && this->questType[this->buttonIndex] == FS_QUEST_RANDOMIZER)) {
+ (this->configMode == CM_QUEST_MENU && this->questType[this->buttonIndex] == QUEST_RANDOMIZER)) {
if (this->fileInfoAlpha[this->selectedFileIndex] > 0) {
// Use file info alpha to match fading
@@ -988,7 +989,7 @@ void DrawSeedHashSprites(FileChooseContext* this) {
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 0xFF, 0xFF, 0xFF, alpha);
// Draw Seed Icons for spoiler log
- if (this->configMode == CM_QUEST_MENU && this->questType[this->buttonIndex] == FS_QUEST_RANDOMIZER && strnlen(CVarGetString("gSpoilerLog", ""), 1) != 0 && fileSelectSpoilerFileLoaded) {
+ if (this->configMode == CM_QUEST_MENU && this->questType[this->buttonIndex] == QUEST_RANDOMIZER && strnlen(CVarGetString("gSpoilerLog", ""), 1) != 0 && fileSelectSpoilerFileLoaded) {
u16 xStart = 64;
for (unsigned int i = 0; i < 5; i++) {
SpriteLoad(this, GetSeedTexture(gSaveContext.seedIcons[i]));
@@ -1080,14 +1081,15 @@ void FileChoose_UpdateMainMenu(GameState* thisx) {
this->logoAlpha = 0;
} else if(!FileChoose_IsSaveCompatible(Save_GetSaveMetaInfo(this->buttonIndex))) {
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_ERROR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
- }
- else {
+ } else if (this->n64ddFlags[this->buttonIndex] == this->n64ddFlag) {
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_DECIDE_L, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
this->actionTimer = 8;
this->selectMode = SM_FADE_MAIN_TO_SELECT;
this->selectedFileIndex = this->buttonIndex;
this->menuMode = FS_MENU_MODE_SELECT;
this->nextTitleLabel = FS_TITLE_OPEN_FILE;
+ } else if (!this->n64ddFlags[this->buttonIndex]) {
+ Audio_PlaySoundGeneral(NA_SE_SY_FSEL_ERROR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
}
} else {
if (this->warningLabel == FS_WARNING_NONE) {
@@ -1263,16 +1265,16 @@ void FileChoose_UpdateQuestMenu(GameState* thisx) {
if (ABS(this->stickRelX) > 30 || (dpad && CHECK_BTN_ANY(input->press.button, BTN_DLEFT | BTN_DRIGHT))) {
if (this->stickRelX > 30 || (dpad && CHECK_BTN_ANY(input->press.button, BTN_DRIGHT))) {
this->questType[this->buttonIndex] += 1;
- while ((this->questType[this->buttonIndex] == FS_QUEST_MASTER && !ResourceMgr_GameHasMasterQuest()) ||
- (this->questType[this->buttonIndex] == FS_QUEST_RANDOMIZER && !hasRandomizerQuest())) {
+ while ((this->questType[this->buttonIndex] == QUEST_MASTER && !ResourceMgr_GameHasMasterQuest()) ||
+ (this->questType[this->buttonIndex] == QUEST_RANDOMIZER && !hasRandomizerQuest())) {
// If Master Quest is selected without a Master Quest OTR present or when Randomizer Quest is
// selected without a loaded Randomizer seed, skip past it.
this->questType[this->buttonIndex] += 1;
}
} else if (this->stickRelX < -30 || (dpad && CHECK_BTN_ANY(input->press.button, BTN_DLEFT))) {
this->questType[this->buttonIndex] -= 1;
- while ((this->questType[this->buttonIndex] == FS_QUEST_MASTER && !ResourceMgr_GameHasMasterQuest()) ||
- (this->questType[this->buttonIndex] == FS_QUEST_RANDOMIZER && !hasRandomizerQuest())) {
+ while ((this->questType[this->buttonIndex] == QUEST_MASTER && !ResourceMgr_GameHasMasterQuest()) ||
+ (this->questType[this->buttonIndex] == QUEST_RANDOMIZER && !hasRandomizerQuest())) {
// If Master Quest is selected without a Master Quest OTR present or when Randomizer Quest is
// selected without a loaded Randomizer seed, skip past it.
this->questType[this->buttonIndex] -= 1;
@@ -1292,20 +1294,18 @@ void FileChoose_UpdateQuestMenu(GameState* thisx) {
}
if (CHECK_BTN_ALL(input->press.button, BTN_A)) {
+ gSaveContext.questId = this->questType[this->buttonIndex];
- gSaveContext.isMasterQuest = this->questType[this->buttonIndex] == FS_QUEST_MASTER;
- gSaveContext.n64ddFlag = this->questType[this->buttonIndex] == FS_QUEST_RANDOMIZER;
- gSaveContext.isBossRush = this->questType[this->buttonIndex] == FS_QUEST_BOSSRUSH;
gSaveContext.isBossRushPaused = false;
- if (this->questType[this->buttonIndex] == FS_QUEST_BOSSRUSH) {
+ if (this->questType[this->buttonIndex] == QUEST_BOSSRUSH) {
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_DECIDE_L, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
this->prevConfigMode = this->configMode;
this->configMode = CM_ROTATE_TO_BOSS_RUSH_MENU;
return;
} else {
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_DECIDE_L, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
- osSyncPrintf("Selected Dungeon Quest: %d\n", gSaveContext.isMasterQuest);
+ osSyncPrintf("Selected Dungeon Quest: %d\n", IS_MASTER_QUEST);
this->prevConfigMode = this->configMode;
this->configMode = CM_ROTATE_TO_NAME_ENTRY;
this->logoAlpha = 0;
@@ -2217,7 +2217,7 @@ void FileChoose_DrawWindowContents(GameState* thisx) {
this->stickRightPrompt.stickColorA, this->stickRightPrompt.stickTexX,
this->stickRightPrompt.stickTexY, this->stickRightPrompt.z, 0, 0, 1.0f, 1.0f);
switch (this->questType[this->buttonIndex]) {
- case FS_QUEST_NORMAL:
+ case QUEST_NORMAL:
default:
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 255, this->logoAlpha);
FileChoose_DrawTextureI8(this->state.gfxCtx, gTitleTheLegendOfTextTex, 72, 8, 156, 108, 72, 8, 1024, 1024);
@@ -2225,7 +2225,7 @@ void FileChoose_DrawWindowContents(GameState* thisx) {
FileChoose_DrawImageRGBA32(this->state.gfxCtx, 160, 135, gTitleZeldaShieldLogoTex, 160, 160);
break;
- case FS_QUEST_MASTER:
+ case QUEST_MASTER:
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 255, this->logoAlpha);
FileChoose_DrawTextureI8(this->state.gfxCtx, gTitleTheLegendOfTextTex, 72, 8, 156, 108, 72, 8, 1024, 1024);
FileChoose_DrawTextureI8(this->state.gfxCtx, gTitleOcarinaOfTimeTMTextTex, 96, 8, 154, 163, 96, 8, 1024, 1024);
@@ -2233,7 +2233,7 @@ void FileChoose_DrawWindowContents(GameState* thisx) {
FileChoose_DrawImageRGBA32(this->state.gfxCtx, 182, 180, gTitleMasterQuestSubtitleTex, 128, 32);
break;
- case FS_QUEST_RANDOMIZER:
+ case QUEST_RANDOMIZER:
DrawSeedHashSprites(this);
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 255, this->logoAlpha);
FileChoose_DrawTextureI8(this->state.gfxCtx, gTitleTheLegendOfTextTex, 72, 8, 156, 108, 72, 8, 1024, 1024);
@@ -2242,7 +2242,7 @@ void FileChoose_DrawWindowContents(GameState* thisx) {
FileChoose_DrawImageRGBA32(this->state.gfxCtx, 182, 180, gTitleRandomizerSubtitleTex, 128, 32);
break;
- case FS_QUEST_BOSSRUSH:
+ case QUEST_BOSSRUSH:
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 255, this->logoAlpha);
FileChoose_DrawTextureI8(this->state.gfxCtx, gTitleTheLegendOfTextTex, 72, 8, 156, 108, 72, 8, 1024, 1024);
FileChoose_DrawTextureI8(this->state.gfxCtx, gTitleOcarinaOfTimeTMTextTex, 96, 8, 154, 163, 96, 8, 1024, 1024);
@@ -2354,7 +2354,7 @@ void FileChoose_DrawWindowContents(GameState* thisx) {
// draw file button
gSPVertex(POLY_OPA_DISP++, &this->windowContentVtx[temp], 20, 0);
- isActive = 0;
+ isActive = ((this->n64ddFlag == this->n64ddFlags[i]) || (this->nameBoxAlpha[i] == 0)) ? 0 : 1;
if (!FileChoose_IsSaveCompatible(Save_GetSaveMetaInfo(i)) && Save_GetSaveMetaInfo(i)->valid) {
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, sWindowContentColors[1][0], sWindowContentColors[1][1],
@@ -2385,6 +2385,16 @@ void FileChoose_DrawWindowContents(GameState* thisx) {
G_TX_NOLOD, G_TX_NOLOD);
gSP1Quadrangle(POLY_OPA_DISP++, 4, 6, 7, 5, 0);
+ // draw disk label for 64DD
+ if (this->n64ddFlags[i]) {
+ gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, sWindowContentColors[isActive][0], sWindowContentColors[isActive][1],
+ sWindowContentColors[isActive][2], this->nameBoxAlpha[i]);
+ gDPLoadTextureBlock(POLY_OPA_DISP++, gFileSelDISKButtonTex, G_IM_FMT_IA, G_IM_SIZ_16b, 44, 16, 0,
+ G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK,
+ G_TX_NOLOD, G_TX_NOLOD);
+ gSP1Quadrangle(POLY_OPA_DISP++, 8, 10, 11, 9, 0);
+ }
+
// draw rando label
if (Save_GetSaveMetaInfo(i)->randoSave) {
if (!FileChoose_IsSaveCompatible(Save_GetSaveMetaInfo(i))) {
@@ -2433,14 +2443,14 @@ void FileChoose_DrawWindowContents(GameState* thisx) {
G_TX_NOLOD, G_TX_NOLOD);
gSP1Quadrangle(POLY_OPA_DISP++, 12, 14, 15, 13, 0);
- if (Save_GetSaveMetaInfo(i)->randoSave || Save_GetSaveMetaInfo(i)->requiresMasterQuest) {
+ if (this->n64ddFlags[i] || Save_GetSaveMetaInfo(i)->randoSave || Save_GetSaveMetaInfo(i)->requiresMasterQuest) {
gSP1Quadrangle(POLY_OPA_DISP++, 16, 18, 19, 17, 0);
}
}
// draw file info
for (fileIndex = 0; fileIndex < 3; fileIndex++) {
- isActive = 0;
+ isActive = ((this->n64ddFlag == this->n64ddFlags[fileIndex]) || (this->nameBoxAlpha[fileIndex] == 0)) ? 0 : 1;
FileChoose_DrawFileInfo(&this->state, fileIndex, isActive);
}
@@ -2807,7 +2817,9 @@ void FileChoose_ConfirmFile(GameState* thisx) {
func_800AA000(300.0f, 180, 20, 100);
Audio_PlaySoundGeneral(NA_SE_SY_FSEL_DECIDE_L, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
// Reset Boss Rush because it's only ever saved in memory.
- gSaveContext.isBossRush = 0;
+ if (IS_BOSS_RUSH) {
+ gSaveContext.questId = 0;
+ }
this->selectMode = SM_FADE_OUT;
func_800F6964(0xF);
} else {
@@ -3017,7 +3029,7 @@ void FileChoose_LoadGame(GameState* thisx) {
}
}
- if (gSaveContext.n64ddFlag) {
+ if (IS_RANDO) {
// Setup the modified entrance table and entrance shuffle table for rando
Entrance_Init();
@@ -3221,6 +3233,8 @@ void FileChoose_Main(GameState* thisx) {
OPEN_DISPS(this->state.gfxCtx);
+ this->n64ddFlag = 0;
+
gSPSegment(POLY_OPA_DISP++, 0x00, NULL);
gSPSegment(POLY_OPA_DISP++, 0x01, this->staticSegment);
gSPSegment(POLY_OPA_DISP++, 0x02, this->parameterSegment);
@@ -3559,6 +3573,8 @@ void FileChoose_InitContext(GameState* thisx) {
for (int buttonIndex = 0; buttonIndex < ARRAY_COUNT(gSaveContext.buttonStatus); buttonIndex++) {
gSaveContext.buttonStatus[buttonIndex] = BTN_ENABLED;
}
+
+ this->n64ddFlags[0] = this->n64ddFlags[1] = this->n64ddFlags[2] = 0;
}
void FileChoose_Destroy(GameState* thisx) {
diff --git a/soh/src/overlays/gamestates/ovl_select/z_select.c b/soh/src/overlays/gamestates/ovl_select/z_select.c
index b4493854c..4453c8e58 100644
--- a/soh/src/overlays/gamestates/ovl_select/z_select.c
+++ b/soh/src/overlays/gamestates/ovl_select/z_select.c
@@ -39,7 +39,7 @@ void Select_LoadGame(SelectContext* this, s32 entranceIndex) {
gSaveContext.entranceIndex = entranceIndex;
// Check the entrance to see if the exit should be overriden to a grotto return point for entrance rando
- if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_ENTRANCES)) {
+ if (IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_ENTRANCES)) {
// Ignore return value as we want to load into the entrance specified by the debug menu
Grotto_OverrideSpecialEntrance(Entrance_GetOverride(entranceIndex));
}
@@ -103,7 +103,7 @@ void Select_Grotto_LoadGame(SelectContext* this, s32 grottoIndex) {
gSaveContext.respawn[RESPAWN_MODE_RETURN].pos = this->betterGrottos[grottoIndex].pos;
// Check the entrance to see if the exit should be overriden to a grotto return point for entrance rando
- if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_ENTRANCES)) {
+ if (IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_ENTRANCES)) {
// Use grotto content and parent scene num to identify the right grotto
s16 grottoEntrance = Grotto_GetRenamedGrottoIndexFromOriginal(this->betterGrottos[grottoIndex].data, this->betterGrottos[grottoIndex].exitScene);
// Ignore return value as we want to load into the entrance specified by the debug menu
@@ -523,7 +523,7 @@ static BetterSceneSelectEntry sBetterScenes[] = {
{ "Requiem of Spirit Warp", "Requiem der Geister Teleport", "Teleporteur du Requiem de l'Esprit", 0x01F1, 0 },
}},
{ "32:Deku Tree", "32:Deku-Baum", "32:Arbre Mojo", Select_LoadGame, 3, {
- { "Entrance", "Eingang", "Entree", 0x0001, 1 },
+ { "Entrance", "Eingang", "Entree", 0x0000, 1 },
{ "From Gohma's Lair", "Vom Gohma Kampf", "Depuis le Repaire de Gohma", 0x0252, 1 },
{ "Gohma's Lair", "Gohma Kampf", "Repaire de Gohma", 0x040F, 0 },
}},
diff --git a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_equipment.c b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_equipment.c
index aca82529c..dd6ea6a16 100644
--- a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_equipment.c
+++ b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_equipment.c
@@ -177,7 +177,7 @@ void KaleidoScope_DrawEquipment(PlayState* play) {
s16 cursorY;
s16 oldCursorPoint;
bool dpad = (CVarGetInteger("gDpadPause", 0) && !CHECK_BTN_ALL(input->cur.button, BTN_CUP));
- bool pauseAnyCursor = (CVarGetInteger("gPauseAnyCursor", 0) == PAUSE_ANY_CURSOR_RANDO_ONLY && gSaveContext.n64ddFlag) ||
+ bool pauseAnyCursor = (CVarGetInteger("gPauseAnyCursor", 0) == PAUSE_ANY_CURSOR_RANDO_ONLY && IS_RANDO) ||
(CVarGetInteger("gPauseAnyCursor", 0) == PAUSE_ANY_CURSOR_ALWAYS_ON);
OPEN_DISPS(play->state.gfxCtx);
@@ -481,7 +481,7 @@ void KaleidoScope_DrawEquipment(PlayState* play) {
}
if (pauseCtx->cursorItem[PAUSE_EQUIP] == ITEM_BRACELET) {
- if (LINK_AGE_IN_YEARS == YEARS_CHILD || gSaveContext.n64ddFlag) {
+ if (LINK_AGE_IN_YEARS == YEARS_CHILD || IS_RANDO) {
pauseCtx->nameColorSet = 0;
} else {
pauseCtx->nameColorSet = 1;
@@ -690,7 +690,7 @@ void KaleidoScope_DrawEquipment(PlayState* play) {
} else if (CUR_UPG_VALUE(sAdultUpgrades[i]) != 0) {
if (drawGreyItems &&
((sAdultUpgradeItemBases[i] + CUR_UPG_VALUE(sAdultUpgrades[i]) - 1) == ITEM_BRACELET &&
- !(gSaveContext.n64ddFlag))) { // Grey Out the Goron Bracelet when Not Randomized
+ !(IS_RANDO))) { // Grey Out the Goron Bracelet when Not Randomized
gDPSetGrayscaleColor(POLY_KAL_DISP++, 109, 109, 109, 255);
gSPGrayscale(POLY_KAL_DISP++, true);
}
diff --git a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_item.c b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_item.c
index 19bda2fed..54b0abab3 100644
--- a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_item.c
+++ b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_item.c
@@ -237,7 +237,7 @@ void KaleidoScope_DrawItemSelect(PlayState* play) {
s16 oldCursorPoint;
s16 moveCursorResult;
bool dpad = (CVarGetInteger("gDpadPause", 0) && !CHECK_BTN_ALL(input->cur.button, BTN_CUP));
- bool pauseAnyCursor = (CVarGetInteger("gPauseAnyCursor", 0) == PAUSE_ANY_CURSOR_RANDO_ONLY && gSaveContext.n64ddFlag) ||
+ bool pauseAnyCursor = (CVarGetInteger("gPauseAnyCursor", 0) == PAUSE_ANY_CURSOR_RANDO_ONLY && IS_RANDO) ||
(CVarGetInteger("gPauseAnyCursor", 0) == PAUSE_ANY_CURSOR_ALWAYS_ON);
// only allow mask select when:
@@ -543,7 +543,7 @@ void KaleidoScope_DrawItemSelect(PlayState* play) {
? 9
: 1;
}
- if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_ADULT_TRADE) &&
+ if (IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_ADULT_TRADE) &&
cursorSlot == SLOT_TRADE_ADULT && CHECK_BTN_ALL(input->press.button, BTN_A)) {
Audio_PlaySoundGeneral(NA_SE_SY_DECIDE, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
gSelectingAdultTrade = !gSelectingAdultTrade;
@@ -680,7 +680,7 @@ void KaleidoScope_DrawItemSelect(PlayState* play) {
// Adult trade item cycle
KaleidoScope_DrawItemCycleExtras(play, SLOT_TRADE_ADULT, gSelectingAdultTrade,
- gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_ADULT_TRADE),
+ IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_ADULT_TRADE),
Randomizer_GetPrevAdultTradeItem(), Randomizer_GetNextAdultTradeItem());
// Child mask item cycle (mimics the left/right item behavior from the cycling logic above)
u8 childTradeItem = INV_CONTENT(ITEM_TRADE_CHILD);
diff --git a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope_PAL.c b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope_PAL.c
index 3476020c2..284f65e69 100644
--- a/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope_PAL.c
+++ b/soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_scope_PAL.c
@@ -1514,7 +1514,7 @@ void KaleidoScope_DrawPages(PlayState* play, GraphicsContext* gfxCtx) {
gDPSetCombineMode(POLY_KAL_DISP++, G_CC_MODULATEIA, G_CC_MODULATEIA);
gDPSetPrimColor(POLY_KAL_DISP++, 0, 0, 255, 255, 255, pauseCtx->alpha);
- if (!gSaveContext.isBossRush) {
+ if (!IS_BOSS_RUSH) {
POLY_KAL_DISP = KaleidoScope_QuadTextureIA8(
POLY_KAL_DISP, sPromptChoiceTexs[gSaveContext.language][0], 48, 16, 12);
} else {
@@ -1928,7 +1928,7 @@ void KaleidoScope_DrawInfoPanel(PlayState* play) {
}
} else {
bool pauseAnyCursor =
- (CVarGetInteger("gPauseAnyCursor", 0) == PAUSE_ANY_CURSOR_RANDO_ONLY && gSaveContext.n64ddFlag) ||
+ (CVarGetInteger("gPauseAnyCursor", 0) == PAUSE_ANY_CURSOR_RANDO_ONLY && IS_RANDO) ||
(CVarGetInteger("gPauseAnyCursor", 0) == PAUSE_ANY_CURSOR_ALWAYS_ON);
if (!pauseCtx->pageIndex && (!pauseAnyCursor || (gSaveContext.inventory.items[pauseCtx->cursorPoint[PAUSE_ITEM]] != ITEM_NONE))) { // pageIndex == PAUSE_ITEM
pauseCtx->infoPanelVtx[16].v.ob[0] = pauseCtx->infoPanelVtx[18].v.ob[0] =
@@ -2066,7 +2066,7 @@ void KaleidoScope_DrawInfoPanel(PlayState* play) {
void KaleidoScope_UpdateNamePanel(PlayState* play) {
PauseContext* pauseCtx = &play->pauseCtx;
u16 sp2A;
- bool pauseAnyCursor = (CVarGetInteger("gPauseAnyCursor", 0) == PAUSE_ANY_CURSOR_RANDO_ONLY && gSaveContext.n64ddFlag) ||
+ bool pauseAnyCursor = (CVarGetInteger("gPauseAnyCursor", 0) == PAUSE_ANY_CURSOR_RANDO_ONLY && IS_RANDO) ||
(CVarGetInteger("gPauseAnyCursor", 0) == PAUSE_ANY_CURSOR_ALWAYS_ON);
if ((pauseCtx->namedItem != pauseCtx->cursorItem[pauseCtx->pageIndex]) ||
@@ -3651,7 +3651,7 @@ void KaleidoScope_Update(PlayState* play)
case 0:
// Boss Rush skips past the "Save?" window when pressing B while paused.
if (CHECK_BTN_ALL(input->press.button, BTN_START) ||
- (CHECK_BTN_ALL(input->press.button, BTN_B) && gSaveContext.isBossRush)) {
+ (CHECK_BTN_ALL(input->press.button, BTN_B) && IS_BOSS_RUSH)) {
if (CVarGetInteger("gCheatEasyPauseBufferEnabled", 0) || CVarGetInteger("gCheatEasyInputBufferingEnabled", 0)) {
// Easy pause buffer is 13 frames, 12 for kaledio to end, and one more to advance a single frame
CVarSetInteger("gCheatEasyPauseBufferTimer", 13);
@@ -4035,7 +4035,7 @@ void KaleidoScope_Update(PlayState* play)
VREG(88) = 66;
WREG(2) = 0;
pauseCtx->alpha = 255;
- if (!gSaveContext.isBossRush) {
+ if (!IS_BOSS_RUSH) {
pauseCtx->state = 0xE;
} else {
pauseCtx->state = 0xF;
@@ -4083,7 +4083,7 @@ void KaleidoScope_Update(PlayState* play)
case 0x10:
if (CHECK_BTN_ALL(input->press.button, BTN_A) || CHECK_BTN_ALL(input->press.button, BTN_START)) {
- if (pauseCtx->promptChoice == 0 && !gSaveContext.isBossRush) {
+ if (pauseCtx->promptChoice == 0 && !IS_BOSS_RUSH) {
Audio_PlaySoundGeneral(NA_SE_SY_PIECE_OF_HEART, &D_801333D4, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
Play_SaveSceneFlags(play);
@@ -4135,7 +4135,7 @@ void KaleidoScope_Update(PlayState* play)
}
// In ER, handle overriding the game over respawn entrance
- if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_ENTRANCES)) {
+ if (IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_ENTRANCES)) {
Entrance_SetGameOverEntrance();
}
} else {
@@ -4156,11 +4156,11 @@ void KaleidoScope_Update(PlayState* play)
R_PAUSE_MENU_MODE = 0;
func_800981B8(&play->objectCtx);
func_800418D0(&play->colCtx, play);
- if (pauseCtx->promptChoice == 0 && !gSaveContext.isBossRush) {
+ if (pauseCtx->promptChoice == 0 && !IS_BOSS_RUSH) {
Play_TriggerRespawn(play);
gSaveContext.respawnFlag = -2;
// In ER, handle death warp to last entrance from grottos
- if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_ENTRANCES)) {
+ if (IS_RANDO && Randomizer_GetSettingValue(RSK_SHUFFLE_ENTRANCES)) {
Grotto_ForceGrottoReturn();
}
gSaveContext.nextTransitionType = 2;
@@ -4180,7 +4180,9 @@ void KaleidoScope_Update(PlayState* play)
osSyncPrintf(VT_RST);
} else {
play->state.running = 0;
- gSaveContext.isBossRush = false;
+ if (IS_BOSS_RUSH) {
+ gSaveContext.questId = 0;
+ }
SET_NEXT_GAMESTATE(&play->state, Opening_Init, OpeningContext);
GameInteractor_ExecuteOnExitGame(gSaveContext.fileNum);
}