mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-07 23:10:22 +00:00
Format all src C files
This commit is contained in:
parent
251aea64ab
commit
8cfe7cce9f
652 changed files with 12488 additions and 19093 deletions
|
@ -2,26 +2,24 @@
|
|||
* File: z_obj_blockstop.c
|
||||
* Overlay: ovl_Obj_Blockstop
|
||||
* Description: Stops blocks and sets relevant flags when the block is in position.
|
||||
*/
|
||||
*/
|
||||
|
||||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
#include <z64.h>
|
||||
|
||||
typedef struct
|
||||
{
|
||||
typedef struct {
|
||||
/* 0x0000 */ Actor actor;
|
||||
} ActorObjBlockstop; // size = 0x014C
|
||||
|
||||
#define ROOM 0x00
|
||||
#define ROOM 0x00
|
||||
#define FLAGS 0x00000000
|
||||
|
||||
static void Init(ActorObjBlockstop* this, GlobalContext* globalCtx);
|
||||
static void Destroy(ActorObjBlockstop* this, GlobalContext* globalCtx);
|
||||
static void Update(ActorObjBlockstop* this, GlobalContext* globalCtx);
|
||||
|
||||
const ActorInit Obj_Blockstop_InitVars =
|
||||
{
|
||||
const ActorInit Obj_Blockstop_InitVars = {
|
||||
ACTOR_OBJ_BLOCKSTOP,
|
||||
ACTORTYPE_PROP,
|
||||
ROOM,
|
||||
|
@ -31,40 +29,37 @@ const ActorInit Obj_Blockstop_InitVars =
|
|||
(ActorFunc)Init,
|
||||
(ActorFunc)Destroy,
|
||||
(ActorFunc)Update,
|
||||
NULL
|
||||
NULL,
|
||||
};
|
||||
|
||||
static void Init(ActorObjBlockstop* this, GlobalContext* globalCtx)
|
||||
{
|
||||
if (Flags_GetSwitch(globalCtx, this->actor.params))
|
||||
static void Init(ActorObjBlockstop* this, GlobalContext* globalCtx) {
|
||||
if (Flags_GetSwitch(globalCtx, this->actor.params)) {
|
||||
Actor_Kill(&this->actor);
|
||||
else
|
||||
} else {
|
||||
this->actor.posRot.pos.y += 1;
|
||||
}
|
||||
}
|
||||
|
||||
static void Destroy(ActorObjBlockstop* this, GlobalContext* globalCtx)
|
||||
{
|
||||
static void Destroy(ActorObjBlockstop* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
static void Update(ActorObjBlockstop* this, GlobalContext* globalCtx)
|
||||
{
|
||||
static void Update(ActorObjBlockstop* this, GlobalContext* globalCtx) {
|
||||
DynaPolyActor* dynaActor;
|
||||
s32 pad;
|
||||
Vec3f sp4C;
|
||||
u32 sp48;
|
||||
s32 pad2;
|
||||
|
||||
if (func_8003DF10(&globalCtx->colCtx, &this->actor.initPosRot.pos, &this->actor.posRot.pos,
|
||||
&sp4C, &this->actor.floorPoly, 0, 0, 1, 1, &sp48, &this->actor))
|
||||
{
|
||||
if (func_8003DF10(&globalCtx->colCtx, &this->actor.initPosRot.pos, &this->actor.posRot.pos, &sp4C,
|
||||
&this->actor.floorPoly, 0, 0, 1, 1, &sp48, &this->actor)) {
|
||||
dynaActor = DynaPolyInfo_GetActor(&globalCtx->colCtx, sp48);
|
||||
|
||||
if ((dynaActor != NULL) && (dynaActor->actor.id == 0xFF))
|
||||
{
|
||||
if (((dynaActor->actor.params & 0x000F) == 3) || ((dynaActor->actor.params & 0x000F) == 7))
|
||||
if ((dynaActor != NULL) && (dynaActor->actor.id == 0xFF)) {
|
||||
if (((dynaActor->actor.params & 0x000F) == 3) || ((dynaActor->actor.params & 0x000F) == 7)) {
|
||||
func_80078884(NA_SE_SY_CORRECT_CHIME);
|
||||
else
|
||||
} else {
|
||||
func_80078884(NA_SE_SY_TRE_BOX_APPEAR);
|
||||
}
|
||||
|
||||
Flags_SetSwitch(globalCtx, this->actor.params);
|
||||
Actor_Kill(&this->actor);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue