1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-05 07:24:34 +00:00

Doc pass on bgcheck-waterbox properties (#1288)

* Doc pass on bgcheck-waterbox properties

* `WATERBOX_ROOM_INDEX...` -> `WATERBOX_ROOM...`

* Fix `WATERBOX_PROPERTIES` macro (was completely wrong)

* `((setFlag19) & 1) << WATERBOX_FLAG_19_SHIFT` instead of ternary

* Fix `WATERBOX_PROPERTIES` macro (hopefully for good)
This commit is contained in:
Dragorn421 2022-08-29 19:52:42 +02:00 committed by GitHub
parent 0d52a4aebd
commit 7cfee3d8a9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 48 additions and 29 deletions

View file

@ -540,11 +540,11 @@ s32 Camera_GetWaterBoxBgCamIndex(Camera* camera, f32* waterY) {
}
/**
* Checks if `chkPos` is inside a waterbox. If there is no water box below `chkPos`
* or if `chkPos` is above the water surface, return BGCHECK_Y_MIN, output
* environment properites to `envProp` if `chkPos` is inside the waterbox.
* Checks if `chkPos` is inside a waterbox.
* If there is no water box below `chkPos` or if `chkPos` is above the water surface, return BGCHECK_Y_MIN.
* If `chkPos` is inside the waterbox, output light index to `lightIndex`.
*/
f32 Camera_GetWaterSurface(Camera* camera, Vec3f* chkPos, s32* envProp) {
f32 Camera_GetWaterSurface(Camera* camera, Vec3f* chkPos, s32* lightIndex) {
PosRot playerPosRot;
f32 waterY;
WaterBox* waterBox;
@ -563,7 +563,7 @@ f32 Camera_GetWaterSurface(Camera* camera, Vec3f* chkPos, s32* envProp) {
return BGCHECK_Y_MIN;
}
*envProp = WaterBox_GetLightSettingIndex(&camera->play->colCtx, waterBox);
*lightIndex = WaterBox_GetLightIndex(&camera->play->colCtx, waterBox);
return waterY;
}