mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-21 14:31:17 +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:
parent
251d90301c
commit
67f294774b
121 changed files with 711 additions and 652 deletions
|
@ -77,24 +77,24 @@ void EnLightbox_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
this->dyna.unk_162++;
|
||||
} else {
|
||||
if (thisx->speedXZ) {
|
||||
if (thisx->bgCheckFlags & 8) {
|
||||
if (thisx->bgCheckFlags & BGCHECKFLAG_WALL) {
|
||||
thisx->world.rot.y = (thisx->world.rot.y + thisx->wallYaw) - thisx->world.rot.y;
|
||||
Audio_PlaySoundGeneral(NA_SE_EV_BOMB_BOUND, &thisx->projectedPos, 4, &D_801333E0, &D_801333E0,
|
||||
&D_801333E8);
|
||||
thisx->speedXZ *= 0.7f;
|
||||
thisx->bgCheckFlags &= ~0x8;
|
||||
thisx->bgCheckFlags &= ~BGCHECKFLAG_WALL;
|
||||
}
|
||||
}
|
||||
|
||||
if ((thisx->bgCheckFlags & 1) == 0) {
|
||||
if (!(thisx->bgCheckFlags & BGCHECKFLAG_GROUND)) {
|
||||
Math_StepToF(&thisx->speedXZ, 0, IREG(57) / 100.0f);
|
||||
} else {
|
||||
Math_StepToF(&thisx->speedXZ, 0, IREG(58) / 100.0f);
|
||||
if ((thisx->bgCheckFlags & 2) && (thisx->velocity.y < IREG(59) / 100.0f)) {
|
||||
if ((thisx->bgCheckFlags & BGCHECKFLAG_GROUND_TOUCH) && (thisx->velocity.y < IREG(59) / 100.0f)) {
|
||||
Audio_PlaySoundGeneral(NA_SE_EV_BOMB_BOUND, &thisx->projectedPos, 4, &D_801333E0, &D_801333E0,
|
||||
&D_801333E8);
|
||||
thisx->velocity.y *= IREG(60) / 100.0f;
|
||||
thisx->bgCheckFlags &= ~0x1;
|
||||
thisx->bgCheckFlags &= ~BGCHECKFLAG_GROUND;
|
||||
} else {
|
||||
func_8002F580(thisx, globalCtx);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue