mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-06 06:10:21 +00:00
Gorons: En_Go & En_Go2 OK (#556)
* moved en_go rodata * EnGo 20/45 functions decompiled * EnGo 25/45 functions decompiled * EnGo 28/45 functions decompiled * EnGo 32/45 functions decompiled * minor attempts * init Goron 2 6/98 decompiled (baby functions) * Goron2 14/98 func decompiled * Goron2 30/98 func decompiled * EnGo 34/45 functions decompiled * EnGo 38/45 functions decompiled * Goron2 44/98 functions decompiled * Goron2 58/98 functions decompiled * Merged EnGo and EnGo2: 38/45, 58/98 functions decompiled * EnGo EnGo2: 38/45, 65/98 functions decompiled * EnGo EnGo2: 38/45, 70/98 functions decompiled * EnGo EnGo2: 39/45, 72/98 functions decompiled * EnGo EnGo2: 39/45, 80/98 functions decompiled * EnGo EnGo2: 39/45, 88/98 functions decompiled * EnGo EnGo2: 39/45, 92/98 functions decompiled * typo in GoronType * EnGo EnGo2: 40/45, 93/98 functions decompiled * EnGo EnGo2: 45/45, 93/98 functions decompiled * EnGo EnGo2 fully decomped * begin cleanup * the cleanup continues * continue cleaning * Documentation and renaming attempt * more cleanup * more cleanup * Apply suggestions from code review Committing suggestions Co-authored-by: AdamKiddle <54328813+AdamKiddle@users.noreply.github.com> Co-authored-by: mzxrules <mzxrules@gmail.com> * more pr suggestions * more pr and gns feedback * fixed comment * cleanup * update math & skelAnime names * goron1 * goron2 * relocs * review Co-authored-by: AdamKiddle <54328813+AdamKiddle@users.noreply.github.com> Co-authored-by: mzxrules <mzxrules@gmail.com> Co-authored-by: fig <fig02srl@gmail.com>
This commit is contained in:
parent
9f3e8cbf97
commit
8e8421fdec
158 changed files with 3365 additions and 10877 deletions
|
@ -385,7 +385,7 @@ void func_809EFDD0(EnDns* this, GlobalContext* globalCtx) {
|
|||
func_8002F434(&this->actor, globalCtx, GI_NUT_UPGRADE_40, 130.0f, 100.0f);
|
||||
}
|
||||
} else {
|
||||
func_8002F434(&this->actor, globalCtx, this->dnsItemEntry->getItemID, 130.0f, 100.0f);
|
||||
func_8002F434(&this->actor, globalCtx, this->dnsItemEntry->getItemId, 130.0f, 100.0f);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ typedef void (*EnDnsSetRupeesAndFlags)(struct EnDns*);
|
|||
typedef struct {
|
||||
/* 0x00 */ s16 itemPrice;
|
||||
/* 0x02 */ u16 itemAmount;
|
||||
/* 0x04 */ s32 getItemID;
|
||||
/* 0x04 */ s32 getItemId;
|
||||
/* 0x08 */ EnDnsPurchaseableCheck purchaseableCheck;
|
||||
/* 0x0C */ EnDnsSetRupeesAndFlags setRupeesAndFlags;
|
||||
} DnsItemEntry; // size = 0x10
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -6,9 +6,56 @@
|
|||
|
||||
struct EnGo;
|
||||
|
||||
typedef void (*EnGoActionFunc)(struct EnGo*, GlobalContext*);
|
||||
typedef u16 (*callback1_80A3ED24)(GlobalContext*, struct EnGo*);
|
||||
typedef s16 (*callback2_80A3ED24)(GlobalContext*, struct EnGo*);
|
||||
|
||||
// WIP type docs
|
||||
// /* 0x00 */ GORON1_CITY_LINK,
|
||||
// /* 0x10 */ GORON1_FIRE_GENERIC,
|
||||
// /* 0x20 */ GORON1_DMT_DC_ENTRANCE,
|
||||
// /* 0x30 */ GORON1_DMT_ROLLING_SMALL,
|
||||
// /* 0x40 */ GORON1_DMT_BOMB_FLOWER,
|
||||
// /* 0x50 */ GORON1_CITY_ENTRANCE,
|
||||
// /* 0x60 */ GORON1_CITY_ISLAND,
|
||||
// /* 0x70 */ GORON1_CITY_LOST_WOODS,
|
||||
// /* 0x80 */ // Not Used
|
||||
// /* 0x90 */ GORON1_DMT_BIGGORON,
|
||||
|
||||
|
||||
typedef struct {
|
||||
/* 0x0000 */ u8 type;
|
||||
/* 0x0001 */ u8 timer;
|
||||
/* 0x0002 */ u8 initialTimer;
|
||||
/* 0x0004 */ f32 scale;
|
||||
/* 0x0008 */ f32 scaleStep;
|
||||
/* 0x000C */ Color_RGBA8 color;
|
||||
/* 0x0010 */ char unk_10[4];
|
||||
/* 0x0014 */ Vec3f pos;
|
||||
/* 0x0020 */ Vec3f velocity;
|
||||
/* 0x002C */ Vec3f accel;
|
||||
} EnGoEffect; // size = 0x38
|
||||
|
||||
typedef struct EnGo {
|
||||
/* 0x0000 */ Actor actor;
|
||||
/* 0x014C */ char unk_14C[0x57C];
|
||||
/* 0x014C */ SkelAnime skelAnime;
|
||||
/* 0x0190 */ EnGoActionFunc actionFunc;
|
||||
/* 0x0194 */ ColliderCylinder collider;
|
||||
/* 0x01E0 */ struct_80034A14_arg1 unk_1E0;
|
||||
/* 0x0208 */ char unk_208[0x4];
|
||||
/* 0x020c */ s16 unk_20C;
|
||||
/* 0x020e */ s16 unk_20E;
|
||||
/* 0x0210 */ s16 unk_210;
|
||||
/* 0x0212 */ s16 unk_212;
|
||||
/* 0x0214 */ s16 unk_214;
|
||||
/* 0x0216 */ s16 unk_216;
|
||||
/* 0x0218 */ s16 unk_218;
|
||||
/* 0x021A */ s16 unk_21A;
|
||||
/* 0x021C */ s16 unk_21C;
|
||||
/* 0x021E */ s16 unk_21E;
|
||||
/* 0x0220 */ s16 jointTable[18];
|
||||
/* 0x0244 */ s16 morphTable[18];
|
||||
/* 0x0268 */ EnGoEffect dustEffects[20];
|
||||
} EnGo; // size = 0x06C8
|
||||
|
||||
extern const ActorInit En_Go_InitVars;
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -3,12 +3,107 @@
|
|||
|
||||
#include "ultra64.h"
|
||||
#include "global.h"
|
||||
#include "overlays/actors/ovl_En_Go/z_en_go.h"
|
||||
|
||||
struct EnGo2;
|
||||
|
||||
typedef void (*EnGo2ActionFunc)(struct EnGo2*, GlobalContext*);
|
||||
|
||||
typedef enum {
|
||||
/* 0x00 */ GORON_CITY_ROLLING_BIG,
|
||||
/* 0x01 */ GORON_CITY_LINK,
|
||||
/* 0x02 */ GORON_DMT_BIGGORON,
|
||||
/* 0x03 */ GORON_FIRE_GENERIC,
|
||||
/* 0x04 */ GORON_DMT_BOMB_FLOWER,
|
||||
/* 0x05 */ GORON_DMT_ROLLING_SMALL,
|
||||
/* 0x06 */ GORON_DMT_DC_ENTRANCE,
|
||||
/* 0x07 */ GORON_CITY_ENTRANCE,
|
||||
/* 0x08 */ GORON_CITY_ISLAND,
|
||||
/* 0x09 */ GORON_CITY_LOWEST_FLOOR,
|
||||
/* 0x0A */ GORON_CITY_STAIRWELL,
|
||||
/* 0x0B */ GORON_CITY_LOST_WOODS,
|
||||
/* 0x0C */ GORON_DMT_FAIRY_HINT,
|
||||
/* 0x0D */ GORON_MARKET_BAZAAR
|
||||
} GoronType;
|
||||
|
||||
// WIP fire temple type docs
|
||||
// /* 0x00 */ UNUSED
|
||||
// /* 0x01 */ GORON_FIRE_LAVA_ROOM_OPEN
|
||||
// /* 0x02 */ GORON_FIRE_LAVA_ROOM_BOMB
|
||||
// /* 0x03 */ GORON_FIRE_MAZE_LOWER
|
||||
// /* 0x04 */ GORON_FIRE_MAZE_SHORTCUT
|
||||
// /* 0x05 */ GORON_FIRE_MAZE_SIDE_ROOM
|
||||
// /* 0x06 */ GORON_FIRE_BOSS_KEY
|
||||
// /* 0x07 */ GORON_FIRE_BOSS_KEY
|
||||
// /* 0x08 */ GORON_FIRE_NEAR_BOSS
|
||||
// /* 0x09 */ GORON_FIRE_BOSS_KEY
|
||||
// /* 0x0A */ GORON_FIRE_MAZE_UPPER,
|
||||
// /* 0x0B */ GORON_FIRE_HIGHEST
|
||||
|
||||
|
||||
typedef struct {
|
||||
s16 unused;
|
||||
s16 yDist;
|
||||
s16 xzDist;
|
||||
s16 radius;
|
||||
s16 height;
|
||||
} EnGo2DataStruct1; // size = 0xA
|
||||
|
||||
typedef struct {
|
||||
f32 shape_unk_10;
|
||||
f32 scale;
|
||||
s8 actor_unk_1F;
|
||||
f32 unk_218;
|
||||
} EnGo2DataStruct2; // size = 0x10
|
||||
|
||||
typedef struct {
|
||||
u8 initialTimer;
|
||||
f32 scale;
|
||||
f32 scaleStep;
|
||||
s32 numDustEffects;
|
||||
f32 radius;
|
||||
f32 yAccel;
|
||||
} EnGo2DustEffectData; // size = 0x18
|
||||
|
||||
typedef struct EnGo2 {
|
||||
/* 0x0000 */ Actor actor;
|
||||
/* 0x014C */ char unk_14C[0x454];
|
||||
/* 0x014C */ SkelAnime skelAnime;
|
||||
/* 0x0190 */ EnGo2ActionFunc actionFunc;
|
||||
/* 0x0194 */ struct_80034A14_arg1 unk_194;
|
||||
/* 0x01BC */ ColliderCylinder collider;
|
||||
/* 0x0208 */ Path* path;
|
||||
/* 0x020C */ u8 unk_20C; // counter for GORON_CITY_LINK animation
|
||||
/* 0x020D */ u8 dialogState;
|
||||
/* 0x020E */ u8 reverse;
|
||||
/* 0x020F */ u8 isAwake; // Conditional
|
||||
/* 0x0210 */ s8 waypoint;
|
||||
/* 0x0211 */ u8 unk_211; // Conditional
|
||||
// goron link: 0 - rolling, 1 - frozen
|
||||
// biggoron: 0 - give eyedrops, 1 - applying eyedrops, 2 - getting claimcheck
|
||||
// generic fire: 0 -
|
||||
/* 0x0212 */ u8 goronState;
|
||||
/* 0x0213 */ u8 eyeMouthTexState; // 0, 1, 2, 3
|
||||
/* 0x0214 */ u8 eyeTexIndex;
|
||||
/* 0x0215 */ u8 mouthTexIndex;
|
||||
/* 0x0216 */ u8 unk_216; // Set to z rotation, checked by waypoint
|
||||
/* 0x0218 */ f32 unk_218;
|
||||
/* 0x021C */ char unk_21C[0x04];
|
||||
/* 0x0220 */ f32 alpha; // Set to 0, used by func_80A45360, smoothed to this->actor.shape.unk_14 from either 0 or 255.0f
|
||||
/* 0x0224 */ s16 blinkTimer;
|
||||
/* 0x0226 */ s16 unk_226[18]; // Remains unknown
|
||||
/* 0x024A */ s16 unk_24A[18]; // Remains unknown
|
||||
/* 0x026E */ u16 unk_26E; // Remains unknown = 1, 2, or 4: used in func_80034A14
|
||||
/* 0x0270 */ EnGoEffect dustEffects[10];
|
||||
/* 0x04A0 */ Vec3f eye;
|
||||
/* 0x04AC */ Vec3f at;
|
||||
/* 0x04B8 */ Vec3s jointTable[18];
|
||||
/* 0x0524 */ Vec3s morphTable[18];
|
||||
/* 0x0590 */ s16 unk_590; // timer
|
||||
/* 0x0592 */ s16 animTimer; // animTimer. Plays NA_SE_EN_MORIBLIN_WALK, NA_SE_EV_IRON_DOOR_OPEN, NA_SE_EV_IRON_DOOR_CLOSE
|
||||
/* 0x0594 */ s32 getItemId;
|
||||
/* 0x0598 */ char unk_598[0x02];
|
||||
/* 0x059A */ s16 camId;
|
||||
/* 0x059C */ s16 unk_59C;
|
||||
} EnGo2; // size = 0x05A0
|
||||
|
||||
extern const ActorInit En_Go2_InitVars;
|
||||
|
|
|
@ -419,7 +419,7 @@ void EnKz_Wait(EnKz* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void EnKz_SetupGetItem(EnKz* this, GlobalContext* globalCtx) {
|
||||
s32 getItemID;
|
||||
s32 getItemId;
|
||||
f32 xzRange;
|
||||
f32 yRange;
|
||||
|
||||
|
@ -428,10 +428,10 @@ void EnKz_SetupGetItem(EnKz* this, GlobalContext* globalCtx) {
|
|||
this->unk_1E0.unk_00 = 1;
|
||||
this->actionFunc = EnKz_StartTimer;
|
||||
} else {
|
||||
getItemID = this->isTrading == true ? GI_FROG : GI_TUNIC_ZORA;
|
||||
getItemId = this->isTrading == true ? GI_FROG : GI_TUNIC_ZORA;
|
||||
yRange = fabsf(this->actor.yDistToPlayer) + 1.0f;
|
||||
xzRange = this->actor.xzDistToPlayer + 1.0f;
|
||||
func_8002F434(&this->actor, globalCtx, getItemID, xzRange, yRange);
|
||||
func_8002F434(&this->actor, globalCtx, getItemId, xzRange, yRange);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -7378,7 +7378,7 @@ s32 func_80842AC4(GlobalContext* globalCtx, Player* this) {
|
|||
|
||||
s32 func_80842B7C(GlobalContext* globalCtx, Player* this) {
|
||||
if (this->heldItemActionParam == PLAYER_AP_SWORD_BGS) {
|
||||
if ((gSaveContext.bgsFlag == 0) && (gSaveContext.swordHealth > 0.0f)) {
|
||||
if (!gSaveContext.bgsFlag && (gSaveContext.swordHealth > 0.0f)) {
|
||||
if ((gSaveContext.swordHealth -= 1.0f) <= 0.0f) {
|
||||
EffectSsStick_Spawn(globalCtx, &this->bodyPartsPos[15], this->actor.shape.rot.y + 0x8000);
|
||||
func_800849EC(globalCtx);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue