summaryrefslogtreecommitdiff
path: root/soh/src/code
diff options
context:
space:
mode:
authorJordan Gilbreath <3819183+jordanpg@users.noreply.github.com>2024-01-14 12:02:23 -0500
committerGitHub <noreply@github.com>2024-01-14 11:02:23 -0600
commit4cbf3a562130cdc36f66b558ee98c43dd7e49a61 (patch)
tree68ebc4d6f99df8efe65db567f99e58bef18e603c /soh/src/code
parenteb5f7688f8d855e19e76728f0d317abefb562434 (diff)
Fishsanity - Rando v3 (#3738)
* Update z_fishing documentation from decomp * undo sCameraAt/Eye rename * forgot to include these defines Heehee * adding enums, settings * adding more stuff back in * more work * we're literally typing words into computer * include unordered map maybe this fixes mac build idk * wahoo * hmm * add make sure disabled flag gets popped * poggers in the chat? * doing some refactoring * fixing build * documentation, moving fishsanity instance to rando * move FS back to context, fixing build, mod progress since FS is needed during rando generation & provides perpetual info abt. fishsanity in the seed, seems to make more sense if it lives on the context * moving some stuff around * it's starting to get real in here * ELIMINATE FISHSANITYMETA * IT WROKS * Update trackers, fix pond fish flagging * ZD fish shuffle initial checkpoint * ZD fish "working" aside from the crashing * wrapping up * fix for partial pond shuffle * remove misc. unrelated debugconsole modification * updating GI model * get build working * add a todo for this * removeoopsie * Rework hints a bit * update hint loc * Use visual indicator instead of despawning caught fish --------- Co-authored-by: jordanpg <jordanpg@users.noreply.github.com>
Diffstat (limited to 'soh/src/code')
-rw-r--r--soh/src/code/z_draw.c56
-rw-r--r--soh/src/code/z_parameter.c5
2 files changed, 60 insertions, 1 deletions
diff --git a/soh/src/code/z_draw.c b/soh/src/code/z_draw.c
index e9ab95398..8dcd847ec 100644
--- a/soh/src/code/z_draw.c
+++ b/soh/src/code/z_draw.c
@@ -76,6 +76,7 @@
#include "objects/object_gi_dekupouch/object_gi_dekupouch.h"
#include "objects/object_gi_rupy/object_gi_rupy.h"
#include "objects/object_gi_sword_1/object_gi_sword_1.h"
+#include "objects/object_fish/object_fish.h"
#include "objects/object_st/object_st.h"
#include "soh_assets.h"
@@ -113,6 +114,7 @@ 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);
+void GetItem_DrawFishingPole(PlayState* play, s16 drawId);
typedef struct {
/* 0x00 */ void (*drawFunc)(PlayState*, s16);
@@ -388,7 +390,8 @@ DrawItemTableEntry sDrawItemTable[] = {
{ GetItem_DrawGenericMusicNote, { gGiSongNoteDL } }, //Sun's song
{ GetItem_DrawGenericMusicNote, { gGiSongNoteDL } }, //Song of time
{ GetItem_DrawGenericMusicNote, { gGiSongNoteDL } }, //Song of storms
- { GetItem_DrawTriforcePiece, { gTriforcePiece0DL } } // Triforce Piece
+ { GetItem_DrawTriforcePiece, { gTriforcePiece0DL } }, // Triforce Piece
+ { GetItem_DrawFishingPole, { gFishingPoleGiDL } }, // Fishing Pole
};
/**
@@ -1065,3 +1068,54 @@ void GetItem_DrawTriforcePiece(PlayState* play, s16 drawId) {
CLOSE_DISPS(play->state.gfxCtx);
}
+
+void GetItem_DrawFishingPole(PlayState* play, s16 drawId) {
+ Vec3f pos;
+ OPEN_DISPS(play->state.gfxCtx);
+
+ // Draw rod
+ Gfx_SetupDL_25Opa(play->state.gfxCtx);
+ Matrix_Scale(0.2, 0.2, 0.2, MTXMODE_APPLY);
+ gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx, (char*)__FILE__, __LINE__),
+ G_MTX_MODELVIEW | G_MTX_LOAD);
+ gSPDisplayList(POLY_OPA_DISP++, (Gfx*)gFishingPoleGiDL);
+
+ // Draw lure
+ Matrix_Push();
+ Matrix_Scale(5.0f, 5.0f, 5.0f, MTXMODE_APPLY);
+ pos.x = 0.0f;
+ pos.y = -25.5f;
+ pos.z = -4.0f;
+ Matrix_Translate(pos.x, pos.y, pos.z, MTXMODE_APPLY);
+ Matrix_RotateZ(M_PI / -2, MTXMODE_APPLY);
+ Matrix_RotateY((M_PI / -2) - 0.2f, MTXMODE_APPLY);
+ Matrix_Scale(0.006f, 0.006f, 0.006f, MTXMODE_APPLY);
+ Gfx_SetupDL_25Opa(play->state.gfxCtx);
+ gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx, (char*)__FILE__, __LINE__),
+ G_MTX_NOPUSH | G_MTX_MODELVIEW | G_MTX_LOAD);
+ gSPDisplayList(POLY_OPA_DISP++, (Gfx*)gFishingLureFloatDL);
+
+ // Draw hooks
+ Matrix_RotateY(0.2f, MTXMODE_APPLY);
+ Matrix_Translate(0.0f, 0.0f, -300.0f, MTXMODE_APPLY);
+ gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx, (char*)__FILE__, __LINE__),
+ G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
+ gSPDisplayList(POLY_OPA_DISP++, (Gfx*)gFishingLureHookDL);
+ Matrix_RotateZ(M_PI / 2, MTXMODE_APPLY);
+ gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx, (char*)__FILE__, __LINE__),
+ G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
+ gSPDisplayList(POLY_OPA_DISP++, (Gfx*)gFishingLureHookDL);
+
+ Matrix_Translate(0.0f, -2200.0f, 700.0f, MTXMODE_APPLY);
+ gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx, (char*)__FILE__, __LINE__),
+ G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
+ gSPDisplayList(POLY_OPA_DISP++, (Gfx*)gFishingLureHookDL);
+ Matrix_RotateZ(M_PI / 2, MTXMODE_APPLY);
+ gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx, (char*)__FILE__, __LINE__),
+ G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
+ gSPDisplayList(POLY_OPA_DISP++, (Gfx*)gFishingLureHookDL);
+
+ Matrix_Pop();
+
+ CLOSE_DISPS(play->state.gfxCtx);
+} \ No newline at end of file
diff --git a/soh/src/code/z_parameter.c b/soh/src/code/z_parameter.c
index 141dbaf6a..7abc2b151 100644
--- a/soh/src/code/z_parameter.c
+++ b/soh/src/code/z_parameter.c
@@ -2644,6 +2644,11 @@ u16 Randomizer_Item_Give(PlayState* play, GetItemEntry giEntry) {
return Return_Item_Entry(giEntry, RG_NONE);
}
+ if (item == RG_FISHING_POLE) {
+ Flags_SetRandomizerInf(RAND_INF_FISHING_POLE_FOUND);
+ 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;