mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-07 14:50:15 +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
|
@ -83,9 +83,11 @@ void EnOkuta_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
if ((this->numShots == 0xFF) || (this->numShots == 0)) {
|
||||
this->numShots = 1;
|
||||
}
|
||||
thisx->groundY = func_8003C9A4(&globalCtx->colCtx, &thisx->floorPoly, &sp30, thisx, &thisx->posRot.pos);
|
||||
if (!func_80042244(globalCtx, &globalCtx->colCtx, thisx->posRot.pos.x, thisx->posRot.pos.z, &ySurface,
|
||||
&outWaterBox) ||
|
||||
thisx->groundY =
|
||||
BgCheck_EntityRaycastFloor4(&globalCtx->colCtx, &thisx->floorPoly, &sp30, thisx, &thisx->posRot.pos);
|
||||
//! @bug calls WaterBox_GetSurfaceImpl directly
|
||||
if (!WaterBox_GetSurfaceImpl(globalCtx, &globalCtx->colCtx, thisx->posRot.pos.x, thisx->posRot.pos.z, &ySurface,
|
||||
&outWaterBox) ||
|
||||
(ySurface <= thisx->groundY)) {
|
||||
Actor_Kill(thisx);
|
||||
} else {
|
||||
|
@ -432,7 +434,7 @@ void EnOkuta_ProjectileFly(EnOkuta* this, GlobalContext* globalCtx) {
|
|||
this->actor.speedXZ = CLAMP_MIN(this->actor.speedXZ, 1.0f);
|
||||
}
|
||||
if ((this->actor.bgCheckFlags & 8) || (this->actor.bgCheckFlags & 1) || (this->collider.base.atFlags & 2) ||
|
||||
this->collider.base.acFlags & 2 || this->collider.base.maskA & 2 || this->actor.groundY == -32000.0f) {
|
||||
this->collider.base.acFlags & 2 || this->collider.base.maskA & 2 || this->actor.groundY == BGCHECK_Y_MIN) {
|
||||
if ((player->currentShield == PLAYER_SHIELD_DEKU ||
|
||||
(player->currentShield == PLAYER_SHIELD_HYLIAN && LINK_IS_ADULT)) &&
|
||||
this->collider.base.atFlags & 2 && this->collider.base.atFlags & 0x10 && this->collider.base.atFlags & 4) {
|
||||
|
@ -529,8 +531,8 @@ void EnOkuta_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
if (!(player->stateFlags1 & 0x300000C0)) {
|
||||
if (this->actor.params == 0) {
|
||||
EnOkuta_ColliderCheck(this, globalCtx2);
|
||||
if (!func_80042244(globalCtx2, &globalCtx2->colCtx, this->actor.posRot.pos.x, this->actor.posRot.pos.z,
|
||||
&ySurface, &outWaterBox) ||
|
||||
if (!WaterBox_GetSurfaceImpl(globalCtx2, &globalCtx2->colCtx, this->actor.posRot.pos.x,
|
||||
this->actor.posRot.pos.z, &ySurface, &outWaterBox) ||
|
||||
(ySurface < this->actor.groundY)) {
|
||||
if (this->actor.colChkInfo.health != 0) {
|
||||
Actor_Kill(&this->actor);
|
||||
|
@ -552,12 +554,14 @@ void EnOkuta_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
Math_Vec3f_Copy(&sp38, &this->actor.posRot.pos);
|
||||
func_8002E4B4(globalCtx2, &this->actor, 10.0f, 15.0f, 30.0f, 5);
|
||||
if ((this->actor.bgCheckFlags & 8) &&
|
||||
func_80042048(&globalCtx2->colCtx, this->actor.wallPoly, this->actor.wallPolySource)) {
|
||||
SurfaceType_IsIgnoredByProjectiles(&globalCtx2->colCtx, this->actor.wallPoly,
|
||||
this->actor.wallPolySource)) {
|
||||
sp34 = true;
|
||||
this->actor.bgCheckFlags &= ~8;
|
||||
}
|
||||
if ((this->actor.bgCheckFlags & 1) &&
|
||||
func_80042048(&globalCtx2->colCtx, this->actor.floorPoly, this->actor.floorPolySource)) {
|
||||
SurfaceType_IsIgnoredByProjectiles(&globalCtx2->colCtx, this->actor.floorPoly,
|
||||
this->actor.floorPolySource)) {
|
||||
sp34 = true;
|
||||
this->actor.bgCheckFlags &= ~1;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue