Merge remote-tracking branch 'origin/develop-macready' into mergeDevelopMacreadyJan31

This commit is contained in:
Adam Bird
2024-01-31 18:12:06 -05:00
19 changed files with 130 additions and 104 deletions

View File

@@ -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,

View File

@@ -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;
}

View File

@@ -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*));
// " texture initialization scene_data_ID=%d mapSegment=%x"
osSyncPrintf("\n\n\n テクスチャ初期化 scene_data_ID=%d\nmapSegment=%x\n\n", play->sceneNum,
interfaceCtx->mapSegment, play);

View File

@@ -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) {