1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-12 10:54:44 +00:00

Defines for Actor#bgCheckFlags (#1126)

* First pass, tool assisted bgCheckFlags

* Few manual bgCheckFlags

* Run formatter

* Remove fake bgCheckFlags 10-15

* Move existing documentation to the defines

* Comment on `bgCheckFlags` and rephrase some doc

* Name obvious flags, and some cleanup

* Comment on flag 9 being wall-interaction-related (thanks engineer and fig)

* Run formatter

* `BGCHECKFLAG_7` -> `BGCHECKFLAG_GROUND_STRICT`

* Touch up water-related bgcheckflags doc

* `BGCHECKFLAG_9` -> `BGCHECKFLAG_PLAYER_WALL_INTERACT`
This commit is contained in:
Dragorn421 2022-02-19 03:16:19 +01:00 committed by GitHub
parent 251d90301c
commit 67f294774b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
121 changed files with 711 additions and 652 deletions

View file

@ -436,7 +436,7 @@ void func_8008EDF0(Player* this) {
}
void func_8008EE08(Player* this) {
if ((this->actor.bgCheckFlags & 1) ||
if ((this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) ||
(this->stateFlags1 & (PLAYER_STATE1_21 | PLAYER_STATE1_23 | PLAYER_STATE1_27)) ||
(!(this->stateFlags1 & (PLAYER_STATE1_18 | PLAYER_STATE1_19)) &&
((this->actor.world.pos.y - this->actor.floorHeight) < 100.0f))) {
@ -619,7 +619,7 @@ s32 func_8008F2F8(GlobalContext* globalCtx) {
var = 0;
} else if ((this->unk_840 > 80) &&
((this->currentBoots == PLAYER_BOOTS_IRON) || (this->unk_840 >= 300))) { // Deep underwater
var = ((this->currentBoots == PLAYER_BOOTS_IRON) && (this->actor.bgCheckFlags & 1)) ? 1 : 3;
var = ((this->currentBoots == PLAYER_BOOTS_IRON) && (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND)) ? 1 : 3;
} else if (this->stateFlags1 & PLAYER_STATE1_27) { // Swimming
var = 2;
} else {