General Cleanup (#155)

* minor fixes

* Consolidate into globalCtx

* fix error

* Fix Warnings

Co-authored-by: engineer124 <engineer124enginer124@gmail.com>
This commit is contained in:
engineer124
2021-05-21 11:24:47 +10:00
committed by GitHub
parent 8c62c102cf
commit f4687fbbe7
37 changed files with 1198 additions and 1195 deletions
+7 -7
View File
@@ -3,10 +3,10 @@
typedef struct {
Actor actor;
s32 (*pictoFunc)(GlobalContext* ctxt, Actor* actor);
s32 (*pictoFunc)(GlobalContext* globalCtx, Actor* actor);
} PictoActor;
s32 func_8013A240(GlobalContext* ctxt) {
s32 func_8013A240(GlobalContext* globalCtx) {
PictoActor* pictoActor;
Actor* actor;
s32 type = 0;
@@ -16,15 +16,15 @@ s32 func_8013A240(GlobalContext* ctxt) {
gSaveContext.perm.pictoFlags0 = 0;
gSaveContext.perm.pictoFlags1 = 0;
if (ctxt->sceneNum == SCENE_20SICHITAI) {
if (globalCtx->sceneNum == SCENE_20SICHITAI) {
func_8013A41C(1);
}
for (; type < 12; type++) {
for (actor = ctxt->actorCtx.actorList[type].first; actor != NULL; actor = actor->next) {
for (actor = globalCtx->actorCtx.actorList[type].first; actor != NULL; actor = actor->next) {
seen = 0;
switch (ctxt->sceneNum) {
switch (globalCtx->sceneNum) {
case SCENE_20SICHITAI:
if ((actor->id == ACTOR_EN_MNK) || (actor->id == ACTOR_EN_BIGOKUTA)) {
seen = 1;
@@ -64,7 +64,7 @@ s32 func_8013A240(GlobalContext* ctxt) {
if (seen != 0) {
pictoActor = (PictoActor*)actor;
if (pictoActor->pictoFunc != NULL) {
if ((pictoActor->pictoFunc)(ctxt, actor) == 0) {
if ((pictoActor->pictoFunc)(globalCtx, actor) == 0) {
count++;
}
}
@@ -148,7 +148,7 @@ s32 func_8013A530(GlobalContext* globalCtx, Actor* actor, s32 flag, Vec3f* pos,
}
actors[0] = actor;
actors[1] = globalCtx->actorCtx.actorList[2].first; // TODO PLAYER macro
actors[1] = &PLAYER->base;
if (CollisionCheck_LineOCCheck(globalCtx, &globalCtx->colCheckCtx, pos, &camera->eye, actors, 2) != 0) {
func_8013A41C(0x3b);
ret |= 0x3b;