mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-12 09:50:50 +00:00
Document ACTOR_FLAG_CAN_PRESS_SWITCHES
(#2275)
* document switch activation * format * activate -> press * fix comment
This commit is contained in:
parent
f4210323a2
commit
3677c11140
11 changed files with 23 additions and 22 deletions
|
@ -251,7 +251,7 @@ void func_8086D5C4(BgBdanSwitch* this) {
|
|||
void func_8086D5E0(BgBdanSwitch* this, PlayState* play) {
|
||||
switch (PARAMS_GET_U(this->dyna.actor.params, 0, 8)) {
|
||||
case BLUE:
|
||||
if (func_800435B4(&this->dyna)) {
|
||||
if (DynaPolyActor_IsSwitchPressed(&this->dyna)) {
|
||||
func_8086D67C(this);
|
||||
func_8086D4B4(this, play);
|
||||
}
|
||||
|
@ -290,7 +290,7 @@ void func_8086D730(BgBdanSwitch* this) {
|
|||
void func_8086D754(BgBdanSwitch* this, PlayState* play) {
|
||||
switch (PARAMS_GET_U(this->dyna.actor.params, 0, 8)) {
|
||||
case BLUE:
|
||||
if (!func_800435B4(&this->dyna)) {
|
||||
if (!DynaPolyActor_IsSwitchPressed(&this->dyna)) {
|
||||
if (this->unk_1D8 <= 0) {
|
||||
func_8086D7FC(this);
|
||||
func_8086D548(this, play);
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include "assets/objects/object_am/object_am.h"
|
||||
#include "overlays/actors/ovl_En_Bom/z_en_bom.h"
|
||||
|
||||
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_4 | ACTOR_FLAG_26)
|
||||
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE | ACTOR_FLAG_4 | ACTOR_FLAG_CAN_PRESS_SWITCHES)
|
||||
|
||||
void EnAm_Init(Actor* thisx, PlayState* play);
|
||||
void EnAm_Destroy(Actor* thisx, PlayState* play);
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#include "versions.h"
|
||||
#include "overlays/actors/ovl_Demo_Effect/z_demo_effect.h"
|
||||
|
||||
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_4 | ACTOR_FLAG_26)
|
||||
#define FLAGS (ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_4 | ACTOR_FLAG_CAN_PRESS_SWITCHES)
|
||||
|
||||
void EnRu1_Init(Actor* thisx, PlayState* play);
|
||||
void EnRu1_Destroy(Actor* thisx, PlayState* play);
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include "assets/objects/gameplay_dangeon_keep/gameplay_dangeon_keep.h"
|
||||
#include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h"
|
||||
|
||||
#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_26)
|
||||
#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_CAN_PRESS_SWITCHES)
|
||||
|
||||
void ObjKibako_Init(Actor* thisx, PlayState* play);
|
||||
void ObjKibako_Destroy(Actor* thisx, PlayState* play2);
|
||||
|
|
|
@ -491,7 +491,7 @@ void ObjOshihiki_OnActor(ObjOshihiki* this, PlayState* play) {
|
|||
dynaPolyActor = DynaPoly_GetActor(&play->colCtx, bgId);
|
||||
if (dynaPolyActor != NULL) {
|
||||
DynaPolyActor_SetActorOnTop(dynaPolyActor);
|
||||
func_80043538(dynaPolyActor);
|
||||
DynaPolyActor_SetSwitchPressed(dynaPolyActor);
|
||||
|
||||
if ((this->timer <= 0) && (fabsf(this->dyna.unk_150) > 0.001f)) {
|
||||
if (ObjOshihiki_StrongEnough(this) && ObjOshihiki_NoSwitchPress(this, dynaPolyActor, play) &&
|
||||
|
@ -520,7 +520,7 @@ void ObjOshihiki_OnActor(ObjOshihiki* this, PlayState* play) {
|
|||
|
||||
if ((dynaPolyActor != NULL) && (dynaPolyActor->transformFlags & DYNA_TRANSFORM_POS)) {
|
||||
DynaPolyActor_SetActorOnTop(dynaPolyActor);
|
||||
func_80043538(dynaPolyActor);
|
||||
DynaPolyActor_SetSwitchPressed(dynaPolyActor);
|
||||
this->dyna.actor.world.pos.y = this->dyna.actor.floorHeight;
|
||||
} else {
|
||||
ObjOshihiki_SetupFall(this, play);
|
||||
|
|
|
@ -410,14 +410,14 @@ void ObjSwitch_FloorUp(ObjSwitch* this, PlayState* play) {
|
|||
break;
|
||||
|
||||
case OBJSWITCH_SUBTYPE_HOLD:
|
||||
if (func_800435B4(&this->dyna)) {
|
||||
if (DynaPolyActor_IsSwitchPressed(&this->dyna)) {
|
||||
ObjSwitch_FloorPressInit(this);
|
||||
ObjSwitch_SetOn(this, play);
|
||||
}
|
||||
break;
|
||||
|
||||
case OBJSWITCH_SUBTYPE_HOLD_INVERTED:
|
||||
if (func_800435B4(&this->dyna)) {
|
||||
if (DynaPolyActor_IsSwitchPressed(&this->dyna)) {
|
||||
ObjSwitch_FloorPressInit(this);
|
||||
ObjSwitch_SetOff(this, play);
|
||||
}
|
||||
|
@ -467,7 +467,7 @@ void ObjSwitch_FloorDown(ObjSwitch* this, PlayState* play) {
|
|||
|
||||
case OBJSWITCH_SUBTYPE_HOLD:
|
||||
case OBJSWITCH_SUBTYPE_HOLD_INVERTED:
|
||||
if (!func_800435B4(&this->dyna) && !Player_InCsMode(play)) {
|
||||
if (!DynaPolyActor_IsSwitchPressed(&this->dyna) && !Player_InCsMode(play)) {
|
||||
if (this->releaseTimer <= 0) {
|
||||
ObjSwitch_FloorReleaseInit(this);
|
||||
if (OBJSWITCH_SUBTYPE(&this->dyna.actor) == OBJSWITCH_SUBTYPE_HOLD) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue