1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-15 12:24:39 +00:00

En_Attack_Niw, En_Insect, z_skin_matrix, and z_skelanime matched (#493)

* Darkmeiro decompilation

Bg_Gnd_Darkmeiro decompiled, matched, and documented.

* give this a shot

* fix conflict

* one more try

* could be useful

* whoops

* ZAP2 stuff

* ZAP why

* ZAP again

* marginal improvement

* matched functions. Also fixed a serious lack of static

* format

* more static

* fixing a function prototype

* skelanime OK

* forgot .s

* skin matrix matched

* format
This commit is contained in:
petrie911 2020-11-23 20:34:32 -06:00 committed by GitHub
parent 89f89ac5ea
commit 3aa76152c5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
61 changed files with 209 additions and 1264 deletions

View file

@ -308,6 +308,7 @@ void EffectBlure_UpdateFlags(EffectBlureElement* elem) {
void EffectBlure_GetComputedValues(EffectBlure* this, s32 index, f32 ratio, Vec3s* vec1, Vec3s* vec2,
Color_RGBA8* color1, Color_RGBA8* color2) {
Vec3s sp30;
s32 pad;
EffectBlureElement* elem;
f32 mode4Param;
@ -333,14 +334,14 @@ void EffectBlure_GetComputedValues(EffectBlure* this, s32 index, f32 ratio, Vec3
break;
case 3:
ratio = ratio * 0.5f;
ratio /= 2.0f;
vec1->x = func_80027E34(elem->p1.x, elem->p2.x, ratio);
vec1->y = func_80027E34(elem->p1.y, elem->p2.y, ratio);
vec1->z = func_80027E34(elem->p1.z, elem->p2.z, ratio);
vec2->x = func_80027E34(elem->p2.x, elem->p1.x, ratio);
vec2->y = func_80027E34(elem->p2.y, elem->p1.y, ratio);
vec2->z = func_80027E34(elem->p2.z, elem->p1.z, ratio);
ratio = ratio + ratio;
ratio *= 2.0f;
break;
case 4:
@ -352,9 +353,9 @@ void EffectBlure_GetComputedValues(EffectBlure* this, s32 index, f32 ratio, Vec3
vec1->x = (sp30.x * 0.5f * (mode4Param - 1.0f) * ratio) + elem->p1.x;
vec1->y = (sp30.y * 0.5f * (mode4Param - 1.0f) * ratio) + elem->p1.y;
vec1->z = (sp30.z * 0.5f * (mode4Param - 1.0f) * ratio) + elem->p1.z;
vec2->x = -(sp30.x * 0.5f * (mode4Param - 1.0f) * ratio) + elem->p2.x;
vec2->y = -(sp30.y * 0.5f * (mode4Param - 1.0f) * ratio) + elem->p2.y;
vec2->z = -(sp30.z * 0.5f * (mode4Param - 1.0f) * ratio) + elem->p2.z;
vec2->x = elem->p2.x - (sp30.x * 0.5f * (mode4Param - 1.0f) * ratio);
vec2->y = elem->p2.y - (sp30.y * 0.5f * (mode4Param - 1.0f) * ratio);
vec2->z = elem->p2.z - (sp30.z * 0.5f * (mode4Param - 1.0f) * ratio);
break;
case 0:
@ -367,18 +368,10 @@ void EffectBlure_GetComputedValues(EffectBlure* this, s32 index, f32 ratio, Vec3
vec2->z = elem->p2.z;
break;
}
sp30 = sp30; // Optimized out but seems necessary to match stack usage
if (this->flags & 0x10) {
color1->a = 255;
color1->b = 255;
color1->g = 255;
color1->r = 255;
color2->r = 255;
color2->g = 255;
color2->b = 255;
color2->a = 255;
color1->r = color1->g = color1->b = color1->a = color2->r = color2->g = color2->b = color2->a = 255;
} else {
color1->r = func_80027E84(this->p1StartColor.r, this->p1EndColor.r, ratio);
color1->g = func_80027E84(this->p1StartColor.g, this->p1EndColor.g, ratio);