1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-12 01:40:47 +00:00

Format all src C files

This commit is contained in:
Roman971 2020-03-22 22:19:43 +01:00
parent 251aea64ab
commit 8cfe7cce9f
652 changed files with 12488 additions and 19093 deletions

View file

@ -2,11 +2,11 @@
* File: z_bg_pushbox.c
* Overlay: ovl_Bg_Pushbox
* Description:
*/
*/
#include "z_bg_pushbox.h"
#define ROOM 0x00
#define ROOM 0x00
#define FLAGS 0x00000000
static void func_808A8AE0(BgPushbox* this, ActorFunc actionFunc);
@ -16,8 +16,7 @@ static void func_808A8BAC(BgPushbox* this, GlobalContext* globalCtx);
static void BgPushbox_Update(BgPushbox* this, GlobalContext* globalCtx);
static void BgPushbox_Draw(BgPushbox* this, GlobalContext* globalCtx);
const ActorInit Bg_Pushbox_InitVars =
{
const ActorInit Bg_Pushbox_InitVars = {
ACTOR_BG_PUSHBOX,
ACTORTYPE_BG,
ROOM,
@ -33,18 +32,15 @@ const ActorInit Bg_Pushbox_InitVars =
extern u32 D_06000000;
extern u32 D_06000350;
static InitChainEntry initChain[] =
{
ICHAIN_F32_DIV1000(gravity, -2000, ICHAIN_STOP)
static InitChainEntry initChain[] = {
ICHAIN_F32_DIV1000(gravity, -2000, ICHAIN_STOP),
};
static void func_808A8AE0(BgPushbox* this, ActorFunc actionFunc)
{
static void func_808A8AE0(BgPushbox* this, ActorFunc actionFunc) {
this->actionFunc = actionFunc;
}
static void BgPushbox_Init(BgPushbox* this, GlobalContext* globalCtx)
{
static void BgPushbox_Init(BgPushbox* this, GlobalContext* globalCtx) {
s32 pad[2];
u32 local_c = 0;
Actor* thisx = &this->dyna.actor;
@ -57,38 +53,34 @@ static void BgPushbox_Init(BgPushbox* this, GlobalContext* globalCtx)
func_808A8AE0(this, &func_808A8BAC);
}
static void BgPushbox_Destroy(BgPushbox* this, GlobalContext* globalCtx)
{
static void BgPushbox_Destroy(BgPushbox* this, GlobalContext* globalCtx) {
DynaPolyInfo_Free(globalCtx, &globalCtx->colCtx.dyna, this->dyna.dynaPolyId);
}
static void func_808A8BAC(BgPushbox* this, GlobalContext* globalCtx)
{
static void func_808A8BAC(BgPushbox* this, GlobalContext* globalCtx) {
Actor* thisx = &this->dyna.actor;
thisx->speedXZ += this->dyna.unk_150 * 0.2f;
thisx->speedXZ = (thisx->speedXZ < -1.0f) ? -1.0f :
((thisx->speedXZ > 1.0f) ? 1.0f :
thisx->speedXZ);
thisx->speedXZ = (thisx->speedXZ < -1.0f) ? -1.0f : ((thisx->speedXZ > 1.0f) ? 1.0f : thisx->speedXZ);
Math_ApproxF(&thisx->speedXZ, 0.0f, 0.2f);
thisx->posRot.rot.y = this->dyna.unk_158;
Actor_MoveForward(thisx);
func_8002E4B4(globalCtx, thisx, 20.0f, 40.0f, 40.0f, 0x1D);
}
static void BgPushbox_Update(BgPushbox* this, GlobalContext* globalCtx){
static void BgPushbox_Update(BgPushbox* this, GlobalContext* globalCtx) {
this->actionFunc(this, globalCtx);
func_8002DF90(this);
}
static void BgPushbox_Draw(BgPushbox* this, GlobalContext* globalCtx)
{
static void BgPushbox_Draw(BgPushbox* this, GlobalContext* globalCtx) {
GraphicsContext* gfxCtx = globalCtx->state.gfxCtx;
Gfx* gfxArr[5];
func_800C6AC4(gfxArr, globalCtx->state.gfxCtx, "../z_bg_pushbox.c", 263);
func_80093D18(globalCtx->state.gfxCtx);
gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_pushbox.c", 269), G_MTX_NOPUSH | G_MTX_MODELVIEW | G_MTX_LOAD);
gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_pushbox.c", 269),
G_MTX_NOPUSH | G_MTX_MODELVIEW | G_MTX_LOAD);
gSPDisplayList(gfxCtx->polyOpa.p++, &D_06000000);
func_800C6B54(gfxArr, globalCtx->state.gfxCtx, "../z_bg_pushbox.c", 272);
}