1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-15 20:35:13 +00:00

Fix misc 15 (#1298)

* Use `SCENE_` enum more

* Decimal for pos in `D_8011F9B8`

* `__osEventStateTab`: length `OS_NUM_EVENTS + 1` -> `OS_NUM_EVENTS`

* thone -> throne

* `s` on local data

* minor sfxId cleanup

* Run formatter

* Fixup 0x19 + 1 = 0x1A, not 0x20 lol

* Tlut -> TLUT

* DemoKankyo params usage cleanup

* Some proofreading (up to z_actor.c)

* Revert 0 -> sfxId, add todo comment (sfxId=0 is weird apparently)

* `sZdWaterBox` -> `sZorasDomainWaterBox`

* `msgMode == MSGMODE_`, not `GAMEMODE_` (my bad Sadge)
This commit is contained in:
Dragorn421 2022-06-24 16:45:05 -07:00 committed by GitHub
parent fe7afb9b07
commit 397e481f9a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 60 additions and 54 deletions

View file

@ -4171,17 +4171,17 @@ u32 SurfaceType_IsWallDamage(CollisionContext* colCtx, CollisionPoly* poly, s32
/**
* Zora's Domain WaterBox in King Zora's Room
*/
WaterBox zdWaterBox = { -348, 877, -1746, 553, 780, 0x2104 };
WaterBox sZorasDomainWaterBox = { -348, 877, -1746, 553, 780, 0x2104 };
/**
* WaterBox's effective bounding box
*/
f32 zdWaterBoxMinX = -348.0f;
f32 zdWaterBoxMinY = 777.0f;
f32 zdWaterBoxMinZ = -1746.0f;
f32 zdWaterBoxMaxX = 205.0f;
f32 zdWaterBoxMaxY = 977.0f;
f32 zdWaterBoxMaxZ = -967.0f;
f32 sZorasDomainWaterBoxMinX = -348.0f;
f32 sZorasDomainWaterBoxMinY = 777.0f;
f32 sZorasDomainWaterBoxMinZ = -1746.0f;
f32 sZorasDomainWaterBoxMaxX = 205.0f;
f32 sZorasDomainWaterBoxMaxY = 977.0f;
f32 sZorasDomainWaterBoxMaxZ = -967.0f;
/**
* Public. Get the water surface at point (`x`, `ySurface`, `z`). `ySurface` doubles as position y input
@ -4191,10 +4191,10 @@ f32 zdWaterBoxMaxZ = -967.0f;
s32 WaterBox_GetSurface1(PlayState* play, CollisionContext* colCtx, f32 x, f32 z, f32* ySurface,
WaterBox** outWaterBox) {
if (play->sceneNum == SCENE_SPOT07) {
if (zdWaterBoxMinX < x && x < zdWaterBoxMaxX && zdWaterBoxMinY < *ySurface && *ySurface < zdWaterBoxMaxY &&
zdWaterBoxMinZ < z && z < zdWaterBoxMaxZ) {
*outWaterBox = &zdWaterBox;
*ySurface = zdWaterBox.ySurface;
if (sZorasDomainWaterBoxMinX < x && x < sZorasDomainWaterBoxMaxX && sZorasDomainWaterBoxMinY < *ySurface &&
*ySurface < sZorasDomainWaterBoxMaxY && sZorasDomainWaterBoxMinZ < z && z < sZorasDomainWaterBoxMaxZ) {
*outWaterBox = &sZorasDomainWaterBox;
*ySurface = sZorasDomainWaterBox.ySurface;
return true;
}
}