z_bgcheck.c (#357)

* first few functions

* two more almost matching functions

* Rebase to NBS, get it to compile

* BgCheck_RaycastFloorStaticList OK, fix-up some functions

* BgCheck_SphVsStaticWall OK! and a few others

* more z_bgcheck NON_MATCHINGS

* OK more functions, reorganize external reference #defines

* More functions OK, more struct fixes

* More OKs

* Decomp all the way to the end of bgcheck

* All functions attempted

* Rename functions

* formatting, data migration

* Give names to unk structs, rename some structs, fix some non-equivalent functions

* WaterBox_GetSurfaceImpl OK

* BgCheck_ResetPolyCheckTbl OK, improve WaterBox_GetSurface2 codegen, eliminate warnings and clean up source.

* BcCheck3_BgActorInit ->BgCheck3_BgActorInit, fix warnings

* pr change requests

* fix crc maybe

* implement more changes

* implement alf's changes
This commit is contained in:
mzxrules
2021-11-23 11:29:18 -05:00
committed by GitHub
parent 837eb1c806
commit 6b493d3f9d
74 changed files with 5551 additions and 1293 deletions
+3 -3
View File
@@ -94,7 +94,7 @@ void FireObj_StepSize(FireObj* fire) {
void FireObj_UpdateStateTransitions(GlobalContext* globalCtx, FireObj* fire) {
Player* player = GET_PLAYER(globalCtx);
WaterBox* waterBox;
f32 sp44;
f32 waterY;
s32 sp40 = 0;
u8 nextState;
Vec3f dist;
@@ -113,8 +113,8 @@ void FireObj_UpdateStateTransitions(GlobalContext* globalCtx, FireObj* fire) {
FireObj_SetState(fire, fire->dynamicSizeStep, nextState);
}
if ((fire->flags & 1) && (fire->state != FIRE_STATE_3) &&
(func_800CA1E8(globalCtx, &globalCtx->colCtx, fire->position.x, fire->position.z, &sp44, &waterBox) != 0) &&
((fire->yScale * ((void)0, 6500.0f)) < (sp44 - fire->position.y))) { // Fake but IDK what else
WaterBox_GetSurface1_2(globalCtx, &globalCtx->colCtx, fire->position.x, fire->position.z, &waterY, &waterBox) &&
((fire->yScale * ((void)0, 6500.0f)) < (waterY - fire->position.y))) { // Fake but IDK what else
FireObj_SetState(fire, fire->dynamicSizeStep, FIRE_STATE_3);
}
if ((fire->flags & 2) && (player->itemActionParam == PLAYER_AP_STICK)) {