Add current missing functions prototypes (#181)

* First bash

* Another batch

* Another bunch

* Update actorfixer

* run format

* Apply suggestions from code review

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>

* Suggestion

* context renaming

* Update include/functions.h

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>

* Fix renamings

* fix

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>
This commit is contained in:
Anghelo Carvajal
2021-06-17 08:54:18 -04:00
committed by GitHub
parent 52d36d7373
commit 3098abd4f6
28 changed files with 436 additions and 401 deletions
+32 -32
View File
@@ -54,7 +54,7 @@ void ActorShadow_Draw(Actor* actor, Lights* lights, GlobalContext* globalCtx, Gf
}
func_800C0094(actor->floorPoly, actor->world.pos.x, actor->floorHeight, actor->world.pos.z, &mtx);
Matrix_Put(&mtx);
SysMatrix_SetCurrentState(&mtx);
if (dlist != D_04076BC0) {
Matrix_RotateY((f32)actor->shape.rot.y * (M_PI / 32768), MTXMODE_APPLY);
@@ -118,7 +118,7 @@ void func_800B40E0(GlobalContext* globalCtx, Light* light, MtxF* arg2, s32 arg3,
sp58 = Math_FAtan2F(light->l.dir[0], light->l.dir[2]);
arg6 *= (4.5f - (light->l.dir[1] * D_801DCA1C));
arg6 = (arg6 < 1.0f) ? 1.0f : arg6;
Matrix_Put(arg2);
SysMatrix_SetCurrentState(arg2);
Matrix_RotateY(sp58, MTXMODE_APPLY);
Matrix_Scale(arg5, 1.0f, arg5 * arg6, MTXMODE_APPLY);
@@ -147,16 +147,16 @@ void func_800B40E0(GlobalContext* globalCtx, Light* light, MtxF* arg2, s32 arg3,
#pragma GLOBAL_ASM("./asm/non_matchings/code/z_actor//func_800B5040.asm")
void Actor_TargetContextInit(TargetContext* targetCtxt, Actor* actor, GlobalContext* globalCtx) {
targetCtxt->unk90 = NULL;
targetCtxt->unk8C = NULL;
targetCtxt->unk3C = NULL;
targetCtxt->unk38 = NULL;
targetCtxt->unk4B = 0;
targetCtxt->unk4C = 0;
targetCtxt->unk40 = 0;
func_800B5040(targetCtxt, actor, actor->category, globalCtx);
func_800B4F78(targetCtxt, actor->category, globalCtx);
void Actor_TargetContextInit(TargetContext* targetCtx, Actor* actor, GlobalContext* globalCtx) {
targetCtx->unk90 = NULL;
targetCtx->unk8C = NULL;
targetCtx->unk3C = NULL;
targetCtx->unk38 = NULL;
targetCtx->unk4B = 0;
targetCtx->unk4C = 0;
targetCtx->unk40 = 0;
func_800B5040(targetCtx, actor, actor->category, globalCtx);
func_800B4F78(targetCtx, actor->category, globalCtx);
}
#pragma GLOBAL_ASM("./asm/non_matchings/code/z_actor//func_800B5208.asm")
@@ -235,34 +235,34 @@ void Actor_SetCollectibleFlag(GlobalContext* globalCtx, s32 index) {
}
}
void Actor_TitleCardContextInit(GlobalContext* globalCtx, TitleCardContext* titleCtxt) {
titleCtxt->fadeOutDelay = 0;
titleCtxt->fadeInDelay = 0;
titleCtxt->color = 0;
titleCtxt->alpha = 0;
void Actor_TitleCardContextInit(GlobalContext* globalCtx, TitleCardContext* titleCardCtx) {
titleCardCtx->fadeOutDelay = 0;
titleCardCtx->fadeInDelay = 0;
titleCardCtx->color = 0;
titleCardCtx->alpha = 0;
}
void Actor_TitleCardCreate(GlobalContext* globalCtx, TitleCardContext* titleCtxt, u32 texture, s16 param_4, s16 param_5,
void Actor_TitleCardCreate(GlobalContext* globalCtx, TitleCardContext* titleCardCtx, u32 texture, s16 param_4, s16 param_5,
u8 param_6, u8 param_7) {
titleCtxt->texture = texture;
titleCtxt->unk4 = param_4;
titleCtxt->unk6 = param_5;
titleCtxt->unk8 = param_6;
titleCtxt->unk9 = param_7;
titleCtxt->fadeOutDelay = 80;
titleCtxt->fadeInDelay = 0;
titleCardCtx->texture = texture;
titleCardCtx->unk4 = param_4;
titleCardCtx->unk6 = param_5;
titleCardCtx->unk8 = param_6;
titleCardCtx->unk9 = param_7;
titleCardCtx->fadeOutDelay = 80;
titleCardCtx->fadeInDelay = 0;
}
#pragma GLOBAL_ASM("./asm/non_matchings/code/z_actor//Actor_Nop800B5E50.asm")
void Actor_TitleCardUpdate(GlobalContext* globalCtx, TitleCardContext* titleCtxt) {
if (DECR(titleCtxt->fadeInDelay) == 0) {
if (DECR(titleCtxt->fadeOutDelay) == 0) {
Math_StepToS(&titleCtxt->alpha, 0, 30);
Math_StepToS(&titleCtxt->color, 0, 70);
void Actor_TitleCardUpdate(GlobalContext* globalCtx, TitleCardContext* titleCardCtx) {
if (DECR(titleCardCtx->fadeInDelay) == 0) {
if (DECR(titleCardCtx->fadeOutDelay) == 0) {
Math_StepToS(&titleCardCtx->alpha, 0, 30);
Math_StepToS(&titleCardCtx->color, 0, 70);
} else {
Math_StepToS(&titleCtxt->alpha, 255, 10);
Math_StepToS(&titleCtxt->color, 255, 20);
Math_StepToS(&titleCardCtx->alpha, 255, 10);
Math_StepToS(&titleCardCtx->color, 255, 20);
}
}
}