1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-05 13:50:20 +00:00

Match last function in EnTp (#968)

* Data imported, 8 easy functions matched

* Init only remaining nonmatching, data in

* some renaming & fiddling with Init, still nonmatching

* fix colours

* Init still not matching

* Decompile object_tp

* renames

* Rename func_80B20DE0

* Horrible new idea

* Known equivalent, docs next

* Another attempt

* Finished naming in object_tp

* Named functions, more enums

* DrawBridge -> Drawbridge

* skulltulla -> Skulltula

* Name almost all struct variables

* Named most of the temps

* delete asm

* spec

* Missed data file, whoops

* Review

* More review changes

* Match EnTp_Init

* spec

* Delete asm
This commit is contained in:
EllipticEllipsis 2021-09-16 00:03:47 +01:00 committed by GitHub
parent b9ad6aac52
commit fbc4071cc8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 3 additions and 235 deletions

View file

@ -130,16 +130,12 @@ void EnTp_SetupAction(EnTp* this, EnTpActionFunc actionFunc) {
this->actionFunc = actionFunc;
}
#ifdef NON_MATCHING
// Regalloc, some stack, and compiler refuses to put zero in $s4 with temp_s4; all seems to be related
void EnTp_Init(Actor* thisx, GlobalContext* globalCtx2) {
GlobalContext* globalCtx = globalCtx2;
EnTp* this = THIS;
EnTp* now;
EnTp* next;
s32 i;
s64 temp_s4;
Actor_ProcessInitChain(&this->actor, sInitChain);
this->actor.targetMode = 3;
@ -163,11 +159,10 @@ void EnTp_Init(Actor* thisx, GlobalContext* globalCtx2) {
Actor_SetScale(&this->actor, 1.5f);
for (i = 0; i <= 6; i++) {
temp_s4 = 0;
next = (EnTp*)Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_TP, this->actor.world.pos.x,
this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, temp_s4);
this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, 0 * i);
if (0 * i) {} // Very fake, but needed to get the s registers right
if (next != NULL) {
now->actor.child = &next->actor;
next->actor.parent = &now->actor;
@ -183,6 +178,7 @@ void EnTp_Init(Actor* thisx, GlobalContext* globalCtx2) {
next->timer = next->unk_15C = i * -5;
next->horizontalVariation = 6.0f - (i * 0.75f);
now = next;
if (0 * i) {}
}
}
} else if (this->actor.params == TAILPASARAN_TAIL) {
@ -191,9 +187,6 @@ void EnTp_Init(Actor* thisx, GlobalContext* globalCtx2) {
EnTp_Fragment_SetupFade(this);
}
}
#else
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_En_Tp/EnTp_Init.s")
#endif
void EnTp_Destroy(Actor* thisx, GlobalContext* globalCtx) {
EnTp* this = THIS;