1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-24 16:01:26 +00:00

Fix some non matchings in actors and parameter (#540)

* Fix some non matchings in actors and parameter

- `EnTuboTrap_HandleImpact` from `z_en_tubo_trap.c` (fully matching)
- `func_80ADA35C` from `z_en_po_sisters.c` (fully matching)
- `func_80B0B81C` from `z_en_stream.c` (fully matching)
- `Item_Give` from `z_parameter.c` (1 non matching left)

* Rectify bss ordering comment
This commit is contained in:
Roman971 2020-12-18 01:12:22 +01:00 committed by GitHub
parent 0376242365
commit 83e53bbaf2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 53 additions and 2110 deletions

View file

@ -52,34 +52,35 @@ void EnStream_Init(Actor* thisx, GlobalContext* globalCtx) {
void EnStream_Destroy(Actor* thisx, GlobalContext* globalCtx) {
}
#ifdef NON_MATCHING
// regalloc differences, checks if the player is range of the vortex
// Checks if the player is in range of the vortex
s32 func_80B0B81C(Vec3f* vortexPosRot, Vec3f* playerPosRot, Vec3f* posDifference, f32 vortexYScale) {
s32 ret = 0;
f32 smallConstant = 28;
f32 lowerBounds = 0 * vortexYScale * 50;
f32 upperBounds = 160 * vortexYScale * 50;
f32 smallConstant = 28.0f;
f32 upperBounds = 160 * vortexYScale * 50.0f;
f32 lowerBounds = 0 * vortexYScale * 50.0f;
f32 xzDist;
f32 range;
posDifference->x = playerPosRot->x - vortexPosRot->x;
posDifference->y = playerPosRot->y - vortexPosRot->y;
posDifference->z = playerPosRot->z - vortexPosRot->z;
xzDist = sqrtf(SQ(posDifference->x) + SQ(posDifference->z));
if (lowerBounds <= posDifference->y && posDifference->y <= upperBounds) {
posDifference->y = posDifference->y - lowerBounds;
if (xzDist <= (((75 - smallConstant) * (posDifference->y / (upperBounds - lowerBounds))) + 28)) {
posDifference->y -= lowerBounds;
range = ((75.0f - smallConstant) * (posDifference->y / (upperBounds - lowerBounds))) + 28.0f;
if (xzDist <= range) {
ret = 1;
}
}
if ((posDifference->y <= lowerBounds) && (xzDist <= 28)) {
if ((posDifference->y <= lowerBounds) && (xzDist <= 28.0f)) {
ret = 2;
}
return ret;
}
#else
s32 func_80B0B81C(Vec3f* vortexPos, Vec3f* playerPos, Vec3f* posDifference, f32 vortexYScale);
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Stream/func_80B0B81C.s")
#endif
void EnStream_SuckPlayer(EnStream* this, GlobalContext* globalCtx) {
Player* player = PLAYER;