mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-06 14:20:11 +00:00
Match Jsjutan and Tr and improve match of Yabusame_mark and holl (#769)
* some cleanup * .s * more matches * .s and yabu * holl try * format * Update src/overlays/actors/ovl_En_Holl/z_en_holl.c Co-authored-by: louist103 <35883445+louist103@users.noreply.github.com> Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain> Co-authored-by: louist103 <35883445+louist103@users.noreply.github.com>
This commit is contained in:
parent
ab05eb9776
commit
ed78d18a25
10 changed files with 173 additions and 1189 deletions
|
@ -264,16 +264,15 @@ void MirRay_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void MirRay_SetIntensity(MirRay* this, GlobalContext* globalCtx) {
|
||||
Vec3f sp4C;
|
||||
f32 sp4C[3];
|
||||
f32 temp_f0;
|
||||
f32 temp_f0_2;
|
||||
f32 temp_f2_2;
|
||||
MtxF* shieldMtx;
|
||||
s32 pad;
|
||||
Player* player = PLAYER;
|
||||
f32* new_var;
|
||||
MtxF* shieldMtx = &player->shieldMf;
|
||||
|
||||
this->reflectIntensity = 0.0f;
|
||||
shieldMtx = &player->shieldMf;
|
||||
|
||||
if (MirRay_CheckInFrustum(&this->sourcePt, &this->poolPt, shieldMtx->wx, shieldMtx->wy, shieldMtx->wz,
|
||||
this->sourceEndRad, this->poolEndRad)) {
|
||||
|
@ -290,16 +289,14 @@ void MirRay_SetIntensity(MirRay* this, GlobalContext* globalCtx) {
|
|||
if (sMirRayData[this->actor.params].params & 1) {
|
||||
this->reflectIntensity = 1.0f;
|
||||
} else {
|
||||
new_var = &sp4C.z; // permuter suggested this, does not match without
|
||||
sp4C[0] = this->poolPt.x - this->sourcePt.x;
|
||||
sp4C[1] = this->poolPt.y - this->sourcePt.y;
|
||||
sp4C[2] = this->poolPt.z - this->sourcePt.z;
|
||||
|
||||
sp4C.x = this->poolPt.x - this->sourcePt.x;
|
||||
sp4C.y = this->poolPt.y - this->sourcePt.y;
|
||||
sp4C.z = this->poolPt.z - this->sourcePt.z;
|
||||
|
||||
temp_f2_2 = ((-shieldMtx->zx * sp4C.x) - (shieldMtx->zy * sp4C.y)) - (shieldMtx->zz * (*new_var));
|
||||
temp_f2_2 = -shieldMtx->zx * sp4C[0] - shieldMtx->zy * sp4C[1] - shieldMtx->zz * sp4C[2];
|
||||
|
||||
if (temp_f2_2 < 0.0f) {
|
||||
temp_f0_2 = sqrtf(SQ(sp4C.x) + SQ(sp4C.y) + SQ(*new_var));
|
||||
temp_f0_2 = sqrtf(SQ(sp4C[0]) + SQ(sp4C[1]) + SQ(sp4C[2]));
|
||||
if ((temp_f0 != 0.0f) && (temp_f0_2 != 0.0f)) {
|
||||
this->reflectIntensity = -temp_f2_2 / (temp_f0 * temp_f0_2);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue