mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-03 22:44:30 +00:00
z_collision_check.c (#73)
* func_8005B280 ok * func_8005B65C OK * split out func_8005BD50 * func_8005B7C0 OK * func_8005B7F4 OK * func_8005B824 OK * func_8005B860 ok * improve sanity * func_8005B6B0 ok, ColliderInit_Actor structs added * func_8005B884 ok * func_8005BBF8 ok, split out func_8005BF50 * split more stuff out of func_8005C050.s * func_8005C050 OK * func_8005BA30 fakish OK, func_8005BAD8 real OK * func_8005BB48 OK, func_8005BA84 almost decomp'd, but type issues * func_8005BB10 Ok * func_8005BF50 OK * func_8005BE50 OK * func_8005BD50 OK * func_8005BCC8 Ok * func_8005BC28 * func_8005BB8C func_8005BBB0 func_8005BBD4 Ok * save my work commit * func_8005C2BC fake OK * func_8005C5B0 ok * func_8005C608 ok * func_8005C6C0 ok * func_8005C6F8 ok * func_8005C730 ok * func_8005C774 func_8005C798 func_8005C7BC OK * func_8005C7E0 ok, func_8005C810 split * func_8005C810 OK * func_8005C8C8 ok * func_8005C964 OK * func_8005CA88 ok * func_8005CBAC ok * func_8005C124 func_8005C1AC func_8005C234 func_8005CC98 OK * func_8005CD34 func_8005CDD0 Ok * func_8005CE6C ok * func_8005CEC4 ok * func_8005CEDC ok * func_8005CF90 Ok * standardize type names/vars more * func_8005D3BC ok * func_8005D40C OK, z64.h CollisionCheckContext * func_8005D4B4 func_8005D4C8 ok * partial data section migration * improve function documentation, OT->OC * Actor_CollisionCheck_SetOC ok * Actor_CollisionCheck_SetAT Actor_CollisionCheck_SetAC Ok * func_8005BA84 ok * func_800611A0 ok * func_80061274 ok * clean up func_80061274 * func_8006139C ok * func_8005E9C0 and dependencies OK * minor cleanup to func_8005E9C0 * func_8005EC6C OK! * func_8005E81C ok * func_8005E604 ok * func_8005E2EC func_8005E4F8 OK * func_8005DE9C OK func_8005D8AC disassembled * func_8006146C func_8006268C ok * func_8005EEE0 ok * func_8005F17C * func_8005F39C ok * func_8005F5B0 decompiled, not matching * func_8005F7D0 decomp, func_8005D218 and func_8005D324 OK * func_8005FA30 ok, split more functions * func_8005FC04 ok * func_8005FDCC k * func_8005FF90 OK OK OK * func_80060204 dead * func_800604B0 ok * func_80060704 func_80060994 ok, func_80060C2C somewhat disassembled. AT to AC matrix doneish * func_800635D0 ok, func_80062ECC not so much * OcLine oks * D_8011DF28 functions disassembled * D_8011DF5C functions OK * setAT_SAC. setAC_SAC, setOC_SAC OK * func_80061C98 decompiled, func_80061BF4, func_80061C18 OK * func_800617D4 ok, func_800614A4 disassembled * CollisionCheck_OC D_8011DFAC functions OK * func_80062530 ok * CollisionCheck_generalLineOcCheck subfunctions OK * func_800622E4 ok * after a long fought battle, func_80061F64 has fallen. * func_800628A4 disassembled * func_800627A0 func_8006285C OK * ActorCollider_Cylinder_Update, func_80062718, func_80062734 ok * func_80062CD4 decompiled, import EffShield/EffSpark types from MM * various SubActor98 struct functions OK * func_8005D4DC func_8005D62C ok * .data section migrated, more OKs, fix NON_MATCHINGs to use effect structs * func_80060C2C ok * minor code tweaks * func_80061C98 ok somehow * Attempt to fix some unknowns, move types out of z64actor, add set3 ColliderInit types * Apply changes * formatting * tweak a couple function names * krim changes, func naming * missed some things * function renames * Implement GenColliderInit.py utility * Implement pr changes, GenColliderInit.py, DamageTable.py, z_collision_btltbls.c fully matching * func_800614A4 ok * Implement Roman's fixes, name Collider unknowns, rename COLTYPE -> COLSHAPE and define new COLTYPE * collisionCheckCtx -> colChkCtx, fix small things
This commit is contained in:
parent
f9bdb1d58a
commit
aa91a7ee32
873 changed files with 6121 additions and 10660 deletions
|
@ -1709,8 +1709,8 @@ s32 func_800D0560(Sphere16* arg0, f32 arg1, f32 arg2) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
void func_800D05D0(s32 arg0, s32 arg1) {
|
||||
void func_800D05D0(GlobalContext* gctx, Sphere16* sph) {
|
||||
}
|
||||
|
||||
void func_800D05DC(s32 arg0, s32 arg1) {
|
||||
void func_800D05DC(GlobalContext* gctx, Cylinder16* cyl) {
|
||||
}
|
||||
|
|
|
@ -842,7 +842,7 @@ void Actor_Init(Actor* actor, GlobalContext* globalCtx) {
|
|||
actor->unk_F4 = 1000.0f;
|
||||
actor->unk_F8 = 350.0f;
|
||||
actor->unk_FC = 700.0f;
|
||||
func_80061E48(&actor->sub_98);
|
||||
func_80061E48(&actor->colChkInfo);
|
||||
actor->floorPolySource = 0x32;
|
||||
ActorShape_Init(&actor->shape, 0.0f, NULL, 0.0f);
|
||||
if (Object_IsLoaded(&globalCtx->objectCtx, actor->objBankIndex)) {
|
||||
|
@ -870,9 +870,9 @@ void Actor_Destroy(Actor* actor, GlobalContext* globalCtx) {
|
|||
|
||||
void func_8002D7EC(Actor* actor) {
|
||||
f32 speedRate = R_UPDATE_RATE * 0.5f;
|
||||
actor->posRot.pos.x += (actor->velocity.x * speedRate) + actor->sub_98.displacement.x;
|
||||
actor->posRot.pos.y += (actor->velocity.y * speedRate) + actor->sub_98.displacement.y;
|
||||
actor->posRot.pos.z += (actor->velocity.z * speedRate) + actor->sub_98.displacement.z;
|
||||
actor->posRot.pos.x += (actor->velocity.x * speedRate) + actor->colChkInfo.displacement.x;
|
||||
actor->posRot.pos.y += (actor->velocity.y * speedRate) + actor->colChkInfo.displacement.y;
|
||||
actor->posRot.pos.z += (actor->velocity.z * speedRate) + actor->colChkInfo.displacement.z;
|
||||
}
|
||||
|
||||
void func_8002D868(Actor* actor) {
|
||||
|
@ -1540,7 +1540,7 @@ s32 func_8002F2CC(Actor* actor, GlobalContext* globalCtx, f32 arg2) {
|
|||
}
|
||||
|
||||
s32 func_8002F2F4(Actor* actor, GlobalContext* globalCtx) {
|
||||
f32 var1 = 50.0f + actor->sub_98.unk_10;
|
||||
f32 var1 = 50.0f + actor->colChkInfo.unk_10;
|
||||
return func_8002F2CC(actor, globalCtx, var1);
|
||||
}
|
||||
|
||||
|
@ -2097,7 +2097,7 @@ void Actor_UpdateAll(GlobalContext* globalCtx, ActorContext* actorCtx) {
|
|||
} else if ((unkFlag && !(actor->flags & unkFlag)) ||
|
||||
(!unkFlag && unkCondition && (sp74 != actor) && (actor != player->unk_68C) &&
|
||||
(actor != player->heldActor) && (&player->actor != actor->attachedA))) {
|
||||
func_80061E8C(&actor->sub_98);
|
||||
func_80061E8C(&actor->colChkInfo);
|
||||
actor = actor->next;
|
||||
} else if (actor->update == NULL) {
|
||||
if (!actor->activelyDrawn) {
|
||||
|
@ -2134,7 +2134,7 @@ void Actor_UpdateAll(GlobalContext* globalCtx, ActorContext* actorCtx) {
|
|||
func_8003F8EC(globalCtx, &globalCtx->colCtx.dyna, actor);
|
||||
}
|
||||
|
||||
func_80061E8C(&actor->sub_98);
|
||||
func_80061E8C(&actor->colChkInfo);
|
||||
|
||||
actor = actor->next;
|
||||
}
|
||||
|
@ -2484,7 +2484,7 @@ void func_800315AC(GlobalContext* globalCtx, ActorContext* actorCtx) {
|
|||
}
|
||||
|
||||
if ((HREG(64) != 1) || (HREG(76) != 0)) {
|
||||
func_8005D62C(globalCtx, &globalCtx->sub_11E60);
|
||||
CollisionCheck_Draw(globalCtx, &globalCtx->colChkCtx);
|
||||
}
|
||||
|
||||
Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_actor.c", 6563);
|
||||
|
@ -2542,7 +2542,7 @@ void func_80031B14(GlobalContext* globalCtx, ActorContext* actorCtx) {
|
|||
}
|
||||
}
|
||||
|
||||
func_8005D40C(globalCtx, &globalCtx->sub_11E60);
|
||||
CollisionCheck_InitContext(globalCtx, &globalCtx->colChkCtx);
|
||||
actorCtx->flags.tempClear = 0;
|
||||
actorCtx->flags.tempSwch &= 0xFFFFFF;
|
||||
globalCtx->msgCtx.unk_E3F4 = 0;
|
||||
|
@ -3262,8 +3262,8 @@ void func_80033480(GlobalContext* globalCtx, Vec3f* arg1, f32 arg2, s32 arg3, s1
|
|||
}
|
||||
|
||||
Actor* func_80033640(GlobalContext* globalCtx, Collider* collider) {
|
||||
if ((collider->collideFlags & 0x2) && (collider->ac->type == ACTORTYPE_EXPLOSIVES)) {
|
||||
collider->collideFlags &= ~0x2;
|
||||
if ((collider->acFlags & 0x2) && (collider->ac->type == ACTORTYPE_EXPLOSIVES)) {
|
||||
collider->acFlags &= ~0x2;
|
||||
return collider->ac;
|
||||
}
|
||||
|
||||
|
@ -3331,7 +3331,7 @@ Actor_80033780* func_80033780(GlobalContext* globalCtx, Actor* refActor, f32 arg
|
|||
spA8.y = itemActor->actor.posRot.pos.y + deltaY;
|
||||
spA8.z = itemActor->actor.posRot.pos.z + deltaZ;
|
||||
|
||||
if (func_80062ECC(refActor->sub_98.unk_10, refActor->sub_98.unk_12, 0.0f, &refActor->posRot.pos,
|
||||
if (func_80062ECC(refActor->colChkInfo.unk_10, refActor->colChkInfo.unk_12, 0.0f, &refActor->posRot.pos,
|
||||
&itemActor->actor.posRot.pos, &spA8, &sp90, &sp84)) {
|
||||
return itemActor;
|
||||
} else {
|
||||
|
@ -3982,7 +3982,7 @@ s32 func_80035124(Actor* actor, GlobalContext* globalCtx) {
|
|||
break;
|
||||
}
|
||||
|
||||
func_8002E4B4(globalCtx, actor, actor->sub_98.unk_12, actor->sub_98.unk_10, actor->sub_98.unk_10, 0x1D);
|
||||
func_8002E4B4(globalCtx, actor, actor->colChkInfo.unk_12, actor->colChkInfo.unk_10, actor->colChkInfo.unk_10, 0x1D);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -4061,11 +4061,10 @@ void func_800355B8(GlobalContext* globalCtx, Vec3f* arg1) {
|
|||
func_8003555C(globalCtx, arg1, &D_80116268, &D_80116274);
|
||||
}
|
||||
|
||||
u8 func_800355E4(GlobalContext* globalCtx, ColliderCylinderInit* colCylinderInit) {
|
||||
u8 func_800355E4(GlobalContext* globalCtx, Collider* collider) {
|
||||
Player* player = PLAYER;
|
||||
|
||||
if ((colCylinderInit->inner.toucherDamage & 0x08) && (player->swordState != 0) &&
|
||||
(player->swordAnimation == 0x16)) {
|
||||
if ((collider->acFlags & 0x08) && (player->swordState != 0) && (player->swordAnimation == 0x16)) {
|
||||
return 1;
|
||||
} else {
|
||||
return 0;
|
||||
|
@ -4073,36 +4072,36 @@ u8 func_800355E4(GlobalContext* globalCtx, ColliderCylinderInit* colCylinderInit
|
|||
}
|
||||
|
||||
u8 Actor_ApplyDamage(Actor* actor) {
|
||||
if (actor->sub_98.damage >= actor->sub_98.health) {
|
||||
actor->sub_98.health = 0;
|
||||
if (actor->colChkInfo.damage >= actor->colChkInfo.health) {
|
||||
actor->colChkInfo.health = 0;
|
||||
} else {
|
||||
actor->sub_98.health -= actor->sub_98.damage;
|
||||
actor->colChkInfo.health -= actor->colChkInfo.damage;
|
||||
}
|
||||
|
||||
return actor->sub_98.health;
|
||||
return actor->colChkInfo.health;
|
||||
}
|
||||
|
||||
void func_80035650(Actor* actor, ColliderBody* colBody, s32 freezeFlag) {
|
||||
if (colBody->colliding == NULL) {
|
||||
if (colBody->acHitItem == NULL) {
|
||||
actor->unk_116 = 0x00;
|
||||
} else if (freezeFlag && (colBody->colliding->toucher.flags & 0x10060000)) {
|
||||
actor->freeze = colBody->colliding->toucher.damage;
|
||||
} else if (freezeFlag && (colBody->acHitItem->toucher.flags & 0x10060000)) {
|
||||
actor->freeze = colBody->acHitItem->toucher.damage;
|
||||
actor->unk_116 = 0x00;
|
||||
} else if (colBody->colliding->toucher.flags & 0x0800) {
|
||||
} else if (colBody->acHitItem->toucher.flags & 0x0800) {
|
||||
actor->unk_116 = 0x01;
|
||||
} else if (colBody->colliding->toucher.flags & 0x1000) {
|
||||
} else if (colBody->acHitItem->toucher.flags & 0x1000) {
|
||||
actor->unk_116 = 0x02;
|
||||
} else if (colBody->colliding->toucher.flags & 0x4000) {
|
||||
} else if (colBody->acHitItem->toucher.flags & 0x4000) {
|
||||
actor->unk_116 = 0x04;
|
||||
} else if (colBody->colliding->toucher.flags & 0x8000) {
|
||||
} else if (colBody->acHitItem->toucher.flags & 0x8000) {
|
||||
actor->unk_116 = 0x08;
|
||||
} else if ((colBody->colliding->toucher.flags << 0xF) < 0) {
|
||||
} else if ((colBody->acHitItem->toucher.flags << 0xF) < 0) {
|
||||
actor->unk_116 = 0x10;
|
||||
} else if (colBody->colliding->toucher.flags & 0x2000) {
|
||||
} else if (colBody->acHitItem->toucher.flags & 0x2000) {
|
||||
actor->unk_116 = 0x20;
|
||||
} else if ((colBody->colliding->toucher.flags << 0xC) < 0) {
|
||||
} else if ((colBody->acHitItem->toucher.flags << 0xC) < 0) {
|
||||
if (freezeFlag) {
|
||||
actor->freeze = colBody->colliding->toucher.damage;
|
||||
actor->freeze = colBody->acHitItem->toucher.damage;
|
||||
}
|
||||
actor->unk_116 = 0x40;
|
||||
} else {
|
||||
|
@ -4110,35 +4109,35 @@ void func_80035650(Actor* actor, ColliderBody* colBody, s32 freezeFlag) {
|
|||
}
|
||||
}
|
||||
|
||||
void func_8003573C(Actor* actor, ColliderBody* colBody, s32 freezeFlag) {
|
||||
void func_8003573C(Actor* actor, ColliderJntSph* jntSph, s32 freezeFlag) {
|
||||
ColliderBody* curColBody;
|
||||
s32 flag;
|
||||
s32 i;
|
||||
|
||||
actor->unk_116 = 0x00;
|
||||
|
||||
for (i = colBody->unk_18 - 1; i >= 0; i--) {
|
||||
curColBody = &colBody->colBuf[i].c;
|
||||
if (curColBody->colliding == NULL) {
|
||||
for (i = jntSph->count - 1; i >= 0; i--) {
|
||||
curColBody = &jntSph->list[i].body;
|
||||
if (curColBody->acHitItem == NULL) {
|
||||
flag = 0x00;
|
||||
} else if (freezeFlag && (curColBody->colliding->toucher.flags & 0x10060000)) {
|
||||
actor->freeze = curColBody->colliding->toucher.damage;
|
||||
} else if (freezeFlag && (curColBody->acHitItem->toucher.flags & 0x10060000)) {
|
||||
actor->freeze = curColBody->acHitItem->toucher.damage;
|
||||
flag = 0x00;
|
||||
} else if (curColBody->colliding->toucher.flags & 0x0800) {
|
||||
} else if (curColBody->acHitItem->toucher.flags & 0x0800) {
|
||||
flag = 0x01;
|
||||
} else if (curColBody->colliding->toucher.flags & 0x1000) {
|
||||
} else if (curColBody->acHitItem->toucher.flags & 0x1000) {
|
||||
flag = 0x02;
|
||||
} else if (curColBody->colliding->toucher.flags & 0x4000) {
|
||||
} else if (curColBody->acHitItem->toucher.flags & 0x4000) {
|
||||
flag = 0x04;
|
||||
} else if (curColBody->colliding->toucher.flags & 0x8000) {
|
||||
} else if (curColBody->acHitItem->toucher.flags & 0x8000) {
|
||||
flag = 0x08;
|
||||
} else if (curColBody->colliding->toucher.flags & 0x10000) {
|
||||
} else if (curColBody->acHitItem->toucher.flags & 0x10000) {
|
||||
flag = 0x10;
|
||||
} else if (curColBody->colliding->toucher.flags & 0x2000) {
|
||||
} else if (curColBody->acHitItem->toucher.flags & 0x2000) {
|
||||
flag = 0x20;
|
||||
} else if (curColBody->colliding->toucher.flags & 0x80000) {
|
||||
} else if (curColBody->acHitItem->toucher.flags & 0x80000) {
|
||||
if (freezeFlag) {
|
||||
actor->freeze = curColBody->colliding->toucher.damage;
|
||||
actor->freeze = curColBody->acHitItem->toucher.damage;
|
||||
}
|
||||
flag = 0x40;
|
||||
} else {
|
||||
|
|
|
@ -1,6 +1,112 @@
|
|||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_collision_btltbls/CollisionBtlTbl_Get.s")
|
||||
DamageTable D_8011DB20[] = {
|
||||
{ {
|
||||
0x10, 0x01, 0x01, 0x02, 0xE0, 0x01, 0xF2, 0x10, 0xF1, 0xF2, 0xF2, 0x22, 0x01, 0x01, 0x00, 0x00,
|
||||
0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
} },
|
||||
{ {
|
||||
0x10, 0x01, 0x01, 0x02, 0xE0, 0x01, 0xF2, 0x10, 0xF1, 0xF2, 0xF2, 0x22, 0x01, 0x01, 0x00, 0x00,
|
||||
0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
} },
|
||||
{ {
|
||||
0x10, 0x02, 0x01, 0x02, 0x10, 0x02, 0x02, 0x02, 0x01, 0x02, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00,
|
||||
0x00, 0x04, 0x03, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x02, 0x04, 0x08, 0x00, 0x00, 0x00, 0x00,
|
||||
} },
|
||||
{ {
|
||||
0x10, 0x01, 0x01, 0x02, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
|
||||
0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00,
|
||||
} },
|
||||
{ {
|
||||
0x10, 0x02, 0x01, 0x02, 0x01, 0x02, 0x02, 0x02, 0x01, 0x02, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x02, 0x04, 0x08, 0x00, 0x00, 0x00, 0x00,
|
||||
} },
|
||||
{ {
|
||||
0x10, 0x01, 0x01, 0x00, 0x10, 0x01, 0x01, 0x10, 0x01, 0x01, 0x01, 0x01, 0x31, 0x01, 0x00, 0x00,
|
||||
0x00, 0x00, 0x31, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
} },
|
||||
{ {
|
||||
0x00, 0x03, 0x00, 0x06, 0x00, 0x04, 0x04, 0x00, 0x02, 0x06, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
} },
|
||||
{ {
|
||||
0x00, 0x03, 0x00, 0x06, 0x00, 0x04, 0x04, 0x00, 0x02, 0x06, 0x00, 0x06, 0x06, 0x00, 0x00, 0x00,
|
||||
0x00, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
} },
|
||||
{ {
|
||||
0x00, 0x03, 0x00, 0x00, 0x00, 0x04, 0x04, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
} },
|
||||
{ {
|
||||
0x00, 0x02, 0x00, 0x00, 0x01, 0x00, 0x02, 0x02, 0x01, 0x02, 0x04, 0x00, 0x04, 0x00, 0x00, 0x00,
|
||||
0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x02, 0x04, 0x08, 0x00, 0x00, 0x00, 0x00,
|
||||
} },
|
||||
{ {
|
||||
0x10, 0x01, 0x00, 0xE2, 0x10, 0x01, 0x02, 0x10, 0xF1, 0xF2, 0xF2, 0x22, 0x32, 0x01, 0x00, 0x00,
|
||||
0x00, 0x22, 0x32, 0x00, 0x00, 0x00, 0x01, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
} },
|
||||
{ {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
} },
|
||||
{ {
|
||||
0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x04, 0x00, 0x02, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
} },
|
||||
{ {
|
||||
0x10, 0x01, 0x01, 0x02, 0x10, 0x01, 0x02, 0x10, 0x01, 0x02, 0x02, 0x22, 0x01, 0x01, 0x00, 0x00,
|
||||
0x00, 0x22, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
} },
|
||||
{ {
|
||||
0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x02, 0x02, 0x01, 0x02, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00,
|
||||
0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x02, 0x04, 0x08, 0x00, 0x00, 0x00, 0x00,
|
||||
} },
|
||||
{ {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
} },
|
||||
{ {
|
||||
0x00, 0x02, 0x01, 0x02, 0x01, 0x02, 0x02, 0x02, 0x01, 0x02, 0x04, 0x04, 0x04, 0x04, 0x00, 0x00,
|
||||
0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x04, 0x02, 0x04, 0x08, 0x00, 0x00, 0x00, 0x00,
|
||||
} },
|
||||
{ {
|
||||
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
|
||||
0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
} },
|
||||
{ {
|
||||
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
|
||||
0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
} },
|
||||
{ {
|
||||
0x10, 0x01, 0x00, 0x02, 0x10, 0x01, 0x02, 0x10, 0xF1, 0xF2, 0xF2, 0x22, 0x32, 0x01, 0x00, 0x00,
|
||||
0x00, 0x22, 0x32, 0x00, 0x00, 0x00, 0x01, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
} },
|
||||
{ {
|
||||
0x10, 0x01, 0x01, 0xF2, 0xE0, 0x01, 0xD2, 0x10, 0x01, 0x02, 0x02, 0x00, 0x32, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x32, 0x00, 0x00, 0x00, 0x01, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
} },
|
||||
{ {
|
||||
0x10, 0x01, 0x00, 0xF0, 0x10, 0x01, 0xF0, 0x10, 0x01, 0x02, 0x02, 0x00, 0x12, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
} },
|
||||
{ {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
} },
|
||||
};
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/code/z_collision_btltbls/func_8005B248.s")
|
||||
DamageTable* DamageTable_Get(s32 index) {
|
||||
if (index < 0 || index >= 23) {
|
||||
osSyncPrintf("CollisionBtlTbl_get():インデックスオーバー\n");
|
||||
return 0;
|
||||
}
|
||||
return &D_8011DB20[index];
|
||||
}
|
||||
|
||||
void func_8005B248(DamageTable* table) {
|
||||
s32 i;
|
||||
for (i = 0; i < 32; i++) {
|
||||
table->table[i] = 0;
|
||||
}
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -32,7 +32,7 @@ typedef struct {
|
|||
/* 0x172 */ s16 unk_172;
|
||||
/* 0x174 */ s16 unk_174;
|
||||
/* 0x178 */ f32 unk_178;
|
||||
/* 0x17C */ ColliderCylinderMain cylinderCollider;
|
||||
/* 0x17C */ ColliderCylinder cylinderCollider;
|
||||
} ActorEnAObj; // size = 0x1C8
|
||||
|
||||
void func_8001D204(ActorEnAObj* this, GlobalContext* globalCtx);
|
||||
|
@ -140,9 +140,9 @@ void En_A_Obj_Init(ActorEnAObj* this, GlobalContext* globalCtx) {
|
|||
this->actor.unk_4C = 500.0f;
|
||||
this->unk_178 = 45.0f;
|
||||
func_8001D234(this, this->actor.params);
|
||||
ActorCollider_AllocCylinder(globalCtx, &this->cylinderCollider);
|
||||
ActorCollider_InitCylinder(globalCtx, &this->cylinderCollider, &this->actor, &D_80115440);
|
||||
this->actor.sub_98.mass = 0xFF;
|
||||
Collider_InitCylinder(globalCtx, &this->cylinderCollider);
|
||||
Collider_SetCylinder(globalCtx, &this->cylinderCollider, &this->actor, &D_80115440);
|
||||
this->actor.colChkInfo.mass = 0xFF;
|
||||
this->actor.unk_1F = 0;
|
||||
break;
|
||||
case A_OBJ_KNOB:
|
||||
|
@ -156,7 +156,7 @@ void En_A_Obj_Init(ActorEnAObj* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
if (this->actor.params < 5) {
|
||||
this->actor.sub_98.mass = 0xFF;
|
||||
this->actor.colChkInfo.mass = 0xFF;
|
||||
}
|
||||
|
||||
if (this->dynaPolyId != -1) {
|
||||
|
@ -169,14 +169,14 @@ void En_A_Obj_Init(ActorEnAObj* this, GlobalContext* globalCtx) {
|
|||
#endif
|
||||
|
||||
void En_A_Obj_Destroy(ActorEnAObj* this, GlobalContext* globalCtx) {
|
||||
ColliderCylinderMain* cylinderCollider = &this->cylinderCollider;
|
||||
ColliderCylinder* cylinderCollider = &this->cylinderCollider;
|
||||
|
||||
DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dynaPolyId);
|
||||
|
||||
switch (this->actor.params) {
|
||||
case A_OBJ_SIGNPOST_OBLONG:
|
||||
case A_OBJ_SIGNPOST_ARROW:
|
||||
ActorCollider_FreeCylinder(globalCtx, cylinderCollider);
|
||||
Collider_DestroyCylinder(globalCtx, cylinderCollider);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -303,7 +303,7 @@ void func_8001D608(ActorEnAObj* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void En_A_Obj_Update(ActorEnAObj* this, GlobalContext* globalCtx) {
|
||||
ColliderCylinderMain* cylinderCollider;
|
||||
Collider* collider;
|
||||
|
||||
this->updateFunc(this, globalCtx);
|
||||
Actor_MoveForward(&this->actor);
|
||||
|
@ -322,9 +322,9 @@ void En_A_Obj_Update(ActorEnAObj* this, GlobalContext* globalCtx) {
|
|||
switch (this->actor.params) {
|
||||
case A_OBJ_SIGNPOST_OBLONG:
|
||||
case A_OBJ_SIGNPOST_ARROW:
|
||||
cylinderCollider = &this->cylinderCollider;
|
||||
ActorCollider_Cylinder_Update(&this->actor, cylinderCollider);
|
||||
Actor_CollisionCheck_SetOT(globalCtx, &globalCtx->sub_11E60, cylinderCollider);
|
||||
collider = (Collider*)&this->cylinderCollider;
|
||||
Collider_CylinderUpdate(&this->actor, &this->cylinderCollider);
|
||||
CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, collider);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ typedef struct {
|
|||
/* 0x158 */ s16 unk_158;
|
||||
/* 0x15A */ s16 unk_15A;
|
||||
/* 0x15C */ f32 unk_15C;
|
||||
/* 0x160 */ ColliderCylinderMain cylinderCollider;
|
||||
/* 0x160 */ ColliderCylinder cylinderCollider;
|
||||
} ActorEnItem00;
|
||||
|
||||
void func_8001DFC8(ActorEnItem00* this, GlobalContext* globalCtx);
|
||||
|
@ -93,8 +93,8 @@ void En_Item00_Init(ActorEnItem00* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
Actor_ProcessInitChain(&this->actor, D_8011550C);
|
||||
ActorCollider_AllocCylinder(globalCtx, &this->cylinderCollider);
|
||||
ActorCollider_InitCylinder(globalCtx, &this->cylinderCollider, &this->actor, &D_801154E0);
|
||||
Collider_InitCylinder(globalCtx, &this->cylinderCollider);
|
||||
Collider_SetCylinder(globalCtx, &this->cylinderCollider, &this->actor, &D_801154E0);
|
||||
|
||||
this->unk_158 = 1;
|
||||
|
||||
|
@ -301,8 +301,8 @@ void En_Item00_Init(ActorEnItem00* this, GlobalContext* globalCtx) {
|
|||
#endif
|
||||
|
||||
void En_Item00_Destroy(ActorEnItem00* this, GlobalContext* globalCtx) {
|
||||
ColliderCylinderMain* cylinderCollider = &this->cylinderCollider;
|
||||
ActorCollider_FreeCylinder(globalCtx, cylinderCollider);
|
||||
ColliderCylinder* cylinderCollider = &this->cylinderCollider;
|
||||
Collider_DestroyCylinder(globalCtx, cylinderCollider);
|
||||
}
|
||||
|
||||
void func_8001DFC8(ActorEnItem00* this, GlobalContext* globalCtx) {
|
||||
|
@ -529,8 +529,8 @@ void En_Item00_Update(ActorEnItem00* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
}
|
||||
|
||||
ActorCollider_Cylinder_Update(&this->actor, &this->cylinderCollider);
|
||||
Actor_CollisionCheck_SetAC(globalCtx, &globalCtx->sub_11E60, &this->cylinderCollider);
|
||||
Collider_CylinderUpdate(&this->actor, &this->cylinderCollider);
|
||||
CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->cylinderCollider);
|
||||
|
||||
if ((this->actor.params == DROP_SHIELD_DEKU) || (this->actor.params == DROP_SHIELD_HYLIAN) ||
|
||||
(this->actor.params == DROP_TUNIC_ZORA) || (this->actor.params == DROP_TUNIC_GORON)) {
|
||||
|
|
|
@ -159,7 +159,7 @@ void Gameplay_Destroy(GlobalContext* globalCtx) {
|
|||
func_800C0F08(&globalCtx->preRenderCtx);
|
||||
func_800271A8(globalCtx);
|
||||
Effect_SS_Clear(globalCtx);
|
||||
func_8005D400(globalCtx, &globalCtx->sub_11E60);
|
||||
CollisionCheck_DestroyContext(globalCtx, &globalCtx->colChkCtx);
|
||||
|
||||
if (D_80161490 == 3) {
|
||||
func_800B1DBC(&D_801613B0);
|
||||
|
@ -242,7 +242,7 @@ void Gameplay_Init(GlobalContext* globalCtx) {
|
|||
func_8006BA00(globalCtx);
|
||||
func_80026C2C(globalCtx);
|
||||
func_800272B0(globalCtx, 0x55);
|
||||
func_8005D3BC(globalCtx, &globalCtx->sub_11E60);
|
||||
func_8005D3BC(globalCtx, &globalCtx->colChkCtx);
|
||||
SkelAnime_AnimationCtxReset(&globalCtx->animationCtx);
|
||||
func_8006450C(globalCtx, &globalCtx->csCtx);
|
||||
|
||||
|
@ -834,25 +834,25 @@ void Gameplay_Update(GlobalContext* globalCtx) {
|
|||
LOG_NUM("1", 1, "../z_play.c", 3612);
|
||||
}
|
||||
|
||||
func_8006139C(globalCtx, &globalCtx->sub_11E60);
|
||||
func_8006139C(globalCtx, &globalCtx->colChkCtx);
|
||||
|
||||
if (1 && HREG(63)) {
|
||||
LOG_NUM("1", 1, "../z_play.c", 3618);
|
||||
}
|
||||
|
||||
func_80061C98(globalCtx, &globalCtx->sub_11E60);
|
||||
CollisionCheck_OC(globalCtx, &globalCtx->colChkCtx);
|
||||
|
||||
if (1 && HREG(63)) {
|
||||
LOG_NUM("1", 1, "../z_play.c", 3624);
|
||||
}
|
||||
|
||||
func_800622E4(globalCtx, &globalCtx->sub_11E60);
|
||||
func_800622E4(globalCtx, &globalCtx->colChkCtx);
|
||||
|
||||
if (1 && HREG(63)) {
|
||||
LOG_NUM("1", 1, "../z_play.c", 3631);
|
||||
}
|
||||
|
||||
func_8005D40C(globalCtx, &globalCtx->sub_11E60);
|
||||
CollisionCheck_InitContext(globalCtx, &globalCtx->colChkCtx);
|
||||
|
||||
if (1 && HREG(63)) {
|
||||
LOG_NUM("1", 1, "../z_play.c", 3637);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue