mirror of
https://github.com/zeldaret/mm.git
synced 2026-05-30 17:05:25 -04:00
Split headers to be more similar to OOT (#13)
This commit is contained in:
@@ -7,7 +7,7 @@ void EnAObj_Init(ActorEnAObj* this, GlobalContext* ctxt) {
|
||||
ActorEnAObj* s0 = (ActorEnAObj*)this;
|
||||
s0->base.textId = ((s0->base.params >> 8) & 0xFF) | 0x300;
|
||||
s0->base.params = (s0->base.params & 0xFF) - 9;
|
||||
Actor_ProcessInitChain((Actor*)s0, (ActorInitVar*)&enAObjInitVar);
|
||||
Actor_ProcessInitChain((Actor*)s0, &enAObjInitVar);
|
||||
Actor_SetDrawParams(&s0->base.shape, 0, (actor_shadow_draw_func)func_800B3FC0, 12);
|
||||
Collision_InitCylinder(ctxt, &s0->collision, (Actor*)s0, &enAObjCylinderInit);
|
||||
Collision_CylinderMoveToActor((Actor*)s0, &s0->collision);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#include <ultra64.h>
|
||||
#include <global.h>
|
||||
#include <global_overlay.h>
|
||||
|
||||
void TitleSetup_GameStateResetContext(void) {
|
||||
XREG(2) = 0;
|
||||
|
||||
+12
-12
@@ -384,45 +384,45 @@ s16 Math_Vec3f_Pitch(Vec3f* from, Vec3f* to) {
|
||||
return atans_flip(Math_Vec3f_DistXZ(from, to), from->y - to->y);
|
||||
}
|
||||
|
||||
void Actor_ProcessInitChain(Actor* actor, ActorInitVar* init) {
|
||||
void Actor_ProcessInitChain(Actor* actor, InitChainEntry* init) {
|
||||
do {
|
||||
actorInitVarFuncs[init->type]((u8*)actor, init);
|
||||
} while ((init++)->cont);
|
||||
}
|
||||
|
||||
void IChain_Apply_u8(u8* actor, ActorInitVar* init) {
|
||||
void IChain_Apply_u8(u8* actor, InitChainEntry* init) {
|
||||
*(u8*)(actor + init->offset) = (u8)(init->value);
|
||||
}
|
||||
|
||||
void IChain_Apply_s8(u8* actor, ActorInitVar* init) {
|
||||
void IChain_Apply_s8(u8* actor, InitChainEntry* init) {
|
||||
*(u8*)(actor + init->offset) = (u8)(init->value);
|
||||
}
|
||||
|
||||
void IChain_Apply_u16(u8* actor, ActorInitVar* init) {
|
||||
void IChain_Apply_u16(u8* actor, InitChainEntry* init) {
|
||||
*(u16*)(actor + init->offset) = (u16)(init->value);
|
||||
}
|
||||
|
||||
void IChain_Apply_s16(u8* actor, ActorInitVar* init) {
|
||||
void IChain_Apply_s16(u8* actor, InitChainEntry* init) {
|
||||
*(u16*)(actor + init->offset) = (u16)(init->value);
|
||||
}
|
||||
|
||||
void IChain_Apply_u32(u8* actor, ActorInitVar* init) {
|
||||
void IChain_Apply_u32(u8* actor, InitChainEntry* init) {
|
||||
*(u32*)(actor + init->offset) = (u32)(init->value);
|
||||
}
|
||||
|
||||
void IChain_Apply_s32(u8* actor, ActorInitVar* init) {
|
||||
void IChain_Apply_s32(u8* actor, InitChainEntry* init) {
|
||||
*(u32*)(actor + init->offset) = (u32)(init->value);
|
||||
}
|
||||
|
||||
void IChain_Apply_f32(u8* actor, ActorInitVar* init) {
|
||||
void IChain_Apply_f32(u8* actor, InitChainEntry* init) {
|
||||
*(f32*)(actor + init->offset) = (f32)(init->value);
|
||||
}
|
||||
|
||||
void IChain_Apply_f32div1000(u8* actor, ActorInitVar* init) {
|
||||
void IChain_Apply_f32div1000(u8* actor, InitChainEntry* init) {
|
||||
*(f32*)(actor + init->offset) = (f32)(init->value) / 1000;
|
||||
}
|
||||
|
||||
void IChain_Apply_Vec3f(u8* actor, ActorInitVar* init) {
|
||||
void IChain_Apply_Vec3f(u8* actor, InitChainEntry* init) {
|
||||
Vec3f* v0 = (Vec3f*)(actor + init->offset);
|
||||
f32 f0 = (f32)(init->value);
|
||||
|
||||
@@ -431,7 +431,7 @@ void IChain_Apply_Vec3f(u8* actor, ActorInitVar* init) {
|
||||
v0->x = f0;
|
||||
}
|
||||
|
||||
void IChain_Apply_Vec3fdiv1000(u8* actor, ActorInitVar* init) {
|
||||
void IChain_Apply_Vec3fdiv1000(u8* actor, InitChainEntry* init) {
|
||||
Vec3f* v0 = (Vec3f*)(actor + init->offset);
|
||||
f32 f0 = (f32)(init->value) / 1000;
|
||||
|
||||
@@ -440,7 +440,7 @@ void IChain_Apply_Vec3fdiv1000(u8* actor, ActorInitVar* init) {
|
||||
v0->x = f0;
|
||||
}
|
||||
|
||||
void IChain_Apply_Vec3s(u8* actor, ActorInitVar* init) {
|
||||
void IChain_Apply_Vec3s(u8* actor, InitChainEntry* init) {
|
||||
Vec3s* v0 = (Vec3s*)(actor + init->offset);
|
||||
s16 v1 = (s16)(init->value);
|
||||
|
||||
|
||||
+2
-2
@@ -78,7 +78,7 @@ void Scene_ReloadUnloadedObjects(SceneContext* sceneCtxt) {
|
||||
for (i = 0; i < sceneCtxt->objectCount; i++) {
|
||||
if (status->id < 0) {
|
||||
s32 id = -status->id;
|
||||
if (status->dmaReq.vromStart == 0) {
|
||||
if (status->dmaReq.vromAddr == 0) {
|
||||
objectFile = &objectFileTable[id];
|
||||
size = objectFile->vromEnd - objectFile->vromStart;
|
||||
|
||||
@@ -138,7 +138,7 @@ void* func_8012F73C(SceneContext* sceneCtxt, s32 iParm2, s16 id) {
|
||||
ObjectFileTableEntry* fileTableEntry;
|
||||
|
||||
sceneCtxt->objects[iParm2].id = -id;
|
||||
sceneCtxt->objects[iParm2].dmaReq.vromStart = 0;
|
||||
sceneCtxt->objects[iParm2].dmaReq.vromAddr = 0;
|
||||
|
||||
fileTableEntry = &objectFileTable[id];
|
||||
vromSize = fileTableEntry->vromEnd - fileTableEntry->vromStart;
|
||||
|
||||
Reference in New Issue
Block a user