mirror of
https://github.com/zeldaret/oot.git
synced 2024-11-29 03:34:07 +00:00
More naming / cleanup
This commit is contained in:
parent
9bdac33144
commit
314079d00e
2 changed files with 11 additions and 9 deletions
|
@ -12,8 +12,6 @@
|
|||
|
||||
#define THIS ((BgGanonOtyuka*)thisx)
|
||||
|
||||
typedef enum { SIDE_WEST = 1, SIDE_EAST = 2, SIDE_NORTH = 4, SIDE_SOUTH = 8 } Side;
|
||||
|
||||
void BgGanonOtyuka_Init(Actor* thisx, GlobalContext* globalCtx);
|
||||
void BgGanonOtyuka_Destroy(Actor* thisx, GlobalContext* globalCtx);
|
||||
void BgGanonOtyuka_Update(Actor* thisx, GlobalContext* globalCtx);
|
||||
|
@ -166,7 +164,7 @@ void BgGanonOtyuka_WaitToFall(BgGanonOtyuka* this, GlobalContext* globalCtx) {
|
|||
center.y = this->dyna.actor.posRot.pos.y;
|
||||
center.z = D_80876A68[i].z + this->dyna.actor.posRot.pos.z;
|
||||
if (func_8003E30C(&globalCtx->colCtx, ¢er, 50.0f)) {
|
||||
this->unk_16B |= sSides[i];
|
||||
this->tiltSides |= sSides[i];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -214,16 +212,16 @@ void BgGanonOtyuka_Fall(BgGanonOtyuka* this, GlobalContext* globalCtx) {
|
|||
this->flashYScale = 0.0f;
|
||||
Math_SmoothScaleMaxF(&this->dyna.actor.posRot.pos.y, -1000.0f, 1.0f, this->dyna.actor.speedXZ);
|
||||
Math_SmoothScaleMaxF(&this->dyna.actor.speedXZ, 100.0f, 1.0f, 2.0f);
|
||||
if (!(this->unk_16B & SIDE_WEST)) {
|
||||
if (!(this->tiltSides & SIDE_WEST)) {
|
||||
this->dyna.actor.shape.rot.z -= (s16)(this->dyna.actor.speedXZ * 30.0f);
|
||||
}
|
||||
if (!(this->unk_16B & SIDE_EAST)) {
|
||||
if (!(this->tiltSides & SIDE_EAST)) {
|
||||
this->dyna.actor.shape.rot.z += (s16)(this->dyna.actor.speedXZ * 30.0f);
|
||||
}
|
||||
if (!(this->unk_16B & SIDE_NORTH)) {
|
||||
if (!(this->tiltSides & SIDE_NORTH)) {
|
||||
this->dyna.actor.shape.rot.x += (s16)(this->dyna.actor.speedXZ * 30.0f);
|
||||
}
|
||||
if (!(this->unk_16B & SIDE_SOUTH)) {
|
||||
if (!(this->tiltSides & SIDE_SOUTH)) {
|
||||
this->dyna.actor.shape.rot.x -= (s16)(this->dyna.actor.speedXZ * 30.0f);
|
||||
}
|
||||
if (this->dyna.actor.posRot.pos.y < -750.0f) {
|
||||
|
@ -371,7 +369,7 @@ void BgGanonOtyuka_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
MTXMODE_NEW);
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(sSides); i++) {
|
||||
if (platform->unk_16B & sSides[i]) {
|
||||
if (platform->tiltSides & sSides[i]) {
|
||||
Matrix_Push();
|
||||
Matrix_Translate(sSideCenters[i].x, 0.0f, sSideCenters[i].z, MTXMODE_APPLY);
|
||||
Matrix_RotateY(sSideAngles[i], MTXMODE_APPLY);
|
||||
|
|
|
@ -4,6 +4,10 @@
|
|||
#include "ultra64.h"
|
||||
#include "global.h"
|
||||
|
||||
typedef enum { SIDE_WEST = 1, SIDE_EAST = 2, SIDE_NORTH = 4, SIDE_SOUTH = 8 } PlatformSides;
|
||||
|
||||
#define SIDES_ALL (SIDE_WEST | SIDE_EAST | SIDE_NORTH | SIDE_SOUTH)
|
||||
|
||||
struct BgGanonOtyuka;
|
||||
|
||||
typedef void (*BgGanonOtyukaActionFunc)(struct BgGanonOtyuka*, GlobalContext*);
|
||||
|
@ -13,7 +17,7 @@ typedef struct BgGanonOtyuka {
|
|||
/* 0x0164 */ BgGanonOtyukaActionFunc actionFunc;
|
||||
/* 0x0168 */ s16 dropTimer;
|
||||
/* 0x016A */ u8 isFalling;
|
||||
/* 0x016B */ u8 unk_16B;
|
||||
/* 0x016B */ u8 tiltSides;
|
||||
/* 0x016C */ u8 visibleSides;
|
||||
/* 0x016D */ u8 flashTimer;
|
||||
/* 0x016E */ u8 unk_16E;
|
||||
|
|
Loading…
Reference in a new issue