mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-08 15:30:14 +00:00
z_bgcheck.c, 800430A0.c, 80043480.c (#256)
* beginning of migrating changes * got matching * changed order a bit * clean up bgcheck * fix conflict * fix conflict again * first stab at identifying types, some oks * Clean up most bad structs/pointer math, move relevant structs to z64bgcheck.h, get some OKs * more OKs, z_bgcheck.bss migration, update some sys_math3d.c args * couple more OKs * pushing some OKs * fix compilation issues * code_800430A0.c OK, more files decomp'd * 8003A3E0 big OK :) * Decomp most of func_8003C614, decomp helper funcs * Decomp SurfaceType, CamData, and WaterBox property related functions * more OKs, big OK in 8003C078 * more OKs, more progress, move a function definition in z_collision_check to functions.h * more clean-ups, more OKs, dyn_vtx is now defined as u8* * 8003A5B8, 8003A7D8, 8003C614, 8003DD6C OK, document function args better * data migrated, more OKs * 80041240 OK, func_8003B3C8 and func_8003BB18 disassembled * func_80040284, 800409A8 non_matching, add IS_ZERO macro * All asm files have C representations, some big OKs, lots of minor tweaks * More OKs, non-matching code cleanup * 8003FBF4 and 80040BE4 OK, improve codegen for most functions * format z_bgcheck.c * fix warnings, compile errors on NON_MATCHING * func_8003EE80 is now NON_MATCHING * begin documenting some functions * formatting * more documentation, func_8003A95C OK * fix PHYSICAL_TO_VIRTUAL changes * fix var rename * More documentation, functions 80040E40, 80041648 OK, change types to not be compatible with ZAP * func_8004239C ok, more NON_MATCHING improvements, more documentation * Implement most suggested changes * Convert comments to slower comments * /** * Implement ZAP2 changes * my anti-virus ate my format.sh results * Rename a couple hundred functions, fix minor stuff * rename var so that clang formats correctly * run format.sh * implement Petrie's matches/suggestions * format * matches * and the asm * slight error * Add SSList * two more matches * stuff * implement code changes * clean up Petrie's matchings Co-authored-by: Arthur <arthurtilly413@gmail.com> Co-authored-by: fig02 <fig02srl@gmail.com> Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain>
This commit is contained in:
parent
209f0d21b8
commit
3cef03f5ff
416 changed files with 6610 additions and 13487 deletions
|
@ -104,8 +104,8 @@ void EnBoom_Fly(EnBoom* this, GlobalContext* globalCtx) {
|
|||
s32 pad1;
|
||||
f32 distXYZScale;
|
||||
f32 distFromLink;
|
||||
DynaPolyActor* hitActor;
|
||||
u32 hitDynaID;
|
||||
Actor* hitActor;
|
||||
s32 hitDynaID;
|
||||
Vec3f hitPoint;
|
||||
s32 pad2;
|
||||
|
||||
|
@ -120,7 +120,7 @@ void EnBoom_Fly(EnBoom* this, GlobalContext* globalCtx) {
|
|||
pitchTarget = func_8002DB28(&this->actor, &target->posRot2.pos);
|
||||
pitchDiff = this->actor.posRot.rot.x - pitchTarget;
|
||||
|
||||
distXYZScale = ((200.0f - Math_Vec3f_DistXYZ(&this->actor.posRot.pos, &target->posRot2.pos)) * 0.005f);
|
||||
distXYZScale = (200.0f - Math_Vec3f_DistXYZ(&this->actor.posRot.pos, &target->posRot2.pos)) * 0.005f;
|
||||
if (distXYZScale < 0.12f) {
|
||||
distXYZScale = 0.12f;
|
||||
}
|
||||
|
@ -142,8 +142,8 @@ void EnBoom_Fly(EnBoom* this, GlobalContext* globalCtx) {
|
|||
func_8002F974(this, NA_SE_IT_BOOMERANG_FLY - SFX_FLAG);
|
||||
|
||||
// If the boomerang collides with EnItem00 or a Skulltula token, set grabbed pointer to pick it up
|
||||
collided = (this->collider.base.atFlags & 0x2);
|
||||
collided = (!!(collided));
|
||||
collided = this->collider.base.atFlags & 0x2;
|
||||
collided = !!collided;
|
||||
if (collided) {
|
||||
if (((this->collider.base.at->id == ACTOR_EN_ITEM00) || (this->collider.base.at->id == ACTOR_EN_SI))) {
|
||||
this->grabbed = this->collider.base.at;
|
||||
|
@ -179,24 +179,24 @@ void EnBoom_Fly(EnBoom* this, GlobalContext* globalCtx) {
|
|||
Actor_Kill(&this->actor);
|
||||
}
|
||||
} else {
|
||||
collided = (this->collider.base.atFlags & 0x2);
|
||||
collided = (!!(collided));
|
||||
collided = this->collider.base.atFlags & 0x2;
|
||||
collided = !!collided;
|
||||
if (collided) {
|
||||
// Copy the position from the prevous frame to the boomerang to start the bounce back.
|
||||
Math_Vec3f_Copy(&this->actor.posRot.pos, &this->actor.pos4);
|
||||
} else {
|
||||
collided = func_8003DE84(&globalCtx->colCtx, &this->actor.pos4, &this->actor.posRot.pos, &hitPoint,
|
||||
&this->actor.wallPoly, 1, 1, 1, 1, &hitDynaID);
|
||||
collided = BgCheck_EntityLineTest1(&globalCtx->colCtx, &this->actor.pos4, &this->actor.posRot.pos,
|
||||
&hitPoint, &this->actor.wallPoly, 1, 1, 1, 1, &hitDynaID);
|
||||
|
||||
if (collided != 0) {
|
||||
// If the boomerang coolides with something and its is a Jabu Object actor with params equal to 0, then
|
||||
if (collided) {
|
||||
// If the boomerang collides with something and its is a Jabu Object actor with params equal to 0, then
|
||||
// set collided to 0 so that the boomerang will go through the wall.
|
||||
// Otherwise play a clank sound and keep collided set to bounce back.
|
||||
if ((func_8002F9EC(globalCtx, &this->actor, this->actor.wallPoly, hitDynaID, &hitPoint) != 0) ||
|
||||
((hitDynaID != 0x32) &&
|
||||
((hitActor = DynaPolyInfo_GetActor(&globalCtx->colCtx, hitDynaID)) != NULL) &&
|
||||
(hitActor->actor.id == ACTOR_BG_BDAN_OBJECTS) && (hitActor->actor.params == 0))) {
|
||||
collided = 0;
|
||||
if (func_8002F9EC(globalCtx, &this->actor, this->actor.wallPoly, hitDynaID, &hitPoint) != 0 ||
|
||||
(hitDynaID != BGCHECK_SCENE &&
|
||||
((hitActor = DynaPoly_GetActor(&globalCtx->colCtx, hitDynaID)) != NULL) &&
|
||||
hitActor->id == ACTOR_BG_BDAN_OBJECTS && hitActor->params == 0)) {
|
||||
collided = false;
|
||||
} else {
|
||||
func_80062D60(globalCtx, &hitPoint);
|
||||
}
|
||||
|
@ -205,7 +205,7 @@ void EnBoom_Fly(EnBoom* this, GlobalContext* globalCtx) {
|
|||
|
||||
// If the boomerang needs to bounce back, set x and y angle accordingly.
|
||||
// Set timer to 0 and set return actor to player so it goes back to Link.
|
||||
if (collided != 0) {
|
||||
if (collided) {
|
||||
this->actor.posRot.rot.x = -this->actor.posRot.rot.x;
|
||||
this->actor.posRot.rot.y += 0x8000;
|
||||
this->moveTo = player;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue