1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-22 06:52:03 +00:00

Doc, macros, enums for SurfaceType.data (#1293)

* `SURFACETYPE`0/1 getter macros

* Cleanup/assess/revert existing names

* `SURFACETYPE0_30` -> "soft"

* `SURFACETYPE0_`13/26 -> floortype/floorproperty

* Introduce `SURFACETYPE_FLOORTYPE_` enum

* Introduce `SURFACETYPE_FLOORPROPERTY_` enum

* `SURFACETYPE0_21` -> "wall type", and maps to "wall flags"

* Introduce `SURFACETYPE_WALLTYPE_` enum

* Introduce `SURFACETYPE_WALLFLAG_` defines

* `SURFACETYPE1_0` -> "sfx type"

* `SurfaceType_GetSfx` -> `GetSfxId` and cleanup

* Introduce `SURFACETYPE_SFXTYPE_` enum

* Note oddity on `Player.unk_89E` (more docs needed)

* `SURFACETYPE1_4` -> "floor effect" (not 100% set on the name, just something different from type and property)

* Introduce `SURFACETYPE_FLOOREFFECT_` enum

* Introduce `SURFACETYPE_CONVEYORSPEED_` enum

* Add `SURFACETYPE_CONVEYORDIRECTION_TO_BINANG` macro

* `wallDamage` -> `hasFlag27`

* Be more underscore-happy

* Revert "`SURFACETYPE`0/1 getter macros"

This reverts commit e61cccf2e6.

* remove mention to removed define

* Remove surfacetype_ prefix, `SFX_TYPE_` -> `SURFACE_SFX_TYPE_`, `FLOOREFFECT_` -> `FLOOR_EFFECT_`

* Formatting

* 0-pad litteral to 8 nibbles
This commit is contained in:
Dragorn421 2022-07-31 20:57:18 +02:00 committed by GitHub
parent 6889c275cb
commit 706d5596bf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 302 additions and 247 deletions

View file

@ -693,9 +693,9 @@ void EnBb_Down(EnBb* this, PlayState* play) {
}
if (this->actor.bgCheckFlags & (BGCHECKFLAG_GROUND | BGCHECKFLAG_GROUND_TOUCH)) {
if (this->actor.params == ENBB_RED) {
s32 floorType = func_80041D4C(&play->colCtx, this->actor.floorPoly, this->actor.floorBgId);
s32 floorType = SurfaceType_GetFloorType(&play->colCtx, this->actor.floorPoly, this->actor.floorBgId);
if ((floorType == 2) || (floorType == 3) || (floorType == 9)) {
if ((floorType == FLOOR_TYPE_2) || (floorType == FLOOR_TYPE_3) || (floorType == FLOOR_TYPE_9)) {
this->moveMode = BBMOVE_HIDDEN;
this->timer = 10;
this->actionState++;
@ -812,8 +812,8 @@ void EnBb_Red(EnBb* this, PlayState* play) {
this->actor.bgCheckFlags &= ~BGCHECKFLAG_WALL;
}
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
floorType = func_80041D4C(&play->colCtx, this->actor.floorPoly, this->actor.floorBgId);
if ((floorType == 2) || (floorType == 3) || (floorType == 9)) {
floorType = SurfaceType_GetFloorType(&play->colCtx, this->actor.floorPoly, this->actor.floorBgId);
if ((floorType == FLOOR_TYPE_2) || (floorType == FLOOR_TYPE_3) || (floorType == FLOOR_TYPE_9)) {
this->moveMode = BBMOVE_HIDDEN;
this->timer = 10;
this->actionState++;