mirror of
https://github.com/izzy2lost/2ship2harkinian-Android.git
synced 2026-06-19 01:20:08 -07:00
Document EnSyatekiOkuta (Shooting Gallery Octorok) (#1287)
* Initial docs * Tons of stuff done * Fix spacing thing now that the function is actually named * Temporarily add un-macro'd flags as comment * Name and document EnSyatekiOkuta_IsHiddenByAnotherOctorok * Finish naming all functions * Better macros + explanations * Comments on a lot of functions * Some stuff I was supposed to revert * Fix merge issue * Another merge fix * Make data static + move it in-function * Respond to engineer's review * circleOrCrossAlpha -> hitResultAlpha * Respond to more of engineer's feedback * octorokHitType -> lastHitOctorokType * Animation enum stuff
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
<!-- Textures and DisplayLists for the cross and circle indicators that appear when you shoot an Octorok -->
|
||||
<Texture Name="gShootingGalleryOctorokCrossTex" OutName="shooting_gallery_octorok_cross" Format="ia16" Width="16" Height="16" Offset="0x1658"/>
|
||||
<Texture Name="gShootingGalleryOctorokCircleTex" OutName="shooting_gallery_octorok_circle" Format="ia16" Width="16" Height="16" Offset="0x1858"/>
|
||||
<DList Name="gShootingGalleryOctorokCrossDL" Offset="0x1A98"/>
|
||||
<DList Name="gShootingGalleryOctorokCircleDL" Offset="0x1B18"/>
|
||||
<DList Name="gShootingGalleryOctorokCrossDL" Offset="0x1A98"/> <!-- Original name is "okuta_peke_model" ("peke" = "x (mark); cross") -->
|
||||
<DList Name="gShootingGalleryOctorokCircleDL" Offset="0x1B18"/> <!-- Original name is "okuta_maru_model" ("maru" = "circle") -->
|
||||
</File>
|
||||
</Root>
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include "z_en_syateki_man.h"
|
||||
#include "overlays/actors/ovl_En_Syateki_Crow/z_en_syateki_crow.h"
|
||||
#include "overlays/actors/ovl_En_Syateki_Dekunuts/z_en_syateki_dekunuts.h"
|
||||
#include "overlays/actors/ovl_En_Syateki_Okuta/z_en_syateki_okuta.h"
|
||||
#include "overlays/actors/ovl_En_Syateki_Wf/z_en_syateki_wf.h"
|
||||
|
||||
#define FLAGS (ACTOR_FLAG_1 | ACTOR_FLAG_8 | ACTOR_FLAG_10 | ACTOR_FLAG_CANT_LOCK_ON)
|
||||
@@ -49,15 +50,10 @@ void EnSyatekiMan_Town_EndGame(EnSyatekiMan* this, PlayState* play);
|
||||
#define TALK_FLAG_SWAMP_HAS_SPOKEN_WITH_HUMAN (1 << 0)
|
||||
#define TALK_FLAG_SWAMP_HAS_EXPLAINED_THE_RULES (1 << 1)
|
||||
|
||||
#define OCTOROK_FLAG(color, row, column) (1 << ((row * 6) + (column * 2) + color))
|
||||
#define COLOR_RED 0
|
||||
#define COLOR_BLUE 1
|
||||
#define ROW_BACK 0
|
||||
#define ROW_CENTER 1
|
||||
#define ROW_FRONT 2
|
||||
#define COLUMN_LEFT 0
|
||||
#define COLUMN_CENTER 1
|
||||
#define COLUMN_RIGHT 2
|
||||
#define OCTO_FLAGS(type0, type1, type2, type3, type4, type5, type6, type7, type8) \
|
||||
(SG_OCTO_SET_FLAG(type0, 0) | SG_OCTO_SET_FLAG(type1, 1) | SG_OCTO_SET_FLAG(type2, 2) | \
|
||||
SG_OCTO_SET_FLAG(type3, 3) | SG_OCTO_SET_FLAG(type4, 4) | SG_OCTO_SET_FLAG(type5, 5) | \
|
||||
SG_OCTO_SET_FLAG(type6, 6) | SG_OCTO_SET_FLAG(type7, 7) | SG_OCTO_SET_FLAG(type8, 8))
|
||||
|
||||
ActorInit En_Syateki_Man_InitVars = {
|
||||
ACTOR_EN_SYATEKI_MAN,
|
||||
@@ -201,7 +197,7 @@ void EnSyatekiMan_Init(Actor* thisx, PlayState* play) {
|
||||
this->shootingGameState = SG_GAME_STATE_NONE;
|
||||
this->talkWaitTimer = 15;
|
||||
this->flagsIndex = 0;
|
||||
this->perGameVar2.octorokHitType = SG_OCTO_HIT_TYPE_NONE;
|
||||
this->perGameVar2.lastHitOctorokType = SG_OCTO_TYPE_NONE;
|
||||
this->octorokFlags = 0;
|
||||
this->dekuScrubFlags = 0;
|
||||
this->guayFlags = 0;
|
||||
@@ -1227,7 +1223,7 @@ void EnSyatekiMan_Town_StartGame(EnSyatekiMan* this, PlayState* play) {
|
||||
this->score = 0;
|
||||
this->flagsIndex = 0;
|
||||
this->perGameVar1.octorokState = SG_OCTO_STATE_INITIAL;
|
||||
this->perGameVar2.octorokHitType = SG_OCTO_HIT_TYPE_NONE;
|
||||
this->perGameVar2.lastHitOctorokType = SG_OCTO_TYPE_NONE;
|
||||
sGameStartTimer = 30;
|
||||
Interface_StartTimer(TIMER_ID_MINIGAME_1, 75);
|
||||
this->actor.draw = NULL;
|
||||
@@ -1240,62 +1236,67 @@ void EnSyatekiMan_Town_StartGame(EnSyatekiMan* this, PlayState* play) {
|
||||
* For each wave, these flags are used to control which Octoroks appear.
|
||||
*/
|
||||
static const s32 sOctorokFlagsPerWave[] = {
|
||||
OCTOROK_FLAG(COLOR_RED, ROW_CENTER, COLUMN_CENTER) | OCTOROK_FLAG(COLOR_RED, ROW_BACK, COLUMN_RIGHT) |
|
||||
OCTOROK_FLAG(COLOR_RED, ROW_BACK, COLUMN_LEFT),
|
||||
// clang-format off
|
||||
OCTO_FLAGS(SG_OCTO_TYPE_RED, SG_OCTO_TYPE_NONE, SG_OCTO_TYPE_RED,
|
||||
SG_OCTO_TYPE_NONE, SG_OCTO_TYPE_RED, SG_OCTO_TYPE_NONE,
|
||||
SG_OCTO_TYPE_NONE, SG_OCTO_TYPE_NONE, SG_OCTO_TYPE_NONE),
|
||||
|
||||
OCTOROK_FLAG(COLOR_RED, ROW_CENTER, COLUMN_RIGHT) | OCTOROK_FLAG(COLOR_BLUE, ROW_CENTER, COLUMN_CENTER) |
|
||||
OCTOROK_FLAG(COLOR_RED, ROW_CENTER, COLUMN_LEFT) | OCTOROK_FLAG(COLOR_RED, ROW_BACK, COLUMN_RIGHT),
|
||||
OCTO_FLAGS(SG_OCTO_TYPE_NONE, SG_OCTO_TYPE_NONE, SG_OCTO_TYPE_RED,
|
||||
SG_OCTO_TYPE_RED, SG_OCTO_TYPE_BLUE, SG_OCTO_TYPE_RED,
|
||||
SG_OCTO_TYPE_NONE, SG_OCTO_TYPE_NONE, SG_OCTO_TYPE_NONE),
|
||||
|
||||
OCTOROK_FLAG(COLOR_RED, ROW_FRONT, COLUMN_RIGHT) | OCTOROK_FLAG(COLOR_BLUE, ROW_BACK, COLUMN_RIGHT) |
|
||||
OCTOROK_FLAG(COLOR_RED, ROW_BACK, COLUMN_CENTER) | OCTOROK_FLAG(COLOR_RED, ROW_BACK, COLUMN_LEFT),
|
||||
OCTO_FLAGS(SG_OCTO_TYPE_RED, SG_OCTO_TYPE_RED, SG_OCTO_TYPE_BLUE,
|
||||
SG_OCTO_TYPE_NONE, SG_OCTO_TYPE_NONE, SG_OCTO_TYPE_NONE,
|
||||
SG_OCTO_TYPE_NONE, SG_OCTO_TYPE_NONE, SG_OCTO_TYPE_RED),
|
||||
|
||||
OCTOROK_FLAG(COLOR_RED, ROW_FRONT, COLUMN_RIGHT) | OCTOROK_FLAG(COLOR_RED, ROW_FRONT, COLUMN_LEFT) |
|
||||
OCTOROK_FLAG(COLOR_RED, ROW_BACK, COLUMN_RIGHT) | OCTOROK_FLAG(COLOR_RED, ROW_BACK, COLUMN_LEFT),
|
||||
OCTO_FLAGS(SG_OCTO_TYPE_RED, SG_OCTO_TYPE_NONE, SG_OCTO_TYPE_RED,
|
||||
SG_OCTO_TYPE_NONE, SG_OCTO_TYPE_NONE, SG_OCTO_TYPE_NONE,
|
||||
SG_OCTO_TYPE_RED, SG_OCTO_TYPE_NONE, SG_OCTO_TYPE_RED),
|
||||
|
||||
OCTOROK_FLAG(COLOR_BLUE, ROW_CENTER, COLUMN_RIGHT) | OCTOROK_FLAG(COLOR_RED, ROW_CENTER, COLUMN_CENTER) |
|
||||
OCTOROK_FLAG(COLOR_BLUE, ROW_CENTER, COLUMN_LEFT) | OCTOROK_FLAG(COLOR_RED, ROW_BACK, COLUMN_CENTER),
|
||||
OCTO_FLAGS(SG_OCTO_TYPE_NONE, SG_OCTO_TYPE_RED, SG_OCTO_TYPE_NONE,
|
||||
SG_OCTO_TYPE_BLUE, SG_OCTO_TYPE_RED, SG_OCTO_TYPE_BLUE,
|
||||
SG_OCTO_TYPE_NONE, SG_OCTO_TYPE_NONE, SG_OCTO_TYPE_NONE),
|
||||
|
||||
OCTOROK_FLAG(COLOR_RED, ROW_FRONT, COLUMN_CENTER) | OCTOROK_FLAG(COLOR_RED, ROW_CENTER, COLUMN_LEFT) |
|
||||
OCTOROK_FLAG(COLOR_RED, ROW_BACK, COLUMN_RIGHT),
|
||||
OCTO_FLAGS(SG_OCTO_TYPE_NONE, SG_OCTO_TYPE_NONE, SG_OCTO_TYPE_RED,
|
||||
SG_OCTO_TYPE_RED, SG_OCTO_TYPE_NONE, SG_OCTO_TYPE_NONE,
|
||||
SG_OCTO_TYPE_NONE, SG_OCTO_TYPE_RED, SG_OCTO_TYPE_NONE),
|
||||
|
||||
OCTOROK_FLAG(COLOR_RED, ROW_FRONT, COLUMN_RIGHT) | OCTOROK_FLAG(COLOR_BLUE, ROW_CENTER, COLUMN_CENTER) |
|
||||
OCTOROK_FLAG(COLOR_RED, ROW_BACK, COLUMN_RIGHT) | OCTOROK_FLAG(COLOR_RED, ROW_BACK, COLUMN_LEFT),
|
||||
OCTO_FLAGS(SG_OCTO_TYPE_RED, SG_OCTO_TYPE_NONE, SG_OCTO_TYPE_RED,
|
||||
SG_OCTO_TYPE_NONE, SG_OCTO_TYPE_BLUE, SG_OCTO_TYPE_NONE,
|
||||
SG_OCTO_TYPE_NONE, SG_OCTO_TYPE_NONE, SG_OCTO_TYPE_RED),
|
||||
|
||||
OCTOROK_FLAG(COLOR_BLUE, ROW_FRONT, COLUMN_RIGHT) | OCTOROK_FLAG(COLOR_BLUE, ROW_FRONT, COLUMN_LEFT) |
|
||||
OCTOROK_FLAG(COLOR_RED, ROW_BACK, COLUMN_RIGHT) | OCTOROK_FLAG(COLOR_RED, ROW_BACK, COLUMN_CENTER) |
|
||||
OCTOROK_FLAG(COLOR_RED, ROW_BACK, COLUMN_LEFT),
|
||||
OCTO_FLAGS(SG_OCTO_TYPE_RED, SG_OCTO_TYPE_RED, SG_OCTO_TYPE_RED,
|
||||
SG_OCTO_TYPE_NONE, SG_OCTO_TYPE_NONE, SG_OCTO_TYPE_NONE,
|
||||
SG_OCTO_TYPE_BLUE, SG_OCTO_TYPE_NONE, SG_OCTO_TYPE_BLUE),
|
||||
|
||||
OCTOROK_FLAG(COLOR_BLUE, ROW_FRONT, COLUMN_RIGHT) | OCTOROK_FLAG(COLOR_RED, ROW_FRONT, COLUMN_CENTER) |
|
||||
OCTOROK_FLAG(COLOR_BLUE, ROW_FRONT, COLUMN_LEFT) | OCTOROK_FLAG(COLOR_BLUE, ROW_CENTER, COLUMN_RIGHT) |
|
||||
OCTOROK_FLAG(COLOR_RED, ROW_CENTER, COLUMN_CENTER) | OCTOROK_FLAG(COLOR_BLUE, ROW_CENTER, COLUMN_LEFT) |
|
||||
OCTOROK_FLAG(COLOR_RED, ROW_BACK, COLUMN_CENTER),
|
||||
OCTO_FLAGS(SG_OCTO_TYPE_NONE, SG_OCTO_TYPE_RED, SG_OCTO_TYPE_NONE,
|
||||
SG_OCTO_TYPE_BLUE, SG_OCTO_TYPE_RED, SG_OCTO_TYPE_BLUE,
|
||||
SG_OCTO_TYPE_BLUE, SG_OCTO_TYPE_RED, SG_OCTO_TYPE_BLUE),
|
||||
|
||||
OCTOROK_FLAG(COLOR_RED, ROW_FRONT, COLUMN_RIGHT) | OCTOROK_FLAG(COLOR_BLUE, ROW_FRONT, COLUMN_LEFT) |
|
||||
OCTOROK_FLAG(COLOR_BLUE, ROW_CENTER, COLUMN_RIGHT) | OCTOROK_FLAG(COLOR_RED, ROW_CENTER, COLUMN_LEFT) |
|
||||
OCTOROK_FLAG(COLOR_RED, ROW_BACK, COLUMN_RIGHT) | OCTOROK_FLAG(COLOR_BLUE, ROW_BACK, COLUMN_LEFT),
|
||||
OCTO_FLAGS(SG_OCTO_TYPE_BLUE, SG_OCTO_TYPE_NONE, SG_OCTO_TYPE_RED,
|
||||
SG_OCTO_TYPE_RED, SG_OCTO_TYPE_NONE, SG_OCTO_TYPE_BLUE,
|
||||
SG_OCTO_TYPE_BLUE, SG_OCTO_TYPE_NONE, SG_OCTO_TYPE_RED),
|
||||
|
||||
OCTOROK_FLAG(COLOR_RED, ROW_FRONT, COLUMN_RIGHT) | OCTOROK_FLAG(COLOR_RED, ROW_FRONT, COLUMN_LEFT) |
|
||||
OCTOROK_FLAG(COLOR_BLUE, ROW_CENTER, COLUMN_RIGHT) | OCTOROK_FLAG(COLOR_RED, ROW_CENTER, COLUMN_CENTER) |
|
||||
OCTOROK_FLAG(COLOR_BLUE, ROW_CENTER, COLUMN_LEFT) | OCTOROK_FLAG(COLOR_RED, ROW_BACK, COLUMN_RIGHT) |
|
||||
OCTOROK_FLAG(COLOR_BLUE, ROW_BACK, COLUMN_CENTER) | OCTOROK_FLAG(COLOR_RED, ROW_BACK, COLUMN_LEFT),
|
||||
OCTO_FLAGS(SG_OCTO_TYPE_RED, SG_OCTO_TYPE_BLUE, SG_OCTO_TYPE_RED,
|
||||
SG_OCTO_TYPE_BLUE, SG_OCTO_TYPE_RED, SG_OCTO_TYPE_BLUE,
|
||||
SG_OCTO_TYPE_RED, SG_OCTO_TYPE_NONE, SG_OCTO_TYPE_RED),
|
||||
|
||||
OCTOROK_FLAG(COLOR_BLUE, ROW_FRONT, COLUMN_RIGHT) | OCTOROK_FLAG(COLOR_BLUE, ROW_FRONT, COLUMN_LEFT) |
|
||||
OCTOROK_FLAG(COLOR_BLUE, ROW_CENTER, COLUMN_RIGHT) | OCTOROK_FLAG(COLOR_BLUE, ROW_CENTER, COLUMN_LEFT) |
|
||||
OCTOROK_FLAG(COLOR_RED, ROW_BACK, COLUMN_RIGHT) | OCTOROK_FLAG(COLOR_RED, ROW_BACK, COLUMN_CENTER) |
|
||||
OCTOROK_FLAG(COLOR_RED, ROW_BACK, COLUMN_LEFT),
|
||||
OCTO_FLAGS(SG_OCTO_TYPE_RED, SG_OCTO_TYPE_RED, SG_OCTO_TYPE_RED,
|
||||
SG_OCTO_TYPE_BLUE, SG_OCTO_TYPE_NONE, SG_OCTO_TYPE_BLUE,
|
||||
SG_OCTO_TYPE_BLUE, SG_OCTO_TYPE_NONE, SG_OCTO_TYPE_BLUE),
|
||||
|
||||
OCTOROK_FLAG(COLOR_RED, ROW_CENTER, COLUMN_RIGHT) | OCTOROK_FLAG(COLOR_RED, ROW_CENTER, COLUMN_CENTER) |
|
||||
OCTOROK_FLAG(COLOR_RED, ROW_CENTER, COLUMN_LEFT) | OCTOROK_FLAG(COLOR_BLUE, ROW_BACK, COLUMN_RIGHT) |
|
||||
OCTOROK_FLAG(COLOR_BLUE, ROW_BACK, COLUMN_CENTER) | OCTOROK_FLAG(COLOR_BLUE, ROW_BACK, COLUMN_LEFT),
|
||||
OCTO_FLAGS(SG_OCTO_TYPE_BLUE, SG_OCTO_TYPE_BLUE, SG_OCTO_TYPE_BLUE,
|
||||
SG_OCTO_TYPE_RED, SG_OCTO_TYPE_RED, SG_OCTO_TYPE_RED,
|
||||
SG_OCTO_TYPE_NONE, SG_OCTO_TYPE_NONE, SG_OCTO_TYPE_NONE),
|
||||
|
||||
OCTOROK_FLAG(COLOR_BLUE, ROW_FRONT, COLUMN_RIGHT) | OCTOROK_FLAG(COLOR_BLUE, ROW_FRONT, COLUMN_CENTER) |
|
||||
OCTOROK_FLAG(COLOR_BLUE, ROW_FRONT, COLUMN_LEFT) | OCTOROK_FLAG(COLOR_RED, ROW_CENTER, COLUMN_RIGHT) |
|
||||
OCTOROK_FLAG(COLOR_RED, ROW_CENTER, COLUMN_LEFT) | OCTOROK_FLAG(COLOR_RED, ROW_BACK, COLUMN_RIGHT) |
|
||||
OCTOROK_FLAG(COLOR_RED, ROW_BACK, COLUMN_LEFT),
|
||||
OCTO_FLAGS(SG_OCTO_TYPE_RED, SG_OCTO_TYPE_NONE, SG_OCTO_TYPE_RED,
|
||||
SG_OCTO_TYPE_RED, SG_OCTO_TYPE_NONE, SG_OCTO_TYPE_RED,
|
||||
SG_OCTO_TYPE_BLUE, SG_OCTO_TYPE_BLUE, SG_OCTO_TYPE_BLUE),
|
||||
|
||||
OCTOROK_FLAG(COLOR_RED, ROW_FRONT, COLUMN_CENTER) | OCTOROK_FLAG(COLOR_RED, ROW_CENTER, COLUMN_CENTER) |
|
||||
OCTOROK_FLAG(COLOR_RED, ROW_BACK, COLUMN_RIGHT) | OCTOROK_FLAG(COLOR_RED, ROW_BACK, COLUMN_CENTER) |
|
||||
OCTOROK_FLAG(COLOR_RED, ROW_BACK, COLUMN_LEFT),
|
||||
OCTO_FLAGS(SG_OCTO_TYPE_RED, SG_OCTO_TYPE_RED, SG_OCTO_TYPE_RED,
|
||||
SG_OCTO_TYPE_NONE, SG_OCTO_TYPE_RED, SG_OCTO_TYPE_NONE,
|
||||
SG_OCTO_TYPE_NONE, SG_OCTO_TYPE_RED, SG_OCTO_TYPE_NONE),
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
void EnSyatekiMan_Town_RunGame(EnSyatekiMan* this, PlayState* play) {
|
||||
@@ -1323,16 +1324,16 @@ void EnSyatekiMan_Town_RunGame(EnSyatekiMan* this, PlayState* play) {
|
||||
this->perGameVar1.octorokState = SG_OCTO_STATE_HIDING;
|
||||
}
|
||||
|
||||
if (this->perGameVar2.octorokHitType != SG_OCTO_HIT_TYPE_NONE) {
|
||||
if (this->perGameVar2.octorokHitType == SG_OCTO_HIT_TYPE_BLUE) {
|
||||
if (this->perGameVar2.lastHitOctorokType != SG_OCTO_TYPE_NONE) {
|
||||
if (this->perGameVar2.lastHitOctorokType == SG_OCTO_TYPE_BLUE) {
|
||||
gSaveContext.timerTimeLimits[TIMER_ID_MINIGAME_1] -= SECONDS_TO_TIMER_PRECISE(2, 50);
|
||||
sModFromLosingTime = (sModFromLosingTime + 25) % 50;
|
||||
}
|
||||
|
||||
this->perGameVar2.octorokHitType = SG_OCTO_HIT_TYPE_NONE;
|
||||
this->perGameVar2.lastHitOctorokType = SG_OCTO_TYPE_NONE;
|
||||
}
|
||||
|
||||
if (this->perGameVar1.octorokState == SG_OCTO_STATE_SPAWNING) {
|
||||
if (this->perGameVar1.octorokState == SG_OCTO_STATE_APPEARING) {
|
||||
this->perGameVar1.octorokState++;
|
||||
}
|
||||
|
||||
@@ -1340,10 +1341,10 @@ void EnSyatekiMan_Town_RunGame(EnSyatekiMan* this, PlayState* play) {
|
||||
// that the player might have lost time from hitting Blue Octoroks, so we do something similar to
|
||||
// what was done with waveTimer above.
|
||||
if ((sModFromLosingTime == (timer % 50)) && (this->perGameVar1.octorokState >= SG_OCTO_STATE_INITIAL)) {
|
||||
if (this->flagsIndex < 15) {
|
||||
if (this->flagsIndex < ARRAY_COUNT(sOctorokFlagsPerWave)) {
|
||||
this->octorokFlags = sOctorokFlagsPerWave[this->flagsIndex++];
|
||||
Actor_PlaySfx(&this->actor, NA_SE_SY_FOUND);
|
||||
this->perGameVar1.octorokState = SG_OCTO_STATE_SPAWNING;
|
||||
this->perGameVar1.octorokState = SG_OCTO_STATE_APPEARING;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -22,18 +22,12 @@ typedef enum {
|
||||
} ShootingGalleryGameState;
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ SG_OCTO_STATE_SPAWNING,
|
||||
/* 1 */ SG_OCTO_STATE_SPAWNED,
|
||||
/* 0 */ SG_OCTO_STATE_APPEARING,
|
||||
/* 1 */ SG_OCTO_STATE_APPEARED,
|
||||
/* 70 */ SG_OCTO_STATE_INITIAL = 70,
|
||||
/* 80 */ SG_OCTO_STATE_HIDING = 80
|
||||
} ShootingGalleryOctorokState;
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ SG_OCTO_HIT_TYPE_NONE,
|
||||
/* 1 */ SG_OCTO_HIT_TYPE_RED,
|
||||
/* 2 */ SG_OCTO_HIT_TYPE_BLUE
|
||||
} ShootingGalleryoctorokHitType;
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ SG_PATH_TYPE_CROW,
|
||||
/* 1 */ SG_PATH_TYPE_SCRUB_NORMAL,
|
||||
@@ -62,7 +56,7 @@ typedef struct EnSyatekiMan {
|
||||
} perGameVar1;
|
||||
/* 0x26E */ union {
|
||||
s16 bonusDekuScrubHitCounter;
|
||||
s16 octorokHitType;
|
||||
s16 lastHitOctorokType;
|
||||
} perGameVar2;
|
||||
/* 0x270 */ s16 talkWaitTimer;
|
||||
/* 0x272 */ s16 dekuScrubFlags;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -4,7 +4,39 @@
|
||||
#include "global.h"
|
||||
#include "objects/object_okuta/object_okuta.h"
|
||||
|
||||
#define EN_SYATEKI_OKUTA_GET_F(thisx) ((thisx)->params & 0xF)
|
||||
typedef enum {
|
||||
/* 0 */ SG_OCTO_TYPE_NONE,
|
||||
/* 1 */ SG_OCTO_TYPE_RED,
|
||||
/* 2 */ SG_OCTO_TYPE_BLUE,
|
||||
/* 3 */ SG_OCTO_TYPE_MAX
|
||||
} ShootingGalleryOctorokType;
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ SG_OCTO_ROW_BACK,
|
||||
/* 1 */ SG_OCTO_ROW_CENTER,
|
||||
/* 2 */ SG_OCTO_ROW_FRONT,
|
||||
/* 3 */ SG_OCTO_ROW_MAX
|
||||
} ShootingGalleryOctorokRow;
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ SG_OCTO_COL_LEFT,
|
||||
/* 1 */ SG_OCTO_COL_CENTER,
|
||||
/* 2 */ SG_OCTO_COL_RIGHT,
|
||||
/* 3 */ SG_OCTO_COL_MAX
|
||||
} ShootingGalleryOctorokColumn;
|
||||
|
||||
#define SG_OCTO_GET_INDEX(thisx) ((thisx)->params & 0xF)
|
||||
#define SG_OCTO_INDEX_FOR_POS(row, column) (((row) * SG_OCTO_COL_MAX) + (column))
|
||||
|
||||
// This returns the index of the Octorok directly in front of the Octorok at the given index. In other words, it
|
||||
// returns the index of the Octorok in the same column as the one with the given index, but one row ahead. It's
|
||||
// assumed that this will only be used for Octoroks in the back or center row; it returns an invalid index for
|
||||
// Octoroks in the front row.
|
||||
#define SG_OCTO_INDEX_DIRECTLY_IN_FRONT(index) ((index) + SG_OCTO_COL_MAX)
|
||||
|
||||
// Both of these macros assume that the Octorok types can fit in two bits, hence why the index is multiplied by 2.
|
||||
#define SG_OCTO_GET_TYPE(octorokFlags, index) (((octorokFlags) >> ((index) * 2)) & SG_OCTO_TYPE_MAX)
|
||||
#define SG_OCTO_SET_FLAG(type, index) ((type & SG_OCTO_TYPE_MAX) << ((index) * 2))
|
||||
|
||||
struct EnSyatekiOkuta;
|
||||
|
||||
@@ -15,13 +47,13 @@ typedef struct EnSyatekiOkuta {
|
||||
/* 0x144 */ SkelAnime skelAnime;
|
||||
/* 0x188 */ EnSyatekiOkutaActionFunc actionFunc;
|
||||
/* 0x18C */ ColliderCylinder collider;
|
||||
/* 0x1DC */ Vec3f unk_1D8;
|
||||
/* 0x1DC */ Vec3f headScale;
|
||||
/* 0x1E4 */ Vec3s jointTable[OCTOROK_LIMB_MAX];
|
||||
/* 0x244 */ Vec3s morphTable[OCTOROK_LIMB_MAX];
|
||||
/* 0x2A4 */ s16 unk_2A4;
|
||||
/* 0x2A6 */ s16 unk_2A6;
|
||||
/* 0x2A4 */ s16 deathTimer;
|
||||
/* 0x2A6 */ s16 type;
|
||||
/* 0x2A8 */ UNK_TYPE1 unk_2A8[0x2];
|
||||
/* 0x2AA */ s16 unk_2AA;
|
||||
/* 0x2AA */ s16 hitResultAlpha;
|
||||
} EnSyatekiOkuta; // size = 0x2AC
|
||||
|
||||
#endif // Z_EN_SYATEKI_OKUTA_H
|
||||
|
||||
+20
-20
@@ -10217,27 +10217,27 @@
|
||||
0x80A35DDC:("ObjBell_Draw",),
|
||||
0x80A35FF0:("EnSyatekiOkuta_Init",),
|
||||
0x80A3611C:("EnSyatekiOkuta_Destroy",),
|
||||
0x80A36148:("func_80A36148",),
|
||||
0x80A361B0:("func_80A361B0",),
|
||||
0x80A361F4:("func_80A361F4",),
|
||||
0x80A36260:("func_80A36260",),
|
||||
0x80A362A8:("func_80A362A8",),
|
||||
0x80A362F8:("func_80A362F8",),
|
||||
0x80A36350:("func_80A36350",),
|
||||
0x80A36360:("func_80A36360",),
|
||||
0x80A363B4:("func_80A363B4",),
|
||||
0x80A36444:("func_80A36444",),
|
||||
0x80A36488:("func_80A36488",),
|
||||
0x80A364C0:("func_80A364C0",),
|
||||
0x80A36504:("func_80A36504",),
|
||||
0x80A3657C:("func_80A3657C",),
|
||||
0x80A365EC:("func_80A365EC",),
|
||||
0x80A368E0:("func_80A368E0",),
|
||||
0x80A36A90:("func_80A36A90",),
|
||||
0x80A36AF8:("func_80A36AF8",),
|
||||
0x80A36148:("EnSyatekiOkuta_SpawnDust",),
|
||||
0x80A361B0:("EnSyatekiOkuta_SpawnSplash",),
|
||||
0x80A361F4:("EnSyatekiOkuta_IsHiddenByAnotherOctorok",),
|
||||
0x80A36260:("EnSyatekiOkuta_SetupAttachToShootingGalleryMan",),
|
||||
0x80A362A8:("EnSyatekiOkuta_AttachToShootingGalleryMan",),
|
||||
0x80A362F8:("EnSyatekiOkuta_SetupDoNothing",),
|
||||
0x80A36350:("EnSyatekiOkuta_DoNothing",),
|
||||
0x80A36360:("EnSyatekiOkuta_SetupAppear",),
|
||||
0x80A363B4:("EnSyatekiOkuta_Appear",),
|
||||
0x80A36444:("EnSyatekiOkuta_SetupFloat",),
|
||||
0x80A36488:("EnSyatekiOkuta_Float",),
|
||||
0x80A364C0:("EnSyatekiOkuta_SetupHide",),
|
||||
0x80A36504:("EnSyatekiOkuta_Hide",),
|
||||
0x80A3657C:("EnSyatekiOkuta_SetupDie",),
|
||||
0x80A365EC:("EnSyatekiOkuta_Die",),
|
||||
0x80A368E0:("EnSyatekiOkuta_UpdateCollision",),
|
||||
0x80A36A90:("EnSyatekiOkuta_CheckCollision",),
|
||||
0x80A36AF8:("EnSyatekiOkuta_CheckForSignal",),
|
||||
0x80A36B9C:("EnSyatekiOkuta_Update",),
|
||||
0x80A36CB0:("func_80A36CB0",),
|
||||
0x80A370EC:("func_80A370EC",),
|
||||
0x80A36CB0:("EnSyatekiOkuta_UpdateHeadScale",),
|
||||
0x80A370EC:("EnSyatekiOkuta_GetSnoutScale",),
|
||||
0x80A37294:("EnSyatekiOkuta_OverrideLimbDraw",),
|
||||
0x80A3735C:("EnSyatekiOkuta_Draw",),
|
||||
0x80A37ED0:("ObjShutter_Init",),
|
||||
|
||||
@@ -11207,11 +11207,11 @@
|
||||
0x80A37A88:("D_80A37A88","UNK_TYPE1","",0x1),
|
||||
0x80A37B08:("D_80A37B08","UNK_TYPE1","",0x1),
|
||||
0x80A37B88:("D_80A37B88","UNK_TYPE1","",0x1),
|
||||
0x80A37B90:("D_80A37B90","UNK_TYPE1","",0x1),
|
||||
0x80A37B94:("D_80A37B94","UNK_TYPE1","",0x1),
|
||||
0x80A37B98:("D_80A37B98","UNK_TYPE1","",0x1),
|
||||
0x80A37BA4:("D_80A37BA4","UNK_TYPE1","",0x1),
|
||||
0x80A37BA8:("D_80A37BA8","UNK_TYPE1","",0x1),
|
||||
0x80A37B90:("sDustPrimColor","UNK_TYPE1","",0x1),
|
||||
0x80A37B94:("sDustEnvColor","UNK_TYPE1","",0x1),
|
||||
0x80A37B98:("sBubbleAccel","UNK_TYPE1","",0x1),
|
||||
0x80A37BA4:("sBubblePrimColor","UNK_TYPE1","",0x1),
|
||||
0x80A37BA8:("sBubbleEnvColor","UNK_TYPE1","",0x1),
|
||||
0x80A37BB0:("D_80A37BB0","f32","",0x4),
|
||||
0x80A37BB4:("D_80A37BB4","f32","",0x4),
|
||||
0x80A37BB8:("D_80A37BB8","f32","",0x4),
|
||||
|
||||
Reference in New Issue
Block a user