Merge branch 'develop-rando' of garrettjoecox.github.com:HarbourMasters/Shipwright into develop-rando-changes

This commit is contained in:
Garrett Cox
2024-04-19 12:29:10 -05:00
17 changed files with 133 additions and 79 deletions

View File

@@ -1240,7 +1240,7 @@ void Actor_Init(Actor* actor, PlayState* play) {
actor->floorBgId = BGCHECK_SCENE;
ActorShape_Init(&actor->shape, 0.0f, NULL, 0.0f);
if (Object_IsLoaded(&play->objectCtx, actor->objBankIndex)) {
//Actor_SetObjectDependency(play, actor);
Actor_SetObjectDependency(play, actor);
actor->init(actor, play);
actor->init = NULL;
@@ -2588,6 +2588,13 @@ void Actor_UpdateAll(PlayState* play, ActorContext* actorCtx) {
Actor_SetObjectDependency(play, actor);
actor->init(actor, play);
actor->init = NULL;
GameInteractor_ExecuteOnActorInit(actor);
// For enemy health bar we need to know the max health during init
if (actor->category == ACTORCAT_ENEMY) {
actor->maximumHealth = actor->colChkInfo.health;
}
}
actor = actor->next;
} else if (!Object_IsLoaded(&play->objectCtx, actor->objBankIndex)) {

View File

@@ -398,7 +398,7 @@ s32 CollisionPoly_LineVsPoly(CollisionPoly* poly, Vec3s* vtxList, Vec3f* posA, V
(poly->normal.x * posB->x + poly->normal.y * posB->y + poly->normal.z * posB->z) * COLPOLY_NORMAL_FRAC +
plane.originDist;
#ifdef __WIIU__
#if defined(__SWITCH__) || defined(__WIIU__)
// on some platforms this ends up as very small numbers due to rounding issues
if (IS_ZERO(planeDistA)) {
planeDistA = 0.0f;

View File

@@ -131,6 +131,10 @@ void SkelCurve_DrawLimb(PlayState* play, s32 limbIndex, SkelAnimeCurve* skelCurv
Matrix_TranslateRotateZYX(&pos, &rot);
Matrix_Scale(scale.x, scale.y, scale.z, MTXMODE_APPLY);
if (CVarGetInteger("gDisableLOD", 0)) {
lod = 0;
}
if (lod == 0) {
s32 pad1;

View File

@@ -78,6 +78,10 @@ void SkelAnime_DrawLod(PlayState* play, void** skeleton, Vec3s* jointTable,
Vec3f pos;
Vec3s rot;
if (CVarGetInteger("gDisableLOD", 0)) {
lod = 0;
}
if (skeleton == NULL) {
osSyncPrintf(VT_FGCOL(RED));
osSyncPrintf("Si2_Lod_draw():skelがNULLです。\n"); // "skel is NULL."
@@ -191,6 +195,10 @@ void SkelAnime_DrawFlexLod(PlayState* play, void** skeleton, Vec3s* jointTable,
Vec3s rot;
Mtx* mtx = Graph_Alloc(play->state.gfxCtx, dListCount * sizeof(Mtx));
if (CVarGetInteger("gDisableLOD", 0)) {
lod = 0;
}
if (skeleton == NULL) {
osSyncPrintf(VT_FGCOL(RED));
osSyncPrintf("Si2_Lod_draw_SV():skelがNULLです。\n"); // "skel is NULL."