mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-07 14:50:15 +00:00
Actor Cleanups (#177)
* rename init chains, colchkinfo, colider inits, damage tables * actor cleanups * fix collider init script names * small fixes * ichain arg name * change dynapoly types and names * revert enru1 data name * and the type * pr suggestions
This commit is contained in:
parent
13a94482e5
commit
78d0883f04
108 changed files with 786 additions and 869 deletions
|
@ -23,9 +23,6 @@ void EnDha_SetupDeath(EnDha* this);
|
|||
void EnDha_Die(EnDha* this, GlobalContext* globalCtx);
|
||||
void EnDha_UpdateHealth(EnDha* this, GlobalContext* globalCtx);
|
||||
|
||||
extern SkeletonHeader D_06000BD8;
|
||||
extern AnimationHeader D_060015B0;
|
||||
|
||||
const ActorInit En_Dha_InitVars = {
|
||||
ACTOR_EN_DHA,
|
||||
ACTORTYPE_ENEMY,
|
||||
|
@ -38,12 +35,12 @@ const ActorInit En_Dha_InitVars = {
|
|||
(ActorFunc)EnDha_Draw,
|
||||
};
|
||||
|
||||
static DamageTable damageTable = { {
|
||||
static DamageTable sDamageTable = { {
|
||||
0x00, 0xF2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF2, 0xF2, 0xF4, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF2, 0xF4, 0xF2, 0xF4, 0xF8, 0xF4, 0x00, 0x00, 0xF4, 0x00,
|
||||
} };
|
||||
|
||||
static ColliderJntSphItemInit colliderItemsInit[] = {
|
||||
static ColliderJntSphItemInit sJntSphItemsInit[] = {
|
||||
{
|
||||
{ 0x00, { 0x00000000, 0x00, 0x00 }, { 0xFFCFFFFF, 0x00, 0x00 }, 0x00, 0x01, 0x00 },
|
||||
{ 1, { { 0, 0, 0 }, 12 }, 100 },
|
||||
|
@ -66,18 +63,21 @@ static ColliderJntSphItemInit colliderItemsInit[] = {
|
|||
},
|
||||
};
|
||||
|
||||
static ColliderJntSphInit colliderInit = {
|
||||
static ColliderJntSphInit sJntSphInit = {
|
||||
{ COLTYPE_UNK6, 0x00, 0x09, 0x19, 0x10, COLSHAPE_JNTSPH },
|
||||
5,
|
||||
&colliderItemsInit,
|
||||
&sJntSphItemsInit,
|
||||
};
|
||||
|
||||
static InitChainEntry initChain[] = {
|
||||
static InitChainEntry sInitChain[] = {
|
||||
ICHAIN_S8(naviEnemyId, 0x2E, ICHAIN_CONTINUE),
|
||||
ICHAIN_F32(unk_4C, 2000, ICHAIN_CONTINUE),
|
||||
ICHAIN_VEC3F_DIV1000(scale, 10, ICHAIN_STOP),
|
||||
};
|
||||
|
||||
extern SkeletonHeader D_06000BD8;
|
||||
extern AnimationHeader D_060015B0;
|
||||
|
||||
void EnDha_SetupAction(EnDha* this, EnDhaActionFunc actionFunc) {
|
||||
this->actionFunc = actionFunc;
|
||||
}
|
||||
|
@ -85,8 +85,8 @@ void EnDha_SetupAction(EnDha* this, EnDhaActionFunc actionFunc) {
|
|||
void EnDha_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
EnDha* this = THIS;
|
||||
|
||||
Actor_ProcessInitChain(&this->actor, initChain);
|
||||
this->actor.colChkInfo.damageTable = &damageTable;
|
||||
Actor_ProcessInitChain(&this->actor, sInitChain);
|
||||
this->actor.colChkInfo.damageTable = &sDamageTable;
|
||||
SkelAnime_InitSV(globalCtx, &this->skelAnime, &D_06000BD8, &D_060015B0, this->limbDrawTable,
|
||||
this->transitionDrawTable, 4);
|
||||
ActorShape_Init(&this->actor.shape, 0, ActorShadow_DrawFunc_Teardrop, 90.0f);
|
||||
|
@ -96,7 +96,7 @@ void EnDha_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
this->actor.colChkInfo.health = 8;
|
||||
this->unk_1CE = -0x4000;
|
||||
Collider_InitJntSph(globalCtx, &this->collider);
|
||||
Collider_SetJntSph(globalCtx, &this->collider, &this->actor, &colliderInit, &this->colliderItem);
|
||||
Collider_SetJntSph(globalCtx, &this->collider, &this->actor, &sJntSphInit, &this->colliderItem);
|
||||
this->actor.flags &= ~1;
|
||||
func_809EC9C8(this);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue