mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-03 14:34:32 +00:00
z_En_Ossan and dependencies (#824)
* fix colliderinit typo * fix initchain * reloc * progress * progress * Pick off a few easy functions, reduce number of warnings * more tough OKs * Getting closer to all OK, fix en_girla header * some hard OKs, 7 to go * two funcs remaining * func_80AC7094 OK! * Fix warnings, begin documentation * get most of object_ossan documented, document some of en_ossan * improve en_girla function names * more EnOssan documentation * more documentation * en_tana basically complete, en_girla vars all named, en_ossan documentation improvements * delete TIME ITSELF * object_oF1d_map OK * more names, fixed a poition typo * Nearly all en_ossan functions named, all variables named * format.sh * forgot to delete data * implement pr changes * EnOssan OK! implement most of Roman's suggestions * ugh * implement figs suggestions * implement roman's suggestion * Can't tell my left from my other left Co-authored-by: fig02 <fig02srl@gmail.com>
This commit is contained in:
parent
7446e5eb80
commit
3fd05c9147
134 changed files with 3479 additions and 7998 deletions
|
@ -8,6 +8,7 @@
|
|||
#include "vt.h"
|
||||
#include "objects/object_zo/object_zo.h"
|
||||
#include "objects/object_ec/object_ec.h"
|
||||
#include "objects/object_oF1d_map/object_oF1d_map.h"
|
||||
|
||||
#define FLAGS 0x00000010
|
||||
|
||||
|
@ -139,9 +140,6 @@ extern FlexSkeletonHeader D_060085F8;
|
|||
// Object_RS
|
||||
extern FlexSkeletonHeader D_06004868;
|
||||
|
||||
// Object_OF1D_MAP
|
||||
extern FlexSkeletonHeader D_0600FEF0;
|
||||
|
||||
// Object_MA2
|
||||
extern FlexSkeletonHeader D_06008D90;
|
||||
|
||||
|
@ -158,7 +156,6 @@ extern u8 D_06007AC0[];
|
|||
extern u8 D_06006920[];
|
||||
extern u8 D_060004C8[];
|
||||
extern u8 D_060035D8[];
|
||||
extern u8 D_0600DE80[];
|
||||
extern u8 D_06003770[];
|
||||
|
||||
// PostLimbDraw display lists
|
||||
|
@ -1114,7 +1111,7 @@ void DemoEc_InitGorons(DemoEc* this, GlobalContext* globalCtx) {
|
|||
Vec3f* scale = &this->actor.scale;
|
||||
|
||||
DemoEc_UseDrawObject(this, globalCtx);
|
||||
DemoEc_InitSkelAnime(this, globalCtx, &D_0600FEF0);
|
||||
DemoEc_InitSkelAnime(this, globalCtx, &gGoronSkel);
|
||||
DemoEc_UseAnimationObject(this, globalCtx);
|
||||
|
||||
if (this->actor.params == 30) {
|
||||
|
@ -1151,11 +1148,11 @@ void DemoEc_UpdateGorons(DemoEc* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void DemoEc_DrawGorons(DemoEc* this, GlobalContext* globalCtx) {
|
||||
static void* eyeTextures[] = { 0x0600CE80, 0x0600D280, 0x0600D680 };
|
||||
static void* eyeTextures[] = { gGoronCsEyeOpenTex, gGoronCsEyeHalfTex, gGoronCsEyeClosedTex };
|
||||
s32 eyeTexIndex = this->eyeTexIndex;
|
||||
void* eyeTexture = eyeTextures[eyeTexIndex];
|
||||
|
||||
DemoEc_DrawSkeleton(this, globalCtx, eyeTexture, &D_0600DE80, NULL, NULL);
|
||||
DemoEc_DrawSkeleton(this, globalCtx, eyeTexture, &gGoronCsMouthNeutralTex, NULL, NULL);
|
||||
}
|
||||
|
||||
void DemoEc_InitMalon(DemoEc* this, GlobalContext* globalCtx) {
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
*/
|
||||
|
||||
#include "z_demo_go.h"
|
||||
#include "objects/object_oF1d_map/object_oF1d_map.h"
|
||||
#include "vt.h"
|
||||
|
||||
#define FLAGS 0x00000010
|
||||
|
@ -27,7 +28,7 @@ void func_8097D130(DemoGo* this, GlobalContext* globalCtx);
|
|||
void func_8097D290(DemoGo* this, GlobalContext* globalCtx);
|
||||
void func_8097D29C(DemoGo* this, GlobalContext* globalCtx);
|
||||
|
||||
static u64* D_8097D440[] = { 0x0600CE80, 0x0600D280, 0x0600D680 };
|
||||
static void* sEyeTextures[] = { gGoronCsEyeOpenTex, gGoronCsEyeHalfTex, gGoronCsEyeClosedTex };
|
||||
|
||||
static DemoGoActionFunc D_8097D44C[] = {
|
||||
func_8097CFDC, func_8097CFFC, func_8097D01C, func_8097D058, func_8097D088, func_8097D0D0, func_8097D130,
|
||||
|
@ -50,11 +51,6 @@ const ActorInit Demo_Go_InitVars = {
|
|||
(ActorFunc)DemoGo_Draw,
|
||||
};
|
||||
|
||||
extern AnimationHeader D_060029A8;
|
||||
extern AnimationHeader D_06004930;
|
||||
extern u64 D_0600E680[];
|
||||
extern FlexSkeletonHeader D_0600FEF0;
|
||||
|
||||
s32 func_8097C870(DemoGo* this) {
|
||||
s32 ret;
|
||||
|
||||
|
@ -147,9 +143,9 @@ void func_8097CB0C(DemoGo* this, GlobalContext* globalCtx) {
|
|||
endPos.x = npcAction->endPos.x;
|
||||
endPos.y = npcAction->endPos.y;
|
||||
endPos.z = npcAction->endPos.z;
|
||||
world->pos.x = (((endPos.x - startPos.x) * temp_ret) + startPos.x);
|
||||
world->pos.y = (((endPos.y - startPos.y) * temp_ret) + startPos.y);
|
||||
world->pos.z = (((endPos.z - startPos.z) * temp_ret) + startPos.z);
|
||||
world->pos.x = (endPos.x - startPos.x) * temp_ret + startPos.x;
|
||||
world->pos.y = (endPos.y - startPos.y) * temp_ret + startPos.y;
|
||||
world->pos.z = (endPos.z - startPos.z) * temp_ret + startPos.z;
|
||||
world->rot.y = thisx->shape.rot.y = npcAction->rot.y;
|
||||
}
|
||||
}
|
||||
|
@ -195,7 +191,7 @@ void func_8097CCE0(DemoGo* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
}
|
||||
|
||||
UNK_TYPE DemoGo_FrameUpdateMatrix(DemoGo* this) {
|
||||
s32 DemoGo_FrameUpdateMatrix(DemoGo* this) {
|
||||
return SkelAnime_Update(&this->skelAnime);
|
||||
}
|
||||
|
||||
|
@ -242,8 +238,8 @@ void func_8097CEEC(DemoGo* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
}
|
||||
|
||||
void func_8097CF20(DemoGo* this, GlobalContext* globalCtx, UNK_TYPE arg2) {
|
||||
AnimationHeader* animation = &D_060029A8;
|
||||
void func_8097CF20(DemoGo* this, GlobalContext* globalCtx, s32 arg2) {
|
||||
AnimationHeader* animation = &gGoronAnim_0029A8;
|
||||
if (arg2 != 0) {
|
||||
Animation_Change(&this->skelAnime, animation, 1.0f, 0.0f, Animation_GetLastFrame(animation), ANIMMODE_LOOP,
|
||||
-8.0f);
|
||||
|
@ -279,7 +275,8 @@ void func_8097D058(DemoGo* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_8097D088(DemoGo* this, GlobalContext* globalCtx) {
|
||||
UNK_TYPE something;
|
||||
s32 something;
|
||||
|
||||
func_8097CA30(this, globalCtx);
|
||||
something = DemoGo_FrameUpdateMatrix(this);
|
||||
func_8097C930(this);
|
||||
|
@ -316,10 +313,10 @@ void DemoGo_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
|
||||
void DemoGo_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
DemoGo* this = THIS;
|
||||
AnimationHeader* animation = &D_06004930;
|
||||
AnimationHeader* animation = &gGoronAnim_004930;
|
||||
|
||||
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f);
|
||||
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_0600FEF0, NULL, NULL, NULL, 0);
|
||||
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &gGoronSkel, NULL, NULL, NULL, 0);
|
||||
Animation_Change(&this->skelAnime, animation, 1.0f, 0.0f, Animation_GetLastFrame(animation), ANIMMODE_ONCE, 0.0f);
|
||||
this->action = 0;
|
||||
}
|
||||
|
@ -329,16 +326,16 @@ void func_8097D290(DemoGo* this, GlobalContext* globalCtx) {
|
|||
|
||||
void func_8097D29C(DemoGo* this, GlobalContext* globalCtx) {
|
||||
s32 pad;
|
||||
s16 temp = this->unk_190;
|
||||
s16 eyeTexIdx = this->unk_190;
|
||||
SkelAnime* skelAnime = &this->skelAnime;
|
||||
void* srcSegment8 = D_8097D440[temp];
|
||||
void* srcSegment9 = &D_0600E680;
|
||||
void* eyeTexture = sEyeTextures[eyeTexIdx];
|
||||
void* mouthTexture = &gGoronCsMouthSmileTex;
|
||||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_demo_go.c", 732);
|
||||
|
||||
func_80093D18(globalCtx->state.gfxCtx);
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(srcSegment8));
|
||||
gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(srcSegment9));
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(eyeTexture));
|
||||
gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(mouthTexture));
|
||||
|
||||
SkelAnime_DrawFlexOpa(globalCtx, skelAnime->skeleton, skelAnime->jointTable, skelAnime->dListCount, NULL, NULL,
|
||||
this);
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -9,37 +9,95 @@ struct EnGirlA;
|
|||
typedef void (*EnGirlAActionFunc)(struct EnGirlA*, GlobalContext*);
|
||||
typedef void (*EnGirlA2Func)(GlobalContext*, struct EnGirlA*);
|
||||
typedef void (*EnGirlA3Func)(Actor*, GlobalContext*, s32);
|
||||
typedef s32 (*EnGirlA4Func)(GlobalContext*, struct EnGirlA*);
|
||||
|
||||
typedef struct EnGirlA {
|
||||
/* 0x0000 */ Actor actor;
|
||||
/* 0x014C */ SkelAnime skelAnime;
|
||||
/* 0x0190 */ EnGirlAActionFunc actionFunc;
|
||||
/* 0x0194 */ s8 unk_194;
|
||||
/* 0x0195 */ s8 unk_195;
|
||||
/* 0x0196 */ s16 unk_196;
|
||||
/* 0x0198 */ EnGirlAActionFunc unk_198;
|
||||
/* 0x019C */ s32 unk_19C;
|
||||
/* 0x01A0 */ s16 unk_1A0;
|
||||
/* 0x01A2 */ s16 unk_1A2;
|
||||
/* 0x01A4 */ s32 unk_1A4;
|
||||
/* 0x01A8 */ s16 unk_1A8;
|
||||
/* 0x01AA */ s16 unk_1AA;
|
||||
/* 0x01AC */ EnGirlA2Func unk_1AC;
|
||||
/* 0x01B0 */ EnGirlA2Func unk_1B0;
|
||||
/* 0x01B4 */ s16 unk_1B4;
|
||||
/* 0x01B6 */ s16 unk_1B6;
|
||||
/* 0x01B8 */ s16 unk_1B8;
|
||||
/* 0x01BA */ s16 unk_1BA;
|
||||
/* 0x01BC */ void* unk_1BC;
|
||||
/* 0x01C0 */ void* unk_1C0;
|
||||
/* 0x01C4 */ void* unk_1C4;
|
||||
/* 0x01C8 */ s16 unk_1C8;
|
||||
/* 0x01CA */ s16 unk_1CA;
|
||||
/* 0x0194 */ s8 objBankIndex;
|
||||
/* 0x0198 */ EnGirlAActionFunc actionFunc2;
|
||||
/* 0x019C */ s32 isInitialized;
|
||||
/* 0x01A0 */ s16 itemBuyPromptTextId;
|
||||
/* 0x01A4 */ s32 getItemId;
|
||||
/* 0x01A8 */ s16 isInvisible;
|
||||
/* 0x01AC */ EnGirlA2Func setOutOfStockFunc;
|
||||
/* 0x01B0 */ EnGirlA2Func updateStockedItemFunc;
|
||||
/* 0x01B4 */ s16 isSelected;
|
||||
/* 0x01B6 */ s16 yRotationInit;
|
||||
/* 0x01B8 */ s16 yRotation;
|
||||
/* 0x01BC */ EnGirlA4Func canBuyFunc;
|
||||
/* 0x01C0 */ EnGirlA2Func itemGiveFunc;
|
||||
/* 0x01C4 */ EnGirlA2Func buyEventFunc;
|
||||
/* 0x01C8 */ s16 basePrice;
|
||||
/* 0x01CA */ s16 itemCount;
|
||||
/* 0x01CC */ s16 giDrawId;
|
||||
/* 0x01CE */ s16 unk_1CE;
|
||||
/* 0x01D0 */ EnGirlA3Func unk_1D0;
|
||||
/* 0x01D0 */ EnGirlA3Func hiliteFunc;
|
||||
} EnGirlA; // size = 0x01D4
|
||||
|
||||
extern const ActorInit En_GirlA_InitVars;
|
||||
|
||||
typedef enum {
|
||||
/* 0x00 */ SI_DEKU_NUTS_5,
|
||||
/* 0x01 */ SI_ARROWS_30,
|
||||
/* 0x02 */ SI_ARROWS_50,
|
||||
/* 0x03 */ SI_BOMBS_5_R25,
|
||||
/* 0x04 */ SI_DEKU_NUTS_10,
|
||||
/* 0x05 */ SI_DEKU_STICK,
|
||||
/* 0x06 */ SI_BOMBS_10,
|
||||
/* 0x07 */ SI_FISH,
|
||||
/* 0x08 */ SI_RED_POTION_R30,
|
||||
/* 0x09 */ SI_GREEN_POTION,
|
||||
/* 0x0A */ SI_BLUE_POTION,
|
||||
/* 0x0B */ SI_LONGSWORD,
|
||||
/* 0x0C */ SI_HYLIAN_SHIELD,
|
||||
/* 0x0D */ SI_DEKU_SHIELD,
|
||||
/* 0x0E */ SI_GORON_TUNIC,
|
||||
/* 0x0F */ SI_ZORA_TUNIC,
|
||||
/* 0x10 */ SI_HEART,
|
||||
/* 0x11 */ SI_MILK_BOTTLE,
|
||||
/* 0x12 */ SI_WEIRD_EGG,
|
||||
/* 0x13 */ SI_19,
|
||||
/* 0x14 */ SI_20,
|
||||
/* 0x15 */ SI_BOMBCHU_10_1,
|
||||
/* 0x16 */ SI_BOMBCHU_20_1,
|
||||
/* 0x17 */ SI_BOMBCHU_20_2,
|
||||
/* 0x18 */ SI_BOMBCHU_10_2,
|
||||
/* 0x19 */ SI_BOMBCHU_10_3,
|
||||
/* 0x1A */ SI_BOMBCHU_20_3,
|
||||
/* 0x1B */ SI_BOMBCHU_20_4,
|
||||
/* 0x1C */ SI_BOMBCHU_10_4,
|
||||
/* 0x1D */ SI_DEKU_SEEDS_30,
|
||||
/* 0x1E */ SI_KEATON_MASK,
|
||||
/* 0x1F */ SI_SPOOKY_MASK,
|
||||
/* 0x20 */ SI_SKULL_MASK,
|
||||
/* 0x21 */ SI_BUNNY_HOOD,
|
||||
/* 0x22 */ SI_MASK_OF_TRUTH,
|
||||
/* 0x23 */ SI_ZORA_MASK,
|
||||
/* 0x24 */ SI_GORON_MASK,
|
||||
/* 0x25 */ SI_GERUDO_MASK,
|
||||
/* 0x26 */ SI_SOLD_OUT,
|
||||
/* 0x27 */ SI_BLUE_FIRE,
|
||||
/* 0x28 */ SI_BUGS,
|
||||
/* 0x29 */ SI_BIG_POE,
|
||||
/* 0x2A */ SI_POE,
|
||||
/* 0x2B */ SI_FAIRY,
|
||||
/* 0x2C */ SI_ARROWS_10,
|
||||
/* 0x2D */ SI_BOMBS_20,
|
||||
/* 0x2E */ SI_BOMBS_30,
|
||||
/* 0x2F */ SI_BOMBS_5_R35,
|
||||
/* 0x30 */ SI_RED_POTION_R40,
|
||||
/* 0x31 */ SI_RED_POTION_R50,
|
||||
/* 0x32 */ SI_MAX
|
||||
} EnGirlAShopItem;
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ CANBUY_RESULT_SUCCESS_FANFARE,
|
||||
/* 1 */ CANBUY_RESULT_SUCCESS,
|
||||
/* 2 */ CANBUY_RESULT_CANT_GET_NOW,
|
||||
/* 3 */ CANBUY_RESULT_NEED_BOTTLE,
|
||||
/* 4 */ CANBUY_RESULT_NEED_RUPEES,
|
||||
/* 5 */ CANBUY_RESULT_CANT_GET_NOW_5
|
||||
} EnGirlACanBuyResult;
|
||||
|
||||
#endif
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
*/
|
||||
|
||||
#include "z_en_gm.h"
|
||||
#include "objects/object_oF1d_map/object_oF1d_map.h"
|
||||
#include "vt.h"
|
||||
|
||||
#define FLAGS 0x00000019
|
||||
|
@ -26,8 +27,6 @@ void EnGm_ProcessChoiceIndex(EnGm* this, GlobalContext* globalCtx);
|
|||
void func_80A3DF00(EnGm* this, GlobalContext* globalCtx);
|
||||
void func_80A3DF60(EnGm* this, GlobalContext* globalCtx);
|
||||
|
||||
extern UNK_TYPE D_0600DE80[];
|
||||
extern FlexSkeletonHeader D_0600FEF0;
|
||||
extern AnimationHeader D_060002B8;
|
||||
|
||||
const ActorInit En_Gm_InitVars = {
|
||||
|
@ -108,7 +107,7 @@ s32 func_80A3D7C8(void) {
|
|||
void func_80A3D838(EnGm* this, GlobalContext* globalCtx) {
|
||||
if (Object_IsLoaded(&globalCtx->objectCtx, this->objGmBankIndex)) {
|
||||
this->actor.flags &= ~0x10;
|
||||
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_0600FEF0, NULL, this->jointTable, this->morphTable, 18);
|
||||
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &gGoronSkel, NULL, this->jointTable, this->morphTable, 18);
|
||||
gSegments[6] = VIRTUAL_TO_PHYSICAL(globalCtx->objectCtx.status[this->objGmBankIndex].segment);
|
||||
Animation_Change(&this->skelAnime, &D_060002B8, 1.0f, 0.0f, Animation_GetLastFrame(&D_060002B8), ANIMMODE_LOOP,
|
||||
0.0f);
|
||||
|
@ -319,7 +318,7 @@ void func_80A3E090(EnGm* this) {
|
|||
}
|
||||
|
||||
void EnGm_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
static UNK_PTR eyeTextures[] = { 0x0600CE80, 0x0600D280, 0x0600D680 };
|
||||
static UNK_PTR eyeTextures[] = { gGoronCsEyeOpenTex, gGoronCsEyeHalfTex, gGoronCsEyeClosedTex };
|
||||
EnGm* this = THIS;
|
||||
s32 pad;
|
||||
|
||||
|
@ -327,7 +326,7 @@ void EnGm_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
|
||||
func_80093D18(globalCtx->state.gfxCtx);
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(eyeTextures[this->eyeTexIndex]));
|
||||
gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(D_0600DE80));
|
||||
gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(gGoronCsMouthNeutralTex));
|
||||
SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
|
||||
NULL, NULL, &this->actor);
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#include "z_en_go.h"
|
||||
#include "overlays/actors/ovl_En_Bom/z_en_bom.h"
|
||||
#include "objects/gameplay_keep/gameplay_keep.h"
|
||||
#include "objects/object_oF1d_map/object_oF1d_map.h"
|
||||
|
||||
#define FLAGS 0x00000039
|
||||
|
||||
|
@ -34,17 +35,6 @@ void EnGo_AddDust(EnGo* this, Vec3f* pos, Vec3f* velocity, Vec3f* accel, u8 init
|
|||
void EnGo_UpdateDust(EnGo* this);
|
||||
void EnGo_DrawDust(EnGo* this, GlobalContext* globalCtx);
|
||||
|
||||
extern AnimationHeader D_060029A8;
|
||||
extern AnimationHeader D_06004930;
|
||||
extern Gfx D_0600BD80[];
|
||||
extern Gfx D_0600C140[];
|
||||
extern u64 D_0600CE80[];
|
||||
extern u64 D_0600DE80[];
|
||||
extern Gfx D_0600FD40[];
|
||||
extern Gfx D_0600FD50[];
|
||||
extern FlexSkeletonHeader D_0600FEF0;
|
||||
extern AnimationHeader D_06010590;
|
||||
|
||||
const ActorInit En_Go_InitVars = {
|
||||
ACTOR_EN_GO,
|
||||
ACTORCAT_NPC,
|
||||
|
@ -89,10 +79,10 @@ typedef struct {
|
|||
} EnGoAnimation;
|
||||
|
||||
static EnGoAnimation sAnimationEntries[] = {
|
||||
{ &D_06004930, 0.0f, ANIMMODE_LOOP_INTERP, 0.0f },
|
||||
{ &D_06004930, 0.0f, ANIMMODE_LOOP_INTERP, -10.0f },
|
||||
{ &D_060029A8, 1.0f, ANIMMODE_LOOP_INTERP, -10.0f },
|
||||
{ &D_06010590, 1.0f, ANIMMODE_LOOP_INTERP, -10.0f },
|
||||
{ &gGoronAnim_004930, 0.0f, ANIMMODE_LOOP_INTERP, 0.0f },
|
||||
{ &gGoronAnim_004930, 0.0f, ANIMMODE_LOOP_INTERP, -10.0f },
|
||||
{ &gGoronAnim_0029A8, 1.0f, ANIMMODE_LOOP_INTERP, -10.0f },
|
||||
{ &gGoronAnim_010590, 1.0f, ANIMMODE_LOOP_INTERP, -10.0f },
|
||||
};
|
||||
|
||||
void EnGo_SetupAction(EnGo* this, EnGoActionFunc actionFunc) {
|
||||
|
@ -463,10 +453,10 @@ void EnGo_ReverseAnimation(EnGo* this) {
|
|||
void EnGo_UpdateShadow(EnGo* this) {
|
||||
s16 shadowAlpha;
|
||||
f32 currentFrame = this->skelAnime.curFrame;
|
||||
s16 shadowAlphaTarget =
|
||||
(this->skelAnime.animation == &D_06004930 && currentFrame > 32.0f) || this->skelAnime.animation != &D_06004930
|
||||
? 255
|
||||
: 0;
|
||||
s16 shadowAlphaTarget = (this->skelAnime.animation == &gGoronAnim_004930 && currentFrame > 32.0f) ||
|
||||
this->skelAnime.animation != &gGoronAnim_004930
|
||||
? 255
|
||||
: 0;
|
||||
|
||||
shadowAlpha = this->actor.shape.shadowAlpha;
|
||||
Math_SmoothStepToS(&shadowAlpha, shadowAlphaTarget, 10, 60, 1);
|
||||
|
@ -636,7 +626,7 @@ void EnGo_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
Vec3f D_80A41BA8 = { 0.0f, 0.0f, 0.0f }; // unused
|
||||
|
||||
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f);
|
||||
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_0600FEF0, NULL, 0, 0, 0);
|
||||
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &gGoronSkel, NULL, 0, 0, 0);
|
||||
Collider_InitCylinder(globalCtx, &this->collider);
|
||||
Collider_SetCylinder(globalCtx, &this->collider, &this->actor, &sCylinderInit);
|
||||
CollisionCheck_SetInfo2(&this->actor.colChkInfo, DamageTable_Get(0x16), &sColChkInfoInit);
|
||||
|
@ -669,7 +659,7 @@ void EnGo_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
}
|
||||
break;
|
||||
case 0x10:
|
||||
this->skelAnime.curFrame = Animation_GetLastFrame(&D_06004930);
|
||||
this->skelAnime.curFrame = Animation_GetLastFrame(&gGoronAnim_004930);
|
||||
Actor_SetScale(&this->actor, 0.01f);
|
||||
EnGo_SetupAction(this, EnGo_FireGenericActionFunc);
|
||||
break;
|
||||
|
@ -846,7 +836,7 @@ void func_80A405CC(EnGo* this, GlobalContext* globalCtx) {
|
|||
f32 lastFrame;
|
||||
f32 frame;
|
||||
|
||||
lastFrame = Animation_GetLastFrame(&D_06004930);
|
||||
lastFrame = Animation_GetLastFrame(&gGoronAnim_004930);
|
||||
Math_SmoothStepToF(&this->skelAnime.playSpeed, (this->actor.params & 0xF0) == 0x90 ? 0.5f : 1.0f, 0.1f, 1000.0f,
|
||||
0.1f);
|
||||
|
||||
|
@ -931,13 +921,13 @@ void func_80A408D8(EnGo* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80A40A54(EnGo* this, GlobalContext* globalCtx) {
|
||||
f32 float1 = ((f32)0x8000 / Animation_GetLastFrame(&D_06010590));
|
||||
f32 float1 = ((f32)0x8000 / Animation_GetLastFrame(&gGoronAnim_010590));
|
||||
f32 float2 = this->skelAnime.curFrame * float1;
|
||||
|
||||
this->actor.speedXZ = Math_SinS((s16)float2);
|
||||
if (EnGo_FollowPath(this, globalCtx) && this->unk_218 == 0) {
|
||||
EnGo_ChangeAnimation(this, 1);
|
||||
this->skelAnime.curFrame = Animation_GetLastFrame(&D_06004930);
|
||||
this->skelAnime.curFrame = Animation_GetLastFrame(&gGoronAnim_004930);
|
||||
this->actor.speedXZ = 0.0f;
|
||||
EnGo_SetupAction(this, EnGo_BiggoronActionFunc);
|
||||
}
|
||||
|
@ -1019,7 +1009,7 @@ void EnGo_Eyedrops(EnGo* this, GlobalContext* globalCtx) {
|
|||
void func_80A40DCC(EnGo* this, GlobalContext* globalCtx) {
|
||||
if (this->unk_1E0.unk_00 == 2) {
|
||||
EnGo_ChangeAnimation(this, 1);
|
||||
this->skelAnime.curFrame = Animation_GetLastFrame(&D_06004930);
|
||||
this->skelAnime.curFrame = Animation_GetLastFrame(&gGoronAnim_004930);
|
||||
func_80106CCC(globalCtx);
|
||||
EnGo_SetupAction(this, EnGo_GetItem);
|
||||
EnGo_GetItem(this, globalCtx);
|
||||
|
@ -1063,7 +1053,7 @@ void EnGo_DrawCurledUp(EnGo* this, GlobalContext* globalCtx) {
|
|||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_go.c", 2326),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
gSPDisplayList(POLY_OPA_DISP++, D_0600BD80);
|
||||
gSPDisplayList(POLY_OPA_DISP++, gGoronDL_00BD80);
|
||||
|
||||
Matrix_MultVec3f(&D_80A41BB4, &this->actor.focus.pos);
|
||||
Matrix_Pop();
|
||||
|
@ -1082,7 +1072,7 @@ void EnGo_DrawRolling(EnGo* this, GlobalContext* globalCtx) {
|
|||
MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_go.c", 2368),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_OPA_DISP++, D_0600C140);
|
||||
gSPDisplayList(POLY_OPA_DISP++, gGoronDL_00C140);
|
||||
Matrix_MultVec3f(&D_80A41BC0, &this->actor.focus.pos);
|
||||
Matrix_Pop();
|
||||
|
||||
|
@ -1151,8 +1141,8 @@ void EnGo_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
} else {
|
||||
func_800943C8(globalCtx->state.gfxCtx);
|
||||
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(D_0600CE80));
|
||||
gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(D_0600DE80));
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(gGoronCsEyeOpenTex));
|
||||
gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(gGoronCsMouthNeutralTex));
|
||||
|
||||
SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable,
|
||||
this->skelAnime.dListCount, EnGo_OverrideLimbDraw, EnGo_PostLimbDraw, &this->actor);
|
||||
|
@ -1225,7 +1215,7 @@ void EnGo_DrawDust(EnGo* this, GlobalContext* globalCtx) {
|
|||
if (dustEffect->type) {
|
||||
if (!firstDone) {
|
||||
POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 0);
|
||||
gSPDisplayList(POLY_XLU_DISP++, D_0600FD40);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gGoronDL_00FD40);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, 100, 60, 20, 0);
|
||||
firstDone = true;
|
||||
}
|
||||
|
@ -1241,7 +1231,7 @@ void EnGo_DrawDust(EnGo* this, GlobalContext* globalCtx) {
|
|||
|
||||
index = dustEffect->timer * (8.0f / dustEffect->initialTimer);
|
||||
gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(dustTex[index]));
|
||||
gSPDisplayList(POLY_XLU_DISP++, D_0600FD50);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gGoronDL_00FD50);
|
||||
}
|
||||
}
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_go.c", 2678);
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#include "z_en_go2.h"
|
||||
#include "overlays/actors/ovl_En_Bom/z_en_bom.h"
|
||||
#include "objects/gameplay_keep/gameplay_keep.h"
|
||||
#include "objects/object_oF1d_map/object_oF1d_map.h"
|
||||
|
||||
#define FLAGS 0x00000039
|
||||
|
||||
|
@ -65,30 +66,6 @@ void EnGo2_BiggoronEyedrops(EnGo2* this, GlobalContext* globalCtx);
|
|||
void EnGo2_GoronLinkStopRolling(EnGo2* this, GlobalContext* globalCtx);
|
||||
void EnGo2_GoronFireGenericAction(EnGo2* this, GlobalContext* globalCtx);
|
||||
|
||||
extern AnimationHeader D_06000750;
|
||||
extern AnimationHeader D_06000D5C;
|
||||
extern AnimationHeader D_0600161C;
|
||||
extern AnimationHeader D_06001A00;
|
||||
extern AnimationHeader D_060021D0;
|
||||
extern AnimationHeader D_060029A8;
|
||||
extern AnimationHeader D_06002D80;
|
||||
extern AnimationHeader D_06003768;
|
||||
extern AnimationHeader D_060038E4;
|
||||
extern AnimationHeader D_06004930;
|
||||
extern AnimationHeader D_06010590;
|
||||
extern Gfx D_0600BD80[];
|
||||
extern Gfx D_0600C140[];
|
||||
extern u64 D_0600CE80[];
|
||||
extern u64 D_0600D280[];
|
||||
extern u64 D_0600D680[];
|
||||
extern u64 D_0600DA80[];
|
||||
extern u64 D_0600DE80[];
|
||||
extern u64 D_0600E680[];
|
||||
extern Gfx D_0600FD40[];
|
||||
extern Gfx D_0600FD50[];
|
||||
|
||||
extern FlexSkeletonHeader D_0600FEF0;
|
||||
|
||||
static u64* sDustTex[] = { gDust8Tex, gDust7Tex, gDust6Tex, gDust5Tex, gDust4Tex, gDust3Tex, gDust2Tex, gDust1Tex };
|
||||
|
||||
static Vec3f sPos = { 0.0f, 0.0f, 0.0f };
|
||||
|
@ -151,13 +128,13 @@ static f32 D_80A482D8[14][2] = {
|
|||
};
|
||||
|
||||
static struct_80034EC0_Entry sAnimations[] = {
|
||||
{ &D_06004930, 0.0f, 0.0f, -1.0f, 0x00, 0.0f }, { &D_06004930, 0.0f, 0.0f, -1.0f, 0x00, -8.0f },
|
||||
{ &D_060029A8, 1.0f, 0.0f, -1.0f, 0x00, -8.0f }, { &D_06010590, 1.0f, 0.0f, -1.0f, 0x00, -8.0f },
|
||||
{ &D_06003768, 1.0f, 0.0f, -1.0f, 0x00, -8.0f }, { &D_060038E4, 1.0f, 0.0f, -1.0f, 0x02, -8.0f },
|
||||
{ &D_06002D80, 1.0f, 0.0f, -1.0f, 0x02, -8.0f }, { &D_0600161C, 1.0f, 0.0f, -1.0f, 0x00, -8.0f },
|
||||
{ &D_06001A00, 1.0f, 0.0f, -1.0f, 0x00, -8.0f }, { &D_060021D0, 1.0f, 0.0f, -1.0f, 0x00, -8.0f },
|
||||
{ &D_06004930, 0.0f, 0.0f, -1.0f, 0x01, -8.0f }, { &D_06000750, 1.0f, 0.0f, -1.0f, 0x00, -8.0f },
|
||||
{ &D_06000D5C, 1.0f, 0.0f, -1.0f, 0x00, -8.0f },
|
||||
{ &gGoronAnim_004930, 0.0f, 0.0f, -1.0f, 0x00, 0.0f }, { &gGoronAnim_004930, 0.0f, 0.0f, -1.0f, 0x00, -8.0f },
|
||||
{ &gGoronAnim_0029A8, 1.0f, 0.0f, -1.0f, 0x00, -8.0f }, { &gGoronAnim_010590, 1.0f, 0.0f, -1.0f, 0x00, -8.0f },
|
||||
{ &gGoronAnim_003768, 1.0f, 0.0f, -1.0f, 0x00, -8.0f }, { &gGoronAnim_0038E4, 1.0f, 0.0f, -1.0f, 0x02, -8.0f },
|
||||
{ &gGoronAnim_002D80, 1.0f, 0.0f, -1.0f, 0x02, -8.0f }, { &gGoronAnim_00161C, 1.0f, 0.0f, -1.0f, 0x00, -8.0f },
|
||||
{ &gGoronAnim_001A00, 1.0f, 0.0f, -1.0f, 0x00, -8.0f }, { &gGoronAnim_0021D0, 1.0f, 0.0f, -1.0f, 0x00, -8.0f },
|
||||
{ &gGoronAnim_004930, 0.0f, 0.0f, -1.0f, 0x01, -8.0f }, { &gGoronAnim_000750, 1.0f, 0.0f, -1.0f, 0x00, -8.0f },
|
||||
{ &gGoronAnim_000D5C, 1.0f, 0.0f, -1.0f, 0x00, -8.0f },
|
||||
};
|
||||
|
||||
static EnGo2DustEffectData sDustEffectData[2][4] = {
|
||||
|
@ -241,7 +218,7 @@ void EnGo2_DrawDust(EnGo2* this, GlobalContext* globalCtx) {
|
|||
if (dustEffect->type) {
|
||||
if (!firstDone) {
|
||||
POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 0);
|
||||
gSPDisplayList(POLY_XLU_DISP++, D_0600FD40);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gGoronDL_00FD40);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, 100, 60, 20, 0);
|
||||
firstDone = true;
|
||||
}
|
||||
|
@ -256,7 +233,7 @@ void EnGo2_DrawDust(EnGo2* this, GlobalContext* globalCtx) {
|
|||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
index = dustEffect->timer * (8.0f / dustEffect->initialTimer);
|
||||
gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sDustTex[index]));
|
||||
gSPDisplayList(POLY_XLU_DISP++, D_0600FD50);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gGoronDL_00FD50);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1092,7 +1069,8 @@ void func_80A45288(EnGo2* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80A45360(EnGo2* this, f32* alpha) {
|
||||
f32 alphaTarget = (this->skelAnime.animation == &D_06004930) && (this->skelAnime.curFrame <= 32.0f) ? 0.0f : 255.0f;
|
||||
f32 alphaTarget =
|
||||
(this->skelAnime.animation == &gGoronAnim_004930) && (this->skelAnime.curFrame <= 32.0f) ? 0.0f : 255.0f;
|
||||
|
||||
Math_ApproachF(alpha, alphaTarget, 0.4f, 100.0f);
|
||||
this->actor.shape.shadowAlpha = (u8)(u32)*alpha;
|
||||
|
@ -1257,7 +1235,7 @@ void EnGo2_EyeMouthTexState(EnGo2* this) {
|
|||
}
|
||||
|
||||
void EnGo2_SitDownAnimation(EnGo2* this) {
|
||||
if ((this->skelAnime.playSpeed != 0.0f) && (this->skelAnime.animation == &D_06004930)) {
|
||||
if ((this->skelAnime.playSpeed != 0.0f) && (this->skelAnime.animation == &gGoronAnim_004930)) {
|
||||
if (this->skelAnime.playSpeed > 0.0f && this->skelAnime.curFrame == 14.0f) {
|
||||
if ((this->actor.params & 0x1F) != GORON_DMT_BIGGORON) {
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_GOLON_SIT_DOWN);
|
||||
|
@ -1436,7 +1414,7 @@ void EnGo2_GoronLinkAnimation(EnGo2* this, GlobalContext* globalCtx) {
|
|||
if ((this->actor.params & 0x1F) == GORON_CITY_LINK) {
|
||||
if ((this->actor.textId == 0x3035 && this->unk_20C == 0) ||
|
||||
(this->actor.textId == 0x3036 && this->unk_20C == 0)) {
|
||||
if (this->skelAnime.animation != &D_06000D5C) {
|
||||
if (this->skelAnime.animation != &gGoronAnim_000D5C) {
|
||||
animation = 12;
|
||||
this->eyeMouthTexState = 0;
|
||||
}
|
||||
|
@ -1444,13 +1422,13 @@ void EnGo2_GoronLinkAnimation(EnGo2* this, GlobalContext* globalCtx) {
|
|||
|
||||
if ((this->actor.textId == 0x3032 && this->unk_20C == 12) || (this->actor.textId == 0x3033) ||
|
||||
(this->actor.textId == 0x3035 && this->unk_20C == 6)) {
|
||||
if (this->skelAnime.animation != &D_06000750) {
|
||||
if (this->skelAnime.animation != &gGoronAnim_000750) {
|
||||
animation = 11;
|
||||
this->eyeMouthTexState = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (this->skelAnime.animation == &D_06000750) {
|
||||
if (this->skelAnime.animation == &gGoronAnim_000750) {
|
||||
if (this->skelAnime.curFrame == 20.0f) {
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_GOLON_CRY);
|
||||
}
|
||||
|
@ -1499,7 +1477,7 @@ void EnGo2_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
s32 pad;
|
||||
|
||||
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 28.0f);
|
||||
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_0600FEF0, NULL, this->jointTable, this->morphTable, 18);
|
||||
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &gGoronSkel, NULL, this->jointTable, this->morphTable, 18);
|
||||
Collider_InitCylinder(globalCtx, &this->collider);
|
||||
Collider_SetCylinder(globalCtx, &this->collider, &this->actor, &sCylinderInit);
|
||||
CollisionCheck_SetInfo2(&this->actor.colChkInfo, NULL, &sColChkInfoInit);
|
||||
|
@ -1978,7 +1956,7 @@ s32 EnGo2_DrawCurledUp(EnGo2* this, GlobalContext* globalCtx) {
|
|||
func_80093D18(globalCtx->state.gfxCtx);
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_go2.c", 2884),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_OPA_DISP++, D_0600BD80);
|
||||
gSPDisplayList(POLY_OPA_DISP++, gGoronDL_00BD80);
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_go2.c", 2889);
|
||||
Matrix_MultVec3f(&D_80A48554, &this->actor.focus.pos);
|
||||
|
||||
|
@ -1996,7 +1974,7 @@ s32 EnGo2_DrawRolling(EnGo2* this, GlobalContext* globalCtx) {
|
|||
Matrix_RotateRPY((globalCtx->state.frames * ((s16)speedXZ * 1400)), 0, this->actor.shape.rot.z, MTXMODE_APPLY);
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_go2.c", 2926),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_OPA_DISP++, D_0600C140);
|
||||
gSPDisplayList(POLY_OPA_DISP++, gGoronDL_00C140);
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_go2.c", 2930);
|
||||
Matrix_MultVec3f(&D_80A48560, &this->actor.focus.pos);
|
||||
return 1;
|
||||
|
@ -2043,8 +2021,8 @@ void EnGo2_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Ve
|
|||
|
||||
void EnGo2_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
EnGo2* this = THIS;
|
||||
u64* eyeTextures[] = { D_0600DA80, D_0600CE80, D_0600D280, D_0600D680 };
|
||||
u64* mouthTextures[] = { D_0600DE80, D_0600E680 };
|
||||
u64* eyeTextures[] = { gGoronCsEyeClosed2Tex, gGoronCsEyeOpenTex, gGoronCsEyeHalfTex, gGoronCsEyeClosedTex };
|
||||
u64* mouthTextures[] = { gGoronCsMouthNeutralTex, gGoronCsMouthSmileTex };
|
||||
|
||||
EnGo2_UpdateDust(this);
|
||||
Matrix_Push();
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -3,14 +3,141 @@
|
|||
|
||||
#include "ultra64.h"
|
||||
#include "global.h"
|
||||
#include "overlays/actors/ovl_En_Tana/z_en_tana.h"
|
||||
#include "overlays/actors/ovl_En_GirlA/z_en_girla.h"
|
||||
|
||||
struct EnOssan;
|
||||
|
||||
typedef void (*EnOssanActionFunc)(struct EnOssan*, GlobalContext*);
|
||||
typedef void (*EnOssanTalkOwnerFunc)(GlobalContext*);
|
||||
typedef void (*EnOssanInitFunc)(struct EnOssan*, GlobalContext*);
|
||||
typedef s16 (*EnOssanGetGirlAParamsFunc)(s16);
|
||||
typedef void (*EnOssanStateFunc)(struct EnOssan*, GlobalContext*, Player*);
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u32 stickColorR;
|
||||
/* 0x04 */ u32 stickColorG;
|
||||
/* 0x08 */ u32 stickColorB;
|
||||
/* 0x0C */ u32 stickColorA;
|
||||
/* 0x10 */ f32 stickTexX;
|
||||
/* 0x14 */ f32 stickTexY;
|
||||
/* 0x18 */ u32 arrowColorR;
|
||||
/* 0x1C */ u32 arrowColorG;
|
||||
/* 0x20 */ u32 arrowColorB;
|
||||
/* 0x24 */ u32 arrowColorA;
|
||||
/* 0x28 */ f32 arrowTexX;
|
||||
/* 0x2C */ f32 arrowTexY;
|
||||
/* 0x30 */ f32 z;
|
||||
/* 0x34 */ s32 isEnabled;
|
||||
} StickDirectionPrompt; // size = 0x38
|
||||
|
||||
#define ColChanMix(c1, c2, m) (c1 - (s32)(c2 * m)) & 0xFF
|
||||
|
||||
typedef struct EnOssan {
|
||||
/* 0x0000 */ Actor actor;
|
||||
/* 0x014C */ char unk_14C[0x18C];
|
||||
/* 0x014C */ SkelAnime skelAnime;
|
||||
/* 0x0190 */ EnOssanActionFunc actionFunc;
|
||||
/* 0x0194 */ void (*obj3ToSeg6Func)(struct EnOssan*, GlobalContext*);
|
||||
/* 0x0198 */ ColliderCylinder collider; // unused
|
||||
/* 0x01E4 */ s16 timer;
|
||||
/* 0x01E6 */ s16 delayTimer;
|
||||
/* 0x01E8 */ s8 objBankIndex1;
|
||||
/* 0x01E9 */ s8 objBankIndex2;
|
||||
/* 0x01EA */ s8 objBankIndex3;
|
||||
/* 0x01EB */ u8 happyMaskShopState;
|
||||
/* 0x01EC */ u8 happyMaskShopkeeperEyeIdx;
|
||||
/* 0x01EE */ s16 headRot;
|
||||
/* 0x01F0 */ s16 headTargetRot;
|
||||
/* 0x01F2 */ s16 eyeTextureIdx;
|
||||
/* 0x01F4 */ s16 blinkTimer;
|
||||
/* 0x01F8 */ void (*blinkFunc)(struct EnOssan*);
|
||||
/* 0x01FC */ s16 stateFlag;
|
||||
/* 0x01FE */ s16 tempStateFlag;
|
||||
/* 0x0200 */ EnGirlA* shelfSlots[8];
|
||||
// Shelves are indexed as such:
|
||||
/* 7 5 3 1 */
|
||||
/* 6 4 2 0 */
|
||||
/* 0x0220 */ EnTana* shelves;
|
||||
/* 0x0224 */ s32 stickAccumX;
|
||||
/* 0x0228 */ s32 stickAccumY;
|
||||
/* 0x022C */ u8 moveHorizontal;
|
||||
/* 0x022D */ u8 moveVertical;
|
||||
/* 0x0230 */ f32 cursorX;
|
||||
/* 0x0234 */ f32 cursorY;
|
||||
/* 0x0238 */ f32 cursorZ;
|
||||
/* 0x023C */ u32 cursorColorR;
|
||||
/* 0x0240 */ u32 cursorColorG;
|
||||
/* 0x0244 */ u32 cursorColorB;
|
||||
/* 0x0248 */ u32 cursorColorA;
|
||||
/* 0x024C */ f32 cursorAnimTween;
|
||||
/* 0x0250 */ u8 cursorAnimState;
|
||||
/* 0x0251 */ u8 drawCursor;
|
||||
/* 0x0252 */ u8 cursorIndex;
|
||||
/* 0x0254 */ StickDirectionPrompt stickLeftPrompt;
|
||||
/* 0x028C */ StickDirectionPrompt stickRightPrompt;
|
||||
/* 0x02C4 */ f32 arrowAnimTween;
|
||||
/* 0x02C4 */ f32 stickAnimTween;
|
||||
/* 0x02CC */ u8 arrowAnimState;
|
||||
/* 0x02CD */ u8 stickAnimState;
|
||||
/* 0x02D0 */ f32 shopItemSelectedTween;
|
||||
/* 0x02D4 */ f32 cameraFaceAngle; // stored in degrees
|
||||
} EnOssan; // size = 0x02D8
|
||||
|
||||
extern const ActorInit En_Ossan_InitVars;
|
||||
|
||||
typedef enum {
|
||||
/* 00 */ OSSAN_TYPE_KOKIRI,
|
||||
/* 01 */ OSSAN_TYPE_KAKARIKO_POTION,
|
||||
/* 02 */ OSSAN_TYPE_BOMBCHUS,
|
||||
/* 03 */ OSSAN_TYPE_MARKET_POTION,
|
||||
/* 04 */ OSSAN_TYPE_BAZAAR,
|
||||
/* 05 */ OSSAN_TYPE_ADULT,
|
||||
/* 06 */ OSSAN_TYPE_TALON,
|
||||
/* 07 */ OSSAN_TYPE_ZORA,
|
||||
/* 08 */ OSSAN_TYPE_GORON,
|
||||
/* 09 */ OSSAN_TYPE_INGO,
|
||||
/* 10 */ OSSAN_TYPE_MASK
|
||||
} OssanType;
|
||||
|
||||
typedef enum {
|
||||
/* 00 */ OSSAN_STATE_IDLE,
|
||||
/* 01 */ OSSAN_STATE_START_CONVERSATION,
|
||||
/* 02 */ OSSAN_STATE_FACING_SHOPKEEPER,
|
||||
/* 03 */ OSSAN_STATE_TALKING_TO_SHOPKEEPER,
|
||||
/* 04 */ OSSAN_STATE_LOOK_SHELF_LEFT,
|
||||
/* 05 */ OSSAN_STATE_LOOK_SHELF_RIGHT,
|
||||
/* 06 */ OSSAN_STATE_BROWSE_LEFT_SHELF,
|
||||
/* 07 */ OSSAN_STATE_BROWSE_RIGHT_SHELF,
|
||||
/* 08 */ OSSAN_STATE_LOOK_SHOPKEEPER, // From looking at shelf
|
||||
/* 09 */ OSSAN_STATE_SELECT_ITEM, // Select most items
|
||||
/* 10 */ OSSAN_STATE_SELECT_ITEM_MILK_BOTTLE,
|
||||
/* 11 */ OSSAN_STATE_SELECT_ITEM_WEIRD_EGG,
|
||||
/* 12 */ OSSAN_STATE_SELECT_ITEM_UNIMPLEMENTED, // Handles two unfinished shop items
|
||||
/* 13 */ OSSAN_STATE_SELECT_ITEM_BOMBS,
|
||||
/* 14 */ OSSAN_STATE_CANT_GET_ITEM,
|
||||
/* 15 */ OSSAN_STATE_GIVE_ITEM_FANFARE, // Give Item, hold it up with fanfare
|
||||
/* 16 */ OSSAN_STATE_ITEM_PURCHASED,
|
||||
/* 17 */ OSSAN_STATE_CONTINUE_SHOPPING_PROMPT,
|
||||
/* 18 */ OSSAN_STATE_GIVE_LON_LON_MILK,
|
||||
/* 19 */ OSSAN_STATE_DISPLAY_ONLY_BOMB_DIALOG, // Turn to shopkeeper, talk about fake bombs
|
||||
/* 20 */ OSSAN_STATE_WAIT_FOR_DISPLAY_ONLY_BOMB_DIALOG, // Can't Get Goron City Bombs
|
||||
/* 21 */ OSSAN_STATE_21, // Unused
|
||||
/* 22 */ OSSAN_STATE_22, // Follows OSSAN_STATE_21
|
||||
/* 23 */ OSSAN_STATE_QUICK_BUY,
|
||||
/* 24 */ OSSAN_STATE_SELECT_ITEM_MASK,
|
||||
/* 25 */ OSSAN_STATE_LEND_MASK_OF_TRUTH, // First time all masks are sold
|
||||
/* 26 */ OSSAN_STATE_DISCOUNT_DIALOG // Hylian Shield Discount
|
||||
} EnOssanState;
|
||||
|
||||
typedef enum {
|
||||
OSSAN_HAPPY_STATE_REQUEST_PAYMENT_KEATON_MASK,
|
||||
OSSAN_HAPPY_STATE_REQUEST_PAYMENT_SPOOKY_MASK,
|
||||
OSSAN_HAPPY_STATE_REQUEST_PAYMENT_SKULL_MASK,
|
||||
OSSAN_HAPPY_STATE_REQUEST_PAYMENT_BUNNY_HOOD,
|
||||
OSSAN_HAPPY_STATE_BORROWED_FIRST_MASK,
|
||||
OSSAN_HAPPY_STATE_ANGRY, // Give me my money man!
|
||||
OSSAN_HAPPY_STATE_ALL_MASKS_SOLD, // All masks have been sold
|
||||
OSSAN_HAPPY_STATE_NONE = 8 // No Action / Payment received!
|
||||
} EnOssanHappyMaskState;
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#include "z_en_syateki_man.h"
|
||||
#include "vt.h"
|
||||
#include "overlays/actors/ovl_En_Syateki_Itm/z_en_syateki_itm.h"
|
||||
#include "objects/object_ossan/object_ossan.h"
|
||||
|
||||
#define FLAGS 0x08000019
|
||||
|
||||
|
@ -43,10 +44,6 @@ void EnSyatekiMan_Blink(EnSyatekiMan* this);
|
|||
|
||||
void EnSyatekiMan_SetBgm(void);
|
||||
|
||||
extern AnimationHeader D_06000338;
|
||||
extern Gfx D_06007E28[];
|
||||
extern FlexSkeletonHeader D_06009B38;
|
||||
|
||||
const ActorInit En_Syateki_Man_InitVars = {
|
||||
ACTOR_EN_SYATEKI_MAN,
|
||||
ACTORCAT_NPC,
|
||||
|
@ -66,6 +63,7 @@ static u16 sBgmList[] = {
|
|||
0x48, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F, 0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59,
|
||||
0x5A, 0x5B, 0x5C, 0x5D, 0x6D, 0x5E, 0x5E, 0x5F, 0x60, 0x61, 0x6D, 0x62, 0x63, 0x64, 0x65, 0x66,
|
||||
};
|
||||
|
||||
static s16 sTextIds[] = { 0x2B, 0x2E, 0xC8, 0x2D };
|
||||
|
||||
static s16 sTextBoxCount[] = { 4, 5, 5, 5 };
|
||||
|
@ -79,7 +77,8 @@ void EnSyatekiMan_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ 親父登場!!むほほほほほほほーん ☆☆☆☆☆ \n" VT_RST);
|
||||
this->actor.targetMode = 1;
|
||||
Actor_SetScale(&this->actor, 0.01f);
|
||||
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_06009B38, &D_06000338, this->jointTable, this->morphTable, 9);
|
||||
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &gObjectOssanSkel, &gObjectOssanAnim_000338, this->jointTable,
|
||||
this->morphTable, 9);
|
||||
if (LINK_IS_CHILD) {
|
||||
this->headRot.z = 20;
|
||||
}
|
||||
|
@ -94,9 +93,9 @@ void EnSyatekiMan_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void EnSyatekiMan_Start(EnSyatekiMan* this, GlobalContext* globalCtx) {
|
||||
f32 lastFrame = Animation_GetLastFrame(&D_06000338);
|
||||
f32 lastFrame = Animation_GetLastFrame(&gObjectOssanAnim_000338);
|
||||
|
||||
Animation_Change(&this->skelAnime, &D_06000338, 1.0f, 0.0f, (s16)lastFrame, ANIMMODE_LOOP, -10.0f);
|
||||
Animation_Change(&this->skelAnime, &gObjectOssanAnim_000338, 1.0f, 0.0f, (s16)lastFrame, ANIMMODE_LOOP, -10.0f);
|
||||
this->actionFunc = EnSyatekiMan_SetupIdle;
|
||||
}
|
||||
|
||||
|
@ -403,7 +402,7 @@ s32 EnSyatekiMan_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx**
|
|||
rot->x += this->bodyRot.y;
|
||||
}
|
||||
if (limbIndex == 8) {
|
||||
*dList = D_06007E28;
|
||||
*dList = gObjectOssanEnSyatekiManDL_007E28;
|
||||
turnDirection = 1;
|
||||
if (this->gameResult == SYATEKI_RESULT_REFUSE) {
|
||||
turnDirection = -1;
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
*/
|
||||
|
||||
#include "z_en_tana.h"
|
||||
#include "objects/object_shop_dungen/object_shop_dungen.h"
|
||||
|
||||
#define FLAGS 0x00000009
|
||||
|
||||
|
@ -13,8 +14,8 @@
|
|||
void EnTana_Init(Actor* thisx, GlobalContext* globalCtx);
|
||||
void EnTana_Destroy(Actor* thisx, GlobalContext* globalCtx);
|
||||
void EnTana_Update(Actor* thisx, GlobalContext* globalCtx);
|
||||
void func_80B17FC4(Actor* thisx, GlobalContext* globalCtx);
|
||||
void func_80B1809C(Actor* thisx, GlobalContext* globalCtx);
|
||||
void EnTana_DrawWoodenShelves(Actor* thisx, GlobalContext* globalCtx);
|
||||
void EnTana_DrawStoneShelves(Actor* thisx, GlobalContext* globalCtx);
|
||||
|
||||
const ActorInit En_Tana_InitVars = {
|
||||
ACTOR_EN_TANA,
|
||||
|
@ -34,21 +35,21 @@ static char* sShelfTypes[] = {
|
|||
};
|
||||
|
||||
static const ActorFunc sDrawFuncs[] = {
|
||||
func_80B17FC4,
|
||||
func_80B1809C,
|
||||
func_80B1809C,
|
||||
EnTana_DrawWoodenShelves,
|
||||
EnTana_DrawStoneShelves,
|
||||
EnTana_DrawStoneShelves,
|
||||
};
|
||||
|
||||
static Gfx* sDLists1[] = {
|
||||
0x06000B80,
|
||||
0x060027E8,
|
||||
0x060027E8,
|
||||
static Gfx* sShelfDLists[] = {
|
||||
gShopDungenWoodenShelvesDL,
|
||||
gShopDungenStoneShelvesDL,
|
||||
gShopDungenStoneShelvesDL,
|
||||
};
|
||||
|
||||
static UNK_PTR sUnkSegments[] = {
|
||||
static void* sStoneTextures[] = {
|
||||
NULL,
|
||||
0x06000E08,
|
||||
0x06001608,
|
||||
gShopDungenStone1Tex,
|
||||
gShopDungenStone2Tex,
|
||||
};
|
||||
|
||||
void EnTana_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
|
@ -66,7 +67,7 @@ void EnTana_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
|||
void EnTana_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
void func_80B17FC4(Actor* thisx, GlobalContext* globalCtx) {
|
||||
void EnTana_DrawWoodenShelves(Actor* thisx, GlobalContext* globalCtx) {
|
||||
EnTana* this = THIS;
|
||||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_tana.c", 148);
|
||||
|
@ -74,21 +75,21 @@ void func_80B17FC4(Actor* thisx, GlobalContext* globalCtx) {
|
|||
func_80093D18(globalCtx->state.gfxCtx);
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_tana.c", 152),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_OPA_DISP++, sDLists1[thisx->params]);
|
||||
gSPDisplayList(POLY_OPA_DISP++, sShelfDLists[thisx->params]);
|
||||
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_tana.c", 157);
|
||||
}
|
||||
|
||||
void func_80B1809C(Actor* thisx, GlobalContext* globalCtx) {
|
||||
void EnTana_DrawStoneShelves(Actor* thisx, GlobalContext* globalCtx) {
|
||||
EnTana* this = THIS;
|
||||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_tana.c", 163);
|
||||
|
||||
func_80093D18(globalCtx->state.gfxCtx);
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sUnkSegments[thisx->params]));
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sStoneTextures[thisx->params]));
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_tana.c", 169),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_OPA_DISP++, sDLists1[thisx->params]);
|
||||
gSPDisplayList(POLY_OPA_DISP++, sShelfDLists[thisx->params]);
|
||||
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_tana.c", 174);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue