summaryrefslogtreecommitdiff
path: root/soh/src/code
diff options
context:
space:
mode:
authorArchez <Archez@users.noreply.github.com>2024-02-01 10:56:45 -0500
committerGitHub <noreply@github.com>2024-02-01 10:56:45 -0500
commita19056cd3da11ffb48e654b32b260c737336a5e3 (patch)
tree135008a78160fcf508a3ab4d25bc5662a378c225 /soh/src/code
parent3e91d5565a55fdff7453adbd8e4ba345bbdca7ee (diff)
parent5db4ce0b53e87b688c9767c09ae47d105cca5fa1 (diff)
Merge pull request #3894 from Archez/mergeDevelopMacreadyJan31
Merge develop-macready -> develop
Diffstat (limited to 'soh/src/code')
-rw-r--r--soh/src/code/z_actor.c12
-rw-r--r--soh/src/code/z_bgcheck.c2
-rw-r--r--soh/src/code/z_map_exp.c1
-rw-r--r--soh/src/code/z_scene.c7
4 files changed, 13 insertions, 9 deletions
diff --git a/soh/src/code/z_actor.c b/soh/src/code/z_actor.c
index cd17e1756..4b0ff576f 100644
--- a/soh/src/code/z_actor.c
+++ b/soh/src/code/z_actor.c
@@ -1239,8 +1239,7 @@ void Actor_Init(Actor* actor, PlayState* play) {
CollisionCheck_InitInfo(&actor->colChkInfo);
actor->floorBgId = BGCHECK_SCENE;
ActorShape_Init(&actor->shape, 0.0f, NULL, 0.0f);
- //if (Object_IsLoaded(&play->objectCtx, actor->objBankIndex))
- {
+ if (Object_IsLoaded(&play->objectCtx, actor->objBankIndex)) {
//Actor_SetObjectDependency(play, actor);
actor->init(actor, play);
actor->init = NULL;
@@ -2881,9 +2880,9 @@ s32 func_800314D4(PlayState* play, Actor* actor, Vec3f* arg2, f32 arg3) {
if ((arg2->z > -actor->uncullZoneScale) && (arg2->z < (actor->uncullZoneForward + actor->uncullZoneScale))) {
var = (arg3 < 1.0f) ? 1.0f : 1.0f / arg3;
- if ((((fabsf(arg2->x) - actor->uncullZoneScale) * var) < 2.0f) &&
- (((arg2->y + actor->uncullZoneDownward) * var) > -2.0f) &&
- (((arg2->y - actor->uncullZoneScale) * var) < 2.0f)) {
+ if ((((fabsf(arg2->x) - actor->uncullZoneScale) * var) < 1.0f) &&
+ (((arg2->y + actor->uncullZoneDownward) * var) > -1.0f) &&
+ (((arg2->y - actor->uncullZoneScale) * var) < 1.0f)) {
return true;
}
}
@@ -3149,6 +3148,9 @@ void Actor_FreeOverlay(ActorDBEntry* dbEntry) {
osSyncPrintf(VT_RST);
}
+// SoH: Flag to check if actors are being spawned from the actor entry list
+// This flag is checked against to allow actors which dont have an objectBankIndex in the objectCtx slot/status array to spawn
+// An example of what this fixes, is that it allows hookshot to be used as child
int gMapLoading = 0;
Actor* Actor_Spawn(ActorContext* actorCtx, PlayState* play, s16 actorId, f32 posX, f32 posY, f32 posZ,
diff --git a/soh/src/code/z_bgcheck.c b/soh/src/code/z_bgcheck.c
index 4acc68e55..7c99e7ca2 100644
--- a/soh/src/code/z_bgcheck.c
+++ b/soh/src/code/z_bgcheck.c
@@ -1902,7 +1902,7 @@ s32 BgCheck_CheckWallImpl(CollisionContext* colCtx, u16 xpFlags, Vec3f* posResul
s32 bgId2;
f32 nx, ny, nz; // unit normal of polygon
- if (CVarGetInteger("gNoClip", 0) != 0) {
+ if (CVarGetInteger("gNoClip", 0) && actor != NULL && actor->id == ACTOR_PLAYER) {
return false;
}
diff --git a/soh/src/code/z_map_exp.c b/soh/src/code/z_map_exp.c
index c4db0098b..213ee018d 100644
--- a/soh/src/code/z_map_exp.c
+++ b/soh/src/code/z_map_exp.c
@@ -524,7 +524,6 @@ void Map_Init(PlayState* play) {
interfaceCtx->unk_25A = -1;
interfaceCtx->mapSegment = GAMESTATE_ALLOC_MC(&play->state, 2 * sizeof(char*));
- interfaceCtx->mapSegmentName = GAMESTATE_ALLOC_MC(&play->state, 2 * sizeof(char*));
// "MAP texture initialization scene_data_ID=%d mapSegment=%x"
osSyncPrintf("\n\n\nMAP テクスチャ初期化 scene_data_ID=%d\nmapSegment=%x\n\n", play->sceneNum,
interfaceCtx->mapSegment, play);
diff --git a/soh/src/code/z_scene.c b/soh/src/code/z_scene.c
index 1702dc3d9..eeff423d7 100644
--- a/soh/src/code/z_scene.c
+++ b/soh/src/code/z_scene.c
@@ -83,9 +83,10 @@ void Object_UpdateBank(ObjectContext* objectCtx) {
RomFile* objectFile;
size_t size;
- /*
+
for (i = 0; i < objectCtx->num; i++) {
if (status->id < 0) {
+ /*
if (status->dmaRequest.vromAddr == 0) {
osCreateMesgQueue(&status->loadQueue, &status->loadMsg, 1);
objectFile = &gObjectTable[-status->id];
@@ -96,10 +97,12 @@ void Object_UpdateBank(ObjectContext* objectCtx) {
} else if (!osRecvMesg(&status->loadQueue, NULL, OS_MESG_NOBLOCK)) {
status->id = -status->id;
}
+ */
+ status->id = -status->id;
}
status++;
}
- */
+
}
s32 Object_GetIndex(ObjectContext* objectCtx, s16 objectId) {