mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-20 05:51:18 +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
|
@ -30,47 +30,47 @@ const ActorInit Obj_Bombiwa_InitVars = {
|
|||
(ActorFunc)ObjBombiwa_Draw,
|
||||
};
|
||||
|
||||
static ColliderCylinderInit colliderInit = {
|
||||
static ColliderCylinderInit sCylinderInit = {
|
||||
{ COLTYPE_UNK12, 0x00, 0x0D, 0x39, 0x20, COLSHAPE_CYLINDER },
|
||||
{ 0x00, { 0x00000000, 0x00, 0x00 }, { 0x4FC1FFFE, 0x00, 0x00 }, 0x00, 0x01, 0x01 },
|
||||
{ 55, 70, 0, { 0 } },
|
||||
};
|
||||
|
||||
static CollisionCheckInfoInit colChkInfoInit = {
|
||||
static CollisionCheckInfoInit sColChkInfoInit = {
|
||||
0x00,
|
||||
0x000C,
|
||||
0x003C,
|
||||
0xFF,
|
||||
};
|
||||
|
||||
static InitChainEntry initChain[] = {
|
||||
static InitChainEntry sInitChain[] = {
|
||||
ICHAIN_VEC3F_DIV1000(scale, 0x64, ICHAIN_CONTINUE),
|
||||
ICHAIN_F32(unk_F4, 0x7D0, ICHAIN_CONTINUE),
|
||||
ICHAIN_F32(unk_F8, 0x15E, ICHAIN_CONTINUE),
|
||||
ICHAIN_F32(unk_FC, 0x3E8, ICHAIN_STOP),
|
||||
};
|
||||
|
||||
static s16 effectScales[] = {
|
||||
static s16 sEffectScales[] = {
|
||||
17, 14, 10, 8, 7, 5, 3, 2,
|
||||
};
|
||||
|
||||
extern Gfx* D_060009E0; // dlist
|
||||
extern Gfx D_060009E0[];
|
||||
|
||||
void ObjBombiwa_InitCollision(Actor* thisx, GlobalContext* globalCtx) {
|
||||
ObjBombiwa* this = THIS;
|
||||
|
||||
Collider_InitCylinder(globalCtx, &this->collider);
|
||||
Collider_SetCylinder(globalCtx, &this->collider, &this->actor, &colliderInit);
|
||||
Collider_SetCylinder(globalCtx, &this->collider, &this->actor, &sCylinderInit);
|
||||
Collider_CylinderUpdate(&this->actor, &this->collider);
|
||||
}
|
||||
|
||||
void ObjBombiwa_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
Actor_ProcessInitChain(thisx, initChain);
|
||||
Actor_ProcessInitChain(thisx, sInitChain);
|
||||
ObjBombiwa_InitCollision(thisx, globalCtx);
|
||||
if ((Flags_GetSwitch(globalCtx, thisx->params & 0x3F) != 0)) {
|
||||
Actor_Kill(thisx);
|
||||
} else {
|
||||
func_80061ED4(&thisx->colChkInfo, NULL, &colChkInfoInit);
|
||||
func_80061ED4(&thisx->colChkInfo, NULL, &sColChkInfoInit);
|
||||
if (thisx->shape.rot.y == 0) {
|
||||
s16 rand = (s16)Math_Rand_ZeroFloat(65536.0f);
|
||||
thisx->posRot.rot.y = rand;
|
||||
|
@ -93,15 +93,15 @@ void ObjBombiwa_Break(ObjBombiwa* this, GlobalContext* globalCtx) {
|
|||
s16 scale;
|
||||
s32 i;
|
||||
|
||||
dlist = &D_060009E0;
|
||||
for (i = 0; i < ARRAY_COUNT(effectScales); i++) {
|
||||
dlist = D_060009E0;
|
||||
for (i = 0; i < ARRAY_COUNT(sEffectScales); i++) {
|
||||
temp_s2.x = ((Math_Rand_ZeroOne() - 0.5f) * 10.0f) + this->actor.initPosRot.pos.x;
|
||||
temp_s2.y = ((Math_Rand_ZeroOne() * 5.0f) + this->actor.initPosRot.pos.y) + 8.0f;
|
||||
temp_s2.z = ((Math_Rand_ZeroOne() - 0.5f) * 10.0f) + this->actor.initPosRot.pos.z;
|
||||
temp_s3.x = (Math_Rand_ZeroOne() - 0.5f) * 15.0f;
|
||||
temp_s3.y = (Math_Rand_ZeroOne() * 16.0f) + 5.0f;
|
||||
temp_s3.z = (Math_Rand_ZeroOne() - 0.5f) * 15.0f;
|
||||
scale = effectScales[i];
|
||||
scale = sEffectScales[i];
|
||||
u0 = (scale >= 11) ? 37 : 33;
|
||||
func_80029E8C(globalCtx, &temp_s2, &temp_s3, &temp_s2, -400, u0, 10, 2, 0, scale, 1, 0, 80, -1, OBJECT_BOMBIWA,
|
||||
dlist);
|
||||
|
@ -132,5 +132,5 @@ void ObjBombiwa_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void ObjBombiwa_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
Gfx_DrawDListOpa(globalCtx, &D_060009E0);
|
||||
Gfx_DrawDListOpa(globalCtx, D_060009E0);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue