1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-11-10 19:20:13 +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;
/* 0x15C */ u32 unk_15C;
/* 0x160 */ u8 unk_160;
/* 0x161 */ char unk_161;
/* 0x162 */ s16 unk_162;
/* 0x161 */ char unk_161;
/* 0x162 */ s16 unk_162;
} DynaPolyActor; // size = 0x164
typedef struct

View file

@ -33,99 +33,99 @@ extern u32 D_06001F10;
static void EnLightbox_Init(EnLightbox* this, GlobalContext* globalCtx)
{
u32 local_c = 0;
Actor* thisx = &this->dyna.actor;
s32 pad[4];
u32 local_c = 0;
Actor* thisx = &this->dyna.actor;
s32 pad[4];
switch(thisx->params){
case 0:
Actor_SetScale(thisx, 0.025f);
break;
case 1:
Actor_SetScale(thisx, 0.05f);
break;
case 2:
Actor_SetScale(thisx, 0.075f);
break;
case 3:
Actor_SetScale(thisx, 0.1f);
default:
break;
}
switch(thisx->params){
case 0:
Actor_SetScale(thisx, 0.025f);
break;
case 1:
Actor_SetScale(thisx, 0.05f);
break;
case 2:
Actor_SetScale(thisx, 0.075f);
break;
case 3:
Actor_SetScale(thisx, 0.1f);
default:
break;
}
thisx->posRot2.pos = thisx->posRot.pos;
thisx->sub_98.unk_10 = 0x1E;
thisx->sub_98.unk_12 = 0x32;
ActorShape_Init(&thisx->shape, 0.0f, ActorShadow_DrawFunc_Circle, 6.0f);
this->dyna.unk_160 = 0;
this->dyna.unk_15C = 0;
thisx->unk_1F = 0;
thisx->gravity = -2.0f;
DynaPolyInfo_Alloc(&D_06001F10, &local_c);
this->dyna.dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, thisx, local_c);
thisx->posRot2.pos = thisx->posRot.pos;
thisx->sub_98.unk_10 = 0x1E;
thisx->sub_98.unk_12 = 0x32;
ActorShape_Init(&thisx->shape, 0.0f, ActorShadow_DrawFunc_Circle, 6.0f);
this->dyna.unk_160 = 0;
this->dyna.unk_15C = 0;
thisx->unk_1F = 0;
thisx->gravity = -2.0f;
DynaPolyInfo_Alloc(&D_06001F10, &local_c);
this->dyna.dynaPolyId = DynaPolyInfo_RegisterActor(globalCtx, &globalCtx->colCtx.dyna, thisx, local_c);
}
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)
{
Actor* thisx = &this->dyna.actor;
Actor* thisx = &this->dyna.actor;
if (this->dyna.unk_162 != 0)
{
if (func_8002F5A0(thisx, globalCtx))
if (this->dyna.unk_162 != 0)
{
this->dyna.unk_162 = 0;
}
}
else
{
if (func_8002F410(thisx, globalCtx))
{
this->dyna.unk_162++;
if (func_8002F5A0(thisx, globalCtx))
{
this->dyna.unk_162 = 0;
}
}
else
{
if (thisx->speedXZ)
{
if (thisx->bgCheckFlags & 8)
if (func_8002F410(thisx, globalCtx))
{
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;
this->dyna.unk_162++;
}
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);
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;
Actor_MoveForward(thisx);
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;
}
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
{
/* 0x0000 */ DynaPolyActor dyna;
/* 0x0000 */ DynaPolyActor dyna;
} EnLightbox; // size = 0x0164
extern const ActorInit En_Lightbox_InitVars;