mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-02 22:14:33 +00:00
Documentation pass on scene/room commands (#1226)
* Rename handler functions
* Rename cmd_id enum names for consistency
* `char` -> `s8` for explicit padding in cmd structs
* `Room.unk03/03` -> `behaviorType2/1`
* `UNK_PTR` -> `void*`
* `showInvisActors` -> `lensActorsMode` + enum
* Add `ROOM_BEHAVIOR_TYPE1/2_` enums
* "mesh" -> "mesh header"
* `Polygon polygon` -> `PolygonBase base` (for now...)
* Misc cleanup
* "lens actors mode" -> "lens actor mode"
* Revert "`char` -> `s8` for explicit padding in cmd structs"
This reverts commit 59b9295828
.
* `LENS_ACTOR_MODE_` -> `LENS_MODE_HIDE/SHOW_ACTORS`
This commit is contained in:
parent
4f0018bf36
commit
154f44b6da
14 changed files with 144 additions and 124 deletions
|
@ -92,7 +92,7 @@ void func_8087DB24(BgHakaMegane* this, GlobalContext* globalCtx) {
|
|||
this->dyna.actor.objBankIndex = this->objBankIndex;
|
||||
this->dyna.actor.draw = BgHakaMegane_Draw;
|
||||
Actor_SetObjectDependency(globalCtx, &this->dyna.actor);
|
||||
if (globalCtx->roomCtx.curRoom.showInvisActors) {
|
||||
if (globalCtx->roomCtx.curRoom.lensMode != LENS_MODE_HIDE_ACTORS) {
|
||||
this->actionFunc = func_8087DBF0;
|
||||
collision = sCollisionHeaders[this->dyna.actor.params];
|
||||
if (collision != NULL) {
|
||||
|
|
|
@ -138,7 +138,7 @@ void MagicDark_DimLighting(GlobalContext* globalCtx, f32 intensity) {
|
|||
f32 colorScale;
|
||||
f32 fogScale;
|
||||
|
||||
if (globalCtx->roomCtx.curRoom.unk_03 != 5) {
|
||||
if (globalCtx->roomCtx.curRoom.behaviorType1 != ROOM_BEHAVIOR_TYPE1_5) {
|
||||
intensity = CLAMP_MIN(intensity, 0.0f);
|
||||
intensity = CLAMP_MAX(intensity, 1.0f);
|
||||
fogScale = intensity - 0.2f;
|
||||
|
|
|
@ -5228,8 +5228,8 @@ void func_8083BCD0(Player* this, GlobalContext* globalCtx, s32 arg2) {
|
|||
s32 func_8083BDBC(Player* this, GlobalContext* globalCtx) {
|
||||
s32 sp2C;
|
||||
|
||||
if (CHECK_BTN_ALL(sControlInput->press.button, BTN_A) && (globalCtx->roomCtx.curRoom.unk_03 != 2) &&
|
||||
(D_808535E4 != 7) &&
|
||||
if (CHECK_BTN_ALL(sControlInput->press.button, BTN_A) &&
|
||||
(globalCtx->roomCtx.curRoom.behaviorType1 != ROOM_BEHAVIOR_TYPE1_2) && (D_808535E4 != 7) &&
|
||||
(SurfaceType_GetSlope(&globalCtx->colCtx, this->actor.floorPoly, this->actor.floorBgId) != 1)) {
|
||||
sp2C = this->unk_84B[this->unk_846];
|
||||
|
||||
|
@ -5417,8 +5417,8 @@ s32 func_8083C544(Player* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
s32 func_8083C61C(GlobalContext* globalCtx, Player* this) {
|
||||
if ((globalCtx->roomCtx.curRoom.unk_03 != 2) && (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) &&
|
||||
(AMMO(ITEM_NUT) != 0)) {
|
||||
if ((globalCtx->roomCtx.curRoom.behaviorType1 != ROOM_BEHAVIOR_TYPE1_2) &&
|
||||
(this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) && (AMMO(ITEM_NUT) != 0)) {
|
||||
func_80835C58(globalCtx, this, func_8084E604, 0);
|
||||
func_80832264(globalCtx, this, &gPlayerAnim_003048);
|
||||
this->unk_6AD = 0;
|
||||
|
@ -6943,7 +6943,7 @@ void func_808409CC(GlobalContext* globalCtx, Player* this) {
|
|||
if (this->stateFlags1 & PLAYER_STATE1_11) {
|
||||
anim = func_80833338(this);
|
||||
} else {
|
||||
sp38 = globalCtx->roomCtx.curRoom.unk_02;
|
||||
sp38 = globalCtx->roomCtx.curRoom.behaviorType2;
|
||||
if (heathIsCritical) {
|
||||
if (this->unk_6AC >= 0) {
|
||||
sp38 = 7;
|
||||
|
@ -8102,7 +8102,7 @@ static struct_80832924 D_808545F0[] = {
|
|||
|
||||
void func_80843CEC(Player* this, GlobalContext* globalCtx) {
|
||||
if (this->currentTunic != PLAYER_TUNIC_GORON) {
|
||||
if ((globalCtx->roomCtx.curRoom.unk_02 == 3) || (D_808535E4 == 9) ||
|
||||
if ((globalCtx->roomCtx.curRoom.behaviorType2 == ROOM_BEHAVIOR_TYPE2_3) || (D_808535E4 == 9) ||
|
||||
((func_80838144(D_808535E4) >= 0) &&
|
||||
!SurfaceType_IsWallDamage(&globalCtx->colCtx, this->actor.floorPoly, this->actor.floorBgId))) {
|
||||
func_8083821C(this);
|
||||
|
@ -9553,11 +9553,12 @@ void func_808473D4(GlobalContext* globalCtx, Player* this) {
|
|||
!Player_IsChildWithHylianShield(this))) {
|
||||
if ((!(this->stateFlags1 & PLAYER_STATE1_14) && (sp20 <= 0) &&
|
||||
(func_8008E9C4(this) ||
|
||||
((D_808535E4 != 7) &&
|
||||
(func_80833B2C(this) || ((globalCtx->roomCtx.curRoom.unk_03 != 2) &&
|
||||
!(this->stateFlags1 & PLAYER_STATE1_22) && (sp20 == 0))))))) {
|
||||
((D_808535E4 != 7) && (func_80833B2C(this) ||
|
||||
((globalCtx->roomCtx.curRoom.behaviorType1 != ROOM_BEHAVIOR_TYPE1_2) &&
|
||||
!(this->stateFlags1 & PLAYER_STATE1_22) && (sp20 == 0))))))) {
|
||||
doAction = DO_ACTION_ATTACK;
|
||||
} else if ((globalCtx->roomCtx.curRoom.unk_03 != 2) && func_80833BCC(this) && (sp20 > 0)) {
|
||||
} else if ((globalCtx->roomCtx.curRoom.behaviorType1 != ROOM_BEHAVIOR_TYPE1_2) &&
|
||||
func_80833BCC(this) && (sp20 > 0)) {
|
||||
doAction = DO_ACTION_JUMP;
|
||||
} else if ((this->heldItemActionParam >= PLAYER_AP_SWORD_MASTER) ||
|
||||
((this->stateFlags2 & PLAYER_STATE2_20) &&
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue