1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-10 17:00:19 +00:00

attchaedA/attachedB renamed to parent/child (#358)

* fix colliderinit typo

* rename parent/child

* cleanup

* forgot to change something in functions.h

* SpawnAsChild

* format
This commit is contained in:
fig02 2020-08-29 18:25:16 -04:00 committed by GitHub
parent 468c592792
commit 1f1b5e39f5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
233 changed files with 584 additions and 585 deletions

View file

@ -1,7 +1,7 @@
/*
* File: z_arrow_fire.c
* Overlay: ovl_Arrow_Fire
* Description: Fire Arrow. Spawned by and attached to a normal arrow.
* Description: Fire Arrow. Spawned as a child of a normal arrow.
*/
#include "z_arrow_fire.h"
@ -64,7 +64,7 @@ void ArrowFire_Destroy(Actor* thisx, GlobalContext* globalCtx) {
void ArrowFire_Charge(ArrowFire* this, GlobalContext* globalCtx) {
EnArrow* arrow;
arrow = (EnArrow*)this->actor.attachedA;
arrow = (EnArrow*)this->actor.parent;
if ((arrow == NULL) || (arrow->actor.update == NULL)) {
Actor_Kill(&this->actor);
return;
@ -73,14 +73,14 @@ void ArrowFire_Charge(ArrowFire* this, GlobalContext* globalCtx) {
if (this->radius < 10) {
this->radius += 1;
}
// copy position and rotation from the attached arrow
// copy position and rotation from arrow
this->actor.posRot.pos = arrow->actor.posRot.pos;
this->actor.shape.rot = arrow->actor.shape.rot;
func_8002F974(&this->actor, NA_SE_PL_ARROW_CHARGE_FIRE - SFX_FLAG);
// If arrow's attached is null, Link has fired the arrow
if (arrow->actor.attachedA == NULL) {
// if arrow has no parent, player has fired the arrow
if (arrow->actor.parent == NULL) {
this->unkPos = this->actor.posRot.pos;
this->radius = 10;
ArrowFire_SetupAction(this, ArrowFire_Fly);
@ -151,12 +151,12 @@ void ArrowFire_Fly(ArrowFire* this, GlobalContext* globalCtx) {
f32 distanceScaled;
s32 pad;
arrow = (EnArrow*)this->actor.attachedA;
arrow = (EnArrow*)this->actor.parent;
if ((arrow == NULL) || (arrow->actor.update == NULL)) {
Actor_Kill(&this->actor);
return;
}
// copy position and rotation from the attached arrow
// copy position and rotation from arrow
this->actor.posRot.pos = arrow->actor.posRot.pos;
this->actor.shape.rot = arrow->actor.shape.rot;
distanceScaled = Math_Vec3f_DistXYZ(&this->unkPos, &this->actor.posRot.pos) * (1.0f / 24.0f);
@ -200,7 +200,7 @@ void ArrowFire_Draw(Actor* thisx, GlobalContext* globalCtx) {
Gfx* dispRefs[4];
stateFrames = globalCtx->state.frames;
arrow = (EnArrow*)this->actor.attachedA;
arrow = (EnArrow*)this->actor.parent;
if (1) {}
if ((arrow != NULL) && (arrow->actor.update != NULL) && (this->timer < 255)) {