mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-07 23:10:22 +00:00
Actor Struct Changes (and a few related things) (#617)
* reformat header * type -> category * done for now i think * some more stuff * first -> head * focus * flag comment * ground -> floor * remove asm, name wrapper funcs * name func, format * review * targetPriority, format * git subrepo pull --force tools/ZAPD subrepo: subdir: "tools/ZAPD" merged: "0305ec2c2" upstream: origin: "https://github.com/zeldaret/ZAPD.git" branch: "master" commit: "0305ec2c2" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo.git" commit: "2f68596" * comment * review * feet flags * horse shadow
This commit is contained in:
parent
20206fba0d
commit
00a5edea71
697 changed files with 8157 additions and 7942 deletions
|
@ -70,7 +70,7 @@ static DemoSaDrawFunc sDrawFuncs[] = {
|
|||
|
||||
const ActorInit Demo_Sa_InitVars = {
|
||||
ACTOR_DEMO_SA,
|
||||
ACTORTYPE_NPC,
|
||||
ACTORCAT_NPC,
|
||||
FLAGS,
|
||||
OBJECT_SA,
|
||||
sizeof(DemoSa),
|
||||
|
@ -128,7 +128,7 @@ void func_8098E530(DemoSa* this) {
|
|||
this->drawConfig = 0;
|
||||
this->alpha = 0;
|
||||
this->unk_1A8 = 0;
|
||||
this->actor.shape.unk_14 = 0;
|
||||
this->actor.shape.shadowAlpha = 0;
|
||||
this->unk_1A0 = 0.0f;
|
||||
}
|
||||
|
||||
|
@ -148,7 +148,7 @@ void func_8098E554(DemoSa* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_8098E5C8(DemoSa* this, GlobalContext* globalCtx) {
|
||||
func_8002E4B4(globalCtx, &this->actor, 75.0f, 30.0f, 30.0f, 5);
|
||||
Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 75.0f, 30.0f, 30.0f, 5);
|
||||
}
|
||||
|
||||
s32 DemoSa_FrameUpdateMatrix(DemoSa* this) {
|
||||
|
@ -184,10 +184,10 @@ void func_8098E6EC(DemoSa* this, GlobalContext* globalCtx, s32 actionIdx) {
|
|||
CsCmdActorAction* npcAction = DemoSa_GetNpcAction(globalCtx, actionIdx);
|
||||
|
||||
if (npcAction != NULL) {
|
||||
this->actor.posRot.pos.x = npcAction->startPos.x;
|
||||
this->actor.posRot.pos.y = npcAction->startPos.y;
|
||||
this->actor.posRot.pos.z = npcAction->startPos.z;
|
||||
this->actor.posRot.rot.y = this->actor.shape.rot.y = npcAction->rot.y;
|
||||
this->actor.world.pos.x = npcAction->startPos.x;
|
||||
this->actor.world.pos.y = npcAction->startPos.y;
|
||||
this->actor.world.pos.z = npcAction->startPos.z;
|
||||
this->actor.world.rot.y = this->actor.shape.rot.y = npcAction->rot.y;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -213,25 +213,25 @@ void func_8098E76C(DemoSa* this, AnimationHeader* animHeaderSeg, u8 arg2, f32 tr
|
|||
|
||||
void func_8098E7FC(DemoSa* this, GlobalContext* globalCtx) {
|
||||
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_0600B1A0, &D_060021D8, NULL, NULL, 0);
|
||||
this->actor.shape.unk_08 = -10000.0f;
|
||||
this->actor.shape.yOffset = -10000.0f;
|
||||
func_8098E508(this, 1);
|
||||
func_8098E51C(this, 0);
|
||||
}
|
||||
|
||||
void func_8098E86C(DemoSa* this, GlobalContext* globalCtx) {
|
||||
Vec3f* posRot = &this->actor.posRot.pos;
|
||||
f32 posX = posRot->x;
|
||||
f32 posY = posRot->y;
|
||||
f32 posZ = posRot->z;
|
||||
Vec3f* world = &this->actor.world.pos;
|
||||
f32 posX = world->x;
|
||||
f32 posY = world->y;
|
||||
f32 posZ = world->z;
|
||||
|
||||
Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_DOOR_WARP1, posX, posY, posZ, 0, 0, 0, 2);
|
||||
}
|
||||
|
||||
void func_8098E8C8(DemoSa* this, GlobalContext* globalCtx) {
|
||||
Player* player = PLAYER;
|
||||
f32 posX = player->actor.posRot.pos.x;
|
||||
f32 posY = player->actor.posRot.pos.y + 80.0f;
|
||||
f32 posZ = player->actor.posRot.pos.z;
|
||||
f32 posX = player->actor.world.pos.x;
|
||||
f32 posY = player->actor.world.pos.y + 80.0f;
|
||||
f32 posZ = player->actor.world.pos.z;
|
||||
|
||||
Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_DEMO_EFFECT, posX, posY, posZ, 0, 0, 0,
|
||||
0xB);
|
||||
|
@ -239,7 +239,7 @@ void func_8098E8C8(DemoSa* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_8098E944(DemoSa* this, GlobalContext* globalCtx) {
|
||||
this->actor.shape.unk_08 += (250.0f / 3.0f);
|
||||
this->actor.shape.yOffset += (250.0f / 3.0f);
|
||||
}
|
||||
|
||||
void func_8098E960(DemoSa* this, GlobalContext* globalCtx) {
|
||||
|
@ -252,7 +252,7 @@ void func_8098E960(DemoSa* this, GlobalContext* globalCtx) {
|
|||
globalCtx->csCtx.segment = D_8099010C;
|
||||
gSaveContext.cutsceneTrigger = 2;
|
||||
Item_Give(globalCtx, ITEM_MEDALLION_FOREST);
|
||||
player->actor.posRot.rot.y = player->actor.shape.rot.y = this->actor.posRot.rot.y + 0x8000;
|
||||
player->actor.world.rot.y = player->actor.shape.rot.y = this->actor.world.rot.y + 0x8000;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -270,9 +270,9 @@ void func_8098E9EC(DemoSa* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_8098EA3C(DemoSa* this) {
|
||||
if (this->actor.shape.unk_08 >= 0.0f) {
|
||||
if (this->actor.shape.yOffset >= 0.0f) {
|
||||
this->action = 3;
|
||||
this->actor.shape.unk_08 = 0.0f;
|
||||
this->actor.shape.yOffset = 0.0f;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -353,7 +353,7 @@ void func_8098ECF4(DemoSa* this, GlobalContext* globalCtx) {
|
|||
SkelAnime_InitFlex(globalCtx, skelAnime, &D_0600B1A0, NULL, NULL, NULL, 0);
|
||||
Animation_Change(skelAnime, &D_06001334, 1.0f, 0.0f, frameCount, ANIMMODE_ONCE, 0.0f);
|
||||
this->action = 7;
|
||||
this->actor.shape.unk_14 = 0;
|
||||
this->actor.shape.shadowAlpha = 0;
|
||||
func_8098E508(this, 2);
|
||||
func_8098E51C(this, 2);
|
||||
}
|
||||
|
@ -372,8 +372,8 @@ void func_8098EE08(void) {
|
|||
}
|
||||
|
||||
void func_8098EE28(DemoSa* this, GlobalContext* globalCtx) {
|
||||
Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_DEMO_6K, this->actor.posRot.pos.x,
|
||||
(kREG(23) + 25.0f) + this->actor.posRot.pos.y, this->actor.posRot.pos.z, 0, 0, 0, 4);
|
||||
Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_DEMO_6K, this->actor.world.pos.x,
|
||||
(kREG(23) + 25.0f) + this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, 4);
|
||||
}
|
||||
|
||||
void func_8098EEA8(DemoSa* this, GlobalContext* globalCtx) {
|
||||
|
@ -381,7 +381,7 @@ void func_8098EEA8(DemoSa* this, GlobalContext* globalCtx) {
|
|||
this->action = 8;
|
||||
this->drawConfig = 2;
|
||||
this->alpha = 0;
|
||||
this->actor.shape.unk_14 = 0;
|
||||
this->actor.shape.shadowAlpha = 0;
|
||||
this->unk_1A0 = 0.0f;
|
||||
func_8098EE08();
|
||||
}
|
||||
|
@ -398,7 +398,7 @@ void func_8098EEFC(DemoSa* this, GlobalContext* globalCtx) {
|
|||
this->drawConfig = 1;
|
||||
*unk_1A0 = kREG(5) + 10.0f;
|
||||
this->alpha = alpha;
|
||||
this->actor.shape.unk_14 = alpha;
|
||||
this->actor.shape.shadowAlpha = alpha;
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
|
@ -408,11 +408,11 @@ void func_8098EEFC(DemoSa* this, GlobalContext* globalCtx) {
|
|||
this->drawConfig = 0;
|
||||
*unk_1A0 = 0.0f;
|
||||
this->alpha = 0;
|
||||
this->actor.shape.unk_14 = 0;
|
||||
this->actor.shape.shadowAlpha = 0;
|
||||
return;
|
||||
}
|
||||
}
|
||||
this->actor.shape.unk_14 = this->alpha = (*unk_1A0 / (kREG(5) + 10.0f)) * 255.0f;
|
||||
this->actor.shape.shadowAlpha = this->alpha = (*unk_1A0 / (kREG(5) + 10.0f)) * 255.0f;
|
||||
}
|
||||
|
||||
void func_8098F050(DemoSa* this, GlobalContext* globalCtx) {
|
||||
|
@ -425,7 +425,7 @@ void func_8098F050(DemoSa* this, GlobalContext* globalCtx) {
|
|||
func_8098EE28(this, globalCtx);
|
||||
this->unk_1A8 = 1;
|
||||
}
|
||||
this->actor.shape.unk_14 = 0xFF;
|
||||
this->actor.shape.shadowAlpha = 0xFF;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -491,7 +491,7 @@ void func_8098F420(DemoSa* this, GlobalContext* globalCtx) {
|
|||
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_0600B1A0, &D_0600FFD4, NULL, NULL, 0);
|
||||
this->action = 11;
|
||||
this->drawConfig = 0;
|
||||
this->actor.shape.unk_14 = 0;
|
||||
this->actor.shape.shadowAlpha = 0;
|
||||
}
|
||||
|
||||
void func_8098F480(DemoSa* this) {
|
||||
|
@ -503,9 +503,9 @@ void func_8098F480(DemoSa* this) {
|
|||
temp_f0 = kREG(17) + 10.0f;
|
||||
|
||||
if (temp_f0 <= *unk_1A0) {
|
||||
this->actor.shape.unk_14 = this->alpha = alpha;
|
||||
this->actor.shape.shadowAlpha = this->alpha = alpha;
|
||||
} else {
|
||||
this->actor.shape.unk_14 = this->alpha = (*unk_1A0 / temp_f0) * 255.0f;
|
||||
this->actor.shape.shadowAlpha = this->alpha = (*unk_1A0 / temp_f0) * 255.0f;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -602,14 +602,14 @@ void func_8098F7FC(DemoSa* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_8098F83C(DemoSa* this, GlobalContext* globalCtx) {
|
||||
Vec3f* thisPos = &this->actor.posRot.pos;
|
||||
Vec3f* thisPos = &this->actor.world.pos;
|
||||
|
||||
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_0600B1A0, &D_0601113C, NULL, NULL, 0);
|
||||
Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_EN_ELF, thisPos->x, thisPos->y, thisPos->z,
|
||||
0, 0, 0, FAIRY_KOKIRI);
|
||||
this->action = 16;
|
||||
this->drawConfig = 0;
|
||||
this->actor.shape.unk_14 = 0;
|
||||
this->actor.shape.shadowAlpha = 0;
|
||||
func_8098E508(this, 4);
|
||||
func_8098E51C(this, 2);
|
||||
}
|
||||
|
@ -623,16 +623,16 @@ void func_8098F8F8(DemoSa* this) {
|
|||
temp_f0 = kREG(17) + 10.0f;
|
||||
|
||||
if (temp_f0 <= *unk_1A0) {
|
||||
this->actor.shape.unk_14 = this->alpha = alpha;
|
||||
this->actor.shape.shadowAlpha = this->alpha = alpha;
|
||||
} else {
|
||||
this->actor.shape.unk_14 = this->alpha = (*unk_1A0 / temp_f0) * 255.0f;
|
||||
this->actor.shape.shadowAlpha = this->alpha = (*unk_1A0 / temp_f0) * 255.0f;
|
||||
}
|
||||
}
|
||||
|
||||
void func_8098F984(DemoSa* this) {
|
||||
this->action = 16;
|
||||
this->drawConfig = 0;
|
||||
this->actor.shape.unk_14 = 0;
|
||||
this->actor.shape.shadowAlpha = 0;
|
||||
}
|
||||
|
||||
void func_8098F998(DemoSa* this, GlobalContext* globalCtx) {
|
||||
|
@ -641,13 +641,13 @@ void func_8098F998(DemoSa* this, GlobalContext* globalCtx) {
|
|||
this->action = 17;
|
||||
this->drawConfig = 2;
|
||||
this->unk_1B0 = 0;
|
||||
this->actor.shape.unk_14 = 0;
|
||||
this->actor.shape.shadowAlpha = 0;
|
||||
} else {
|
||||
func_8098E76C(this, &D_0601113C, 0, 0.0f, 0);
|
||||
this->action = 18;
|
||||
this->drawConfig = 1;
|
||||
this->unk_1B0 = 0;
|
||||
this->actor.shape.unk_14 = 0xFF;
|
||||
this->actor.shape.shadowAlpha = 0xFF;
|
||||
}
|
||||
func_8098E508(this, 4);
|
||||
}
|
||||
|
@ -657,7 +657,7 @@ void func_8098FA2C(DemoSa* this) {
|
|||
this->action = 18;
|
||||
this->drawConfig = 1;
|
||||
this->unk_1B0 = 0;
|
||||
this->actor.shape.unk_14 = 0xFF;
|
||||
this->actor.shape.shadowAlpha = 0xFF;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -666,7 +666,7 @@ void func_8098FA84(DemoSa* this) {
|
|||
this->action = 19;
|
||||
this->drawConfig = 1;
|
||||
this->unk_1B0 = 1;
|
||||
this->actor.shape.unk_14 = 0xFF;
|
||||
this->actor.shape.shadowAlpha = 0xFF;
|
||||
func_8098E508(this, 2);
|
||||
}
|
||||
|
||||
|
@ -675,7 +675,7 @@ void func_8098FAE0(DemoSa* this) {
|
|||
this->action = 20;
|
||||
this->drawConfig = 1;
|
||||
this->unk_1B0 = 1;
|
||||
this->actor.shape.unk_14 = 0xFF;
|
||||
this->actor.shape.shadowAlpha = 0xFF;
|
||||
}
|
||||
|
||||
void func_8098FB34(DemoSa* this, s32 arg1) {
|
||||
|
@ -756,7 +756,7 @@ void DemoSa_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
void DemoSa_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
DemoSa* this = THIS;
|
||||
|
||||
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawFunc_Circle, 30.0f);
|
||||
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f);
|
||||
|
||||
switch (this->actor.params) {
|
||||
case 2:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue