1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-11-11 03:39:59 +00:00

Fix whitespace

This commit is contained in:
Faschz 2020-03-18 21:26:41 -05:00
parent 149c8cf57e
commit e285671a03
3 changed files with 73 additions and 73 deletions

View file

@ -329,8 +329,8 @@ typedef struct
/* 0x15A */ u16 unk_15A; /* 0x15A */ u16 unk_15A;
/* 0x15C */ u32 unk_15C; /* 0x15C */ u32 unk_15C;
/* 0x160 */ u8 unk_160; /* 0x160 */ u8 unk_160;
/* 0x161 */ char unk_161; /* 0x161 */ char unk_161;
/* 0x162 */ s16 unk_162; /* 0x162 */ s16 unk_162;
} DynaPolyActor; // size = 0x164 } DynaPolyActor; // size = 0x164
typedef struct typedef struct

View file

@ -33,99 +33,99 @@ extern u32 D_06001F10;
static void EnLightbox_Init(EnLightbox* this, GlobalContext* globalCtx) static void EnLightbox_Init(EnLightbox* this, GlobalContext* globalCtx)
{ {
u32 local_c = 0; u32 local_c = 0;
Actor* thisx = &this->dyna.actor; Actor* thisx = &this->dyna.actor;
s32 pad[4]; s32 pad[4];
switch(thisx->params){ switch(thisx->params){
case 0: case 0:
Actor_SetScale(thisx, 0.025f); Actor_SetScale(thisx, 0.025f);
break; break;
case 1: case 1:
Actor_SetScale(thisx, 0.05f); Actor_SetScale(thisx, 0.05f);
break; break;
case 2: case 2:
Actor_SetScale(thisx, 0.075f); Actor_SetScale(thisx, 0.075f);
break; break;
case 3: case 3:
Actor_SetScale(thisx, 0.1f); Actor_SetScale(thisx, 0.1f);
default: default:
break; break;
} }
thisx->posRot2.pos = thisx->posRot.pos; thisx->posRot2.pos = thisx->posRot.pos;
thisx->sub_98.unk_10 = 0x1E; thisx->sub_98.unk_10 = 0x1E;
thisx->sub_98.unk_12 = 0x32; thisx->sub_98.unk_12 = 0x32;
ActorShape_Init(&thisx->shape, 0.0f, ActorShadow_DrawFunc_Circle, 6.0f); ActorShape_Init(&thisx->shape, 0.0f, ActorShadow_DrawFunc_Circle, 6.0f);
this->dyna.unk_160 = 0; this->dyna.unk_160 = 0;
this->dyna.unk_15C = 0; this->dyna.unk_15C = 0;
thisx->unk_1F = 0; thisx->unk_1F = 0;
thisx->gravity = -2.0f; thisx->gravity = -2.0f;
DynaPolyInfo_Alloc(&D_06001F10, &local_c); DynaPolyInfo_Alloc(&D_06001F10, &local_c);
this->dyna.dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, thisx, local_c); this->dyna.dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, thisx, local_c);
} }
static void EnLightbox_Destroy(EnLightbox* this, GlobalContext* globalCtx) static void EnLightbox_Destroy(EnLightbox* this, GlobalContext* globalCtx)
{ {
DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId); DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
} }
static void EnLightbox_Update(EnLightbox* this, GlobalContext* globalCtx) static void EnLightbox_Update(EnLightbox* this, GlobalContext* globalCtx)
{ {
Actor* thisx = &this->dyna.actor; Actor* thisx = &this->dyna.actor;
if (this->dyna.unk_162 != 0) if (this->dyna.unk_162 != 0)
{
if (func_8002F5A0(thisx, globalCtx))
{ {
this->dyna.unk_162 = 0; if (func_8002F5A0(thisx, globalCtx))
} {
} this->dyna.unk_162 = 0;
else }
{
if (func_8002F410(thisx, globalCtx))
{
this->dyna.unk_162++;
} }
else else
{ {
if (thisx->speedXZ) if (func_8002F410(thisx, globalCtx))
{
if (thisx->bgCheckFlags & 8)
{ {
thisx->posRot.rot.y = (thisx->posRot.rot.y + thisx->unk_7E) - thisx->posRot.rot.y; this->dyna.unk_162++;
Audio_PlaySoundGeneral(NA_SE_EV_BOMB_BOUND, &thisx->unk_E4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
thisx->speedXZ *= 0.7f;
thisx->bgCheckFlags &= ~0x8;
}
}
if ((thisx->bgCheckFlags & 1) == 0)
{
Math_ApproxF(&thisx->speedXZ, 0, IREG(57) / 100.0f);
}
else
{
Math_ApproxF(&thisx->speedXZ, 0, IREG(58) / 100.0f);
if ((thisx->bgCheckFlags & 2) && (thisx->velocity.y < IREG(59) / 100.0f))
{
Audio_PlaySoundGeneral(NA_SE_EV_BOMB_BOUND, &thisx->unk_E4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
thisx->velocity.y *= IREG(60) / 100.0f;
thisx->bgCheckFlags &= ~0x1;
} }
else else
{ {
func_8002F580(thisx, globalCtx); if (thisx->speedXZ)
{
if (thisx->bgCheckFlags & 8)
{
thisx->posRot.rot.y = (thisx->posRot.rot.y + thisx->unk_7E) - thisx->posRot.rot.y;
Audio_PlaySoundGeneral(NA_SE_EV_BOMB_BOUND, &thisx->unk_E4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
thisx->speedXZ *= 0.7f;
thisx->bgCheckFlags &= ~0x8;
}
}
if ((thisx->bgCheckFlags & 1) == 0)
{
Math_ApproxF(&thisx->speedXZ, 0, IREG(57) / 100.0f);
}
else
{
Math_ApproxF(&thisx->speedXZ, 0, IREG(58) / 100.0f);
if ((thisx->bgCheckFlags & 2) && (thisx->velocity.y < IREG(59) / 100.0f))
{
Audio_PlaySoundGeneral(NA_SE_EV_BOMB_BOUND, &thisx->unk_E4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
thisx->velocity.y *= IREG(60) / 100.0f;
thisx->bgCheckFlags &= ~0x1;
}
else
{
func_8002F580(thisx, globalCtx);
}
}
} }
}
} }
} Actor_MoveForward(thisx);
Actor_MoveForward(thisx); func_8002E4B4(globalCtx, thisx, thisx->sub_98.unk_12, thisx->sub_98.unk_10, thisx->sub_98.unk_10, 0x1D);
func_8002E4B4(globalCtx, thisx, thisx->sub_98.unk_12, thisx->sub_98.unk_10, thisx->sub_98.unk_10, 0x1D); thisx->posRot2.pos = thisx->posRot.pos;
thisx->posRot2.pos = thisx->posRot.pos;
} }
static void EnLightbox_Draw(EnLightbox* this, GlobalContext* globalCtx) static void EnLightbox_Draw(EnLightbox* this, GlobalContext* globalCtx)
{ {
Draw_DListOpa(globalCtx, &D_06000B70); Draw_DListOpa(globalCtx, &D_06000B70);
} }

View file

@ -6,7 +6,7 @@
typedef struct typedef struct
{ {
/* 0x0000 */ DynaPolyActor dyna; /* 0x0000 */ DynaPolyActor dyna;
} EnLightbox; // size = 0x0164 } EnLightbox; // size = 0x0164
extern const ActorInit En_Lightbox_InitVars; extern const ActorInit En_Lightbox_InitVars;