From a9284494f2b6f53a0e8f95b5567faf1b2162e91c Mon Sep 17 00:00:00 2001 From: Dragorn421 Date: Mon, 6 Dec 2021 01:11:38 +0100 Subject: [PATCH] Use defines for actor flags (#873) * Add ACTOR_FLAG_ defines * Add ACTOR_FLAGS_ALL macro and use ACTOR_FLAG_* constants everywhere * Remove unused ACTOR_FLAG_* constants * actor flags in bigokuta & ko * actor flags in obj_mure * actor flags in stalfos, twinrova & ganon2 * actor flags in morpha & barinade * name some previously missed actor flags * found some comments using hex for actor flags * Actor flags in ovl_En_Ganon_Mant * Actor flags in EnWf * Flags in en_zf * Actor flags in BossGanon (FeelsOKMan) * Remove `ACTOR_FLAG_NONE` * Wrap expansion of `FLAGS` in parentheses * `ACTOR_FLAGS_ALL` -> `CHECK_FLAG_ALL` * Move `CHECK_FLAG_ALL` to `macros.h` * Run formatter --- include/macros.h | 2 + include/z64actor.h | 29 ++++++++ src/code/code_800430A0.c | 2 +- src/code/db_camera.c | 35 +++++---- src/code/ucode_disas.c | 53 +++++++------- src/code/z_actor.c | 73 ++++++++++--------- src/code/z_camera.c | 10 ++- src/code/z_debug.c | 22 +++--- src/code/z_en_a_keep.c | 6 +- src/code/z_en_item00.c | 8 +- src/code/z_player_call.c | 2 +- src/code/z_player_lib.c | 2 +- .../actors/ovl_Arms_Hook/z_arms_hook.c | 16 ++-- .../actors/ovl_Arrow_Fire/z_arrow_fire.c | 2 +- .../actors/ovl_Arrow_Ice/z_arrow_ice.c | 2 +- .../actors/ovl_Arrow_Light/z_arrow_light.c | 2 +- .../ovl_Bg_Bdan_Objects/z_bg_bdan_objects.c | 4 +- .../ovl_Bg_Bdan_Switch/z_bg_bdan_switch.c | 4 +- .../actors/ovl_Bg_Bom_Guard/z_bg_bom_guard.c | 2 +- .../actors/ovl_Bg_Bombwall/z_bg_bombwall.c | 2 +- .../actors/ovl_Bg_Bowl_Wall/z_bg_bowl_wall.c | 2 +- .../actors/ovl_Bg_Breakwall/z_bg_breakwall.c | 4 +- .../actors/ovl_Bg_Ddan_Jd/z_bg_ddan_jd.c | 2 +- .../actors/ovl_Bg_Ddan_Kd/z_bg_ddan_kd.c | 2 +- .../actors/ovl_Bg_Dodoago/z_bg_dodoago.c | 2 +- .../ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.c | 2 +- .../ovl_Bg_Ganon_Otyuka/z_bg_ganon_otyuka.c | 2 +- .../ovl_Bg_Gate_Shutter/z_bg_gate_shutter.c | 2 +- .../ovl_Bg_Gjyo_Bridge/z_bg_gjyo_bridge.c | 2 +- .../ovl_Bg_Gnd_Darkmeiro/z_bg_gnd_darkmeiro.c | 4 +- .../ovl_Bg_Gnd_Firemeiro/z_bg_gnd_firemeiro.c | 2 +- .../ovl_Bg_Gnd_Iceblock/z_bg_gnd_iceblock.c | 2 +- .../ovl_Bg_Gnd_Nisekabe/z_bg_gnd_nisekabe.c | 8 +- .../ovl_Bg_Gnd_Soulmeiro/z_bg_gnd_soulmeiro.c | 2 +- src/overlays/actors/ovl_Bg_Haka/z_bg_haka.c | 2 +- .../actors/ovl_Bg_Haka_Gate/z_bg_haka_gate.c | 14 ++-- .../actors/ovl_Bg_Haka_Huta/z_bg_haka_huta.c | 2 +- .../ovl_Bg_Haka_Megane/z_bg_haka_megane.c | 8 +- .../ovl_Bg_Haka_MeganeBG/z_bg_haka_meganebg.c | 8 +- .../ovl_Bg_Haka_Sgami/z_bg_haka_sgami.c | 8 +- .../actors/ovl_Bg_Haka_Ship/z_bg_haka_ship.c | 2 +- .../actors/ovl_Bg_Haka_Trap/z_bg_haka_trap.c | 4 +- .../actors/ovl_Bg_Haka_Tubo/z_bg_haka_tubo.c | 2 +- .../ovl_Bg_Haka_Water/z_bg_haka_water.c | 2 +- .../actors/ovl_Bg_Haka_Zou/z_bg_haka_zou.c | 2 +- .../ovl_Bg_Heavy_Block/z_bg_heavy_block.c | 10 +-- .../ovl_Bg_Hidan_Curtain/z_bg_hidan_curtain.c | 2 +- .../ovl_Bg_Hidan_Dalm/z_bg_hidan_dalm.c | 4 +- .../z_bg_hidan_firewall.c | 2 +- .../ovl_Bg_Hidan_Fslift/z_bg_hidan_fslift.c | 2 +- .../ovl_Bg_Hidan_Fwbig/z_bg_hidan_fwbig.c | 4 +- .../ovl_Bg_Hidan_Hamstep/z_bg_hidan_hamstep.c | 2 +- .../ovl_Bg_Hidan_Hrock/z_bg_hidan_hrock.c | 8 +- .../ovl_Bg_Hidan_Kousi/z_bg_hidan_kousi.c | 2 +- .../z_bg_hidan_kowarerukabe.c | 2 +- .../ovl_Bg_Hidan_Rock/z_bg_hidan_rock.c | 8 +- .../z_bg_hidan_rsekizou.c | 2 +- .../ovl_Bg_Hidan_Sekizou/z_bg_hidan_sekizou.c | 2 +- .../ovl_Bg_Hidan_Sima/z_bg_hidan_sima.c | 2 +- .../ovl_Bg_Hidan_Syoku/z_bg_hidan_syoku.c | 2 +- .../ovl_Bg_Ice_Objects/z_bg_ice_objects.c | 8 +- .../ovl_Bg_Ice_Shelter/z_bg_ice_shelter.c | 2 +- .../ovl_Bg_Ice_Shutter/z_bg_ice_shutter.c | 2 +- .../ovl_Bg_Ice_Turara/z_bg_ice_turara.c | 2 +- .../actors/ovl_Bg_Ingate/z_bg_ingate.c | 2 +- .../ovl_Bg_Jya_1flift/z_bg_jya_1flift.c | 2 +- .../z_bg_jya_amishutter.c | 2 +- .../ovl_Bg_Jya_Bigmirror/z_bg_jya_bigmirror.c | 2 +- .../actors/ovl_Bg_Jya_Block/z_bg_jya_block.c | 2 +- .../z_bg_jya_bombchuiwa.c | 4 +- .../ovl_Bg_Jya_Bombiwa/z_bg_jya_bombiwa.c | 2 +- .../actors/ovl_Bg_Jya_Cobra/z_bg_jya_cobra.c | 2 +- .../ovl_Bg_Jya_Goroiwa/z_bg_jya_goroiwa.c | 2 +- .../ovl_Bg_Jya_Haheniron/z_bg_jya_haheniron.c | 2 +- .../ovl_Bg_Jya_Ironobj/z_bg_jya_ironobj.c | 2 +- .../ovl_Bg_Jya_Kanaami/z_bg_jya_kanaami.c | 2 +- .../actors/ovl_Bg_Jya_Lift/z_bg_jya_lift.c | 2 +- .../ovl_Bg_Jya_Megami/z_bg_jya_megami.c | 2 +- .../z_bg_jya_zurerukabe.c | 2 +- .../ovl_Bg_Menkuri_Eye/z_bg_menkuri_eye.c | 2 +- .../z_bg_menkuri_kaiten.c | 2 +- .../z_bg_menkuri_nisekabe.c | 8 +- .../ovl_Bg_Mizu_Bwall/z_bg_mizu_bwall.c | 2 +- .../ovl_Bg_Mizu_Movebg/z_bg_mizu_movebg.c | 4 +- .../ovl_Bg_Mizu_Shutter/z_bg_mizu_shutter.c | 2 +- .../actors/ovl_Bg_Mizu_Uzu/z_bg_mizu_uzu.c | 2 +- .../ovl_Bg_Mizu_Water/z_bg_mizu_water.c | 2 +- src/overlays/actors/ovl_Bg_Mjin/z_bg_mjin.c | 4 +- .../ovl_Bg_Mori_Bigst/z_bg_mori_bigst.c | 2 +- .../ovl_Bg_Mori_Elevator/z_bg_mori_elevator.c | 2 +- .../ovl_Bg_Mori_Hashigo/z_bg_mori_hashigo.c | 4 +- .../ovl_Bg_Mori_Hashira4/z_bg_mori_hashira4.c | 2 +- .../ovl_Bg_Mori_Hineri/z_bg_mori_hineri.c | 2 +- .../ovl_Bg_Mori_Idomizu/z_bg_mori_idomizu.c | 2 +- .../z_bg_mori_kaitenkabe.c | 2 +- .../z_bg_mori_rakkatenjo.c | 2 +- .../actors/ovl_Bg_Po_Event/z_bg_po_event.c | 6 +- .../ovl_Bg_Po_Syokudai/z_bg_po_syokudai.c | 2 +- .../actors/ovl_Bg_Pushbox/z_bg_pushbox.c | 2 +- .../ovl_Bg_Relay_Objects/z_bg_relay_objects.c | 6 +- .../ovl_Bg_Spot00_Break/z_bg_spot00_break.c | 2 +- .../z_bg_spot00_hanebasi.c | 2 +- .../ovl_Bg_Spot01_Fusya/z_bg_spot01_fusya.c | 3 +- .../z_bg_spot01_idohashira.c | 2 +- .../z_bg_spot01_idomizu.c | 2 +- .../z_bg_spot01_idosoko.c | 2 +- .../z_bg_spot01_objects2.c | 2 +- .../z_bg_spot02_objects.c | 4 +- .../ovl_Bg_Spot03_Taki/z_bg_spot03_taki.c | 2 +- .../ovl_Bg_Spot05_Soko/z_bg_spot05_soko.c | 4 +- .../z_bg_spot06_objects.c | 10 +-- .../ovl_Bg_Spot07_Taki/z_bg_spot07_taki.c | 2 +- .../z_bg_spot08_bakudankabe.c | 2 +- .../z_bg_spot08_iceblock.c | 2 +- .../ovl_Bg_Spot09_Obj/z_bg_spot09_obj.c | 2 +- .../z_bg_spot11_bakudankabe.c | 2 +- .../ovl_Bg_Spot11_Oasis/z_bg_spot11_oasis.c | 2 +- .../ovl_Bg_Spot12_Gate/z_bg_spot12_gate.c | 2 +- .../ovl_Bg_Spot12_Saku/z_bg_spot12_saku.c | 2 +- .../ovl_Bg_Spot15_Rrbox/z_bg_spot15_rrbox.c | 2 +- .../ovl_Bg_Spot15_Saku/z_bg_spot15_saku.c | 2 +- .../z_bg_spot16_bombstone.c | 2 +- .../z_bg_spot16_doughnut.c | 2 +- .../z_bg_spot17_bakudankabe.c | 2 +- .../ovl_Bg_Spot17_Funen/z_bg_spot17_funen.c | 2 +- .../ovl_Bg_Spot18_Basket/z_bg_spot18_basket.c | 2 +- .../ovl_Bg_Spot18_Futa/z_bg_spot18_futa.c | 2 +- .../ovl_Bg_Spot18_Obj/z_bg_spot18_obj.c | 2 +- .../z_bg_spot18_shutter.c | 2 +- .../actors/ovl_Bg_Sst_Floor/z_bg_sst_floor.c | 2 +- .../ovl_Bg_Toki_Hikari/z_bg_toki_hikari.c | 2 +- .../actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.c | 2 +- .../actors/ovl_Bg_Treemouth/z_bg_treemouth.c | 6 +- .../actors/ovl_Bg_Umajump/z_bg_umajump.c | 4 +- .../actors/ovl_Bg_Vb_Sima/z_bg_vb_sima.c | 2 +- .../actors/ovl_Bg_Ydan_Hasi/z_bg_ydan_hasi.c | 2 +- .../ovl_Bg_Ydan_Maruta/z_bg_ydan_maruta.c | 2 +- .../actors/ovl_Bg_Ydan_Sp/z_bg_ydan_sp.c | 4 +- src/overlays/actors/ovl_Bg_Zg/z_bg_zg.c | 2 +- .../actors/ovl_Boss_Dodongo/z_boss_dodongo.c | 10 +-- src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c | 8 +- src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c | 12 +-- .../actors/ovl_Boss_Ganon/z_boss_ganon.c | 14 ++-- .../actors/ovl_Boss_Ganon2/z_boss_ganon2.c | 8 +- .../ovl_Boss_Ganondrof/z_boss_ganondrof.c | 16 ++-- .../actors/ovl_Boss_Goma/z_boss_goma.c | 10 +-- src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c | 34 ++++----- src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c | 38 +++++----- src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c | 24 +++--- src/overlays/actors/ovl_Boss_Va/z_boss_va.c | 50 ++++++------- src/overlays/actors/ovl_Demo_6K/z_demo_6k.c | 4 +- src/overlays/actors/ovl_Demo_Du/z_demo_du.c | 2 +- src/overlays/actors/ovl_Demo_Ec/z_demo_ec.c | 2 +- .../actors/ovl_Demo_Effect/z_demo_effect.c | 4 +- src/overlays/actors/ovl_Demo_Ext/z_demo_ext.c | 2 +- .../actors/ovl_Demo_Geff/z_demo_geff.c | 2 +- src/overlays/actors/ovl_Demo_Gj/z_demo_gj.c | 2 +- src/overlays/actors/ovl_Demo_Go/z_demo_go.c | 2 +- src/overlays/actors/ovl_Demo_Gt/z_demo_gt.c | 2 +- src/overlays/actors/ovl_Demo_Ik/z_demo_ik.c | 2 +- src/overlays/actors/ovl_Demo_Im/z_demo_im.c | 12 +-- .../actors/ovl_Demo_Kankyo/z_demo_kankyo.c | 4 +- .../actors/ovl_Demo_Kekkai/z_demo_kekkai.c | 2 +- src/overlays/actors/ovl_Demo_Sa/z_demo_sa.c | 2 +- src/overlays/actors/ovl_Demo_Shd/z_demo_shd.c | 2 +- .../actors/ovl_Demo_Tre_Lgt/z_demo_tre_lgt.c | 2 +- src/overlays/actors/ovl_Door_Ana/z_door_ana.c | 6 +- .../actors/ovl_Door_Gerudo/z_door_gerudo.c | 2 +- .../actors/ovl_Door_Killer/z_door_killer.c | 2 +- .../actors/ovl_Door_Shutter/z_door_shutter.c | 2 +- .../actors/ovl_Door_Toki/z_door_toki.c | 2 +- .../actors/ovl_Door_Warp1/z_door_warp1.c | 2 +- .../actors/ovl_Efc_Erupc/z_efc_erupc.c | 2 +- src/overlays/actors/ovl_Eff_Dust/z_eff_dust.c | 2 +- src/overlays/actors/ovl_Elf_Msg/z_elf_msg.c | 2 +- src/overlays/actors/ovl_Elf_Msg2/z_elf_msg2.c | 6 +- src/overlays/actors/ovl_En_Am/z_en_am.c | 8 +- src/overlays/actors/ovl_En_Ani/z_en_ani.c | 2 +- .../actors/ovl_En_Anubice/z_en_anubice.c | 10 +-- .../ovl_En_Anubice_Fire/z_en_anubice_fire.c | 2 +- .../ovl_En_Anubice_Tag/z_en_anubice_tag.c | 2 +- .../actors/ovl_En_Arow_Trap/z_en_arow_trap.c | 2 +- src/overlays/actors/ovl_En_Arrow/z_en_arrow.c | 12 +-- .../ovl_En_Attack_Niw/z_en_attack_niw.c | 4 +- src/overlays/actors/ovl_En_Ba/z_en_ba.c | 6 +- src/overlays/actors/ovl_En_Bb/z_en_bb.c | 22 +++--- .../actors/ovl_En_Bdfire/z_en_bdfire.c | 2 +- .../actors/ovl_En_Bigokuta/z_en_bigokuta.c | 8 +- src/overlays/actors/ovl_En_Bili/z_en_bili.c | 18 ++--- src/overlays/actors/ovl_En_Bird/z_en_bird.c | 2 +- .../actors/ovl_En_Blkobj/z_en_blkobj.c | 4 +- src/overlays/actors/ovl_En_Bom/z_en_bom.c | 6 +- .../ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c | 2 +- .../ovl_En_Bom_Bowl_Pit/z_en_bom_bowl_pit.c | 2 +- .../actors/ovl_En_Bom_Chu/z_en_bom_chu.c | 4 +- src/overlays/actors/ovl_En_Bombf/z_en_bombf.c | 18 ++--- src/overlays/actors/ovl_En_Boom/z_en_boom.c | 6 +- src/overlays/actors/ovl_En_Box/z_en_box.c | 23 +++--- src/overlays/actors/ovl_En_Brob/z_en_brob.c | 4 +- .../actors/ovl_En_Bubble/z_en_bubble.c | 6 +- src/overlays/actors/ovl_En_Butte/z_en_butte.c | 4 +- src/overlays/actors/ovl_En_Bw/z_en_bw.c | 8 +- src/overlays/actors/ovl_En_Bx/z_en_bx.c | 2 +- .../actors/ovl_En_Changer/z_en_changer.c | 4 +- .../actors/ovl_En_Clear_Tag/z_en_clear_tag.c | 6 +- src/overlays/actors/ovl_En_Cow/z_en_cow.c | 14 ++-- src/overlays/actors/ovl_En_Crow/z_en_crow.c | 14 ++-- src/overlays/actors/ovl_En_Cs/z_en_cs.c | 2 +- src/overlays/actors/ovl_En_Daiku/z_en_daiku.c | 6 +- .../z_en_daiku_kakariko.c | 2 +- .../actors/ovl_En_Dekubaba/z_en_dekubaba.c | 10 +-- .../actors/ovl_En_Dekunuts/z_en_dekunuts.c | 4 +- src/overlays/actors/ovl_En_Dh/z_en_dh.c | 14 ++-- src/overlays/actors/ovl_En_Dha/z_en_dha.c | 4 +- .../ovl_En_Diving_Game/z_en_diving_game.c | 2 +- src/overlays/actors/ovl_En_Dns/z_en_dns.c | 12 +-- .../actors/ovl_En_Dnt_Demo/z_en_dnt_demo.c | 4 +- .../actors/ovl_En_Dnt_Jiji/z_en_dnt_jiji.c | 8 +- .../actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.c | 4 +- .../actors/ovl_En_Dodojr/z_en_dodojr.c | 14 ++-- .../actors/ovl_En_Dodongo/z_en_dodongo.c | 8 +- src/overlays/actors/ovl_En_Dog/z_en_dog.c | 2 +- src/overlays/actors/ovl_En_Door/z_en_door.c | 6 +- src/overlays/actors/ovl_En_Ds/z_en_ds.c | 12 +-- src/overlays/actors/ovl_En_Du/z_en_du.c | 2 +- .../actors/ovl_En_Dy_Extra/z_en_dy_extra.c | 2 +- src/overlays/actors/ovl_En_Eg/z_en_eg.c | 2 +- src/overlays/actors/ovl_En_Eiyer/z_en_eiyer.c | 18 ++--- src/overlays/actors/ovl_En_Elf/z_en_elf.c | 8 +- .../actors/ovl_En_Encount1/z_en_encount1.c | 4 +- .../actors/ovl_En_Encount2/z_en_encount2.c | 2 +- .../actors/ovl_En_Ex_Item/z_en_ex_item.c | 4 +- .../actors/ovl_En_Ex_Ruppy/z_en_ex_ruppy.c | 10 +-- src/overlays/actors/ovl_En_Fd/z_en_fd.c | 18 ++--- .../actors/ovl_En_Fd_Fire/z_en_fd_fire.c | 4 +- .../actors/ovl_En_Fhg_Fire/z_en_fhg_fire.c | 2 +- .../actors/ovl_En_Fire_Rock/z_en_fire_rock.c | 2 +- .../actors/ovl_En_Firefly/z_en_firefly.c | 14 ++-- src/overlays/actors/ovl_En_Fish/z_en_fish.c | 8 +- .../actors/ovl_En_Floormas/z_en_floormas.c | 24 +++--- src/overlays/actors/ovl_En_Fr/z_en_fr.c | 8 +- src/overlays/actors/ovl_En_Fu/z_en_fu.c | 8 +- src/overlays/actors/ovl_En_Fw/z_en_fw.c | 4 +- src/overlays/actors/ovl_En_Fz/z_en_fz.c | 14 ++-- .../actors/ovl_En_G_Switch/z_en_g_switch.c | 2 +- .../ovl_En_Ganon_Mant/z_en_ganon_mant.c | 4 +- .../ovl_En_Ganon_Organ/z_en_ganon_organ.c | 4 +- src/overlays/actors/ovl_En_Gb/z_en_gb.c | 2 +- src/overlays/actors/ovl_En_Ge1/z_en_ge1.c | 10 +-- src/overlays/actors/ovl_En_Ge2/z_en_ge2.c | 10 +-- src/overlays/actors/ovl_En_Ge3/z_en_ge3.c | 8 +- src/overlays/actors/ovl_En_GeldB/z_en_geldb.c | 8 +- src/overlays/actors/ovl_En_GirlA/z_en_girla.c | 6 +- src/overlays/actors/ovl_En_Gm/z_en_gm.c | 4 +- src/overlays/actors/ovl_En_Go/z_en_go.c | 6 +- src/overlays/actors/ovl_En_Go2/z_en_go2.c | 31 ++++---- src/overlays/actors/ovl_En_Goma/z_en_goma.c | 10 +-- .../actors/ovl_En_Goroiwa/z_en_goroiwa.c | 2 +- src/overlays/actors/ovl_En_Gs/z_en_gs.c | 4 +- src/overlays/actors/ovl_En_Guest/z_en_guest.c | 4 +- src/overlays/actors/ovl_En_Hata/z_en_hata.c | 2 +- .../actors/ovl_En_Heishi1/z_en_heishi1.c | 2 +- .../actors/ovl_En_Heishi2/z_en_heishi2.c | 10 +-- .../actors/ovl_En_Heishi3/z_en_heishi3.c | 2 +- .../actors/ovl_En_Heishi4/z_en_heishi4.c | 2 +- .../actors/ovl_En_Hintnuts/z_en_hintnuts.c | 26 +++---- src/overlays/actors/ovl_En_Holl/z_en_holl.c | 2 +- .../actors/ovl_En_Honotrap/z_en_honotrap.c | 2 +- src/overlays/actors/ovl_En_Horse/z_en_horse.c | 6 +- .../z_en_horse_game_check.c | 2 +- .../ovl_En_Horse_Ganon/z_en_horse_ganon.c | 2 +- .../z_en_horse_link_child.c | 2 +- .../ovl_En_Horse_Normal/z_en_horse_normal.c | 6 +- .../ovl_En_Horse_Zelda/z_en_horse_zelda.c | 2 +- src/overlays/actors/ovl_En_Hs/z_en_hs.c | 2 +- src/overlays/actors/ovl_En_Hs2/z_en_hs2.c | 2 +- src/overlays/actors/ovl_En_Hy/z_en_hy.c | 4 +- .../actors/ovl_En_Ice_Hono/z_en_ice_hono.c | 4 +- src/overlays/actors/ovl_En_Ik/z_en_ik.c | 10 +-- src/overlays/actors/ovl_En_In/z_en_in.c | 12 +-- .../actors/ovl_En_Insect/z_en_insect.c | 4 +- src/overlays/actors/ovl_En_Ishi/z_en_ishi.c | 4 +- src/overlays/actors/ovl_En_It/z_en_it.c | 2 +- src/overlays/actors/ovl_En_Jj/z_en_jj.c | 2 +- src/overlays/actors/ovl_En_Js/z_en_js.c | 6 +- .../actors/ovl_En_Jsjutan/z_en_jsjutan.c | 4 +- .../actors/ovl_En_Kakasi/z_en_kakasi.c | 4 +- .../actors/ovl_En_Kakasi2/z_en_kakasi2.c | 8 +- .../actors/ovl_En_Kakasi3/z_en_kakasi3.c | 4 +- .../actors/ovl_En_Kanban/z_en_kanban.c | 14 ++-- .../actors/ovl_En_Karebaba/z_en_karebaba.c | 12 +-- src/overlays/actors/ovl_En_Ko/z_en_ko.c | 8 +- src/overlays/actors/ovl_En_Kusa/z_en_kusa.c | 18 ++--- src/overlays/actors/ovl_En_Kz/z_en_kz.c | 6 +- src/overlays/actors/ovl_En_Light/z_en_light.c | 2 +- .../actors/ovl_En_Lightbox/z_en_lightbox.c | 2 +- .../actors/ovl_En_M_Fire1/z_en_m_fire1.c | 2 +- .../actors/ovl_En_M_Thunder/z_en_m_thunder.c | 2 +- src/overlays/actors/ovl_En_Ma1/z_en_ma1.c | 6 +- src/overlays/actors/ovl_En_Ma2/z_en_ma2.c | 8 +- src/overlays/actors/ovl_En_Ma3/z_en_ma3.c | 8 +- src/overlays/actors/ovl_En_Mag/z_en_mag.c | 2 +- src/overlays/actors/ovl_En_Mb/z_en_mb.c | 14 ++-- src/overlays/actors/ovl_En_Md/z_en_md.c | 2 +- src/overlays/actors/ovl_En_Mk/z_en_mk.c | 4 +- src/overlays/actors/ovl_En_Mm/z_en_mm.c | 2 +- src/overlays/actors/ovl_En_Mm2/z_en_mm2.c | 2 +- src/overlays/actors/ovl_En_Ms/z_en_ms.c | 2 +- src/overlays/actors/ovl_En_Mu/z_en_mu.c | 2 +- src/overlays/actors/ovl_En_Nb/z_en_nb.c | 16 ++-- src/overlays/actors/ovl_En_Niw/z_en_niw.c | 16 ++-- .../actors/ovl_En_Niw_Girl/z_en_niw_girl.c | 6 +- .../actors/ovl_En_Niw_Lady/z_en_niw_lady.c | 2 +- .../actors/ovl_En_Nutsball/z_en_nutsball.c | 4 +- src/overlays/actors/ovl_En_Nwc/z_en_nwc.c | 2 +- src/overlays/actors/ovl_En_Ny/z_en_ny.c | 4 +- src/overlays/actors/ovl_En_OE2/z_en_oe2.c | 2 +- .../z_en_okarina_effect.c | 2 +- .../ovl_En_Okarina_Tag/z_en_okarina_tag.c | 8 +- src/overlays/actors/ovl_En_Okuta/z_en_okuta.c | 14 ++-- src/overlays/actors/ovl_En_Ossan/z_en_ossan.c | 6 +- src/overlays/actors/ovl_En_Owl/z_en_owl.c | 12 +-- src/overlays/actors/ovl_En_Part/z_en_part.c | 2 +- .../actors/ovl_En_Peehat/z_en_peehat.c | 10 +-- .../actors/ovl_En_Po_Desert/z_en_po_desert.c | 10 +-- .../actors/ovl_En_Po_Field/z_en_po_field.c | 18 ++--- .../actors/ovl_En_Po_Relay/z_en_po_relay.c | 10 +-- .../ovl_En_Po_Sisters/z_en_po_sisters.c | 20 ++--- src/overlays/actors/ovl_En_Poh/z_en_poh.c | 24 +++--- .../actors/ovl_En_Pu_box/z_en_pu_box.c | 2 +- src/overlays/actors/ovl_En_Rd/z_en_rd.c | 12 +-- src/overlays/actors/ovl_En_Reeba/z_en_reeba.c | 16 ++-- .../ovl_En_River_Sound/z_en_river_sound.c | 2 +- src/overlays/actors/ovl_En_Rl/z_en_rl.c | 2 +- src/overlays/actors/ovl_En_Rr/z_en_rr.c | 8 +- src/overlays/actors/ovl_En_Ru1/z_en_ru1.c | 18 ++--- src/overlays/actors/ovl_En_Ru2/z_en_ru2.c | 2 +- src/overlays/actors/ovl_En_Sa/z_en_sa.c | 2 +- src/overlays/actors/ovl_En_Sb/z_en_sb.c | 2 +- .../ovl_En_Scene_Change/z_en_scene_change.c | 2 +- src/overlays/actors/ovl_En_Sda/z_en_sda.c | 2 +- .../actors/ovl_En_Shopnuts/z_en_shopnuts.c | 2 +- src/overlays/actors/ovl_En_Si/z_en_si.c | 6 +- .../actors/ovl_En_Siofuki/z_en_siofuki.c | 2 +- src/overlays/actors/ovl_En_Skb/z_en_skb.c | 10 +-- src/overlays/actors/ovl_En_Skj/z_en_skj.c | 18 ++--- .../actors/ovl_En_Skjneedle/z_en_skjneedle.c | 4 +- src/overlays/actors/ovl_En_Ssh/z_en_ssh.c | 2 +- src/overlays/actors/ovl_En_St/z_en_st.c | 12 +-- src/overlays/actors/ovl_En_Sth/z_en_sth.c | 2 +- .../actors/ovl_En_Stream/z_en_stream.c | 2 +- src/overlays/actors/ovl_En_Sw/z_en_sw.c | 6 +- .../ovl_En_Syateki_Itm/z_en_syateki_itm.c | 2 +- .../ovl_En_Syateki_Man/z_en_syateki_man.c | 4 +- .../ovl_En_Syateki_Niw/z_en_syateki_niw.c | 4 +- src/overlays/actors/ovl_En_Ta/z_en_ta.c | 14 ++-- .../ovl_En_Takara_Man/z_en_takara_man.c | 6 +- src/overlays/actors/ovl_En_Tana/z_en_tana.c | 4 +- src/overlays/actors/ovl_En_Test/z_en_test.c | 26 +++---- src/overlays/actors/ovl_En_Tg/z_en_tg.c | 2 +- src/overlays/actors/ovl_En_Tite/z_en_tite.c | 12 +-- src/overlays/actors/ovl_En_Tk/z_en_tk.c | 2 +- src/overlays/actors/ovl_En_Torch/z_en_torch.c | 2 +- .../actors/ovl_En_Torch2/z_en_torch2.c | 12 +-- src/overlays/actors/ovl_En_Toryo/z_en_toryo.c | 2 +- src/overlays/actors/ovl_En_Tp/z_en_tp.c | 14 ++-- src/overlays/actors/ovl_En_Tr/z_en_tr.c | 2 +- src/overlays/actors/ovl_En_Trap/z_en_trap.c | 2 +- .../actors/ovl_En_Tubo_Trap/z_en_tubo_trap.c | 4 +- src/overlays/actors/ovl_En_Vali/z_en_vali.c | 20 ++--- src/overlays/actors/ovl_En_Vase/z_en_vase.c | 2 +- .../actors/ovl_En_Vb_Ball/z_en_vb_ball.c | 2 +- .../actors/ovl_En_Viewer/z_en_viewer.c | 4 +- src/overlays/actors/ovl_En_Vm/z_en_vm.c | 2 +- .../actors/ovl_En_Wall_Tubo/z_en_wall_tubo.c | 2 +- .../actors/ovl_En_Wallmas/z_en_wallmas.c | 14 ++-- .../ovl_En_Weather_Tag/z_en_weather_tag.c | 4 +- .../actors/ovl_En_Weiyer/z_en_weiyer.c | 4 +- src/overlays/actors/ovl_En_Wf/z_en_wf.c | 8 +- .../ovl_En_Wonder_Item/z_en_wonder_item.c | 4 +- .../ovl_En_Wonder_Talk/z_en_wonder_talk.c | 6 +- .../ovl_En_Wonder_Talk2/z_en_wonder_talk2.c | 12 +-- .../actors/ovl_En_Wood02/z_en_wood02.c | 6 +- src/overlays/actors/ovl_En_Xc/z_en_xc.c | 6 +- .../ovl_En_Yabusame_Mark/z_en_yabusame_mark.c | 6 +- .../actors/ovl_En_Yukabyun/z_en_yukabyun.c | 8 +- src/overlays/actors/ovl_En_Zf/z_en_zf.c | 10 +-- src/overlays/actors/ovl_En_Zl1/z_en_zl1.c | 4 +- src/overlays/actors/ovl_En_Zl2/z_en_zl2.c | 2 +- src/overlays/actors/ovl_En_Zl3/z_en_zl3.c | 48 ++++++------ src/overlays/actors/ovl_En_Zl4/z_en_zl4.c | 2 +- src/overlays/actors/ovl_En_Zo/z_en_zo.c | 8 +- src/overlays/actors/ovl_En_fHG/z_en_fhg.c | 2 +- .../actors/ovl_End_Title/z_end_title.c | 2 +- src/overlays/actors/ovl_Fishing/z_fishing.c | 26 +++---- .../actors/ovl_Item_B_Heart/z_item_b_heart.c | 2 +- .../ovl_Item_Etcetera/z_item_etcetera.c | 2 +- .../actors/ovl_Item_Inbox/z_item_inbox.c | 2 +- .../actors/ovl_Item_Ocarina/z_item_ocarina.c | 2 +- .../actors/ovl_Item_Shield/z_item_shield.c | 2 +- .../actors/ovl_Magic_Dark/z_magic_dark.c | 2 +- .../actors/ovl_Magic_Fire/z_magic_fire.c | 2 +- .../actors/ovl_Magic_Wind/z_magic_wind.c | 2 +- src/overlays/actors/ovl_Mir_Ray/z_mir_ray.c | 2 +- src/overlays/actors/ovl_Obj_Bean/z_obj_bean.c | 10 +-- .../ovl_Obj_Blockstop/z_obj_blockstop.c | 2 +- .../actors/ovl_Obj_Bombiwa/z_obj_bombiwa.c | 2 +- src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c | 2 +- .../actors/ovl_Obj_Dekujr/z_obj_dekujr.c | 2 +- .../actors/ovl_Obj_Elevator/z_obj_elevator.c | 2 +- .../actors/ovl_Obj_Hamishi/z_obj_hamishi.c | 2 +- src/overlays/actors/ovl_Obj_Hana/z_obj_hana.c | 2 +- .../actors/ovl_Obj_Hsblock/z_obj_hsblock.c | 6 +- .../actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.c | 2 +- .../actors/ovl_Obj_Kibako/z_obj_kibako.c | 2 +- .../actors/ovl_Obj_Kibako2/z_obj_kibako2.c | 4 +- src/overlays/actors/ovl_Obj_Lift/z_obj_lift.c | 2 +- .../ovl_Obj_Lightswitch/z_obj_lightswitch.c | 4 +- .../ovl_Obj_Makekinsuta/z_obj_makekinsuta.c | 2 +- .../ovl_Obj_Makeoshihiki/z_obj_makeoshihiki.c | 2 +- src/overlays/actors/ovl_Obj_Mure/z_obj_mure.c | 10 +-- .../actors/ovl_Obj_Mure2/z_obj_mure2.c | 6 +- .../actors/ovl_Obj_Mure3/z_obj_mure3.c | 6 +- .../actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c | 2 +- .../ovl_Obj_Roomtimer/z_obj_roomtimer.c | 2 +- .../actors/ovl_Obj_Switch/z_obj_switch.c | 4 +- .../actors/ovl_Obj_Syokudai/z_obj_syokudai.c | 2 +- .../ovl_Obj_Timeblock/z_obj_timeblock.c | 2 +- .../actors/ovl_Obj_Tsubo/z_obj_tsubo.c | 6 +- .../ovl_Obj_Warp2block/z_obj_warp2block.c | 2 +- .../ovl_Object_Kankyo/z_object_kankyo.c | 2 +- .../actors/ovl_Oceff_Spot/z_oceff_spot.c | 2 +- .../actors/ovl_Oceff_Storm/z_oceff_storm.c | 2 +- .../actors/ovl_Oceff_Wipe/z_oceff_wipe.c | 2 +- .../actors/ovl_Oceff_Wipe2/z_oceff_wipe2.c | 2 +- .../actors/ovl_Oceff_Wipe3/z_oceff_wipe3.c | 2 +- .../actors/ovl_Oceff_Wipe4/z_oceff_wipe4.c | 2 +- src/overlays/actors/ovl_Shot_Sun/z_shot_sun.c | 10 +-- .../actors/ovl_player_actor/z_player.c | 59 +++++++-------- 439 files changed, 1342 insertions(+), 1304 deletions(-) diff --git a/include/macros.h b/include/macros.h index 4173fdee7d..d403ddf931 100644 --- a/include/macros.h +++ b/include/macros.h @@ -77,6 +77,8 @@ #define CHECK_BTN_ALL(state, combo) (~((state) | ~(combo)) == 0) #define CHECK_BTN_ANY(state, combo) (((state) & (combo)) != 0) +#define CHECK_FLAG_ALL(flags, mask) (((flags) & (mask)) == (mask)) + #define LOG(exp, value, format, file, line) \ do { \ diff --git a/include/z64actor.h b/include/z64actor.h index b1ac4cc798..fe0ffe20f0 100644 --- a/include/z64actor.h +++ b/include/z64actor.h @@ -100,6 +100,35 @@ typedef struct { /* 0x18 */ Vec3f feetPos[2]; // Update by using `Actor_SetFeetPos` in PostLimbDraw } ActorShape; // size = 0x30 +#define ACTOR_FLAG_0 (1 << 0) +#define ACTOR_FLAG_2 (1 << 2) +#define ACTOR_FLAG_3 (1 << 3) +#define ACTOR_FLAG_4 (1 << 4) +#define ACTOR_FLAG_5 (1 << 5) +#define ACTOR_FLAG_6 (1 << 6) +#define ACTOR_FLAG_7 (1 << 7) +#define ACTOR_FLAG_8 (1 << 8) +#define ACTOR_FLAG_9 (1 << 9) +#define ACTOR_FLAG_10 (1 << 10) +#define ACTOR_FLAG_11 (1 << 11) +#define ACTOR_FLAG_12 (1 << 12) +#define ACTOR_FLAG_13 (1 << 13) +#define ACTOR_FLAG_14 (1 << 14) +#define ACTOR_FLAG_15 (1 << 15) +#define ACTOR_FLAG_16 (1 << 16) +#define ACTOR_FLAG_17 (1 << 17) +#define ACTOR_FLAG_18 (1 << 18) +#define ACTOR_FLAG_19 (1 << 19) +#define ACTOR_FLAG_20 (1 << 20) +#define ACTOR_FLAG_21 (1 << 21) +#define ACTOR_FLAG_22 (1 << 22) +#define ACTOR_FLAG_23 (1 << 23) +#define ACTOR_FLAG_24 (1 << 24) +#define ACTOR_FLAG_25 (1 << 25) +#define ACTOR_FLAG_26 (1 << 26) +#define ACTOR_FLAG_27 (1 << 27) +#define ACTOR_FLAG_28 (1 << 28) + typedef struct Actor { /* 0x000 */ s16 id; // Actor ID /* 0x002 */ u8 category; // Actor category. Refer to the corresponding enum for values diff --git a/src/code/code_800430A0.c b/src/code/code_800430A0.c index 673c60515a..95c7c4fc5d 100644 --- a/src/code/code_800430A0.c +++ b/src/code/code_800430A0.c @@ -62,7 +62,7 @@ void func_80043334(CollisionContext* colCtx, Actor* actor, s32 bgId) { if (dynaActor != NULL) { func_800434A8(dynaActor); - if ((actor->flags & 0x4000000) == 0x4000000) { + if (CHECK_FLAG_ALL(actor->flags, ACTOR_FLAG_26)) { func_80043538(dynaActor); } } diff --git a/src/code/db_camera.c b/src/code/db_camera.c index f7e565af24..f77dac120d 100644 --- a/src/code/db_camera.c +++ b/src/code/db_camera.c @@ -1300,8 +1300,9 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam) { DbCamera_SetTextValue(dbCamera->sub.lookAt[dbCamera->sub.unkIdx].cameraRoll, &D_8012D084[10], 3); func_8006376C(0x10, 0x16, (dbCamera->sub.unk_0A == 2) ? 7 : 4, D_8012D084); func_8006376C(0xF, 0x17, (dbCamera->sub.unk_0A == 3) ? 7 : 4, - (dbCamera->sub.mode == 1) ? D_8012CF14 - : (dbCamera->sub.mode == 0) ? *D_8012CF18 : D_8012CFB0); + (dbCamera->sub.mode == 1) ? D_8012CF14 + : (dbCamera->sub.mode == 0) ? *D_8012CF18 + : D_8012CFB0); if (dbCamera->sub.unk_0C) { D_8012D05C[80] = '>'; } else { @@ -1326,9 +1327,9 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam) { if (dbCamera->sub.mode != 1) { func_8006376C(3, 0x16, - ((dbCamera->sub.unk_08 == 1) && (dbCamera->sub.unk_0A == 4) && !D_80161144) - ? 7 - : !D_80161144 ? 4 : 3, + ((dbCamera->sub.unk_08 == 1) && (dbCamera->sub.unk_0A == 4) && !D_80161144) ? 7 + : !D_80161144 ? 4 + : 3, D_8012CF30); sp110 = 'X'; DbCamera_SetTextValue(dbCamera->at.x, &sp111, 6); @@ -1339,10 +1340,11 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam) { sp110 = 'Z'; DbCamera_SetTextValue(dbCamera->at.z, &sp111, 6); func_8006376C(3, 0x19, 2, &sp110); - func_8006376C( - 0x1E, 0x16, - ((dbCamera->sub.unk_08 == 1) && (dbCamera->sub.unk_0A == 4) && D_80161144) ? 7 : D_80161144 ? 4 : 3, - D_8012CF34); + func_8006376C(0x1E, 0x16, + ((dbCamera->sub.unk_08 == 1) && (dbCamera->sub.unk_0A == 4) && D_80161144) ? 7 + : D_80161144 ? 4 + : 3, + D_8012CF34); sp110 = 'X'; DbCamera_SetTextValue(dbCamera->eye.x, &sp111, 6); func_8006376C(0x1E, 0x17, 2, &sp110); @@ -1357,9 +1359,9 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam) { OLib_Vec3fDiffToVecSphGeo(&spFC, sp90, sp7C); spFC.yaw -= cam->playerPosRot.rot.y; func_8006376C(3, 0x16, - ((dbCamera->sub.unk_08 == 1) && (dbCamera->sub.unk_0A == 4) && !D_80161144) - ? 7 - : !D_80161144 ? 4 : 3, + ((dbCamera->sub.unk_08 == 1) && (dbCamera->sub.unk_0A == 4) && !D_80161144) ? 7 + : !D_80161144 ? 4 + : 3, D_8012CF30); DbCamera_SetTextValue(spFC.pitch * 0.00549325f, &D_8012D0E4[10], 4); func_8006376C(3, 0x17, 3, D_8012D0E4); @@ -1369,10 +1371,11 @@ void DbCamera_Update(DbCamera* dbCamera, Camera* cam) { func_8006376C(3, 0x19, 3, D_8012D0D4); OLib_Vec3fDiffToVecSphGeo(&spFC, sp90, sp80); spFC.yaw -= cam->playerPosRot.rot.y; - func_8006376C( - 0x1E, 0x16, - ((dbCamera->sub.unk_08 == 1) && (dbCamera->sub.unk_0A == 4) && D_80161144) ? 7 : D_80161144 ? 4 : 3, - D_8012CF34); + func_8006376C(0x1E, 0x16, + ((dbCamera->sub.unk_08 == 1) && (dbCamera->sub.unk_0A == 4) && D_80161144) ? 7 + : D_80161144 ? 4 + : 3, + D_8012CF34); DbCamera_SetTextValue(spFC.pitch * 0.00549325f, &D_8012D0E4[10], 4); func_8006376C(0x1C, 0x17, 3, D_8012D0E4); DbCamera_SetTextValue(spFC.yaw * 0.00549325f, &D_8012D0F8[10], 4); diff --git a/src/code/ucode_disas.c b/src/code/ucode_disas.c index c2ad06f524..b2588cc539 100644 --- a/src/code/ucode_disas.c +++ b/src/code/ucode_disas.c @@ -710,11 +710,10 @@ void UCodeDisas_Disassemble(UCodeDisas* this, GfxMod* ptr) { Gfillrect setscissor = ptr->fillrect; const char* modeStr; - modeStr = (setscissor.pad == G_SC_NON_INTERLACE) - ? "G_SC_NON_INTERLACE" - : (setscissor.pad == G_SC_ODD_INTERLACE) - ? "G_SC_ODD_INTERLACE" - : (setscissor.pad == G_SC_EVEN_INTERLACE) ? "G_SC_EVEN_INTERLACE" : "???"; + modeStr = (setscissor.pad == G_SC_NON_INTERLACE) ? "G_SC_NON_INTERLACE" + : (setscissor.pad == G_SC_ODD_INTERLACE) ? "G_SC_ODD_INTERLACE" + : (setscissor.pad == G_SC_EVEN_INTERLACE) ? "G_SC_EVEN_INTERLACE" + : "???"; if ((setscissor.x0frac | setscissor.y0frac | setscissor.x1frac | setscissor.y1frac)) { if (1) {} @@ -740,12 +739,15 @@ void UCodeDisas_Disassemble(UCodeDisas* this, GfxMod* ptr) { u32 siz = ((curGfx->words.w0 & 0x180000) >> 0x13) & 0xFF; DISAS_LOG("gsDPSetColorImage(G_IM_FMT_%s, G_IM_SIZ_%s, %d, 0x%08x(0x%08x) ),", - (fmt == G_IM_FMT_RGBA) - ? "RGBA" - : (fmt == G_IM_FMT_YUV) ? "YUV" - : (fmt == G_IM_FMT_CI) ? "CI" : (fmt == G_IM_FMT_IA) ? "IA" : "I", - (siz == G_IM_SIZ_4b) ? "4b" - : (siz == G_IM_SIZ_8b) ? "8b" : (siz == G_IM_SIZ_16b) ? "16b" : "32b", + (fmt == G_IM_FMT_RGBA) ? "RGBA" + : (fmt == G_IM_FMT_YUV) ? "YUV" + : (fmt == G_IM_FMT_CI) ? "CI" + : (fmt == G_IM_FMT_IA) ? "IA" + : "I", + (siz == G_IM_SIZ_4b) ? "4b" + : (siz == G_IM_SIZ_8b) ? "8b" + : (siz == G_IM_SIZ_16b) ? "16b" + : "32b", (curGfx->dma.len & 0xFFF) + 1, curGfx->setimg.dram, addr); if (this->pipeSyncRequired) { @@ -768,12 +770,15 @@ void UCodeDisas_Disassemble(UCodeDisas* this, GfxMod* ptr) { u32 siz = ((curGfx->words.w0 & 0x180000) >> 0x13) & 0xFF; DISAS_LOG("gsDPSetTextureImage(G_IM_FMT_%s, G_IM_SIZ_%s, %d, 0x%08x(0x%08x)),", - (fmt == G_IM_FMT_RGBA) - ? "RGBA" - : (fmt == G_IM_FMT_YUV) ? "YUV" - : (fmt == G_IM_FMT_CI) ? "CI" : (fmt == G_IM_FMT_IA) ? "IA" : "I", - (siz == G_IM_SIZ_4b) ? "4b" - : (siz == G_IM_SIZ_8b) ? "8b" : (siz == G_IM_SIZ_16b) ? "16b" : "32b", + (fmt == G_IM_FMT_RGBA) ? "RGBA" + : (fmt == G_IM_FMT_YUV) ? "YUV" + : (fmt == G_IM_FMT_CI) ? "CI" + : (fmt == G_IM_FMT_IA) ? "IA" + : "I", + (siz == G_IM_SIZ_4b) ? "4b" + : (siz == G_IM_SIZ_8b) ? "8b" + : (siz == G_IM_SIZ_16b) ? "16b" + : "32b", (curGfx->dma.len & 0xFFF) + 1, curGfx->setimg.dram, addr); } break; @@ -989,15 +994,11 @@ void UCodeDisas_Disassemble(UCodeDisas* this, GfxMod* ptr) { case G_MODIFYVTX: { DISAS_LOG("gsSPModifyVertex(%d, %s, %08x),", curGfx->dma.par, - (curGfx->dma.len == G_MWO_POINT_RGBA) - ? "G_MWO_POINT_RGBA" - : (curGfx->dma.len == G_MWO_POINT_ST) - ? "G_MWO_POINT_ST" - : (curGfx->dma.len == G_MWO_POINT_XYSCREEN) - ? "G_MWO_POINT_XYSCREEN" - : (curGfx->dma.len == G_MWO_POINT_ZSCREEN) - ? "G_MWO_POINT_ZSCREEN" - : "G_MWO_POINT_????", + (curGfx->dma.len == G_MWO_POINT_RGBA) ? "G_MWO_POINT_RGBA" + : (curGfx->dma.len == G_MWO_POINT_ST) ? "G_MWO_POINT_ST" + : (curGfx->dma.len == G_MWO_POINT_XYSCREEN) ? "G_MWO_POINT_XYSCREEN" + : (curGfx->dma.len == G_MWO_POINT_ZSCREEN) ? "G_MWO_POINT_ZSCREEN" + : "G_MWO_POINT_????", curGfx->dma.addr); this->vtxCnt += curGfx->dma.par; this->spvtxCnt++; diff --git a/src/code/z_actor.c b/src/code/z_actor.c index 5d5f86f1a4..4f23e2c789 100644 --- a/src/code/z_actor.c +++ b/src/code/z_actor.c @@ -391,7 +391,7 @@ void func_8002C124(TargetContext* targetCtx, GlobalContext* globalCtx) { } actor = targetCtx->unk_94; - if ((actor != NULL) && !(actor->flags & 0x8000000)) { + if ((actor != NULL) && !(actor->flags & ACTOR_FLAG_27)) { NaviColor* naviColor = &sNaviColorList[actor->category]; POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 0x7); @@ -484,7 +484,8 @@ void func_8002C7BC(TargetContext* targetCtx, Player* player, Actor* actorArg, Gl targetCtx->unk_48 = 0; } - lockOnSfxId = ((actorArg->flags & 5) == 5) ? NA_SE_SY_LOCK_ON : NA_SE_SY_LOCK_ON_HUMAN; + lockOnSfxId = CHECK_FLAG_ALL(actorArg->flags, ACTOR_FLAG_0 | ACTOR_FLAG_2) ? NA_SE_SY_LOCK_ON + : NA_SE_SY_LOCK_ON_HUMAN; func_80078884(lockOnSfxId); } @@ -762,7 +763,7 @@ s32 func_8002D53C(GlobalContext* globalCtx, TitleCardContext* titleCtx) { void Actor_Kill(Actor* actor) { actor->draw = NULL; actor->update = NULL; - actor->flags &= ~0x1; + actor->flags &= ~ACTOR_FLAG_0; } void Actor_SetWorldToHome(Actor* actor) { @@ -999,8 +1000,8 @@ void func_8002DE04(GlobalContext* globalCtx, Actor* actorA, Actor* actorB) { hookshot->grabbedDistDiff.x = 0.0f; hookshot->grabbedDistDiff.y = 0.0f; hookshot->grabbedDistDiff.z = 0.0f; - actorB->flags |= 0x2000; - actorA->flags &= ~0x2000; + actorB->flags |= ACTOR_FLAG_13; + actorA->flags &= ~ACTOR_FLAG_13; } void func_8002DE74(GlobalContext* globalCtx, Player* player) { @@ -1435,7 +1436,7 @@ f32 func_8002EFC0(Actor* actor, Player* player, s16 arg2) { s16 yawTempAbs = ABS(yawTemp); if (player->unk_664 != NULL) { - if ((yawTempAbs > 0x4000) || (actor->flags & 0x8000000)) { + if ((yawTempAbs > 0x4000) || (actor->flags & ACTOR_FLAG_27)) { return FLT_MAX; } else { f32 ret = @@ -1471,7 +1472,7 @@ u32 func_8002F090(Actor* actor, f32 arg1) { } s32 func_8002F0C8(Actor* actor, Player* player, s32 flag) { - if ((actor->update == NULL) || !(actor->flags & 1)) { + if ((actor->update == NULL) || !(actor->flags & ACTOR_FLAG_0)) { return true; } @@ -1493,8 +1494,8 @@ s32 func_8002F0C8(Actor* actor, Player* player, s32 flag) { } u32 Actor_ProcessTalkRequest(Actor* actor, GlobalContext* globalCtx) { - if (actor->flags & 0x100) { - actor->flags &= ~0x100; + if (actor->flags & ACTOR_FLAG_8) { + actor->flags &= ~ACTOR_FLAG_8; return true; } @@ -1505,7 +1506,7 @@ s32 func_8002F1C4(Actor* actor, GlobalContext* globalCtx, f32 arg2, f32 arg3, u3 Player* player = GET_PLAYER(globalCtx); // This is convoluted but it seems like it must be a single if statement to match - if ((player->actor.flags & 0x100) || ((exchangeItemId != EXCH_ITEM_NONE) && Player_InCsMode(globalCtx)) || + if ((player->actor.flags & ACTOR_FLAG_8) || ((exchangeItemId != EXCH_ITEM_NONE) && Player_InCsMode(globalCtx)) || (!actor->isTargeted && ((arg3 < fabsf(actor->yDistToPlayer)) || (player->targetActorDistance < actor->xzDistToPlayer) || (arg2 < actor->xzDistToPlayer)))) { @@ -1708,30 +1709,30 @@ void func_8002F850(GlobalContext* globalCtx, Actor* actor) { void func_8002F8F0(Actor* actor, u16 sfxId) { actor->sfx = sfxId; - actor->flags |= 0x80000; - actor->flags &= ~0x10300000; + actor->flags |= ACTOR_FLAG_19; + actor->flags &= ~(ACTOR_FLAG_20 | ACTOR_FLAG_21 | ACTOR_FLAG_28); } void func_8002F91C(Actor* actor, u16 sfxId) { actor->sfx = sfxId; - actor->flags |= 0x100000; - actor->flags &= ~0x10280000; + actor->flags |= ACTOR_FLAG_20; + actor->flags &= ~(ACTOR_FLAG_19 | ACTOR_FLAG_21 | ACTOR_FLAG_28); } void func_8002F948(Actor* actor, u16 sfxId) { actor->sfx = sfxId; - actor->flags |= 0x200000; - actor->flags &= ~0x10180000; + actor->flags |= ACTOR_FLAG_21; + actor->flags &= ~(ACTOR_FLAG_19 | ACTOR_FLAG_20 | ACTOR_FLAG_28); } void func_8002F974(Actor* actor, u16 sfxId) { - actor->flags &= ~0x10380000; + actor->flags &= ~(ACTOR_FLAG_19 | ACTOR_FLAG_20 | ACTOR_FLAG_21 | ACTOR_FLAG_28); actor->sfx = sfxId; } void func_8002F994(Actor* actor, s32 arg1) { - actor->flags |= 0x10000000; - actor->flags &= ~0x00380000; + actor->flags |= ACTOR_FLAG_28; + actor->flags &= ~(ACTOR_FLAG_19 | ACTOR_FLAG_20 | ACTOR_FLAG_21); if (arg1 < 40) { actor->sfx = NA_SE_PL_WALK_DIRT - SFX_FLAG; } else if (arg1 < 100) { @@ -2029,7 +2030,7 @@ void Actor_UpdateAll(GlobalContext* globalCtx, ActorContext* actorCtx) { sp80 = &D_80116068[0]; if (player->stateFlags2 & 0x8000000) { - unkFlag = 0x2000000; + unkFlag = ACTOR_FLAG_25; } if ((player->stateFlags1 & 0x40) && ((player->actor.textId & 0xFF00) != 0x600)) { @@ -2076,9 +2077,9 @@ void Actor_UpdateAll(GlobalContext* globalCtx, ActorContext* actorCtx) { actor->xyzDistToPlayerSq = SQ(actor->xzDistToPlayer) + SQ(actor->yDistToPlayer); actor->yawTowardsPlayer = Actor_WorldYawTowardActor(actor, &player->actor); - actor->flags &= ~0x1000000; + actor->flags &= ~ACTOR_FLAG_24; - if ((DECR(actor->freezeTimer) == 0) && (actor->flags & 0x50)) { + if ((DECR(actor->freezeTimer) == 0) && (actor->flags & (ACTOR_FLAG_4 | ACTOR_FLAG_6))) { if (actor == player->unk_664) { actor->isTargeted = true; } else { @@ -2160,10 +2161,10 @@ void Actor_Draw(GlobalContext* globalCtx, Actor* actor) { lights = LightContext_NewLights(&globalCtx->lightCtx, globalCtx->state.gfxCtx); - Lights_BindAll(lights, globalCtx->lightCtx.listHead, (actor->flags & 0x400000) ? NULL : &actor->world.pos); + Lights_BindAll(lights, globalCtx->lightCtx.listHead, (actor->flags & ACTOR_FLAG_22) ? NULL : &actor->world.pos); Lights_Draw(lights, globalCtx->state.gfxCtx); - if (actor->flags & 0x1000) { + if (actor->flags & ACTOR_FLAG_12) { func_800D1694(actor->world.pos.x + globalCtx->mainCamera.skyboxOffset.x, actor->world.pos.y + (f32)((actor->shape.yOffset * actor->scale.y) + globalCtx->mainCamera.skyboxOffset.y), @@ -2217,13 +2218,13 @@ void Actor_Draw(GlobalContext* globalCtx, Actor* actor) { } void func_80030ED8(Actor* actor) { - if (actor->flags & 0x80000) { + if (actor->flags & ACTOR_FLAG_19) { Audio_PlaySoundGeneral(actor->sfx, &actor->projectedPos, 4, &D_801333E0, &D_801333E0, &D_801333E8); - } else if (actor->flags & 0x100000) { + } else if (actor->flags & ACTOR_FLAG_20) { func_80078884(actor->sfx); - } else if (actor->flags & 0x200000) { + } else if (actor->flags & ACTOR_FLAG_21) { func_800788CC(actor->sfx); - } else if (actor->flags & 0x10000000) { + } else if (actor->flags & ACTOR_FLAG_28) { func_800F4C58(&D_801333D4, NA_SE_SY_TIMER - SFX_FLAG, (s8)(actor->sfx - 1)); } else { func_80078914(&actor->projectedPos, actor->sfx); @@ -2372,17 +2373,17 @@ void func_800315AC(GlobalContext* globalCtx, ActorContext* actorCtx) { if ((HREG(64) != 1) || ((HREG(65) != -1) && (HREG(65) != HREG(66))) || (HREG(70) == 0)) { if (func_800314B0(globalCtx, actor)) { - actor->flags |= 0x40; + actor->flags |= ACTOR_FLAG_6; } else { - actor->flags &= ~0x40; + actor->flags &= ~ACTOR_FLAG_6; } } actor->isDrawn = false; if ((HREG(64) != 1) || ((HREG(65) != -1) && (HREG(65) != HREG(66))) || (HREG(71) == 0)) { - if ((actor->init == NULL) && (actor->draw != NULL) && (actor->flags & 0x60)) { - if ((actor->flags & 0x80) && + if ((actor->init == NULL) && (actor->draw != NULL) && (actor->flags & (ACTOR_FLAG_5 | ACTOR_FLAG_6))) { + if ((actor->flags & ACTOR_FLAG_7) && ((globalCtx->roomCtx.curRoom.showInvisActors == 0) || (globalCtx->actorCtx.unk_03 != 0) || (actor->room != globalCtx->roomCtx.curRoom.num))) { ASSERT(invisibleActorCounter < INVISIBLE_ACTOR_MAX, @@ -2889,11 +2890,11 @@ void func_800328D4(GlobalContext* globalCtx, ActorContext* actorCtx, Player* pla sp84 = player->unk_664; while (actor != NULL) { - if ((actor->update != NULL) && ((Player*)actor != player) && ((actor->flags & 1) == 1)) { + if ((actor->update != NULL) && ((Player*)actor != player) && CHECK_FLAG_ALL(actor->flags, ACTOR_FLAG_0)) { // This block below is for determining the closest actor to player in determining the volume // used while playing enemy bgm music - if ((actorCategory == ACTORCAT_ENEMY) && ((actor->flags & 5) == 5) && + if ((actorCategory == ACTORCAT_ENEMY) && CHECK_FLAG_ALL(actor->flags, ACTOR_FLAG_0 | ACTOR_FLAG_2) && (actor->xyzDistToPlayerSq < SQ(500.0f)) && (actor->xyzDistToPlayerSq < sbgmEnemyDistSq)) { actorCtx->targetCtx.bgmEnemy = actor; sbgmEnemyDistSq = actor->xyzDistToPlayerSq; @@ -3845,10 +3846,10 @@ s16 func_80034DD4(Actor* actor, GlobalContext* globalCtx, s16 arg2, f32 arg3) { } if (arg3 < var) { - actor->flags &= ~1; + actor->flags &= ~ACTOR_FLAG_0; Math_SmoothStepToS(&arg2, 0, 6, 0x14, 1); } else { - actor->flags |= 1; + actor->flags |= ACTOR_FLAG_0; Math_SmoothStepToS(&arg2, 0xFF, 6, 0x14, 1); } diff --git a/src/code/z_camera.c b/src/code/z_camera.c index 5904c47339..041d0f9e7f 100644 --- a/src/code/z_camera.c +++ b/src/code/z_camera.c @@ -1690,9 +1690,9 @@ s32 Camera_Normal2(Camera* camera) { anim->unk_20 = BGCAM_ROT(bgData).x; anim->unk_22 = BGCAM_ROT(bgData).y; anim->unk_24 = playerPosRot->pos.y; - anim->unk_1C = BGCAM_FOV(bgData) == -1 - ? norm2->unk_14 - : BGCAM_FOV(bgData) >= 0x169 ? PCT(BGCAM_FOV(bgData)) : BGCAM_FOV(bgData); + anim->unk_1C = BGCAM_FOV(bgData) == -1 ? norm2->unk_14 + : BGCAM_FOV(bgData) >= 0x169 ? PCT(BGCAM_FOV(bgData)) + : BGCAM_FOV(bgData); anim->unk_28 = BGCAM_JFIFID(bgData) == -1 ? 0 : BGCAM_JFIFID(bgData); @@ -2923,7 +2923,9 @@ s32 Camera_Battle1(Camera* camera) { } anim->roll += (((OREG(36) * camera->speedRatio) * (1.0f - distRatio)) - anim->roll) * PCT(OREG(37)); camera->roll = DEGF_TO_BINANG(anim->roll); - camera->fov = Camera_LERPCeilF((player->swordState != 0 ? 0.8f : gSaveContext.health <= 0x10 ? 0.8f : 1.0f) * + camera->fov = Camera_LERPCeilF((player->swordState != 0 ? 0.8f + : gSaveContext.health <= 0x10 ? 0.8f + : 1.0f) * (fov - ((fov * 0.05f) * distRatio)), camera->fov, camera->fovUpdateRate, 1.0f); } diff --git a/src/code/z_debug.c b/src/code/z_debug.c index 2949f0ef95..8b2a6fe93e 100644 --- a/src/code/z_debug.c +++ b/src/code/z_debug.c @@ -151,19 +151,15 @@ void func_8006390C(Input* input) { gGameInfo->dpadLast = dpad; } - increment = CHECK_BTN_ANY(dpad, BTN_DRIGHT) - ? (CHECK_BTN_ALL(input->cur.button, BTN_A | BTN_B) - ? 1000 - : CHECK_BTN_ALL(input->cur.button, BTN_A) - ? 100 - : CHECK_BTN_ALL(input->cur.button, BTN_B) ? 10 : 1) - : CHECK_BTN_ANY(dpad, BTN_DLEFT) - ? (CHECK_BTN_ALL(input->cur.button, BTN_A | BTN_B) - ? -1000 - : CHECK_BTN_ALL(input->cur.button, BTN_A) - ? -100 - : CHECK_BTN_ALL(input->cur.button, BTN_B) ? -10 : -1) - : 0; + increment = CHECK_BTN_ANY(dpad, BTN_DRIGHT) ? (CHECK_BTN_ALL(input->cur.button, BTN_A | BTN_B) ? 1000 + : CHECK_BTN_ALL(input->cur.button, BTN_A) ? 100 + : CHECK_BTN_ALL(input->cur.button, BTN_B) ? 10 + : 1) + : CHECK_BTN_ANY(dpad, BTN_DLEFT) ? (CHECK_BTN_ALL(input->cur.button, BTN_A | BTN_B) ? -1000 + : CHECK_BTN_ALL(input->cur.button, BTN_A) ? -100 + : CHECK_BTN_ALL(input->cur.button, BTN_B) ? -10 + : -1) + : 0; gGameInfo->data[gGameInfo->regCur + regGroup] += increment; if (CHECK_BTN_ANY(dpad, BTN_DUP)) { diff --git a/src/code/z_en_a_keep.c b/src/code/z_en_a_keep.c index fd3edc86ee..91f21648a0 100644 --- a/src/code/z_en_a_keep.c +++ b/src/code/z_en_a_keep.c @@ -2,7 +2,7 @@ #include "vt.h" #include "objects/gameplay_keep/gameplay_keep.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 void EnAObj_Init(Actor* thisx, GlobalContext* globalCtx); void EnAObj_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -140,7 +140,7 @@ void EnAObj_Init(Actor* thisx, GlobalContext* globalCtx) { break; case A_OBJ_UNKNOWN_6: // clang-format off - thisx->flags |= 0x1; this->dyna.bgId = 5; this->focusYoffset = 10.0f; + thisx->flags |= ACTOR_FLAG_0; this->dyna.bgId = 5; this->focusYoffset = 10.0f; // clang-format on thisx->gravity = -2.0f; EnAObj_SetupWaitTalk(this, thisx->params); @@ -154,7 +154,7 @@ void EnAObj_Init(Actor* thisx, GlobalContext* globalCtx) { case A_OBJ_SIGNPOST_ARROW: thisx->textId = (this->textId & 0xFF) | 0x300; // clang-format off - thisx->flags |= 0x1 | 0x8; thisx->targetArrowOffset = 500.0f; + thisx->flags |= ACTOR_FLAG_0 | ACTOR_FLAG_3; thisx->targetArrowOffset = 500.0f; // clang-format on this->focusYoffset = 45.0f; EnAObj_SetupWaitTalk(this, thisx->params); diff --git a/src/code/z_en_item00.c b/src/code/z_en_item00.c index ef85217cdc..794a626594 100644 --- a/src/code/z_en_item00.c +++ b/src/code/z_en_item00.c @@ -3,7 +3,7 @@ #include "objects/gameplay_keep/gameplay_keep.h" #include "overlays/effects/ovl_Effect_Ss_Dead_Sound/z_eff_ss_dead_sound.h" -#define FLAGS 0x00000000 +#define FLAGS 0 void EnItem00_Init(Actor* thisx, GlobalContext* globalCtx); void EnItem00_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -1166,7 +1166,7 @@ EnItem00* Item_DropCollectible(GlobalContext* globalCtx, Vec3f* spawnPos, s16 pa (spawnedActor->actor.params != ITEM00_HEART_CONTAINER)) { spawnedActor->actor.room = -1; } - spawnedActor->actor.flags |= 0x0010; + spawnedActor->actor.flags |= ACTOR_FLAG_4; } } } @@ -1198,7 +1198,7 @@ EnItem00* Item_DropCollectible2(GlobalContext* globalCtx, Vec3f* spawnPos, s16 p spawnedActor->actor.speedXZ = 0.0f; spawnedActor->actor.gravity = param4000 ? 0.0f : -0.9f; spawnedActor->actor.world.rot.y = Rand_CenteredFloat(65536.0f); - spawnedActor->actor.flags |= 0x0010; + spawnedActor->actor.flags |= ACTOR_FLAG_4; } } } @@ -1310,7 +1310,7 @@ void Item_DropCollectibleRandom(GlobalContext* globalCtx, Actor* fromActor, Vec3 spawnedActor->actor.world.rot.y = Rand_ZeroOne() * 40000.0f; Actor_SetScale(&spawnedActor->actor, 0.0f); EnItem00_SetupAction(spawnedActor, func_8001E304); - spawnedActor->actor.flags |= 0x0010; + spawnedActor->actor.flags |= ACTOR_FLAG_4; if ((spawnedActor->actor.params != ITEM00_SMALL_KEY) && (spawnedActor->actor.params != ITEM00_HEART_PIECE) && (spawnedActor->actor.params != ITEM00_HEART_CONTAINER)) { diff --git a/src/code/z_player_call.c b/src/code/z_player_call.c index 3f4e11be59..0663dc6aec 100644 --- a/src/code/z_player_call.c +++ b/src/code/z_player_call.c @@ -1,6 +1,6 @@ #include "global.h" -#define FLAGS 0x06000035 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4 | ACTOR_FLAG_5 | ACTOR_FLAG_25 | ACTOR_FLAG_26) void (*sPlayerCallInitFunc)(Actor* thisx, GlobalContext* globalCtx); void (*sPlayerCallDestroyFunc)(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/code/z_player_lib.c b/src/code/z_player_lib.c index 50667d026d..7392222b8e 100644 --- a/src/code/z_player_lib.c +++ b/src/code/z_player_lib.c @@ -1253,7 +1253,7 @@ void func_80090D20(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* Matrix_Get(&sp14C); Matrix_MtxFToYXZRotS(&sp14C, &spB8, 0); - if (hookedActor->flags & 0x20000) { + if (hookedActor->flags & ACTOR_FLAG_17) { hookedActor->world.rot.x = hookedActor->shape.rot.x = spB8.x - this->unk_3BC.x; } else { hookedActor->world.rot.y = hookedActor->shape.rot.y = this->actor.shape.rot.y + this->unk_3BC.y; diff --git a/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c b/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c index 2cd3d99993..ab79b9f1b5 100644 --- a/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c +++ b/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c @@ -1,6 +1,6 @@ #include "z_arms_hook.h" -#define FLAGS 0x00000030 +#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) void ArmsHook_Init(Actor* thisx, GlobalContext* globalCtx); void ArmsHook_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -77,7 +77,7 @@ void ArmsHook_Destroy(Actor* thisx, GlobalContext* globalCtx) { ArmsHook* this = (ArmsHook*)thisx; if (this->grabbed != NULL) { - this->grabbed->flags &= ~0x2000; + this->grabbed->flags &= ~ACTOR_FLAG_13; } Collider_DestroyQuad(globalCtx, &this->collider); } @@ -113,7 +113,7 @@ s32 ArmsHook_AttachToPlayer(ArmsHook* this, Player* player) { void ArmsHook_DetachHookFromActor(ArmsHook* this) { if (this->grabbed != NULL) { - this->grabbed->flags &= ~0x2000; + this->grabbed->flags &= ~ACTOR_FLAG_13; this->grabbed = NULL; } } @@ -122,7 +122,7 @@ s32 ArmsHook_CheckForCancel(ArmsHook* this) { Player* player = (Player*)this->actor.parent; if (Player_HoldsHookshot(player)) { - if ((player->itemActionParam != player->heldItemActionParam) || ((player->actor.flags & 0x100)) || + if ((player->itemActionParam != player->heldItemActionParam) || (player->actor.flags & ACTOR_FLAG_8) || ((player->stateFlags1 & 0x4000080))) { this->timer = 0; ArmsHook_DetachHookFromActor(this); @@ -134,7 +134,7 @@ s32 ArmsHook_CheckForCancel(ArmsHook* this) { } void ArmsHook_AttachHookToActor(ArmsHook* this, Actor* actor) { - actor->flags |= 0x2000; + actor->flags |= ACTOR_FLAG_13; this->grabbed = actor; Math_Vec3f_Diff(&actor->world.pos, &this->actor.world.pos, &this->grabbedDistDiff); } @@ -173,10 +173,10 @@ void ArmsHook_Shoot(ArmsHook* this, GlobalContext* globalCtx) { if ((this->timer != 0) && (this->collider.base.atFlags & AT_HIT) && (this->collider.info.atHitInfo->elemType != ELEMTYPE_UNK4)) { touchedActor = this->collider.base.at; - if ((touchedActor->update != NULL) && (touchedActor->flags & 0x600)) { + if ((touchedActor->update != NULL) && (touchedActor->flags & (ACTOR_FLAG_9 | ACTOR_FLAG_10))) { if (this->collider.info.atHitInfo->bumperFlags & BUMP_HOOKABLE) { ArmsHook_AttachHookToActor(this, touchedActor); - if ((touchedActor->flags & 0x400) == 0x400) { + if (CHECK_FLAG_ALL(touchedActor->flags, ACTOR_FLAG_10)) { func_80865044(this); } } @@ -187,7 +187,7 @@ void ArmsHook_Shoot(ArmsHook* this, GlobalContext* globalCtx) { } else if (DECR(this->timer) == 0) { grabbed = this->grabbed; if (grabbed != NULL) { - if ((grabbed->update == NULL) || (grabbed->flags & 0x2000) != 0x2000) { + if ((grabbed->update == NULL) || !CHECK_FLAG_ALL(grabbed->flags, ACTOR_FLAG_13)) { grabbed = NULL; this->grabbed = NULL; } else if (this->actor.child != NULL) { diff --git a/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.c b/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.c index 9e3570ef2b..92fa6f1107 100644 --- a/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.c +++ b/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.c @@ -7,7 +7,7 @@ #include "z_arrow_fire.h" #include "overlays/actors/ovl_En_Arrow/z_en_arrow.h" -#define FLAGS 0x02000010 +#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_25) void ArrowFire_Init(Actor* thisx, GlobalContext* globalCtx); void ArrowFire_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.c b/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.c index 21a9de2742..473ee1bac9 100644 --- a/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.c +++ b/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.c @@ -8,7 +8,7 @@ #include "overlays/actors/ovl_En_Arrow/z_en_arrow.h" -#define FLAGS 0x02000010 +#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_25) void ArrowIce_Init(Actor* thisx, GlobalContext* globalCtx); void ArrowIce_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.c b/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.c index 7ee47e665b..ff81c873d5 100644 --- a/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.c +++ b/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.c @@ -8,7 +8,7 @@ #include "overlays/actors/ovl_En_Arrow/z_en_arrow.h" -#define FLAGS 0x02000010 +#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_25) void ArrowLight_Init(Actor* thisx, GlobalContext* globalCtx); void ArrowLight_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Bg_Bdan_Objects/z_bg_bdan_objects.c b/src/overlays/actors/ovl_Bg_Bdan_Objects/z_bg_bdan_objects.c index 898a38df04..fdb8376bcd 100644 --- a/src/overlays/actors/ovl_Bg_Bdan_Objects/z_bg_bdan_objects.c +++ b/src/overlays/actors/ovl_Bg_Bdan_Objects/z_bg_bdan_objects.c @@ -7,7 +7,7 @@ #include "z_bg_bdan_objects.h" #include "objects/object_bdan_objects/object_bdan_objects.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 void BgBdanObjects_Init(Actor* thisx, GlobalContext* globalCtx); void BgBdanObjects_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -114,7 +114,7 @@ void BgBdanObjects_Init(Actor* thisx, GlobalContext* globalCtx) { this->switchFlag = (thisx->params >> 8) & 0x3F; thisx->params &= 0xFF; if (thisx->params == 2) { - thisx->flags |= 0x30; + thisx->flags |= ACTOR_FLAG_4 | ACTOR_FLAG_5; globalCtx->colCtx.colHeader->waterBoxes[7].ySurface = thisx->world.pos.y; this->actionFunc = func_8086C9A8; return; diff --git a/src/overlays/actors/ovl_Bg_Bdan_Switch/z_bg_bdan_switch.c b/src/overlays/actors/ovl_Bg_Bdan_Switch/z_bg_bdan_switch.c index aeb5631667..6a6d514455 100644 --- a/src/overlays/actors/ovl_Bg_Bdan_Switch/z_bg_bdan_switch.c +++ b/src/overlays/actors/ovl_Bg_Bdan_Switch/z_bg_bdan_switch.c @@ -7,7 +7,7 @@ #include "z_bg_bdan_switch.h" #include "objects/object_bdan_objects/object_bdan_objects.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 void BgBdanSwitch_Init(Actor* thisx, GlobalContext* globalCtx); void BgBdanSwitch_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -160,7 +160,7 @@ void BgBdanSwitch_Init(Actor* thisx, GlobalContext* globalCtx) { case YELLOW_TALL_1: case YELLOW_TALL_2: BgBdanSwitch_InitCollision(this, globalCtx); - this->dyna.actor.flags |= 1; + this->dyna.actor.flags |= ACTOR_FLAG_0; this->dyna.actor.targetMode = 4; break; } diff --git a/src/overlays/actors/ovl_Bg_Bom_Guard/z_bg_bom_guard.c b/src/overlays/actors/ovl_Bg_Bom_Guard/z_bg_bom_guard.c index d78a33477a..1f85ac95ed 100644 --- a/src/overlays/actors/ovl_Bg_Bom_Guard/z_bg_bom_guard.c +++ b/src/overlays/actors/ovl_Bg_Bom_Guard/z_bg_bom_guard.c @@ -9,7 +9,7 @@ #include "objects/object_bowl/object_bowl.h" #include "vt.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 void BgBomGuard_Init(Actor* thisx, GlobalContext* globalCtx); void BgBomGuard_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Bg_Bombwall/z_bg_bombwall.c b/src/overlays/actors/ovl_Bg_Bombwall/z_bg_bombwall.c index 1b07ee115d..bb242f2429 100644 --- a/src/overlays/actors/ovl_Bg_Bombwall/z_bg_bombwall.c +++ b/src/overlays/actors/ovl_Bg_Bombwall/z_bg_bombwall.c @@ -7,7 +7,7 @@ #include "z_bg_bombwall.h" #include "objects/gameplay_field_keep/gameplay_field_keep.h" -#define FLAGS 0x00400000 +#define FLAGS ACTOR_FLAG_22 void BgBombwall_Init(Actor* thisx, GlobalContext* globalCtx); void BgBombwall_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Bg_Bowl_Wall/z_bg_bowl_wall.c b/src/overlays/actors/ovl_Bg_Bowl_Wall/z_bg_bowl_wall.c index 72ff563039..3bd4638d73 100644 --- a/src/overlays/actors/ovl_Bg_Bowl_Wall/z_bg_bowl_wall.c +++ b/src/overlays/actors/ovl_Bg_Bowl_Wall/z_bg_bowl_wall.c @@ -10,7 +10,7 @@ #include "objects/object_bowl/object_bowl.h" #include "vt.h" -#define FLAGS 0x00000030 +#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) void BgBowlWall_Init(Actor* thisx, GlobalContext* globalCtx); void BgBowlWall_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Bg_Breakwall/z_bg_breakwall.c b/src/overlays/actors/ovl_Bg_Breakwall/z_bg_breakwall.c index 8d015e7db1..1b9af10de9 100644 --- a/src/overlays/actors/ovl_Bg_Breakwall/z_bg_breakwall.c +++ b/src/overlays/actors/ovl_Bg_Breakwall/z_bg_breakwall.c @@ -9,7 +9,7 @@ #include "objects/object_bwall/object_bwall.h" #include "objects/object_kingdodongo/object_kingdodongo.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 typedef struct { /* 0x00 */ CollisionHeader* colHeader; @@ -208,7 +208,7 @@ void BgBreakwall_WaitForObject(BgBreakwall* this, GlobalContext* globalCtx) { this->dyna.actor.objBankIndex = this->bankIndex; Actor_SetObjectDependency(globalCtx, &this->dyna.actor); - this->dyna.actor.flags &= ~0x10; + this->dyna.actor.flags &= ~ACTOR_FLAG_4; this->dyna.actor.draw = BgBreakwall_Draw; CollisionHeader_GetVirtual(sBombableWallInfo[wallType].colHeader, &colHeader); this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader); diff --git a/src/overlays/actors/ovl_Bg_Ddan_Jd/z_bg_ddan_jd.c b/src/overlays/actors/ovl_Bg_Ddan_Jd/z_bg_ddan_jd.c index 2839c0eb22..279a36f794 100644 --- a/src/overlays/actors/ovl_Bg_Ddan_Jd/z_bg_ddan_jd.c +++ b/src/overlays/actors/ovl_Bg_Ddan_Jd/z_bg_ddan_jd.c @@ -7,7 +7,7 @@ #include "z_bg_ddan_jd.h" #include "objects/object_ddan_objects/object_ddan_objects.h" -#define FLAGS 0x00000030 +#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) void BgDdanJd_Init(Actor* thisx, GlobalContext* globalCtx); void BgDdanJd_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Bg_Ddan_Kd/z_bg_ddan_kd.c b/src/overlays/actors/ovl_Bg_Ddan_Kd/z_bg_ddan_kd.c index 4c63a0f5a2..5e6091e83e 100644 --- a/src/overlays/actors/ovl_Bg_Ddan_Kd/z_bg_ddan_kd.c +++ b/src/overlays/actors/ovl_Bg_Ddan_Kd/z_bg_ddan_kd.c @@ -7,7 +7,7 @@ #include "z_bg_ddan_kd.h" #include "objects/object_ddan_objects/object_ddan_objects.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 void BgDdanKd_Init(Actor* thisx, GlobalContext* globalCtx); void BgDdanKd_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Bg_Dodoago/z_bg_dodoago.c b/src/overlays/actors/ovl_Bg_Dodoago/z_bg_dodoago.c index ac45baa7bf..c0ac2970a9 100644 --- a/src/overlays/actors/ovl_Bg_Dodoago/z_bg_dodoago.c +++ b/src/overlays/actors/ovl_Bg_Dodoago/z_bg_dodoago.c @@ -8,7 +8,7 @@ #include "overlays/actors/ovl_En_Bom/z_en_bom.h" #include "objects/object_ddan_objects/object_ddan_objects.h" -#define FLAGS 0x00000000 +#define FLAGS 0 void BgDodoago_Init(Actor* thisx, GlobalContext* globalCtx); void BgDodoago_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.c b/src/overlays/actors/ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.c index cc60e28ba5..64fb379ffa 100644 --- a/src/overlays/actors/ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.c +++ b/src/overlays/actors/ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.c @@ -11,7 +11,7 @@ #include "scenes/indoors/yousei_izumi_yoko/yousei_izumi_yoko_scene.h" #include "scenes/indoors/daiyousei_izumi/daiyousei_izumi_scene.h" -#define FLAGS 0x02000030 +#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5 | ACTOR_FLAG_25) typedef enum { /* 0 */ FAIRY_UPGRADE_MAGIC, diff --git a/src/overlays/actors/ovl_Bg_Ganon_Otyuka/z_bg_ganon_otyuka.c b/src/overlays/actors/ovl_Bg_Ganon_Otyuka/z_bg_ganon_otyuka.c index dccb552846..d48c5d63f5 100644 --- a/src/overlays/actors/ovl_Bg_Ganon_Otyuka/z_bg_ganon_otyuka.c +++ b/src/overlays/actors/ovl_Bg_Ganon_Otyuka/z_bg_ganon_otyuka.c @@ -8,7 +8,7 @@ #include "overlays/actors/ovl_Boss_Ganon/z_boss_ganon.h" #include "vt.h" -#define FLAGS 0x00000030 +#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) typedef enum { /* 0x00 */ FLASH_NONE, diff --git a/src/overlays/actors/ovl_Bg_Gate_Shutter/z_bg_gate_shutter.c b/src/overlays/actors/ovl_Bg_Gate_Shutter/z_bg_gate_shutter.c index 19ab7984c3..705086ad0b 100644 --- a/src/overlays/actors/ovl_Bg_Gate_Shutter/z_bg_gate_shutter.c +++ b/src/overlays/actors/ovl_Bg_Gate_Shutter/z_bg_gate_shutter.c @@ -8,7 +8,7 @@ #include "objects/object_spot01_matoyab/object_spot01_matoyab.h" #include "vt.h" -#define FLAGS 0x00000000 +#define FLAGS 0 void BgGateShutter_Init(Actor* thisx, GlobalContext* globalCtx); void BgGateShutter_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Bg_Gjyo_Bridge/z_bg_gjyo_bridge.c b/src/overlays/actors/ovl_Bg_Gjyo_Bridge/z_bg_gjyo_bridge.c index 4941a27d53..80ee2265b6 100644 --- a/src/overlays/actors/ovl_Bg_Gjyo_Bridge/z_bg_gjyo_bridge.c +++ b/src/overlays/actors/ovl_Bg_Gjyo_Bridge/z_bg_gjyo_bridge.c @@ -8,7 +8,7 @@ #include "objects/object_gjyo_objects/object_gjyo_objects.h" #include "scenes/dungeons/ganon_tou/ganon_tou_scene.h" -#define FLAGS 0x00000000 +#define FLAGS 0 void BgGjyoBridge_Init(Actor* thisx, GlobalContext* globalCtx); void BgGjyoBridge_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Bg_Gnd_Darkmeiro/z_bg_gnd_darkmeiro.c b/src/overlays/actors/ovl_Bg_Gnd_Darkmeiro/z_bg_gnd_darkmeiro.c index e256533cc2..85c5765c9e 100644 --- a/src/overlays/actors/ovl_Bg_Gnd_Darkmeiro/z_bg_gnd_darkmeiro.c +++ b/src/overlays/actors/ovl_Bg_Gnd_Darkmeiro/z_bg_gnd_darkmeiro.c @@ -7,7 +7,7 @@ #include "z_bg_gnd_darkmeiro.h" #include "objects/object_demo_kekkai/object_demo_kekkai.h" -#define FLAGS 0x00000030 +#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) void BgGndDarkmeiro_Init(Actor* thisx, GlobalContext* globalCtx); void BgGndDarkmeiro_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -55,7 +55,7 @@ void BgGndDarkmeiro_Init(Actor* thisx, GlobalContext* globalCtx2) { switch (this->dyna.actor.params & 0xFF) { case DARKMEIRO_INVISIBLE_PATH: this->dyna.actor.draw = BgGndDarkmeiro_DrawInvisiblePath; - this->dyna.actor.flags |= 0x80; + this->dyna.actor.flags |= ACTOR_FLAG_7; break; case DARKMEIRO_CLEAR_BLOCK: CollisionHeader_GetVirtual(&gClearBlockCol, &colHeader); diff --git a/src/overlays/actors/ovl_Bg_Gnd_Firemeiro/z_bg_gnd_firemeiro.c b/src/overlays/actors/ovl_Bg_Gnd_Firemeiro/z_bg_gnd_firemeiro.c index b922425085..cb82194d39 100644 --- a/src/overlays/actors/ovl_Bg_Gnd_Firemeiro/z_bg_gnd_firemeiro.c +++ b/src/overlays/actors/ovl_Bg_Gnd_Firemeiro/z_bg_gnd_firemeiro.c @@ -7,7 +7,7 @@ #include "z_bg_gnd_firemeiro.h" #include "objects/object_demo_kekkai/object_demo_kekkai.h" -#define FLAGS 0x00000030 +#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) void BgGndFiremeiro_Init(Actor* thisx, GlobalContext* globalCtx); void BgGndFiremeiro_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Bg_Gnd_Iceblock/z_bg_gnd_iceblock.c b/src/overlays/actors/ovl_Bg_Gnd_Iceblock/z_bg_gnd_iceblock.c index 3a76a7d5bc..8b6933cf90 100644 --- a/src/overlays/actors/ovl_Bg_Gnd_Iceblock/z_bg_gnd_iceblock.c +++ b/src/overlays/actors/ovl_Bg_Gnd_Iceblock/z_bg_gnd_iceblock.c @@ -7,7 +7,7 @@ #include "z_bg_gnd_iceblock.h" #include "objects/object_demo_kekkai/object_demo_kekkai.h" -#define FLAGS 0x00000030 +#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) typedef enum { /* 0 */ GNDICE_IDLE, diff --git a/src/overlays/actors/ovl_Bg_Gnd_Nisekabe/z_bg_gnd_nisekabe.c b/src/overlays/actors/ovl_Bg_Gnd_Nisekabe/z_bg_gnd_nisekabe.c index 8941672730..b8da9e6ada 100644 --- a/src/overlays/actors/ovl_Bg_Gnd_Nisekabe/z_bg_gnd_nisekabe.c +++ b/src/overlays/actors/ovl_Bg_Gnd_Nisekabe/z_bg_gnd_nisekabe.c @@ -7,7 +7,7 @@ #include "z_bg_gnd_nisekabe.h" #include "objects/object_demo_kekkai/object_demo_kekkai.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 void BgGndNisekabe_Init(Actor* thisx, GlobalContext* globalCtx); void BgGndNisekabe_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -40,9 +40,9 @@ void BgGndNisekabe_Update(Actor* thisx, GlobalContext* globalCtx) { BgGndNisekabe* this = (BgGndNisekabe*)thisx; if (globalCtx->actorCtx.unk_03 != 0) { - this->actor.flags |= 0x80; + this->actor.flags |= ACTOR_FLAG_7; } else { - this->actor.flags &= ~0x80; + this->actor.flags &= ~ACTOR_FLAG_7; } } @@ -55,7 +55,7 @@ void BgGndNisekabe_Draw(Actor* thisx, GlobalContext* globalCtx) { BgGndNisekabe* this = (BgGndNisekabe*)thisx; u32 index = this->actor.params & 0xFF; - if ((this->actor.flags & 0x80) == 0x80) { + if (CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_7)) { Gfx_DrawDListXlu(globalCtx, dLists[index]); } else { Gfx_DrawDListOpa(globalCtx, dLists[index]); diff --git a/src/overlays/actors/ovl_Bg_Gnd_Soulmeiro/z_bg_gnd_soulmeiro.c b/src/overlays/actors/ovl_Bg_Gnd_Soulmeiro/z_bg_gnd_soulmeiro.c index 22946b3822..3eedbdc7c2 100644 --- a/src/overlays/actors/ovl_Bg_Gnd_Soulmeiro/z_bg_gnd_soulmeiro.c +++ b/src/overlays/actors/ovl_Bg_Gnd_Soulmeiro/z_bg_gnd_soulmeiro.c @@ -8,7 +8,7 @@ #include "objects/object_demo_kekkai/object_demo_kekkai.h" #include "global.h" -#define FLAGS 0x00000000 +#define FLAGS 0 void BgGndSoulmeiro_Init(Actor* thisx, GlobalContext* globalCtx); void BgGndSoulmeiro_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Bg_Haka/z_bg_haka.c b/src/overlays/actors/ovl_Bg_Haka/z_bg_haka.c index 26b704c137..4ec6a44aa9 100644 --- a/src/overlays/actors/ovl_Bg_Haka/z_bg_haka.c +++ b/src/overlays/actors/ovl_Bg_Haka/z_bg_haka.c @@ -7,7 +7,7 @@ #include "z_bg_haka.h" #include "objects/object_haka/object_haka.h" -#define FLAGS 0x00000000 +#define FLAGS 0 void BgHaka_Init(Actor* thisx, GlobalContext* globalCtx); void BgHaka_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Bg_Haka_Gate/z_bg_haka_gate.c b/src/overlays/actors/ovl_Bg_Haka_Gate/z_bg_haka_gate.c index 100d7cce1e..c6005072f7 100644 --- a/src/overlays/actors/ovl_Bg_Haka_Gate/z_bg_haka_gate.c +++ b/src/overlays/actors/ovl_Bg_Haka_Gate/z_bg_haka_gate.c @@ -8,7 +8,7 @@ #include "objects/gameplay_keep/gameplay_keep.h" #include "objects/object_haka_objects/object_haka_objects.h" -#define FLAGS 0x00000000 +#define FLAGS 0 // general purpose timer #define vTimer actionVar1 @@ -97,7 +97,7 @@ void BgHakaGate_Init(Actor* thisx, GlobalContext* globalCtx) { this->actionFunc = BgHakaGate_FalseSkull; } this->vScrollTimer = Rand_ZeroOne() * 20.0f; - thisx->flags |= 0x10; + thisx->flags |= ACTOR_FLAG_4; if (Flags_GetSwitch(globalCtx, this->switchFlag)) { this->vFlameScale = 350; } @@ -124,7 +124,7 @@ void BgHakaGate_Init(Actor* thisx, GlobalContext* globalCtx) { this->actionFunc = BgHakaGate_DoNothing; thisx->world.pos.y += 80.0f; } else { - thisx->flags |= 0x10; + thisx->flags |= ACTOR_FLAG_4; Actor_SetFocus(thisx, 30.0f); this->actionFunc = BgHakaGate_GateWait; } @@ -274,7 +274,7 @@ void BgHakaGate_GateWait(BgHakaGate* this, GlobalContext* globalCtx) { void BgHakaGate_GateOpen(BgHakaGate* this, GlobalContext* globalCtx) { if (Math_StepToF(&this->dyna.actor.world.pos.y, this->dyna.actor.home.pos.y + 80.0f, 1.0f)) { Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_METALDOOR_STOP); - this->dyna.actor.flags &= ~0x10; + this->dyna.actor.flags &= ~ACTOR_FLAG_4; this->actionFunc = BgHakaGate_DoNothing; } else { func_8002F974(&this->dyna.actor, NA_SE_EV_METALDOOR_SLIDE - SFX_FLAG); @@ -292,9 +292,9 @@ void BgHakaGate_FalseSkull(BgHakaGate* this, GlobalContext* globalCtx) { Math_StepToS(&this->vFlameScale, 350, 20); } if (globalCtx->actorCtx.unk_03) { - this->dyna.actor.flags |= 0x80; + this->dyna.actor.flags |= ACTOR_FLAG_7; } else { - this->dyna.actor.flags &= ~0x80; + this->dyna.actor.flags &= ~ACTOR_FLAG_7; } } @@ -345,7 +345,7 @@ void BgHakaGate_Draw(Actor* thisx, GlobalContext* globalCtx) { BgHakaGate* this = (BgHakaGate*)thisx; MtxF currentMtxF; - if ((thisx->flags & 0x80) == 0x80) { + if (CHECK_FLAG_ALL(thisx->flags, ACTOR_FLAG_7)) { Gfx_DrawDListXlu(globalCtx, object_haka_objects_DL_00F1B0); } else { func_80093D18(globalCtx->state.gfxCtx); diff --git a/src/overlays/actors/ovl_Bg_Haka_Huta/z_bg_haka_huta.c b/src/overlays/actors/ovl_Bg_Haka_Huta/z_bg_haka_huta.c index 1e8b53880e..2f9d2d6e79 100644 --- a/src/overlays/actors/ovl_Bg_Haka_Huta/z_bg_haka_huta.c +++ b/src/overlays/actors/ovl_Bg_Haka_Huta/z_bg_haka_huta.c @@ -7,7 +7,7 @@ #include "z_bg_haka_huta.h" #include "objects/object_hakach_objects/object_hakach_objects.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 void BgHakaHuta_Init(Actor* thisx, GlobalContext* globalCtx); void BgHakaHuta_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Bg_Haka_Megane/z_bg_haka_megane.c b/src/overlays/actors/ovl_Bg_Haka_Megane/z_bg_haka_megane.c index 788419248a..d2019a724b 100644 --- a/src/overlays/actors/ovl_Bg_Haka_Megane/z_bg_haka_megane.c +++ b/src/overlays/actors/ovl_Bg_Haka_Megane/z_bg_haka_megane.c @@ -8,7 +8,7 @@ #include "objects/object_hakach_objects/object_hakach_objects.h" #include "objects/object_haka_objects/object_haka_objects.h" -#define FLAGS 0x000000B0 +#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5 | ACTOR_FLAG_7) void BgHakaMegane_Init(Actor* thisx, GlobalContext* globalCtx); void BgHakaMegane_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -109,10 +109,10 @@ void func_8087DBF0(BgHakaMegane* this, GlobalContext* globalCtx) { Actor* thisx = &this->dyna.actor; if (globalCtx->actorCtx.unk_03 != 0) { - thisx->flags |= 0x80; + thisx->flags |= ACTOR_FLAG_7; func_8003EBF8(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); } else { - thisx->flags &= ~0x80; + thisx->flags &= ~ACTOR_FLAG_7; func_8003EC50(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); } } @@ -129,7 +129,7 @@ void BgHakaMegane_Update(Actor* thisx, GlobalContext* globalCtx) { void BgHakaMegane_Draw(Actor* thisx, GlobalContext* globalCtx) { BgHakaMegane* this = (BgHakaMegane*)thisx; - if ((thisx->flags & 0x80) == 0x80) { + if (CHECK_FLAG_ALL(thisx->flags, ACTOR_FLAG_7)) { Gfx_DrawDListXlu(globalCtx, sDLists[thisx->params]); } else { Gfx_DrawDListOpa(globalCtx, sDLists[thisx->params]); diff --git a/src/overlays/actors/ovl_Bg_Haka_MeganeBG/z_bg_haka_meganebg.c b/src/overlays/actors/ovl_Bg_Haka_MeganeBG/z_bg_haka_meganebg.c index bcd1a7c147..14a3cc90a0 100644 --- a/src/overlays/actors/ovl_Bg_Haka_MeganeBG/z_bg_haka_meganebg.c +++ b/src/overlays/actors/ovl_Bg_Haka_MeganeBG/z_bg_haka_meganebg.c @@ -7,7 +7,7 @@ #include "z_bg_haka_meganebg.h" #include "objects/object_haka_objects/object_haka_objects.h" -#define FLAGS 0x00000000 +#define FLAGS 0 void BgHakaMeganeBG_Init(Actor* thisx, GlobalContext* globalCtx); void BgHakaMeganeBG_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -64,7 +64,7 @@ void BgHakaMeganeBG_Init(Actor* thisx, GlobalContext* globalCtx) { if (thisx->params == 2) { DynaPolyActor_Init(&this->dyna, DPM_UNK3); - thisx->flags |= 0x10; + thisx->flags |= ACTOR_FLAG_4; CollisionHeader_GetVirtual(&object_haka_objects_Col_005334, &colHeader); this->actionFunc = func_8087E258; } else { @@ -72,7 +72,7 @@ void BgHakaMeganeBG_Init(Actor* thisx, GlobalContext* globalCtx) { if (thisx->params == 0) { CollisionHeader_GetVirtual(&object_haka_objects_Col_009168, &colHeader); - thisx->flags |= 0x80; + thisx->flags |= ACTOR_FLAG_7; this->unk_16A = 20; this->actionFunc = func_8087DFF8; } else if (thisx->params == 3) { @@ -83,7 +83,7 @@ void BgHakaMeganeBG_Init(Actor* thisx, GlobalContext* globalCtx) { this->actionFunc = func_8087E34C; thisx->world.pos.y = thisx->home.pos.y; } else { - thisx->flags |= 0x10; + thisx->flags |= ACTOR_FLAG_4; this->actionFunc = func_8087E288; } } else { diff --git a/src/overlays/actors/ovl_Bg_Haka_Sgami/z_bg_haka_sgami.c b/src/overlays/actors/ovl_Bg_Haka_Sgami/z_bg_haka_sgami.c index f850cb98fd..3e9a97f852 100644 --- a/src/overlays/actors/ovl_Bg_Haka_Sgami/z_bg_haka_sgami.c +++ b/src/overlays/actors/ovl_Bg_Haka_Sgami/z_bg_haka_sgami.c @@ -8,7 +8,7 @@ #include "objects/object_haka_objects/object_haka_objects.h" #include "objects/object_ice_objects/object_ice_objects.h" -#define FLAGS 0x00000011 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_4) typedef enum { /* 0 */ SCYTHE_TRAP_SHADOW_TEMPLE, @@ -142,7 +142,7 @@ void BgHakaSgami_Init(Actor* thisx, GlobalContext* globalCtx) { thisx->params = (thisx->params >> 8) & 0xFF; if (this->unk_151 != 0) { - thisx->flags |= 0x80; + thisx->flags |= ACTOR_FLAG_7; } Collider_InitTris(globalCtx, colliderScythe); @@ -170,7 +170,7 @@ void BgHakaSgami_Init(Actor* thisx, GlobalContext* globalCtx) { if (thisx->params == SCYTHE_TRAP_SHADOW_TEMPLE) { this->requiredObjBankIndex = Object_GetIndex(&globalCtx->objectCtx, OBJECT_HAKA_OBJECTS); - thisx->flags &= ~1; + thisx->flags &= ~ACTOR_FLAG_0; } else { this->requiredObjBankIndex = Object_GetIndex(&globalCtx->objectCtx, OBJECT_ICE_OBJECTS); this->colliderScytheCenter.dim.radius = 30; @@ -200,7 +200,7 @@ void BgHakaSgami_SetupSpin(BgHakaSgami* this, GlobalContext* globalCtx) { this->actor.objBankIndex = this->requiredObjBankIndex; this->actor.draw = BgHakaSgami_Draw; this->timer = SCYTHE_SPIN_TIME; - this->actor.flags &= ~0x10; + this->actor.flags &= ~ACTOR_FLAG_4; this->actionFunc = BgHakaSgami_Spin; } } diff --git a/src/overlays/actors/ovl_Bg_Haka_Ship/z_bg_haka_ship.c b/src/overlays/actors/ovl_Bg_Haka_Ship/z_bg_haka_ship.c index dcb98696ad..42193b9dfc 100644 --- a/src/overlays/actors/ovl_Bg_Haka_Ship/z_bg_haka_ship.c +++ b/src/overlays/actors/ovl_Bg_Haka_Ship/z_bg_haka_ship.c @@ -7,7 +7,7 @@ #include "z_bg_haka_ship.h" #include "objects/object_haka_objects/object_haka_objects.h" -#define FLAGS 0x00000030 +#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) void BgHakaShip_Init(Actor* thisx, GlobalContext* globalCtx); void BgHakaShip_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Bg_Haka_Trap/z_bg_haka_trap.c b/src/overlays/actors/ovl_Bg_Haka_Trap/z_bg_haka_trap.c index 49bc1a7f32..5d1ec35878 100644 --- a/src/overlays/actors/ovl_Bg_Haka_Trap/z_bg_haka_trap.c +++ b/src/overlays/actors/ovl_Bg_Haka_Trap/z_bg_haka_trap.c @@ -7,7 +7,7 @@ #include "z_bg_haka_trap.h" #include "objects/object_haka_objects/object_haka_objects.h" -#define FLAGS 0x00000000 +#define FLAGS 0 void BgHakaTrap_Init(Actor* thisx, GlobalContext* globalCtx); void BgHakaTrap_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -131,7 +131,7 @@ void BgHakaTrap_Init(Actor* thisx, GlobalContext* globalCtx) { this->actionFunc = func_80880484; } else { DynaPolyActor_Init(&this->dyna, DPM_PLAYER); - thisx->flags |= 0x10; + thisx->flags |= ACTOR_FLAG_4; if (thisx->params == HAKA_TRAP_SPIKED_BOX) { CollisionHeader_GetVirtual(&object_haka_objects_Col_009CD0, &colHeader); diff --git a/src/overlays/actors/ovl_Bg_Haka_Tubo/z_bg_haka_tubo.c b/src/overlays/actors/ovl_Bg_Haka_Tubo/z_bg_haka_tubo.c index da0cfd0ffa..bfd7f198ac 100644 --- a/src/overlays/actors/ovl_Bg_Haka_Tubo/z_bg_haka_tubo.c +++ b/src/overlays/actors/ovl_Bg_Haka_Tubo/z_bg_haka_tubo.c @@ -8,7 +8,7 @@ #include "objects/gameplay_keep/gameplay_keep.h" #include "objects/object_haka_objects/object_haka_objects.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 void BgHakaTubo_Init(Actor* thisx, GlobalContext* globalCtx); void BgHakaTubo_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Bg_Haka_Water/z_bg_haka_water.c b/src/overlays/actors/ovl_Bg_Haka_Water/z_bg_haka_water.c index 62c3aa2dce..64e8761328 100644 --- a/src/overlays/actors/ovl_Bg_Haka_Water/z_bg_haka_water.c +++ b/src/overlays/actors/ovl_Bg_Haka_Water/z_bg_haka_water.c @@ -7,7 +7,7 @@ #include "z_bg_haka_water.h" #include "objects/object_hakach_objects/object_hakach_objects.h" -#define FLAGS 0x00000030 +#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) void BgHakaWater_Init(Actor* thisx, GlobalContext* globalCtx); void BgHakaWater_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Bg_Haka_Zou/z_bg_haka_zou.c b/src/overlays/actors/ovl_Bg_Haka_Zou/z_bg_haka_zou.c index 4cbcc4f1fa..d0300d8358 100644 --- a/src/overlays/actors/ovl_Bg_Haka_Zou/z_bg_haka_zou.c +++ b/src/overlays/actors/ovl_Bg_Haka_Zou/z_bg_haka_zou.c @@ -8,7 +8,7 @@ #include "objects/object_hakach_objects/object_hakach_objects.h" #include "objects/object_haka_objects/object_haka_objects.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 typedef enum { /* 0x0 */ STA_GIANT_BIRD_STATUE, diff --git a/src/overlays/actors/ovl_Bg_Heavy_Block/z_bg_heavy_block.c b/src/overlays/actors/ovl_Bg_Heavy_Block/z_bg_heavy_block.c index cfcbe5adab..e9c5b565db 100644 --- a/src/overlays/actors/ovl_Bg_Heavy_Block/z_bg_heavy_block.c +++ b/src/overlays/actors/ovl_Bg_Heavy_Block/z_bg_heavy_block.c @@ -8,7 +8,7 @@ #include "objects/object_heavy_object/object_heavy_object.h" #include "vt.h" -#define FLAGS 0x00000000 +#define FLAGS 0 #define PIECE_FLAG_HIT_FLOOR (1 << 0) @@ -75,7 +75,7 @@ void BgHeavyBlock_InitPiece(BgHeavyBlock* this, f32 scale) { void BgHeavyBlock_SetupDynapoly(BgHeavyBlock* this, GlobalContext* globalCtx) { s32 pad[2]; CollisionHeader* colHeader = NULL; - this->dyna.actor.flags |= 0x20030; + this->dyna.actor.flags |= ACTOR_FLAG_4 | ACTOR_FLAG_5 | ACTOR_FLAG_17; DynaPolyActor_Init(&this->dyna, DPM_UNK); CollisionHeader_GetVirtual(&gHeavyBlockCol, &colHeader); this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader); @@ -99,7 +99,7 @@ void BgHeavyBlock_Init(Actor* thisx, GlobalContext* globalCtx) { this->actionFunc = BgHeavyBlock_MovePiece; BgHeavyBlock_InitPiece(this, 1.0f); this->timer = 120; - thisx->flags |= 0x10; + thisx->flags |= ACTOR_FLAG_4; this->unk_164.y = -50.0f; break; case HEAVYBLOCK_SMALL_PIECE: @@ -107,7 +107,7 @@ void BgHeavyBlock_Init(Actor* thisx, GlobalContext* globalCtx) { this->actionFunc = BgHeavyBlock_MovePiece; BgHeavyBlock_InitPiece(this, 2.0f); this->timer = 120; - thisx->flags |= 0x10; + thisx->flags |= ACTOR_FLAG_4; this->unk_164.y = -20.0f; break; case HEAVYBLOCK_BREAKABLE: @@ -469,7 +469,7 @@ void BgHeavyBlock_Land(BgHeavyBlock* this, GlobalContext* globalCtx) { break; } } else { - this->dyna.actor.flags &= ~0x30; + this->dyna.actor.flags &= ~(ACTOR_FLAG_4 | ACTOR_FLAG_5); this->actionFunc = BgHeavyBlock_DoNothing; } } diff --git a/src/overlays/actors/ovl_Bg_Hidan_Curtain/z_bg_hidan_curtain.c b/src/overlays/actors/ovl_Bg_Hidan_Curtain/z_bg_hidan_curtain.c index 2b889315f6..d56753e9b3 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Curtain/z_bg_hidan_curtain.c +++ b/src/overlays/actors/ovl_Bg_Hidan_Curtain/z_bg_hidan_curtain.c @@ -7,7 +7,7 @@ #include "z_bg_hidan_curtain.h" #include "objects/gameplay_keep/gameplay_keep.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 void BgHidanCurtain_Init(Actor* thisx, GlobalContext* globalCtx); void BgHidanCurtain_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Bg_Hidan_Dalm/z_bg_hidan_dalm.c b/src/overlays/actors/ovl_Bg_Hidan_Dalm/z_bg_hidan_dalm.c index 4b8c8f36f5..0796133df4 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Dalm/z_bg_hidan_dalm.c +++ b/src/overlays/actors/ovl_Bg_Hidan_Dalm/z_bg_hidan_dalm.c @@ -7,7 +7,7 @@ #include "z_bg_hidan_dalm.h" #include "objects/object_hidan_objects/object_hidan_objects.h" -#define FLAGS 0x00000000 +#define FLAGS 0 void BgHidanDalm_Init(Actor* thisx, GlobalContext* globalCtx); void BgHidanDalm_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -138,7 +138,7 @@ void BgHidanDalm_Wait(BgHidanDalm* this, GlobalContext* globalCtx) { this->dyna.actor.world.pos.z += 32.5f * Math_CosS(this->dyna.actor.world.rot.y); func_8002DF54(globalCtx, &this->dyna.actor, 8); - this->dyna.actor.flags |= 0x10; + this->dyna.actor.flags |= ACTOR_FLAG_4; this->actionFunc = BgHidanDalm_Shrink; this->dyna.actor.bgCheckFlags &= ~2; this->dyna.actor.bgCheckFlags &= ~8; diff --git a/src/overlays/actors/ovl_Bg_Hidan_Firewall/z_bg_hidan_firewall.c b/src/overlays/actors/ovl_Bg_Hidan_Firewall/z_bg_hidan_firewall.c index ebc51e5e8b..d95640e7b8 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Firewall/z_bg_hidan_firewall.c +++ b/src/overlays/actors/ovl_Bg_Hidan_Firewall/z_bg_hidan_firewall.c @@ -7,7 +7,7 @@ #include "z_bg_hidan_firewall.h" #include "objects/object_hidan_objects/object_hidan_objects.h" -#define FLAGS 0x00000000 +#define FLAGS 0 void BgHidanFirewall_Init(Actor* thisx, GlobalContext* globalCtx); void BgHidanFirewall_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Bg_Hidan_Fslift/z_bg_hidan_fslift.c b/src/overlays/actors/ovl_Bg_Hidan_Fslift/z_bg_hidan_fslift.c index 3660fdc1c2..f3894c87fd 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Fslift/z_bg_hidan_fslift.c +++ b/src/overlays/actors/ovl_Bg_Hidan_Fslift/z_bg_hidan_fslift.c @@ -7,7 +7,7 @@ #include "z_bg_hidan_fslift.h" #include "objects/object_hidan_objects/object_hidan_objects.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 void BgHidanFslift_Init(Actor* thisx, GlobalContext* globalCtx); void BgHidanFslift_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Bg_Hidan_Fwbig/z_bg_hidan_fwbig.c b/src/overlays/actors/ovl_Bg_Hidan_Fwbig/z_bg_hidan_fwbig.c index e5343e2600..e111b8b2eb 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Fwbig/z_bg_hidan_fwbig.c +++ b/src/overlays/actors/ovl_Bg_Hidan_Fwbig/z_bg_hidan_fwbig.c @@ -9,7 +9,7 @@ #include "objects/gameplay_keep/gameplay_keep.h" #include "objects/object_hidan_objects/object_hidan_objects.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 typedef enum { /* 0 */ FWBIG_MOVE, @@ -94,7 +94,7 @@ void BgHidanFwbig_Init(Actor* thisx, GlobalContext* globalCtx2) { BgHidanFwbig_UpdatePosition(this); Actor_SetScale(&this->actor, 0.15f); this->collider.dim.height = 230; - this->actor.flags |= 0x10; + this->actor.flags |= ACTOR_FLAG_4; this->moveState = FWBIG_MOVE; this->actionFunc = BgHidanFwbig_WaitForPlayer; this->actor.world.pos.y = this->actor.home.pos.y - (2400.0f * this->actor.scale.y); diff --git a/src/overlays/actors/ovl_Bg_Hidan_Hamstep/z_bg_hidan_hamstep.c b/src/overlays/actors/ovl_Bg_Hidan_Hamstep/z_bg_hidan_hamstep.c index 1f926e617d..9d3bfe5efa 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Hamstep/z_bg_hidan_hamstep.c +++ b/src/overlays/actors/ovl_Bg_Hidan_Hamstep/z_bg_hidan_hamstep.c @@ -7,7 +7,7 @@ #include "z_bg_hidan_hamstep.h" #include "objects/object_hidan_objects/object_hidan_objects.h" -#define FLAGS 0x00000000 +#define FLAGS 0 void BgHidanHamstep_Init(Actor* thisx, GlobalContext* globalCtx); void BgHidanHamstep_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Bg_Hidan_Hrock/z_bg_hidan_hrock.c b/src/overlays/actors/ovl_Bg_Hidan_Hrock/z_bg_hidan_hrock.c index cd5e091c1e..cf17e98a56 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Hrock/z_bg_hidan_hrock.c +++ b/src/overlays/actors/ovl_Bg_Hidan_Hrock/z_bg_hidan_hrock.c @@ -7,7 +7,7 @@ #include "z_bg_hidan_hrock.h" #include "objects/object_hidan_objects/object_hidan_objects.h" -#define FLAGS 0x00000000 +#define FLAGS 0 void BgHidanHrock_Init(Actor* thisx, GlobalContext* globalCtx); void BgHidanHrock_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -125,7 +125,7 @@ void BgHidanHrock_Init(Actor* thisx, GlobalContext* globalCtx) { } } else { if (thisx->params == 0) { - thisx->flags |= 0x30; + thisx->flags |= ACTOR_FLAG_4 | ACTOR_FLAG_5; thisx->uncullZoneForward = 3000.0f; } this->actionFunc = func_808896B8; @@ -184,7 +184,7 @@ void func_8088960C(BgHidanHrock* this, GlobalContext* globalCtx) { this->dyna.actor.velocity.y++; if (Math_StepToF(&this->dyna.actor.world.pos.y, this->dyna.actor.home.pos.y, this->dyna.actor.velocity.y)) { - this->dyna.actor.flags &= ~0x30; + this->dyna.actor.flags &= ~(ACTOR_FLAG_4 | ACTOR_FLAG_5); Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_BLOCK_BOUND); if (this->dyna.actor.params == 0) { @@ -203,7 +203,7 @@ void func_808896B8(BgHidanHrock* this, GlobalContext* globalCtx) { if (this->collider.base.acFlags & 2) { this->collider.base.acFlags &= ~2; this->actionFunc = func_808894B0; - this->dyna.actor.flags |= 0x10; + this->dyna.actor.flags |= ACTOR_FLAG_4; if (this->dyna.actor.params == 0) { this->dyna.actor.room = -1; diff --git a/src/overlays/actors/ovl_Bg_Hidan_Kousi/z_bg_hidan_kousi.c b/src/overlays/actors/ovl_Bg_Hidan_Kousi/z_bg_hidan_kousi.c index 7c6737c205..71c5b8f1d8 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Kousi/z_bg_hidan_kousi.c +++ b/src/overlays/actors/ovl_Bg_Hidan_Kousi/z_bg_hidan_kousi.c @@ -7,7 +7,7 @@ #include "z_bg_hidan_kousi.h" #include "objects/object_hidan_objects/object_hidan_objects.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 void BgHidanKousi_Init(Actor* thisx, GlobalContext* globalCtx); void BgHidanKousi_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Bg_Hidan_Kowarerukabe/z_bg_hidan_kowarerukabe.c b/src/overlays/actors/ovl_Bg_Hidan_Kowarerukabe/z_bg_hidan_kowarerukabe.c index 503d9b8a99..8daeee396d 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Kowarerukabe/z_bg_hidan_kowarerukabe.c +++ b/src/overlays/actors/ovl_Bg_Hidan_Kowarerukabe/z_bg_hidan_kowarerukabe.c @@ -9,7 +9,7 @@ #include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h" #include "objects/object_hidan_objects/object_hidan_objects.h" -#define FLAGS 0x00000000 +#define FLAGS 0 typedef enum { /* 0 */ CRACKED_STONE_FLOOR, diff --git a/src/overlays/actors/ovl_Bg_Hidan_Rock/z_bg_hidan_rock.c b/src/overlays/actors/ovl_Bg_Hidan_Rock/z_bg_hidan_rock.c index b43ec1c96e..c5d9d15e99 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Rock/z_bg_hidan_rock.c +++ b/src/overlays/actors/ovl_Bg_Hidan_Rock/z_bg_hidan_rock.c @@ -7,7 +7,7 @@ #include "z_bg_hidan_rock.h" #include "objects/object_hidan_objects/object_hidan_objects.h" -#define FLAGS 0x00000000 +#define FLAGS 0 void BgHidanRock_Init(Actor* thisx, GlobalContext* globalCtx); void BgHidanRock_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -91,7 +91,7 @@ void BgHidanRock_Init(Actor* thisx, GlobalContext* globalCtx) { } else { this->actionFunc = func_8088B268; } - thisx->flags |= 0x30; + thisx->flags |= ACTOR_FLAG_4 | ACTOR_FLAG_5; CollisionHeader_GetVirtual(&gFireTempleStoneBlock1Col, &colHeader); } else { CollisionHeader_GetVirtual(&gFireTempleStoneBlock2Col, &colHeader); @@ -114,7 +114,7 @@ void BgHidanRock_Destroy(Actor* thisx, GlobalContext* globalCtx) { } void func_8088B24C(BgHidanRock* this) { - this->dyna.actor.flags |= 0x30; + this->dyna.actor.flags |= ACTOR_FLAG_4 | ACTOR_FLAG_5; this->actionFunc = func_8088B990; } @@ -247,7 +247,7 @@ void func_8088B79C(BgHidanRock* this, GlobalContext* globalCtx) { } else { this->dyna.actor.world.pos.y = this->dyna.actor.home.pos.y - 15.0f; this->actionFunc = func_8088B90C; - this->dyna.actor.flags &= ~0x30; + this->dyna.actor.flags &= ~(ACTOR_FLAG_4 | ACTOR_FLAG_5); } Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_BLOCK_BOUND); diff --git a/src/overlays/actors/ovl_Bg_Hidan_Rsekizou/z_bg_hidan_rsekizou.c b/src/overlays/actors/ovl_Bg_Hidan_Rsekizou/z_bg_hidan_rsekizou.c index 354584d097..e7afaa7009 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Rsekizou/z_bg_hidan_rsekizou.c +++ b/src/overlays/actors/ovl_Bg_Hidan_Rsekizou/z_bg_hidan_rsekizou.c @@ -7,7 +7,7 @@ #include "z_bg_hidan_rsekizou.h" #include "objects/object_hidan_objects/object_hidan_objects.h" -#define FLAGS 0x00000000 +#define FLAGS 0 void BgHidanRsekizou_Init(Actor* thisx, GlobalContext* globalCtx); void BgHidanRsekizou_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Bg_Hidan_Sekizou/z_bg_hidan_sekizou.c b/src/overlays/actors/ovl_Bg_Hidan_Sekizou/z_bg_hidan_sekizou.c index b4a988eea4..5218065e39 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Sekizou/z_bg_hidan_sekizou.c +++ b/src/overlays/actors/ovl_Bg_Hidan_Sekizou/z_bg_hidan_sekizou.c @@ -7,7 +7,7 @@ #include "z_bg_hidan_sekizou.h" #include "objects/object_hidan_objects/object_hidan_objects.h" -#define FLAGS 0x00000000 +#define FLAGS 0 void BgHidanSekizou_Init(Actor* thisx, GlobalContext* globalCtx); void BgHidanSekizou_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Bg_Hidan_Sima/z_bg_hidan_sima.c b/src/overlays/actors/ovl_Bg_Hidan_Sima/z_bg_hidan_sima.c index 7acf5863d5..4154c1d82d 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Sima/z_bg_hidan_sima.c +++ b/src/overlays/actors/ovl_Bg_Hidan_Sima/z_bg_hidan_sima.c @@ -7,7 +7,7 @@ #include "z_bg_hidan_sima.h" #include "objects/object_hidan_objects/object_hidan_objects.h" -#define FLAGS 0x00000000 +#define FLAGS 0 void BgHidanSima_Init(Actor* thisx, GlobalContext* globalCtx); void BgHidanSima_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Bg_Hidan_Syoku/z_bg_hidan_syoku.c b/src/overlays/actors/ovl_Bg_Hidan_Syoku/z_bg_hidan_syoku.c index dffe32a441..ce1066696c 100644 --- a/src/overlays/actors/ovl_Bg_Hidan_Syoku/z_bg_hidan_syoku.c +++ b/src/overlays/actors/ovl_Bg_Hidan_Syoku/z_bg_hidan_syoku.c @@ -7,7 +7,7 @@ #include "z_bg_hidan_syoku.h" #include "objects/object_hidan_objects/object_hidan_objects.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 void BgHidanSyoku_Init(Actor* thisx, GlobalContext* globalCtx); void BgHidanSyoku_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Bg_Ice_Objects/z_bg_ice_objects.c b/src/overlays/actors/ovl_Bg_Ice_Objects/z_bg_ice_objects.c index ae05868a22..5d40632021 100644 --- a/src/overlays/actors/ovl_Bg_Ice_Objects/z_bg_ice_objects.c +++ b/src/overlays/actors/ovl_Bg_Ice_Objects/z_bg_ice_objects.c @@ -7,7 +7,7 @@ #include "z_bg_ice_objects.h" #include "objects/object_ice_objects/object_ice_objects.h" -#define FLAGS 0x00000000 +#define FLAGS 0 void BgIceObjects_Init(Actor* thisx, GlobalContext* globalCtx); void BgIceObjects_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -141,7 +141,7 @@ void BgIceObjects_Idle(BgIceObjects* this, GlobalContext* globalCtx) { if ((this->dyna.unk_150 > 0.0f) && !Player_InCsMode(globalCtx)) { BgIceObjects_SetNextTarget(this, globalCtx); if (Actor_WorldDistXZToPoint(thisx, &this->targetPos) > 1.0f) { - thisx->flags |= 0x10; + thisx->flags |= ACTOR_FLAG_4; func_8002DF54(globalCtx, thisx, 8); thisx->params = 1; this->actionFunc = BgIceObjects_Slide; @@ -169,7 +169,7 @@ void BgIceObjects_Slide(BgIceObjects* this, GlobalContext* globalCtx) { this->targetPos.x = thisx->world.pos.x; this->targetPos.z = thisx->world.pos.z; if (thisx->velocity.y <= 0.0f) { - thisx->flags &= ~0x10; + thisx->flags &= ~ACTOR_FLAG_4; } thisx->params = 0; func_8002DF54(globalCtx, thisx, 7); @@ -206,7 +206,7 @@ void BgIceObjects_Reset(BgIceObjects* this, GlobalContext* globalCtx) { this->dyna.unk_150 = 0.0f; } if (Math_StepToF(&thisx->world.pos.y, thisx->home.pos.y, 1.0f)) { - thisx->flags &= ~0x10; + thisx->flags &= ~ACTOR_FLAG_4; Math_Vec3f_Copy(&this->targetPos, &thisx->home.pos); this->actionFunc = BgIceObjects_Idle; thisx->speedXZ = 0.0f; diff --git a/src/overlays/actors/ovl_Bg_Ice_Shelter/z_bg_ice_shelter.c b/src/overlays/actors/ovl_Bg_Ice_Shelter/z_bg_ice_shelter.c index 1581174bee..1f30a75b36 100644 --- a/src/overlays/actors/ovl_Bg_Ice_Shelter/z_bg_ice_shelter.c +++ b/src/overlays/actors/ovl_Bg_Ice_Shelter/z_bg_ice_shelter.c @@ -1,7 +1,7 @@ #include "z_bg_ice_shelter.h" #include "objects/object_ice_objects/object_ice_objects.h" -#define FLAGS 0x00000000 +#define FLAGS 0 void BgIceShelter_Init(Actor* thisx, GlobalContext* globalCtx); void BgIceShelter_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Bg_Ice_Shutter/z_bg_ice_shutter.c b/src/overlays/actors/ovl_Bg_Ice_Shutter/z_bg_ice_shutter.c index 4da0ca4a6c..0ff881af17 100644 --- a/src/overlays/actors/ovl_Bg_Ice_Shutter/z_bg_ice_shutter.c +++ b/src/overlays/actors/ovl_Bg_Ice_Shutter/z_bg_ice_shutter.c @@ -7,7 +7,7 @@ #include "z_bg_ice_shutter.h" #include "objects/object_ice_objects/object_ice_objects.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 void BgIceShutter_Init(Actor* thisx, GlobalContext* globalCtx); void BgIceShutter_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Bg_Ice_Turara/z_bg_ice_turara.c b/src/overlays/actors/ovl_Bg_Ice_Turara/z_bg_ice_turara.c index 26452d13cc..355649d3ef 100644 --- a/src/overlays/actors/ovl_Bg_Ice_Turara/z_bg_ice_turara.c +++ b/src/overlays/actors/ovl_Bg_Ice_Turara/z_bg_ice_turara.c @@ -7,7 +7,7 @@ #include "z_bg_ice_turara.h" #include "objects/object_ice_objects/object_ice_objects.h" -#define FLAGS 0x00000000 +#define FLAGS 0 void BgIceTurara_Init(Actor* thisx, GlobalContext* globalCtx); void BgIceTurara_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Bg_Ingate/z_bg_ingate.c b/src/overlays/actors/ovl_Bg_Ingate/z_bg_ingate.c index 18c57c8f6c..2766a23279 100644 --- a/src/overlays/actors/ovl_Bg_Ingate/z_bg_ingate.c +++ b/src/overlays/actors/ovl_Bg_Ingate/z_bg_ingate.c @@ -7,7 +7,7 @@ #include "z_bg_ingate.h" #include "objects/object_ingate/object_ingate.h" -#define FLAGS 0x00000000 +#define FLAGS 0 void BgInGate_Init(Actor* thisx, GlobalContext* globalCtx); void BgInGate_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Bg_Jya_1flift/z_bg_jya_1flift.c b/src/overlays/actors/ovl_Bg_Jya_1flift/z_bg_jya_1flift.c index 1b331c2284..5e291d9632 100644 --- a/src/overlays/actors/ovl_Bg_Jya_1flift/z_bg_jya_1flift.c +++ b/src/overlays/actors/ovl_Bg_Jya_1flift/z_bg_jya_1flift.c @@ -7,7 +7,7 @@ #include "z_bg_jya_1flift.h" #include "objects/object_jya_obj/object_jya_obj.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 void BgJya1flift_Init(Actor* thisx, GlobalContext* globalCtx); void BgJya1flift_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Bg_Jya_Amishutter/z_bg_jya_amishutter.c b/src/overlays/actors/ovl_Bg_Jya_Amishutter/z_bg_jya_amishutter.c index ca559dc140..7577986ea3 100644 --- a/src/overlays/actors/ovl_Bg_Jya_Amishutter/z_bg_jya_amishutter.c +++ b/src/overlays/actors/ovl_Bg_Jya_Amishutter/z_bg_jya_amishutter.c @@ -7,7 +7,7 @@ #include "z_bg_jya_amishutter.h" #include "objects/object_jya_obj/object_jya_obj.h" -#define FLAGS 0x00000000 +#define FLAGS 0 void BgJyaAmishutter_Init(Actor* thisx, GlobalContext* globalCtx); void BgJyaAmishutter_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Bg_Jya_Bigmirror/z_bg_jya_bigmirror.c b/src/overlays/actors/ovl_Bg_Jya_Bigmirror/z_bg_jya_bigmirror.c index c41cfaefc3..11c69c08dd 100644 --- a/src/overlays/actors/ovl_Bg_Jya_Bigmirror/z_bg_jya_bigmirror.c +++ b/src/overlays/actors/ovl_Bg_Jya_Bigmirror/z_bg_jya_bigmirror.c @@ -7,7 +7,7 @@ #include "z_bg_jya_bigmirror.h" #include "objects/object_jya_obj/object_jya_obj.h" -#define FLAGS 0x00000030 +#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) void BgJyaBigmirror_Init(Actor* thisx, GlobalContext* globalCtx); void BgJyaBigmirror_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Bg_Jya_Block/z_bg_jya_block.c b/src/overlays/actors/ovl_Bg_Jya_Block/z_bg_jya_block.c index fbf9f32a46..e3625ad0de 100644 --- a/src/overlays/actors/ovl_Bg_Jya_Block/z_bg_jya_block.c +++ b/src/overlays/actors/ovl_Bg_Jya_Block/z_bg_jya_block.c @@ -7,7 +7,7 @@ #include "z_bg_jya_block.h" #include "objects/gameplay_dangeon_keep/gameplay_dangeon_keep.h" -#define FLAGS 0x00000000 +#define FLAGS 0 void BgJyaBlock_Init(Actor* thisx, GlobalContext* globalCtx); void BgJyaBlock_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Bg_Jya_Bombchuiwa/z_bg_jya_bombchuiwa.c b/src/overlays/actors/ovl_Bg_Jya_Bombchuiwa/z_bg_jya_bombchuiwa.c index 5066dc6d08..2ce66e6aa0 100644 --- a/src/overlays/actors/ovl_Bg_Jya_Bombchuiwa/z_bg_jya_bombchuiwa.c +++ b/src/overlays/actors/ovl_Bg_Jya_Bombchuiwa/z_bg_jya_bombchuiwa.c @@ -1,7 +1,7 @@ #include "z_bg_jya_bombchuiwa.h" #include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h" #include "objects/object_jya_obj/object_jya_obj.h" -#define FLAGS 0x00000001 +#define FLAGS ACTOR_FLAG_0 void BgJyaBombchuiwa_Init(Actor* thisx, GlobalContext* globalCtx); void BgJyaBombchuiwa_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -162,7 +162,7 @@ void BgJyaBombchuiwa_CleanUpAfterExplosion(BgJyaBombchuiwa* this, GlobalContext* BgJyaBombchuiwa_SetDrawFlags(this, 4); this->lightRayIntensity = 0.3f; this->timer = 0; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; } void func_808949B8(BgJyaBombchuiwa* this, GlobalContext* globalCtx) { diff --git a/src/overlays/actors/ovl_Bg_Jya_Bombiwa/z_bg_jya_bombiwa.c b/src/overlays/actors/ovl_Bg_Jya_Bombiwa/z_bg_jya_bombiwa.c index 610c33a1dd..a126793e4e 100644 --- a/src/overlays/actors/ovl_Bg_Jya_Bombiwa/z_bg_jya_bombiwa.c +++ b/src/overlays/actors/ovl_Bg_Jya_Bombiwa/z_bg_jya_bombiwa.c @@ -9,7 +9,7 @@ #include "objects/object_jya_obj/object_jya_obj.h" #include "vt.h" -#define FLAGS 0x00000000 +#define FLAGS 0 void BgJyaBombiwa_Init(Actor* thisx, GlobalContext* globalCtx); void BgJyaBombiwa_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Bg_Jya_Cobra/z_bg_jya_cobra.c b/src/overlays/actors/ovl_Bg_Jya_Cobra/z_bg_jya_cobra.c index 756970f83f..711c98ad4b 100644 --- a/src/overlays/actors/ovl_Bg_Jya_Cobra/z_bg_jya_cobra.c +++ b/src/overlays/actors/ovl_Bg_Jya_Cobra/z_bg_jya_cobra.c @@ -4,7 +4,7 @@ #include "objects/object_jya_obj/object_jya_obj.h" #include "vt.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 void BgJyaCobra_Init(Actor* thisx, GlobalContext* globalCtx); void BgJyaCobra_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Bg_Jya_Goroiwa/z_bg_jya_goroiwa.c b/src/overlays/actors/ovl_Bg_Jya_Goroiwa/z_bg_jya_goroiwa.c index 8373ae06d4..543cb56121 100644 --- a/src/overlays/actors/ovl_Bg_Jya_Goroiwa/z_bg_jya_goroiwa.c +++ b/src/overlays/actors/ovl_Bg_Jya_Goroiwa/z_bg_jya_goroiwa.c @@ -8,7 +8,7 @@ #include "z_bg_jya_goroiwa.h" #include "objects/object_goroiwa/object_goroiwa.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 void BgJyaGoroiwa_Init(Actor* thisx, GlobalContext* globalCtx); void BgJyaGoroiwa_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Bg_Jya_Haheniron/z_bg_jya_haheniron.c b/src/overlays/actors/ovl_Bg_Jya_Haheniron/z_bg_jya_haheniron.c index 6ba786550c..270f31959b 100644 --- a/src/overlays/actors/ovl_Bg_Jya_Haheniron/z_bg_jya_haheniron.c +++ b/src/overlays/actors/ovl_Bg_Jya_Haheniron/z_bg_jya_haheniron.c @@ -8,7 +8,7 @@ #include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h" #include "objects/object_jya_iron/object_jya_iron.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 void BgJyaHaheniron_Init(Actor* thisx, GlobalContext* globalCtx); void BgJyaHaheniron_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Bg_Jya_Ironobj/z_bg_jya_ironobj.c b/src/overlays/actors/ovl_Bg_Jya_Ironobj/z_bg_jya_ironobj.c index 37f513702b..879766bc8c 100644 --- a/src/overlays/actors/ovl_Bg_Jya_Ironobj/z_bg_jya_ironobj.c +++ b/src/overlays/actors/ovl_Bg_Jya_Ironobj/z_bg_jya_ironobj.c @@ -8,7 +8,7 @@ #include "objects/object_jya_iron/object_jya_iron.h" #include "overlays/actors/ovl_En_Ik/z_en_ik.h" -#define FLAGS 0x00000000 +#define FLAGS 0 typedef void (*BgJyaIronobjIkFunc)(BgJyaIronobj*, GlobalContext*, EnIk*); diff --git a/src/overlays/actors/ovl_Bg_Jya_Kanaami/z_bg_jya_kanaami.c b/src/overlays/actors/ovl_Bg_Jya_Kanaami/z_bg_jya_kanaami.c index 7d839791b7..9ff4d099ea 100644 --- a/src/overlays/actors/ovl_Bg_Jya_Kanaami/z_bg_jya_kanaami.c +++ b/src/overlays/actors/ovl_Bg_Jya_Kanaami/z_bg_jya_kanaami.c @@ -7,7 +7,7 @@ #include "z_bg_jya_kanaami.h" #include "objects/object_jya_obj/object_jya_obj.h" -#define FLAGS 0x00000000 +#define FLAGS 0 void BgJyaKanaami_Init(Actor* thisx, GlobalContext* globalCtx); void BgJyaKanaami_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Bg_Jya_Lift/z_bg_jya_lift.c b/src/overlays/actors/ovl_Bg_Jya_Lift/z_bg_jya_lift.c index 261e44faf5..a6efef9644 100644 --- a/src/overlays/actors/ovl_Bg_Jya_Lift/z_bg_jya_lift.c +++ b/src/overlays/actors/ovl_Bg_Jya_Lift/z_bg_jya_lift.c @@ -7,7 +7,7 @@ #include "z_bg_jya_lift.h" #include "objects/object_jya_obj/object_jya_obj.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 void BgJyaLift_Init(Actor* thisx, GlobalContext* globalCtx); void BgJyaLift_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Bg_Jya_Megami/z_bg_jya_megami.c b/src/overlays/actors/ovl_Bg_Jya_Megami/z_bg_jya_megami.c index bfdac72002..0e584155d5 100644 --- a/src/overlays/actors/ovl_Bg_Jya_Megami/z_bg_jya_megami.c +++ b/src/overlays/actors/ovl_Bg_Jya_Megami/z_bg_jya_megami.c @@ -2,7 +2,7 @@ #include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h" #include "objects/object_jya_obj/object_jya_obj.h" -#define FLAGS 0x00000000 +#define FLAGS 0 void BgJyaMegami_Init(Actor* thisx, GlobalContext* globalCtx); void BgJyaMegami_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Bg_Jya_Zurerukabe/z_bg_jya_zurerukabe.c b/src/overlays/actors/ovl_Bg_Jya_Zurerukabe/z_bg_jya_zurerukabe.c index a7b20a46b3..4b75c560f1 100644 --- a/src/overlays/actors/ovl_Bg_Jya_Zurerukabe/z_bg_jya_zurerukabe.c +++ b/src/overlays/actors/ovl_Bg_Jya_Zurerukabe/z_bg_jya_zurerukabe.c @@ -8,7 +8,7 @@ #include "objects/object_jya_obj/object_jya_obj.h" #include "vt.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 void BgJyaZurerukabe_Init(Actor* thisx, GlobalContext* globalCtx); void BgJyaZurerukabe_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Bg_Menkuri_Eye/z_bg_menkuri_eye.c b/src/overlays/actors/ovl_Bg_Menkuri_Eye/z_bg_menkuri_eye.c index 916fa976c3..8a155f0047 100644 --- a/src/overlays/actors/ovl_Bg_Menkuri_Eye/z_bg_menkuri_eye.c +++ b/src/overlays/actors/ovl_Bg_Menkuri_Eye/z_bg_menkuri_eye.c @@ -7,7 +7,7 @@ #include "z_bg_menkuri_eye.h" #include "objects/object_menkuri_objects/object_menkuri_objects.h" -#define FLAGS 0x00000020 +#define FLAGS ACTOR_FLAG_5 void BgMenkuriEye_Init(Actor* thisx, GlobalContext* globalCtx); void BgMenkuriEye_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Bg_Menkuri_Kaiten/z_bg_menkuri_kaiten.c b/src/overlays/actors/ovl_Bg_Menkuri_Kaiten/z_bg_menkuri_kaiten.c index 5b70fdd60b..711e17012f 100644 --- a/src/overlays/actors/ovl_Bg_Menkuri_Kaiten/z_bg_menkuri_kaiten.c +++ b/src/overlays/actors/ovl_Bg_Menkuri_Kaiten/z_bg_menkuri_kaiten.c @@ -7,7 +7,7 @@ #include "z_bg_menkuri_kaiten.h" #include "objects/object_menkuri_objects/object_menkuri_objects.h" -#define FLAGS 0x00000030 +#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) void BgMenkuriKaiten_Init(Actor* thisx, GlobalContext* globalCtx); void BgMenkuriKaiten_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Bg_Menkuri_Nisekabe/z_bg_menkuri_nisekabe.c b/src/overlays/actors/ovl_Bg_Menkuri_Nisekabe/z_bg_menkuri_nisekabe.c index c5939f6f5e..4eced10bcd 100644 --- a/src/overlays/actors/ovl_Bg_Menkuri_Nisekabe/z_bg_menkuri_nisekabe.c +++ b/src/overlays/actors/ovl_Bg_Menkuri_Nisekabe/z_bg_menkuri_nisekabe.c @@ -7,7 +7,7 @@ #include "z_bg_menkuri_nisekabe.h" #include "objects/object_menkuri_objects/object_menkuri_objects.h" -#define FLAGS 0x00000000 +#define FLAGS 0 void BgMenkuriNisekabe_Init(Actor* thisx, GlobalContext* globalCtx); void BgMenkuriNisekabe_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -41,9 +41,9 @@ void BgMenkuriNisekabe_Update(Actor* thisx, GlobalContext* globalCtx) { BgMenkuriNisekabe* this = (BgMenkuriNisekabe*)thisx; if (globalCtx->actorCtx.unk_03 != 0) { - this->actor.flags |= 0x80; + this->actor.flags |= ACTOR_FLAG_7; } else { - this->actor.flags &= ~0x80; + this->actor.flags &= ~ACTOR_FLAG_7; } } @@ -51,7 +51,7 @@ void BgMenkuriNisekabe_Draw(Actor* thisx, GlobalContext* globalCtx) { BgMenkuriNisekabe* this = (BgMenkuriNisekabe*)thisx; u32 index = this->actor.params & 0xFF; - if ((this->actor.flags & 0x80) == 0x80) { + if (CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_7)) { Gfx_DrawDListXlu(globalCtx, sDLists[index]); } else { Gfx_DrawDListOpa(globalCtx, sDLists[index]); diff --git a/src/overlays/actors/ovl_Bg_Mizu_Bwall/z_bg_mizu_bwall.c b/src/overlays/actors/ovl_Bg_Mizu_Bwall/z_bg_mizu_bwall.c index a9e36d813f..ce9196905a 100644 --- a/src/overlays/actors/ovl_Bg_Mizu_Bwall/z_bg_mizu_bwall.c +++ b/src/overlays/actors/ovl_Bg_Mizu_Bwall/z_bg_mizu_bwall.c @@ -8,7 +8,7 @@ #include "overlays/actors/ovl_Bg_Mizu_Water/z_bg_mizu_water.h" #include "objects/object_mizu_objects/object_mizu_objects.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 void BgMizuBwall_Init(Actor* thisx, GlobalContext* globalCtx); void BgMizuBwall_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Bg_Mizu_Movebg/z_bg_mizu_movebg.c b/src/overlays/actors/ovl_Bg_Mizu_Movebg/z_bg_mizu_movebg.c index cbcfddc097..058b55c4bf 100644 --- a/src/overlays/actors/ovl_Bg_Mizu_Movebg/z_bg_mizu_movebg.c +++ b/src/overlays/actors/ovl_Bg_Mizu_Movebg/z_bg_mizu_movebg.c @@ -8,7 +8,7 @@ #include "overlays/actors/ovl_Bg_Mizu_Water/z_bg_mizu_water.h" #include "objects/object_mizu_objects/object_mizu_objects.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 #define MOVEBG_TYPE(params) (((u16)(params) >> 0xC) & 0xF) #define MOVEBG_FLAGS(params) ((u16)(params)&0x3F) @@ -310,7 +310,7 @@ void func_8089E318(BgMizuMovebg* this, GlobalContext* globalCtx) { this->dyna.actor.child->world.pos.x = this->dyna.actor.world.pos.x + sp28.x; this->dyna.actor.child->world.pos.y = this->dyna.actor.world.pos.y + sp28.y; this->dyna.actor.child->world.pos.z = this->dyna.actor.world.pos.z + sp28.z; - this->dyna.actor.child->flags &= ~1; + this->dyna.actor.child->flags &= ~ACTOR_FLAG_0; } break; } diff --git a/src/overlays/actors/ovl_Bg_Mizu_Shutter/z_bg_mizu_shutter.c b/src/overlays/actors/ovl_Bg_Mizu_Shutter/z_bg_mizu_shutter.c index ef75d82dbd..3bd240f528 100644 --- a/src/overlays/actors/ovl_Bg_Mizu_Shutter/z_bg_mizu_shutter.c +++ b/src/overlays/actors/ovl_Bg_Mizu_Shutter/z_bg_mizu_shutter.c @@ -1,7 +1,7 @@ #include "z_bg_mizu_shutter.h" #include "objects/object_mizu_objects/object_mizu_objects.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 #define SIZE_PARAM (((u16)this->dyna.actor.params >> 0xC) & 0xF) #define TIMER_PARAM (((u16)this->dyna.actor.params >> 6) & 0x3F) diff --git a/src/overlays/actors/ovl_Bg_Mizu_Uzu/z_bg_mizu_uzu.c b/src/overlays/actors/ovl_Bg_Mizu_Uzu/z_bg_mizu_uzu.c index 62e9809535..698eb5d600 100644 --- a/src/overlays/actors/ovl_Bg_Mizu_Uzu/z_bg_mizu_uzu.c +++ b/src/overlays/actors/ovl_Bg_Mizu_Uzu/z_bg_mizu_uzu.c @@ -7,7 +7,7 @@ #include "z_bg_mizu_uzu.h" #include "objects/object_mizu_objects/object_mizu_objects.h" -#define FLAGS 0x00000000 +#define FLAGS 0 void BgMizuUzu_Init(Actor* thisx, GlobalContext* globalCtx); void BgMizuUzu_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Bg_Mizu_Water/z_bg_mizu_water.c b/src/overlays/actors/ovl_Bg_Mizu_Water/z_bg_mizu_water.c index 8b9ad11430..0847b78df9 100644 --- a/src/overlays/actors/ovl_Bg_Mizu_Water/z_bg_mizu_water.c +++ b/src/overlays/actors/ovl_Bg_Mizu_Water/z_bg_mizu_water.c @@ -7,7 +7,7 @@ #include "z_bg_mizu_water.h" #include "objects/object_mizu_objects/object_mizu_objects.h" -#define FLAGS 0x00000030 +#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) void BgMizuWater_Init(Actor* thisx, GlobalContext* globalCtx); void BgMizuWater_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Bg_Mjin/z_bg_mjin.c b/src/overlays/actors/ovl_Bg_Mjin/z_bg_mjin.c index 4ca8efe583..04d45c3129 100644 --- a/src/overlays/actors/ovl_Bg_Mjin/z_bg_mjin.c +++ b/src/overlays/actors/ovl_Bg_Mjin/z_bg_mjin.c @@ -14,7 +14,7 @@ #include "objects/object_mjin_flash/object_mjin_flash.h" #include "objects/object_mjin_oka/object_mjin_oka.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 void BgMjin_Init(Actor* thisx, GlobalContext* globalCtx); void BgMjin_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -78,7 +78,7 @@ void func_808A0850(BgMjin* this, GlobalContext* globalCtx) { if (Object_IsLoaded(&globalCtx->objectCtx, this->objBankIndex)) { colHeader = NULL; - this->dyna.actor.flags &= ~0x10; + this->dyna.actor.flags &= ~ACTOR_FLAG_4; this->dyna.actor.objBankIndex = this->objBankIndex; Actor_SetObjectDependency(globalCtx, &this->dyna.actor); DynaPolyActor_Init(&this->dyna, 0); diff --git a/src/overlays/actors/ovl_Bg_Mori_Bigst/z_bg_mori_bigst.c b/src/overlays/actors/ovl_Bg_Mori_Bigst/z_bg_mori_bigst.c index cc9f5620dd..f51dc4d8b8 100644 --- a/src/overlays/actors/ovl_Bg_Mori_Bigst/z_bg_mori_bigst.c +++ b/src/overlays/actors/ovl_Bg_Mori_Bigst/z_bg_mori_bigst.c @@ -7,7 +7,7 @@ #include "z_bg_mori_bigst.h" #include "objects/object_mori_objects/object_mori_objects.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 void BgMoriBigst_Init(Actor* thisx, GlobalContext* globalCtx); void BgMoriBigst_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Bg_Mori_Elevator/z_bg_mori_elevator.c b/src/overlays/actors/ovl_Bg_Mori_Elevator/z_bg_mori_elevator.c index d0cd11a832..b8f2b3f037 100644 --- a/src/overlays/actors/ovl_Bg_Mori_Elevator/z_bg_mori_elevator.c +++ b/src/overlays/actors/ovl_Bg_Mori_Elevator/z_bg_mori_elevator.c @@ -1,7 +1,7 @@ #include "z_bg_mori_elevator.h" #include "objects/object_mori_objects/object_mori_objects.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 void BgMoriElevator_Init(Actor* thisx, GlobalContext* globalCtx); void BgMoriElevator_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Bg_Mori_Hashigo/z_bg_mori_hashigo.c b/src/overlays/actors/ovl_Bg_Mori_Hashigo/z_bg_mori_hashigo.c index 9350a4ab20..26f17c7528 100644 --- a/src/overlays/actors/ovl_Bg_Mori_Hashigo/z_bg_mori_hashigo.c +++ b/src/overlays/actors/ovl_Bg_Mori_Hashigo/z_bg_mori_hashigo.c @@ -7,7 +7,7 @@ #include "z_bg_mori_hashigo.h" #include "objects/object_mori_objects/object_mori_objects.h" -#define FLAGS 0x00000000 +#define FLAGS 0 void BgMoriHashigo_Init(Actor* thisx, GlobalContext* globalCtx); void BgMoriHashigo_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -134,7 +134,7 @@ s32 BgMoriHashigo_SpawnLadder(BgMoriHashigo* this, GlobalContext* globalCtx) { s32 BgMoriHashigo_InitClasp(BgMoriHashigo* this, GlobalContext* globalCtx) { Actor_ProcessInitChain(&this->dyna.actor, sInitChainClasp); - this->dyna.actor.flags |= 1; + this->dyna.actor.flags |= ACTOR_FLAG_0; Actor_SetFocus(&this->dyna.actor, 55.0f); BgMoriHashigo_InitCollider(this, globalCtx); if ((this->dyna.actor.params == HASHIGO_CLASP) && !BgMoriHashigo_SpawnLadder(this, globalCtx)) { diff --git a/src/overlays/actors/ovl_Bg_Mori_Hashira4/z_bg_mori_hashira4.c b/src/overlays/actors/ovl_Bg_Mori_Hashira4/z_bg_mori_hashira4.c index 9541ce6cdc..0c3fde4028 100644 --- a/src/overlays/actors/ovl_Bg_Mori_Hashira4/z_bg_mori_hashira4.c +++ b/src/overlays/actors/ovl_Bg_Mori_Hashira4/z_bg_mori_hashira4.c @@ -7,7 +7,7 @@ #include "z_bg_mori_hashira4.h" #include "objects/object_mori_objects/object_mori_objects.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 void BgMoriHashira4_Init(Actor* thisx, GlobalContext* globalCtx); void BgMoriHashira4_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Bg_Mori_Hineri/z_bg_mori_hineri.c b/src/overlays/actors/ovl_Bg_Mori_Hineri/z_bg_mori_hineri.c index feab90811a..5b5005c1fc 100644 --- a/src/overlays/actors/ovl_Bg_Mori_Hineri/z_bg_mori_hineri.c +++ b/src/overlays/actors/ovl_Bg_Mori_Hineri/z_bg_mori_hineri.c @@ -13,7 +13,7 @@ #include "objects/object_mori_hineri2a/object_mori_hineri2a.h" #include "objects/object_mori_tex/object_mori_tex.h" -#define FLAGS 0x00000030 +#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) void BgMoriHineri_Init(Actor* thisx, GlobalContext* globalCtx); void BgMoriHineri_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Bg_Mori_Idomizu/z_bg_mori_idomizu.c b/src/overlays/actors/ovl_Bg_Mori_Idomizu/z_bg_mori_idomizu.c index 72533671c5..018e91e3a0 100644 --- a/src/overlays/actors/ovl_Bg_Mori_Idomizu/z_bg_mori_idomizu.c +++ b/src/overlays/actors/ovl_Bg_Mori_Idomizu/z_bg_mori_idomizu.c @@ -7,7 +7,7 @@ #include "z_bg_mori_idomizu.h" #include "objects/object_mori_objects/object_mori_objects.h" -#define FLAGS 0x00000030 +#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) void BgMoriIdomizu_Init(Actor* thisx, GlobalContext* globalCtx); void BgMoriIdomizu_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Bg_Mori_Kaitenkabe/z_bg_mori_kaitenkabe.c b/src/overlays/actors/ovl_Bg_Mori_Kaitenkabe/z_bg_mori_kaitenkabe.c index 8357f66bd3..f00eb06ec8 100644 --- a/src/overlays/actors/ovl_Bg_Mori_Kaitenkabe/z_bg_mori_kaitenkabe.c +++ b/src/overlays/actors/ovl_Bg_Mori_Kaitenkabe/z_bg_mori_kaitenkabe.c @@ -7,7 +7,7 @@ #include "z_bg_mori_kaitenkabe.h" #include "objects/object_mori_objects/object_mori_objects.h" -#define FLAGS 0x00000000 +#define FLAGS 0 void BgMoriKaitenkabe_Init(Actor* thisx, GlobalContext* globalCtx); void BgMoriKaitenkabe_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Bg_Mori_Rakkatenjo/z_bg_mori_rakkatenjo.c b/src/overlays/actors/ovl_Bg_Mori_Rakkatenjo/z_bg_mori_rakkatenjo.c index b6365eea58..4600d57f3d 100644 --- a/src/overlays/actors/ovl_Bg_Mori_Rakkatenjo/z_bg_mori_rakkatenjo.c +++ b/src/overlays/actors/ovl_Bg_Mori_Rakkatenjo/z_bg_mori_rakkatenjo.c @@ -7,7 +7,7 @@ #include "z_bg_mori_rakkatenjo.h" #include "objects/object_mori_objects/object_mori_objects.h" -#define FLAGS 0x00000030 +#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) void BgMoriRakkatenjo_Init(Actor* thisx, GlobalContext* globalCtx); void BgMoriRakkatenjo_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.c b/src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.c index f17c8c70ae..c932a2e0bd 100644 --- a/src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.c +++ b/src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.c @@ -7,7 +7,7 @@ #include "z_bg_po_event.h" #include "objects/object_po_sisters/object_po_sisters.h" -#define FLAGS 0x00000000 +#define FLAGS 0 void BgPoEvent_Init(Actor* thisx, GlobalContext* globalCtx); void BgPoEvent_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -155,7 +155,7 @@ void BgPoEvent_InitBlocks(BgPoEvent* this, GlobalContext* globalCtx) { CollisionHeader* colHeader = NULL; s32 bgId; - this->dyna.actor.flags |= 0x30; + this->dyna.actor.flags |= ACTOR_FLAG_4 | ACTOR_FLAG_5; CollisionHeader_GetVirtual(&gPoSistersAmyBlockCol, &colHeader); this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader); if ((this->type == 0) && (this->index != 3)) { @@ -308,7 +308,7 @@ void BgPoEvent_BlockFall(BgPoEvent* this, GlobalContext* globalCtx) { this->dyna.actor.velocity.y++; if (Math_StepToF(&this->dyna.actor.world.pos.y, 433.0f, this->dyna.actor.velocity.y)) { - this->dyna.actor.flags &= ~0x20; + this->dyna.actor.flags &= ~ACTOR_FLAG_5; this->dyna.actor.velocity.y = 0.0f; sBlocksAtRest++; if (this->type != 1) { diff --git a/src/overlays/actors/ovl_Bg_Po_Syokudai/z_bg_po_syokudai.c b/src/overlays/actors/ovl_Bg_Po_Syokudai/z_bg_po_syokudai.c index 6eabc4af04..72297319b2 100644 --- a/src/overlays/actors/ovl_Bg_Po_Syokudai/z_bg_po_syokudai.c +++ b/src/overlays/actors/ovl_Bg_Po_Syokudai/z_bg_po_syokudai.c @@ -8,7 +8,7 @@ #include "objects/gameplay_keep/gameplay_keep.h" #include "objects/object_syokudai/object_syokudai.h" -#define FLAGS 0x00000000 +#define FLAGS 0 typedef enum { POE_FLAME_PURPLE, // Meg diff --git a/src/overlays/actors/ovl_Bg_Pushbox/z_bg_pushbox.c b/src/overlays/actors/ovl_Bg_Pushbox/z_bg_pushbox.c index fe5962893a..31e750d193 100644 --- a/src/overlays/actors/ovl_Bg_Pushbox/z_bg_pushbox.c +++ b/src/overlays/actors/ovl_Bg_Pushbox/z_bg_pushbox.c @@ -7,7 +7,7 @@ #include "z_bg_pushbox.h" #include "objects/object_pu_box/object_pu_box.h" -#define FLAGS 0x00000000 +#define FLAGS 0 void BgPushbox_Init(Actor* thisx, GlobalContext* globalCtx); void BgPushbox_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.c b/src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.c index 5f7502952a..f347a5cfa4 100644 --- a/src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.c +++ b/src/overlays/actors/ovl_Bg_Relay_Objects/z_bg_relay_objects.c @@ -7,7 +7,7 @@ #include "z_bg_relay_objects.h" #include "objects/object_relay_objects/object_relay_objects.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 typedef enum { /* 0 */ WINDMILL_ROTATING_GEAR, @@ -62,7 +62,7 @@ void BgRelayObjects_Init(Actor* thisx, GlobalContext* globalCtx) { } func_800F5718(); thisx->room = -1; - thisx->flags |= 0x20; + thisx->flags |= ACTOR_FLAG_5; if (D_808A9508 & 2) { thisx->params = 0xFF; Actor_Kill(thisx); @@ -154,7 +154,7 @@ void func_808A9234(BgRelayObjects* this, GlobalContext* globalCtx) { return; } Flags_UnsetSwitch(globalCtx, this->switchFlag); - this->dyna.actor.flags &= ~0x10; + this->dyna.actor.flags &= ~ACTOR_FLAG_4; if (globalCtx->roomCtx.curRoom.num == 4) { gSaveContext.timer1State = 0xF; } diff --git a/src/overlays/actors/ovl_Bg_Spot00_Break/z_bg_spot00_break.c b/src/overlays/actors/ovl_Bg_Spot00_Break/z_bg_spot00_break.c index fdafd4a81b..f4e0fc19b2 100644 --- a/src/overlays/actors/ovl_Bg_Spot00_Break/z_bg_spot00_break.c +++ b/src/overlays/actors/ovl_Bg_Spot00_Break/z_bg_spot00_break.c @@ -7,7 +7,7 @@ #include "z_bg_spot00_break.h" #include "objects/object_spot00_break/object_spot00_break.h" -#define FLAGS 0x00000000 +#define FLAGS 0 void BgSpot00Break_Init(Actor* thisx, GlobalContext* globalCtx); void BgSpot00Break_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.c b/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.c index a5c84eacdd..e5ba9ebcd7 100644 --- a/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.c +++ b/src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.c @@ -8,7 +8,7 @@ #include "objects/object_spot00_objects/object_spot00_objects.h" #include "objects/gameplay_keep/gameplay_keep.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 typedef enum { /* -1 */ DT_DRAWBRIDGE = -1, diff --git a/src/overlays/actors/ovl_Bg_Spot01_Fusya/z_bg_spot01_fusya.c b/src/overlays/actors/ovl_Bg_Spot01_Fusya/z_bg_spot01_fusya.c index aaf54bdb9e..65f992deb7 100644 --- a/src/overlays/actors/ovl_Bg_Spot01_Fusya/z_bg_spot01_fusya.c +++ b/src/overlays/actors/ovl_Bg_Spot01_Fusya/z_bg_spot01_fusya.c @@ -6,7 +6,8 @@ #include "z_bg_spot01_fusya.h" #include "objects/object_spot01_objects/object_spot01_objects.h" -#define FLAGS 0x00000010 + +#define FLAGS ACTOR_FLAG_4 void BgSpot01Fusya_Init(Actor* thisx, GlobalContext* globalCtx); void BgSpot01Fusya_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Bg_Spot01_Idohashira/z_bg_spot01_idohashira.c b/src/overlays/actors/ovl_Bg_Spot01_Idohashira/z_bg_spot01_idohashira.c index 21a3656d34..89f69ede01 100644 --- a/src/overlays/actors/ovl_Bg_Spot01_Idohashira/z_bg_spot01_idohashira.c +++ b/src/overlays/actors/ovl_Bg_Spot01_Idohashira/z_bg_spot01_idohashira.c @@ -8,7 +8,7 @@ #include "objects/object_spot01_objects/object_spot01_objects.h" #include "vt.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 void BgSpot01Idohashira_Init(Actor* thisx, GlobalContext* globalCtx); void BgSpot01Idohashira_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Bg_Spot01_Idomizu/z_bg_spot01_idomizu.c b/src/overlays/actors/ovl_Bg_Spot01_Idomizu/z_bg_spot01_idomizu.c index 3e003fca02..ff1d729fda 100644 --- a/src/overlays/actors/ovl_Bg_Spot01_Idomizu/z_bg_spot01_idomizu.c +++ b/src/overlays/actors/ovl_Bg_Spot01_Idomizu/z_bg_spot01_idomizu.c @@ -7,7 +7,7 @@ #include "z_bg_spot01_idomizu.h" #include "objects/object_spot01_objects/object_spot01_objects.h" -#define FLAGS 0x00000020 +#define FLAGS ACTOR_FLAG_5 void BgSpot01Idomizu_Init(Actor* thisx, GlobalContext* globalCtx); void BgSpot01Idomizu_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Bg_Spot01_Idosoko/z_bg_spot01_idosoko.c b/src/overlays/actors/ovl_Bg_Spot01_Idosoko/z_bg_spot01_idosoko.c index ad23964bb0..53d5362913 100644 --- a/src/overlays/actors/ovl_Bg_Spot01_Idosoko/z_bg_spot01_idosoko.c +++ b/src/overlays/actors/ovl_Bg_Spot01_Idosoko/z_bg_spot01_idosoko.c @@ -7,7 +7,7 @@ #include "z_bg_spot01_idosoko.h" #include "objects/object_spot01_matoya/object_spot01_matoya.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 void BgSpot01Idosoko_Init(Actor* thisx, GlobalContext* globalCtx); void BgSpot01Idosoko_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Bg_Spot01_Objects2/z_bg_spot01_objects2.c b/src/overlays/actors/ovl_Bg_Spot01_Objects2/z_bg_spot01_objects2.c index 3c2d8a89a4..765a12505e 100644 --- a/src/overlays/actors/ovl_Bg_Spot01_Objects2/z_bg_spot01_objects2.c +++ b/src/overlays/actors/ovl_Bg_Spot01_Objects2/z_bg_spot01_objects2.c @@ -8,7 +8,7 @@ #include "objects/object_spot01_matoya/object_spot01_matoya.h" #include "objects/object_spot01_matoyab/object_spot01_matoyab.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 void BgSpot01Objects2_Init(Actor* thisx, GlobalContext* globalCtx); void BgSpot01Objects2_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Bg_Spot02_Objects/z_bg_spot02_objects.c b/src/overlays/actors/ovl_Bg_Spot02_Objects/z_bg_spot02_objects.c index a9f4c694a6..493f3cca08 100644 --- a/src/overlays/actors/ovl_Bg_Spot02_Objects/z_bg_spot02_objects.c +++ b/src/overlays/actors/ovl_Bg_Spot02_Objects/z_bg_spot02_objects.c @@ -7,7 +7,7 @@ #include "z_bg_spot02_objects.h" #include "objects/object_spot02_objects/object_spot02_objects.h" -#define FLAGS 0x00000030 +#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) void BgSpot02Objects_Init(Actor* thisx, GlobalContext* globalCtx); void BgSpot02Objects_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -74,7 +74,7 @@ void BgSpot02Objects_Init(Actor* thisx, GlobalContext* globalCtx) { } else if (thisx->params == 1) { this->actionFunc = func_808AC8FC; CollisionHeader_GetVirtual(&object_spot02_objects_Col_0128D8, &colHeader); - thisx->flags |= 0x400000; + thisx->flags |= ACTOR_FLAG_22; } else { if (globalCtx->sceneNum == SCENE_SPOT02) { this->actionFunc = func_808AC908; diff --git a/src/overlays/actors/ovl_Bg_Spot03_Taki/z_bg_spot03_taki.c b/src/overlays/actors/ovl_Bg_Spot03_Taki/z_bg_spot03_taki.c index 423c3bb3f4..9897102f02 100644 --- a/src/overlays/actors/ovl_Bg_Spot03_Taki/z_bg_spot03_taki.c +++ b/src/overlays/actors/ovl_Bg_Spot03_Taki/z_bg_spot03_taki.c @@ -7,7 +7,7 @@ #include "z_bg_spot03_taki.h" #include "objects/object_spot03_object/object_spot03_object.h" -#define FLAGS 0x00000030 +#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) void BgSpot03Taki_Init(Actor* thisx, GlobalContext* globalCtx); void BgSpot03Taki_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Bg_Spot05_Soko/z_bg_spot05_soko.c b/src/overlays/actors/ovl_Bg_Spot05_Soko/z_bg_spot05_soko.c index de9398eb95..dcc5fcd177 100644 --- a/src/overlays/actors/ovl_Bg_Spot05_Soko/z_bg_spot05_soko.c +++ b/src/overlays/actors/ovl_Bg_Spot05_Soko/z_bg_spot05_soko.c @@ -7,7 +7,7 @@ #include "z_bg_spot05_soko.h" #include "objects/object_spot05_objects/object_spot05_objects.h" -#define FLAGS 0x00000000 +#define FLAGS 0 void BgSpot05Soko_Init(Actor* thisx, GlobalContext* globalCtx); void BgSpot05Soko_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -61,7 +61,7 @@ void BgSpot05Soko_Init(Actor* thisx, GlobalContext* globalCtx) { Actor_Kill(thisx); } else { this->actionFunc = func_808AE5B4; - thisx->flags |= 0x10; + thisx->flags |= ACTOR_FLAG_4; } } this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, thisx, colHeader); diff --git a/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.c b/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.c index 3d50685311..ec6ffb41ff 100644 --- a/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.c +++ b/src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.c @@ -7,7 +7,7 @@ #include "z_bg_spot06_objects.h" #include "objects/object_spot06_objects/object_spot06_objects.h" -#define FLAGS 0x00000200 +#define FLAGS ACTOR_FLAG_9 typedef enum { /* 0x0 */ LHO_WATER_TEMPLE_ENTRACE_GATE, @@ -147,7 +147,7 @@ void BgSpot06Objects_Init(Actor* thisx, GlobalContext* globalCtx) { break; case LHO_WATER_PLANE: Actor_ProcessInitChain(thisx, sInitChainWaterPlane); - thisx->flags = 0x30; + thisx->flags = ACTOR_FLAG_4 | ACTOR_FLAG_5; if (LINK_IS_ADULT && !(gSaveContext.eventChkInf[6] & 0x200)) { if (gSaveContext.sceneSetupIndex < 4) { @@ -291,7 +291,7 @@ void BgSpot06Objects_LockWait(BgSpot06Objects* this, GlobalContext* globalCtx) { if (this->collider.base.acFlags & 2) { this->timer = 130; - this->dyna.actor.flags |= 0x10; + this->dyna.actor.flags |= ACTOR_FLAG_4; sin = Math_SinS(this->dyna.actor.world.rot.y); cos = Math_CosS(this->dyna.actor.world.rot.y); this->dyna.actor.world.pos.x += (3.0f * sin); @@ -334,7 +334,7 @@ void BgSpot06Objects_LockPullOutward(BgSpot06Objects* this, GlobalContext* globa if (this->timer == 0) { this->dyna.actor.velocity.y = 0.5f; - this->dyna.actor.flags &= ~0x2000; + this->dyna.actor.flags &= ~ACTOR_FLAG_13; this->actionFunc = BgSpot06Objects_LockSwimToSurface; } @@ -364,7 +364,7 @@ void BgSpot06Objects_LockSwimToSurface(BgSpot06Objects* this, GlobalContext* glo this->dyna.actor.world.pos.z - (Math_CosS(this->dyna.actor.shape.rot.y) * 16.0f); this->dyna.actor.world.pos.y = -1993.0f; this->timer = 32; - this->dyna.actor.flags &= ~0x10; + this->dyna.actor.flags &= ~ACTOR_FLAG_4; this->collider.elements[0].dim.worldSphere.radius = this->collider.elements[0].dim.modelSphere.radius * 2; this->actionFunc = BgSpot06Objects_LockFloat; } diff --git a/src/overlays/actors/ovl_Bg_Spot07_Taki/z_bg_spot07_taki.c b/src/overlays/actors/ovl_Bg_Spot07_Taki/z_bg_spot07_taki.c index 5f878096a2..4ea35eb538 100644 --- a/src/overlays/actors/ovl_Bg_Spot07_Taki/z_bg_spot07_taki.c +++ b/src/overlays/actors/ovl_Bg_Spot07_Taki/z_bg_spot07_taki.c @@ -7,7 +7,7 @@ #include "z_bg_spot07_taki.h" #include "objects/object_spot07_object/object_spot07_object.h" -#define FLAGS 0x00000030 +#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) void BgSpot07Taki_Init(Actor* thisx, GlobalContext* globalCtx); void BgSpot07Taki_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Bg_Spot08_Bakudankabe/z_bg_spot08_bakudankabe.c b/src/overlays/actors/ovl_Bg_Spot08_Bakudankabe/z_bg_spot08_bakudankabe.c index d9f32dd5c3..f24daa833c 100644 --- a/src/overlays/actors/ovl_Bg_Spot08_Bakudankabe/z_bg_spot08_bakudankabe.c +++ b/src/overlays/actors/ovl_Bg_Spot08_Bakudankabe/z_bg_spot08_bakudankabe.c @@ -9,7 +9,7 @@ #include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h" #include "objects/gameplay_field_keep/gameplay_field_keep.h" -#define FLAGS 0x00400000 +#define FLAGS ACTOR_FLAG_22 void BgSpot08Bakudankabe_Init(Actor* thisx, GlobalContext* globalCtx); void BgSpot08Bakudankabe_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Bg_Spot08_Iceblock/z_bg_spot08_iceblock.c b/src/overlays/actors/ovl_Bg_Spot08_Iceblock/z_bg_spot08_iceblock.c index 9b3d369ec1..7e679c2cd2 100644 --- a/src/overlays/actors/ovl_Bg_Spot08_Iceblock/z_bg_spot08_iceblock.c +++ b/src/overlays/actors/ovl_Bg_Spot08_Iceblock/z_bg_spot08_iceblock.c @@ -7,7 +7,7 @@ #include "z_bg_spot08_iceblock.h" #include "objects/object_spot08_obj/object_spot08_obj.h" -#define FLAGS 0x00000000 +#define FLAGS 0 void BgSpot08Iceblock_Init(Actor* thisx, GlobalContext* globalCtx); void BgSpot08Iceblock_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Bg_Spot09_Obj/z_bg_spot09_obj.c b/src/overlays/actors/ovl_Bg_Spot09_Obj/z_bg_spot09_obj.c index de7a38d257..8ca9794163 100644 --- a/src/overlays/actors/ovl_Bg_Spot09_Obj/z_bg_spot09_obj.c +++ b/src/overlays/actors/ovl_Bg_Spot09_Obj/z_bg_spot09_obj.c @@ -7,7 +7,7 @@ #include "z_bg_spot09_obj.h" #include "objects/object_spot09_obj/object_spot09_obj.h" -#define FLAGS 0x00000000 +#define FLAGS 0 void BgSpot09Obj_Init(Actor* thisx, GlobalContext* globalCtx); void BgSpot09Obj_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Bg_Spot11_Bakudankabe/z_bg_spot11_bakudankabe.c b/src/overlays/actors/ovl_Bg_Spot11_Bakudankabe/z_bg_spot11_bakudankabe.c index 614886964d..5535336897 100644 --- a/src/overlays/actors/ovl_Bg_Spot11_Bakudankabe/z_bg_spot11_bakudankabe.c +++ b/src/overlays/actors/ovl_Bg_Spot11_Bakudankabe/z_bg_spot11_bakudankabe.c @@ -9,7 +9,7 @@ #include "objects/object_spot11_obj/object_spot11_obj.h" #include "objects/gameplay_field_keep/gameplay_field_keep.h" -#define FLAGS 0x00000030 +#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) void BgSpot11Bakudankabe_Init(Actor* thisx, GlobalContext* globalCtx); void BgSpot11Bakudankabe_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Bg_Spot11_Oasis/z_bg_spot11_oasis.c b/src/overlays/actors/ovl_Bg_Spot11_Oasis/z_bg_spot11_oasis.c index 0d7712eab5..6e34a57961 100644 --- a/src/overlays/actors/ovl_Bg_Spot11_Oasis/z_bg_spot11_oasis.c +++ b/src/overlays/actors/ovl_Bg_Spot11_Oasis/z_bg_spot11_oasis.c @@ -8,7 +8,7 @@ #include "overlays/actors/ovl_En_Elf/z_en_elf.h" #include "objects/object_spot11_obj/object_spot11_obj.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 void BgSpot11Oasis_Init(Actor* thisx, GlobalContext* globalCtx); void BgSpot11Oasis_Update(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Bg_Spot12_Gate/z_bg_spot12_gate.c b/src/overlays/actors/ovl_Bg_Spot12_Gate/z_bg_spot12_gate.c index 86494b4a4c..691686bdad 100644 --- a/src/overlays/actors/ovl_Bg_Spot12_Gate/z_bg_spot12_gate.c +++ b/src/overlays/actors/ovl_Bg_Spot12_Gate/z_bg_spot12_gate.c @@ -7,7 +7,7 @@ #include "z_bg_spot12_gate.h" #include "objects/object_spot12_obj/object_spot12_obj.h" -#define FLAGS 0x00000000 +#define FLAGS 0 void BgSpot12Gate_Init(Actor* thisx, GlobalContext* globalCtx); void BgSpot12Gate_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Bg_Spot12_Saku/z_bg_spot12_saku.c b/src/overlays/actors/ovl_Bg_Spot12_Saku/z_bg_spot12_saku.c index e2a5e2ca17..e0eb4bafbe 100644 --- a/src/overlays/actors/ovl_Bg_Spot12_Saku/z_bg_spot12_saku.c +++ b/src/overlays/actors/ovl_Bg_Spot12_Saku/z_bg_spot12_saku.c @@ -7,7 +7,7 @@ #include "z_bg_spot12_saku.h" #include "objects/object_spot12_obj/object_spot12_obj.h" -#define FLAGS 0x00000000 +#define FLAGS 0 void BgSpot12Saku_Init(Actor* thisx, GlobalContext* globalCtx); void BgSpot12Saku_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Bg_Spot15_Rrbox/z_bg_spot15_rrbox.c b/src/overlays/actors/ovl_Bg_Spot15_Rrbox/z_bg_spot15_rrbox.c index c89234ec43..604d7ceea0 100644 --- a/src/overlays/actors/ovl_Bg_Spot15_Rrbox/z_bg_spot15_rrbox.c +++ b/src/overlays/actors/ovl_Bg_Spot15_Rrbox/z_bg_spot15_rrbox.c @@ -7,7 +7,7 @@ #include "z_bg_spot15_rrbox.h" #include "objects/object_spot15_obj/object_spot15_obj.h" -#define FLAGS 0x00000000 +#define FLAGS 0 void BgSpot15Rrbox_Init(Actor* thisx, GlobalContext* globalCtx); void BgSpot15Rrbox_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Bg_Spot15_Saku/z_bg_spot15_saku.c b/src/overlays/actors/ovl_Bg_Spot15_Saku/z_bg_spot15_saku.c index e114e8a7d9..aaf797cfd9 100644 --- a/src/overlays/actors/ovl_Bg_Spot15_Saku/z_bg_spot15_saku.c +++ b/src/overlays/actors/ovl_Bg_Spot15_Saku/z_bg_spot15_saku.c @@ -7,7 +7,7 @@ #include "z_bg_spot15_saku.h" #include "objects/object_spot15_obj/object_spot15_obj.h" -#define FLAGS 0x00000000 +#define FLAGS 0 void BgSpot15Saku_Init(Actor* thisx, GlobalContext* globalCtx); void BgSpot15Saku_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Bg_Spot16_Bombstone/z_bg_spot16_bombstone.c b/src/overlays/actors/ovl_Bg_Spot16_Bombstone/z_bg_spot16_bombstone.c index 3564eae950..e3755f872c 100644 --- a/src/overlays/actors/ovl_Bg_Spot16_Bombstone/z_bg_spot16_bombstone.c +++ b/src/overlays/actors/ovl_Bg_Spot16_Bombstone/z_bg_spot16_bombstone.c @@ -4,7 +4,7 @@ #include "overlays/actors/ovl_En_Bombf/z_en_bombf.h" #include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 void BgSpot16Bombstone_Init(Actor* thisx, GlobalContext* globalCtx); void BgSpot16Bombstone_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Bg_Spot16_Doughnut/z_bg_spot16_doughnut.c b/src/overlays/actors/ovl_Bg_Spot16_Doughnut/z_bg_spot16_doughnut.c index d6cd62fba0..9d2a7da2f6 100644 --- a/src/overlays/actors/ovl_Bg_Spot16_Doughnut/z_bg_spot16_doughnut.c +++ b/src/overlays/actors/ovl_Bg_Spot16_Doughnut/z_bg_spot16_doughnut.c @@ -8,7 +8,7 @@ #include "objects/object_efc_doughnut/object_efc_doughnut.h" #include "vt.h" -#define FLAGS 0x00000000 +#define FLAGS 0 void BgSpot16Doughnut_Init(Actor* thisx, GlobalContext* globalCtx); void BgSpot16Doughnut_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Bg_Spot17_Bakudankabe/z_bg_spot17_bakudankabe.c b/src/overlays/actors/ovl_Bg_Spot17_Bakudankabe/z_bg_spot17_bakudankabe.c index 5bac550db0..1a573f54b0 100644 --- a/src/overlays/actors/ovl_Bg_Spot17_Bakudankabe/z_bg_spot17_bakudankabe.c +++ b/src/overlays/actors/ovl_Bg_Spot17_Bakudankabe/z_bg_spot17_bakudankabe.c @@ -9,7 +9,7 @@ #include "objects/object_spot17_obj/object_spot17_obj.h" #include "objects/gameplay_field_keep/gameplay_field_keep.h" -#define FLAGS 0x00000000 +#define FLAGS 0 void BgSpot17Bakudankabe_Init(Actor* thisx, GlobalContext* globalCtx); void BgSpot17Bakudankabe_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Bg_Spot17_Funen/z_bg_spot17_funen.c b/src/overlays/actors/ovl_Bg_Spot17_Funen/z_bg_spot17_funen.c index 12e8166be9..0a0ab50d2a 100644 --- a/src/overlays/actors/ovl_Bg_Spot17_Funen/z_bg_spot17_funen.c +++ b/src/overlays/actors/ovl_Bg_Spot17_Funen/z_bg_spot17_funen.c @@ -7,7 +7,7 @@ #include "z_bg_spot17_funen.h" #include "objects/object_spot17_obj/object_spot17_obj.h" -#define FLAGS 0x00000030 +#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) void BgSpot17Funen_Init(Actor* thisx, GlobalContext* globalCtx); void BgSpot17Funen_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Bg_Spot18_Basket/z_bg_spot18_basket.c b/src/overlays/actors/ovl_Bg_Spot18_Basket/z_bg_spot18_basket.c index eeaf84be5a..5bbc4de5f5 100644 --- a/src/overlays/actors/ovl_Bg_Spot18_Basket/z_bg_spot18_basket.c +++ b/src/overlays/actors/ovl_Bg_Spot18_Basket/z_bg_spot18_basket.c @@ -2,7 +2,7 @@ #include "objects/object_spot18_obj/object_spot18_obj.h" #include "vt.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 void BgSpot18Basket_Init(Actor* thisx, GlobalContext* globalCtx); void BgSpot18Basket_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Bg_Spot18_Futa/z_bg_spot18_futa.c b/src/overlays/actors/ovl_Bg_Spot18_Futa/z_bg_spot18_futa.c index e62d9dcc7e..5ce59491d9 100644 --- a/src/overlays/actors/ovl_Bg_Spot18_Futa/z_bg_spot18_futa.c +++ b/src/overlays/actors/ovl_Bg_Spot18_Futa/z_bg_spot18_futa.c @@ -7,7 +7,7 @@ #include "z_bg_spot18_futa.h" #include "objects/object_spot18_obj/object_spot18_obj.h" -#define FLAGS 0x00000000 +#define FLAGS 0 void BgSpot18Futa_Init(Actor* thisx, GlobalContext* globalCtx); void BgSpot18Futa_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Bg_Spot18_Obj/z_bg_spot18_obj.c b/src/overlays/actors/ovl_Bg_Spot18_Obj/z_bg_spot18_obj.c index aea435b113..22ea4d2c9b 100644 --- a/src/overlays/actors/ovl_Bg_Spot18_Obj/z_bg_spot18_obj.c +++ b/src/overlays/actors/ovl_Bg_Spot18_Obj/z_bg_spot18_obj.c @@ -8,7 +8,7 @@ #include "z_bg_spot18_obj.h" #include "objects/object_spot18_obj/object_spot18_obj.h" -#define FLAGS 0x00000000 +#define FLAGS 0 void BgSpot18Obj_Init(Actor* thisx, GlobalContext* globalCtx); void BgSpot18Obj_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Bg_Spot18_Shutter/z_bg_spot18_shutter.c b/src/overlays/actors/ovl_Bg_Spot18_Shutter/z_bg_spot18_shutter.c index fcda88fd0d..db3c543e08 100644 --- a/src/overlays/actors/ovl_Bg_Spot18_Shutter/z_bg_spot18_shutter.c +++ b/src/overlays/actors/ovl_Bg_Spot18_Shutter/z_bg_spot18_shutter.c @@ -7,7 +7,7 @@ #include "z_bg_spot18_shutter.h" #include "objects/object_spot18_obj/object_spot18_obj.h" -#define FLAGS 0x00000030 +#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) void BgSpot18Shutter_Init(Actor* thisx, GlobalContext* globalCtx); void BgSpot18Shutter_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Bg_Sst_Floor/z_bg_sst_floor.c b/src/overlays/actors/ovl_Bg_Sst_Floor/z_bg_sst_floor.c index 711bdda838..715f7cc196 100644 --- a/src/overlays/actors/ovl_Bg_Sst_Floor/z_bg_sst_floor.c +++ b/src/overlays/actors/ovl_Bg_Sst_Floor/z_bg_sst_floor.c @@ -7,7 +7,7 @@ #include "z_bg_sst_floor.h" #include "objects/object_sst/object_sst.h" -#define FLAGS 0x00000030 +#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) void BgSstFloor_Init(BgSstFloor* this, GlobalContext* globalCtx); void BgSstFloor_Destroy(BgSstFloor* this, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Bg_Toki_Hikari/z_bg_toki_hikari.c b/src/overlays/actors/ovl_Bg_Toki_Hikari/z_bg_toki_hikari.c index d2cab5bee3..2a9aa09d49 100644 --- a/src/overlays/actors/ovl_Bg_Toki_Hikari/z_bg_toki_hikari.c +++ b/src/overlays/actors/ovl_Bg_Toki_Hikari/z_bg_toki_hikari.c @@ -7,7 +7,7 @@ #include "z_bg_toki_hikari.h" #include "objects/object_toki_objects/object_toki_objects.h" -#define FLAGS 0x00000020 +#define FLAGS ACTOR_FLAG_5 void BgTokiHikari_Init(Actor* thisx, GlobalContext* globalCtx); void BgTokiHikari_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.c b/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.c index 2bdeb14661..d35c236410 100644 --- a/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.c +++ b/src/overlays/actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.c @@ -7,7 +7,7 @@ #include "z_bg_toki_swd.h" #include "objects/object_toki_objects/object_toki_objects.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 void BgTokiSwd_Init(Actor* thisx, GlobalContext* globalCtx); void BgTokiSwd_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth.c b/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth.c index bacad09bcd..4fbb0b300c 100644 --- a/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth.c +++ b/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth.c @@ -8,7 +8,7 @@ #include "objects/object_spot04_objects/object_spot04_objects.h" #include "overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h" -#define FLAGS 0x00000030 +#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) void BgTreemouth_Init(Actor* thisx, GlobalContext* globalCtx); void BgTreemouth_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -142,9 +142,9 @@ void func_808BC8B8(BgTreemouth* this, GlobalContext* globalCtx) { if (!LINK_IS_ADULT) { if (Flags_GetEventChkInf(0xC)) { if (Actor_IsFacingAndNearPlayer(&this->dyna.actor, 1658.0f, 0x7530)) { - this->dyna.actor.flags |= 1; + this->dyna.actor.flags |= ACTOR_FLAG_0; if (this->dyna.actor.isTargeted) { - this->dyna.actor.flags &= ~1; + this->dyna.actor.flags &= ~ACTOR_FLAG_0; globalCtx->csCtx.segment = D_808BD2A0; gSaveContext.cutsceneTrigger = 1; BgTreemouth_SetupAction(this, func_808BC9EC); diff --git a/src/overlays/actors/ovl_Bg_Umajump/z_bg_umajump.c b/src/overlays/actors/ovl_Bg_Umajump/z_bg_umajump.c index 52d8e74c93..0e3f990514 100644 --- a/src/overlays/actors/ovl_Bg_Umajump/z_bg_umajump.c +++ b/src/overlays/actors/ovl_Bg_Umajump/z_bg_umajump.c @@ -7,7 +7,7 @@ #include "z_bg_umajump.h" #include "objects/object_umajump/object_umajump.h" -#define FLAGS 0x00000000 +#define FLAGS 0 void BgUmaJump_Init(Actor* thisx, GlobalContext* globalCtx); void BgUmaJump_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -45,7 +45,7 @@ void BgUmaJump_Init(Actor* thisx, GlobalContext* globalCtx) { Actor_Kill(&this->dyna.actor); return; } - this->dyna.actor.flags |= 0x30; + this->dyna.actor.flags |= ACTOR_FLAG_4 | ACTOR_FLAG_5; } } diff --git a/src/overlays/actors/ovl_Bg_Vb_Sima/z_bg_vb_sima.c b/src/overlays/actors/ovl_Bg_Vb_Sima/z_bg_vb_sima.c index 311fb45b78..6aa1c58168 100644 --- a/src/overlays/actors/ovl_Bg_Vb_Sima/z_bg_vb_sima.c +++ b/src/overlays/actors/ovl_Bg_Vb_Sima/z_bg_vb_sima.c @@ -8,7 +8,7 @@ #include "objects/object_fd/object_fd.h" #include "overlays/actors/ovl_Boss_Fd/z_boss_fd.h" -#define FLAGS 0x00000000 +#define FLAGS 0 void BgVbSima_Init(Actor* thisx, GlobalContext* globalCtx); void BgVbSima_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Bg_Ydan_Hasi/z_bg_ydan_hasi.c b/src/overlays/actors/ovl_Bg_Ydan_Hasi/z_bg_ydan_hasi.c index a490ea2907..5d8b25f8f3 100644 --- a/src/overlays/actors/ovl_Bg_Ydan_Hasi/z_bg_ydan_hasi.c +++ b/src/overlays/actors/ovl_Bg_Ydan_Hasi/z_bg_ydan_hasi.c @@ -7,7 +7,7 @@ #include "z_bg_ydan_hasi.h" #include "objects/object_ydan_objects/object_ydan_objects.h" -#define FLAGS 0x00000030 +#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) void BgYdanHasi_Init(Actor* thisx, GlobalContext* globalCtx); void BgYdanHasi_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Bg_Ydan_Maruta/z_bg_ydan_maruta.c b/src/overlays/actors/ovl_Bg_Ydan_Maruta/z_bg_ydan_maruta.c index 1754d0d1fd..4fc67c2996 100644 --- a/src/overlays/actors/ovl_Bg_Ydan_Maruta/z_bg_ydan_maruta.c +++ b/src/overlays/actors/ovl_Bg_Ydan_Maruta/z_bg_ydan_maruta.c @@ -7,7 +7,7 @@ #include "z_bg_ydan_maruta.h" #include "objects/object_ydan_objects/object_ydan_objects.h" -#define FLAGS 0x00000000 +#define FLAGS 0 void BgYdanMaruta_Init(Actor* thisx, GlobalContext* globalCtx); void BgYdanMaruta_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Bg_Ydan_Sp/z_bg_ydan_sp.c b/src/overlays/actors/ovl_Bg_Ydan_Sp/z_bg_ydan_sp.c index 17afd08443..9f7d581c95 100644 --- a/src/overlays/actors/ovl_Bg_Ydan_Sp/z_bg_ydan_sp.c +++ b/src/overlays/actors/ovl_Bg_Ydan_Sp/z_bg_ydan_sp.c @@ -7,7 +7,7 @@ #include "z_bg_ydan_sp.h" #include "objects/object_ydan_objects/object_ydan_objects.h" -#define FLAGS 0x00000000 +#define FLAGS 0 void BgYdanSp_Init(Actor* thisx, GlobalContext* globalCtx); void BgYdanSp_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -296,7 +296,7 @@ void BgYdanSp_FloorWebIdle(BgYdanSp* this, GlobalContext* globalCtx) { if (this->dyna.actor.xzDistToPlayer < 80.0f) { this->unk16C = 200.0f; this->dyna.actor.room = -1; - this->dyna.actor.flags |= 0x10; + this->dyna.actor.flags |= ACTOR_FLAG_4; this->timer = 40; Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_WEB_BROKEN); this->actionFunc = BgYdanSp_FloorWebBreaking; diff --git a/src/overlays/actors/ovl_Bg_Zg/z_bg_zg.c b/src/overlays/actors/ovl_Bg_Zg/z_bg_zg.c index ef76f4a8b9..570da0f79d 100644 --- a/src/overlays/actors/ovl_Bg_Zg/z_bg_zg.c +++ b/src/overlays/actors/ovl_Bg_Zg/z_bg_zg.c @@ -8,7 +8,7 @@ #include "objects/object_zg/object_zg.h" #include "vt.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 void BgZg_Init(Actor* thisx, GlobalContext* globalCtx); void BgZg_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.c b/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.c index 80bd2985ac..b68f164371 100644 --- a/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.c +++ b/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.c @@ -3,7 +3,7 @@ #include "overlays/actors/ovl_Door_Warp1/z_door_warp1.h" #include "scenes/dungeons/ddan_boss/ddan_boss_room_1.h" -#define FLAGS 0x00000035 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4 | ACTOR_FLAG_5) void BossDodongo_Init(Actor* thisx, GlobalContext* globalCtx); void BossDodongo_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -217,7 +217,7 @@ void BossDodongo_Init(Actor* thisx, GlobalContext* globalCtx) { } } - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; } void BossDodongo_Destroy(Actor* thisx, GlobalContext* globalCtx) { @@ -477,7 +477,7 @@ void BossDodongo_SetupWalk(BossDodongo* this) { this->unk_1AA = 0; this->actionFunc = BossDodongo_Walk; this->unk_1DA = 0; - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0; this->unk_1E4 = 0.0f; } @@ -732,7 +732,7 @@ void BossDodongo_Roll(BossDodongo* this, GlobalContext* globalCtx) { f32 sp4C; f32 sp48; - this->actor.flags |= 0x1000000; + this->actor.flags |= ACTOR_FLAG_24; SkelAnime_Update(&this->skelAnime); if (this->unk_1DA == 10) { @@ -1280,7 +1280,7 @@ void BossDodongo_SetupDeathCutscene(BossDodongo* this) { Audio_PlayActorSound2(&this->actor, NA_SE_EN_DODO_K_DEAD); this->unk_1DA = 0; this->csState = 0; - this->actor.flags &= ~5; + this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_2); this->unk_1BC = 1; Audio_QueueSeqCmd(0x1 << 28 | SEQ_PLAYER_BGM_MAIN << 24 | 0x100FF); } diff --git a/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c b/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c index 4a092d4a2b..8f5480ab2d 100644 --- a/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c +++ b/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c @@ -12,7 +12,7 @@ #include "overlays/actors/ovl_Door_Warp1/z_door_warp1.h" #include "objects/gameplay_keep/gameplay_keep.h" -#define FLAGS 0x00000035 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4 | ACTOR_FLAG_5) typedef enum { /* 0 */ INTRO_FLY_EMERGE, @@ -687,7 +687,7 @@ void BossFd_Fly(BossFd* this, GlobalContext* globalCtx) { } break; case BOSSFD_FLY_CHASE: - this->actor.flags |= 0x1000000; + this->actor.flags |= ACTOR_FLAG_24; temp_y = Math_SinS(this->work[BFD_MOVE_TIMER] * 2396.0f) * 30.0f + this->fwork[BFD_TARGET_Y_OFFSET]; this->targetPosition.x = player->actor.world.pos.x; this->targetPosition.y = player->actor.world.pos.y + temp_y + 30.0f; @@ -1270,9 +1270,9 @@ void BossFd_Effects(BossFd* this, GlobalContext* globalCtx) { } if ((this->actor.world.pos.y < 90.0f) || (700.0f < this->actor.world.pos.y) || (this->actionFunc == BossFd_Wait)) { - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; } else { - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0; } } diff --git a/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c b/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c index 6864425879..e0185daf06 100644 --- a/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c +++ b/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c @@ -10,7 +10,7 @@ #include "overlays/actors/ovl_Door_Warp1/z_door_warp1.h" #include "vt.h" -#define FLAGS 0x00000035 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4 | ACTOR_FLAG_5) typedef enum { /* 0 */ DEATH_START, @@ -523,7 +523,7 @@ void BossFd2_Vulnerable(BossFd2* this, GlobalContext* globalCtx) { s16 i; this->disableAT = true; - this->actor.flags |= 0x400; + this->actor.flags |= ACTOR_FLAG_10; SkelAnime_Update(&this->skelAnime); switch (this->work[FD2_ACTION_STATE]) { case 0: @@ -611,7 +611,7 @@ void BossFd2_SetupDeath(BossFd2* this, GlobalContext* globalCtx) { Animation_Change(&this->skelAnime, &gHoleVolvagiaDamagedAnim, 1.0f, 0.0f, this->fwork[FD2_END_FRAME], ANIMMODE_ONCE_INTERP, -3.0f); this->actionFunc = BossFd2_Death; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; this->deathState = DEATH_START; } @@ -957,7 +957,7 @@ void BossFd2_Update(Actor* thisx, GlobalContext* globalCtx2) { osSyncPrintf("FD2 move start \n"); this->disableAT = false; - this->actor.flags &= ~0x400; + this->actor.flags &= ~ACTOR_FLAG_10; this->work[FD2_VAR_TIMER]++; this->work[FD2_UNK_TIMER]++; @@ -992,9 +992,9 @@ void BossFd2_Update(Actor* thisx, GlobalContext* globalCtx2) { this->fwork[FD2_TEX2_SCROLL_X] += 3.0f; this->fwork[FD2_TEX2_SCROLL_Y] -= 2.0f; if (this->actor.focus.pos.y < 90.0f) { - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; } else { - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0; } } diff --git a/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c b/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c index 43cb23ed08..7f28e46543 100644 --- a/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c +++ b/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c @@ -9,7 +9,7 @@ #include "assets/objects/object_ganon_anime2/object_ganon_anime2.h" #include "assets/scenes/dungeons/ganon_boss/ganon_boss_scene.h" -#define FLAGS 0x00000035 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4 | ACTOR_FLAG_5) void BossGanon_Init(Actor* thisx, GlobalContext* globalCtx); void BossGanon_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -380,7 +380,7 @@ void BossGanon_Init(Actor* thisx, GlobalContext* globalCtx2) { 0.0f, 0.0f, 0, 0, 0, 1); Actor_ChangeCategory(globalCtx, &globalCtx->actorCtx, thisx, ACTORCAT_BOSS); } else { - thisx->flags &= ~1; + thisx->flags &= ~ACTOR_FLAG_0; this->fwork[GDF_FWORK_1] = 255.0f; if (thisx->params >= 0xC8) { @@ -2514,7 +2514,7 @@ void BossGanon_Vulnerable(BossGanon* this, GlobalContext* globalCtx) { Vec3f sp40; if (this->timers[3] == 0) { - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0; } SkelAnime_Update(&this->skelAnime); @@ -2563,7 +2563,7 @@ void BossGanon_Vulnerable(BossGanon* this, GlobalContext* globalCtx) { this->fwork[GDF_FWORK_1] = Animation_GetLastFrame(&gDorfLandAnim); Animation_MorphToPlayOnce(&this->skelAnime, &gDorfLandAnim, 0.0f); this->timers[0] = 70; - this->actor.flags |= 0x400; + this->actor.flags |= ACTOR_FLAG_10; } break; @@ -2596,7 +2596,7 @@ void BossGanon_Vulnerable(BossGanon* this, GlobalContext* globalCtx) { this->unk_2E6 = 80; this->unk_2E8 = 0; - this->actor.flags &= ~0x400; + this->actor.flags &= ~ACTOR_FLAG_10; } break; @@ -2664,7 +2664,7 @@ void BossGanon_SetupDamaged(BossGanon* this, GlobalContext* globalCtx) { } void BossGanon_Damaged(BossGanon* this, GlobalContext* globalCtx) { - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0; SkelAnime_Update(&this->skelAnime); @@ -2825,7 +2825,7 @@ void BossGanon_Update(Actor* thisx, GlobalContext* globalCtx2) { this->collider.base.colType = 3; sCape->gravity = -3.0f; this->shockGlow = false; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; this->unk_1A2++; this->unk_1A4++; diff --git a/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c b/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c index 164bb737c2..2096859452 100644 --- a/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c +++ b/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c @@ -6,7 +6,7 @@ #include "objects/object_ganon_anime3/object_ganon_anime3.h" #include "objects/object_geff/object_geff.h" -#define FLAGS 0x00000035 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4 | ACTOR_FLAG_5) void BossGanon2_Init(Actor* thisx, GlobalContext* globalCtx); void BossGanon2_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -174,7 +174,7 @@ void func_808FD4D4(BossGanon2* this, GlobalContext* globalCtx, s16 arg2, s16 arg void func_808FD5C4(BossGanon2* this, GlobalContext* globalCtx) { this->actionFunc = func_808FD5F4; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; this->actor.world.pos.y = -3000.0f; } @@ -873,7 +873,7 @@ void func_808FD5F4(BossGanon2* this, GlobalContext* globalCtx) { this->unk_337 = 1; func_808FFDB0(this, globalCtx); this->unk_1A2[1] = 50; - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0; sZelda->unk_3C8 = 7; } break; @@ -1044,7 +1044,7 @@ void func_808FFDB0(BossGanon2* this, GlobalContext* globalCtx) { } this->unk_336 = 1; - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0; this->unk_228 = 1.0f; this->unk_224 = 1.0f; } else { diff --git a/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c b/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c index fc190e6b36..48fa61db56 100644 --- a/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c +++ b/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c @@ -12,7 +12,7 @@ #include "overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h" #include "overlays/actors/ovl_Door_Warp1/z_door_warp1.h" -#define FLAGS 0x00000035 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4 | ACTOR_FLAG_5) typedef enum { /* 0 */ NOT_DEAD, @@ -296,7 +296,7 @@ void BossGanondrof_Init(Actor* thisx, GlobalContext* globalCtx) { Collider_InitCylinder(globalCtx, &this->colliderSpear); Collider_SetCylinder(globalCtx, &this->colliderBody, &this->actor, &sCylinderInitBody); Collider_SetCylinder(globalCtx, &this->colliderSpear, &this->actor, &sCylinderInitSpear); - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; if (Flags_GetClear(globalCtx, globalCtx->roomCtx.curRoom.num)) { Actor_Kill(&this->actor); Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_DOOR_WARP1, GND_BOSSROOM_CENTER_X, GND_BOSSROOM_CENTER_Y, @@ -438,7 +438,7 @@ void BossGanondrof_Paintings(BossGanondrof* this, GlobalContext* globalCtx) { EnfHG* horseTemp; Animation_MorphToPlayOnce(&this->skelAnime, &gPhantomGanonRideSpearRaiseAnim, -2.0f); - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0; horseTemp = (EnfHG*)this->actor.child; Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_EN_FHG_FIRE, this->spearTip.x, this->spearTip.y, this->spearTip.z, 30, FHGFIRE_LIGHT_GREEN, 0, FHGFIRE_SPEAR_LIGHT); @@ -449,7 +449,7 @@ void BossGanondrof_Paintings(BossGanondrof* this, GlobalContext* globalCtx) { Animation_MorphToPlayOnce(&this->skelAnime, &gPhantomGanonRideSpearResetAnim, -2.0f); } else if (horse->bossGndSignal == FHG_RIDE) { Animation_MorphToLoop(&this->skelAnime, &gPhantomGanonRideAnim, -2.0f); - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; } osSyncPrintf("RUN 3\n"); @@ -476,7 +476,7 @@ void BossGanondrof_Paintings(BossGanondrof* this, GlobalContext* globalCtx) { void BossGanondrof_SetupNeutral(BossGanondrof* this, f32 arg1) { Animation_MorphToLoop(&this->skelAnime, &gPhantomGanonNeutralAnim, arg1); this->actionFunc = BossGanondrof_Neutral; - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0; this->fwork[GND_FLOAT_SPEED] = 0.0f; this->timers[0] = (s16)(Rand_ZeroOne() * 64.0f) + 30; } @@ -748,7 +748,7 @@ void BossGanondrof_Stunned(BossGanondrof* this, GlobalContext* globalCtx) { Audio_PlayActorSound2(&this->actor, NA_SE_EN_FANTOM_DAMAGE2); } - this->actor.flags |= 0x400; + this->actor.flags |= ACTOR_FLAG_10; } osSyncPrintf("TIME0 %d ********************************************\n", this->timers[0]); @@ -931,7 +931,7 @@ void BossGanondrof_SetupDeath(BossGanondrof* this, GlobalContext* globalCtx) { Audio_QueueSeqCmd(0x1 << 28 | SEQ_PLAYER_BGM_MAIN << 24 | 0x100FF); Audio_PlayActorSound2(&this->actor, NA_SE_EN_FANTOM_DEAD); this->deathState = DEATH_START; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; this->work[GND_VARIANCE_TIMER] = 0; this->shockTimer = 50; } @@ -1295,7 +1295,7 @@ void BossGanondrof_Update(Actor* thisx, GlobalContext* globalCtx) { EnfHG* horse; osSyncPrintf("MOVE START %d\n", this->actor.params); - this->actor.flags &= ~0x400; + this->actor.flags &= ~ACTOR_FLAG_10; this->colliderBody.base.colType = COLTYPE_HIT3; if (this->killActor) { Actor_Kill(&this->actor); diff --git a/src/overlays/actors/ovl_Boss_Goma/z_boss_goma.c b/src/overlays/actors/ovl_Boss_Goma/z_boss_goma.c index 787759c0f8..9c9d6f576c 100644 --- a/src/overlays/actors/ovl_Boss_Goma/z_boss_goma.c +++ b/src/overlays/actors/ovl_Boss_Goma/z_boss_goma.c @@ -4,7 +4,7 @@ #include "overlays/actors/ovl_Door_Shutter/z_door_shutter.h" #include "overlays/actors/ovl_Door_Warp1/z_door_warp1.h" -#define FLAGS 0x00000035 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4 | ACTOR_FLAG_5) // IRIS_FOLLOW: gohma looks towards the player (iris rotation) // BONUS_IFRAMES: gain invincibility frames when the player does something (throwing things?), or @@ -402,7 +402,7 @@ void BossGoma_SetupDefeated(BossGoma* this, GlobalContext* globalCtx) { this->noBackfaceCulling = false; this->framesUntilNextAction = 1200; this->actionState = 0; - this->actor.flags &= ~5; + this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_2); this->actor.speedXZ = 0.0f; this->actor.shape.shadowScale = 0.0f; Audio_QueueSeqCmd(0x1 << 28 | SEQ_PLAYER_BGM_MAIN << 24 | 0x100FF); @@ -626,7 +626,7 @@ void BossGoma_SetupEncounterState4(BossGoma* this, GlobalContext* globalCtx) { camera = Gameplay_GetCamera(globalCtx, 0); player = GET_PLAYER(globalCtx); this->actionState = 4; - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0; func_80064520(globalCtx, &globalCtx->csCtx); func_8002DF54(globalCtx, &this->actor, 1); this->subCameraId = Gameplay_CreateSubCamera(globalCtx); @@ -716,7 +716,7 @@ void BossGoma_Encounter(BossGoma* this, GlobalContext* globalCtx) { this->framesUntilNextAction = 50; this->timer = 80; this->frameCount = 0; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; // fall-through case 2: // zoom on player from room center // room entrance, towards center @@ -1296,7 +1296,7 @@ void BossGoma_FloorPrepareAttack(BossGoma* this, GlobalContext* globalCtx) { void BossGoma_FloorAttack(BossGoma* this, GlobalContext* globalCtx) { s16 i; - this->actor.flags |= 0x1000000; + this->actor.flags |= ACTOR_FLAG_24; SkelAnime_Update(&this->skelanime); switch (this->actionState) { diff --git a/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c b/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c index 685a29029d..9fa4ec1b7a 100644 --- a/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c +++ b/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c @@ -10,7 +10,7 @@ #include "objects/gameplay_keep/gameplay_keep.h" #include "vt.h" -#define FLAGS 0x00000035 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4 | ACTOR_FLAG_5) #define MO_WATER_LEVEL(globalCtx) globalCtx->colCtx.colHeader->waterBoxes[0].ySurface @@ -552,7 +552,7 @@ void BossMo_Tentacle(BossMo* this, GlobalContext* globalCtx) { } switch (this->work[MO_TENT_ACTION_STATE]) { case MO_TENT_WAIT: - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; if (this == sMorphaTent2) { this->work[MO_TENT_ACTION_STATE] = MO_TENT_SPAWN; this->timers[0] = 70; @@ -646,7 +646,7 @@ void BossMo_Tentacle(BossMo* this, GlobalContext* globalCtx) { } break; case MO_TENT_ATTACK: - this->actor.flags |= 0x1000000; + this->actor.flags |= ACTOR_FLAG_24; func_80078914(&this->tentTipPos, NA_SE_EN_MOFER_ATTACK - SFX_FLAG); Math_ApproachF(&this->waterLevelMod, -5.0f, 0.1f, 0.4f); for (indS1 = 0; indS1 < 41; indS1++) { @@ -916,7 +916,7 @@ void BossMo_Tentacle(BossMo* this, GlobalContext* globalCtx) { Math_ApproachF(&this->tentMaxAngle, 0.5f, 1.0f, 0.01); Math_ApproachF(&this->tentSpeed, 320.0f, 1.0f, 50.0f); if (this->timers[0] == 0) { - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; Math_ApproachF(&this->baseAlpha, 0.0, 1.0f, 5.0f); for (indS1 = 0; indS1 < 40; indS1++) { if (sMorphaTent2->tentSpawnPos) {} @@ -961,7 +961,7 @@ void BossMo_Tentacle(BossMo* this, GlobalContext* globalCtx) { } break; case MO_TENT_DESPAWN: - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; Math_ApproachF(&this->baseAlpha, 0, 1.0f, 5.0f); if ((this->baseAlpha <= 0.5f) && (this->timers[0] == 0)) { this->meltIndex = 0; @@ -988,7 +988,7 @@ void BossMo_Tentacle(BossMo* this, GlobalContext* globalCtx) { case MO_TENT_DEATH_3: this->baseBubblesTimer = 20; Math_ApproachF(&sMorphaCore->waterLevel, -300.0f, 0.1f, 0.8f); - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; for (indS1 = 0; indS1 < 41; indS1++) { sin = Math_SinS(((s16)this->fwork[MO_TENT_SWING_LAG_X] * indS1) + this->xSwing); tempf1 = this->fwork[MO_TENT_SWING_SIZE_X] * (indS1 * 0.025f * sin); @@ -1349,8 +1349,8 @@ void BossMo_IntroCs(BossMo* this, GlobalContext* globalCtx) { this->cameraZoom = 60.0f; this->actor.world.pos = sMorphaTent1->actor.world.pos; this->work[MO_TENT_ACTION_STATE] = MO_CORE_INTRO_REVEAL; - this->actor.flags &= ~1; - sMorphaTent1->actor.flags |= 1; + this->actor.flags &= ~ACTOR_FLAG_0; + sMorphaTent1->actor.flags |= ACTOR_FLAG_0; } else { sMorphaTent1->xSwing = 0xCEC; sMorphaTent1->fwork[MO_TENT_SWING_RATE_X] = 0.0f; @@ -1558,7 +1558,7 @@ void BossMo_DeathCs(BossMo* this, GlobalContext* globalCtx) { Rand_ZeroFloat(0.08f) + 0.13f); } this->drawActor = false; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; Audio_PlayActorSound2(&this->actor, NA_SE_EN_MOFER_CORE_JUMP); Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 70, NA_SE_EN_MOFER_LASTVOICE); } @@ -1796,7 +1796,7 @@ void BossMo_CoreCollisionCheck(BossMo* this, GlobalContext* globalCtx) { sMorphaTent1->cutScale = 1.0f; sMorphaTent1->work[MO_TENT_ACTION_STATE] = MO_TENT_CUT; sMorphaTent1->timers[0] = 40; - sMorphaTent1->actor.flags &= ~1; + sMorphaTent1->actor.flags &= ~ACTOR_FLAG_0; if (player->actor.parent == &sMorphaTent1->actor) { player->unk_850 = 0x65; player->actor.parent = NULL; @@ -1870,7 +1870,7 @@ void BossMo_Core(BossMo* this, GlobalContext* globalCtx) { if ((this->csState != MO_BATTLE) && (this->csState < MO_DEATH_START)) { BossMo_IntroCs(this, globalCtx); if (this->work[MO_TENT_ACTION_STATE] == MO_CORE_INTRO_WAIT) { - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; return; } } else if (this->csState >= MO_DEATH_START) { @@ -1903,7 +1903,7 @@ void BossMo_Core(BossMo* this, GlobalContext* globalCtx) { } switch (this->work[MO_TENT_ACTION_STATE]) { case MO_CORE_MOVE: - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0; if ((this->timers[0] == 0) && ((sMorphaTent1->work[MO_TENT_ACTION_STATE] == MO_TENT_WAIT) || (sMorphaTent1->work[MO_TENT_ACTION_STATE] == MO_TENT_READY)) && @@ -1942,7 +1942,7 @@ void BossMo_Core(BossMo* this, GlobalContext* globalCtx) { } break; case MO_CORE_STUNNED: - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0; if (this->timers[0] == 0) { this->work[MO_TENT_ACTION_STATE] = MO_CORE_MOVE; this->timers[0] = 30; @@ -1959,7 +1959,7 @@ void BossMo_Core(BossMo* this, GlobalContext* globalCtx) { if (this->timers[0] == 0) { switch (this->work[MO_TENT_ACTION_STATE]) { case MO_CORE_ATTACK: - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0; this->work[MO_CORE_POS_IN_TENT]++; if (sMorphaTent1->work[MO_TENT_ACTION_STATE] == MO_TENT_ATTACK) { temp = (s16)(Math_SinS(this->work[MO_TENT_MOVE_TIMER] * 0x300) * 10.0f) + 15; @@ -1984,7 +1984,7 @@ void BossMo_Core(BossMo* this, GlobalContext* globalCtx) { this->timers[0] = 0; break; case MO_CORE_INTRO_REVEAL: - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; this->work[MO_CORE_POS_IN_TENT]++; temp = (s16)(Math_SinS(this->work[MO_TENT_MOVE_TIMER] * 0x500) * 10.0f) + 15; if (this->work[MO_CORE_POS_IN_TENT] >= temp) { @@ -2212,7 +2212,7 @@ void BossMo_UpdateCore(Actor* thisx, GlobalContext* globalCtx) { } else { MO_WATER_LEVEL(globalCtx) = sMorphaTent2->waterLevelMod + ((s16)this->waterLevel + sMorphaTent1->waterLevelMod); } - this->actor.flags |= 0x200; + this->actor.flags |= ACTOR_FLAG_9; this->actor.focus.pos = this->actor.world.pos; this->work[MO_TENT_VAR_TIMER]++; @@ -2241,7 +2241,7 @@ void BossMo_UpdateCore(Actor* thisx, GlobalContext* globalCtx) { } BossMo_UpdateEffects(this, globalCtx); if (player->actor.parent != NULL) { - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; } BossMo_Unknown(); } diff --git a/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c b/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c index 1c0ea7034d..b50b2daf2f 100644 --- a/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c +++ b/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c @@ -10,7 +10,7 @@ #include "overlays/actors/ovl_Bg_Sst_Floor/z_bg_sst_floor.h" #include "overlays/actors/ovl_Door_Warp1/z_door_warp1.h" -#define FLAGS 0x00000435 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4 | ACTOR_FLAG_5 | ACTOR_FLAG_10) #define vParity actionVar #define vVanish actionVar @@ -304,7 +304,7 @@ void BossSst_Init(Actor* thisx, GlobalContext* globalCtx2) { sHands[LEFT]->actor.child = &sHands[RIGHT]->actor; sHands[RIGHT]->actor.child = &sHands[LEFT]->actor; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; this->actor.update = BossSst_UpdateHead; this->actor.draw = BossSst_DrawHead; this->radius = -650.0f; @@ -329,7 +329,7 @@ void BossSst_Init(Actor* thisx, GlobalContext* globalCtx2) { ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 95.0f); this->handZPosMod = -3500; this->actor.targetArrowOffset = 5000.0f; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; BossSst_HandSetupWait(this); } } @@ -402,8 +402,8 @@ void BossSst_HeadIntro(BossSst* this, GlobalContext* globalCtx) { } if (this->timer == 0) { - sHands[RIGHT]->actor.flags |= 1; - sHands[LEFT]->actor.flags |= 1; + sHands[RIGHT]->actor.flags |= ACTOR_FLAG_0; + sHands[LEFT]->actor.flags |= ACTOR_FLAG_0; player->stateFlags1 &= ~0x20; func_80064534(globalCtx, &globalCtx->csCtx); func_8002DF54(globalCtx, &this->actor, 7); @@ -577,7 +577,7 @@ void BossSst_HeadIntro(BossSst* this, GlobalContext* globalCtx) { sCameraEye.y += 400.0f * 0.01f; sCameraEye.z += 1550.0f * 0.01f; this->vVanish = true; - this->actor.flags |= 0x80; + this->actor.flags |= ACTOR_FLAG_7; } else if (revealStateTimer < 40) { sCameraAt.x += 125.0f * 0.01f; sCameraAt.y += 350.0f * 0.01f; @@ -813,7 +813,7 @@ void BossSst_HeadSetupStunned(BossSst* this) { this->colliderJntSph.base.atFlags &= ~(AT_ON | AT_HIT); this->colliderCyl.base.acFlags &= ~AC_ON; this->vVanish = false; - this->actor.flags &= ~0x80; + this->actor.flags &= ~ACTOR_FLAG_7; BossSst_HeadSfx(this, NA_SE_EN_SHADEST_FREEZE); this->actionFunc = BossSst_HeadStunned; } @@ -881,7 +881,7 @@ void BossSst_HeadVulnerable(BossSst* this, GlobalContext* globalCtx) { Math_StepToF(&sHandOffsets[RIGHT].z, 600.0f, 20.0f); Math_StepToF(&sHandOffsets[LEFT].x, 200.0f, 20.0f); Math_StepToF(&sHandOffsets[RIGHT].x, -200.0f, 20.0f); - if ((this->actor.flags & 0x2000) == 0x2000) { + if (CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_13)) { this->timer += 2; this->timer = CLAMP_MAX(this->timer, 50); } else { @@ -1386,7 +1386,7 @@ void BossSst_HandSetupRetreat(BossSst* this) { Animation_MorphToPlayOnce(&this->skelAnime, sHandHangPoses[this->actor.params], 10.0f); this->colliderJntSph.base.atFlags &= ~(AT_ON | AT_HIT); this->colliderJntSph.base.acFlags |= AC_ON; - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0; BossSst_HandSetInvulnerable(this, false); this->timer = 0; this->actionFunc = BossSst_HandRetreat; @@ -2039,7 +2039,7 @@ void BossSst_HandShake(BossSst* this, GlobalContext* globalCtx) { this->timer = 80; } } else if (this->timer == 0) { - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0; BossSst_HandSetupSlam(this); } } @@ -2519,7 +2519,7 @@ void BossSst_HandCollisionCheck(BossSst* this, GlobalContext* globalCtx) { BossSst_HandSetupRetreat(OTHER_HAND(this)); } - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; if (this->actor.colChkInfo.damageEffect == 3) { BossSst_HandSetupFrozen(this); } else { @@ -2635,9 +2635,9 @@ void BossSst_UpdateHead(Actor* thisx, GlobalContext* globalCtx) { this->actionFunc(this, globalCtx); if (this->vVanish) { if ((globalCtx->actorCtx.unk_03 == 0) || (thisx->colorFilterTimer != 0)) { - this->actor.flags &= ~0x80; + this->actor.flags &= ~ACTOR_FLAG_7; } else { - this->actor.flags |= 0x80; + this->actor.flags |= ACTOR_FLAG_7; } } @@ -2657,13 +2657,13 @@ void BossSst_UpdateHead(Actor* thisx, GlobalContext* globalCtx) { } BossSst_MoveAround(this); - if ((!this->vVanish || ((this->actor.flags & 0x80) == 0x80)) && + if ((!this->vVanish || CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_7)) && ((this->actionFunc == BossSst_HeadReadyCharge) || (this->actionFunc == BossSst_HeadCharge) || (this->actionFunc == BossSst_HeadFrozenHand) || (this->actionFunc == BossSst_HeadStunned) || (this->actionFunc == BossSst_HeadVulnerable) || (this->actionFunc == BossSst_HeadDamage))) { - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0; } else { - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; } if (this->actionFunc == BossSst_HeadCharge) { @@ -2766,7 +2766,7 @@ s32 BossSst_OverrideHeadDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dLis s32 timer12; f32 shakeMod; - if (((this->actor.flags & 0x80) != 0x80) && this->vVanish) { + if (!CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_7) && this->vVanish) { *dList = NULL; } else if (this->actionFunc == BossSst_HeadThrash) { // Animation modifications for death cutscene shakeAmp = (this->timer / 10) + 1; @@ -2857,7 +2857,7 @@ void BossSst_DrawHead(Actor* thisx, GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_boss_sst.c", 6810); - if ((this->actor.flags & 0x80) != 0x80) { + if (!CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_7)) { func_80093D18(globalCtx->state.gfxCtx); gDPSetPrimColor(POLY_OPA_DISP++, 0x00, 0x80, sBodyColor.r, sBodyColor.g, sBodyColor.b, 255); if (!sBodyStatic) { @@ -2884,7 +2884,7 @@ void BossSst_DrawHead(Actor* thisx, GlobalContext* globalCtx) { Matrix_RotateY(-randYaw, MTXMODE_APPLY); } - if ((this->actor.flags & 0x80) != 0x80) { + if (!CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_7)) { POLY_OPA_DISP = SkelAnime_DrawFlex(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, BossSst_OverrideHeadDraw, BossSst_PostHeadDraw, this, POLY_OPA_DISP); diff --git a/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c b/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c index 4070a95c56..48488dc985 100644 --- a/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c +++ b/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c @@ -3,7 +3,7 @@ #include "objects/object_tw/object_tw.h" #include "overlays/actors/ovl_Door_Warp1/z_door_warp1.h" -#define FLAGS 0x00000035 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4 | ACTOR_FLAG_5) typedef enum { /* 0 */ TWEFF_NONE, @@ -456,7 +456,7 @@ void BossTw_Init(Actor* thisx, GlobalContext* globalCtx2) { Actor_SetScale(&this->actor, 0.01f); this->actor.update = BossTw_BlastUpdate; this->actor.draw = BossTw_BlastDraw; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; Collider_InitCylinder(globalCtx, &this->collider); Collider_SetCylinder(globalCtx, &this->collider, &this->actor, &sCylinderInitBlasts); @@ -645,7 +645,7 @@ void BossTw_SetupFlyTo(BossTw* this, GlobalContext* globalCtx) { BossTw* otherTw = (BossTw*)this->actor.parent; this->unk_5F8 = 1; - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0; this->actionFunc = BossTw_FlyTo; this->rotateSpeed = 0.0f; Animation_MorphToLoop(&this->skelAnime, &object_tw_Anim_006F28, -10.0f); @@ -1469,7 +1469,7 @@ void BossTw_SetupWait(BossTw* this, GlobalContext* globalCtx) { this->actionFunc = BossTw_Wait; this->visible = false; this->actor.world.pos.y = -2000.0f; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; } void BossTw_Wait(BossTw* this, GlobalContext* globalCtx) { @@ -1631,7 +1631,7 @@ void BossTw_TwinrovaMergeCS(BossTw* this, GlobalContext* globalCtx) { this->csState1 = 1; this->visible = true; - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0; this->actor.shape.rot.y = 0; BossTw_SetupWait(sKotakePtr, globalCtx); BossTw_SetupWait(sKoumePtr, globalCtx); @@ -1752,7 +1752,7 @@ void BossTw_SetupCSWait(BossTw* this, GlobalContext* globalCtx) { this->actionFunc = BossTw_CSWait; this->visible = false; this->actor.world.pos.y = -2000.0f; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; } /** @@ -1765,7 +1765,7 @@ void BossTw_TwinrovaSetupIntroCS(BossTw* this, GlobalContext* globalCtx) { this->actionFunc = BossTw_TwinrovaIntroCS; this->visible = false; this->actor.world.pos.y = -2000.0f; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; } void BossTw_TwinrovaIntroCS(BossTw* this, GlobalContext* globalCtx) { @@ -2372,7 +2372,7 @@ void BossTw_TwinrovaSetupDeathCS(BossTw* this, GlobalContext* globalCtx) { this->actionFunc = BossTw_TwinrovaDeathCS; Animation_MorphToLoop(&this->skelAnime, &object_tw_Anim_024374, -3.0f); this->actor.world.rot.y = this->actor.shape.rot.y; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; this->csState2 = this->csState1 = 0; this->work[CS_TIMER_1] = this->work[CS_TIMER_2] = 0; this->work[INVINC_TIMER] = 10000; @@ -2672,7 +2672,7 @@ void BossTw_TwinrovaDeathCS(BossTw* this, GlobalContext* globalCtx) { Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_BOSS_TW, this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, TW_DEATHBALL_KOTAKE); - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; } } Actor_SetScale(&this->actor, this->actor.scale.x); @@ -2725,7 +2725,7 @@ void BossTw_TwinrovaDeathCS(BossTw* this, GlobalContext* globalCtx) { sKoumePtr->work[YAW_TGT] = sKotakePtr->work[YAW_TGT] = sKoumePtr->actor.shape.rot.x = sKotakePtr->actor.shape.rot.x = sKoumePtr->actor.shape.rot.y = sKotakePtr->actor.shape.rot.y = 0; func_8002DF54(globalCtx, &sKoumePtr->actor, 1); - sKoumePtr->actor.flags |= 1; + sKoumePtr->actor.flags |= ACTOR_FLAG_0; } break; case 2: @@ -2974,7 +2974,7 @@ void BossTw_TwinrovaUpdate(Actor* thisx, GlobalContext* globalCtx2) { BossTw* this = (BossTw*)thisx; Player* player = GET_PLAYER(globalCtx); - this->actor.flags &= ~0x400; + this->actor.flags &= ~ACTOR_FLAG_10; this->unk_5F8 = 0; this->collider.base.colType = COLTYPE_HIT3; @@ -5285,7 +5285,7 @@ void BossTw_TwinrovaStun(BossTw* this, GlobalContext* globalCtx) { s16 cloudType; this->unk_5F8 = 1; - this->actor.flags |= 0x400; + this->actor.flags |= ACTOR_FLAG_10; cloudType = sTwinrovaBlastType == 0 ? 3 : 2; diff --git a/src/overlays/actors/ovl_Boss_Va/z_boss_va.c b/src/overlays/actors/ovl_Boss_Va/z_boss_va.c index 3ec74786e2..b2b33266da 100644 --- a/src/overlays/actors/ovl_Boss_Va/z_boss_va.c +++ b/src/overlays/actors/ovl_Boss_Va/z_boss_va.c @@ -9,7 +9,7 @@ #include "overlays/actors/ovl_En_Boom/z_en_boom.h" #include "objects/gameplay_keep/gameplay_keep.h" -#define FLAGS 0x00000035 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4 | ACTOR_FLAG_5) #define GET_BODY(this) ((BossVa*)(this)->actor.parent) #define vaGorePulse offset.x @@ -587,7 +587,7 @@ void BossVa_Init(Actor* thisx, GlobalContext* globalCtx2) { switch (this->actor.params) { case BOSSVA_BODY: SkelAnime_Init(globalCtx, &this->skelAnime, &gBarinadeBodySkel, &gBarinadeBodyAnim, NULL, NULL, 0); - this->actor.flags |= 0x1000000; + this->actor.flags |= ACTOR_FLAG_24; break; case BOSSVA_SUPPORT_1: case BOSSVA_SUPPORT_2: @@ -607,7 +607,7 @@ void BossVa_Init(Actor* thisx, GlobalContext* globalCtx2) { SkelAnime_InitFlex(globalCtx, &this->skelAnime, &gBarinadeStumpSkel, &gBarinadeStumpAnim, NULL, NULL, 0); break; default: - this->actor.flags |= 0x1000000; + this->actor.flags |= ACTOR_FLAG_24; SkelAnime_Init(globalCtx, &this->skelAnime, &gBarinadeBariSkel, &gBarinadeBariAnim, NULL, NULL, 0); this->actor.shape.yOffset = 400.0f; break; @@ -757,7 +757,7 @@ void BossVa_SetupIntro(BossVa* this) { Animation_Change(&this->skelAnime, &gBarinadeBodyAnim, 1.0f, lastFrame, lastFrame, ANIMMODE_ONCE, 0.0f); this->actor.shape.yOffset = -450.0f; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; BossVa_SetupAction(this, BossVa_BodyIntro); } @@ -1049,7 +1049,7 @@ void BossVa_SetupBodyPhase1(BossVa* this) { Animation_Change(&this->skelAnime, &gBarinadeBodyAnim, 1.0f, lastFrame, lastFrame, ANIMMODE_ONCE, 0.0f); this->actor.shape.yOffset = -450.0f; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; this->timer = 25; sBodyState = 0x80; BossVa_SetupAction(this, BossVa_BodyPhase1); @@ -1116,7 +1116,7 @@ void BossVa_SetupBodyPhase2(BossVa* this, GlobalContext* globalCtx) { } this->invincibilityTimer = 0; - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0; BossVa_SetupAction(this, BossVa_BodyPhase2); } @@ -1182,10 +1182,10 @@ void BossVa_BodyPhase2(BossVa* this, GlobalContext* globalCtx) { Math_SmoothStepToS(&this->actor.shape.rot.z, this->actor.world.rot.z, 1, 0xC8, 0); Math_SmoothStepToF(&this->actor.shape.yOffset, -1000.0f, 1.0f, 20.0f, 0.0f); if (!(sPhase2Timer & 0x100)) { - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0; this->actor.speedXZ = 1.0f; } else { - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; this->actor.speedXZ = 0.0f; } @@ -1248,7 +1248,7 @@ void BossVa_BodyPhase3(BossVa* this, GlobalContext* globalCtx) { Audio_PlayActorSound2(&this->actor, NA_SE_EN_BALINADE_FAINT); sBodyState = 1; this->timer = 131; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; } else { sBodyState = 0; if (this->timer == 0) { @@ -1258,7 +1258,7 @@ void BossVa_BodyPhase3(BossVa* this, GlobalContext* globalCtx) { } Math_SmoothStepToF(&this->actor.speedXZ, 3.0f, 1.0f, 0.15f, 0.0f); } - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0; } else { this->timer--; if (this->timer < 35) { @@ -1333,7 +1333,7 @@ void BossVa_BodyPhase3(BossVa* this, GlobalContext* globalCtx) { void BossVa_SetupBodyPhase4(BossVa* this, GlobalContext* globalCtx) { this->unk_1AC = 0; - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0; this->vaBodySpinRate = this->unk_1AC; this->actor.world.rot.y = this->actor.yawTowardsPlayer; this->timer2 = (s16)(Rand_ZeroOne() * 150.0f) + 300; @@ -1512,7 +1512,7 @@ void BossVa_BodyPhase4(BossVa* this, GlobalContext* globalCtx) { void BossVa_SetupBodyDeath(BossVa* this, GlobalContext* globalCtx) { func_800F436C(&this->actor.projectedPos, NA_SE_EN_BALINADE_LEVEL - SFX_FLAG, 1.0f); - this->actor.flags &= ~5; + this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_2); Audio_QueueSeqCmd(0x1 << 28 | SEQ_PLAYER_BGM_MAIN << 24 | 0x100FF); this->vaCamRotMod = 0xC31; sCsState = DEATH_START; @@ -1802,7 +1802,7 @@ void BossVa_SupportCut(BossVa* this, GlobalContext* globalCtx) { lastFrame = Animation_GetLastFrame(&gBarinadeSupportDetachedAnim); Animation_Change(&this->skelAnime, &gBarinadeSupportDetachedAnim, 1.0f, 0.0f, lastFrame, ANIMMODE_LOOP_INTERP, 0.0f); - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; } if ((this->timer == 0) && (sCsState < DEATH_START)) { @@ -1856,7 +1856,7 @@ void BossVa_SupportCut(BossVa* this, GlobalContext* globalCtx) { void BossVa_SetupStump(BossVa* this, GlobalContext* globalCtx) { Animation_Change(&this->skelAnime, &gBarinadeStumpAnim, 1.0f, 0.0f, Animation_GetLastFrame(&gBarinadeStumpAnim), ANIMMODE_ONCE, 0.0f); - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; BossVa_SetupAction(this, BossVa_Stump); } @@ -1875,7 +1875,7 @@ void BossVa_SetupZapperIntro(BossVa* this, GlobalContext* globalCtx) { Animation_Change(&this->skelAnime, &gBarinadeZapperIdleAnim, 1.0f, lastFrame - 1.0f, lastFrame, ANIMMODE_LOOP_INTERP, -6.0f); - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; BossVa_SetupAction(this, BossVa_ZapperIntro); } @@ -1902,7 +1902,7 @@ void BossVa_SetupZapperAttack(BossVa* this, GlobalContext* globalCtx) { Animation_Change(&this->skelAnime, &gBarinadeZapperIdleAnim, 1.0f, lastFrame - 1.0f, lastFrame, ANIMMODE_LOOP_INTERP, -6.0f); - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; BossVa_SetupAction(this, BossVa_ZapperAttack); } @@ -2399,7 +2399,7 @@ void BossVa_SetupBariIntro(BossVa* this, GlobalContext* globalCtx) { this->actor.world.pos.y = sInitPosOffsets[this->actor.params + 10].y + this->actor.home.pos.y; this->actor.world.pos.z = sInitPosOffsets[this->actor.params + 10].z + this->actor.home.pos.z; this->timer = 45; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; BossVa_SetupAction(this, BossVa_BariIntro); } @@ -2520,7 +2520,7 @@ void BossVa_SetupBariPhase3Attack(BossVa* this, GlobalContext* globalCtx) { this->unk_1F0 = 0x78; this->unk_1A0 = 60.0f; this->unk_1A8 = 0.0f; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; BossVa_SetupAction(this, BossVa_BariPhase3Attack); } @@ -2607,7 +2607,7 @@ void BossVa_SetupBariPhase2Attack(BossVa* this, GlobalContext* globalCtx) { this->unk_1F0 = 0x78; this->unk_1A0 = 60.0f; this->unk_1A8 = 0.0f; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; BossVa_SetupAction(this, BossVa_BariPhase2Attack); } @@ -2657,7 +2657,7 @@ void BossVa_BariPhase2Attack(BossVa* this, GlobalContext* globalCtx) { if (!(sPhase2Timer & 0x100) && (GET_BODY(this)->actor.colorFilterTimer == 0)) { sp4C = 200.0f; BossVa_Spark(globalCtx, this, 1, 125, 15.0f, 7.0f, SPARK_TETHER, 1.0f, true); - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; if (this->actor.params & 1) { sp4C = -200.0f; } @@ -2680,7 +2680,7 @@ void BossVa_BariPhase2Attack(BossVa* this, GlobalContext* globalCtx) { CollisionCheck_SetAT(globalCtx, &globalCtx->colChkCtx, &this->colliderLightning.base); CollisionCheck_SetAT(globalCtx, &globalCtx->colChkCtx, &this->colliderSph.base); } else { - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0; Math_SmoothStepToS(&this->unk_1AC, sp50 + 150, 1, 0x3C, 0); if (GET_BODY(this)->actor.colorFilterTimer == 0) { Math_SmoothStepToF(&this->unk_1A0, 180.0f, 1.0f, 1.5f, 0.0f); @@ -2720,7 +2720,7 @@ void BossVa_BariPhase2Attack(BossVa* this, GlobalContext* globalCtx) { } void BossVa_SetupBariPhase3Stunned(BossVa* this, GlobalContext* globalCtx) { - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0; this->timer = GET_BODY(this)->timer; Actor_SetColorFilter(&this->actor, 0, 255, 0x2000, this->timer); BossVa_SetupAction(this, BossVa_BariPhase3Stunned); @@ -2753,7 +2753,7 @@ void BossVa_BariPhase3Stunned(BossVa* this, GlobalContext* globalCtx) { } else { BossVa_Spark(globalCtx, this, 1, 85, 15.0f, 0.0f, SPARK_TETHER, 1.0f, true); if (this->timer2 >= 0x10) { - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; this->timer2 = 0x80; BossVa_SetupAction(this, BossVa_BariPhase3Attack); } @@ -2762,7 +2762,7 @@ void BossVa_BariPhase3Stunned(BossVa* this, GlobalContext* globalCtx) { } void BossVa_SetupBariDeath(BossVa* this) { - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; this->timer = 30; Audio_PlayActorSound2(&this->actor, NA_SE_EN_BALINADE_BL_DEAD); this->isDead++; @@ -2780,7 +2780,7 @@ void BossVa_SetupDoor(BossVa* this, GlobalContext* globalCtx) { if (sCsState >= INTRO_SPAWN_BARI) { sDoorState = 100; } - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; BossVa_SetupAction(this, BossVa_Door); } diff --git a/src/overlays/actors/ovl_Demo_6K/z_demo_6k.c b/src/overlays/actors/ovl_Demo_6K/z_demo_6k.c index adaa8bff73..c1ff910a78 100644 --- a/src/overlays/actors/ovl_Demo_6K/z_demo_6k.c +++ b/src/overlays/actors/ovl_Demo_6K/z_demo_6k.c @@ -11,7 +11,7 @@ #include "objects/object_gnd_magic/object_gnd_magic.h" #include "overlays/actors/ovl_Eff_Dust/z_eff_dust.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 void Demo6K_Init(Actor* thisx, GlobalContext* globalCtx); void Demo6K_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -162,7 +162,7 @@ void Demo6K_Init(Actor* thisx, GlobalContext* globalCtx) { case 17: case 18: case 19: - this->actor.flags |= 0x20; + this->actor.flags |= ACTOR_FLAG_5; this->drawFunc = func_8096865C; this->initActionFunc = func_80967410; this->flags |= 1; diff --git a/src/overlays/actors/ovl_Demo_Du/z_demo_du.c b/src/overlays/actors/ovl_Demo_Du/z_demo_du.c index fff44c57fe..1a5a76b636 100644 --- a/src/overlays/actors/ovl_Demo_Du/z_demo_du.c +++ b/src/overlays/actors/ovl_Demo_Du/z_demo_du.c @@ -4,7 +4,7 @@ #include "overlays/actors/ovl_Door_Warp1/z_door_warp1.h" #include "vt.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 typedef void (*DemoDuActionFunc)(DemoDu*, GlobalContext*); typedef void (*DemoDuDrawFunc)(Actor*, GlobalContext*); diff --git a/src/overlays/actors/ovl_Demo_Ec/z_demo_ec.c b/src/overlays/actors/ovl_Demo_Ec/z_demo_ec.c index 1a7d7fd72b..6845dd9b69 100644 --- a/src/overlays/actors/ovl_Demo_Ec/z_demo_ec.c +++ b/src/overlays/actors/ovl_Demo_Ec/z_demo_ec.c @@ -37,7 +37,7 @@ #include "objects/object_bba/object_bba.h" #include "objects/object_ane/object_ane.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 void DemoEc_Init(Actor* thisx, GlobalContext* globalCtx); void DemoEc_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Demo_Effect/z_demo_effect.c b/src/overlays/actors/ovl_Demo_Effect/z_demo_effect.c index 10c7128c06..e54285d8cc 100644 --- a/src/overlays/actors/ovl_Demo_Effect/z_demo_effect.c +++ b/src/overlays/actors/ovl_Demo_Effect/z_demo_effect.c @@ -10,7 +10,7 @@ #include "objects/object_efc_tw/object_efc_tw.h" #include "objects/object_gi_jewel/object_gi_jewel.h" -#define FLAGS 0x00000030 +#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) void DemoEffect_Init(Actor* thisx, GlobalContext* globalCtx); void DemoEffect_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -457,7 +457,7 @@ void DemoEffect_Init(Actor* thisx, GlobalContext* globalCtx2) { case DEMO_EFFECT_TIMEWARP_TIMEBLOCK_LARGE: case DEMO_EFFECT_TIMEWARP_TIMEBLOCK_SMALL: - this->actor.flags |= 0x2000000; + this->actor.flags |= ACTOR_FLAG_25; case DEMO_EFFECT_TIMEWARP_MASTERSWORD: this->initDrawFunc = DemoEffect_DrawTimeWarp; this->initUpdateFunc = DemoEffect_InitTimeWarp; diff --git a/src/overlays/actors/ovl_Demo_Ext/z_demo_ext.c b/src/overlays/actors/ovl_Demo_Ext/z_demo_ext.c index 976d18d22d..b1f963359b 100644 --- a/src/overlays/actors/ovl_Demo_Ext/z_demo_ext.c +++ b/src/overlays/actors/ovl_Demo_Ext/z_demo_ext.c @@ -8,7 +8,7 @@ #include "vt.h" #include "objects/object_fhg/object_fhg.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 typedef enum { /* 0x00 */ EXT_WAIT, diff --git a/src/overlays/actors/ovl_Demo_Geff/z_demo_geff.c b/src/overlays/actors/ovl_Demo_Geff/z_demo_geff.c index aa3a50537d..fe5ac77a7b 100644 --- a/src/overlays/actors/ovl_Demo_Geff/z_demo_geff.c +++ b/src/overlays/actors/ovl_Demo_Geff/z_demo_geff.c @@ -8,7 +8,7 @@ #include "objects/object_geff/object_geff.h" #include "vt.h" -#define FLAGS 0x00000030 +#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) void DemoGeff_Init(Actor* thisx, GlobalContext* globalCtx); void DemoGeff_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Demo_Gj/z_demo_gj.c b/src/overlays/actors/ovl_Demo_Gj/z_demo_gj.c index 698440a456..aa0c6c3c45 100644 --- a/src/overlays/actors/ovl_Demo_Gj/z_demo_gj.c +++ b/src/overlays/actors/ovl_Demo_Gj/z_demo_gj.c @@ -8,7 +8,7 @@ #include "objects/object_gj/object_gj.h" #include "vt.h" -#define FLAGS 0x00000030 +#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) void DemoGj_Init(Actor* thisx, GlobalContext* globalCtx); void DemoGj_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Demo_Go/z_demo_go.c b/src/overlays/actors/ovl_Demo_Go/z_demo_go.c index 1683b592e5..9138664786 100644 --- a/src/overlays/actors/ovl_Demo_Go/z_demo_go.c +++ b/src/overlays/actors/ovl_Demo_Go/z_demo_go.c @@ -8,7 +8,7 @@ #include "objects/object_oF1d_map/object_oF1d_map.h" #include "vt.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 void DemoGo_Init(Actor* thisx, GlobalContext* globalCtx); void DemoGo_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Demo_Gt/z_demo_gt.c b/src/overlays/actors/ovl_Demo_Gt/z_demo_gt.c index 4b992c6bdb..e4d6d98d1b 100644 --- a/src/overlays/actors/ovl_Demo_Gt/z_demo_gt.c +++ b/src/overlays/actors/ovl_Demo_Gt/z_demo_gt.c @@ -4,7 +4,7 @@ #include "vt.h" #include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h" -#define FLAGS 0x00000030 +#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) void DemoGt_Init(Actor* thisx, GlobalContext* globalCtx); void DemoGt_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Demo_Ik/z_demo_ik.c b/src/overlays/actors/ovl_Demo_Ik/z_demo_ik.c index a6a6192fd2..47611519ac 100644 --- a/src/overlays/actors/ovl_Demo_Ik/z_demo_ik.c +++ b/src/overlays/actors/ovl_Demo_Ik/z_demo_ik.c @@ -2,7 +2,7 @@ #include "vt.h" #include "objects/object_ik/object_ik.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 void DemoIk_Init(Actor* thisx, GlobalContext* globalCtx); void DemoIk_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Demo_Im/z_demo_im.c b/src/overlays/actors/ovl_Demo_Im/z_demo_im.c index fb183b9ddf..760fa8df4c 100644 --- a/src/overlays/actors/ovl_Demo_Im/z_demo_im.c +++ b/src/overlays/actors/ovl_Demo_Im/z_demo_im.c @@ -11,7 +11,7 @@ #include "objects/object_im/object_im.h" #include "vt.h" -#define FLAGS 0x00000011 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_4) void DemoIm_Init(Actor* thisx, GlobalContext* globalCtx); void DemoIm_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -832,7 +832,7 @@ s32 func_809869F8(DemoIm* this, GlobalContext* globalCtx) { f32 playerPosX = player->actor.world.pos.x; f32 thisPosX = this->actor.world.pos.x; - if ((thisPosX - (kREG(16) + 30.0f) > playerPosX) && (!(this->actor.flags & 0x40))) { + if ((thisPosX - (kREG(16) + 30.0f) > playerPosX) && !(this->actor.flags & ACTOR_FLAG_6)) { return true; } else { return false; @@ -852,7 +852,7 @@ s32 func_80986A5C(DemoIm* this, GlobalContext* globalCtx) { } s32 func_80986AD0(DemoIm* this, GlobalContext* globalCtx) { - this->actor.flags |= 9; + this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_3; if (!Actor_ProcessTalkRequest(&this->actor, globalCtx)) { this->actor.textId = 0x708E; func_8002F2F4(&this->actor, globalCtx); @@ -941,7 +941,7 @@ void func_80986DC8(DemoIm* this, GlobalContext* globalCtx) { DemoIm_UpdateSkelAnime(this); func_80984BE0(this); func_80984E58(this, globalCtx); - this->actor.flags &= ~0x9; + this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_3); } void func_80986E20(DemoIm* this, GlobalContext* globalCtx) { @@ -988,7 +988,7 @@ void func_80986FA8(DemoIm* this, GlobalContext* globalCtx) { DemoIm_UpdateSkelAnime(this); func_80984BE0(this); func_80984E58(this, globalCtx); - this->actor.flags &= ~0x9; + this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_3); DemoIm_UpdateCollider(this, globalCtx); func_80986CFC(this, globalCtx); } @@ -1106,7 +1106,7 @@ void DemoIm_Init(Actor* thisx, GlobalContext* globalCtx) { ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f); DemoIm_InitCollider(thisx, globalCtx); SkelAnime_InitFlex(globalCtx, &this->skelAnime, &gImpaSkel, NULL, this->jointTable, this->morphTable, 17); - thisx->flags &= ~1; + thisx->flags &= ~ACTOR_FLAG_0; switch (this->actor.params) { case 2: diff --git a/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.c b/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.c index 4399427739..9d50997edd 100644 --- a/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.c +++ b/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.c @@ -4,7 +4,7 @@ #include "objects/object_efc_star_field/object_efc_star_field.h" #include "objects/object_toki_objects/object_toki_objects.h" -#define FLAGS 0x00000030 +#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) void DemoKankyo_Init(Actor* thisx, GlobalContext* globalCtx); void DemoKankyo_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -248,7 +248,7 @@ void DemoKankyo_Init(Actor* thisx, GlobalContext* globalCtx) { case DEMOKANKYO_WARP_OUT: case DEMOKANKYO_WARP_IN: Actor_ChangeCategory(globalCtx, &globalCtx->actorCtx, &this->actor, ACTORCAT_ITEMACTION); - this->actor.flags |= 0x2000000; + this->actor.flags |= ACTOR_FLAG_25; this->actor.room = -1; this->warpTimer = 35; this->sparkleCounter = 0; diff --git a/src/overlays/actors/ovl_Demo_Kekkai/z_demo_kekkai.c b/src/overlays/actors/ovl_Demo_Kekkai/z_demo_kekkai.c index 8b6053a40f..72c4f1bb3f 100644 --- a/src/overlays/actors/ovl_Demo_Kekkai/z_demo_kekkai.c +++ b/src/overlays/actors/ovl_Demo_Kekkai/z_demo_kekkai.c @@ -8,7 +8,7 @@ #include "objects/object_demo_kekkai/object_demo_kekkai.h" #include "scenes/dungeons/ganontika/ganontika_scene.h" -#define FLAGS 0x00000030 +#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) void DemoKekkai_Init(Actor* thisx, GlobalContext* globalCtx); void DemoKekkai_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.c b/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.c index be39d6e7f1..255b868d10 100644 --- a/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.c +++ b/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.c @@ -11,7 +11,7 @@ #include "vt.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 void DemoSa_Init(Actor* thisx, GlobalContext* globalCtx); void DemoSa_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Demo_Shd/z_demo_shd.c b/src/overlays/actors/ovl_Demo_Shd/z_demo_shd.c index b1f76a1a81..531badac42 100644 --- a/src/overlays/actors/ovl_Demo_Shd/z_demo_shd.c +++ b/src/overlays/actors/ovl_Demo_Shd/z_demo_shd.c @@ -6,7 +6,7 @@ #include "z_demo_shd.h" -#define FLAGS 0x00000030 +#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) void DemoShd_Init(Actor* thisx, GlobalContext* globalCtx); void DemoShd_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Demo_Tre_Lgt/z_demo_tre_lgt.c b/src/overlays/actors/ovl_Demo_Tre_Lgt/z_demo_tre_lgt.c index 8b21f204c8..cccf95bf1d 100644 --- a/src/overlays/actors/ovl_Demo_Tre_Lgt/z_demo_tre_lgt.c +++ b/src/overlays/actors/ovl_Demo_Tre_Lgt/z_demo_tre_lgt.c @@ -2,7 +2,7 @@ #include "overlays/actors/ovl_En_Box/z_en_box.h" #include "objects/object_box/object_box.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 void DemoTreLgt_Init(Actor* thisx, GlobalContext* globalCtx); void DemoTreLgt_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Door_Ana/z_door_ana.c b/src/overlays/actors/ovl_Door_Ana/z_door_ana.c index d4d212c997..ed9f84cf4e 100644 --- a/src/overlays/actors/ovl_Door_Ana/z_door_ana.c +++ b/src/overlays/actors/ovl_Door_Ana/z_door_ana.c @@ -7,7 +7,7 @@ #include "z_door_ana.h" #include "objects/gameplay_field_keep/gameplay_field_keep.h" -#define FLAGS 0x02000000 +#define FLAGS ACTOR_FLAG_25 void DoorAna_Init(Actor* thisx, GlobalContext* globalCtx); void DoorAna_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -72,7 +72,7 @@ void DoorAna_Init(Actor* thisx, GlobalContext* globalCtx) { Collider_InitCylinder(globalCtx, &this->collider); Collider_SetCylinder(globalCtx, &this->collider, &this->actor, &sCylinderInit); } else { - this->actor.flags |= 0x10; + this->actor.flags |= ACTOR_FLAG_4; } Actor_SetScale(&this->actor, 0); DoorAna_SetupAction(this, DoorAna_WaitClosed); @@ -99,7 +99,7 @@ void DoorAna_WaitClosed(DoorAna* this, GlobalContext* globalCtx) { // opening with song of storms if (this->actor.xyzDistToPlayerSq < 40000.0f && Flags_GetEnv(globalCtx, 5)) { openGrotto = true; - this->actor.flags &= ~0x10; + this->actor.flags &= ~ACTOR_FLAG_4; } } else { // bombing/hammering open a grotto diff --git a/src/overlays/actors/ovl_Door_Gerudo/z_door_gerudo.c b/src/overlays/actors/ovl_Door_Gerudo/z_door_gerudo.c index 8aa6c8a34e..d55981fccb 100644 --- a/src/overlays/actors/ovl_Door_Gerudo/z_door_gerudo.c +++ b/src/overlays/actors/ovl_Door_Gerudo/z_door_gerudo.c @@ -7,7 +7,7 @@ #include "z_door_gerudo.h" #include "objects/object_door_gerudo/object_door_gerudo.h" -#define FLAGS 0x00000000 +#define FLAGS 0 void DoorGerudo_Init(Actor* thisx, GlobalContext* globalCtx); void DoorGerudo_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Door_Killer/z_door_killer.c b/src/overlays/actors/ovl_Door_Killer/z_door_killer.c index f00719b1a9..f3551af91d 100644 --- a/src/overlays/actors/ovl_Door_Killer/z_door_killer.c +++ b/src/overlays/actors/ovl_Door_Killer/z_door_killer.c @@ -11,7 +11,7 @@ #include "objects/object_haka_door/object_haka_door.h" #include "objects/object_door_killer/object_door_killer.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 typedef enum { /* 0 */ DOOR_KILLER_DOOR, diff --git a/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c b/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c index f7813c0891..5bb172bb8a 100644 --- a/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c +++ b/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c @@ -16,7 +16,7 @@ #include "objects/object_mizu_objects/object_mizu_objects.h" #include "objects/object_bdan_objects/object_bdan_objects.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 void DoorShutter_Init(Actor* thisx, GlobalContext* globalCtx); void DoorShutter_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Door_Toki/z_door_toki.c b/src/overlays/actors/ovl_Door_Toki/z_door_toki.c index 63281a9dfd..2cfaa8eeab 100644 --- a/src/overlays/actors/ovl_Door_Toki/z_door_toki.c +++ b/src/overlays/actors/ovl_Door_Toki/z_door_toki.c @@ -7,7 +7,7 @@ #include "z_door_toki.h" #include "objects/object_toki_objects/object_toki_objects.h" -#define FLAGS 0x00000000 +#define FLAGS 0 void DoorToki_Init(Actor* thisx, GlobalContext* globalCtx); void DoorToki_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c b/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c index 59daa91622..b752409da9 100644 --- a/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c +++ b/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c @@ -1,7 +1,7 @@ #include "z_door_warp1.h" #include "objects/object_warp1/object_warp1.h" -#define FLAGS 0x00000000 +#define FLAGS 0 void DoorWarp1_Init(Actor* thisx, GlobalContext* globalCtx); void DoorWarp1_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Efc_Erupc/z_efc_erupc.c b/src/overlays/actors/ovl_Efc_Erupc/z_efc_erupc.c index 1de4e5fbfa..89a0ef4e52 100644 --- a/src/overlays/actors/ovl_Efc_Erupc/z_efc_erupc.c +++ b/src/overlays/actors/ovl_Efc_Erupc/z_efc_erupc.c @@ -1,7 +1,7 @@ #include "z_efc_erupc.h" #include "objects/object_efc_erupc/object_efc_erupc.h" -#define FLAGS 0x00000030 +#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) void EfcErupc_Init(Actor* thisx, GlobalContext* globalCtx); void EfcErupc_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Eff_Dust/z_eff_dust.c b/src/overlays/actors/ovl_Eff_Dust/z_eff_dust.c index 398378f299..9f0f79cf35 100644 --- a/src/overlays/actors/ovl_Eff_Dust/z_eff_dust.c +++ b/src/overlays/actors/ovl_Eff_Dust/z_eff_dust.c @@ -7,7 +7,7 @@ #include "z_eff_dust.h" #include "objects/gameplay_keep/gameplay_keep.h" -#define FLAGS 0x00000030 +#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) void EffDust_Init(Actor* thisx, GlobalContext* globalCtx); void EffDust_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Elf_Msg/z_elf_msg.c b/src/overlays/actors/ovl_Elf_Msg/z_elf_msg.c index d3cd37bed3..cd130706d8 100644 --- a/src/overlays/actors/ovl_Elf_Msg/z_elf_msg.c +++ b/src/overlays/actors/ovl_Elf_Msg/z_elf_msg.c @@ -8,7 +8,7 @@ #include "vt.h" #include "overlays/actors/ovl_En_Elf/z_en_elf.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 void ElfMsg_Init(Actor* thisx, GlobalContext* globalCtx); void ElfMsg_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Elf_Msg2/z_elf_msg2.c b/src/overlays/actors/ovl_Elf_Msg2/z_elf_msg2.c index dd037ff8d4..1d44f3970c 100644 --- a/src/overlays/actors/ovl_Elf_Msg2/z_elf_msg2.c +++ b/src/overlays/actors/ovl_Elf_Msg2/z_elf_msg2.c @@ -7,7 +7,7 @@ #include "z_elf_msg2.h" #include "vt.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 void ElfMsg2_Init(Actor* thisx, GlobalContext* globalCtx); void ElfMsg2_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -82,7 +82,7 @@ void ElfMsg2_Init(Actor* thisx, GlobalContext* globalCtx) { ElfMsg2_SetupAction(this, ElfMsg2_WaitUntilActivated); } else { ElfMsg2_SetupAction(this, ElfMsg2_WaitForTextRead); - this->actor.flags |= 0x00040001; // Make actor targetable and Navi-checkable + this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_18; // Make actor targetable and Navi-checkable this->actor.textId = ElfMsg2_GetMessageId(this); } this->actor.shape.rot.x = this->actor.shape.rot.y = this->actor.shape.rot.z = 0; @@ -134,7 +134,7 @@ void ElfMsg2_WaitUntilActivated(ElfMsg2* this, GlobalContext* globalCtx) { if ((this->actor.world.rot.y >= 0x41) && (this->actor.world.rot.y <= 0x80) && (Flags_GetSwitch(globalCtx, (this->actor.world.rot.y - 0x41)))) { ElfMsg2_SetupAction(this, ElfMsg2_WaitForTextRead); - this->actor.flags |= 0x00040001; // Make actor targetable and Navi-checkable + this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_18; // Make actor targetable and Navi-checkable this->actor.textId = ElfMsg2_GetMessageId(this); } } diff --git a/src/overlays/actors/ovl_En_Am/z_en_am.c b/src/overlays/actors/ovl_En_Am/z_en_am.c index 69ed438361..aea2c8da57 100644 --- a/src/overlays/actors/ovl_En_Am/z_en_am.c +++ b/src/overlays/actors/ovl_En_Am/z_en_am.c @@ -8,7 +8,7 @@ #include "objects/object_am/object_am.h" #include "overlays/actors/ovl_En_Bom/z_en_bom.h" -#define FLAGS 0x04000015 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4 | ACTOR_FLAG_26) void EnAm_Init(Actor* thisx, GlobalContext* globalCtx); void EnAm_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -285,7 +285,7 @@ void EnAm_SetupStatue(EnAm* this) { f32 lastFrame = Animation_GetLastFrame(&gArmosRicochetAnim); Animation_Change(&this->skelAnime, &gArmosRicochetAnim, 0.0f, lastFrame, lastFrame, ANIMMODE_LOOP, 0.0f); - this->dyna.actor.flags &= ~1; + this->dyna.actor.flags &= ~ACTOR_FLAG_0; this->behavior = AM_BEHAVIOR_DO_NOTHING; this->dyna.actor.speedXZ = 0.0f; EnAm_SetupAction(this, EnAm_Statue); @@ -386,7 +386,7 @@ void EnAm_Sleep(EnAm* this, GlobalContext* globalCtx) { if (this->textureBlend >= 240) { this->attackTimer = 200; this->textureBlend = 255; - this->dyna.actor.flags |= 1; + this->dyna.actor.flags |= ACTOR_FLAG_0; this->dyna.actor.shape.yOffset = 0.0f; EnAm_SetupLunge(this); } else { @@ -407,7 +407,7 @@ void EnAm_Sleep(EnAm* this, GlobalContext* globalCtx) { this->textureBlend -= 10; } else { this->textureBlend = 0; - this->dyna.actor.flags &= ~1; + this->dyna.actor.flags &= ~ACTOR_FLAG_0; if (this->dyna.bgId < 0) { this->unk_264 = 0; diff --git a/src/overlays/actors/ovl_En_Ani/z_en_ani.c b/src/overlays/actors/ovl_En_Ani/z_en_ani.c index c6a6711c19..a889851cf1 100644 --- a/src/overlays/actors/ovl_En_Ani/z_en_ani.c +++ b/src/overlays/actors/ovl_En_Ani/z_en_ani.c @@ -7,7 +7,7 @@ #include "z_en_ani.h" #include "objects/object_ani/object_ani.h" -#define FLAGS 0x00000009 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3) void EnAni_Init(Actor* thisx, GlobalContext* globalCtx); void EnAni_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_En_Anubice/z_en_anubice.c b/src/overlays/actors/ovl_En_Anubice/z_en_anubice.c index 285a15b4a4..6601255a5d 100644 --- a/src/overlays/actors/ovl_En_Anubice/z_en_anubice.c +++ b/src/overlays/actors/ovl_En_Anubice/z_en_anubice.c @@ -10,7 +10,7 @@ #include "overlays/actors/ovl_Bg_Hidan_Curtain/z_bg_hidan_curtain.h" #include "vt.h" -#define FLAGS 0x00000015 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4) void EnAnubice_Init(Actor* thisx, GlobalContext* globalCtx); void EnAnubice_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -140,7 +140,7 @@ void EnAnubice_Init(Actor* thisx, GlobalContext* globalCtx) { this->actor.colChkInfo.mass = MASS_IMMOVABLE; this->actor.shape.yOffset = -4230.0f; this->focusHeightOffset = 0.0f; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; this->home = this->actor.world.pos; this->actor.targetMode = 3; this->actionFunc = EnAnubice_FindFlameCircles; @@ -187,7 +187,7 @@ void EnAnubice_FindFlameCircles(EnAnubice* this, GlobalContext* globalCtx) { } this->hasSearchedForFlameCircles = true; } - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0; this->actionFunc = EnAnubice_SetupIdle; } } @@ -364,7 +364,7 @@ void EnAnubice_Update(Actor* thisx, GlobalContext* globalCtx) { fabsf(this->flameCircles[i]->actor.world.pos.z - this->actor.world.pos.z) < 60.0f && flameCircle->timer != 0) { Actor_ChangeCategory(globalCtx, &globalCtx->actorCtx, &this->actor, ACTORCAT_PROP); - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; Enemy_StartFinishingBlow(globalCtx, &this->actor); Audio_PlayActorSound2(&this->actor, NA_SE_EN_ANUBIS_DEAD); this->actionFunc = EnAnubice_SetupDie; @@ -376,7 +376,7 @@ void EnAnubice_Update(Actor* thisx, GlobalContext* globalCtx) { this->col.base.acFlags &= ~2; if (this->actor.colChkInfo.damageEffect == 2) { Actor_ChangeCategory(globalCtx, &globalCtx->actorCtx, &this->actor, ACTORCAT_PROP); - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; Enemy_StartFinishingBlow(globalCtx, &this->actor); Audio_PlayActorSound2(&this->actor, NA_SE_EN_ANUBIS_DEAD); this->actionFunc = EnAnubice_SetupDie; diff --git a/src/overlays/actors/ovl_En_Anubice_Fire/z_en_anubice_fire.c b/src/overlays/actors/ovl_En_Anubice_Fire/z_en_anubice_fire.c index 64ef7cb831..85957a974a 100644 --- a/src/overlays/actors/ovl_En_Anubice_Fire/z_en_anubice_fire.c +++ b/src/overlays/actors/ovl_En_Anubice_Fire/z_en_anubice_fire.c @@ -8,7 +8,7 @@ #include "objects/gameplay_keep/gameplay_keep.h" #include "objects/object_anubice/object_anubice.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 void EnAnubiceFire_Init(Actor* thisx, GlobalContext* globalCtx); void EnAnubiceFire_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_En_Anubice_Tag/z_en_anubice_tag.c b/src/overlays/actors/ovl_En_Anubice_Tag/z_en_anubice_tag.c index a8a946eeaa..b6aa11f043 100644 --- a/src/overlays/actors/ovl_En_Anubice_Tag/z_en_anubice_tag.c +++ b/src/overlays/actors/ovl_En_Anubice_Tag/z_en_anubice_tag.c @@ -7,7 +7,7 @@ #include "z_en_anubice_tag.h" #include "vt.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 void EnAnubiceTag_Init(Actor* thisx, GlobalContext* globalCtx); void EnAnubiceTag_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_En_Arow_Trap/z_en_arow_trap.c b/src/overlays/actors/ovl_En_Arow_Trap/z_en_arow_trap.c index b55e841108..23f98c0156 100644 --- a/src/overlays/actors/ovl_En_Arow_Trap/z_en_arow_trap.c +++ b/src/overlays/actors/ovl_En_Arow_Trap/z_en_arow_trap.c @@ -6,7 +6,7 @@ #include "z_en_arow_trap.h" #include "overlays/actors/ovl_En_Arrow/z_en_arrow.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 void EnArowTrap_Init(Actor* thisx, GlobalContext* globalCtx); void EnArowTrap_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_En_Arrow/z_en_arrow.c b/src/overlays/actors/ovl_En_Arrow/z_en_arrow.c index 3830c3727f..a69acc5b15 100644 --- a/src/overlays/actors/ovl_En_Arrow/z_en_arrow.c +++ b/src/overlays/actors/ovl_En_Arrow/z_en_arrow.c @@ -7,7 +7,7 @@ #include "z_en_arrow.h" #include "objects/gameplay_keep/gameplay_keep.h" -#define FLAGS 0x00000030 +#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) void EnArrow_Init(Actor* thisx, GlobalContext* globalCtx); void EnArrow_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -148,7 +148,7 @@ void EnArrow_Destroy(Actor* thisx, GlobalContext* globalCtx) { Collider_DestroyQuad(globalCtx, &this->collider); if ((this->hitActor != NULL) && (this->hitActor->update != NULL)) { - this->hitActor->flags &= ~0x8000; + this->hitActor->flags &= ~ACTOR_FLAG_15; } } @@ -288,11 +288,11 @@ void EnArrow_Fly(EnArrow* this, GlobalContext* globalCtx) { hitActor = this->collider.base.at; if ((hitActor->update != NULL) && (!(this->collider.base.atFlags & AT_BOUNCED)) && - (hitActor->flags & 0x4000)) { + (hitActor->flags & ACTOR_FLAG_14)) { this->hitActor = hitActor; EnArrow_CarryActor(this, globalCtx); Math_Vec3f_Diff(&hitActor->world.pos, &this->actor.world.pos, &this->unk_250); - hitActor->flags |= 0x8000; + hitActor->flags |= ACTOR_FLAG_15; this->collider.base.atFlags &= ~AT_HIT; this->actor.speedXZ /= 2.0f; this->actor.velocity.y /= 2.0f; @@ -351,14 +351,14 @@ void EnArrow_Fly(EnArrow* this, GlobalContext* globalCtx) { this->hitActor->world.pos.y = hitPoint.y + ((sp54.y <= hitPoint.y) ? 1.0f : -1.0f); this->hitActor->world.pos.z = hitPoint.z + ((sp54.z <= hitPoint.z) ? 1.0f : -1.0f); Math_Vec3f_Diff(&this->hitActor->world.pos, &this->actor.world.pos, &this->unk_250); - this->hitActor->flags &= ~0x8000; + this->hitActor->flags &= ~ACTOR_FLAG_15; this->hitActor = NULL; } else { Math_Vec3f_Sum(&this->actor.world.pos, &this->unk_250, &this->hitActor->world.pos); } if (this->touchedPoly && (this->hitActor != NULL)) { - this->hitActor->flags &= ~0x8000; + this->hitActor->flags &= ~ACTOR_FLAG_15; this->hitActor = NULL; } } else { diff --git a/src/overlays/actors/ovl_En_Attack_Niw/z_en_attack_niw.c b/src/overlays/actors/ovl_En_Attack_Niw/z_en_attack_niw.c index aa94702d14..4bb8e25597 100644 --- a/src/overlays/actors/ovl_En_Attack_Niw/z_en_attack_niw.c +++ b/src/overlays/actors/ovl_En_Attack_Niw/z_en_attack_niw.c @@ -8,7 +8,7 @@ #include "objects/object_niw/object_niw.h" #include "overlays/actors/ovl_En_Niw/z_en_niw.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 void EnAttackNiw_Init(Actor* thisx, GlobalContext* globalCtx); void EnAttackNiw_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -53,7 +53,7 @@ void EnAttackNiw_Init(Actor* thisx, GlobalContext* globalCtx) { this->unk_298.y = Rand_CenteredFloat(10.0f); this->unk_298.z = Rand_CenteredFloat(100.0f); Actor_SetScale(&this->actor, 0.01f); - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; this->actor.shape.rot.y = this->actor.world.rot.y = (Rand_ZeroOne() - 0.5f) * 60000.0f; this->actionFunc = func_809B5670; } diff --git a/src/overlays/actors/ovl_En_Ba/z_en_ba.c b/src/overlays/actors/ovl_En_Ba/z_en_ba.c index 31ba7d5288..93db623677 100644 --- a/src/overlays/actors/ovl_En_Ba/z_en_ba.c +++ b/src/overlays/actors/ovl_En_Ba/z_en_ba.c @@ -7,7 +7,7 @@ #include "z_en_ba.h" #include "objects/object_bxa/object_bxa.h" -#define FLAGS 0x00000015 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4) void EnBa_Init(Actor* thisx, GlobalContext* globalCtx); void EnBa_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -146,7 +146,7 @@ void EnBa_Idle(EnBa* this, GlobalContext* globalCtx) { if ((this->actor.colChkInfo.mass == MASS_IMMOVABLE) && (this->actor.xzDistToPlayer > 175.0f)) { Math_SmoothStepToF(&this->actor.world.pos.y, this->actor.home.pos.y + 330.0f, 1.0f, 7.0f, 0.0f); } else { - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0; Math_SmoothStepToF(&this->actor.world.pos.y, this->actor.home.pos.y + 100.0f, 1.0f, 10.0f, 0.0f); } this->unk2FC = this->actor.world.pos; @@ -395,7 +395,7 @@ void func_809B75A0(EnBa* this, GlobalContext* globalCtx2) { Matrix_Translate(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, MTXMODE_NEW); Matrix_RotateZYX(this->actor.shape.rot.x - 0x8000, this->actor.shape.rot.y, 0, MTXMODE_APPLY); Matrix_MultVec3f(&D_809B8080, &this->unk158[0]); - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; for (i = 5; i < 13; i++) { Math_SmoothStepToS(&this->unk2A8[i].x, this->unk2A8[5].x, 1, this->unk31C, 0); Math_SmoothStepToS(&this->unk2A8[i].y, this->unk2A8[5].y, 1, this->unk31C, 0); diff --git a/src/overlays/actors/ovl_En_Bb/z_en_bb.c b/src/overlays/actors/ovl_En_Bb/z_en_bb.c index 61b5af37b0..8b32ca3ddc 100644 --- a/src/overlays/actors/ovl_En_Bb/z_en_bb.c +++ b/src/overlays/actors/ovl_En_Bb/z_en_bb.c @@ -8,7 +8,7 @@ #include "objects/gameplay_keep/gameplay_keep.h" #include "objects/object_Bb/object_Bb.h" -#define FLAGS 0x01000015 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4 | ACTOR_FLAG_24) #define vBombHopPhase actionVar1 #define vTrailIdx actionVar1 @@ -344,7 +344,7 @@ void EnBb_Init(Actor* thisx, GlobalContext* globalCtx) { this->flamePrimBlue = this->flameEnvColor.b = 255; thisx->world.pos.y += 50.0f; EnBb_SetupBlue(this); - thisx->flags |= 0x4000; + thisx->flags |= ACTOR_FLAG_14; break; case ENBB_RED: thisx->naviEnemyId = 0x24; @@ -373,7 +373,7 @@ void EnBb_Init(Actor* thisx, GlobalContext* globalCtx) { EnBb_SetupWhite(globalCtx, this); EnBb_SetWaypoint(this, globalCtx); EnBb_FaceWaypoint(this); - thisx->flags |= 0x4000; + thisx->flags |= ACTOR_FLAG_14; break; case ENBB_GREEN_BIG: this->path = this->actionState >> 4; @@ -407,7 +407,7 @@ void EnBb_Destroy(Actor* thisx, GlobalContext* globalCtx) { void EnBb_SetupFlameTrail(EnBb* this) { this->action = BB_FLAME_TRAIL; this->moveMode = BBMOVE_NOCLIP; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; this->actor.velocity.y = 0.0f; this->actor.gravity = 0.0f; this->actor.speedXZ = 0.0f; @@ -698,7 +698,7 @@ void EnBb_Down(EnBb* this, GlobalContext* globalCtx) { this->moveMode = BBMOVE_HIDDEN; this->timer = 10; this->actionState++; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; this->action = BB_RED; EnBb_SetupAction(this, EnBb_Red); return; @@ -763,7 +763,7 @@ void EnBb_SetupRed(GlobalContext* globalCtx, EnBb* this) { this->actor.home.pos = this->actor.world.pos; this->actor.velocity.y = this->actor.gravity = this->actor.speedXZ = 0.0f; this->actor.bgCheckFlags &= ~1; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; } this->action = BB_RED; EnBb_SetupAction(this, EnBb_Red); @@ -797,7 +797,7 @@ void EnBb_Red(EnBb* this, GlobalContext* globalCtx) { case BBRED_ATTACK: if (this->timer == 0) { this->moveMode = BBMOVE_NORMAL; - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0; } this->bobPhase += Rand_ZeroOne(); Math_SmoothStepToF(&this->flameScaleY, 80.0f, 1.0f, 10.0f, 0.0f); @@ -816,7 +816,7 @@ void EnBb_Red(EnBb* this, GlobalContext* globalCtx) { this->moveMode = BBMOVE_HIDDEN; this->timer = 10; this->actionState++; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; } else { this->actor.velocity.y *= -1.06f; if (this->actor.velocity.y > 13.0f) { @@ -1125,7 +1125,7 @@ void EnBb_Stunned(EnBb* this, GlobalContext* globalCtx) { EnBb_SetupDown(this); } } else { - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; EnBb_SetupDeath(this, globalCtx); } } @@ -1190,7 +1190,7 @@ void EnBb_CollisionCheck(EnBb* this, GlobalContext* globalCtx) { } } if (this->actor.colChkInfo.health == 0) { - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; if (this->actor.params == ENBB_RED) { EnBb_KillFlameTrail(this); } @@ -1232,7 +1232,7 @@ void EnBb_Update(Actor* thisx, GlobalContext* globalCtx2) { if (this->actor.colChkInfo.damageEffect != 0xD) { this->actionFunc(this, globalCtx); if ((this->actor.params <= ENBB_BLUE) && (this->actor.speedXZ >= -6.0f) && - ((this->actor.flags & 0x8000) == 0)) { + ((this->actor.flags & ACTOR_FLAG_15) == 0)) { Actor_MoveForward(&this->actor); } if (this->moveMode == BBMOVE_NORMAL) { diff --git a/src/overlays/actors/ovl_En_Bdfire/z_en_bdfire.c b/src/overlays/actors/ovl_En_Bdfire/z_en_bdfire.c index a988cfef19..80280f21e2 100644 --- a/src/overlays/actors/ovl_En_Bdfire/z_en_bdfire.c +++ b/src/overlays/actors/ovl_En_Bdfire/z_en_bdfire.c @@ -7,7 +7,7 @@ #include "z_en_bdfire.h" #include "objects/object_kingdodongo/object_kingdodongo.h" -#define FLAGS 0x00000030 +#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) void EnBdfire_Init(Actor* thisx, GlobalContext* globalCtx); void EnBdfire_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.c b/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.c index f14cd0b848..e62154d5ad 100644 --- a/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.c +++ b/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.c @@ -1,7 +1,7 @@ #include "z_en_bigokuta.h" #include "objects/object_bigokuta/object_bigokuta.h" -#define FLAGS 0x00000035 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4 | ACTOR_FLAG_5) void EnBigokuta_Init(Actor* thisx, GlobalContext* globalCtx); void EnBigokuta_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -383,7 +383,7 @@ void func_809BD6B8(EnBigokuta* this) { void func_809BD768(EnBigokuta* this) { this->unk_194 = Rand_ZeroOne() < 0.5f ? -1 : 1; this->unk_19A = 0; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; this->cylinder[0].base.atFlags &= ~AT_ON; Audio_PlayActorSound2(&this->actor, NA_SE_EN_DAIOCTA_SINK); this->actionFunc = func_809BE4A4; @@ -684,7 +684,7 @@ void func_809BE4A4(EnBigokuta* this, GlobalContext* globalCtx) { void func_809BE518(EnBigokuta* this, GlobalContext* globalCtx) { if (Math_StepToF(&this->actor.world.pos.y, this->actor.home.pos.y, 10.0f)) { - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0; func_809BD3F8(this); } } @@ -785,7 +785,7 @@ void EnBigokuta_Update(Actor* thisx, GlobalContext* globalCtx2) { for (i = 0; i < ARRAY_COUNT(this->cylinder); i++) { CollisionCheck_SetAT(globalCtx, &globalCtx->colChkCtx, &this->cylinder[i].base); } - this->actor.flags |= 0x1000000; + this->actor.flags |= ACTOR_FLAG_24; } else { for (i = 0; i < ARRAY_COUNT(this->cylinder); i++) { CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->cylinder[i].base); diff --git a/src/overlays/actors/ovl_En_Bili/z_en_bili.c b/src/overlays/actors/ovl_En_Bili/z_en_bili.c index 981d0e818f..3040142ef7 100644 --- a/src/overlays/actors/ovl_En_Bili/z_en_bili.c +++ b/src/overlays/actors/ovl_En_Bili/z_en_bili.c @@ -7,7 +7,7 @@ #include "z_en_bili.h" #include "objects/object_bl/object_bl.h" -#define FLAGS 0x00005005 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_12 | ACTOR_FLAG_14) void EnBili_Init(Actor* thisx, GlobalContext* globalCtx); void EnBili_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -219,7 +219,7 @@ void EnBili_SetupBurnt(EnBili* this) { this->timer = 20; this->collider.base.atFlags &= ~AT_ON; this->collider.base.acFlags &= ~AC_ON; - this->actor.flags |= 0x10; + this->actor.flags |= ACTOR_FLAG_4; this->actor.speedXZ = 0.0f; Actor_SetColorFilter(&this->actor, 0x4000, 0xC8, 0x2000, 0x14); this->actionFunc = EnBili_Burnt; @@ -227,7 +227,7 @@ void EnBili_SetupBurnt(EnBili* this) { void EnBili_SetupDie(EnBili* this) { this->timer = 18; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; this->actionFunc = EnBili_Die; this->actor.speedXZ = 0.0f; } @@ -250,7 +250,7 @@ void EnBili_SetupFrozen(EnBili* this, GlobalContext* globalCtx) { s32 i; Vec3f effectPos; - if (!(this->actor.flags & 0x8000)) { + if (!(this->actor.flags & ACTOR_FLAG_15)) { this->actor.gravity = -1.0f; } @@ -455,7 +455,7 @@ void EnBili_Recoil(EnBili* this, GlobalContext* globalCtx) { void EnBili_Burnt(EnBili* this, GlobalContext* globalCtx) { SkelAnime_Update(&this->skelAnime); - if (this->actor.flags & 0x8000) { + if (this->actor.flags & ACTOR_FLAG_15) { this->actor.colorFilterTimer = 20; } else { if (this->timer != 0) { @@ -476,7 +476,7 @@ void EnBili_Die(EnBili* this, GlobalContext* globalCtx) { s32 i; if (this->actor.draw != NULL) { - if (this->actor.flags & 0x8000) { + if (this->actor.flags & ACTOR_FLAG_15) { return; } this->actor.draw = NULL; @@ -532,7 +532,7 @@ void EnBili_Frozen(EnBili* this, GlobalContext* globalCtx) { this->timer--; } - if (!(this->actor.flags & 0x8000)) { + if (!(this->actor.flags & ACTOR_FLAG_15)) { this->actor.gravity = -1.0f; } @@ -555,7 +555,7 @@ void EnBili_UpdateDamage(EnBili* this, GlobalContext* globalCtx) { if (Actor_ApplyDamage(&this->actor) == 0) { Audio_PlayActorSound2(&this->actor, NA_SE_EN_BIRI_DEAD); Enemy_StartFinishingBlow(globalCtx, &this->actor); - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; } damageEffect = this->actor.colChkInfo.damageEffect; @@ -587,7 +587,7 @@ void EnBili_UpdateDamage(EnBili* this, GlobalContext* globalCtx) { } if (this->collider.info.acHitInfo->toucher.dmgFlags & 0x1F820) { // DMG_ARROW - this->actor.flags |= 0x10; + this->actor.flags |= ACTOR_FLAG_4; } } } diff --git a/src/overlays/actors/ovl_En_Bird/z_en_bird.c b/src/overlays/actors/ovl_En_Bird/z_en_bird.c index 5a16774e2a..511ae96884 100644 --- a/src/overlays/actors/ovl_En_Bird/z_en_bird.c +++ b/src/overlays/actors/ovl_En_Bird/z_en_bird.c @@ -7,7 +7,7 @@ #include "z_en_bird.h" #include "objects/object_bird/object_bird.h" -#define FLAGS 0x00000000 +#define FLAGS 0 void EnBird_Init(Actor* thisx, GlobalContext* globalCtx); void EnBird_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_En_Blkobj/z_en_blkobj.c b/src/overlays/actors/ovl_En_Blkobj/z_en_blkobj.c index a6d3e6fe8d..3941aaa0c8 100644 --- a/src/overlays/actors/ovl_En_Blkobj/z_en_blkobj.c +++ b/src/overlays/actors/ovl_En_Blkobj/z_en_blkobj.c @@ -7,7 +7,7 @@ #include "z_en_blkobj.h" #include "objects/object_blkobj/object_blkobj.h" -#define FLAGS 0x00000030 +#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) void EnBlkobj_Init(Actor* thisx, GlobalContext* globalCtx); void EnBlkobj_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -87,7 +87,7 @@ void EnBlkobj_Wait(EnBlkobj* this, GlobalContext* globalCtx) { } void EnBlkobj_SpawnDarkLink(EnBlkobj* this, GlobalContext* globalCtx) { - if (!(this->dyna.actor.flags & 0x40)) { + if (!(this->dyna.actor.flags & ACTOR_FLAG_6)) { Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_TORCH2, this->dyna.actor.world.pos.x, this->dyna.actor.world.pos.y, this->dyna.actor.world.pos.z, 0, this->dyna.actor.yawTowardsPlayer, 0, 0); diff --git a/src/overlays/actors/ovl_En_Bom/z_en_bom.c b/src/overlays/actors/ovl_En_Bom/z_en_bom.c index e71a4dad1a..6f01c7b785 100644 --- a/src/overlays/actors/ovl_En_Bom/z_en_bom.c +++ b/src/overlays/actors/ovl_En_Bom/z_en_bom.c @@ -8,7 +8,7 @@ #include "overlays/effects/ovl_Effect_Ss_Dead_Sound/z_eff_ss_dead_sound.h" #include "objects/gameplay_keep/gameplay_keep.h" -#define FLAGS 0x00000030 +#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) void EnBom_Init(Actor* thisx, GlobalContext* globalCtx); void EnBom_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -169,7 +169,7 @@ void EnBom_Explode(EnBom* this, GlobalContext* globalCtx) { Player* player; if (this->explosionCollider.elements[0].dim.modelSphere.radius == 0) { - this->actor.flags |= 0x20; + this->actor.flags |= ACTOR_FLAG_5; func_800AA000(this->actor.xzDistToPlayer, 0xFF, 0x14, 0x96); } @@ -323,7 +323,7 @@ void EnBom_Update(Actor* thisx, GlobalContext* globalCtx2) { Camera_AddQuake(&globalCtx->mainCamera, 2, 0xB, 8); thisx->params = BOMB_EXPLOSION; this->timer = 10; - thisx->flags |= 0x20; + thisx->flags |= ACTOR_FLAG_5; EnBom_SetupAction(this, EnBom_Explode); } } diff --git a/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c b/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c index de2ef511de..c016703b7f 100644 --- a/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c +++ b/src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c @@ -4,7 +4,7 @@ #include "overlays/actors/ovl_En_Ex_Item/z_en_ex_item.h" #include "objects/object_bg/object_bg.h" -#define FLAGS 0x08000039 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_4 | ACTOR_FLAG_5 | ACTOR_FLAG_27) typedef enum { /* 0 */ CHU_GIRL_EYES_ASLEEP, diff --git a/src/overlays/actors/ovl_En_Bom_Bowl_Pit/z_en_bom_bowl_pit.c b/src/overlays/actors/ovl_En_Bom_Bowl_Pit/z_en_bom_bowl_pit.c index ddf32bb43f..5326acc8c7 100644 --- a/src/overlays/actors/ovl_En_Bom_Bowl_Pit/z_en_bom_bowl_pit.c +++ b/src/overlays/actors/ovl_En_Bom_Bowl_Pit/z_en_bom_bowl_pit.c @@ -3,7 +3,7 @@ #include "overlays/actors/ovl_En_Bom_Chu/z_en_bom_chu.h" #include "overlays/actors/ovl_En_Ex_Item/z_en_ex_item.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 void EnBomBowlPit_Init(Actor* thisx, GlobalContext* globalCtx); void EnBomBowlPit_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_En_Bom_Chu/z_en_bom_chu.c b/src/overlays/actors/ovl_En_Bom_Chu/z_en_bom_chu.c index 05e0a90a68..b6c81a8f9b 100644 --- a/src/overlays/actors/ovl_En_Bom_Chu/z_en_bom_chu.c +++ b/src/overlays/actors/ovl_En_Bom_Chu/z_en_bom_chu.c @@ -2,7 +2,7 @@ #include "overlays/actors/ovl_En_Bom/z_en_bom.h" #include "objects/gameplay_keep/gameplay_keep.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 #define BOMBCHU_SCALE 0.01f @@ -234,7 +234,7 @@ void EnBomChu_WaitForRelease(EnBomChu* this, GlobalContext* globalCtx) { //! @bug there is no NULL check on the floor poly. If the player is out of bounds the floor poly will be NULL //! and will cause a crash inside this function. EnBomChu_UpdateFloorPoly(this, this->actor.floorPoly, globalCtx); - this->actor.flags |= 1; // make chu targetable + this->actor.flags |= ACTOR_FLAG_0; // make chu targetable func_8002F850(globalCtx, &this->actor); this->actionFunc = EnBomChu_Move; } diff --git a/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c b/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c index 530e362d93..e4e3f762b7 100644 --- a/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c +++ b/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c @@ -8,7 +8,7 @@ #include "objects/object_bombf/object_bombf.h" #include "overlays/effects/ovl_Effect_Ss_Dead_Sound/z_eff_ss_dead_sound.h" -#define FLAGS 0x00000011 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_4) void EnBombf_Init(Actor* thisx, GlobalContext* globalCtx); void EnBombf_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -104,7 +104,7 @@ void EnBombf_Init(Actor* thisx, GlobalContext* globalCtx) { thisx->focus.pos = thisx->world.pos; if (Actor_FindNearby(globalCtx, thisx, ACTOR_BG_DDAN_KD, ACTORCAT_BG, 10000.0f) != NULL) { - thisx->flags |= 0x20; + thisx->flags |= ACTOR_FLAG_5; } thisx->colChkInfo.cylRadius = 10.0f; @@ -117,7 +117,7 @@ void EnBombf_Init(Actor* thisx, GlobalContext* globalCtx) { thisx->gravity = -1.5f; Actor_ChangeCategory(globalCtx, &globalCtx->actorCtx, thisx, ACTORCAT_EXPLOSIVE); thisx->colChkInfo.mass = 200; - thisx->flags &= ~1; + thisx->flags &= ~ACTOR_FLAG_0; EnBombf_SetupAction(this, EnBombf_Move); } else { thisx->colChkInfo.mass = MASS_IMMOVABLE; @@ -157,7 +157,7 @@ void EnBombf_GrowBomb(EnBombf* this, GlobalContext* globalCtx) { this->timer = 180; this->flowerBombScale = 0.0f; Audio_PlayActorSound2(&this->actor, NA_SE_PL_PULL_UP_ROCK); - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; } else { player->actor.child = NULL; player->heldActor = NULL; @@ -176,7 +176,7 @@ void EnBombf_GrowBomb(EnBombf* this, GlobalContext* globalCtx) { bombFlower->unk_200 = 1; bombFlower->timer = 0; this->timer = 180; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; this->flowerBombScale = 0.0f; } } @@ -188,7 +188,7 @@ void EnBombf_GrowBomb(EnBombf* this, GlobalContext* globalCtx) { if (bombFlower != NULL) { bombFlower->timer = 100; this->timer = 180; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; this->flowerBombScale = 0.0f; } } else { @@ -208,7 +208,7 @@ void EnBombf_GrowBomb(EnBombf* this, GlobalContext* globalCtx) { if (this->timer == 0) { this->flowerBombScale += 0.05f; if (this->flowerBombScale >= 1.0f) { - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0; } } @@ -262,7 +262,7 @@ void EnBombf_Explode(EnBombf* this, GlobalContext* globalCtx) { Player* player; if (this->explosionCollider.elements[0].dim.modelSphere.radius == 0) { - this->actor.flags |= 0x20; + this->actor.flags |= ACTOR_FLAG_5; func_800AA000(this->actor.xzDistToPlayer, 0xFF, 0x14, 0x96); } @@ -430,7 +430,7 @@ void EnBombf_Update(Actor* thisx, GlobalContext* globalCtx) { Camera_AddQuake(&globalCtx->mainCamera, 2, 0xB, 8); thisx->params = BOMBFLOWER_EXPLOSION; this->timer = 10; - thisx->flags |= 0x20; + thisx->flags |= ACTOR_FLAG_5; EnBombf_SetupAction(this, EnBombf_Explode); } } diff --git a/src/overlays/actors/ovl_En_Boom/z_en_boom.c b/src/overlays/actors/ovl_En_Boom/z_en_boom.c index 17a031e1e7..a62aa11949 100644 --- a/src/overlays/actors/ovl_En_Boom/z_en_boom.c +++ b/src/overlays/actors/ovl_En_Boom/z_en_boom.c @@ -7,7 +7,7 @@ #include "z_en_boom.h" #include "objects/gameplay_keep/gameplay_keep.h" -#define FLAGS 0x00000030 +#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) void EnBoom_Init(Actor* thisx, GlobalContext* globalCtx); void EnBoom_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -159,7 +159,7 @@ void EnBoom_Fly(EnBoom* this, GlobalContext* globalCtx) { if (((this->collider.base.at->id == ACTOR_EN_ITEM00) || (this->collider.base.at->id == ACTOR_EN_SI))) { this->grabbed = this->collider.base.at; if (this->collider.base.at->id == ACTOR_EN_SI) { - this->collider.base.at->flags |= 0x2000; + this->collider.base.at->flags |= ACTOR_FLAG_13; } } } @@ -182,7 +182,7 @@ void EnBoom_Fly(EnBoom* this, GlobalContext* globalCtx) { target->gravity = -0.9f; target->bgCheckFlags &= ~0x03; } else { - target->flags &= ~0x2000; + target->flags &= ~ACTOR_FLAG_13; } } // Set player flags and kill the boomerang beacause Link caught it. diff --git a/src/overlays/actors/ovl_En_Box/z_en_box.c b/src/overlays/actors/ovl_En_Box/z_en_box.c index b3d574ee04..2331432ced 100644 --- a/src/overlays/actors/ovl_En_Box/z_en_box.c +++ b/src/overlays/actors/ovl_En_Box/z_en_box.c @@ -1,7 +1,7 @@ #include "z_en_box.h" #include "objects/object_box/object_box.h" -#define FLAGS 0x00000000 +#define FLAGS 0 // movement flags @@ -133,7 +133,7 @@ void EnBox_Init(Actor* thisx, GlobalContext* globalCtx2) { EnBox_SetupAction(this, EnBox_FallOnSwitchFlag); this->alpha = 0; this->movementFlags |= ENBOX_MOVE_IMMOBILE; - this->dyna.actor.flags |= 0x10; + this->dyna.actor.flags |= ACTOR_FLAG_4; } else if ((this->type == ENBOX_TYPE_ROOM_CLEAR_BIG || this->type == ENBOX_TYPE_ROOM_CLEAR_SMALL) && !Flags_GetClear(globalCtx, this->dyna.actor.room)) { EnBox_SetupAction(this, EnBox_AppearOnRoomClear); @@ -141,25 +141,25 @@ void EnBox_Init(Actor* thisx, GlobalContext* globalCtx2) { this->movementFlags |= ENBOX_MOVE_IMMOBILE; this->dyna.actor.world.pos.y = this->dyna.actor.home.pos.y - 50.0f; this->alpha = 0; - this->dyna.actor.flags |= 0x10; + this->dyna.actor.flags |= ACTOR_FLAG_4; } else if (this->type == ENBOX_TYPE_9 || this->type == ENBOX_TYPE_10) { EnBox_SetupAction(this, func_809C9700); - this->dyna.actor.flags |= 0x2000000; + this->dyna.actor.flags |= ACTOR_FLAG_25; func_8003EBF8(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); this->movementFlags |= ENBOX_MOVE_IMMOBILE; this->dyna.actor.world.pos.y = this->dyna.actor.home.pos.y - 50.0f; this->alpha = 0; - this->dyna.actor.flags |= 0x10; + this->dyna.actor.flags |= ACTOR_FLAG_4; } else if (this->type == ENBOX_TYPE_SWITCH_FLAG_BIG && !Flags_GetSwitch(globalCtx, this->switchFlag)) { EnBox_SetupAction(this, EnBox_AppearOnSwitchFlag); func_8003EBF8(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); this->movementFlags |= ENBOX_MOVE_IMMOBILE; this->dyna.actor.world.pos.y = this->dyna.actor.home.pos.y - 50.0f; this->alpha = 0; - this->dyna.actor.flags |= 0x10; + this->dyna.actor.flags |= ACTOR_FLAG_4; } else { if (this->type == ENBOX_TYPE_4 || this->type == ENBOX_TYPE_6) { - this->dyna.actor.flags |= 0x80; + this->dyna.actor.flags |= ACTOR_FLAG_7; } EnBox_SetupAction(this, EnBox_WaitOpen); this->movementFlags |= ENBOX_MOVE_IMMOBILE; @@ -306,7 +306,7 @@ void func_809C9700(EnBox* this, GlobalContext* globalCtx) { } else if (this->unk_1FB == ENBOX_STATE_2 && globalCtx->msgCtx.ocarinaMode == OCARINA_MODE_04) { if ((globalCtx->msgCtx.lastPlayedSong == OCARINA_SONG_LULLABY && this->type == ENBOX_TYPE_9) || (globalCtx->msgCtx.lastPlayedSong == OCARINA_SONG_SUNS && this->type == ENBOX_TYPE_10)) { - this->dyna.actor.flags &= ~0x2000000; + this->dyna.actor.flags &= ~ACTOR_FLAG_25; EnBox_SetupAction(this, EnBox_AppearInit); OnePointCutscene_Attention(globalCtx, &this->dyna.actor); this->unk_1A8 = 0; @@ -437,7 +437,7 @@ void EnBox_WaitOpen(EnBox* this, GlobalContext* globalCtx) { void EnBox_Open(EnBox* this, GlobalContext* globalCtx) { u16 sfxId; - this->dyna.actor.flags &= ~0x80; + this->dyna.actor.flags &= ~ACTOR_FLAG_7; if (SkelAnime_Update(&this->skelanime)) { if (this->unk_1F4 > 0) { @@ -618,11 +618,12 @@ void EnBox_Draw(Actor* thisx, GlobalContext* globalCtx) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_box.c", 1581); /* - this->dyna.actor.flags & 0x80 is set by Init (if type is 4 or 6) + this->dyna.actor.flags & ACTOR_FLAG_7 is set by Init (if type is 4 or 6) and cleared by Open */ if ((this->alpha == 255 && !(this->type == ENBOX_TYPE_4 || this->type == ENBOX_TYPE_6)) || - ((this->dyna.actor.flags & 0x80) != 0x80 && (this->type == ENBOX_TYPE_4 || this->type == ENBOX_TYPE_6))) { + (!CHECK_FLAG_ALL(this->dyna.actor.flags, ACTOR_FLAG_7) && + (this->type == ENBOX_TYPE_4 || this->type == ENBOX_TYPE_6))) { gDPPipeSync(POLY_OPA_DISP++); gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, 255); gSPSegment(POLY_OPA_DISP++, 0x08, EnBox_EmptyDList(globalCtx->state.gfxCtx)); diff --git a/src/overlays/actors/ovl_En_Brob/z_en_brob.c b/src/overlays/actors/ovl_En_Brob/z_en_brob.c index 4245d1851c..c113fcedd9 100644 --- a/src/overlays/actors/ovl_En_Brob/z_en_brob.c +++ b/src/overlays/actors/ovl_En_Brob/z_en_brob.c @@ -7,7 +7,7 @@ #include "z_en_brob.h" #include "objects/object_brob/object_brob.h" -#define FLAGS 0x00000005 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2) void EnBrob_Init(Actor* thisx, GlobalContext* globalCtx); void EnBrob_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -91,7 +91,7 @@ void EnBrob_Init(Actor* thisx, GlobalContext* globalCtx) { this->colliders[1].dim.height *= thisx->scale.y; this->colliders[1].dim.yShift *= thisx->scale.y; this->actionFunc = NULL; - thisx->flags &= ~1; + thisx->flags &= ~ACTOR_FLAG_0; func_809CADDC(this, globalCtx); } diff --git a/src/overlays/actors/ovl_En_Bubble/z_en_bubble.c b/src/overlays/actors/ovl_En_Bubble/z_en_bubble.c index 80288b38e1..f5dc0689db 100644 --- a/src/overlays/actors/ovl_En_Bubble/z_en_bubble.c +++ b/src/overlays/actors/ovl_En_Bubble/z_en_bubble.c @@ -1,7 +1,7 @@ #include "z_en_bubble.h" #include "objects/object_bubble/object_bubble.h" -#define FLAGS 0x00000001 +#define FLAGS ACTOR_FLAG_0 void EnBubble_Init(Actor* thisx, GlobalContext* globalCtx); void EnBubble_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -78,7 +78,7 @@ void EnBubble_SetDimensions(EnBubble* this, f32 dim) { f32 c; f32 d; - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0; Actor_SetScale(&this->actor, 1.0f); this->actor.shape.yOffset = 16.0f; this->graphicRotSpeed = 16.0f; @@ -147,7 +147,7 @@ s32 EnBubble_Explosion(EnBubble* this, GlobalContext* globalCtx) { &sEffectEnvColor, Rand_S16Offset(100, 50), 0x19, 0); } Item_DropCollectibleRandom(globalCtx, NULL, &this->actor.world.pos, 0x50); - this->actor.flags &= ~0x1; + this->actor.flags &= ~ACTOR_FLAG_0; return Rand_S16Offset(90, 60); } diff --git a/src/overlays/actors/ovl_En_Butte/z_en_butte.c b/src/overlays/actors/ovl_En_Butte/z_en_butte.c index 20012aa9dc..e3c3164deb 100644 --- a/src/overlays/actors/ovl_En_Butte/z_en_butte.c +++ b/src/overlays/actors/ovl_En_Butte/z_en_butte.c @@ -9,7 +9,7 @@ #include "objects/gameplay_keep/gameplay_keep.h" #include "objects/gameplay_field_keep/gameplay_field_keep.h" -#define FLAGS 0x00000000 +#define FLAGS 0 void EnButte_Init(Actor* thisx, GlobalContext* globalCtx); void EnButte_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -349,7 +349,7 @@ void EnButte_FollowLink(EnButte* this, GlobalContext* globalCtx) { void EnButte_SetupTransformIntoFairy(EnButte* this) { this->timer = 9; - this->actor.flags |= 0x10; + this->actor.flags |= ACTOR_FLAG_4; this->skelAnime.playSpeed = 1.0f; EnButte_ResetTransformationEffect(); this->actionFunc = EnButte_TransformIntoFairy; diff --git a/src/overlays/actors/ovl_En_Bw/z_en_bw.c b/src/overlays/actors/ovl_En_Bw/z_en_bw.c index bc9b96e930..c58ef46265 100644 --- a/src/overlays/actors/ovl_En_Bw/z_en_bw.c +++ b/src/overlays/actors/ovl_En_Bw/z_en_bw.c @@ -8,7 +8,7 @@ #include "objects/gameplay_keep/gameplay_keep.h" #include "objects/object_bw/object_bw.h" -#define FLAGS 0x00000015 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4) void EnBw_Init(Actor* thisx, GlobalContext* globalCtx); void EnBw_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -428,7 +428,7 @@ void func_809CF8F0(EnBw* this) { this->unk_222 = 1000; this->actor.velocity.y = 11.0f; Audio_PlayActorSound2(&this->actor, NA_SE_EN_STAL_JUMP); - this->actor.flags |= 0x1000000; + this->actor.flags |= ACTOR_FLAG_24; EnBw_SetupAction(this, func_809CF984); } @@ -458,7 +458,7 @@ void func_809CF984(EnBw* this, GlobalContext* globalCtx) { } Actor_SpawnFloorDustRing(globalCtx, &this->actor, &this->actor.world.pos, 30.0f, 0xB, 4.0f, 0, 0, 0); this->unk_222 = 3000; - this->actor.flags &= ~0x01000000; + this->actor.flags &= ~ACTOR_FLAG_24; this->actor.speedXZ = 0.0f; Audio_PlayActorSound2(&this->actor, NA_SE_EN_DODO_M_GND); EnBw_SetupAction(this, func_809CE884); @@ -569,7 +569,7 @@ void func_809CFF98(EnBw* this, GlobalContext* globalCtx) { void func_809D00F4(EnBw* this) { this->unk_220 = 0; this->unk_222 = 40; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; this->actor.speedXZ = 0.0f; Audio_PlayActorSound2(&this->actor, NA_SE_EN_BUBLEWALK_DEAD); EnBw_SetupAction(this, func_809D014C); diff --git a/src/overlays/actors/ovl_En_Bx/z_en_bx.c b/src/overlays/actors/ovl_En_Bx/z_en_bx.c index 79a3b47d7c..e49d248724 100644 --- a/src/overlays/actors/ovl_En_Bx/z_en_bx.c +++ b/src/overlays/actors/ovl_En_Bx/z_en_bx.c @@ -7,7 +7,7 @@ #include "z_en_bx.h" #include "objects/object_bxa/object_bxa.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 void EnBx_Init(Actor* thisx, GlobalContext* globalCtx); void EnBx_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_En_Changer/z_en_changer.c b/src/overlays/actors/ovl_En_Changer/z_en_changer.c index ef8f38d217..e353c79498 100644 --- a/src/overlays/actors/ovl_En_Changer/z_en_changer.c +++ b/src/overlays/actors/ovl_En_Changer/z_en_changer.c @@ -9,7 +9,7 @@ #include "overlays/actors/ovl_Item_Etcetera/z_item_etcetera.h" #include "overlays/actors/ovl_En_Ex_Item/z_en_ex_item.h" -#define FLAGS 0x00000000 +#define FLAGS 0 typedef enum { /* 0 */ CHEST_LEFT, @@ -202,7 +202,7 @@ void EnChanger_Init(Actor* thisx, GlobalContext* globalCtx2) { ((this->rightChestNum & 0x1F) << 8) + (rightChestItem & 0xFF)); } - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; this->actionFunc = EnChanger_Wait; } diff --git a/src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.c b/src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.c index ebace9bf06..2970e2eb5c 100644 --- a/src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.c +++ b/src/overlays/actors/ovl_En_Clear_Tag/z_en_clear_tag.c @@ -1,6 +1,6 @@ #include "z_en_clear_tag.h" -#define FLAGS 0x00000035 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4 | ACTOR_FLAG_5) void EnClearTag_Init(Actor* thisx, GlobalContext* globalCtx); void EnClearTag_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -252,7 +252,7 @@ void EnClearTag_Init(Actor* thisx, GlobalContext* globalCtx) { Collider_SetCylinder(globalCtx, &this->collider, &this->actor, &sLaserCylinderInit); Audio_PlayActorSound2(&this->actor, NA_SE_IT_SWORD_REFLECT_MG); } else { // Initialize the Arwing. - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0; this->actor.targetMode = 5; Collider_SetCylinder(globalCtx, &this->collider, &this->actor, &sArwingCylinderInit); this->actor.colChkInfo.health = 3; @@ -533,7 +533,7 @@ void EnClearTag_Update(Actor* thisx, GlobalContext* globalCtx2) { if (this->drawMode != CLEAR_TAG_DRAW_MODE_ARWING) { this->drawMode = CLEAR_TAG_DRAW_MODE_EFFECT; this->deathTimer = 70; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; } else { Actor_Kill(&this->actor); } diff --git a/src/overlays/actors/ovl_En_Cow/z_en_cow.c b/src/overlays/actors/ovl_En_Cow/z_en_cow.c index 56a71b8704..b3500739dc 100644 --- a/src/overlays/actors/ovl_En_Cow/z_en_cow.c +++ b/src/overlays/actors/ovl_En_Cow/z_en_cow.c @@ -7,7 +7,7 @@ #include "z_en_cow.h" #include "objects/object_cow/object_cow.h" -#define FLAGS 0x00000009 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3) void EnCow_Init(Actor* thisx, GlobalContext* globalCtx); void EnCow_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -140,7 +140,7 @@ void EnCow_Init(Actor* thisx, GlobalContext* globalCtx) { this->actor.draw = func_809E0070; this->actionFunc = func_809DFA84; func_809DEF94(this); - this->actor.flags &= ~0x1; + this->actor.flags &= ~ACTOR_FLAG_0; this->unk_278 = ((u32)(Rand_ZeroFloat(1000.0f)) & 0xFFFF) + 40.0f; break; } @@ -195,7 +195,7 @@ void func_809DF494(EnCow* this, GlobalContext* globalCtx) { void func_809DF6BC(EnCow* this, GlobalContext* globalCtx) { if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(globalCtx)) { - this->actor.flags &= ~0x10000; + this->actor.flags &= ~ACTOR_FLAG_16; Message_CloseTextbox(globalCtx); this->actionFunc = func_809DF96C; } @@ -203,7 +203,7 @@ void func_809DF6BC(EnCow* this, GlobalContext* globalCtx) { void func_809DF730(EnCow* this, GlobalContext* globalCtx) { if (Actor_TextboxIsClosing(&this->actor, globalCtx)) { - this->actor.flags &= ~0x10000; + this->actor.flags &= ~ACTOR_FLAG_16; this->actionFunc = func_809DF96C; } } @@ -219,7 +219,7 @@ void func_809DF778(EnCow* this, GlobalContext* globalCtx) { void func_809DF7D8(EnCow* this, GlobalContext* globalCtx) { if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(globalCtx)) { - this->actor.flags &= ~0x10000; + this->actor.flags &= ~ACTOR_FLAG_16; Message_CloseTextbox(globalCtx); this->actionFunc = func_809DF778; func_8002F434(&this->actor, globalCtx, GI_MILK, 10000.0f, 100.0f); @@ -242,7 +242,7 @@ void func_809DF8FC(EnCow* this, GlobalContext* globalCtx) { if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) { this->actionFunc = func_809DF870; } else { - this->actor.flags |= 0x10000; + this->actor.flags |= ACTOR_FLAG_16; func_8002F2CC(&this->actor, globalCtx, 170.0f); this->actor.textId = 0x2006; } @@ -260,7 +260,7 @@ void func_809DF96C(EnCow* this, GlobalContext* globalCtx) { (ABS((s16)(this->actor.yawTowardsPlayer - this->actor.shape.rot.y)) < 0x61A8)) { DREG(53) = 0; this->actionFunc = func_809DF8FC; - this->actor.flags |= 0x10000; + this->actor.flags |= ACTOR_FLAG_16; func_8002F2CC(&this->actor, globalCtx, 170.0f); this->actor.textId = 0x2006; } else { diff --git a/src/overlays/actors/ovl_En_Crow/z_en_crow.c b/src/overlays/actors/ovl_En_Crow/z_en_crow.c index 0dceef23be..03e27aeda4 100644 --- a/src/overlays/actors/ovl_En_Crow/z_en_crow.c +++ b/src/overlays/actors/ovl_En_Crow/z_en_crow.c @@ -1,7 +1,7 @@ #include "z_en_crow.h" #include "objects/object_crow/object_crow.h" -#define FLAGS 0x00005005 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_12 | ACTOR_FLAG_14) void EnCrow_Init(Actor* thisx, GlobalContext* globalCtx); void EnCrow_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -175,12 +175,12 @@ void EnCrow_SetupDamaged(EnCrow* this, GlobalContext* globalCtx) { Actor_SetColorFilter(&this->actor, 0x4000, 255, 0, 40); } - if (this->actor.flags & 0x8000) { + if (this->actor.flags & ACTOR_FLAG_15) { this->actor.speedXZ = 0.0f; } this->collider.base.acFlags &= ~AC_ON; - this->actor.flags |= 0x10; + this->actor.flags |= ACTOR_FLAG_4; this->actionFunc = EnCrow_Damaged; } @@ -328,7 +328,7 @@ void EnCrow_Damaged(EnCrow* this, GlobalContext* globalCtx) { Math_StepToF(&this->actor.speedXZ, 0.0f, 0.5f); this->actor.colorFilterTimer = 40; - if (!(this->actor.flags & 0x8000)) { + if (!(this->actor.flags & ACTOR_FLAG_15)) { if (this->actor.colorFilterParams & 0x4000) { Math_ScaledStepToS(&this->actor.shape.rot.x, 0x4000, 0x200); this->actor.shape.rot.z += 0x1780; @@ -399,8 +399,8 @@ void EnCrow_Respawn(EnCrow* this, GlobalContext* globalCtx) { target = 0.01f; } if (Math_StepToF(&this->actor.scale.x, target, target * 0.1f)) { - this->actor.flags |= 1; - this->actor.flags &= ~0x10; + this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_4; this->actor.colChkInfo.health = 1; EnCrow_SetupFlyIdle(this); } @@ -417,7 +417,7 @@ void EnCrow_UpdateDamage(EnCrow* this, GlobalContext* globalCtx) { EnCrow_SetupTurnAway(this); } else { Actor_ApplyDamage(&this->actor); - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; Enemy_StartFinishingBlow(globalCtx, &this->actor); EnCrow_SetupDamaged(this, globalCtx); } diff --git a/src/overlays/actors/ovl_En_Cs/z_en_cs.c b/src/overlays/actors/ovl_En_Cs/z_en_cs.c index 3846cfc2c3..2851dcafa4 100644 --- a/src/overlays/actors/ovl_En_Cs/z_en_cs.c +++ b/src/overlays/actors/ovl_En_Cs/z_en_cs.c @@ -2,7 +2,7 @@ #include "objects/object_cs/object_cs.h" #include "objects/object_link_child/object_link_child.h" -#define FLAGS 0x00000009 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3) void EnCs_Init(Actor* thisx, GlobalContext* globalCtx); void EnCs_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c b/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c index 406f9e0839..510d43766d 100644 --- a/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c +++ b/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c @@ -2,7 +2,7 @@ #include "overlays/actors/ovl_En_GeldB/z_en_geldb.h" #include "objects/object_daiku/object_daiku.h" -#define FLAGS 0x00000019 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_4) typedef struct { AnimationHeader* anim; @@ -373,7 +373,7 @@ void EnDaiku_Jailed(EnDaiku* this, GlobalContext* globalCtx) { this->actionFunc = EnDaiku_WaitFreedom; } else if (!(this->stateFlags & ENDAIKU_STATEFLAG_GERUDOFIGHTING) && !gerudo->invisible) { this->stateFlags |= ENDAIKU_STATEFLAG_GERUDOFIGHTING; - this->actor.flags &= ~9; + this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_3); } } @@ -385,7 +385,7 @@ void EnDaiku_WaitFreedom(EnDaiku* this, GlobalContext* globalCtx) { SkelAnime_Update(&this->skelAnime); if (Flags_GetSwitch(globalCtx, this->actor.params >> 8 & 0x3F)) { - this->actor.flags |= 9; + this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_3; EnDaiku_UpdateText(this, globalCtx); } } diff --git a/src/overlays/actors/ovl_En_Daiku_Kakariko/z_en_daiku_kakariko.c b/src/overlays/actors/ovl_En_Daiku_Kakariko/z_en_daiku_kakariko.c index 1eebd92c9e..976af344f0 100644 --- a/src/overlays/actors/ovl_En_Daiku_Kakariko/z_en_daiku_kakariko.c +++ b/src/overlays/actors/ovl_En_Daiku_Kakariko/z_en_daiku_kakariko.c @@ -7,7 +7,7 @@ #include "z_en_daiku_kakariko.h" #include "objects/object_daiku/object_daiku.h" -#define FLAGS 0x00000019 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_4) typedef enum { /* 0x0 */ CARPENTER_ICHIRO, // Red and purple pants, normal hair diff --git a/src/overlays/actors/ovl_En_Dekubaba/z_en_dekubaba.c b/src/overlays/actors/ovl_En_Dekubaba/z_en_dekubaba.c index 60c8ec2dea..4c452b8ba7 100644 --- a/src/overlays/actors/ovl_En_Dekubaba/z_en_dekubaba.c +++ b/src/overlays/actors/ovl_En_Dekubaba/z_en_dekubaba.c @@ -3,7 +3,7 @@ #include "objects/gameplay_keep/gameplay_keep.h" #include "overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h" -#define FLAGS 0x00000005 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2) void EnDekubaba_Init(Actor* thisx, GlobalContext* globalCtx); void EnDekubaba_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -402,7 +402,7 @@ void EnDekubaba_SetupPrunedSomersault(EnDekubaba* this) { this->actor.world.rot.y = this->actor.shape.rot.y + 0x8000; this->collider.base.acFlags &= ~AC_ON; this->actor.speedXZ = this->size * 3.0f; - this->actor.flags |= 0x30; + this->actor.flags |= ACTOR_FLAG_4 | ACTOR_FLAG_5; this->actionFunc = EnDekubaba_PrunedSomersault; } @@ -455,7 +455,7 @@ void EnDekubaba_SetupDeadStickDrop(EnDekubaba* this, GlobalContext* globalCtx) { this->actor.velocity.y = 0.0f; this->actor.shape.shadowScale = 3.0f; Actor_ChangeCategory(globalCtx, &globalCtx->actorCtx, &this->actor, ACTORCAT_MISC); - this->actor.flags &= ~0x20; + this->actor.flags &= ~ACTOR_FLAG_5; this->timer = 200; this->actionFunc = EnDekubaba_DeadStickDrop; } @@ -954,7 +954,7 @@ void EnDekubaba_PrunedSomersault(EnDekubaba* this, GlobalContext* globalCtx) { if ((this->actor.scale.x > 0.005f) && ((this->actor.bgCheckFlags & 2) || (this->actor.bgCheckFlags & 8))) { this->actor.scale.x = this->actor.scale.y = this->actor.scale.z = 0.0f; this->actor.speedXZ = 0.0f; - this->actor.flags &= -6; + this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_2); EffectSsHahen_SpawnBurst(globalCtx, &this->actor.world.pos, this->size * 3.0f, 0, this->size * 12.0f, this->size * 5.0f, 15, HAHEN_OBJECT_DEFAULT, 10, NULL); } @@ -1130,7 +1130,7 @@ void EnDekubaba_Update(Actor* thisx, GlobalContext* globalCtx) { } if (this->actionFunc == EnDekubaba_Lunge) { CollisionCheck_SetAT(globalCtx, &globalCtx->colChkCtx, &this->collider.base); - this->actor.flags |= 0x1000000; + this->actor.flags |= ACTOR_FLAG_24; } if (this->collider.base.acFlags & AC_ON) { diff --git a/src/overlays/actors/ovl_En_Dekunuts/z_en_dekunuts.c b/src/overlays/actors/ovl_En_Dekunuts/z_en_dekunuts.c index dea4ad70b0..da4ac5a609 100644 --- a/src/overlays/actors/ovl_En_Dekunuts/z_en_dekunuts.c +++ b/src/overlays/actors/ovl_En_Dekunuts/z_en_dekunuts.c @@ -8,7 +8,7 @@ #include "overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h" #include "objects/object_dekunuts/object_dekunuts.h" -#define FLAGS 0x00000005 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2) #define DEKUNUTS_FLOWER 10 @@ -111,7 +111,7 @@ void EnDekunuts_Init(Actor* thisx, GlobalContext* globalCtx) { Actor_ProcessInitChain(&this->actor, sInitChain); if (thisx->params == DEKUNUTS_FLOWER) { - thisx->flags &= ~0x5; + thisx->flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_2); } else { ActorShape_Init(&thisx->shape, 0.0f, ActorShadow_DrawCircle, 35.0f); SkelAnime_Init(globalCtx, &this->skelAnime, &gDekuNutsSkel, &gDekuNutsStandAnim, this->jointTable, diff --git a/src/overlays/actors/ovl_En_Dh/z_en_dh.c b/src/overlays/actors/ovl_En_Dh/z_en_dh.c index 6774013443..4d0043de64 100644 --- a/src/overlays/actors/ovl_En_Dh/z_en_dh.c +++ b/src/overlays/actors/ovl_En_Dh/z_en_dh.c @@ -1,7 +1,7 @@ #include "z_en_dh.h" #include "objects/object_dh/object_dh.h" -#define FLAGS 0x00000415 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4 | ACTOR_FLAG_10) typedef enum { /* 0 */ DH_WAIT, @@ -148,7 +148,7 @@ void EnDh_Init(Actor* thisx, GlobalContext* globalCtx) { this->actor.colChkInfo.mass = MASS_HEAVY; this->actor.colChkInfo.health = LINK_IS_ADULT ? 14 : 20; this->alpha = this->unk_258 = 255; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; Collider_InitCylinder(globalCtx, &this->collider1); Collider_SetCylinder(globalCtx, &this->collider1, &this->actor, &sCylinderInit); Collider_InitJntSph(globalCtx, &this->collider2); @@ -192,7 +192,7 @@ void EnDh_SetupWait(EnDh* this) { this->actor.shape.yOffset = -15000.0f; this->dirtWaveSpread = this->actor.speedXZ = 0.0f; this->actor.world.rot.y = this->actor.shape.rot.y; - this->actor.flags |= 0x80; + this->actor.flags |= ACTOR_FLAG_7; this->dirtWavePhase = this->actionState = this->actor.params = ENDH_WAIT_UNDERGROUND; EnDh_SetupAction(this, EnDh_Wait); } @@ -207,9 +207,9 @@ void EnDh_Wait(EnDh* this, GlobalContext* globalCtx) { if ((this->actor.params >= ENDH_START_ATTACK_GRAB) || (this->actor.params <= ENDH_HANDS_KILLED_4)) { switch (this->actionState) { case 0: - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0; this->actor.shape.rot.y = this->actor.yawTowardsPlayer; - this->actor.flags &= ~0x80; + this->actor.flags &= ~ACTOR_FLAG_7; this->actionState++; this->drawDirtWave++; Audio_PlayActorSound2(&this->actor, NA_SE_EN_DEADHAND_HIDE); @@ -363,7 +363,7 @@ void EnDh_SetupBurrow(EnDh* this) { this->actor.world.rot.y = this->actor.shape.rot.y; this->dirtWavePhase = 0; this->actionState = 0; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; Audio_PlayActorSound2(&this->actor, NA_SE_EN_DEADHAND_HIDE); EnDh_SetupAction(this, EnDh_Burrow); } @@ -433,7 +433,7 @@ void EnDh_SetupDeath(EnDh* this) { Animation_MorphToPlayOnce(&this->skelAnime, &object_dh_Anim_0032BC, -1.0f); this->curAction = DH_DEATH; this->timer = 300; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; this->actor.speedXZ = 0.0f; func_800F5B58(); this->actor.params = ENDH_DEATH; diff --git a/src/overlays/actors/ovl_En_Dha/z_en_dha.c b/src/overlays/actors/ovl_En_Dha/z_en_dha.c index 4f13062536..a81f215aa7 100644 --- a/src/overlays/actors/ovl_En_Dha/z_en_dha.c +++ b/src/overlays/actors/ovl_En_Dha/z_en_dha.c @@ -8,7 +8,7 @@ #include "overlays/actors/ovl_En_Dh/z_en_dh.h" #include "objects/object_dh/object_dh.h" -#define FLAGS 0x00000015 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4) void EnDha_Init(Actor* thisx, GlobalContext* globalCtx); void EnDha_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -166,7 +166,7 @@ void EnDha_Init(Actor* thisx, GlobalContext* globalCtx) { this->limbAngleX[0] = -0x4000; Collider_InitJntSph(globalCtx, &this->collider); Collider_SetJntSph(globalCtx, &this->collider, &this->actor, &sJntSphInit, this->colliderItem); - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; EnDha_SetupWait(this); } diff --git a/src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.c b/src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.c index 2e25caee7a..aab1368fa1 100644 --- a/src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.c +++ b/src/overlays/actors/ovl_En_Diving_Game/z_en_diving_game.c @@ -9,7 +9,7 @@ #include "objects/object_zo/object_zo.h" #include "vt.h" -#define FLAGS 0x00000019 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_4) void EnDivingGame_Init(Actor* thisx, GlobalContext* globalCtx); void EnDivingGame_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_En_Dns/z_en_dns.c b/src/overlays/actors/ovl_En_Dns/z_en_dns.c index b0deaa4307..22c28edd67 100644 --- a/src/overlays/actors/ovl_En_Dns/z_en_dns.c +++ b/src/overlays/actors/ovl_En_Dns/z_en_dns.c @@ -8,7 +8,7 @@ #include "objects/object_shopnuts/object_shopnuts.h" #include "vt.h" -#define FLAGS 0x00000009 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3) void EnDns_Init(Actor* thisx, GlobalContext* globalCtx); void EnDns_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -326,9 +326,9 @@ void EnDns_Wait(EnDns* this, GlobalContext* globalCtx) { this->actionFunc = EnDns_Talk; } else { if ((this->collider.base.ocFlags1 & OC1_HIT) || this->actor.isTargeted) { - this->actor.flags |= 0x10000; + this->actor.flags |= ACTOR_FLAG_16; } else { - this->actor.flags &= ~0x10000; + this->actor.flags &= ~ACTOR_FLAG_16; } if (this->actor.xzDistToPlayer < 130.0f) { func_8002F2F4(&this->actor, globalCtx); @@ -410,7 +410,7 @@ void func_809EFF98(EnDns* this, GlobalContext* globalCtx) { this->dnsItemEntry->setRupeesAndFlags(this); this->dropCollectible = 1; this->maintainCollider = 0; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; EnDns_Change(this, 1); this->actionFunc = EnDns_SetupBurrow; } @@ -418,7 +418,7 @@ void func_809EFF98(EnDns* this, GlobalContext* globalCtx) { this->dnsItemEntry->setRupeesAndFlags(this); this->dropCollectible = 1; this->maintainCollider = 0; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; EnDns_Change(this, 1); this->actionFunc = EnDns_SetupBurrow; } @@ -427,7 +427,7 @@ void func_809EFF98(EnDns* this, GlobalContext* globalCtx) { void func_809F008C(EnDns* this, GlobalContext* globalCtx) { if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(globalCtx)) { this->maintainCollider = 0; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; EnDns_Change(this, 1); this->actionFunc = EnDns_SetupBurrow; } diff --git a/src/overlays/actors/ovl_En_Dnt_Demo/z_en_dnt_demo.c b/src/overlays/actors/ovl_En_Dnt_Demo/z_en_dnt_demo.c index 9a3601ebd5..de3ecfaebe 100644 --- a/src/overlays/actors/ovl_En_Dnt_Demo/z_en_dnt_demo.c +++ b/src/overlays/actors/ovl_En_Dnt_Demo/z_en_dnt_demo.c @@ -10,7 +10,7 @@ #include "overlays/actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.h" #include "vt.h" -#define FLAGS 0x00000000 +#define FLAGS 0 typedef enum { /* 0 */ DNT_LIKE, @@ -98,7 +98,7 @@ void EnDntDemo_Init(Actor* thisx, GlobalContext* globalCtx2) { osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ じじじじじじじじじじい ☆☆☆☆☆ %x\n" VT_RST, this->leader); } this->subCamera = 0; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; this->actionFunc = EnDntDemo_Judge; } diff --git a/src/overlays/actors/ovl_En_Dnt_Jiji/z_en_dnt_jiji.c b/src/overlays/actors/ovl_En_Dnt_Jiji/z_en_dnt_jiji.c index 3c491a23d9..1789cc9950 100644 --- a/src/overlays/actors/ovl_En_Dnt_Jiji/z_en_dnt_jiji.c +++ b/src/overlays/actors/ovl_En_Dnt_Jiji/z_en_dnt_jiji.c @@ -10,7 +10,7 @@ #include "overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h" #include "vt.h" -#define FLAGS 0x00000019 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_4) void EnDntJiji_Init(Actor* thisx, GlobalContext* globalCtx); void EnDntJiji_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -83,7 +83,7 @@ void EnDntJiji_Init(Actor* thisx, GlobalContext* globalCtx) { osSyncPrintf("\n\n"); // "Deku Scrub mask show elder" osSyncPrintf(VT_FGCOL(YELLOW) "☆☆☆☆☆ デグナッツお面品評会長老 ☆☆☆☆☆ %x\n" VT_RST, this->stage); - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; this->actor.colChkInfo.mass = 0xFF; this->actor.targetMode = 6; this->actionFunc = EnDntJiji_SetFlower; @@ -222,7 +222,7 @@ void EnDntJiji_SetupCower(EnDntJiji* this, GlobalContext* globalCtx) { } else { this->getItemId = GI_NUT_UPGRADE_40; } - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0; this->actor.textId = 0x10DB; this->unused = 5; this->actionFunc = EnDntJiji_Cower; @@ -303,7 +303,7 @@ void EnDntJiji_GivePrize(EnDntJiji* this, GlobalContext* globalCtx) { this->stage->leaderSignal = DNT_SIGNAL_RETURN; } } - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; if (!this->unburrow) { this->actionFunc = EnDntJiji_SetupHide; } else { diff --git a/src/overlays/actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.c b/src/overlays/actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.c index c5056a7e33..ac54bd7b7b 100644 --- a/src/overlays/actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.c +++ b/src/overlays/actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.c @@ -13,7 +13,7 @@ #include "objects/object_hintnuts/object_hintnuts.h" #include "vt.h" -#define FLAGS 0x00000030 +#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) void EnDntNomal_Init(Actor* thisx, GlobalContext* globalCtx); void EnDntNomal_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -122,7 +122,7 @@ void EnDntNomal_Init(Actor* thisx, GlobalContext* globalCtx) { if (this->type < ENDNTNOMAL_TARGET) { this->type = ENDNTNOMAL_TARGET; } - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; this->actor.colChkInfo.mass = 0xFF; this->objId = -1; if (this->type == ENDNTNOMAL_TARGET) { diff --git a/src/overlays/actors/ovl_En_Dodojr/z_en_dodojr.c b/src/overlays/actors/ovl_En_Dodojr/z_en_dodojr.c index 1779be7afe..7eff2d70fa 100644 --- a/src/overlays/actors/ovl_En_Dodojr/z_en_dodojr.c +++ b/src/overlays/actors/ovl_En_Dodojr/z_en_dodojr.c @@ -8,7 +8,7 @@ #include "overlays/actors/ovl_En_Bom/z_en_bom.h" #include "objects/object_dodojr/object_dodojr.h" -#define FLAGS 0x00000005 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2) void EnDodojr_Init(Actor* thisx, GlobalContext* globalCtx); void EnDodojr_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -76,7 +76,7 @@ void EnDodojr_Init(Actor* thisx, GlobalContext* globalCtx) { CollisionCheck_SetInfo2(&this->actor.colChkInfo, DamageTable_Get(4), &sColChkInit); this->actor.naviEnemyId = 0xE; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; Actor_SetScale(&this->actor, 0.02f); @@ -203,7 +203,7 @@ void func_809F6B38(EnDodojr* this) { void func_809F6BBC(EnDodojr* this) { this->actor.shape.shadowDraw = NULL; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; this->actor.home.pos = this->actor.world.pos; this->actor.speedXZ = 0.0f; this->actor.gravity = -0.8f; @@ -315,7 +315,7 @@ s32 func_809F706C(EnDodojr* this) { void func_809F709C(EnDodojr* this) { Audio_PlayActorSound2(&this->actor, NA_SE_EN_DODO_M_DEAD); - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; func_809F6A20(this); this->actionFunc = func_809F7AB8; } @@ -400,7 +400,7 @@ void func_809F73AC(EnDodojr* this, GlobalContext* globalCtx) { -10.0f); Audio_PlayActorSound2(&this->actor, NA_SE_EN_DODO_M_UP); this->actor.world.pos.y -= 60.0f; - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0; this->actor.world.rot.x -= 0x4000; this->actor.shape.rot.x = this->actor.world.rot.x; this->dustPos = this->actor.world.pos; @@ -476,7 +476,7 @@ void func_809F768C(EnDodojr* this, GlobalContext* globalCtx) { void func_809F773C(EnDodojr* this, GlobalContext* globalCtx) { if (DECR(this->timer3) == 0) { func_809F64D0(this); - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; func_809F6A20(this); this->actionFunc = func_809F77AC; } @@ -532,7 +532,7 @@ void func_809F78EC(EnDodojr* this, GlobalContext* globalCtx) { } void func_809F799C(EnDodojr* this, GlobalContext* globalCtx) { - this->actor.flags |= 0x1000000; + this->actor.flags |= ACTOR_FLAG_24; func_8002D868(&this->actor); if (func_809F68B0(this, globalCtx) != 0) { diff --git a/src/overlays/actors/ovl_En_Dodongo/z_en_dodongo.c b/src/overlays/actors/ovl_En_Dodongo/z_en_dodongo.c index e477a575da..01a08d33b0 100644 --- a/src/overlays/actors/ovl_En_Dodongo/z_en_dodongo.c +++ b/src/overlays/actors/ovl_En_Dodongo/z_en_dodongo.c @@ -3,7 +3,7 @@ #include "overlays/actors/ovl_En_Bombf/z_en_bombf.h" #include "objects/object_dodongo/object_dodongo.h" -#define FLAGS 0x00000015 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4) typedef enum { DODONGO_SWEEP_TAIL, @@ -562,12 +562,12 @@ void EnDodongo_Walk(EnDodongo* this, GlobalContext* globalCtx) { if (Math_Vec3f_DistXZ(&this->actor.home.pos, &player->actor.world.pos) < 400.0f) { Math_SmoothStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer, 1, 0x1F4, 0); - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0; if ((this->actor.xzDistToPlayer < 100.0f) && (yawDiff < 0x1388) && (this->actor.yDistToPlayer < 60.0f)) { EnDodongo_SetupBreatheFire(this); } } else { - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; if ((Math_Vec3f_DistXZ(&this->actor.world.pos, &this->actor.home.pos) > 150.0f) || (this->retreatTimer != 0)) { s16 yawToHome = Math_Vec3f_Yaw(&this->actor.world.pos, &this->actor.home.pos); @@ -662,7 +662,7 @@ void EnDodongo_SetupDeath(EnDodongo* this, GlobalContext* globalCtx) { this->timer = 0; Audio_PlayActorSound2(&this->actor, NA_SE_EN_DODO_J_DEAD); this->actionState = DODONGO_DEATH; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; this->actor.speedXZ = 0.0f; EnDodongo_SetupAction(this, EnDodongo_Death); } diff --git a/src/overlays/actors/ovl_En_Dog/z_en_dog.c b/src/overlays/actors/ovl_En_Dog/z_en_dog.c index 9452d63558..9c4a5c804b 100644 --- a/src/overlays/actors/ovl_En_Dog/z_en_dog.c +++ b/src/overlays/actors/ovl_En_Dog/z_en_dog.c @@ -7,7 +7,7 @@ #include "z_en_dog.h" #include "objects/object_dog/object_dog.h" -#define FLAGS 0x00000000 +#define FLAGS 0 void EnDog_Init(Actor* thisx, GlobalContext* globalCtx); void EnDog_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_En_Door/z_en_door.c b/src/overlays/actors/ovl_En_Door/z_en_door.c index 113bdd16ae..053aeb2e8b 100644 --- a/src/overlays/actors/ovl_En_Door/z_en_door.c +++ b/src/overlays/actors/ovl_En_Door/z_en_door.c @@ -10,7 +10,7 @@ #include "objects/object_hidan_objects/object_hidan_objects.h" #include "objects/object_mizu_objects/object_mizu_objects.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 #define DOOR_AJAR_SLAM_RANGE 120.0f #define DOOR_AJAR_OPEN_RANGE (2 * DOOR_AJAR_SLAM_RANGE) @@ -145,7 +145,7 @@ void EnDoor_SetupType(EnDoor* this, GlobalContext* globalCtx) { if (Object_IsLoaded(&globalCtx->objectCtx, this->requiredObjBankIndex)) { doorType = this->actor.params >> 7 & 7; - this->actor.flags &= ~0x10; + this->actor.flags &= ~ACTOR_FLAG_4; this->actor.objBankIndex = this->requiredObjBankIndex; this->actionFunc = EnDoor_Idle; if (doorType == DOOR_EVENING) { @@ -172,7 +172,7 @@ void EnDoor_SetupType(EnDoor* this, GlobalContext* globalCtx) { doorType = DOOR_SCENEEXIT; } else { this->actionFunc = EnDoor_WaitForCheck; - this->actor.flags |= 0x8000009; + this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_27; } } // Replace the door type it was loaded with by the new type diff --git a/src/overlays/actors/ovl_En_Ds/z_en_ds.c b/src/overlays/actors/ovl_En_Ds/z_en_ds.c index 5d44113c9b..3290b9e6be 100644 --- a/src/overlays/actors/ovl_En_Ds/z_en_ds.c +++ b/src/overlays/actors/ovl_En_Ds/z_en_ds.c @@ -7,7 +7,7 @@ #include "z_en_ds.h" #include "objects/object_ds/object_ds.h" -#define FLAGS 0x00000009 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3) void EnDs_Init(Actor* thisx, GlobalContext* globalCtx); void EnDs_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -43,7 +43,7 @@ void EnDs_Init(Actor* thisx, GlobalContext* globalCtx) { this->actionFunc = EnDs_Wait; this->actor.targetMode = 1; this->unk_1E8 = 0; - this->actor.flags &= ~0x1; + this->actor.flags &= ~ACTOR_FLAG_0; this->unk_1E4 = 0.0f; } @@ -53,7 +53,7 @@ void EnDs_Destroy(Actor* thisx, GlobalContext* globalCtx) { void EnDs_Talk(EnDs* this, GlobalContext* globalCtx) { if (Actor_TextboxIsClosing(&this->actor, globalCtx)) { this->actionFunc = EnDs_Wait; - this->actor.flags &= ~0x10000; + this->actor.flags &= ~ACTOR_FLAG_16; } this->unk_1E8 |= 1; } @@ -70,7 +70,7 @@ void EnDs_TalkAfterGiveOddPotion(EnDs* this, GlobalContext* globalCtx) { if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) { this->actionFunc = EnDs_Talk; } else { - this->actor.flags |= 0x10000; + this->actor.flags |= ACTOR_FLAG_16; func_8002F2CC(&this->actor, globalCtx, 1000.0f); } } @@ -79,7 +79,7 @@ void EnDs_DisplayOddPotionText(EnDs* this, GlobalContext* globalCtx) { if (Actor_TextboxIsClosing(&this->actor, globalCtx)) { this->actor.textId = 0x504F; this->actionFunc = EnDs_TalkAfterGiveOddPotion; - this->actor.flags &= ~0x100; + this->actor.flags &= ~ACTOR_FLAG_8; gSaveContext.itemGetInf[3] |= 1; } } @@ -188,7 +188,7 @@ void EnDs_OfferBluePotion(EnDs* this, GlobalContext* globalCtx) { return; case 2: // have 100 rupees and empty bottle Rupees_ChangeBy(-100); - this->actor.flags &= ~0x10000; + this->actor.flags &= ~ACTOR_FLAG_16; func_8002F434(&this->actor, globalCtx, GI_POTION_BLUE, 10000.0f, 50.0f); this->actionFunc = EnDs_GiveBluePotion; return; diff --git a/src/overlays/actors/ovl_En_Du/z_en_du.c b/src/overlays/actors/ovl_En_Du/z_en_du.c index 6b115bdd6b..9cfb2028ab 100644 --- a/src/overlays/actors/ovl_En_Du/z_en_du.c +++ b/src/overlays/actors/ovl_En_Du/z_en_du.c @@ -2,7 +2,7 @@ #include "objects/object_du/object_du.h" #include "scenes/overworld/spot18/spot18_scene.h" -#define FLAGS 0x02000009 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_25) void EnDu_Init(Actor* thisx, GlobalContext* globalCtx); void EnDu_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_En_Dy_Extra/z_en_dy_extra.c b/src/overlays/actors/ovl_En_Dy_Extra/z_en_dy_extra.c index 16e97fefe3..de6e1f5953 100644 --- a/src/overlays/actors/ovl_En_Dy_Extra/z_en_dy_extra.c +++ b/src/overlays/actors/ovl_En_Dy_Extra/z_en_dy_extra.c @@ -8,7 +8,7 @@ #include "objects/object_dy_obj/object_dy_obj.h" #include "vt.h" -#define FLAGS 0x00000030 +#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) void EnDyExtra_Init(Actor* thisx, GlobalContext* globalCtx); void EnDyExtra_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_En_Eg/z_en_eg.c b/src/overlays/actors/ovl_En_Eg/z_en_eg.c index 2486bc4374..a3354fc35e 100644 --- a/src/overlays/actors/ovl_En_Eg/z_en_eg.c +++ b/src/overlays/actors/ovl_En_Eg/z_en_eg.c @@ -7,7 +7,7 @@ #include "z_en_eg.h" #include "vt.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 void EnEg_Init(Actor* thisx, GlobalContext* globalCtx); void EnEg_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_En_Eiyer/z_en_eiyer.c b/src/overlays/actors/ovl_En_Eiyer/z_en_eiyer.c index 85084f6ea0..966e1b562c 100644 --- a/src/overlays/actors/ovl_En_Eiyer/z_en_eiyer.c +++ b/src/overlays/actors/ovl_En_Eiyer/z_en_eiyer.c @@ -1,7 +1,7 @@ #include "z_en_eiyer.h" #include "objects/object_ei/object_ei.h" -#define FLAGS 0x00000005 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2) void EnEiyer_Init(Actor* thisx, GlobalContext* globalCtx); void EnEiyer_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -201,7 +201,7 @@ void EnEiyer_SetupAppearFromGround(EnEiyer* this) { this->collider.base.atFlags &= ~AT_ON; this->collider.base.acFlags &= ~AC_ON; - this->actor.flags &= ~0x1001; + this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_12); this->actor.shape.shadowScale = 0.0f; this->actor.shape.yOffset = 0.0f; this->actionFunc = EnEiyer_AppearFromGround; @@ -216,12 +216,12 @@ void EnEiyer_SetupUnderground(EnEiyer* this) { } this->collider.base.acFlags |= AC_ON; - this->actor.flags &= ~0x10; - this->actor.flags |= 1; + this->actor.flags &= ~ACTOR_FLAG_4; + this->actor.flags |= ACTOR_FLAG_0; } void EnEiyer_SetupInactive(EnEiyer* this) { - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; this->actor.world.rot.y = this->actor.shape.rot.y; this->actionFunc = EnEiyer_Inactive; } @@ -232,7 +232,7 @@ void EnEiyer_SetupAmbush(EnEiyer* this, GlobalContext* globalCtx) { this->collider.info.bumper.dmgFlags = ~0x00300000; this->basePos = this->actor.world.pos; this->actor.world.rot.y = this->actor.shape.rot.y; - this->actor.flags |= 0x1000; + this->actor.flags |= ACTOR_FLAG_12; this->collider.base.acFlags &= ~AC_ON; this->actor.shape.shadowScale = 65.0f; this->actor.shape.yOffset = 600.0f; @@ -266,7 +266,7 @@ void EnEiyer_SetupDiveAttack(EnEiyer* this, GlobalContext* globalCtx) { void EnEiyer_SetupLand(EnEiyer* this) { Animation_MorphToPlayOnce(&this->skelanime, &gStingerDiveAnim, -3.0f); this->collider.base.atFlags &= ~AT_ON; - this->actor.flags |= 0x10; + this->actor.flags |= ACTOR_FLAG_4; // Update BgCheck info, play sound, and spawn effect on the first frame of the land action this->timer = -1; @@ -609,7 +609,7 @@ void EnEiyer_UpdateDamage(EnEiyer* this, GlobalContext* globalCtx) { if (Actor_ApplyDamage(&this->actor) == 0) { Enemy_StartFinishingBlow(globalCtx, &this->actor); Audio_PlayActorSound2(&this->actor, NA_SE_EN_EIER_DEAD); - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; } // If underground, one hit kill @@ -672,7 +672,7 @@ void EnEiyer_Update(Actor* thisx, GlobalContext* globalCtx) { } } - if (this->actor.flags & 1) { + if (this->actor.flags & ACTOR_FLAG_0) { this->actor.focus.pos.x = this->actor.world.pos.x + Math_SinS(this->actor.shape.rot.y) * 12.5f; this->actor.focus.pos.z = this->actor.world.pos.z + Math_CosS(this->actor.shape.rot.y) * 12.5f; this->actor.focus.pos.y = this->actor.world.pos.y; diff --git a/src/overlays/actors/ovl_En_Elf/z_en_elf.c b/src/overlays/actors/ovl_En_Elf/z_en_elf.c index 09d1af2b1e..18bc3bee0e 100644 --- a/src/overlays/actors/ovl_En_Elf/z_en_elf.c +++ b/src/overlays/actors/ovl_En_Elf/z_en_elf.c @@ -7,7 +7,7 @@ #include "z_en_elf.h" #include "objects/gameplay_keep/gameplay_keep.h" -#define FLAGS 0x02000030 +#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5 | ACTOR_FLAG_25) #define FAIRY_FLAG_TIMED (1 << 8) #define FAIRY_FLAG_BIG (1 << 9) @@ -1379,7 +1379,7 @@ void func_80A053F0(Actor* thisx, GlobalContext* globalCtx) { } } else if (player->naviTextId < 0) { // trigger dialog instantly for negative message IDs - thisx->flags |= 0x10000; + thisx->flags |= ACTOR_FLAG_16; } if (Actor_ProcessTalkRequest(thisx, globalCtx)) { @@ -1397,10 +1397,10 @@ void func_80A053F0(Actor* thisx, GlobalContext* globalCtx) { func_80A01C38(this, 3); if (this->elfMsg != NULL) { - this->elfMsg->actor.flags |= 0x100; + this->elfMsg->actor.flags |= ACTOR_FLAG_8; } - thisx->flags &= ~0x10000; + thisx->flags &= ~ACTOR_FLAG_16; } else { this->actionFunc(this, globalCtx); thisx->shape.rot.y = this->unk_2BC; diff --git a/src/overlays/actors/ovl_En_Encount1/z_en_encount1.c b/src/overlays/actors/ovl_En_Encount1/z_en_encount1.c index 7e6c8865f2..2552320116 100644 --- a/src/overlays/actors/ovl_En_Encount1/z_en_encount1.c +++ b/src/overlays/actors/ovl_En_Encount1/z_en_encount1.c @@ -2,7 +2,7 @@ #include "vt.h" #include "overlays/actors/ovl_En_Tite/z_en_tite.h" -#define FLAGS 0x08000010 +#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_27) void EnEncount1_Init(Actor* thisx, GlobalContext* globalCtx); void EnEncount1_Update(Actor* thisx, GlobalContext* globalCtx); @@ -64,7 +64,7 @@ void EnEncount1_Init(Actor* thisx, GlobalContext* globalCtx) { osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ 発生チェック範囲 ☆☆☆☆☆ %f\n" VT_RST, this->spawnRange); osSyncPrintf("\n\n"); - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; switch (this->spawnType) { case SPAWNER_LEEVER: this->timer = 30; diff --git a/src/overlays/actors/ovl_En_Encount2/z_en_encount2.c b/src/overlays/actors/ovl_En_Encount2/z_en_encount2.c index 4d7d306ba0..93ef29e0eb 100644 --- a/src/overlays/actors/ovl_En_Encount2/z_en_encount2.c +++ b/src/overlays/actors/ovl_En_Encount2/z_en_encount2.c @@ -3,7 +3,7 @@ #include "vt.h" #include "objects/object_efc_star_field/object_efc_star_field.h" -#define FLAGS 0x00000030 +#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) typedef enum { /* 0x0 */ ENCOUNT2_INACTIVE, diff --git a/src/overlays/actors/ovl_En_Ex_Item/z_en_ex_item.c b/src/overlays/actors/ovl_En_Ex_Item/z_en_ex_item.c index 517f6102b2..6bdb07d700 100644 --- a/src/overlays/actors/ovl_En_Ex_Item/z_en_ex_item.c +++ b/src/overlays/actors/ovl_En_Ex_Item/z_en_ex_item.c @@ -9,7 +9,7 @@ #include "objects/gameplay_keep/gameplay_keep.h" #include "vt.h" -#define FLAGS 0x00000030 +#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) void EnExItem_Init(Actor* thisx, GlobalContext* globalCtx); void EnExItem_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -51,7 +51,7 @@ void EnExItem_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad; EnExItem* this = (EnExItem*)thisx; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; this->type = this->actor.params & 0xFF; this->unusedParam = (this->actor.params >> 8) & 0xFF; osSyncPrintf("\n\n"); diff --git a/src/overlays/actors/ovl_En_Ex_Ruppy/z_en_ex_ruppy.c b/src/overlays/actors/ovl_En_Ex_Ruppy/z_en_ex_ruppy.c index d66a18240b..1ed9a7cb68 100644 --- a/src/overlays/actors/ovl_En_Ex_Ruppy/z_en_ex_ruppy.c +++ b/src/overlays/actors/ovl_En_Ex_Ruppy/z_en_ex_ruppy.c @@ -3,7 +3,7 @@ #include "../ovl_En_Diving_Game/z_en_diving_game.h" #include "objects/gameplay_keep/gameplay_keep.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 void EnExRuppy_Init(Actor* thisx, GlobalContext* globalCtx); void EnExRuppy_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -105,7 +105,7 @@ void EnExRuppy_Init(Actor* thisx, GlobalContext* globalCtx) { this->unk_15A = this->actor.world.rot.z; this->actor.world.rot.z = 0; this->timer = 30; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; this->actionFunc = EnExRuppy_DropIntoWater; break; @@ -123,7 +123,7 @@ void EnExRuppy_Init(Actor* thisx, GlobalContext* globalCtx) { osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ わーなーコイン ☆☆☆☆☆ \n" VT_RST); this->actor.shape.shadowScale = 6.0f; this->actor.shape.yOffset = 700.0f; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; this->actionFunc = EnExRuppy_WaitToBlowUp; break; @@ -145,13 +145,13 @@ void EnExRuppy_Init(Actor* thisx, GlobalContext* globalCtx) { osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ ノーマルルピー ☆☆☆☆☆ \n" VT_RST); this->actor.shape.shadowScale = 6.0f; this->actor.shape.yOffset = 700.0f; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; this->actionFunc = EnExRuppy_WaitAsCollectible; break; case 4: // Progress markers in the shooting gallery this->actor.gravity = -3.0f; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; Actor_SetScale(&this->actor, 0.01f); this->actor.shape.shadowScale = 6.0f; this->actor.shape.yOffset = -700.0f; diff --git a/src/overlays/actors/ovl_En_Fd/z_en_fd.c b/src/overlays/actors/ovl_En_Fd/z_en_fd.c index 0d077645e6..83fc7c9374 100644 --- a/src/overlays/actors/ovl_En_Fd/z_en_fd.c +++ b/src/overlays/actors/ovl_En_Fd/z_en_fd.c @@ -8,7 +8,7 @@ #include "objects/gameplay_keep/gameplay_keep.h" #include "objects/object_fw/object_fw.h" -#define FLAGS 0x00000215 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4 | ACTOR_FLAG_9) #define FLG_COREDEAD (0x4000) #define FLG_COREDONE (0x8000) @@ -216,7 +216,7 @@ s32 EnFd_SpawnCore(EnFd* this, GlobalContext* globalCtx) { this->actor.child->colChkInfo.health = 8; } - if ((this->actor.flags & 0x2000) == 0x2000) { + if (CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_13)) { func_8002DE04(globalCtx, &this->actor, this->actor.child); } @@ -284,7 +284,7 @@ s32 EnFd_ColliderCheck(EnFd* this, GlobalContext* globalCtx) { return false; } this->invincibilityTimer = 30; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; Audio_PlayActorSound2(&this->actor, NA_SE_EN_FLAME_DAMAGE); Enemy_StartFinishingBlow(globalCtx, &this->actor); return true; @@ -448,8 +448,8 @@ void EnFd_Init(Actor* thisx, GlobalContext* globalCtx) { Collider_InitJntSph(globalCtx, &this->collider); Collider_SetJntSph(globalCtx, &this->collider, &this->actor, &sJntSphInit, this->colSphs); CollisionCheck_SetInfo2(&this->actor.colChkInfo, DamageTable_Get(0xF), &sColChkInit); - this->actor.flags &= ~1; - this->actor.flags |= 0x1000000; + this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_24; Actor_SetScale(&this->actor, 0.01f); this->firstUpdateFlag = true; this->actor.gravity = -1.0f; @@ -481,7 +481,7 @@ void EnFd_SpinAndGrow(EnFd* this, GlobalContext* globalCtx) { this->actor.velocity.y = 6.0f; this->actor.scale.y = 0.01f; this->actor.world.rot.y ^= 0x8000; - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0; this->actor.speedXZ = 8.0f; func_80034EC0(&this->skelAnime, sAnimations, 1); this->actionFunc = EnFd_JumpToGround; @@ -653,15 +653,15 @@ void EnFd_Update(Actor* thisx, GlobalContext* globalCtx) { EnFd_SpawnDot(this, globalCtx); } - if ((this->actor.flags & 0x2000) == 0x2000) { + if (CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_13)) { // has been hookshoted if (EnFd_SpawnCore(this, globalCtx)) { - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; this->invincibilityTimer = 30; Audio_PlayActorSound2(&this->actor, NA_SE_EN_FLAME_DAMAGE); Enemy_StartFinishingBlow(globalCtx, &this->actor); } else { - this->actor.flags &= ~0x2000; + this->actor.flags &= ~ACTOR_FLAG_13; } } else if (this->actionFunc != EnFd_WaitForCore) { EnFd_ColliderCheck(this, globalCtx); diff --git a/src/overlays/actors/ovl_En_Fd_Fire/z_en_fd_fire.c b/src/overlays/actors/ovl_En_Fd_Fire/z_en_fd_fire.c index 90c13d86e7..b345994ee6 100644 --- a/src/overlays/actors/ovl_En_Fd_Fire/z_en_fd_fire.c +++ b/src/overlays/actors/ovl_En_Fd_Fire/z_en_fd_fire.c @@ -1,7 +1,7 @@ #include "z_en_fd_fire.h" #include "objects/gameplay_keep/gameplay_keep.h" -#define FLAGS 0x00000015 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4) void EnFdFire_Init(Actor* thisx, GlobalContext* globalCtx); void EnFdFire_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -128,7 +128,7 @@ void EnFdFire_Init(Actor* thisx, GlobalContext* globalCtx) { Collider_InitCylinder(globalCtx, &this->collider); Collider_SetCylinder(globalCtx, &this->collider, &this->actor, &sCylinderInit); CollisionCheck_SetInfo2(&this->actor.colChkInfo, &sDamageTable, &sColChkInit); - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; this->actor.gravity = -0.6f; this->actor.speedXZ = 5.0f; this->actor.velocity.y = 12.0f; diff --git a/src/overlays/actors/ovl_En_Fhg_Fire/z_en_fhg_fire.c b/src/overlays/actors/ovl_En_Fhg_Fire/z_en_fhg_fire.c index b6552c900d..4b228727fe 100644 --- a/src/overlays/actors/ovl_En_Fhg_Fire/z_en_fhg_fire.c +++ b/src/overlays/actors/ovl_En_Fhg_Fire/z_en_fhg_fire.c @@ -11,7 +11,7 @@ #include "overlays/actors/ovl_En_fHG/z_en_fhg.h" #include "overlays/effects/ovl_Effect_Ss_Fhg_Flash/z_eff_ss_fhg_flash.h" -#define FLAGS 0x00000030 +#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) typedef enum { /* 0 */ STRIKE_INIT, diff --git a/src/overlays/actors/ovl_En_Fire_Rock/z_en_fire_rock.c b/src/overlays/actors/ovl_En_Fire_Rock/z_en_fire_rock.c index f757e0aec1..adcf06d026 100644 --- a/src/overlays/actors/ovl_En_Fire_Rock/z_en_fire_rock.c +++ b/src/overlays/actors/ovl_En_Fire_Rock/z_en_fire_rock.c @@ -3,7 +3,7 @@ #include "vt.h" #include "objects/object_efc_star_field/object_efc_star_field.h" -#define FLAGS 0x00000030 +#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) void EnFireRock_Init(Actor* thisx, GlobalContext* globalCtx); void EnFireRock_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_En_Firefly/z_en_firefly.c b/src/overlays/actors/ovl_En_Firefly/z_en_firefly.c index b8302f961f..4c463bad59 100644 --- a/src/overlays/actors/ovl_En_Firefly/z_en_firefly.c +++ b/src/overlays/actors/ovl_En_Firefly/z_en_firefly.c @@ -8,7 +8,7 @@ #include "objects/object_firefly/object_firefly.h" #include "overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.h" -#define FLAGS 0x00005005 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_12 | ACTOR_FLAG_14) void EnFirefly_Init(Actor* thisx, GlobalContext* globalCtx); void EnFirefly_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -148,7 +148,7 @@ void EnFirefly_Init(Actor* thisx, GlobalContext* globalCtx) { CollisionCheck_SetInfo(&this->actor.colChkInfo, &sDamageTable, &sColChkInfoInit); if ((this->actor.params & 0x8000) != 0) { - this->actor.flags |= 0x80; + this->actor.flags |= ACTOR_FLAG_7; if (1) {} this->actor.draw = EnFirefly_DrawInvisible; this->actor.params &= 0x7FFF; @@ -214,7 +214,7 @@ void EnFirefly_SetupFall(EnFirefly* this) { this->actor.velocity.y = 0.0f; Animation_Change(&this->skelAnime, &gKeeseFlyAnim, 0.5f, 0.0f, 0.0f, ANIMMODE_LOOP_INTERP, -3.0f); Audio_PlayActorSound2(&this->actor, NA_SE_EN_FFLY_DEAD); - this->actor.flags |= 0x10; + this->actor.flags |= ACTOR_FLAG_4; Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0, 40); this->actionFunc = EnFirefly_Fall; } @@ -261,7 +261,7 @@ void EnFirefly_SetupFrozenFall(EnFirefly* this, GlobalContext* globalCtx) { s32 i; Vec3f iceParticlePos; - this->actor.flags |= 0x10; + this->actor.flags |= ACTOR_FLAG_4; this->auraType = KEESE_AURA_NONE; this->actor.speedXZ = 0.0f; Actor_SetColorFilter(&this->actor, 0, 0xFF, 0, 0xFF); @@ -423,7 +423,7 @@ void EnFirefly_Fall(EnFirefly* this, GlobalContext* globalCtx) { this->actor.colorFilterTimer = 40; SkelAnime_Update(&this->skelAnime); Math_StepToF(&this->actor.speedXZ, 0.0f, 0.5f); - if (this->actor.flags & 0x8000) { + if (this->actor.flags & ACTOR_FLAG_15) { this->actor.colorFilterTimer = 40; } else { Math_ScaledStepToS(&this->actor.shape.rot.x, 0x6800, 0x200); @@ -626,7 +626,7 @@ void EnFirefly_UpdateDamage(EnFirefly* this, GlobalContext* globalCtx) { if ((this->actor.colChkInfo.damageEffect != 0) || (this->actor.colChkInfo.damage != 0)) { if (Actor_ApplyDamage(&this->actor) == 0) { Enemy_StartFinishingBlow(globalCtx, &this->actor); - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; } damageEffect = this->actor.colChkInfo.damageEffect; @@ -682,7 +682,7 @@ void EnFirefly_Update(Actor* thisx, GlobalContext* globalCtx2) { this->actionFunc(this, globalCtx); - if (!(this->actor.flags & 0x8000)) { + if (!(this->actor.flags & ACTOR_FLAG_15)) { if ((this->actor.colChkInfo.health == 0) || (this->actionFunc == EnFirefly_Stunned)) { Actor_MoveForward(&this->actor); } else { diff --git a/src/overlays/actors/ovl_En_Fish/z_en_fish.c b/src/overlays/actors/ovl_En_Fish/z_en_fish.c index c1c8f35710..ea9b2a81ba 100644 --- a/src/overlays/actors/ovl_En_Fish/z_en_fish.c +++ b/src/overlays/actors/ovl_En_Fish/z_en_fish.c @@ -8,7 +8,7 @@ #include "objects/gameplay_keep/gameplay_keep.h" #include "vt.h" -#define FLAGS 0x00000000 +#define FLAGS 0 void EnFish_Init(Actor* thisx, GlobalContext* globalCtx); void EnFish_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -116,7 +116,7 @@ void EnFish_SetCutsceneData(EnFish* this) { thisx->shape.yOffset = 600.0f; D_80A17014 = 10.0f; D_80A17018 = 0.0f; - thisx->flags |= 0x10; + thisx->flags |= ACTOR_FLAG_4; EnFish_SetOutOfWaterAnimation(this); } } @@ -141,7 +141,7 @@ void EnFish_Init(Actor* thisx, GlobalContext* globalCtx) { this->fastPhase = Rand_ZeroOne() * (0xFFFF + 0.5f); if (params == FISH_DROPPED) { - this->actor.flags |= 0x10; + this->actor.flags |= ACTOR_FLAG_4; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 8.0f); EnFish_Dropped_SetupFall(this); } else if (params == FISH_SWIMMING_UNIQUE) { @@ -473,7 +473,7 @@ void EnFish_Dropped_FlopOnGround(EnFish* this, GlobalContext* globalCtx) { void EnFish_Dropped_SetupSwimAway(EnFish* this) { this->actor.home.pos = this->actor.world.pos; - this->actor.flags |= 0x10; + this->actor.flags |= ACTOR_FLAG_4; this->timer = 200; this->actor.gravity = 0.0f; this->actor.minVelocityY = 0.0f; diff --git a/src/overlays/actors/ovl_En_Floormas/z_en_floormas.c b/src/overlays/actors/ovl_En_Floormas/z_en_floormas.c index fb5df16bfd..e11ff5a0cb 100644 --- a/src/overlays/actors/ovl_En_Floormas/z_en_floormas.c +++ b/src/overlays/actors/ovl_En_Floormas/z_en_floormas.c @@ -7,7 +7,7 @@ #include "z_en_floormas.h" #include "objects/object_wallmaster/object_wallmaster.h" -#define FLAGS 0x00000405 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_10) #define SPAWN_INVISIBLE 0x8000 #define SPAWN_SMALL 0x10 @@ -138,13 +138,13 @@ void EnFloormas_Init(Actor* thisx, GlobalContext* globalCtx2) { // s16 cast needed this->actor.params &= (s16) ~(SPAWN_INVISIBLE); if (invisble) { - this->actor.flags |= 0x80; + this->actor.flags |= ACTOR_FLAG_7; this->actor.draw = EnFloormas_DrawHighlighted; } if (this->actor.params == SPAWN_SMALL) { this->actor.draw = NULL; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; this->actionFunc = EnFloormas_SmWait; } else { // spawn first small floormaster @@ -280,8 +280,8 @@ void EnFloormas_SetupLand(EnFloormas* this) { void EnFloormas_SetupSplit(EnFloormas* this) { Actor_SetScale(&this->actor, 0.004f); - this->actor.flags |= 0x10; - if ((this->actor.flags & 0x80) == 0x80) { + this->actor.flags |= ACTOR_FLAG_4; + if (CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_7)) { this->actor.draw = EnFloormas_DrawHighlighted; } else { this->actor.draw = EnFloormas_Draw; @@ -346,7 +346,7 @@ void EnFloormas_SetupGrabLink(EnFloormas* this, Player* player) { f32 xzDelta; Animation_Change(&this->skelAnime, &gWallmasterJumpAnim, 1.0f, 36.0f, 45.0f, ANIMMODE_ONCE, -3.0f); - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; this->actor.speedXZ = 0.0f; this->actor.velocity.y = 0.0f; EnFloormas_MakeInvulnerable(this); @@ -385,7 +385,7 @@ void EnFloormas_SetupSmWait(EnFloormas* this) { } this->actor.draw = NULL; this->actionFunc = EnFloormas_SmWait; - this->actor.flags &= ~0x11; + this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_4); } void EnFloormas_SetupTakeDamage(EnFloormas* this) { @@ -663,7 +663,7 @@ void EnFloormas_Land(EnFloormas* this, GlobalContext* globalCtx) { void EnFloormas_Split(EnFloormas* this, GlobalContext* globalCtx) { if (this->actor.bgCheckFlags & 1) { if (SkelAnime_Update(&this->skelAnime)) { - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0; this->smActionTimer = 50; EnFloormas_SetupStand(this); } @@ -805,7 +805,7 @@ void EnFloormas_GrabLink(EnFloormas* this, GlobalContext* globalCtx) { this->actor.shape.rot.x = 0; this->actor.velocity.y = 6.0f; - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0; this->actor.speedXZ = -3.0f; EnFloormas_SetupLand(this); } else { @@ -912,7 +912,7 @@ void EnFloormas_Merge(EnFloormas* this, GlobalContext* globalCtx) { if (SkelAnime_Update(&this->skelAnime) != 0) { if (this->actor.scale.x >= 0.01f) { - this->actor.flags &= ~0x10; + this->actor.flags &= ~ACTOR_FLAG_4; EnFloormas_MakeVulnerable(this); this->actor.params = 0; this->collider.info.bumperFlags |= BUMP_HOOKABLE; @@ -997,7 +997,7 @@ void EnFloormas_ColliderCheck(EnFloormas* this, GlobalContext* globalCtx) { Audio_PlayActorSound2(&this->actor, NA_SE_EN_FALL_DEAD); } Enemy_StartFinishingBlow(globalCtx, &this->actor); - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; } else if (this->actor.colChkInfo.damage != 0) { Audio_PlayActorSound2(&this->actor, NA_SE_EN_FALL_DAMAGE); } @@ -1051,7 +1051,7 @@ void EnFloormas_Update(Actor* thisx, GlobalContext* globalCtx) { Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 20.0f, this->actor.scale.x * 3000.0f, 0.0f, 0x1D); Collider_UpdateCylinder(&this->actor, &this->collider); if (this->actionFunc == EnFloormas_Charge) { - this->actor.flags |= 0x1000000; + this->actor.flags |= ACTOR_FLAG_24; CollisionCheck_SetAT(globalCtx, &globalCtx->colChkCtx, &this->collider.base); } if (this->actionFunc != EnFloormas_GrabLink) { diff --git a/src/overlays/actors/ovl_En_Fr/z_en_fr.c b/src/overlays/actors/ovl_En_Fr/z_en_fr.c index 24c1548c5e..040b9b45ea 100644 --- a/src/overlays/actors/ovl_En_Fr/z_en_fr.c +++ b/src/overlays/actors/ovl_En_Fr/z_en_fr.c @@ -3,7 +3,7 @@ #include "vt.h" #include "objects/object_fr/object_fr.h" -#define FLAGS 0x02000019 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_4 | ACTOR_FLAG_25) void EnFr_Init(Actor* thisx, GlobalContext* globalCtx); void EnFr_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -223,7 +223,7 @@ void EnFr_Init(Actor* thisx, GlobalContext* globalCtx) { this->actor.destroy = NULL; this->actor.draw = NULL; this->actor.update = EnFr_UpdateIdle; - this->actor.flags &= ~0x11; + this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_4); this->actor.flags &= ~0; Actor_ChangeCategory(globalCtx, &globalCtx->actorCtx, &this->actor, ACTORCAT_PROP); this->actor.textId = 0x40AC; @@ -265,7 +265,7 @@ void EnFr_Update(Actor* thisx, GlobalContext* globalCtx) { s32 pad2; if (Object_IsLoaded(&globalCtx->objectCtx, this->objBankIndex)) { - this->actor.flags &= ~0x10; + this->actor.flags &= ~ACTOR_FLAG_4; frogIndex = this->actor.params - 1; sEnFrPointers.frogs[frogIndex] = this; Actor_ProcessInitChain(&this->actor, sInitChain); @@ -308,7 +308,7 @@ void EnFr_Update(Actor* thisx, GlobalContext* globalCtx) { this->posButterflyLight.x = this->posButterfly.x = this->posLogSpot.x; this->posButterflyLight.y = this->posButterfly.y = this->posLogSpot.y + 50.0f; this->posButterflyLight.z = this->posButterfly.z = this->posLogSpot.z; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; } } diff --git a/src/overlays/actors/ovl_En_Fu/z_en_fu.c b/src/overlays/actors/ovl_En_Fu/z_en_fu.c index d9da62e3d0..a5709ab38b 100644 --- a/src/overlays/actors/ovl_En_Fu/z_en_fu.c +++ b/src/overlays/actors/ovl_En_Fu/z_en_fu.c @@ -8,7 +8,7 @@ #include "objects/object_fu/object_fu.h" #include "scenes/indoors/hakasitarelay/hakasitarelay_scene.h" -#define FLAGS 0x02000019 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_4 | ACTOR_FLAG_25) #define FU_RESET_LOOK_ANGLE (1 << 0) #define FU_WAIT (1 << 1) @@ -137,7 +137,7 @@ void EnFu_WaitChild(EnFu* this, GlobalContext* globalCtx) { textID = (gSaveContext.eventChkInf[6] & 0x80) ? 0x5033 : 0x5032; } - // if actor flags & 0x100 is set and textID is 0x5033, change animation + // if ACTOR_FLAG_8 is set and textID is 0x5033, change animation // if func_80A1D94C returns 1, actionFunc is set to func_80A1DA04 if (func_80A1D94C(this, globalCtx, textID, func_80A1DA04)) { if (textID == 0x5033) { @@ -167,11 +167,11 @@ void func_80A1DBD4(EnFu* this, GlobalContext* globalCtx) { if (globalCtx->msgCtx.ocarinaMode >= OCARINA_MODE_04) { this->actionFunc = EnFu_WaitAdult; globalCtx->msgCtx.ocarinaMode = OCARINA_MODE_04; - this->actor.flags &= ~0x10000; + this->actor.flags &= ~ACTOR_FLAG_16; } else if (globalCtx->msgCtx.ocarinaMode == OCARINA_MODE_03) { func_80078884(NA_SE_SY_CORRECT_CHIME); this->actionFunc = func_80A1DB60; - this->actor.flags &= ~0x10000; + this->actor.flags &= ~ACTOR_FLAG_16; globalCtx->csCtx.segment = SEGMENTED_TO_VIRTUAL(gSongOfStormsCs); gSaveContext.cutsceneTrigger = 1; Item_Give(globalCtx, ITEM_SONG_STORMS); diff --git a/src/overlays/actors/ovl_En_Fw/z_en_fw.c b/src/overlays/actors/ovl_En_Fw/z_en_fw.c index 22d7e2a1cb..1a8d51f5d6 100644 --- a/src/overlays/actors/ovl_En_Fw/z_en_fw.c +++ b/src/overlays/actors/ovl_En_Fw/z_en_fw.c @@ -9,7 +9,7 @@ #include "overlays/actors/ovl_En_Bom/z_en_bom.h" #include "objects/gameplay_keep/gameplay_keep.h" -#define FLAGS 0x00000215 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4 | ACTOR_FLAG_9) void EnFw_Init(Actor* thisx, GlobalContext* globalCtx); void EnFw_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -354,7 +354,7 @@ void EnFw_JumpToParentInitPos(EnFw* this, GlobalContext* globalCtx) { void EnFw_Update(Actor* thisx, GlobalContext* globalCtx) { EnFw* this = (EnFw*)thisx; SkelAnime_Update(&this->skelAnime); - if ((this->actor.flags & 0x2000) != 0x2000) { + if (!CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_13)) { // not attached to hookshot. Actor_MoveForward(&this->actor); Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 10.0f, 20.0f, 0.0f, 5); diff --git a/src/overlays/actors/ovl_En_Fz/z_en_fz.c b/src/overlays/actors/ovl_En_Fz/z_en_fz.c index 007bbc334b..11b81a922b 100644 --- a/src/overlays/actors/ovl_En_Fz/z_en_fz.c +++ b/src/overlays/actors/ovl_En_Fz/z_en_fz.c @@ -1,7 +1,7 @@ #include "z_en_fz.h" #include "objects/object_fz/object_fz.h" -#define FLAGS 0x00000415 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4 | ACTOR_FLAG_10) void EnFz_Init(Actor* thisx, GlobalContext* globalCtx); void EnFz_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -173,7 +173,7 @@ void EnFz_Init(Actor* thisx, GlobalContext* globalCtx) { Actor_SetScale(&this->actor, 0.008f); this->actor.colChkInfo.mass = MASS_IMMOVABLE; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; this->unusedTimer1 = 0; this->unusedCounter = 0; this->updateBgInfo = true; @@ -385,7 +385,7 @@ void EnFz_SetYawTowardsPlayer(EnFz* this) { void EnFz_SetupDisappear(EnFz* this) { this->state = 2; this->isFreezing = false; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; this->actionFunc = EnFz_Disappear; } @@ -443,7 +443,7 @@ void EnFz_SetupAimForMove(EnFz* this) { this->timer = 40; this->updateBgInfo = true; this->isFreezing = true; - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0; this->actionFunc = EnFz_AimForMove; this->actor.gravity = -1.0f; } @@ -546,7 +546,7 @@ void EnFz_SetupDespawn(EnFz* this, GlobalContext* globalCtx) { this->updateBgInfo = true; this->isFreezing = false; this->isDespawning = true; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; this->isActive = false; this->timer = 60; this->speedXZ = 0.0f; @@ -568,7 +568,7 @@ void EnFz_SetupMelt(EnFz* this) { this->state = 3; this->isFreezing = false; this->isDespawning = true; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; this->actionFunc = EnFz_Melt; this->actor.speedXZ = 0.0f; this->speedXZ = 0.0f; @@ -599,7 +599,7 @@ void EnFz_SetupBlowSmokeStationary(EnFz* this) { this->timer = 40; this->updateBgInfo = true; this->isFreezing = true; - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0; this->actionFunc = EnFz_BlowSmokeStationary; this->actor.gravity = -1.0f; } diff --git a/src/overlays/actors/ovl_En_G_Switch/z_en_g_switch.c b/src/overlays/actors/ovl_En_G_Switch/z_en_g_switch.c index b8f0872735..ae1cd00ada 100644 --- a/src/overlays/actors/ovl_En_G_Switch/z_en_g_switch.c +++ b/src/overlays/actors/ovl_En_G_Switch/z_en_g_switch.c @@ -12,7 +12,7 @@ #include "objects/gameplay_keep/gameplay_keep.h" #include "objects/object_tsubo/object_tsubo.h" -#define FLAGS 0x00000030 +#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) typedef enum { /* 0 */ MOVE_TARGET, diff --git a/src/overlays/actors/ovl_En_Ganon_Mant/z_en_ganon_mant.c b/src/overlays/actors/ovl_En_Ganon_Mant/z_en_ganon_mant.c index 7d7b38fcf9..1b7eb3513c 100644 --- a/src/overlays/actors/ovl_En_Ganon_Mant/z_en_ganon_mant.c +++ b/src/overlays/actors/ovl_En_Ganon_Mant/z_en_ganon_mant.c @@ -7,7 +7,7 @@ #include "z_en_ganon_mant.h" #include "overlays/actors/ovl_Boss_Ganon/z_boss_ganon.h" -#define FLAGS 0x00000030 +#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) void EnGanonMant_Init(Actor* thisx, GlobalContext* globalCtx); void EnGanonMant_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -102,7 +102,7 @@ static u64 sForceAlignment = 0; void EnGanonMant_Init(Actor* thisx, GlobalContext* globalCtx) { EnGanonMant* this = (EnGanonMant*)thisx; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; } void EnGanonMant_Destroy(Actor* thisx, GlobalContext* globalCtx) { diff --git a/src/overlays/actors/ovl_En_Ganon_Organ/z_en_ganon_organ.c b/src/overlays/actors/ovl_En_Ganon_Organ/z_en_ganon_organ.c index 611bebcb85..89f7c20c65 100644 --- a/src/overlays/actors/ovl_En_Ganon_Organ/z_en_ganon_organ.c +++ b/src/overlays/actors/ovl_En_Ganon_Organ/z_en_ganon_organ.c @@ -7,7 +7,7 @@ #include "z_en_ganon_organ.h" #include "overlays/actors/ovl_Boss_Ganon/z_boss_ganon.h" -#define FLAGS 0x00000030 +#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) void EnGanonOrgan_Init(Actor* thisx, GlobalContext* globalCtx); void EnGanonOrgan_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -31,7 +31,7 @@ static u64 sForceAlignment = 0; #include "overlays/ovl_En_Ganon_Organ/ovl_En_Ganon_Organ.c" void EnGanonOrgan_Init(Actor* thisx, GlobalContext* globalCtx) { - thisx->flags &= ~1; + thisx->flags &= ~ACTOR_FLAG_0; } void EnGanonOrgan_Destroy(Actor* thisx, GlobalContext* globalCtx) { diff --git a/src/overlays/actors/ovl_En_Gb/z_en_gb.c b/src/overlays/actors/ovl_En_Gb/z_en_gb.c index 2201f05c2f..94bdb9f37e 100644 --- a/src/overlays/actors/ovl_En_Gb/z_en_gb.c +++ b/src/overlays/actors/ovl_En_Gb/z_en_gb.c @@ -7,7 +7,7 @@ #include "z_en_gb.h" #include "objects/object_ps/object_ps.h" -#define FLAGS 0x00000009 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3) void EnGb_Init(Actor* thisx, GlobalContext* globalCtx); void EnGb_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_En_Ge1/z_en_ge1.c b/src/overlays/actors/ovl_En_Ge1/z_en_ge1.c index d75d007dd4..76ac5c9691 100644 --- a/src/overlays/actors/ovl_En_Ge1/z_en_ge1.c +++ b/src/overlays/actors/ovl_En_Ge1/z_en_ge1.c @@ -8,7 +8,7 @@ #include "vt.h" #include "objects/object_ge1/object_ge1.h" -#define FLAGS 0x00000009 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3) #define GE1_STATE_TALKING (1 << 0) #define GE1_STATE_GIVE_QUIVER (1 << 1) @@ -522,7 +522,7 @@ void EnGe1_BeginGiveItem_Archery(EnGe1* this, GlobalContext* globalCtx) { s32 getItemId; if (Actor_TextboxIsClosing(&this->actor, globalCtx)) { - this->actor.flags &= ~0x10000; + this->actor.flags &= ~ACTOR_FLAG_16; this->actionFunc = EnGe1_WaitTillItemGiven_Archery; } @@ -549,7 +549,7 @@ void EnGe1_BeginGiveItem_Archery(EnGe1* this, GlobalContext* globalCtx) { void EnGe1_TalkWinPrize_Archery(EnGe1* this, GlobalContext* globalCtx) { if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) { this->actionFunc = EnGe1_BeginGiveItem_Archery; - this->actor.flags &= ~0x10000; + this->actor.flags &= ~ACTOR_FLAG_16; } else { func_8002F2CC(&this->actor, globalCtx, 200.0f); } @@ -571,7 +571,7 @@ void EnGe1_BeginGame_Archery(EnGe1* this, GlobalContext* globalCtx) { Actor* horse; if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_CHOICE) && Message_ShouldAdvance(globalCtx)) { - this->actor.flags &= ~0x10000; + this->actor.flags &= ~ACTOR_FLAG_16; switch (globalCtx->msgCtx.choiceIndex) { case 0: @@ -629,7 +629,7 @@ void EnGe1_TalkAfterGame_Archery(EnGe1* this, GlobalContext* globalCtx) { gSaveContext.eventInf[0] &= ~0x100; LOG_NUM("z_common_data.yabusame_total", gSaveContext.minigameScore, "../z_en_ge1.c", 1110); LOG_NUM("z_common_data.memory.information.room_inf[127][ 0 ]", HIGH_SCORE(HS_HBA), "../z_en_ge1.c", 1111); - this->actor.flags |= 0x10000; + this->actor.flags |= ACTOR_FLAG_16; if (HIGH_SCORE(HS_HBA) < gSaveContext.minigameScore) { HIGH_SCORE(HS_HBA) = gSaveContext.minigameScore; diff --git a/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c b/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c index ff83b5bce2..9a6f13ae49 100644 --- a/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c +++ b/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c @@ -8,7 +8,7 @@ #include "vt.h" #include "objects/object_gla/object_gla.h" -#define FLAGS 0x00000019 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_4) #define GE2_STATE_ANIMCOMPLETE (1 << 1) #define GE2_STATE_KO (1 << 2) @@ -294,7 +294,7 @@ void EnGe2_KnockedOut(EnGe2* this, GlobalContext* globalCtx) { s32 effectAngle; Vec3f effectPos; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; if (this->stateFlags & GE2_STATE_ANIMCOMPLETE) { effectAngle = (globalCtx->state.frames) * 0x2800; effectPos.x = this->actor.focus.pos.x + (Math_CosS(effectAngle) * 5.0f); @@ -434,7 +434,7 @@ void EnGe2_SetActionAfterTalk(EnGe2* this, GlobalContext* globalCtx) { break; } this->actor.update = EnGe2_UpdateFriendly; - this->actor.flags &= ~0x10000; + this->actor.flags &= ~ACTOR_FLAG_16; } EnGe2_TurnToFacePlayer(this, globalCtx); } @@ -455,7 +455,7 @@ void EnGe2_WaitTillCardGiven(EnGe2* this, GlobalContext* globalCtx) { void EnGe2_GiveCard(EnGe2* this, GlobalContext* globalCtx) { if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(globalCtx)) { Message_CloseTextbox(globalCtx); - this->actor.flags &= ~0x10000; + this->actor.flags &= ~ACTOR_FLAG_16; this->actionFunc = EnGe2_WaitTillCardGiven; func_8002F434(&this->actor, globalCtx, GI_GERUDO_CARD, 10000.0f, 50.0f); } @@ -467,7 +467,7 @@ void EnGe2_ForceTalk(EnGe2* this, GlobalContext* globalCtx) { this->actionFunc = EnGe2_GiveCard; } else { this->actor.textId = 0x6004; - this->actor.flags |= 0x10000; + this->actor.flags |= ACTOR_FLAG_16; func_8002F1C4(&this->actor, globalCtx, 300.0f, 300.0f, 0); } EnGe2_LookAtPlayer(this, globalCtx); diff --git a/src/overlays/actors/ovl_En_Ge3/z_en_ge3.c b/src/overlays/actors/ovl_En_Ge3/z_en_ge3.c index dbad2fb629..7a5f630bcd 100644 --- a/src/overlays/actors/ovl_En_Ge3/z_en_ge3.c +++ b/src/overlays/actors/ovl_En_Ge3/z_en_ge3.c @@ -7,7 +7,7 @@ #include "z_en_ge3.h" #include "objects/object_geldb/object_geldb.h" -#define FLAGS 0x00000019 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_4) void EnGe3_Init(Actor* thisx, GlobalContext* globalCtx); void EnGe3_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -127,7 +127,7 @@ void EnGe3_Wait(EnGe3* this, GlobalContext* globalCtx) { if (Actor_TextboxIsClosing(&this->actor, globalCtx)) { this->actionFunc = EnGe3_WaitLookAtPlayer; this->actor.update = EnGe3_UpdateWhenNotTalking; - this->actor.flags &= ~0x10000; + this->actor.flags &= ~ACTOR_FLAG_16; } EnGe3_TurnToFacePlayer(this, globalCtx); } @@ -148,7 +148,7 @@ void EnGe3_WaitTillCardGiven(EnGe3* this, GlobalContext* globalCtx) { void EnGe3_GiveCard(EnGe3* this, GlobalContext* globalCtx) { if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(globalCtx)) { Message_CloseTextbox(globalCtx); - this->actor.flags &= ~0x10000; + this->actor.flags &= ~ACTOR_FLAG_16; this->actionFunc = EnGe3_WaitTillCardGiven; func_8002F434(&this->actor, globalCtx, GI_GERUDO_CARD, 10000.0f, 50.0f); } @@ -163,7 +163,7 @@ void EnGe3_ForceTalk(EnGe3* this, GlobalContext* globalCtx) { this->unk_30C |= 4; } this->actor.textId = 0x6004; - this->actor.flags |= 0x10000; + this->actor.flags |= ACTOR_FLAG_16; func_8002F1C4(&this->actor, globalCtx, 300.0f, 300.0f, 0); } EnGe3_LookAtPlayer(this, globalCtx); diff --git a/src/overlays/actors/ovl_En_GeldB/z_en_geldb.c b/src/overlays/actors/ovl_En_GeldB/z_en_geldb.c index 1939827509..0418702ba3 100644 --- a/src/overlays/actors/ovl_En_GeldB/z_en_geldb.c +++ b/src/overlays/actors/ovl_En_GeldB/z_en_geldb.c @@ -7,7 +7,7 @@ #include "z_en_geldb.h" #include "objects/object_geldb/object_geldb.h" -#define FLAGS 0x00000015 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4) typedef enum { /* 0 */ GELDB_WAIT, @@ -348,7 +348,7 @@ void EnGeldB_SetupWait(EnGeldB* this) { this->action = GELDB_WAIT; this->actor.bgCheckFlags &= ~3; this->actor.gravity = -2.0f; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; EnGeldB_SetupAction(this, EnGeldB_Wait); } @@ -366,7 +366,7 @@ void EnGeldB_Wait(EnGeldB* this, GlobalContext* globalCtx) { Audio_PlayActorSound2(&this->actor, NA_SE_EN_RIZA_DOWN); this->skelAnime.playSpeed = 1.0f; this->actor.world.pos.y = this->actor.floorHeight; - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0; this->actor.focus.pos = this->actor.world.pos; this->actor.bgCheckFlags &= ~2; this->actor.velocity.y = 0.0f; @@ -1314,7 +1314,7 @@ void EnGeldB_SetupDefeated(EnGeldB* this) { this->invisible = true; } this->action = GELDB_DEFEAT; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; Audio_PlayActorSound2(&this->actor, NA_SE_EN_GERUDOFT_DEAD); EnGeldB_SetupAction(this, EnGeldB_Defeated); } diff --git a/src/overlays/actors/ovl_En_GirlA/z_en_girla.c b/src/overlays/actors/ovl_En_GirlA/z_en_girla.c index f1953fe4ea..2befdeaaef 100644 --- a/src/overlays/actors/ovl_En_GirlA/z_en_girla.c +++ b/src/overlays/actors/ovl_En_GirlA/z_en_girla.c @@ -7,7 +7,7 @@ #include "z_en_girla.h" #include "vt.h" -#define FLAGS 0x00000019 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_4) void EnGirlA_Init(Actor* thisx, GlobalContext* globalCtx); void EnGirlA_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -980,7 +980,7 @@ void EnGirlA_InitializeItemAction(EnGirlA* this, GlobalContext* globalCtx) { ShopItemEntry* itemEntry = &shopItemEntries[params]; if (Object_IsLoaded(&globalCtx->objectCtx, this->objBankIndex)) { - this->actor.flags &= ~0x10; + this->actor.flags &= ~ACTOR_FLAG_4; this->actor.objBankIndex = this->objBankIndex; switch (this->actor.params) { case SI_KEATON_MASK: @@ -1056,7 +1056,7 @@ void EnGirlA_InitializeItemAction(EnGirlA* this, GlobalContext* globalCtx) { this->hiliteFunc = itemEntry->hiliteFunc; this->giDrawId = itemEntry->giDrawId; osSyncPrintf("%s(%2d)\n", sShopItemDescriptions[params], params); - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; Actor_SetScale(&this->actor, 0.25f); this->actor.shape.yOffset = 24.0f; this->actor.shape.shadowScale = 4.0f; diff --git a/src/overlays/actors/ovl_En_Gm/z_en_gm.c b/src/overlays/actors/ovl_En_Gm/z_en_gm.c index c2c4dae068..1ba41c827c 100644 --- a/src/overlays/actors/ovl_En_Gm/z_en_gm.c +++ b/src/overlays/actors/ovl_En_Gm/z_en_gm.c @@ -9,7 +9,7 @@ #include "objects/object_gm/object_gm.h" #include "vt.h" -#define FLAGS 0x00000019 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_4) void EnGm_Init(Actor* thisx, GlobalContext* globalCtx); void EnGm_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -103,7 +103,7 @@ s32 func_80A3D7C8(void) { void func_80A3D838(EnGm* this, GlobalContext* globalCtx) { if (Object_IsLoaded(&globalCtx->objectCtx, this->objGmBankIndex)) { - this->actor.flags &= ~0x10; + this->actor.flags &= ~ACTOR_FLAG_4; SkelAnime_InitFlex(globalCtx, &this->skelAnime, &gGoronSkel, NULL, this->jointTable, this->morphTable, 18); gSegments[6] = VIRTUAL_TO_PHYSICAL(globalCtx->objectCtx.status[this->objGmBankIndex].segment); Animation_Change(&this->skelAnime, &object_gm_Anim_0002B8, 1.0f, 0.0f, diff --git a/src/overlays/actors/ovl_En_Go/z_en_go.c b/src/overlays/actors/ovl_En_Go/z_en_go.c index 1d22bb903b..19f435ed3c 100644 --- a/src/overlays/actors/ovl_En_Go/z_en_go.c +++ b/src/overlays/actors/ovl_En_Go/z_en_go.c @@ -3,7 +3,7 @@ #include "objects/gameplay_keep/gameplay_keep.h" #include "objects/object_oF1d_map/object_oF1d_map.h" -#define FLAGS 0x00000039 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_4 | ACTOR_FLAG_5) void EnGo_Init(Actor* thisx, GlobalContext* globalCtx); void EnGo_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -635,8 +635,8 @@ void EnGo_Init(Actor* thisx, GlobalContext* globalCtx) { } if ((this->actor.params & 0xF0) && ((this->actor.params & 0xF0) != 0x90)) { - this->actor.flags &= ~0x10; - this->actor.flags &= ~0x20; + this->actor.flags &= ~ACTOR_FLAG_4; + this->actor.flags &= ~ACTOR_FLAG_5; } EnGo_ChangeAnimation(this, 0); diff --git a/src/overlays/actors/ovl_En_Go2/z_en_go2.c b/src/overlays/actors/ovl_En_Go2/z_en_go2.c index ad91f96038..3a324c33fd 100644 --- a/src/overlays/actors/ovl_En_Go2/z_en_go2.c +++ b/src/overlays/actors/ovl_En_Go2/z_en_go2.c @@ -3,7 +3,7 @@ #include "objects/gameplay_keep/gameplay_keep.h" #include "objects/object_oF1d_map/object_oF1d_map.h" -#define FLAGS 0x00000039 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_4 | ACTOR_FLAG_5) /* FLAGS @@ -455,9 +455,10 @@ u16 EnGo2_GetTextIdGoronCityLowestFloor(GlobalContext* globalCtx, EnGo2* this) { } else if (CHECK_QUEST_ITEM(QUEST_GORON_RUBY)) { return 0x3027; } else { - return CUR_UPG_VALUE(UPG_STRENGTH) != 0 - ? 0x302C - : !Flags_GetSwitch(globalCtx, 0x1B) ? 0x3017 : gSaveContext.infTable[15] & 0x100 ? 0x3019 : 0x3018; + return CUR_UPG_VALUE(UPG_STRENGTH) != 0 ? 0x302C + : !Flags_GetSwitch(globalCtx, 0x1B) ? 0x3017 + : gSaveContext.infTable[15] & 0x100 ? 0x3019 + : 0x3018; } } @@ -857,7 +858,7 @@ s32 func_80A44AB0(EnGo2* this, GlobalContext* globalCtx) { } else { if (this->collider.base.acFlags & 2) { Audio_PlaySoundGeneral(NA_SE_SY_CORRECT_CHIME, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8); - this->actor.flags &= ~0x1000000; + this->actor.flags &= ~ACTOR_FLAG_24; this->collider.base.acFlags &= ~0x2; EnGo2_StopRolling(this, globalCtx); return true; @@ -933,10 +934,10 @@ s32 EnGo2_IsWakingUp(EnGo2* this) { if ((this->actor.params & 0x1F) == GORON_DMT_BIGGORON) { if ((this->collider.base.ocFlags2 & 1) == 0) { - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; return false; } else { - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0; return true; } } @@ -1263,7 +1264,7 @@ void EnGo2_GetDustData(EnGo2* this, s32 index2) { void EnGo2_RollingAnimation(EnGo2* this, GlobalContext* globalCtx) { if ((this->actor.params & 0x1F) == GORON_DMT_BIGGORON) { - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; func_80034EC0(&this->skelAnime, sAnimations, 10); this->skelAnime.playSpeed = -0.5f; } else { @@ -1312,7 +1313,7 @@ void EnGo2_SetupRolling(EnGo2* this, GlobalContext* globalCtx) { } else { this->actor.speedXZ = 6.0f; } - this->actor.flags |= 0x1000000; + this->actor.flags |= ACTOR_FLAG_24; this->animTimer = 10; this->actor.shape.yOffset = 1800.0f; this->actor.speedXZ += this->actor.speedXZ; // Speeding up @@ -1494,8 +1495,8 @@ void EnGo2_Init(Actor* thisx, GlobalContext* globalCtx) { case GORON_CITY_LOST_WOODS: case GORON_DMT_FAIRY_HINT: case GORON_MARKET_BAZAAR: - this->actor.flags &= ~0x10; - this->actor.flags &= ~0x20; + this->actor.flags &= ~ACTOR_FLAG_4; + this->actor.flags &= ~ACTOR_FLAG_5; } EnGo2_SetColliderDim(this); @@ -1559,7 +1560,7 @@ void EnGo2_Init(Actor* thisx, GlobalContext* globalCtx) { break; case GORON_DMT_BIGGORON: this->actor.shape.shadowDraw = NULL; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; if ((INV_CONTENT(ITEM_TRADE_ADULT) >= ITEM_SWORD_BROKEN) && (INV_CONTENT(ITEM_TRADE_ADULT) <= ITEM_EYEDROPS)) { this->eyeMouthTexState = 1; @@ -1636,7 +1637,7 @@ void func_80A46B40(EnGo2* this, GlobalContext* globalCtx) { } else { if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) { if ((this->actor.params & 0x1F) == GORON_DMT_BIGGORON) { - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0; } func_80A454CC(this); this->unk_211 = true; @@ -1783,7 +1784,7 @@ void EnGo2_BiggoronEyedrops(EnGo2* this, GlobalContext* globalCtx) { switch (this->goronState) { case 0: func_80034EC0(&this->skelAnime, sAnimations, 5); - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; this->actor.shape.rot.y += 0x5B0; this->unk_26E = 1; this->animTimer = this->skelAnime.endFrame + 60.0f + 60.0f; // eyeDrops animation timer @@ -1814,7 +1815,7 @@ void EnGo2_BiggoronEyedrops(EnGo2* this, GlobalContext* globalCtx) { } if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_CLOSING) { func_80034EC0(&this->skelAnime, sAnimations, 1); - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0; this->unk_26E = 2; this->skelAnime.playSpeed = 0.0f; this->skelAnime.curFrame = this->skelAnime.endFrame; diff --git a/src/overlays/actors/ovl_En_Goma/z_en_goma.c b/src/overlays/actors/ovl_En_Goma/z_en_goma.c index 6f05c0d5f0..733e267e54 100644 --- a/src/overlays/actors/ovl_En_Goma/z_en_goma.c +++ b/src/overlays/actors/ovl_En_Goma/z_en_goma.c @@ -4,7 +4,7 @@ #include "overlays/actors/ovl_Boss_Goma/z_boss_goma.h" #include "overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h" -#define FLAGS 0x00000035 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4 | ACTOR_FLAG_5) void EnGoma_Init(Actor* thisx, GlobalContext* globalCtx); void EnGoma_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -119,10 +119,10 @@ void EnGoma_Init(Actor* thisx, GlobalContext* globalCtx) { this->gomaType = ENGOMA_BOSSLIMB; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 0.0f); this->actionTimer = this->actor.params + 150; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; } else if (params >= 10) { // Debris when hatching this->actor.gravity = -1.3f; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; this->actionTimer = 50; this->gomaType = ENGOMA_HATCH_DEBRIS; this->eggScale = 1.0f; @@ -366,7 +366,7 @@ void EnGoma_SetupDie(EnGoma* this) { } this->invincibilityTimer = 100; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; } void EnGoma_Die(EnGoma* this, GlobalContext* globalCtx) { @@ -497,7 +497,7 @@ void EnGoma_SetupJump(EnGoma* this) { } void EnGoma_Jump(EnGoma* this, GlobalContext* globalCtx) { - this->actor.flags |= 0x1000000; + this->actor.flags |= ACTOR_FLAG_24; SkelAnime_Update(&this->skelanime); Math_ApproachF(&this->actor.speedXZ, 10.0f, 0.5f, 5.0f); diff --git a/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.c b/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.c index b97c39fa0a..5e9e1a6ea0 100644 --- a/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.c +++ b/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.c @@ -10,7 +10,7 @@ #include "objects/object_goroiwa/object_goroiwa.h" #include "vt.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 typedef s32 (*EnGoroiwaUnkFunc1)(EnGoroiwa* this, GlobalContext* globalCtx); typedef void (*EnGoroiwaUnkFunc2)(EnGoroiwa* this); diff --git a/src/overlays/actors/ovl_En_Gs/z_en_gs.c b/src/overlays/actors/ovl_En_Gs/z_en_gs.c index 7ef62940ac..19eceea908 100644 --- a/src/overlays/actors/ovl_En_Gs/z_en_gs.c +++ b/src/overlays/actors/ovl_En_Gs/z_en_gs.c @@ -9,7 +9,7 @@ #include "overlays/actors/ovl_En_Elf/z_en_elf.h" #include "objects/gameplay_keep/gameplay_keep.h" -#define FLAGS 0x02000009 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_25) void EnGs_Init(Actor* thisx, GlobalContext* globalCtx); void EnGs_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -353,7 +353,7 @@ void func_80A4ED34(EnGs* this, GlobalContext* globalCtx) { func_8002F974(&this->actor, NA_SE_EV_FIRE_PILLAR - SFX_FLAG); if (this->unk_200++ >= 40) { this->unk_19E |= 0x10; - this->actor.flags |= 0x10; + this->actor.flags |= ACTOR_FLAG_4; this->actor.uncullZoneForward = 12000.0f; this->actor.gravity = 0.3f; diff --git a/src/overlays/actors/ovl_En_Guest/z_en_guest.c b/src/overlays/actors/ovl_En_Guest/z_en_guest.c index ec032dc75e..aadb57affb 100644 --- a/src/overlays/actors/ovl_En_Guest/z_en_guest.c +++ b/src/overlays/actors/ovl_En_Guest/z_en_guest.c @@ -9,7 +9,7 @@ #include "objects/object_boj/object_boj.h" #include "vt.h" -#define FLAGS 0x00000019 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_4) void EnGuest_Init(Actor* thisx, GlobalContext* globalCtx); void EnGuest_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -79,7 +79,7 @@ void EnGuest_Update(Actor* thisx, GlobalContext* globalCtx) { s32 pad; if (Object_IsLoaded(&globalCtx->objectCtx, this->osAnimeBankIndex) != 0) { - this->actor.flags &= ~0x10; + this->actor.flags &= ~ACTOR_FLAG_4; Actor_ProcessInitChain(&this->actor, sInitChain); SkelAnime_InitFlex(globalCtx, &this->skelAnime, &object_boj_Skel_0000F0, NULL, this->jointTable, diff --git a/src/overlays/actors/ovl_En_Hata/z_en_hata.c b/src/overlays/actors/ovl_En_Hata/z_en_hata.c index 5f14c3db7f..1e4d89be5d 100644 --- a/src/overlays/actors/ovl_En_Hata/z_en_hata.c +++ b/src/overlays/actors/ovl_En_Hata/z_en_hata.c @@ -7,7 +7,7 @@ #include "z_en_hata.h" #include "objects/object_hata/object_hata.h" -#define FLAGS 0x00000000 +#define FLAGS 0 void EnHata_Init(Actor* thisx, GlobalContext* globalCtx); void EnHata_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_En_Heishi1/z_en_heishi1.c b/src/overlays/actors/ovl_En_Heishi1/z_en_heishi1.c index 6df57a3e62..c6f4d725cb 100644 --- a/src/overlays/actors/ovl_En_Heishi1/z_en_heishi1.c +++ b/src/overlays/actors/ovl_En_Heishi1/z_en_heishi1.c @@ -8,7 +8,7 @@ #include "objects/object_sd/object_sd.h" #include "vt.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 void EnHeishi1_Init(Actor* thisx, GlobalContext* globalCtx); void EnHeishi1_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c b/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c index 70149134f6..b9c5df889a 100644 --- a/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c +++ b/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c @@ -12,7 +12,7 @@ #include "overlays/actors/ovl_En_Bom/z_en_bom.h" #include "overlays/actors/ovl_Bg_Spot15_Saku/z_bg_spot15_saku.h" -#define FLAGS 0x00000009 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3) void EnHeishi2_Init(Actor* thisx, GlobalContext* globalCtx); void EnHeishi2_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -92,7 +92,7 @@ void EnHeishi2_Init(Actor* thisx, GlobalContext* globalCtx) { if ((this->type == 6) || (this->type == 9)) { this->actor.draw = EnHeishi2_DrawKingGuard; - this->actor.flags &= -2; + this->actor.flags &= ~ACTOR_FLAG_0; Actor_ChangeCategory(globalCtx, &globalCtx->actorCtx, &this->actor, 6); if (this->type == 6) { this->actionFunc = EnHeishi2_DoNothing1; @@ -112,7 +112,7 @@ void EnHeishi2_Init(Actor* thisx, GlobalContext* globalCtx) { this->actor.shape.rot.y = this->actor.world.rot.y; Collider_DestroyCylinder(globalCtx, &this->collider); func_8002DF54(globalCtx, 0, 8); - this->actor.flags |= 0x11; + this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_4; this->actionFunc = func_80A544AC; } } else { @@ -143,7 +143,7 @@ void EnHeishi2_Init(Actor* thisx, GlobalContext* globalCtx) { // "Peep hole soldier!" osSyncPrintf(VT_FGCOL(GREEN) " ☆☆☆☆☆ 覗き穴奥兵士ふぃ〜 ☆☆☆☆☆ \n" VT_RST); Collider_DestroyCylinder(globalCtx, collider); - this->actor.flags &= -0xA; + this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_3); this->actionFunc = EnHeishi_DoNothing2; break; } @@ -637,7 +637,7 @@ void func_80A544AC(EnHeishi2* this, GlobalContext* globalCtx) { this->actor.world.rot.z = this->actor.shape.rot.z; if (this->actor.shape.rot.z < -6000) { Message_StartTextbox(globalCtx, 0x708F, NULL); - this->actor.flags |= 0x10000; + this->actor.flags |= ACTOR_FLAG_16; this->actionFunc = func_80A5455C; this->unk_2E4 = 0.0f; } diff --git a/src/overlays/actors/ovl_En_Heishi3/z_en_heishi3.c b/src/overlays/actors/ovl_En_Heishi3/z_en_heishi3.c index 5eb1f34809..7169f1da88 100644 --- a/src/overlays/actors/ovl_En_Heishi3/z_en_heishi3.c +++ b/src/overlays/actors/ovl_En_Heishi3/z_en_heishi3.c @@ -8,7 +8,7 @@ #include "objects/object_sd/object_sd.h" #include "vt.h" -#define FLAGS 0x00000000 +#define FLAGS 0 void EnHeishi3_Init(Actor* thisx, GlobalContext* globalCtx); void EnHeishi3_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.c b/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.c index 1fa94a5cbf..bc913afa5f 100644 --- a/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.c +++ b/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.c @@ -2,7 +2,7 @@ #include "objects/object_sd/object_sd.h" #include "vt.h" -#define FLAGS 0x00000009 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3) void EnHeishi4_Init(Actor* thisx, GlobalContext* globalCtx); void EnHeishi4_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_En_Hintnuts/z_en_hintnuts.c b/src/overlays/actors/ovl_En_Hintnuts/z_en_hintnuts.c index 8cd3de1276..1db2f7c48b 100644 --- a/src/overlays/actors/ovl_En_Hintnuts/z_en_hintnuts.c +++ b/src/overlays/actors/ovl_En_Hintnuts/z_en_hintnuts.c @@ -7,7 +7,7 @@ #include "z_en_hintnuts.h" #include "objects/object_hintnuts/object_hintnuts.h" -#define FLAGS 0x00000005 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2) void EnHintnuts_Init(Actor* thisx, GlobalContext* globalCtx); void EnHintnuts_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -75,7 +75,7 @@ void EnHintnuts_Init(Actor* thisx, GlobalContext* globalCtx) { Actor_ProcessInitChain(&this->actor, sInitChain); if (this->actor.params == 0xA) { - this->actor.flags &= ~5; + this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_2); } else { ActorShape_Init(&this->actor.shape, 0x0, ActorShadow_DrawCircle, 35.0f); SkelAnime_Init(globalCtx, &this->skelAnime, &gHintNutsSkel, &gHintNutsStandAnim, this->jointTable, @@ -110,8 +110,8 @@ void EnHintnuts_Destroy(Actor* thisx, GlobalContext* globalCtx) { void EnHintnuts_HitByScrubProjectile1(EnHintnuts* this, GlobalContext* globalCtx) { if (this->actor.textId != 0 && this->actor.category == ACTORCAT_ENEMY && ((this->actor.params == 0) || (sPuzzleCounter == 2))) { - this->actor.flags &= ~0x5; - this->actor.flags |= 0x9; + this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_2); + this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_3; Actor_ChangeCategory(globalCtx, &globalCtx->actorCtx, &this->actor, ACTORCAT_BG); } } @@ -170,7 +170,7 @@ void EnHintnuts_HitByScrubProjectile2(EnHintnuts* this) { } sPuzzleCounter--; } - this->actor.flags |= 0x10; + this->actor.flags |= ACTOR_FLAG_4; this->actionFunc = EnHintnuts_BeginFreeze; } else { this->actionFunc = EnHintnuts_BeginRun; @@ -195,7 +195,7 @@ void EnHintnuts_SetupLeave(EnHintnuts* this, GlobalContext* globalCtx) { this->animFlagAndTimer = 100; this->actor.world.rot.y = this->actor.shape.rot.y; this->collider.base.ocFlags1 &= ~OC1_ON; - this->actor.flags |= 0x10; + this->actor.flags |= ACTOR_FLAG_4; Audio_PlayActorSound2(&this->actor, NA_SE_EN_NUTS_DAMAGE); Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_ITEM00, this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, 0x0, 0x0, 0x0, 0x3); // recovery heart @@ -204,7 +204,7 @@ void EnHintnuts_SetupLeave(EnHintnuts* this, GlobalContext* globalCtx) { void EnHintnuts_SetupFreeze(EnHintnuts* this) { Animation_PlayLoop(&this->skelAnime, &gHintNutsFreezeAnim); - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; Actor_SetColorFilter(&this->actor, 0, 0xFF, 0, 100); this->actor.colorFilterTimer = 1; this->animFlagAndTimer = 0; @@ -324,9 +324,9 @@ void EnHintnuts_BeginFreeze(EnHintnuts* this, GlobalContext* globalCtx) { void EnHintnuts_CheckProximity(EnHintnuts* this, GlobalContext* globalCtx) { if (this->actor.category != ACTORCAT_ENEMY) { if ((this->collider.base.ocFlags1 & OC1_HIT) || this->actor.isTargeted) { - this->actor.flags |= 0x10000; + this->actor.flags |= ACTOR_FLAG_16; } else { - this->actor.flags &= ~0x10000; + this->actor.flags &= ~ACTOR_FLAG_16; } if (this->actor.xzDistToPlayer < 130.0f) { this->actor.textId = this->textIdCopy; @@ -377,8 +377,8 @@ void EnHintnuts_Run(EnHintnuts* this, GlobalContext* globalCtx) { fabsf(this->actor.world.pos.y - this->actor.home.pos.y) < 2.0f) { this->actor.speedXZ = 0.0f; if (this->actor.category == ACTORCAT_BG) { - this->actor.flags &= ~0x00010009; - this->actor.flags |= 0x5; + this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_16); + this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_2; Actor_ChangeCategory(globalCtx, &globalCtx->actorCtx, &this->actor, ACTORCAT_ENEMY); } EnHintnuts_SetupBurrow(this); @@ -449,8 +449,8 @@ void EnHintnuts_Freeze(EnHintnuts* this, GlobalContext* globalCtx) { if (this->animFlagAndTimer == 1) { Actor_Kill(&this->actor); } else { - this->actor.flags |= 1; - this->actor.flags &= ~0x10; + this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_4; this->actor.colChkInfo.health = sColChkInfoInit.health; this->actor.colorFilterTimer = 0; EnHintnuts_SetupWait(this); diff --git a/src/overlays/actors/ovl_En_Holl/z_en_holl.c b/src/overlays/actors/ovl_En_Holl/z_en_holl.c index 4b3365b408..509b58acf8 100644 --- a/src/overlays/actors/ovl_En_Holl/z_en_holl.c +++ b/src/overlays/actors/ovl_En_Holl/z_en_holl.c @@ -1,6 +1,6 @@ #include "z_en_holl.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 // Horizontal Plane parameters diff --git a/src/overlays/actors/ovl_En_Honotrap/z_en_honotrap.c b/src/overlays/actors/ovl_En_Honotrap/z_en_honotrap.c index 04ee4623aa..c233e7464f 100644 --- a/src/overlays/actors/ovl_En_Honotrap/z_en_honotrap.c +++ b/src/overlays/actors/ovl_En_Honotrap/z_en_honotrap.c @@ -8,7 +8,7 @@ #include "objects/gameplay_keep/gameplay_keep.h" #include "objects/gameplay_dangeon_keep/gameplay_dangeon_keep.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 #define HONOTRAP_AT_ACTIVE (1 << 0) #define HONOTRAP_AC_ACTIVE (1 << 1) diff --git a/src/overlays/actors/ovl_En_Horse/z_en_horse.c b/src/overlays/actors/ovl_En_Horse/z_en_horse.c index 945cab5d7f..f30bfce89b 100644 --- a/src/overlays/actors/ovl_En_Horse/z_en_horse.c +++ b/src/overlays/actors/ovl_En_Horse/z_en_horse.c @@ -10,7 +10,7 @@ #include "objects/object_hni/object_hni.h" #include "scenes/overworld/spot09/spot09_scene.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 typedef void (*EnHorseCsFunc)(EnHorse*, GlobalContext*, CsCmdActorAction*); typedef void (*EnHorseActionFunc)(EnHorse*, GlobalContext*); @@ -724,7 +724,7 @@ s32 EnHorse_PlayerCanMove(EnHorse* this, GlobalContext* globalCtx) { if ((player->stateFlags1 & 1) || func_8002DD78(GET_PLAYER(globalCtx)) == 1 || (player->stateFlags1 & 0x100000) || ((this->stateFlags & ENHORSE_FLAG_19) && !this->inRace) || this->action == ENHORSE_ACT_HBA || - player->actor.flags & 0x100 || globalCtx->csCtx.state != 0) { + player->actor.flags & ACTOR_FLAG_8 || globalCtx->csCtx.state != 0) { return false; } return true; @@ -1538,7 +1538,7 @@ void EnHorse_Reverse(EnHorse* this, GlobalContext* globalCtx) { } else if (stickMag < 10.0f) { stickAngle = -0x7FFF; } - } else if (player->actor.flags & 0x100) { + } else if (player->actor.flags & ACTOR_FLAG_8) { EnHorse_StartMountedIdleResetAnim(this); this->actor.speedXZ = 0.0f; return; diff --git a/src/overlays/actors/ovl_En_Horse_Game_Check/z_en_horse_game_check.c b/src/overlays/actors/ovl_En_Horse_Game_Check/z_en_horse_game_check.c index 3f73cb4820..dfb0f676ae 100644 --- a/src/overlays/actors/ovl_En_Horse_Game_Check/z_en_horse_game_check.c +++ b/src/overlays/actors/ovl_En_Horse_Game_Check/z_en_horse_game_check.c @@ -7,7 +7,7 @@ #include "z_en_horse_game_check.h" #include "overlays/actors/ovl_En_Horse/z_en_horse.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 #define AT_FINISH_LINE(actor) \ (Math3D_PointInSquare2D(sFinishLine[0], sFinishLine[1], sFinishLine[2], sFinishLine[3], (actor)->world.pos.x, \ diff --git a/src/overlays/actors/ovl_En_Horse_Ganon/z_en_horse_ganon.c b/src/overlays/actors/ovl_En_Horse_Ganon/z_en_horse_ganon.c index d5af394f51..a34650f8b9 100644 --- a/src/overlays/actors/ovl_En_Horse_Ganon/z_en_horse_ganon.c +++ b/src/overlays/actors/ovl_En_Horse_Ganon/z_en_horse_ganon.c @@ -7,7 +7,7 @@ #include "z_en_horse_ganon.h" #include "objects/object_horse_ganon/object_horse_ganon.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 typedef struct { /* 0x0 */ Vec3s unk_0; diff --git a/src/overlays/actors/ovl_En_Horse_Link_Child/z_en_horse_link_child.c b/src/overlays/actors/ovl_En_Horse_Link_Child/z_en_horse_link_child.c index 13fba382bc..1b38233038 100644 --- a/src/overlays/actors/ovl_En_Horse_Link_Child/z_en_horse_link_child.c +++ b/src/overlays/actors/ovl_En_Horse_Link_Child/z_en_horse_link_child.c @@ -7,7 +7,7 @@ #include "z_en_horse_link_child.h" #include "objects/object_horse_link_child/object_horse_link_child.h" -#define FLAGS 0x02000010 +#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_25) void EnHorseLinkChild_Init(Actor* thisx, GlobalContext* globalCtx); void EnHorseLinkChild_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_En_Horse_Normal/z_en_horse_normal.c b/src/overlays/actors/ovl_En_Horse_Normal/z_en_horse_normal.c index 838438f591..54a011ab45 100644 --- a/src/overlays/actors/ovl_En_Horse_Normal/z_en_horse_normal.c +++ b/src/overlays/actors/ovl_En_Horse_Normal/z_en_horse_normal.c @@ -8,7 +8,7 @@ #include "objects/gameplay_keep/gameplay_keep.h" #include "objects/object_horse_normal/object_horse_normal.h" -#define FLAGS 0x00000000 +#define FLAGS 0 typedef struct { Vec3s pos; @@ -276,7 +276,7 @@ void EnHorseNormal_Destroy(Actor* thisx, GlobalContext* globalCtx) { } void func_80A6B91C(EnHorseNormal* this, GlobalContext* globalCtx) { - this->actor.flags |= 0x10; + this->actor.flags |= ACTOR_FLAG_4; this->action = HORSE_FOLLOW_PATH; this->animationIdx = 6; this->waypoint = 0; @@ -510,7 +510,7 @@ void func_80A6C6B0(EnHorseNormal* this) { this->animationIdx = 0; this->unk_21C = 0; this->unk_21E = 0; - this->actor.flags |= 0x30; + this->actor.flags |= ACTOR_FLAG_4 | ACTOR_FLAG_5; this->actor.speedXZ = 0.0f; this->unk_218 = 0.0f; Animation_Change(&this->skin.skelAnime, sAnimations[this->animationIdx], func_80A6B30C(this), 0.0f, diff --git a/src/overlays/actors/ovl_En_Horse_Zelda/z_en_horse_zelda.c b/src/overlays/actors/ovl_En_Horse_Zelda/z_en_horse_zelda.c index 652a542b40..733fa914ca 100644 --- a/src/overlays/actors/ovl_En_Horse_Zelda/z_en_horse_zelda.c +++ b/src/overlays/actors/ovl_En_Horse_Zelda/z_en_horse_zelda.c @@ -7,7 +7,7 @@ #include "z_en_horse_zelda.h" #include "objects/object_horse_zelda/object_horse_zelda.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 void EnHorseZelda_Init(Actor* thisx, GlobalContext* globalCtx); void EnHorseZelda_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_En_Hs/z_en_hs.c b/src/overlays/actors/ovl_En_Hs/z_en_hs.c index ebb2afa738..23648bf5af 100644 --- a/src/overlays/actors/ovl_En_Hs/z_en_hs.c +++ b/src/overlays/actors/ovl_En_Hs/z_en_hs.c @@ -8,7 +8,7 @@ #include "vt.h" #include "objects/object_hs/object_hs.h" -#define FLAGS 0x00000009 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3) void EnHs_Init(Actor* thisx, GlobalContext* globalCtx); void EnHs_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_En_Hs2/z_en_hs2.c b/src/overlays/actors/ovl_En_Hs2/z_en_hs2.c index af50f2c46e..475e5b122a 100644 --- a/src/overlays/actors/ovl_En_Hs2/z_en_hs2.c +++ b/src/overlays/actors/ovl_En_Hs2/z_en_hs2.c @@ -8,7 +8,7 @@ #include "vt.h" #include "objects/object_hs/object_hs.h" -#define FLAGS 0x00000009 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3) void EnHs2_Init(Actor* thisx, GlobalContext* globalCtx); void EnHs2_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_En_Hy/z_en_hy.c b/src/overlays/actors/ovl_En_Hy/z_en_hy.c index def3832ad0..e5e9dde930 100644 --- a/src/overlays/actors/ovl_En_Hy/z_en_hy.c +++ b/src/overlays/actors/ovl_En_Hy/z_en_hy.c @@ -15,7 +15,7 @@ #include "objects/object_cob/object_cob.h" #include "objects/object_os_anime/object_os_anime.h" -#define FLAGS 0x00000019 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_4) void EnHy_Init(Actor* thisx, GlobalContext* globalCtx); void EnHy_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -907,7 +907,7 @@ void EnHy_InitImpl(EnHy* this, GlobalContext* globalCtx) { func_80034EC0(&this->skelAnime, sAnimationInfo, sModelInfo[this->actor.params & 0x7F].animInfoIndex); if ((globalCtx->sceneNum == SCENE_MARKET_ALLEY) || (globalCtx->sceneNum == SCENE_MARKET_DAY)) { - this->actor.flags &= ~0x10; + this->actor.flags &= ~ACTOR_FLAG_4; this->actor.uncullZoneScale = 0.0f; } diff --git a/src/overlays/actors/ovl_En_Ice_Hono/z_en_ice_hono.c b/src/overlays/actors/ovl_En_Ice_Hono/z_en_ice_hono.c index d7558fde6c..b8c353dc35 100644 --- a/src/overlays/actors/ovl_En_Ice_Hono/z_en_ice_hono.c +++ b/src/overlays/actors/ovl_En_Ice_Hono/z_en_ice_hono.c @@ -7,7 +7,7 @@ #include "z_en_ice_hono.h" #include "objects/gameplay_keep/gameplay_keep.h" -#define FLAGS 0x00000000 +#define FLAGS 0 void EnIceHono_Init(Actor* thisx, GlobalContext* globalCtx); void EnIceHono_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -105,7 +105,7 @@ void EnIceHono_InitCapturableFlame(Actor* thisx, GlobalContext* globalCtx) { Actor_ProcessInitChain(&this->actor, sInitChainCapturableFlame); Actor_SetScale(&this->actor, 0.0074f); - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0; Actor_SetFocus(&this->actor, 10.0f); Collider_InitCylinder(globalCtx, &this->collider); diff --git a/src/overlays/actors/ovl_En_Ik/z_en_ik.c b/src/overlays/actors/ovl_En_Ik/z_en_ik.c index d95a38895e..ca272bafb2 100644 --- a/src/overlays/actors/ovl_En_Ik/z_en_ik.c +++ b/src/overlays/actors/ovl_En_Ik/z_en_ik.c @@ -9,7 +9,7 @@ #include "objects/object_ik/object_ik.h" #include "vt.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 typedef void (*EnIkDrawFunc)(struct EnIk*, GlobalContext*); @@ -188,7 +188,7 @@ void func_80A74398(Actor* thisx, GlobalContext* globalCtx) { thisx->update = func_80A75FA0; thisx->draw = func_80A76798; - thisx->flags |= 0x400; + thisx->flags |= ACTOR_FLAG_10; Collider_InitCylinder(globalCtx, &this->bodyCollider); Collider_SetCylinder(globalCtx, &this->bodyCollider, thisx, &sCylinderInit); @@ -298,7 +298,7 @@ void func_80A747C0(EnIk* this, GlobalContext* globalCtx) { Audio_PlayActorSound2(&this->actor, NA_SE_EN_IRONNACK_WAKEUP); } if (SkelAnime_Update(&this->skelAnime)) { - this->actor.flags |= 5; + this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_2; func_80A74AAC(this); } } @@ -306,7 +306,7 @@ void func_80A747C0(EnIk* this, GlobalContext* globalCtx) { void func_80A7489C(EnIk* this) { f32 frames = Animation_GetLastFrame(&object_ik_Anim_00DD50); - this->actor.flags |= 5; + this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_2; this->unk_2F8 = 4; this->actor.speedXZ = 0.0f; Animation_Change(&this->skelAnime, &object_ik_Anim_00DD50, 0.0f, 0.0f, frames, ANIMMODE_LOOP, 4.0f); @@ -1411,7 +1411,7 @@ void func_80A780D0(EnIk* this, GlobalContext* globalCtx) { void func_80A78160(EnIk* this, GlobalContext* globalCtx) { this->actor.update = func_80A75FA0; this->actor.draw = func_80A76798; - this->actor.flags |= 5; + this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_2; gSaveContext.eventChkInf[3] |= 0x800; Actor_SetScale(&this->actor, 0.012f); func_80A7489C(this); diff --git a/src/overlays/actors/ovl_En_In/z_en_in.c b/src/overlays/actors/ovl_En_In/z_en_in.c index b06cbed6b1..9ae28ad3ce 100644 --- a/src/overlays/actors/ovl_En_In/z_en_in.c +++ b/src/overlays/actors/ovl_En_In/z_en_in.c @@ -2,7 +2,7 @@ #include "overlays/actors/ovl_En_Horse/z_en_horse.h" #include "objects/object_in/object_in.h" -#define FLAGS 0x00000019 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_4) void EnIn_Init(Actor* thisx, GlobalContext* globalCtx); void EnIn_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -456,7 +456,7 @@ void func_80A79C78(EnIn* this, GlobalContext* globalCtx) { player->rideActor->freezeTimer = 10; } player->actor.freezeTimer = 10; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; ShrinkWindow_SetVal(0x20); Interface_ChangeAlpha(2); } @@ -683,10 +683,10 @@ void func_80A7A568(EnIn* this, GlobalContext* globalCtx) { void func_80A7A770(EnIn* this, GlobalContext* globalCtx) { if (this->unk_308.unk_00 == 0) { - this->actor.flags |= 0x10000; + this->actor.flags |= ACTOR_FLAG_16; } else if (this->unk_308.unk_00 == 2) { Rupees_ChangeBy(-50); - this->actor.flags &= ~0x10000; + this->actor.flags &= ~ACTOR_FLAG_16; func_80A796EC(this, 3); this->actionFunc = func_80A7A848; gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & ~0x0F) | 7; @@ -719,7 +719,7 @@ void func_80A7A848(EnIn* this, GlobalContext* globalCtx) { void func_80A7A940(EnIn* this, GlobalContext* globalCtx) { if (this->unk_308.unk_00 == 0) { - this->actor.flags |= 0x10000; + this->actor.flags |= ACTOR_FLAG_16; return; } if (this->unk_1EC != 0) { @@ -729,7 +729,7 @@ void func_80A7A940(EnIn* this, GlobalContext* globalCtx) { } } if (this->unk_308.unk_00 == 2) { - this->actor.flags &= ~0x10000; + this->actor.flags &= ~ACTOR_FLAG_16; func_80A79BAC(this, globalCtx, 2, 0x26); gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & ~0x000F) | 0x0002; gSaveContext.eventInf[0] = (gSaveContext.eventInf[0] & ~0x8000) | 0x8000; diff --git a/src/overlays/actors/ovl_En_Insect/z_en_insect.c b/src/overlays/actors/ovl_En_Insect/z_en_insect.c index 91171c7287..f343cb2155 100644 --- a/src/overlays/actors/ovl_En_Insect/z_en_insect.c +++ b/src/overlays/actors/ovl_En_Insect/z_en_insect.c @@ -8,7 +8,7 @@ #include "vt.h" #include "objects/gameplay_keep/gameplay_keep.h" -#define FLAGS 0x00000000 +#define FLAGS 0 void EnInsect_Init(Actor* thisx, GlobalContext* globalCtx); void EnInsect_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -187,7 +187,7 @@ void EnInsect_Init(Actor* thisx, GlobalContext* globalCtx2) { if (this->unk_314 & 4) { this->unk_31C = Rand_S16Offset(200, 40); - this->actor.flags |= 0x10; + this->actor.flags |= ACTOR_FLAG_4; } if (temp_s2 == 2 || temp_s2 == 3) { diff --git a/src/overlays/actors/ovl_En_Ishi/z_en_ishi.c b/src/overlays/actors/ovl_En_Ishi/z_en_ishi.c index dc7fead400..3216bfd327 100644 --- a/src/overlays/actors/ovl_En_Ishi/z_en_ishi.c +++ b/src/overlays/actors/ovl_En_Ishi/z_en_ishi.c @@ -10,7 +10,7 @@ #include "vt.h" -#define FLAGS 0x00800000 +#define FLAGS ACTOR_FLAG_23 void EnIshi_Init(Actor* thisx, GlobalContext* globalCtx); void EnIshi_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -381,7 +381,7 @@ void EnIshi_Wait(EnIshi* this, GlobalContext* globalCtx) { void EnIshi_SetupLiftedUp(EnIshi* this) { this->actionFunc = EnIshi_LiftedUp; this->actor.room = -1; - this->actor.flags |= 0x10; + this->actor.flags |= ACTOR_FLAG_4; } void EnIshi_LiftedUp(EnIshi* this, GlobalContext* globalCtx) { diff --git a/src/overlays/actors/ovl_En_It/z_en_it.c b/src/overlays/actors/ovl_En_It/z_en_it.c index 2c5bfb0ea7..424f5a06b8 100644 --- a/src/overlays/actors/ovl_En_It/z_en_it.c +++ b/src/overlays/actors/ovl_En_It/z_en_it.c @@ -6,7 +6,7 @@ #include "z_en_it.h" -#define FLAGS 0x00000000 +#define FLAGS 0 void EnIt_Init(Actor* thisx, GlobalContext* globalCtx); void EnIt_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_En_Jj/z_en_jj.c b/src/overlays/actors/ovl_En_Jj/z_en_jj.c index 95c053d77a..d26dae6298 100644 --- a/src/overlays/actors/ovl_En_Jj/z_en_jj.c +++ b/src/overlays/actors/ovl_En_Jj/z_en_jj.c @@ -8,7 +8,7 @@ #include "objects/object_jj/object_jj.h" #include "overlays/actors/ovl_Eff_Dust/z_eff_dust.h" -#define FLAGS 0x00000030 +#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) typedef enum { /* 0 */ JABUJABU_EYE_OPEN, diff --git a/src/overlays/actors/ovl_En_Js/z_en_js.c b/src/overlays/actors/ovl_En_Js/z_en_js.c index 813fba8097..a82a9caccd 100644 --- a/src/overlays/actors/ovl_En_Js/z_en_js.c +++ b/src/overlays/actors/ovl_En_Js/z_en_js.c @@ -7,7 +7,7 @@ #include "z_en_js.h" #include "objects/object_js/object_js.h" -#define FLAGS 0x00000009 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3) void EnJs_Init(Actor* thisx, GlobalContext* globalCtx); void EnJs_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -103,7 +103,7 @@ void func_80A89008(EnJs* this) { void func_80A89078(EnJs* this, GlobalContext* globalCtx) { if (Actor_TextboxIsClosing(&this->actor, globalCtx)) { func_80A89008(this); - this->actor.flags &= ~0x10000; + this->actor.flags &= ~ACTOR_FLAG_16; } } @@ -119,7 +119,7 @@ void func_80A8910C(EnJs* this, GlobalContext* globalCtx) { if (Actor_TextboxIsClosing(&this->actor, globalCtx)) { this->actor.textId = 0x6078; En_Js_SetupAction(this, func_80A890C0); - this->actor.flags |= 0x10000; + this->actor.flags |= ACTOR_FLAG_16; } } diff --git a/src/overlays/actors/ovl_En_Jsjutan/z_en_jsjutan.c b/src/overlays/actors/ovl_En_Jsjutan/z_en_jsjutan.c index e69be21817..09b5147371 100644 --- a/src/overlays/actors/ovl_En_Jsjutan/z_en_jsjutan.c +++ b/src/overlays/actors/ovl_En_Jsjutan/z_en_jsjutan.c @@ -7,7 +7,7 @@ #include "z_en_jsjutan.h" #include "overlays/actors/ovl_En_Bom/z_en_bom.h" -#define FLAGS 0x00000009 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3) void EnJsjutan_Init(Actor* thisx, GlobalContext* globalCtx); void EnJsjutan_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -40,7 +40,7 @@ void EnJsjutan_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad; CollisionHeader* header = NULL; - this->dyna.actor.flags &= ~1; + this->dyna.actor.flags &= ~ACTOR_FLAG_0; DynaPolyActor_Init(&this->dyna, DPM_UNK); CollisionHeader_GetVirtual(&sCol, &header); this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, thisx, header); diff --git a/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.c b/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.c index 57111610ea..0aa8b45d9a 100644 --- a/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.c +++ b/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.c @@ -8,7 +8,7 @@ #include "vt.h" #include "objects/object_ka/object_ka.h" -#define FLAGS 0x02000009 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_25) void EnKakasi_Init(Actor* thisx, GlobalContext* globalCtx); void EnKakasi_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -73,7 +73,7 @@ void EnKakasi_Init(Actor* thisx, GlobalContext* globalCtx) { SkelAnime_InitFlex(globalCtx, &this->skelanime, &object_ka_Skel_0065B0, &object_ka_Anim_000214, NULL, NULL, 0); this->rot = this->actor.world.rot; - this->actor.flags |= 0x400; + this->actor.flags |= ACTOR_FLAG_10; this->actor.colChkInfo.mass = MASS_IMMOVABLE; Actor_SetScale(&this->actor, 0.01f); diff --git a/src/overlays/actors/ovl_En_Kakasi2/z_en_kakasi2.c b/src/overlays/actors/ovl_En_Kakasi2/z_en_kakasi2.c index 63f1faba3d..5c6f126907 100644 --- a/src/overlays/actors/ovl_En_Kakasi2/z_en_kakasi2.c +++ b/src/overlays/actors/ovl_En_Kakasi2/z_en_kakasi2.c @@ -8,7 +8,7 @@ #include "vt.h" #include "objects/object_ka/object_ka.h" -#define FLAGS 0x0A000031 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_4 | ACTOR_FLAG_5 | ACTOR_FLAG_25 | ACTOR_FLAG_27) static ColliderCylinderInit sCylinderInit = { { @@ -89,7 +89,7 @@ void EnKakasi2_Init(Actor* thisx, GlobalContext* globalCtx) { this->actor.colChkInfo.mass = MASS_IMMOVABLE; this->height = 60.0f; Actor_SetScale(&this->actor, 0.01f); - this->actor.flags |= 0x400; + this->actor.flags |= ACTOR_FLAG_10; this->unk_198 = this->actor.shape.rot.y; if (this->switchFlag >= 0 && Flags_GetSwitch(globalCtx, this->switchFlag)) { @@ -124,7 +124,7 @@ void func_80A90264(EnKakasi2* this, GlobalContext* globalCtx) { Collider_SetCylinder(globalCtx, &this->collider, &this->actor, &sCylinderInit); SkelAnime_InitFlex(globalCtx, &this->skelAnime, &object_ka_Skel_0065B0, &object_ka_Anim_000214, NULL, NULL, 0); OnePointCutscene_Attention(globalCtx, &this->actor); - this->actor.flags |= 0x8000001; + this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_27; func_80078884(NA_SE_SY_CORRECT_CHIME); if (this->switchFlag >= 0) { @@ -152,7 +152,7 @@ void func_80A90264(EnKakasi2* this, GlobalContext* globalCtx) { OnePointCutscene_Attention(globalCtx, &this->actor); func_80078884(NA_SE_SY_CORRECT_CHIME); - this->actor.flags |= 0x8000001; + this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_27; this->actionFunc = func_80A904D8; } } diff --git a/src/overlays/actors/ovl_En_Kakasi3/z_en_kakasi3.c b/src/overlays/actors/ovl_En_Kakasi3/z_en_kakasi3.c index 5cced2e9cc..dfb3c389a0 100644 --- a/src/overlays/actors/ovl_En_Kakasi3/z_en_kakasi3.c +++ b/src/overlays/actors/ovl_En_Kakasi3/z_en_kakasi3.c @@ -8,7 +8,7 @@ #include "vt.h" #include "objects/object_ka/object_ka.h" -#define FLAGS 0x02000009 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_25) void EnKakasi3_Init(Actor* thisx, GlobalContext* globalCtx); void EnKakasi3_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -76,7 +76,7 @@ void EnKakasi3_Init(Actor* thisx, GlobalContext* globalCtx) { Collider_InitCylinder(globalCtx, &this->collider); Collider_SetCylinder(globalCtx, &this->collider, &this->actor, &sCylinderInit); SkelAnime_InitFlex(globalCtx, &this->skelAnime, &object_ka_Skel_0065B0, &object_ka_Anim_000214, NULL, NULL, 0); - this->actor.flags |= 0x400; + this->actor.flags |= ACTOR_FLAG_10; this->rot = this->actor.world.rot; this->actor.colChkInfo.mass = MASS_IMMOVABLE; Actor_SetScale(&this->actor, 0.01f); diff --git a/src/overlays/actors/ovl_En_Kanban/z_en_kanban.c b/src/overlays/actors/ovl_En_Kanban/z_en_kanban.c index c548241705..465f79e895 100644 --- a/src/overlays/actors/ovl_En_Kanban/z_en_kanban.c +++ b/src/overlays/actors/ovl_En_Kanban/z_en_kanban.c @@ -9,7 +9,7 @@ #include "objects/object_kanban/object_kanban.h" #include "vt.h" -#define FLAGS 0x00000019 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_4) #define PART_UPPER_LEFT (1 << 0) #define PART_LEFT_UPPER (1 << 1) @@ -196,7 +196,7 @@ void EnKanban_Init(Actor* thisx, GlobalContext* globalCtx) { Actor_SetScale(&this->actor, 0.01f); if (this->actor.params != ENKANBAN_PIECE) { this->actor.targetMode = 0; - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0; Collider_InitCylinder(globalCtx, &this->collider); Collider_SetCylinder(globalCtx, &this->collider, &this->actor, &sCylinderInit); osSyncPrintf("KANBAN ARG %x\n", this->actor.params); @@ -268,7 +268,7 @@ void EnKanban_Update(Actor* thisx, GlobalContext* globalCtx2) { this->zTargetTimer--; } if (this->zTargetTimer == 1) { - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; } if (this->partFlags == 0xFFFF) { EnKanban_Message(this, globalCtx); @@ -386,8 +386,8 @@ void EnKanban_Update(Actor* thisx, GlobalContext* globalCtx2) { piece->direction = -1; } piece->airTimer = 100; - piece->actor.flags &= ~1; - piece->actor.flags |= 0x02000000; + piece->actor.flags &= ~ACTOR_FLAG_0; + piece->actor.flags |= ACTOR_FLAG_25; this->cutMarkTimer = 5; Audio_PlayActorSound2(&this->actor, NA_SE_IT_SWORD_STRIKE); } @@ -398,7 +398,7 @@ void EnKanban_Update(Actor* thisx, GlobalContext* globalCtx2) { CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->collider.base); CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->collider.base); if (this->actor.xzDistToPlayer > 500.0f) { - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0; this->partFlags = 0xFFFF; } if (this->cutMarkTimer != 0) { @@ -754,7 +754,7 @@ void EnKanban_Update(Actor* thisx, GlobalContext* globalCtx2) { ((pDiff + yDiff + rDiff + this->spinRot.x + this->spinRot.z) == 0) && (this->floorRot.x == 0.0f) && (this->floorRot.z == 0.0f)) { signpost->partFlags |= this->partFlags; - signpost->actor.flags |= 1; + signpost->actor.flags |= ACTOR_FLAG_0; Actor_Kill(&this->actor); } } break; diff --git a/src/overlays/actors/ovl_En_Karebaba/z_en_karebaba.c b/src/overlays/actors/ovl_En_Karebaba/z_en_karebaba.c index c096ee077e..ec69c25984 100644 --- a/src/overlays/actors/ovl_En_Karebaba/z_en_karebaba.c +++ b/src/overlays/actors/ovl_En_Karebaba/z_en_karebaba.c @@ -9,7 +9,7 @@ #include "objects/gameplay_keep/gameplay_keep.h" #include "overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h" -#define FLAGS 0x00000005 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2) void EnKarebaba_Init(Actor* thisx, GlobalContext* globalCtx); void EnKarebaba_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -177,7 +177,7 @@ void EnKarebaba_SetupDying(EnKarebaba* this) { this->actor.world.rot.y = this->actor.shape.rot.y + 0x8000; this->actor.speedXZ = 3.0f; Audio_PlayActorSound2(&this->actor, NA_SE_EN_DEKU_JR_DEAD); - this->actor.flags |= 0x30; + this->actor.flags |= ACTOR_FLAG_4 | ACTOR_FLAG_5; this->actionFunc = EnKarebaba_Dying; } @@ -190,7 +190,7 @@ void EnKarebaba_SetupDeadItemDrop(EnKarebaba* this, GlobalContext* globalCtx) { this->actor.shape.shadowScale = 3.0f; Actor_ChangeCategory(globalCtx, &globalCtx->actorCtx, &this->actor, ACTORCAT_MISC); this->actor.params = 200; - this->actor.flags &= ~0x20; + this->actor.flags &= ~ACTOR_FLAG_5; this->actionFunc = EnKarebaba_DeadItemDrop; } @@ -328,7 +328,7 @@ void EnKarebaba_Dying(EnKarebaba* this, GlobalContext* globalCtx) { if (this->actor.scale.x > 0.005f && ((this->actor.bgCheckFlags & 2) || (this->actor.bgCheckFlags & 8))) { this->actor.scale.x = this->actor.scale.y = this->actor.scale.z = 0.0f; this->actor.speedXZ = 0.0f; - this->actor.flags &= ~5; + this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_2); EffectSsHahen_SpawnBurst(globalCtx, &this->actor.world.pos, 3.0f, 0, 12, 5, 15, HAHEN_OBJECT_DEFAULT, 10, NULL); } @@ -400,8 +400,8 @@ void EnKarebaba_Regrow(EnKarebaba* this, GlobalContext* globalCtx) { this->actor.world.pos.y = this->actor.home.pos.y + (14.0f * scaleFactor); if (this->actor.params == 20) { - this->actor.flags &= ~0x10; - this->actor.flags |= 5; + this->actor.flags &= ~ACTOR_FLAG_4; + this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_2; Actor_ChangeCategory(globalCtx, &globalCtx->actorCtx, &this->actor, ACTORCAT_ENEMY); EnKarebaba_SetupIdle(this); } diff --git a/src/overlays/actors/ovl_En_Ko/z_en_ko.c b/src/overlays/actors/ovl_En_Ko/z_en_ko.c index 200f5b732c..36feb2d797 100644 --- a/src/overlays/actors/ovl_En_Ko/z_en_ko.c +++ b/src/overlays/actors/ovl_En_Ko/z_en_ko.c @@ -9,7 +9,7 @@ #include "objects/object_os_anime/object_os_anime.h" #include "vt.h" -#define FLAGS 0x00000019 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_4) #define ENKO_TYPE (this->actor.params & 0xFF) #define ENKO_PATH ((this->actor.params & 0xFF00) >> 8) @@ -1042,9 +1042,9 @@ void func_80A98DB4(EnKo* this, GlobalContext* globalCtx) { Math_SmoothStepToF(&this->modelAlpha, (this->appearDist < dist) ? 0.0f : 255.0f, 0.3f, 40.0f, 1.0f); if (this->modelAlpha < 10.0f) { - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; } else { - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0; } } @@ -1086,7 +1086,7 @@ void EnKo_Destroy(Actor* thisx, GlobalContext* globalCtx) { void func_80A99048(EnKo* this, GlobalContext* globalCtx) { if (EnKo_IsOsAnimeLoaded(this, globalCtx) && EnKo_AreObjectsLoaded(this, globalCtx)) { - this->actor.flags &= ~0x10; + this->actor.flags &= ~ACTOR_FLAG_4; this->actor.objBankIndex = this->legsObjectBankIdx; gSegments[6] = VIRTUAL_TO_PHYSICAL(globalCtx->objectCtx.status[this->actor.objBankIndex].segment); SkelAnime_InitFlex(globalCtx, &this->skelAnime, sSkeleton[sModelInfo[ENKO_TYPE].legsId].flexSkeletonHeader, diff --git a/src/overlays/actors/ovl_En_Kusa/z_en_kusa.c b/src/overlays/actors/ovl_En_Kusa/z_en_kusa.c index c2515eecc9..1740548d5d 100644 --- a/src/overlays/actors/ovl_En_Kusa/z_en_kusa.c +++ b/src/overlays/actors/ovl_En_Kusa/z_en_kusa.c @@ -11,7 +11,7 @@ #include "objects/object_kusa/object_kusa.h" #include "vt.h" -#define FLAGS 0x00800010 +#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_23) void EnKusa_Init(Actor* thisx, GlobalContext* globalCtx); void EnKusa_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -276,7 +276,7 @@ void EnKusa_SetupWaitObject(EnKusa* this) { void EnKusa_WaitObject(EnKusa* this, GlobalContext* globalCtx) { if (Object_IsLoaded(&globalCtx->objectCtx, this->objBankIndex)) { - if (this->actor.flags & 0x800) { + if (this->actor.flags & ACTOR_FLAG_11) { EnKusa_SetupCut(this); } else { EnKusa_SetupMain(this); @@ -284,13 +284,13 @@ void EnKusa_WaitObject(EnKusa* this, GlobalContext* globalCtx) { this->actor.draw = EnKusa_Draw; this->actor.objBankIndex = this->objBankIndex; - this->actor.flags &= ~0x10; + this->actor.flags &= ~ACTOR_FLAG_4; } } void EnKusa_SetupMain(EnKusa* this) { EnKusa_SetupAction(this, EnKusa_Main); - this->actor.flags &= ~0x10; + this->actor.flags &= ~ACTOR_FLAG_4; } void EnKusa_Main(EnKusa* this, GlobalContext* globalCtx) { @@ -315,7 +315,7 @@ void EnKusa_Main(EnKusa* this, GlobalContext* globalCtx) { } EnKusa_SetupCut(this); - this->actor.flags |= 0x800; + this->actor.flags |= ACTOR_FLAG_11; } else { if (!(this->collider.base.ocFlags1 & OC1_TYPE_PLAYER) && (this->actor.xzDistToPlayer > 12.0f)) { this->collider.base.ocFlags1 |= OC1_TYPE_PLAYER; @@ -338,7 +338,7 @@ void EnKusa_Main(EnKusa* this, GlobalContext* globalCtx) { void EnKusa_SetupLiftedUp(EnKusa* this) { EnKusa_SetupAction(this, EnKusa_LiftedUp); this->actor.room = -1; - this->actor.flags |= 0x10; + this->actor.flags |= ACTOR_FLAG_4; } void EnKusa_LiftedUp(EnKusa* this, GlobalContext* globalCtx) { @@ -460,7 +460,7 @@ void EnKusa_SetupRegrow(EnKusa* this) { EnKusa_SetupAction(this, EnKusa_Regrow); EnKusa_SetScaleSmall(this); this->actor.shape.rot = this->actor.home.rot; - this->actor.flags &= ~0x800; + this->actor.flags &= ~ACTOR_FLAG_11; } void EnKusa_Regrow(EnKusa* this, GlobalContext* globalCtx) { @@ -484,7 +484,7 @@ void EnKusa_Update(Actor* thisx, GlobalContext* globalCtx) { this->actionFunc(this, globalCtx); - if (this->actor.flags & 0x800) { + if (this->actor.flags & ACTOR_FLAG_11) { this->actor.shape.yOffset = -6.25f; } else { this->actor.shape.yOffset = 0.0f; @@ -495,7 +495,7 @@ void EnKusa_Draw(Actor* thisx, GlobalContext* globalCtx) { static Gfx* dLists[] = { gFieldBushDL, object_kusa_DL_000140, object_kusa_DL_000140 }; EnKusa* this = (EnKusa*)thisx; - if (this->actor.flags & 0x800) { + if (this->actor.flags & ACTOR_FLAG_11) { Gfx_DrawDListOpa(globalCtx, object_kusa_DL_0002E0); } else { Gfx_DrawDListOpa(globalCtx, dLists[thisx->params & 3]); diff --git a/src/overlays/actors/ovl_En_Kz/z_en_kz.c b/src/overlays/actors/ovl_En_Kz/z_en_kz.c index a91727696c..f9a262e713 100644 --- a/src/overlays/actors/ovl_En_Kz/z_en_kz.c +++ b/src/overlays/actors/ovl_En_Kz/z_en_kz.c @@ -7,7 +7,7 @@ #include "z_en_kz.h" #include "objects/object_kz/object_kz.h" -#define FLAGS 0x00000009 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3) void EnKz_Init(Actor* thisx, GlobalContext* globalCtx); void EnKz_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -202,11 +202,11 @@ s32 func_80A9C95C(GlobalContext* globalCtx, EnKz* this, s16* arg2, f32 unkf, cal yaw = Math_Vec3f_Yaw(&this->actor.home.pos, &player->actor.world.pos); yaw -= this->actor.shape.rot.y; if ((fabsf(yaw) > 1638.0f) || (this->actor.xzDistToPlayer < 265.0f)) { - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; return 0; } - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0; Actor_GetScreenPos(globalCtx, &this->actor, &sp32, &sp30); if (!((sp32 >= -30) && (sp32 < 361) && (sp30 >= -10) && (sp30 < 241))) { diff --git a/src/overlays/actors/ovl_En_Light/z_en_light.c b/src/overlays/actors/ovl_En_Light/z_en_light.c index b101e6e59a..d4ab5e698f 100644 --- a/src/overlays/actors/ovl_En_Light/z_en_light.c +++ b/src/overlays/actors/ovl_En_Light/z_en_light.c @@ -8,7 +8,7 @@ #include "objects/gameplay_keep/gameplay_keep.h" #include "objects/gameplay_dangeon_keep/gameplay_dangeon_keep.h" -#define FLAGS 0x00000000 +#define FLAGS 0 void EnLight_Init(Actor* thisx, GlobalContext* globalCtx); void EnLight_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_En_Lightbox/z_en_lightbox.c b/src/overlays/actors/ovl_En_Lightbox/z_en_lightbox.c index b358b0b681..04f4a18e2e 100644 --- a/src/overlays/actors/ovl_En_Lightbox/z_en_lightbox.c +++ b/src/overlays/actors/ovl_En_Lightbox/z_en_lightbox.c @@ -7,7 +7,7 @@ #include "z_en_lightbox.h" #include "objects/object_lightbox/object_lightbox.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 void EnLightbox_Init(Actor* thisx, GlobalContext* globalCtx); void EnLightbox_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_En_M_Fire1/z_en_m_fire1.c b/src/overlays/actors/ovl_En_M_Fire1/z_en_m_fire1.c index 68d4c49292..49edf4ff10 100644 --- a/src/overlays/actors/ovl_En_M_Fire1/z_en_m_fire1.c +++ b/src/overlays/actors/ovl_En_M_Fire1/z_en_m_fire1.c @@ -6,7 +6,7 @@ #include "z_en_m_fire1.h" -#define FLAGS 0x00000000 +#define FLAGS 0 void EnMFire1_Init(Actor* thisx, GlobalContext* globalCtx); void EnMFire1_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_En_M_Thunder/z_en_m_thunder.c b/src/overlays/actors/ovl_En_M_Thunder/z_en_m_thunder.c index 2250b17999..87c9880211 100644 --- a/src/overlays/actors/ovl_En_M_Thunder/z_en_m_thunder.c +++ b/src/overlays/actors/ovl_En_M_Thunder/z_en_m_thunder.c @@ -1,7 +1,7 @@ #include "z_en_m_thunder.h" #include "objects/gameplay_keep/gameplay_keep.h" -#define FLAGS 0x00000000 +#define FLAGS 0 void EnMThunder_Init(Actor* thisx, GlobalContext* globalCtx); void EnMThunder_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_En_Ma1/z_en_ma1.c b/src/overlays/actors/ovl_En_Ma1/z_en_ma1.c index 68c0dafdaa..a7c8788e4c 100644 --- a/src/overlays/actors/ovl_En_Ma1/z_en_ma1.c +++ b/src/overlays/actors/ovl_En_Ma1/z_en_ma1.c @@ -7,7 +7,7 @@ #include "z_en_ma1.h" #include "objects/object_ma1/object_ma1.h" -#define FLAGS 0x02000039 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_4 | ACTOR_FLAG_5 | ACTOR_FLAG_25) void EnMa1_Init(Actor* thisx, GlobalContext* globalCtx); void EnMa1_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -349,7 +349,7 @@ void func_80AA0F44(EnMa1* this, GlobalContext* globalCtx) { this->actor.textId = 0x2061; Message_StartTextbox(globalCtx, this->actor.textId, NULL); this->unk_1E8.unk_00 = 1; - this->actor.flags |= 0x10000; + this->actor.flags |= ACTOR_FLAG_16; this->actionFunc = func_80AA106C; } else if (this->actor.xzDistToPlayer < 30.0f + (f32)this->collider.dim.radius) { player->stateFlags2 |= 0x800000; @@ -362,7 +362,7 @@ void func_80AA106C(EnMa1* this, GlobalContext* globalCtx) { if (this->unk_1E8.unk_00 == 2) { Audio_OcaSetInstrument(2); func_8010BD58(globalCtx, OCARINA_ACTION_TEACH_EPONA); - this->actor.flags &= ~0x10000; + this->actor.flags &= ~ACTOR_FLAG_16; this->actionFunc = func_80AA10EC; } } diff --git a/src/overlays/actors/ovl_En_Ma2/z_en_ma2.c b/src/overlays/actors/ovl_En_Ma2/z_en_ma2.c index f2c10b52ba..ac00cde524 100644 --- a/src/overlays/actors/ovl_En_Ma2/z_en_ma2.c +++ b/src/overlays/actors/ovl_En_Ma2/z_en_ma2.c @@ -1,7 +1,7 @@ #include "z_en_ma2.h" #include "objects/object_ma2/object_ma2.h" -#define FLAGS 0x02000039 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_4 | ACTOR_FLAG_5 | ACTOR_FLAG_25) void EnMa2_Init(Actor* thisx, GlobalContext* globalCtx); void EnMa2_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -248,7 +248,7 @@ void EnMa2_Destroy(Actor* thisx, GlobalContext* globalCtx) { void func_80AA2018(EnMa2* this, GlobalContext* globalCtx) { if (this->unk_1E0.unk_00 == 2) { - this->actor.flags &= ~0x10000; + this->actor.flags &= ~ACTOR_FLAG_16; this->unk_1E0.unk_00 = 0; } } @@ -290,10 +290,10 @@ void func_80AA21C8(EnMa2* this, GlobalContext* globalCtx) { player->stateFlags2 |= 0x800000; } else { if (this->unk_1E0.unk_00 == 0) { - this->actor.flags |= 0x10000; + this->actor.flags |= ACTOR_FLAG_16; Message_CloseTextbox(globalCtx); } else { - this->actor.flags &= ~0x10000; + this->actor.flags &= ~ACTOR_FLAG_16; this->actionFunc = func_80AA2018; } } diff --git a/src/overlays/actors/ovl_En_Ma3/z_en_ma3.c b/src/overlays/actors/ovl_En_Ma3/z_en_ma3.c index fec57cbf94..0b84b24ca5 100644 --- a/src/overlays/actors/ovl_En_Ma3/z_en_ma3.c +++ b/src/overlays/actors/ovl_En_Ma3/z_en_ma3.c @@ -7,7 +7,7 @@ #include "z_en_ma3.h" #include "objects/object_ma2/object_ma2.h" -#define FLAGS 0x00000039 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_4 | ACTOR_FLAG_5) void EnMa3_Init(Actor* thisx, GlobalContext* globalCtx); void EnMa3_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -74,7 +74,7 @@ u16 func_80AA2AA0(GlobalContext* globalCtx, Actor* thisx) { timer1ValuePtr = &gSaveContext.timer1Value; if (gSaveContext.eventInf[0] & 0x400) { gSaveContext.timer1Value = gSaveContext.timer1Value; - thisx->flags |= 0x10000; + thisx->flags |= ACTOR_FLAG_16; if (gSaveContext.timer1Value >= 0xD3) { return 0x208E; } @@ -144,7 +144,7 @@ s16 func_80AA2BD4(GlobalContext* globalCtx, Actor* thisx) { } case 0x208E: gSaveContext.eventInf[0] &= ~0x400; - thisx->flags &= ~0x10000; + thisx->flags &= ~ACTOR_FLAG_16; ret = 0; gSaveContext.timer1State = 0xA; break; @@ -269,7 +269,7 @@ void EnMa3_Destroy(Actor* thisx, GlobalContext* globalCtx) { void func_80AA3200(EnMa3* this, GlobalContext* globalCtx) { if (this->unk_1E0.unk_00 == 2) { - this->actor.flags &= ~0x10000; + this->actor.flags &= ~ACTOR_FLAG_16; this->unk_1E0.unk_00 = 0; } } diff --git a/src/overlays/actors/ovl_En_Mag/z_en_mag.c b/src/overlays/actors/ovl_En_Mag/z_en_mag.c index a0179ec2d9..1216cae853 100644 --- a/src/overlays/actors/ovl_En_Mag/z_en_mag.c +++ b/src/overlays/actors/ovl_En_Mag/z_en_mag.c @@ -7,7 +7,7 @@ #include "z_en_mag.h" #include "objects/object_mag/object_mag.h" -#define FLAGS 0x00000030 +#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) void EnMag_Init(Actor* thisx, GlobalContext* globalCtx); void EnMag_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_En_Mb/z_en_mb.c b/src/overlays/actors/ovl_En_Mb/z_en_mb.c index 408484a288..028f48e21e 100644 --- a/src/overlays/actors/ovl_En_Mb/z_en_mb.c +++ b/src/overlays/actors/ovl_En_Mb/z_en_mb.c @@ -14,7 +14,7 @@ * - "Spear Patrol" (variable 0xPP00 PP=pathId): uses a spear, patrols following a path, charges */ -#define FLAGS 0x00000015 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4) typedef enum { /* -1 */ ENMB_TYPE_SPEAR_GUARD = -1, @@ -307,7 +307,7 @@ void EnMb_Init(Actor* thisx, GlobalContext* globalCtx) { } ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawFeet, 90.0f); - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; this->actor.naviEnemyId += 1; EnMb_SetupClubWaitPlayerNear(this); break; @@ -323,7 +323,7 @@ void EnMb_Init(Actor* thisx, GlobalContext* globalCtx) { this->actor.colChkInfo.mass = MASS_HEAVY; this->maxHomeDist = 350.0f; this->playerDetectionRange = 1750.0f; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; EnMb_SetupSpearPatrolTurnTowardsWaypoint(this, globalCtx); break; } @@ -574,7 +574,7 @@ void EnMb_SetupClubDamagedWhileKneeling(EnMb* this) { void EnMb_SetupClubDead(EnMb* this) { Animation_MorphToPlayOnce(&this->skelAnime, &gEnMbClubFallOnItsBackAnim, -4.0f); this->state = ENMB_STATE_CLUB_DEAD; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; this->hitbox.dim.height = 80; this->hitbox.dim.radius = 95; this->timer1 = 30; @@ -1134,12 +1134,12 @@ void EnMb_SpearGuardWalk(EnMb* this, GlobalContext* globalCtx) { if (this->timer3 == 0 && Math_Vec3f_DistXZ(&this->actor.home.pos, &player->actor.world.pos) < this->playerDetectionRange) { Math_SmoothStepToS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer, 1, 0x2EE, 0); - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0; if (this->actor.xzDistToPlayer < 500.0f && relYawTowardsPlayer < 0x1388) { EnMb_SetupSpearPrepareAndCharge(this); } } else { - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; if (Math_Vec3f_DistXZ(&this->actor.world.pos, &this->actor.home.pos) > this->maxHomeDist || this->timer2 != 0) { yawTowardsHome = Math_Vec3f_Yaw(&this->actor.world.pos, &this->actor.home.pos); Math_SmoothStepToS(&this->actor.world.rot.y, yawTowardsHome, 1, 0x2EE, 0); @@ -1286,7 +1286,7 @@ void EnMb_SetupSpearDead(EnMb* this) { this->timer1 = 30; this->state = ENMB_STATE_SPEAR_SPEARPATH_DAMAGED; Audio_PlayActorSound2(&this->actor, NA_SE_EN_MORIBLIN_DEAD); - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; EnMb_SetupAction(this, EnMb_SpearDead); } diff --git a/src/overlays/actors/ovl_En_Md/z_en_md.c b/src/overlays/actors/ovl_En_Md/z_en_md.c index e4fa286a39..837b697692 100644 --- a/src/overlays/actors/ovl_En_Md/z_en_md.c +++ b/src/overlays/actors/ovl_En_Md/z_en_md.c @@ -8,7 +8,7 @@ #include "objects/object_md/object_md.h" #include "overlays/actors/ovl_En_Elf/z_en_elf.h" -#define FLAGS 0x02000019 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_4 | ACTOR_FLAG_25) void EnMd_Init(Actor* thisx, GlobalContext* globalCtx); void EnMd_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_En_Mk/z_en_mk.c b/src/overlays/actors/ovl_En_Mk/z_en_mk.c index 9ea165b45f..9c66898b73 100644 --- a/src/overlays/actors/ovl_En_Mk/z_en_mk.c +++ b/src/overlays/actors/ovl_En_Mk/z_en_mk.c @@ -7,7 +7,7 @@ #include "z_en_mk.h" #include "objects/object_mk/object_mk.h" -#define FLAGS 0x00000019 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_4) void EnMk_Init(Actor* thisx, GlobalContext* globalCtx); void EnMk_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -81,7 +81,7 @@ void EnMk_Destroy(Actor* thisx, GlobalContext* globalCtx) { void func_80AACA40(EnMk* this, GlobalContext* globalCtx) { if (Actor_TextboxIsClosing(&this->actor, globalCtx)) { - this->actor.flags &= 0xFFFEFFFF; + this->actor.flags &= ~ACTOR_FLAG_16; this->actionFunc = EnMk_Wait; } diff --git a/src/overlays/actors/ovl_En_Mm/z_en_mm.c b/src/overlays/actors/ovl_En_Mm/z_en_mm.c index 0dae9980b0..18d386c11a 100644 --- a/src/overlays/actors/ovl_En_Mm/z_en_mm.c +++ b/src/overlays/actors/ovl_En_Mm/z_en_mm.c @@ -8,7 +8,7 @@ #include "objects/object_mm/object_mm.h" #include "objects/object_link_child/object_link_child.h" -#define FLAGS 0x00000019 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_4) typedef enum { /* 0 */ RM_ANIM_RUN, diff --git a/src/overlays/actors/ovl_En_Mm2/z_en_mm2.c b/src/overlays/actors/ovl_En_Mm2/z_en_mm2.c index d8297694f1..1e85d73304 100644 --- a/src/overlays/actors/ovl_En_Mm2/z_en_mm2.c +++ b/src/overlays/actors/ovl_En_Mm2/z_en_mm2.c @@ -8,7 +8,7 @@ #include "vt.h" #include "objects/object_mm/object_mm.h" -#define FLAGS 0x00000019 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_4) typedef enum { /* 0 */ RM2_ANIM_RUN, diff --git a/src/overlays/actors/ovl_En_Ms/z_en_ms.c b/src/overlays/actors/ovl_En_Ms/z_en_ms.c index e3e6397846..960ec123c8 100644 --- a/src/overlays/actors/ovl_En_Ms/z_en_ms.c +++ b/src/overlays/actors/ovl_En_Ms/z_en_ms.c @@ -7,7 +7,7 @@ #include "z_en_ms.h" #include "objects/object_ms/object_ms.h" -#define FLAGS 0x00000009 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3) void EnMs_Init(Actor* thisx, GlobalContext* globalCtx); void EnMs_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_En_Mu/z_en_mu.c b/src/overlays/actors/ovl_En_Mu/z_en_mu.c index 249375e32e..7ec0130047 100644 --- a/src/overlays/actors/ovl_En_Mu/z_en_mu.c +++ b/src/overlays/actors/ovl_En_Mu/z_en_mu.c @@ -7,7 +7,7 @@ #include "z_en_mu.h" #include "objects/object_mu/object_mu.h" -#define FLAGS 0x00000009 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3) void EnMu_Init(Actor* thisx, GlobalContext* globalCtx); void EnMu_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_En_Nb/z_en_nb.c b/src/overlays/actors/ovl_En_Nb/z_en_nb.c index d670ba7fbe..d409764bd1 100644 --- a/src/overlays/actors/ovl_En_Nb/z_en_nb.c +++ b/src/overlays/actors/ovl_En_Nb/z_en_nb.c @@ -9,7 +9,7 @@ #include "objects/object_nb/object_nb.h" #include "overlays/actors/ovl_Door_Warp1/z_door_warp1.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 typedef enum { /* 0x00 */ NB_CHAMBER_INIT, @@ -1110,7 +1110,7 @@ void EnNb_CrawlspaceSpawnCheck(EnNb* this, GlobalContext* globalCtx) { } else { EnNb_SetCurrentAnim(this, &gNabooruStandingHandsOnHipsAnim, 0, 0.0f, 0); this->headTurnFlag = 1; - this->actor.flags |= 9; + this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_3; this->actor.world.pos = this->finalPos; this->action = NB_IDLE_AFTER_TALK; this->drawMode = NB_DRAW_DEFAULT; @@ -1189,7 +1189,7 @@ void EnNb_SetupIdleCrawlspace(EnNb* this, s32 animFinished) { if (animFinished) { EnNb_SetCurrentAnim(this, &gNabooruStandingHandsOnHipsAnim, 0, -8.0f, 0); this->headTurnFlag = 1; - this->actor.flags |= 9; + this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_3; this->action = NB_IDLE_CRAWLSPACE; } } @@ -1198,7 +1198,7 @@ void func_80AB3838(EnNb* this, GlobalContext* globalCtx) { if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) { this->action = NB_IN_DIALOG; } else { - this->actor.flags |= 9; + this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_3; if (!(gSaveContext.infTable[22] & 0x1000)) { this->actor.textId = 0x601D; @@ -1214,7 +1214,7 @@ void EnNb_SetupPathMovement(EnNb* this, GlobalContext* globalCtx) { EnNb_SetCurrentAnim(this, &gNabooruStandingToWalkingTransitionAnim, 2, -8.0f, 0); gSaveContext.eventChkInf[9] |= 0x10; this->action = NB_IN_PATH; - this->actor.flags &= ~9; + this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_3); } void EnNb_SetTextIdAsChild(EnNb* this, GlobalContext* globalCtx) { @@ -1234,7 +1234,7 @@ void EnNb_SetTextIdAsChild(EnNb* this, GlobalContext* globalCtx) { } this->action = NB_IDLE_CRAWLSPACE; } - this->actor.flags &= ~9; + this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_3); } else if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_CHOICE) && Message_ShouldAdvance(globalCtx)) { choiceIndex = globalCtx->msgCtx.choiceIndex; @@ -1290,7 +1290,7 @@ void func_80AB3B04(EnNb* this, GlobalContext* globalCtx) { if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) { this->action = NB_ACTION_30; } else { - this->actor.flags |= 9; + this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_3; this->actor.textId = Text_GetFaceReaction(globalCtx, 0x23); if ((this->actor.textId) == 0) { @@ -1304,7 +1304,7 @@ void func_80AB3B04(EnNb* this, GlobalContext* globalCtx) { void func_80AB3B7C(EnNb* this, GlobalContext* globalCtx) { if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_CLOSING) { this->action = NB_IDLE_AFTER_TALK; - this->actor.flags &= ~9; + this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_3); } } diff --git a/src/overlays/actors/ovl_En_Niw/z_en_niw.c b/src/overlays/actors/ovl_En_Niw/z_en_niw.c index 8a4a28dc05..0fc4e230b8 100644 --- a/src/overlays/actors/ovl_En_Niw/z_en_niw.c +++ b/src/overlays/actors/ovl_En_Niw/z_en_niw.c @@ -9,7 +9,7 @@ #include "overlays/actors/ovl_En_Attack_Niw/z_en_attack_niw.h" #include "vt.h" -#define FLAGS 0x00800010 +#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_23) void EnNiw_Init(Actor* thisx, GlobalContext* globalCtx); void EnNiw_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -150,7 +150,7 @@ void EnNiw_Init(Actor* thisx, GlobalContext* globalCtx) { } Actor_ProcessInitChain(&this->actor, sInitChain); - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 25.0f); SkelAnime_InitFlex(globalCtx, &this->skelAnime, &gCuccoSkel, &gCuccoAnim, this->jointTable, this->morphTable, 16); @@ -210,7 +210,7 @@ void EnNiw_Init(Actor* thisx, GlobalContext* globalCtx) { this->actor.gravity = 0.0f; case 0xE: this->actor.colChkInfo.mass = 0; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; break; case 4: this->actor.gravity = 0.0f; @@ -457,7 +457,7 @@ void func_80AB6450(EnNiw* this, GlobalContext* globalCtx) { this->sfxTimer1 = 30; this->path = 0; this->timer4 = 30; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; this->actor.speedXZ = 0.0f; this->actionFunc = func_80AB6BF8; } else { @@ -479,7 +479,7 @@ void func_80AB6570(EnNiw* this, GlobalContext* globalCtx) { this->sfxTimer1 = 30; this->path = 0; this->timer4 = 30; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; this->actor.speedXZ = 0.0f; this->actionFunc = func_80AB6BF8; return; @@ -640,7 +640,7 @@ void func_80AB6BF8(EnNiw* this, GlobalContext* globalCtx) { this->actor.shape.rot.z = 0; this->actor.shape.rot.y = this->actor.shape.rot.z; this->actor.shape.rot.x = this->actor.shape.rot.z; - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0; this->actionFunc = func_80AB6D08; } func_80AB5BF8(this, globalCtx, 2); @@ -688,7 +688,7 @@ void func_80AB6D08(EnNiw* this, GlobalContext* globalCtx) { this->sfxTimer1 = 30; this->path = 0; this->timer4 = 30; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; this->actor.speedXZ = 0.0f; this->actionFunc = func_80AB6BF8; } else { @@ -795,7 +795,7 @@ void func_80AB714C(EnNiw* this, GlobalContext* globalCtx) { if (this->timer5 == 0) { this->timer7 = 10; this->unk_2E4 = this->actor.yawTowardsPlayer; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; this->actionFunc = func_80AB7204; } diff --git a/src/overlays/actors/ovl_En_Niw_Girl/z_en_niw_girl.c b/src/overlays/actors/ovl_En_Niw_Girl/z_en_niw_girl.c index 34d58fa33b..71245ca55b 100644 --- a/src/overlays/actors/ovl_En_Niw_Girl/z_en_niw_girl.c +++ b/src/overlays/actors/ovl_En_Niw_Girl/z_en_niw_girl.c @@ -8,7 +8,7 @@ #include "objects/object_gr/object_gr.h" #include "vt.h" -#define FLAGS 0x00000019 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_4) void EnNiwGirl_Init(Actor* thisx, GlobalContext* globalCtx); void EnNiwGirl_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -97,7 +97,7 @@ void EnNiwGirl_Destroy(Actor* thisx, GlobalContext* globalCtx) { void EnNiwGirl_Jump(EnNiwGirl* this, GlobalContext* globalCtx) { f32 frameCount = Animation_GetLastFrame(&gNiwGirlRunAnim); Animation_Change(&this->skelAnime, &gNiwGirlRunAnim, 1.0f, 0.0f, frameCount, 0, -10.0f); - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; this->actionFunc = func_80AB9210; } @@ -138,7 +138,7 @@ void func_80AB9210(EnNiwGirl* this, GlobalContext* globalCtx) { void EnNiwGirl_Talk(EnNiwGirl* this, GlobalContext* globalCtx) { Animation_Change(&this->skelAnime, &gNiwGirlJumpAnim, 1.0f, 0.0f, Animation_GetLastFrame(&gNiwGirlJumpAnim), 0, -10.0f); - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0; this->actor.textId = 0x7000; if ((gSaveContext.eventChkInf[8] & 1) && (this->unk_27A == 0)) { this->actor.textId = 0x70EA; diff --git a/src/overlays/actors/ovl_En_Niw_Lady/z_en_niw_lady.c b/src/overlays/actors/ovl_En_Niw_Lady/z_en_niw_lady.c index 5c4347735a..47f360195e 100644 --- a/src/overlays/actors/ovl_En_Niw_Lady/z_en_niw_lady.c +++ b/src/overlays/actors/ovl_En_Niw_Lady/z_en_niw_lady.c @@ -4,7 +4,7 @@ #include "overlays/actors/ovl_En_Niw/z_en_niw.h" #include "vt.h" -#define FLAGS 0x00000019 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_4) void EnNiwLady_Init(Actor* thisx, GlobalContext* globalCtx); void EnNiwLady_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_En_Nutsball/z_en_nutsball.c b/src/overlays/actors/ovl_En_Nutsball/z_en_nutsball.c index 1f9cfa65e9..af91240d0b 100644 --- a/src/overlays/actors/ovl_En_Nutsball/z_en_nutsball.c +++ b/src/overlays/actors/ovl_En_Nutsball/z_en_nutsball.c @@ -12,7 +12,7 @@ #include "objects/object_dns/object_dns.h" #include "objects/object_dnk/object_dnk.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 void EnNutsball_Init(Actor* thisx, GlobalContext* globalCtx); void EnNutsball_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -153,7 +153,7 @@ void EnNutsball_Update(Actor* thisx, GlobalContext* globalCtx) { Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 10, sCylinderInit.dim.radius, sCylinderInit.dim.height, 5); Collider_UpdateCylinder(&this->actor, &this->collider); - this->actor.flags |= 0x1000000; + this->actor.flags |= ACTOR_FLAG_24; CollisionCheck_SetAT(globalCtx, &globalCtx->colChkCtx, &this->collider.base); CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->collider.base); diff --git a/src/overlays/actors/ovl_En_Nwc/z_en_nwc.c b/src/overlays/actors/ovl_En_Nwc/z_en_nwc.c index d3cf003dc6..789104f9e2 100644 --- a/src/overlays/actors/ovl_En_Nwc/z_en_nwc.c +++ b/src/overlays/actors/ovl_En_Nwc/z_en_nwc.c @@ -7,7 +7,7 @@ #include "z_en_nwc.h" #include "objects/object_nwc/object_nwc.h" -#define FLAGS 0x00000030 +#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) void EnNwc_Init(Actor* thisx, GlobalContext* globalCtx); void EnNwc_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_En_Ny/z_en_ny.c b/src/overlays/actors/ovl_En_Ny/z_en_ny.c index 0cf905450d..0cc2327fd8 100644 --- a/src/overlays/actors/ovl_En_Ny/z_en_ny.c +++ b/src/overlays/actors/ovl_En_Ny/z_en_ny.c @@ -1,7 +1,7 @@ #include "z_en_ny.h" #include "objects/object_ny/object_ny.h" -#define FLAGS 0x00000005 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2) void EnNy_Init(Actor* thisx, GlobalContext* globalCtx); void EnNy_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -330,7 +330,7 @@ s32 EnNy_CollisionCheck(EnNy* this, GlobalContext* globalCtx) { this->stoneTimer = 0; if (this->actor.colChkInfo.health == 0) { this->actor.shape.shadowAlpha = 0; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; this->unk_1D0 = sp3F; Enemy_StartFinishingBlow(globalCtx, &this->actor); return 1; diff --git a/src/overlays/actors/ovl_En_OE2/z_en_oe2.c b/src/overlays/actors/ovl_En_OE2/z_en_oe2.c index b205909fd3..ef8b608b7d 100644 --- a/src/overlays/actors/ovl_En_OE2/z_en_oe2.c +++ b/src/overlays/actors/ovl_En_OE2/z_en_oe2.c @@ -6,7 +6,7 @@ #include "z_en_oe2.h" -#define FLAGS 0x00000009 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3) void EnOE2_Init(Actor* thisx, GlobalContext* globalCtx); void EnOE2_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_En_Okarina_Effect/z_en_okarina_effect.c b/src/overlays/actors/ovl_En_Okarina_Effect/z_en_okarina_effect.c index bbcb76d720..13ed7161ba 100644 --- a/src/overlays/actors/ovl_En_Okarina_Effect/z_en_okarina_effect.c +++ b/src/overlays/actors/ovl_En_Okarina_Effect/z_en_okarina_effect.c @@ -7,7 +7,7 @@ #include "z_en_okarina_effect.h" #include "vt.h" -#define FLAGS 0x02000010 +#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_25) void EnOkarinaEffect_Init(Actor* thisx, GlobalContext* globalCtx); void EnOkarinaEffect_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_En_Okarina_Tag/z_en_okarina_tag.c b/src/overlays/actors/ovl_En_Okarina_Tag/z_en_okarina_tag.c index b6d4edf788..818a80478c 100644 --- a/src/overlays/actors/ovl_En_Okarina_Tag/z_en_okarina_tag.c +++ b/src/overlays/actors/ovl_En_Okarina_Tag/z_en_okarina_tag.c @@ -9,7 +9,7 @@ #include "scenes/overworld/spot02/spot02_scene.h" #include "vt.h" -#define FLAGS 0x02000010 +#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_25) void EnOkarinaTag_Init(Actor* thisx, GlobalContext* globalCtx); void EnOkarinaTag_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -46,7 +46,7 @@ void EnOkarinaTag_Init(Actor* thisx, GlobalContext* globalCtx) { osSyncPrintf("\n\n"); // "Ocarina tag outbreak" osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ オカリナタグ発生 ☆☆☆☆☆ %x\n" VT_RST, this->actor.params); - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; this->type = (this->actor.params >> 0xA) & 0x3F; this->ocarinaSong = (this->actor.params >> 6) & 0xF; this->switchFlag = this->actor.params & 0x3F; @@ -111,7 +111,7 @@ void func_80ABEF2C(EnOkarinaTag* this, GlobalContext* globalCtx) { player = GET_PLAYER(globalCtx); this->unk_15A++; if ((this->switchFlag >= 0) && (Flags_GetSwitch(globalCtx, this->switchFlag))) { - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; } else { if ((this->ocarinaSong != 6) || (gSaveContext.scarecrowSpawnSongSet)) { if (player->stateFlags2 & 0x1000000) { @@ -190,7 +190,7 @@ void func_80ABF28C(EnOkarinaTag* this, GlobalContext* globalCtx) { this->unk_15A++; if ((this->ocarinaSong != 6) || (gSaveContext.scarecrowSpawnSongSet)) { if ((this->switchFlag >= 0) && Flags_GetSwitch(globalCtx, this->switchFlag)) { - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; } else if (((this->type != 4) || !(gSaveContext.eventChkInf[4] & 0x800)) && ((this->type != 6) || !(gSaveContext.eventChkInf[1] & 0x2000)) && (this->actor.xzDistToPlayer < (90.0f + this->interactRange)) && diff --git a/src/overlays/actors/ovl_En_Okuta/z_en_okuta.c b/src/overlays/actors/ovl_En_Okuta/z_en_okuta.c index d4042e1a7b..21c4da9d2b 100644 --- a/src/overlays/actors/ovl_En_Okuta/z_en_okuta.c +++ b/src/overlays/actors/ovl_En_Okuta/z_en_okuta.c @@ -1,7 +1,7 @@ #include "z_en_okuta.h" #include "objects/object_okuta/object_okuta.h" -#define FLAGS 0x00000005 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2) void EnOkuta_Init(Actor* thisx, GlobalContext* globalCtx); void EnOkuta_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -145,8 +145,8 @@ void EnOkuta_Init(Actor* thisx, GlobalContext* globalCtx) { EnOkuta_SetupWaitToAppear(this); } else { ActorShape_Init(&thisx->shape, 1100.0f, ActorShadow_DrawCircle, 18.0f); - thisx->flags &= ~1; - thisx->flags |= 0x10; + thisx->flags &= ~ACTOR_FLAG_0; + thisx->flags |= ACTOR_FLAG_4; Collider_InitCylinder(globalCtx, &this->collider); Collider_SetCylinder(globalCtx, &this->collider, thisx, &sProjectileColliderInit); Actor_ChangeCategory(globalCtx, &globalCtx->actorCtx, thisx, ACTORCAT_PROP); @@ -197,7 +197,7 @@ void EnOkuta_SpawnRipple(EnOkuta* this, GlobalContext* globalCtx) { void EnOkuta_SetupWaitToAppear(EnOkuta* this) { this->actor.draw = NULL; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; this->actionFunc = EnOkuta_WaitToAppear; this->actor.world.pos.y = this->actor.home.pos.y; } @@ -205,7 +205,7 @@ void EnOkuta_SetupWaitToAppear(EnOkuta* this) { void EnOkuta_SetupAppear(EnOkuta* this, GlobalContext* globalCtx) { this->actor.draw = EnOkuta_Draw; this->actor.shape.rot.y = this->actor.yawTowardsPlayer; - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0; Animation_PlayOnce(&this->skelAnime, &gOctorokAppearAnim); EnOkuta_SpawnBubbles(this, globalCtx); this->actionFunc = EnOkuta_Appear; @@ -559,7 +559,7 @@ void EnOkuta_ColliderCheck(EnOkuta* this, GlobalContext* globalCtx) { if ((this->actor.colChkInfo.damageEffect != 0) || (this->actor.colChkInfo.damage != 0)) { Enemy_StartFinishingBlow(globalCtx, &this->actor); this->actor.colChkInfo.health = 0; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; if (this->actor.colChkInfo.damageEffect == 3) { EnOkuta_SetupFreeze(this); } else { @@ -623,7 +623,7 @@ void EnOkuta_Update(Actor* thisx, GlobalContext* globalCtx2) { this->collider.dim.radius = sOctorockColliderInit.dim.radius * this->actor.scale.x * 100.0f; } if (this->actor.params == 0x10) { - this->actor.flags |= 0x1000000; + this->actor.flags |= ACTOR_FLAG_24; CollisionCheck_SetAT(globalCtx, &globalCtx->colChkCtx, &this->collider.base); } if (this->actionFunc != EnOkuta_WaitToAppear) { diff --git a/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c b/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c index 63d8a66337..fbd2d70195 100644 --- a/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c +++ b/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c @@ -14,7 +14,7 @@ #include "objects/object_masterzoora/object_masterzoora.h" #include "objects/object_masterkokirihead/object_masterkokirihead.h" -#define FLAGS 0x00000019 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_4) void EnOssan_Init(Actor* thisx, GlobalContext* globalCtx); void EnOssan_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -2104,7 +2104,7 @@ void EnOssan_InitActionFunc(EnOssan* this, GlobalContext* globalCtx) { ShopItem* items; if (EnOssan_AreShopkeeperObjectsLoaded(this, globalCtx)) { - this->actor.flags &= ~0x10; + this->actor.flags &= ~ACTOR_FLAG_4; this->actor.objBankIndex = this->objBankIndex1; Actor_SetObjectDependency(globalCtx, &this->actor); @@ -2189,7 +2189,7 @@ void EnOssan_InitActionFunc(EnOssan* this, GlobalContext* globalCtx) { this->blinkTimer = 20; this->eyeTextureIdx = 0; this->blinkFunc = EnOssan_WaitForBlink; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; EnOssan_SetupAction(this, EnOssan_MainActionFunc); } } diff --git a/src/overlays/actors/ovl_En_Owl/z_en_owl.c b/src/overlays/actors/ovl_En_Owl/z_en_owl.c index fdb92d4c01..d94d6d590b 100644 --- a/src/overlays/actors/ovl_En_Owl/z_en_owl.c +++ b/src/overlays/actors/ovl_En_Owl/z_en_owl.c @@ -10,7 +10,7 @@ #include "scenes/overworld/spot16/spot16_scene.h" #include "vt.h" -#define FLAGS 0x00000019 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_4) void EnOwl_Init(Actor* thisx, GlobalContext* globalCtx); void EnOwl_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -277,7 +277,7 @@ s32 EnOwl_CheckInitTalk(EnOwl* this, GlobalContext* globalCtx, u16 textId, f32 t this->actor.textId = textId; distCheck = (flags & 2) ? 200.0f : 1000.0f; if (this->actor.xzDistToPlayer < targetDist) { - this->actor.flags |= 0x10000; + this->actor.flags |= ACTOR_FLAG_16; func_8002F1C4(&this->actor, globalCtx, targetDist, distCheck, 0); } return false; @@ -343,7 +343,7 @@ void func_80ACA76C(EnOwl* this, GlobalContext* globalCtx) { if (Actor_TextboxIsClosing(&this->actor, globalCtx)) { Audio_QueueSeqCmd(0x1 << 28 | SEQ_PLAYER_FANFARE << 24 | 0xFF); func_80ACA62C(this, globalCtx); - this->actor.flags &= ~0x10000; + this->actor.flags &= ~ACTOR_FLAG_16; } } @@ -359,7 +359,7 @@ void func_80ACA7E0(EnOwl* this, GlobalContext* globalCtx) { func_80ACA71C(this); this->actionFunc = func_80ACA690; } - this->actor.flags &= ~0x10000; + this->actor.flags &= ~ACTOR_FLAG_16; } } @@ -553,7 +553,7 @@ void func_80ACB03C(EnOwl* this, GlobalContext* globalCtx) { if (Actor_TextboxIsClosing(&this->actor, globalCtx)) { Audio_QueueSeqCmd(0x1 << 28 | SEQ_PLAYER_FANFARE << 24 | 0xFF); func_80ACA62C(this, globalCtx); - this->actor.flags &= ~0x10000; + this->actor.flags &= ~ACTOR_FLAG_16; } } @@ -836,7 +836,7 @@ void func_80ACBAB8(EnOwl* this, GlobalContext* globalCtx) { } void func_80ACBC0C(EnOwl* this, GlobalContext* globalCtx) { - this->actor.flags |= 0x20; + this->actor.flags |= ACTOR_FLAG_5; if (this->actor.xzDistToPlayer > 6000.0f && !(this->actionFlags & 0x80)) { Actor_Kill(&this->actor); diff --git a/src/overlays/actors/ovl_En_Part/z_en_part.c b/src/overlays/actors/ovl_En_Part/z_en_part.c index e5fe469c07..7fa8088604 100644 --- a/src/overlays/actors/ovl_En_Part/z_en_part.c +++ b/src/overlays/actors/ovl_En_Part/z_en_part.c @@ -8,7 +8,7 @@ #include "objects/object_tite/object_tite.h" #include "objects/object_ik/object_ik.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 void EnPart_Init(Actor* thisx, GlobalContext* globalCtx); void EnPart_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_En_Peehat/z_en_peehat.c b/src/overlays/actors/ovl_En_Peehat/z_en_peehat.c index 0182a60bb2..5d5214bd65 100644 --- a/src/overlays/actors/ovl_En_Peehat/z_en_peehat.c +++ b/src/overlays/actors/ovl_En_Peehat/z_en_peehat.c @@ -3,7 +3,7 @@ #include "overlays/actors/ovl_En_Bom/z_en_bom.h" #include "overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h" -#define FLAGS 0x01000015 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4 | ACTOR_FLAG_24) #define GROUND_HOVER_HEIGHT 75.0f #define MAX_LARVA 3 @@ -224,7 +224,7 @@ void EnPeehat_Init(Actor* thisx, GlobalContext* globalCtx) { this->xzDistToRise = 2800.0f; this->xzDistMax = 1400.0f; EnPeehat_Flying_SetStateGround(this); - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; break; case PEAHAT_TYPE_LARVA: this->actor.scale.x = this->actor.scale.z = 0.006f; @@ -323,7 +323,7 @@ void EnPeehat_Ground_SetStateGround(EnPeehat* this) { void EnPeehat_Ground_StateGround(EnPeehat* this, GlobalContext* globalCtx) { if (IS_DAY) { - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0; if (this->riseDelayTimer == 0) { if (this->actor.xzDistToPlayer < this->xzDistToRise) { EnPeehat_Ground_SetStateRise(this); @@ -333,7 +333,7 @@ void EnPeehat_Ground_StateGround(EnPeehat* this, GlobalContext* globalCtx) { this->riseDelayTimer--; } } else { - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; Math_SmoothStepToF(&this->actor.shape.yOffset, -1000.0f, 1.0f, 50.0f, 0.0f); if (this->unk2D4 != 0) { this->unk2D4--; @@ -980,7 +980,7 @@ void EnPeehat_Update(Actor* thisx, GlobalContext* globalCtx) { CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->colQuad.base); } // if PEAHAT_TYPE_GROUNDED - if (thisx->params < 0 && (thisx->flags & 0x40)) { + if (thisx->params < 0 && (thisx->flags & ACTOR_FLAG_6)) { for (i = 1; i >= 0; i--) { Vec3f posResult; CollisionPoly* poly = NULL; diff --git a/src/overlays/actors/ovl_En_Po_Desert/z_en_po_desert.c b/src/overlays/actors/ovl_En_Po_Desert/z_en_po_desert.c index acecfab68a..27b519a000 100644 --- a/src/overlays/actors/ovl_En_Po_Desert/z_en_po_desert.c +++ b/src/overlays/actors/ovl_En_Po_Desert/z_en_po_desert.c @@ -7,7 +7,7 @@ #include "z_en_po_desert.h" #include "objects/object_po_field/object_po_field.h" -#define FLAGS 0x00001090 +#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_7 | ACTOR_FLAG_12) void EnPoDesert_Init(Actor* thisx, GlobalContext* globalCtx); void EnPoDesert_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -198,11 +198,11 @@ void EnPoDesert_Update(Actor* thisx, GlobalContext* globalCtx) { Collider_UpdateCylinder(&this->actor, &this->collider); CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->collider.base); if (globalCtx->actorCtx.unk_03) { - this->actor.flags |= 0x81; + this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_7; this->actor.shape.shadowDraw = ActorShadow_DrawCircle; } else { this->actor.shape.shadowDraw = NULL; - this->actor.flags &= ~0x81; + this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_7); } } @@ -215,7 +215,7 @@ s32 EnPoDesert_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** d mtxScale = this->actionTimer / 16.0f; Matrix_Scale(mtxScale, mtxScale, mtxScale, MTXMODE_APPLY); } - if ((this->actor.flags & 0x80) != 0x80) { + if (!CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_7)) { *dList = NULL; } return false; @@ -236,7 +236,7 @@ void EnPoDesert_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dLis color.r = (s16)(rand * 30.0f) + 225; color.g = (s16)(rand * 100.0f) + 155; color.b = (s16)(rand * 160.0f) + 95; - if ((this->actor.flags & 0x80) == 0x80) { + if (CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_7)) { gDPPipeSync((*gfxP)++); gDPSetEnvColor((*gfxP)++, color.r, color.g, color.b, 255); gSPMatrix((*gfxP)++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_po_desert.c", 523), diff --git a/src/overlays/actors/ovl_En_Po_Field/z_en_po_field.c b/src/overlays/actors/ovl_En_Po_Field/z_en_po_field.c index 3655b94c59..ff11ccedc1 100644 --- a/src/overlays/actors/ovl_En_Po_Field/z_en_po_field.c +++ b/src/overlays/actors/ovl_En_Po_Field/z_en_po_field.c @@ -8,7 +8,7 @@ #include "objects/gameplay_keep/gameplay_keep.h" #include "objects/object_po_field/object_po_field.h" -#define FLAGS 0x00001035 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4 | ACTOR_FLAG_5 | ACTOR_FLAG_12) void EnPoField_Init(Actor* thisx, GlobalContext* globalCtx); void EnPoField_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -193,7 +193,7 @@ void EnPoField_SetupWaitForSpawn(EnPoField* this, GlobalContext* globalCtx) { Lights_PointSetColorAndRadius(&this->lightInfo, 0, 0, 0, 0); this->actionTimer = 200; Actor_SetScale(&this->actor, 0.0f); - this->actor.flags &= ~0x00010001; + this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_16); this->collider.base.acFlags &= ~AC_ON; this->collider.base.ocFlags1 = OC1_ON | OC1_TYPE_ALL; this->actor.colChkInfo.health = D_80AD70D8.health; @@ -242,7 +242,7 @@ void EnPoField_SetupCirclePlayer(EnPoField* this, GlobalContext* globalCtx) { Math_Vec3f_Copy(&this->actor.home.pos, &player->actor.world.pos); this->actor.world.rot.y = this->actor.yawTowardsPlayer; if (this->actionFunc != EnPoField_Damage) { - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0; this->actionTimer = 600; this->unk_194 = 32; } @@ -255,7 +255,7 @@ void EnPoField_SetupFlee(EnPoField* this) { this->actionFunc = EnPoField_Flee; this->actor.speedXZ = 12.0f; if (this->actionFunc != EnPoField_Damage) { - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0; this->actor.world.rot.y = this->actor.shape.rot.y + 0x8000; this->actionTimer = 2000; this->unk_194 = 32; @@ -277,7 +277,7 @@ void EnPoField_SetupDamage(EnPoField* this) { void EnPoField_SetupDeath(EnPoField* this) { this->actionTimer = 0; - this->actor.flags &= -2; + this->actor.flags &= ~ACTOR_FLAG_0; this->actor.speedXZ = 0.0f; this->actor.world.rot.y = this->actor.shape.rot.y; this->actor.naviEnemyId = 0xFF; @@ -343,7 +343,7 @@ void func_80AD4384(EnPoField* this) { this->actor.textId = 0x5005; this->actionTimer = 400; this->unk_194 = 32; - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0; this->actionFunc = func_80AD58D4; } @@ -656,15 +656,15 @@ void func_80AD58D4(EnPoField* this, GlobalContext* globalCtx) { } if (this->actionTimer == 0) { Audio_PlayActorSound2(&this->actor, NA_SE_EN_PO_LAUGH); - this->actor.flags &= ~0x10000; + this->actor.flags &= ~ACTOR_FLAG_16; EnPoField_SetupSoulDisappear(this); return; } if (this->collider.base.ocFlags1 & OC1_HIT) { - this->actor.flags |= 0x10000; + this->actor.flags |= ACTOR_FLAG_16; func_8002F2F4(&this->actor, globalCtx); } else { - this->actor.flags &= ~0x10000; + this->actor.flags &= ~ACTOR_FLAG_16; CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->collider.base); } this->actor.world.pos.y = Math_SinS(this->unk_194 * 0x800) * 5.0f + this->actor.home.pos.y; diff --git a/src/overlays/actors/ovl_En_Po_Relay/z_en_po_relay.c b/src/overlays/actors/ovl_En_Po_Relay/z_en_po_relay.c index 7fd9c9f941..9cbff5b94a 100644 --- a/src/overlays/actors/ovl_En_Po_Relay/z_en_po_relay.c +++ b/src/overlays/actors/ovl_En_Po_Relay/z_en_po_relay.c @@ -8,7 +8,7 @@ #include "overlays/actors/ovl_En_Honotrap/z_en_honotrap.h" #include "objects/object_tk/object_tk.h" -#define FLAGS 0x00011019 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_4 | ACTOR_FLAG_12 | ACTOR_FLAG_16) void EnPoRelay_Init(Actor* thisx, GlobalContext* globalCtx); void EnPoRelay_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -141,14 +141,14 @@ void EnPoRelay_SetupRace(EnPoRelay* this) { func_80088B34(0); this->hookshotSlotFull = INV_CONTENT(ITEM_HOOKSHOT) != ITEM_NONE; this->unk_19A = Actor_WorldYawTowardPoint(&this->actor, &vec); - this->actor.flags |= 0x8000000; + this->actor.flags |= ACTOR_FLAG_27; Audio_PlayActorSound2(&this->actor, NA_SE_EN_PO_LAUGH); this->actionFunc = EnPoRelay_Race; } void EnPoRelay_SetupEndRace(EnPoRelay* this) { this->actor.world.rot.y = this->actor.home.rot.y + 0xC000; - this->actor.flags &= ~0x08000000; + this->actor.flags &= ~ACTOR_FLAG_27; this->actor.speedXZ = 0.0f; this->actionFunc = EnPoRelay_EndRace; } @@ -161,10 +161,10 @@ void EnPoRelay_CorrectY(EnPoRelay* this) { void EnPoRelay_Idle(EnPoRelay* this, GlobalContext* globalCtx) { Math_ScaledStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 0x100); if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) { - this->actor.flags &= ~0x10000; + this->actor.flags &= ~ACTOR_FLAG_16; this->actionFunc = EnPoRelay_Talk; } else if (this->actor.xzDistToPlayer < 250.0f) { - this->actor.flags |= 0x10000; + this->actor.flags |= ACTOR_FLAG_16; this->actor.textId = this->textId; func_8002F2CC(&this->actor, globalCtx, 250.0f); } diff --git a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c index 77671cc1bf..d6d02a0673 100644 --- a/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c +++ b/src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c @@ -8,7 +8,7 @@ #include "objects/gameplay_keep/gameplay_keep.h" #include "objects/object_po_sisters/object_po_sisters.h" -#define FLAGS 0x00005215 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4 | ACTOR_FLAG_9 | ACTOR_FLAG_12 | ACTOR_FLAG_14) void EnPoSisters_Init(Actor* thisx, GlobalContext* globalCtx); void EnPoSisters_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -200,7 +200,7 @@ void EnPoSisters_Init(Actor* thisx, GlobalContext* globalCtx) { this->unk_198 = 1; this->unk_199 = 32; this->unk_294 = 110.0f; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; if (this->actor.params & 0x1000) { func_80ADA094(this, globalCtx); } else if (this->unk_194 == 0) { @@ -208,7 +208,7 @@ void EnPoSisters_Init(Actor* thisx, GlobalContext* globalCtx) { this->collider.base.ocFlags1 = OC1_ON | OC1_TYPE_PLAYER; func_80AD9AA8(this, globalCtx); } else { - this->actor.flags &= ~0x00004200; + this->actor.flags &= ~(ACTOR_FLAG_9 | ACTOR_FLAG_14); this->collider.info.elemType = ELEMTYPE_UNK4; this->collider.info.bumper.dmgFlags |= 1; this->collider.base.ocFlags1 = OC1_NONE; @@ -376,7 +376,7 @@ void func_80AD99D4(EnPoSisters* this, GlobalContext* globalCtx) { this->actor.speedXZ = 0.0f; this->actor.world.pos.y += 42.0f; this->actor.shape.yOffset = -6000.0f; - this->actor.flags &= -2; + this->actor.flags &= ~ACTOR_FLAG_0; this->unk_199 = 0; this->actionFunc = func_80ADAFC0; OnePointCutscene_Init(globalCtx, 3190, 999, &this->actor, MAIN_CAM); @@ -426,7 +426,7 @@ void func_80AD9C24(EnPoSisters* this, GlobalContext* globalCtx) { Vec3f vec; this->actor.draw = NULL; - this->actor.flags &= -2; + this->actor.flags &= ~ACTOR_FLAG_0; this->unk_19C = 100; this->unk_199 = 32; this->collider.base.colType = COLTYPE_HIT3; @@ -485,7 +485,7 @@ void func_80AD9F1C(EnPoSisters* this) { this->unk_19A = 300; this->unk_19C = 3; this->unk_199 |= 9; - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0; this->actionFunc = func_80ADB770; } @@ -507,7 +507,7 @@ void func_80ADA028(EnPoSisters* this) { Animation_MorphToLoop(&this->skelAnime, &gPoeSistersSwayAnim, -3.0f); this->unk_22E.a = 255; this->unk_199 |= 0x15; - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0; this->actionFunc = func_80ADBBF4; this->actor.speedXZ = 0.0f; } @@ -699,7 +699,7 @@ void func_80ADA9E8(EnPoSisters* this, GlobalContext* globalCtx) { } void func_80ADAAA4(EnPoSisters* this, GlobalContext* globalCtx) { - if (SkelAnime_Update(&this->skelAnime) && !(this->actor.flags & 0x8000)) { + if (SkelAnime_Update(&this->skelAnime) && !(this->actor.flags & ACTOR_FLAG_15)) { if (this->actor.colChkInfo.health != 0) { if (this->unk_194 != 0) { func_80AD96A4(this); @@ -996,7 +996,7 @@ void func_80ADB9F0(EnPoSisters* this, GlobalContext* globalCtx) { if (SkelAnime_Update(&this->skelAnime)) { this->unk_22E.a = 255; if (this->unk_194 == 3) { - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0; this->actor.home.pos.x = 1992.0f; this->actor.home.pos.z = -1440.0f; this->unk_199 |= 0x18; @@ -1212,7 +1212,7 @@ void EnPoSisters_Update(Actor* thisx, GlobalContext* globalCtx) { this->unk_198 = CLAMP_MIN(temp, 1); } if (this->actionFunc == func_80ADA8C0) { - this->actor.flags |= 0x01000000; + this->actor.flags |= ACTOR_FLAG_24; CollisionCheck_SetAT(globalCtx, &globalCtx->colChkCtx, &this->collider.base); } if (this->unk_199 & 1) { diff --git a/src/overlays/actors/ovl_En_Poh/z_en_poh.c b/src/overlays/actors/ovl_En_Poh/z_en_poh.c index 04016acfe6..2b087a1a52 100644 --- a/src/overlays/actors/ovl_En_Poh/z_en_poh.c +++ b/src/overlays/actors/ovl_En_Poh/z_en_poh.c @@ -8,7 +8,7 @@ #include "objects/object_poh/object_poh.h" #include "objects/object_po_composer/object_po_composer.h" -#define FLAGS 0x00001015 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4 | ACTOR_FLAG_12) void EnPoh_Init(Actor* thisx, GlobalContext* globalCtx); void EnPoh_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -315,7 +315,7 @@ void func_80ADE368(EnPoh* this) { void EnPoh_SetupInitialAction(EnPoh* this) { this->lightColor.a = 0; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; if (this->infoIdx == EN_POH_INFO_NORMAL) { Animation_PlayOnceSetSpeed(&this->skelAnime, &gPoeAppearAnim, 0.0f); this->actionFunc = func_80ADEF38; @@ -333,7 +333,7 @@ void func_80ADE48C(EnPoh* this) { this->actor.world.rot.y = this->actor.shape.rot.y; this->unk_198 = 0; this->actor.naviEnemyId = 0xFF; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; this->actionFunc = func_80ADF15C; } @@ -372,7 +372,7 @@ void EnPoh_SetupDeath(EnPoh* this, GlobalContext* globalCtx) { this->actor.draw = EnPoh_DrawSoul; this->actor.shape.shadowDraw = NULL; Actor_SetScale(&this->actor, 0.01f); - this->actor.flags |= 0x10; + this->actor.flags |= ACTOR_FLAG_4; this->actor.gravity = -1.0f; this->actor.shape.yOffset = 1500.0f; this->actor.world.pos.y -= 15.0f; @@ -435,7 +435,7 @@ void EnPoh_Talk(EnPoh* this, GlobalContext* globalCtx) { } this->unk_198 = 200; this->unk_195 = 32; - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0; this->actionFunc = func_80ADFE80; } @@ -578,7 +578,7 @@ void func_80ADEF38(EnPoh* this, GlobalContext* globalCtx) { if (SkelAnime_Update(&this->skelAnime)) { this->lightColor.a = 255; this->visibilityTimer = Rand_S16Offset(700, 300); - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0; EnPoh_SetupIdle(this); } else if (this->skelAnime.curFrame > 10.0f) { this->lightColor.a = ((this->skelAnime.curFrame - 10.0f) * 0.05f) * 255.0f; @@ -593,7 +593,7 @@ void EnPoh_ComposerAppear(EnPoh* this, GlobalContext* globalCtx) { if (SkelAnime_Update(&this->skelAnime)) { this->lightColor.a = 255; this->visibilityTimer = Rand_S16Offset(700, 300); - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0; EnPoh_SetupIdle(this); } else { this->lightColor.a = CLAMP_MAX((s32)(this->skelAnime.curFrame * 25.5f), 255); @@ -775,14 +775,14 @@ void func_80ADFE80(EnPoh* this, GlobalContext* globalCtx) { } if (this->unk_198 == 0) { func_80ADE950(this, 1); - this->actor.flags &= ~0x10000; + this->actor.flags &= ~ACTOR_FLAG_16; return; } if (this->colliderCyl.base.ocFlags1 & OC1_HIT) { - this->actor.flags |= 0x10000; + this->actor.flags |= ACTOR_FLAG_16; func_8002F2F4(&this->actor, globalCtx); } else { - this->actor.flags &= ~0x10000; + this->actor.flags &= ~ACTOR_FLAG_16; CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->colliderCyl.base); } this->actor.world.pos.y = Math_SinS(this->unk_195 * 0x800) * 5.0f + this->actor.home.pos.y; @@ -927,7 +927,7 @@ void EnPoh_Update(Actor* thisx, GlobalContext* globalCtx) { this->colliderCyl.dim.height = 55; this->colliderCyl.dim.yShift = 15; } - this->actor.flags &= ~0x10; + this->actor.flags &= ~ACTOR_FLAG_4; EnPoh_SetupInitialAction(this); } } @@ -999,7 +999,7 @@ void EnPoh_UpdateLiving(Actor* thisx, GlobalContext* globalCtx) { this->actionFunc(this, globalCtx); Actor_MoveForward(&this->actor); if (this->actionFunc == EnPoh_Attack && this->unk_198 < 10) { - this->actor.flags |= 0x1000000; + this->actor.flags |= ACTOR_FLAG_24; CollisionCheck_SetAT(globalCtx, &globalCtx->colChkCtx, &this->colliderSph.base); } Collider_UpdateCylinder(&this->actor, &this->colliderCyl); diff --git a/src/overlays/actors/ovl_En_Pu_box/z_en_pu_box.c b/src/overlays/actors/ovl_En_Pu_box/z_en_pu_box.c index 5383163ba4..1a6e378309 100644 --- a/src/overlays/actors/ovl_En_Pu_box/z_en_pu_box.c +++ b/src/overlays/actors/ovl_En_Pu_box/z_en_pu_box.c @@ -7,7 +7,7 @@ #include "z_en_pu_box.h" #include "objects/object_pu_box/object_pu_box.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 void EnPubox_Init(Actor* thisx, GlobalContext* globalCtx); void EnPubox_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_En_Rd/z_en_rd.c b/src/overlays/actors/ovl_En_Rd/z_en_rd.c index 665903c03e..f02bd3edd9 100644 --- a/src/overlays/actors/ovl_En_Rd/z_en_rd.c +++ b/src/overlays/actors/ovl_En_Rd/z_en_rd.c @@ -1,7 +1,7 @@ #include "z_en_rd.h" #include "objects/object_rd/object_rd.h" -#define FLAGS 0x00000415 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4 | ACTOR_FLAG_10) void EnRd_Init(Actor* thisx, GlobalContext* globalCtx); void EnRd_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -163,7 +163,7 @@ void EnRd_Init(Actor* thisx, GlobalContext* globalCtx) { SkelAnime_Update(&this->skelAnime); if (thisx->params == 3) { - thisx->flags |= 0x80; + thisx->flags |= ACTOR_FLAG_7; } } @@ -346,7 +346,7 @@ void func_80AE2C1C(EnRd* this, GlobalContext* globalCtx) { Actor_IsFacingPlayer(&this->actor, 0x38E3)) { player->actor.freezeTimer = 0; if (globalCtx->grabPlayer(globalCtx, player)) { - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; func_80AE33F0(this); } } else if (this->actor.params > 0) { @@ -530,7 +530,7 @@ void func_80AE3454(EnRd* this, GlobalContext* globalCtx) { Math_SmoothStepToF(&this->actor.shape.yOffset, 0, 1.0f, 400.0f, 0.0f); } this->actor.targetMode = 0; - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0; this->unk_306 = 0xA; this->unk_307 = 0xF; func_80AE2B90(this, globalCtx); @@ -599,7 +599,7 @@ void func_80AE3A8C(EnRd* this) { this->actor.speedXZ = -2.0f; } - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0; Audio_PlayActorSound2(&this->actor, NA_SE_EN_REDEAD_DAMAGE); this->unk_31B = 9; EnRd_SetupAction(this, func_80AE3B18); @@ -634,7 +634,7 @@ void func_80AE3C20(EnRd* this) { Animation_MorphToPlayOnce(&this->skelAnime, &object_rd_Anim_006E88, -1.0f); this->unk_31B = 10; this->unk_30C = 300; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; this->actor.speedXZ = 0.0f; Audio_PlayActorSound2(&this->actor, NA_SE_EN_REDEAD_DEAD); EnRd_SetupAction(this, func_80AE3C98); diff --git a/src/overlays/actors/ovl_En_Reeba/z_en_reeba.c b/src/overlays/actors/ovl_En_Reeba/z_en_reeba.c index 18c5eda86a..dd1c095938 100644 --- a/src/overlays/actors/ovl_En_Reeba/z_en_reeba.c +++ b/src/overlays/actors/ovl_En_Reeba/z_en_reeba.c @@ -10,7 +10,7 @@ #include "vt.h" #include "objects/object_reeba/object_reeba.h" -#define FLAGS 0x08000015 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4 | ACTOR_FLAG_27) void EnReeba_Init(Actor* thisx, GlobalContext* globalCtx); void EnReeba_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -178,7 +178,7 @@ void func_80AE4F40(EnReeba* this, GlobalContext* globalCtx) { this->unk_278 = 20; } - this->actor.flags &= ~0x08000000; + this->actor.flags &= ~ACTOR_FLAG_27; this->actor.world.pos.y = this->actor.floorHeight; if (this->isBig) { @@ -264,7 +264,7 @@ void func_80AE5270(EnReeba* this, GlobalContext* globalCtx) { } void func_80AE538C(EnReeba* this, GlobalContext* globalCtx) { - this->actor.flags |= 5; + this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_2; this->actionfunc = func_80AE53AC; } @@ -326,8 +326,8 @@ void func_80AE561C(EnReeba* this, GlobalContext* globalCtx) { void func_80AE5688(EnReeba* this, GlobalContext* globalCtx) { this->unk_27E = 0; Audio_PlayActorSound2(&this->actor, NA_SE_EN_AKINDONUTS_HIDE); - this->actor.flags |= 0x8000000; - this->actor.flags &= ~5; + this->actor.flags |= ACTOR_FLAG_27; + this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_2); this->actionfunc = func_80AE56E0; } @@ -378,8 +378,8 @@ void func_80AE58EC(EnReeba* this, GlobalContext* globalCtx) { this->unk_278 = 14; this->actor.world.rot.y = this->actor.yawTowardsPlayer; this->actor.speedXZ = -8.0f; - this->actor.flags |= 0x8000000; - this->actor.flags &= ~5; + this->actor.flags |= ACTOR_FLAG_27; + this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_2); this->actionfunc = func_80AE5938; } @@ -446,7 +446,7 @@ void func_80AE5BC4(EnReeba* this, GlobalContext* globalCtx) { this->actor.world.rot.y = this->actor.yawTowardsPlayer; Actor_SetColorFilter(&this->actor, 0x4000, 0xFF, 0, 8); this->unk_278 = 14; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; this->actionfunc = func_80AE5C38; } diff --git a/src/overlays/actors/ovl_En_River_Sound/z_en_river_sound.c b/src/overlays/actors/ovl_En_River_Sound/z_en_river_sound.c index c0927b41ed..4d8dce0848 100644 --- a/src/overlays/actors/ovl_En_River_Sound/z_en_river_sound.c +++ b/src/overlays/actors/ovl_En_River_Sound/z_en_river_sound.c @@ -6,7 +6,7 @@ #include "z_en_river_sound.h" -#define FLAGS 0x00000030 +#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) void EnRiverSound_Init(Actor* thisx, GlobalContext* globalCtx); void EnRiverSound_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_En_Rl/z_en_rl.c b/src/overlays/actors/ovl_En_Rl/z_en_rl.c index e59ba37cab..00f49af727 100644 --- a/src/overlays/actors/ovl_En_Rl/z_en_rl.c +++ b/src/overlays/actors/ovl_En_Rl/z_en_rl.c @@ -8,7 +8,7 @@ #include "vt.h" #include "objects/object_rl/object_rl.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 void EnRl_Init(Actor* thisx, GlobalContext* globalCtx); void EnRl_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_En_Rr/z_en_rr.c b/src/overlays/actors/ovl_En_Rr/z_en_rr.c index a06f431eb1..794c71c9ed 100644 --- a/src/overlays/actors/ovl_En_Rr/z_en_rr.c +++ b/src/overlays/actors/ovl_En_Rr/z_en_rr.c @@ -8,7 +8,7 @@ #include "objects/object_rr/object_rr.h" #include "vt.h" -#define FLAGS 0x00000435 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4 | ACTOR_FLAG_5 | ACTOR_FLAG_10) #define RR_MESSAGE_SHIELD (1 << 0) #define RR_MESSAGE_TUNIC (1 << 1) @@ -252,7 +252,7 @@ void EnRr_SetupGrabPlayer(EnRr* this, Player* player) { s32 i; this->grabTimer = 100; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; this->ocTimer = 8; this->hasPlayer = true; this->reachState = 0; @@ -287,7 +287,7 @@ void EnRr_SetupReleasePlayer(EnRr* this, GlobalContext* globalCtx) { u8 shield; u8 tunic; - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0; this->hasPlayer = false; this->ocTimer = 110; this->segMoveRate = 0.0f; @@ -379,7 +379,7 @@ void EnRr_SetupDeath(EnRr* this) { } this->actionFunc = EnRr_Death; Audio_PlayActorSound2(&this->actor, NA_SE_EN_LIKE_DEAD); - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; } void EnRr_SetupStunned(EnRr* this) { diff --git a/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c b/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c index 9f81904845..babd2bc61b 100644 --- a/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c +++ b/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c @@ -8,7 +8,7 @@ #include "objects/object_ru1/object_ru1.h" #include "vt.h" -#define FLAGS 0x04000011 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_4 | ACTOR_FLAG_26) void EnRu1_Init(Actor* thisx, GlobalContext* globalCtx); void EnRu1_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -1494,7 +1494,7 @@ void func_80AEE050(EnRu1* this) { s32 func_80AEE264(EnRu1* this, GlobalContext* globalCtx) { if (!Actor_ProcessTalkRequest(&this->actor, globalCtx)) { - this->actor.flags |= 9; + this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_3; if ((gSaveContext.infTable[20] & 8)) { this->actor.textId = 0x404E; func_8002F2F4(&this->actor, globalCtx); @@ -1815,7 +1815,7 @@ s32 func_80AEF0BC(EnRu1* this, GlobalContext* globalCtx) { Animation_Change(&this->skelAnime, &gRutoChildSitAnim, 1.0f, 0, frameCount, ANIMMODE_ONCE, -8.0f); globalCtx->msgCtx.msgMode = MSGMODE_PAUSED; this->action = 26; - this->actor.flags &= ~0x9; + this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_3); return true; } return false; @@ -1855,7 +1855,7 @@ void func_80AEF29C(EnRu1* this, GlobalContext* globalCtx) { void func_80AEF2AC(EnRu1* this, GlobalContext* globalCtx) { this->action = 24; this->drawConfig = 1; - this->actor.flags |= 9; + this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_3; } void func_80AEF2D0(EnRu1* this, GlobalContext* globalCtx) { @@ -2012,7 +2012,7 @@ void func_80AEF890(EnRu1* this, GlobalContext* globalCtx) { void func_80AEF930(EnRu1* this, GlobalContext* globalCtx) { if (func_80AEB104(this) == 3) { - this->actor.flags |= 9; + this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_3; this->actor.textId = 0x4048; Message_ContinueTextbox(globalCtx, this->actor.textId); func_80AEF4A8(this, globalCtx); @@ -2098,7 +2098,7 @@ void func_80AEFC54(EnRu1* this, GlobalContext* globalCtx) { this->action = 41; this->unk_28C = EnRu1_FindSwitch(globalCtx); func_80AEB0EC(this, 1); - this->actor.flags &= ~0x9; + this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_3); } else { Actor_Kill(&this->actor); } @@ -2116,7 +2116,7 @@ void func_80AEFCE8(EnRu1* this, GlobalContext* globalCtx) { void func_80AEFD38(EnRu1* this, GlobalContext* globalCtx) { if ((gSaveContext.eventChkInf[3] & 0x80) && LINK_IS_CHILD) { func_80AEB264(this, &gRutoChildWait2Anim, 0, 0, 0); - this->actor.flags &= ~0x10; + this->actor.flags &= ~ACTOR_FLAG_4; this->action = 44; this->drawConfig = 1; } else { @@ -2126,7 +2126,7 @@ void func_80AEFD38(EnRu1* this, GlobalContext* globalCtx) { s32 func_80AEFDC0(EnRu1* this, GlobalContext* globalCtx) { if (!Actor_ProcessTalkRequest(&this->actor, globalCtx)) { - this->actor.flags |= 9; + this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_3; this->actor.textId = Text_GetFaceReaction(globalCtx, 0x1F); if (this->actor.textId == 0) { this->actor.textId = 0x402C; @@ -2139,7 +2139,7 @@ s32 func_80AEFDC0(EnRu1* this, GlobalContext* globalCtx) { s32 func_80AEFE38(EnRu1* this, GlobalContext* globalCtx) { if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_CLOSING) { - this->actor.flags &= ~0x9; + this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_3); return true; } return false; diff --git a/src/overlays/actors/ovl_En_Ru2/z_en_ru2.c b/src/overlays/actors/ovl_En_Ru2/z_en_ru2.c index 2fe7d2772b..db0f0a9e5a 100644 --- a/src/overlays/actors/ovl_En_Ru2/z_en_ru2.c +++ b/src/overlays/actors/ovl_En_Ru2/z_en_ru2.c @@ -9,7 +9,7 @@ #include "overlays/actors/ovl_Door_Warp1/z_door_warp1.h" #include "vt.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 void EnRu2_Init(Actor* thisx, GlobalContext* globalCtx); void EnRu2_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_En_Sa/z_en_sa.c b/src/overlays/actors/ovl_En_Sa/z_en_sa.c index 1c979b63f9..3bf76ec8ba 100644 --- a/src/overlays/actors/ovl_En_Sa/z_en_sa.c +++ b/src/overlays/actors/ovl_En_Sa/z_en_sa.c @@ -4,7 +4,7 @@ #include "scenes/overworld/spot04/spot04_scene.h" #include "scenes/overworld/spot05/spot05_scene.h" -#define FLAGS 0x02000019 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_4 | ACTOR_FLAG_25) void EnSa_Init(Actor* thisx, GlobalContext* globalCtx); void EnSa_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_En_Sb/z_en_sb.c b/src/overlays/actors/ovl_En_Sb/z_en_sb.c index 1623761b54..f3cfa2108a 100644 --- a/src/overlays/actors/ovl_En_Sb/z_en_sb.c +++ b/src/overlays/actors/ovl_En_Sb/z_en_sb.c @@ -8,7 +8,7 @@ #include "vt.h" #include "objects/object_sb/object_sb.h" -#define FLAGS 0x00000005 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2) void EnSb_Init(Actor* thisx, GlobalContext* globalCtx); void EnSb_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_En_Scene_Change/z_en_scene_change.c b/src/overlays/actors/ovl_En_Scene_Change/z_en_scene_change.c index d24aeefe77..6b4f4d2e36 100644 --- a/src/overlays/actors/ovl_En_Scene_Change/z_en_scene_change.c +++ b/src/overlays/actors/ovl_En_Scene_Change/z_en_scene_change.c @@ -6,7 +6,7 @@ #include "z_en_scene_change.h" -#define FLAGS 0x00000000 +#define FLAGS 0 void EnSceneChange_Init(Actor* thisx, GlobalContext* globalCtx); void EnSceneChange_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_En_Sda/z_en_sda.c b/src/overlays/actors/ovl_En_Sda/z_en_sda.c index edf1873646..001c0e0c01 100644 --- a/src/overlays/actors/ovl_En_Sda/z_en_sda.c +++ b/src/overlays/actors/ovl_En_Sda/z_en_sda.c @@ -6,7 +6,7 @@ #include "z_en_sda.h" -#define FLAGS 0x00000030 +#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) void EnSda_Init(Actor* thisx, GlobalContext* globalCtx); void EnSda_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_En_Shopnuts/z_en_shopnuts.c b/src/overlays/actors/ovl_En_Shopnuts/z_en_shopnuts.c index 8370bcc7d1..bd95e75ba0 100644 --- a/src/overlays/actors/ovl_En_Shopnuts/z_en_shopnuts.c +++ b/src/overlays/actors/ovl_En_Shopnuts/z_en_shopnuts.c @@ -1,7 +1,7 @@ #include "z_en_shopnuts.h" #include "objects/object_shopnuts/object_shopnuts.h" -#define FLAGS 0x00000005 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2) void EnShopnuts_Init(Actor* thisx, GlobalContext* globalCtx); void EnShopnuts_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_En_Si/z_en_si.c b/src/overlays/actors/ovl_En_Si/z_en_si.c index ccb3eee0b1..b6747bb7e6 100644 --- a/src/overlays/actors/ovl_En_Si/z_en_si.c +++ b/src/overlays/actors/ovl_En_Si/z_en_si.c @@ -6,7 +6,7 @@ #include "z_en_si.h" -#define FLAGS 0x00000201 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_9) void EnSi_Init(Actor* thisx, GlobalContext* globalCtx); void EnSi_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -80,7 +80,7 @@ s32 func_80AFB748(EnSi* this, GlobalContext* globalCtx) { void func_80AFB768(EnSi* this, GlobalContext* globalCtx) { Player* player = GET_PLAYER(globalCtx); - if ((this->actor.flags & 0x2000) == 0x2000) { + if (CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_13)) { this->actionFunc = func_80AFB89C; } else { Math_SmoothStepToF(&this->actor.scale.x, 0.25f, 0.4f, 1.0f, 0.0f); @@ -113,7 +113,7 @@ void func_80AFB89C(EnSi* this, GlobalContext* globalCtx) { Actor_SetScale(&this->actor, this->actor.scale.x); this->actor.shape.rot.y += 0x400; - if ((this->actor.flags & 0x2000) != 0x2000) { + if (!CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_13)) { Item_Give(globalCtx, ITEM_SKULL_TOKEN); player->actor.freezeTimer = 10; Message_StartTextbox(globalCtx, 0xB4, NULL); diff --git a/src/overlays/actors/ovl_En_Siofuki/z_en_siofuki.c b/src/overlays/actors/ovl_En_Siofuki/z_en_siofuki.c index 1d06ccbbf5..81a9519dc3 100644 --- a/src/overlays/actors/ovl_En_Siofuki/z_en_siofuki.c +++ b/src/overlays/actors/ovl_En_Siofuki/z_en_siofuki.c @@ -7,7 +7,7 @@ #include "z_en_siofuki.h" #include "objects/object_siofuki/object_siofuki.h" -#define FLAGS 0x00000030 +#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) void EnSiofuki_Init(Actor* thisx, GlobalContext* globalCtx); void EnSiofuki_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_En_Skb/z_en_skb.c b/src/overlays/actors/ovl_En_Skb/z_en_skb.c index 2162f13022..e7d91fc944 100644 --- a/src/overlays/actors/ovl_En_Skb/z_en_skb.c +++ b/src/overlays/actors/ovl_En_Skb/z_en_skb.c @@ -2,7 +2,7 @@ #include "overlays/actors/ovl_En_Encount1/z_en_encount1.h" #include "objects/object_skb/object_skb.h" -#define FLAGS 0x00000015 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4) void EnSkb_Init(Actor* thisx, GlobalContext* globalCtx); void EnSkb_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -201,7 +201,7 @@ void func_80AFCD60(EnSkb* this) { void func_80AFCDF8(EnSkb* this) { Animation_PlayOnceSetSpeed(&this->skelAnime, &gStalchildUncurlingAnim, 1.0f); this->unk_280 = 0; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; Audio_PlayActorSound2(&this->actor, NA_SE_EN_RIVA_APPEAR); EnSkb_SetupAction(this, func_80AFCE5C); } @@ -211,7 +211,7 @@ void func_80AFCE5C(EnSkb* this, GlobalContext* globalCtx) { this->actor.world.rot.y = this->actor.yawTowardsPlayer; this->actor.shape.rot.y = this->actor.yawTowardsPlayer; } else { - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0; } Math_SmoothStepToF(&this->actor.shape.yOffset, 0.0f, 1.0f, 800.0f, 0.0f); Math_SmoothStepToF(&this->actor.shape.shadowScale, 25.0f, 1.0f, 2.5f, 0.0f); @@ -228,7 +228,7 @@ void func_80AFCF48(EnSkb* this) { Animation_GetLastFrame(&gStalchildUncurlingAnim), 0.0f, ANIMMODE_ONCE, -4.0f); this->unk_280 = 0; this->unk_281 = 0; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; this->actor.speedXZ = 0.0f; Audio_PlayActorSound2(&this->actor, NA_SE_EN_AKINDONUTS_HIDE); EnSkb_SetupAction(this, func_80AFCFF0); @@ -407,7 +407,7 @@ void func_80AFD7B4(EnSkb* this, GlobalContext* globalCtx) { this->actor.speedXZ = -6.0f; } this->unk_280 = 1; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; BodyBreak_Alloc(&this->bodyBreak, 18, globalCtx); this->unk_283 |= 4; EffectSsDeadSound_SpawnStationary(globalCtx, &this->actor.projectedPos, NA_SE_EN_STALKID_DEAD, 1, 1, 0x28); diff --git a/src/overlays/actors/ovl_En_Skj/z_en_skj.c b/src/overlays/actors/ovl_En_Skj/z_en_skj.c index 2fc48863af..d234efb441 100644 --- a/src/overlays/actors/ovl_En_Skj/z_en_skj.c +++ b/src/overlays/actors/ovl_En_Skj/z_en_skj.c @@ -2,7 +2,7 @@ #include "overlays/actors/ovl_En_Skjneedle/z_en_skjneedle.h" #include "objects/object_skj/object_skj.h" -#define FLAGS 0x02000015 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4 | ACTOR_FLAG_25) void EnSkj_Init(Actor* thisx, GlobalContext* globalCtx); void EnSkj_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -289,7 +289,7 @@ static InitChainEntry sInitChain[] = { ICHAIN_F32(targetArrowOffset, 30, ICHAIN_STOP), }; -static s32 D_80B01EA0; // gets set if actor flags & 0x100 is set +static s32 D_80B01EA0; // gets set if ACTOR_FLAG_8 is set void EnSkj_ChangeAnim(EnSkj* this, u8 animIndex) { f32 endFrame = Animation_GetLastFrame(sSkullKidAnimations[animIndex].animation); @@ -381,7 +381,7 @@ void EnSkj_Init(Actor* thisx, GlobalContext* globalCtx2) { this->actor.destroy = NULL; this->actor.draw = NULL; this->actor.update = EnSkj_SariasSongShortStumpUpdate; - this->actor.flags &= ~5; + this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_2); this->actor.flags |= 0; Actor_ChangeCategory(globalCtx, &globalCtx->actorCtx, thisx, ACTORCAT_PROP); break; @@ -392,7 +392,7 @@ void EnSkj_Init(Actor* thisx, GlobalContext* globalCtx2) { this->actor.destroy = NULL; this->actor.draw = NULL; this->actor.update = EnSkj_OcarinaMinigameShortStumpUpdate; - this->actor.flags &= ~5; + this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_2); this->actor.flags |= 0; Actor_ChangeCategory(globalCtx, &globalCtx->actorCtx, thisx, ACTORCAT_PROP); this->actor.focus.pos.x = 1230.0f; @@ -414,13 +414,13 @@ void EnSkj_Init(Actor* thisx, GlobalContext* globalCtx2) { SkelAnime_InitFlex(globalCtx, &this->skelAnime, &gSkullKidSkel, &gSkullKidPlayFluteAnim, this->jointTable, this->morphTable, 19); if ((type >= 0) && (type < 3)) { - this->actor.flags &= ~5; - this->actor.flags |= 9; + this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_2); + this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_3; Actor_ChangeCategory(globalCtx, &globalCtx->actorCtx, &this->actor, ACTORCAT_NPC); } if ((type < 0) || (type >= 7)) { - this->actor.flags &= ~0x02000000; + this->actor.flags &= ~ACTOR_FLAG_25; } if ((type > 0) && (type < 3)) { @@ -1213,14 +1213,14 @@ void EnSkj_SariasSongWaitForTextClear(EnSkj* this, GlobalContext* globalCtx) { } void EnSkj_OcarinaGameSetupWaitForPlayer(EnSkj* this) { - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; EnSkj_ChangeAnim(this, SKJ_ANIM_WAIT); EnSkj_SetupAction(this, SKJ_ACTION_OCARINA_GAME_WAIT_FOR_PLAYER); } void EnSkj_OcarinaGameWaitForPlayer(EnSkj* this, GlobalContext* globalCtx) { if (this->playerInRange) { - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0; EnSkj_SetupAction(this, SKJ_ACTION_OCARINA_GAME_IDLE); } } diff --git a/src/overlays/actors/ovl_En_Skjneedle/z_en_skjneedle.c b/src/overlays/actors/ovl_En_Skjneedle/z_en_skjneedle.c index 632425769c..4118b847dd 100644 --- a/src/overlays/actors/ovl_En_Skjneedle/z_en_skjneedle.c +++ b/src/overlays/actors/ovl_En_Skjneedle/z_en_skjneedle.c @@ -7,7 +7,7 @@ #include "z_en_skjneedle.h" #include "objects/object_skj/object_skj.h" -#define FLAGS 0x00000205 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_9) void EnSkjneedle_Init(Actor* thisx, GlobalContext* globalCtx); void EnSkjneedle_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -59,7 +59,7 @@ void EnSkjneedle_Init(Actor* thisx, GlobalContext* globalCtx) { Collider_InitCylinder(globalCtx, &this->collider); Collider_SetCylinderType1(globalCtx, &this->collider, &this->actor, &sCylinderInit); ActorShape_Init(&this->actor.shape, 0, ActorShadow_DrawCircle, 20.0f); - thisx->flags &= ~0x1; + thisx->flags &= ~ACTOR_FLAG_0; Actor_SetScale(&this->actor, 0.01f); } diff --git a/src/overlays/actors/ovl_En_Ssh/z_en_ssh.c b/src/overlays/actors/ovl_En_Ssh/z_en_ssh.c index 586ea36481..12c53a2995 100644 --- a/src/overlays/actors/ovl_En_Ssh/z_en_ssh.c +++ b/src/overlays/actors/ovl_En_Ssh/z_en_ssh.c @@ -1,7 +1,7 @@ #include "z_en_ssh.h" #include "objects/object_ssh/object_ssh.h" -#define FLAGS 0x00000035 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4 | ACTOR_FLAG_5) #define SSH_STATE_STUNNED (1 << 0) #define SSH_STATE_GROUND_START (1 << 2) diff --git a/src/overlays/actors/ovl_En_St/z_en_st.c b/src/overlays/actors/ovl_En_St/z_en_st.c index 956ba95853..ad18aa205a 100644 --- a/src/overlays/actors/ovl_En_St/z_en_st.c +++ b/src/overlays/actors/ovl_En_St/z_en_st.c @@ -7,7 +7,7 @@ #include "z_en_st.h" #include "objects/object_st/object_st.h" -#define FLAGS 0x00000035 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4 | ACTOR_FLAG_5) void EnSt_Init(Actor* thisx, GlobalContext* globalCtx); void EnSt_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -448,7 +448,7 @@ s32 EnSt_CheckHitBackside(EnSt* this, GlobalContext* globalCtx) { return false; } Enemy_StartFinishingBlow(globalCtx, &this->actor); - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; this->groundBounces = 3; this->deathTimer = 20; this->actor.gravity = -1.0f; @@ -773,7 +773,7 @@ void EnSt_Init(Actor* thisx, GlobalContext* globalCtx) { this->blureIdx = EnSt_CreateBlureEffect(globalCtx); EnSt_InitColliders(this, globalCtx); if (thisx->params == 2) { - this->actor.flags |= 0x80; + this->actor.flags |= ACTOR_FLAG_7; } if (this->actor.params == 1) { this->actor.naviEnemyId = 0x05; @@ -781,8 +781,8 @@ void EnSt_Init(Actor* thisx, GlobalContext* globalCtx) { this->actor.naviEnemyId = 0x04; } EnSt_CheckCeilingPos(this, globalCtx); - this->actor.flags |= 0x4000; - this->actor.flags |= 0x1000000; + this->actor.flags |= ACTOR_FLAG_14; + this->actor.flags |= ACTOR_FLAG_24; EnSt_SetColliderScale(this); this->actor.gravity = 0.0f; this->initalYaw = this->actor.world.rot.y; @@ -996,7 +996,7 @@ void EnSt_Update(Actor* thisx, GlobalContext* globalCtx) { s32 pad; Color_RGBA8 color = { 0, 0, 0, 0 }; - if (this->actor.flags & 0x8000) { + if (this->actor.flags & ACTOR_FLAG_15) { SkelAnime_Update(&this->skelAnime); } else if (!EnSt_CheckColliders(this, globalCtx)) { // no collision has been detected. diff --git a/src/overlays/actors/ovl_En_Sth/z_en_sth.c b/src/overlays/actors/ovl_En_Sth/z_en_sth.c index 2b98b59821..6c94388425 100644 --- a/src/overlays/actors/ovl_En_Sth/z_en_sth.c +++ b/src/overlays/actors/ovl_En_Sth/z_en_sth.c @@ -9,7 +9,7 @@ #include "objects/object_ahg/object_ahg.h" #include "objects/object_boj/object_boj.h" -#define FLAGS 0x00000019 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_4) void EnSth_Init(Actor* thisx, GlobalContext* globalCtx); void EnSth_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_En_Stream/z_en_stream.c b/src/overlays/actors/ovl_En_Stream/z_en_stream.c index 563ff29217..71a5a9e437 100644 --- a/src/overlays/actors/ovl_En_Stream/z_en_stream.c +++ b/src/overlays/actors/ovl_En_Stream/z_en_stream.c @@ -7,7 +7,7 @@ #include "z_en_stream.h" #include "objects/object_stream/object_stream.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 void EnStream_Init(Actor* thisx, GlobalContext* globalCtx); void EnStream_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_En_Sw/z_en_sw.c b/src/overlays/actors/ovl_En_Sw/z_en_sw.c index 237bf3e407..e181ed5feb 100644 --- a/src/overlays/actors/ovl_En_Sw/z_en_sw.c +++ b/src/overlays/actors/ovl_En_Sw/z_en_sw.c @@ -1,7 +1,7 @@ #include "z_en_sw.h" #include "objects/object_st/object_st.h" -#define FLAGS 0x00000015 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4) void EnSw_Init(Actor* thisx, GlobalContext* globalCtx); void EnSw_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -275,7 +275,7 @@ void EnSw_Init(Actor* thisx, GlobalContext* globalCtx) { this->collider.elements[0].info.toucher.damage *= 2; this->actor.naviEnemyId = 0x20; this->actor.colChkInfo.health *= 2; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; break; default: Actor_ChangeCategory(globalCtx, &globalCtx->actorCtx, &this->actor, ACTORCAT_ENEMY); @@ -342,7 +342,7 @@ s32 func_80B0C9F0(EnSw* this, GlobalContext* globalCtx) { this->unk_38A = 2; this->actor.shape.shadowScale = 16.0f; this->actor.gravity = -1.0f; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; this->actionFunc = func_80B0DB00; } diff --git a/src/overlays/actors/ovl_En_Syateki_Itm/z_en_syateki_itm.c b/src/overlays/actors/ovl_En_Syateki_Itm/z_en_syateki_itm.c index dd13f98c91..fc55ac2df8 100644 --- a/src/overlays/actors/ovl_En_Syateki_Itm/z_en_syateki_itm.c +++ b/src/overlays/actors/ovl_En_Syateki_Itm/z_en_syateki_itm.c @@ -4,7 +4,7 @@ #include "overlays/actors/ovl_En_Ex_Ruppy/z_en_ex_ruppy.h" #include "overlays/actors/ovl_En_G_Switch/z_en_g_switch.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 typedef enum { SYATEKI_ROUND_GREEN_APPEAR, diff --git a/src/overlays/actors/ovl_En_Syateki_Man/z_en_syateki_man.c b/src/overlays/actors/ovl_En_Syateki_Man/z_en_syateki_man.c index 01d43594ea..b2f6c36e29 100644 --- a/src/overlays/actors/ovl_En_Syateki_Man/z_en_syateki_man.c +++ b/src/overlays/actors/ovl_En_Syateki_Man/z_en_syateki_man.c @@ -3,7 +3,7 @@ #include "overlays/actors/ovl_En_Syateki_Itm/z_en_syateki_itm.h" #include "objects/object_ossan/object_ossan.h" -#define FLAGS 0x08000019 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_4 | ACTOR_FLAG_27) typedef enum { /* 0 */ SYATEKI_RESULT_NONE, @@ -410,7 +410,7 @@ void EnSyatekiMan_FinishPrize(EnSyatekiMan* this, GlobalContext* globalCtx) { } this->gameResult = SYATEKI_RESULT_NONE; this->actor.parent = this->tempGallery; - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0; this->actionFunc = EnSyatekiMan_SetupIdle; } } diff --git a/src/overlays/actors/ovl_En_Syateki_Niw/z_en_syateki_niw.c b/src/overlays/actors/ovl_En_Syateki_Niw/z_en_syateki_niw.c index fa3b3421b1..397083bbaf 100644 --- a/src/overlays/actors/ovl_En_Syateki_Niw/z_en_syateki_niw.c +++ b/src/overlays/actors/ovl_En_Syateki_Niw/z_en_syateki_niw.c @@ -8,7 +8,7 @@ #include "objects/object_niw/object_niw.h" #include "vt.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 void EnSyatekiNiw_Init(Actor* thisx, GlobalContext* globalCtx); void EnSyatekiNiw_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -68,7 +68,7 @@ void EnSyatekiNiw_Init(Actor* thisx, GlobalContext* globalCtx) { EnSyatekiNiw* this = (EnSyatekiNiw*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 25.0f); SkelAnime_InitFlex(globalCtx, &this->skelAnime, &gCuccoSkel, &gCuccoAnim, this->jointTable, this->morphTable, 16); diff --git a/src/overlays/actors/ovl_En_Ta/z_en_ta.c b/src/overlays/actors/ovl_En_Ta/z_en_ta.c index dd270142b4..f2f6bb717f 100644 --- a/src/overlays/actors/ovl_En_Ta/z_en_ta.c +++ b/src/overlays/actors/ovl_En_Ta/z_en_ta.c @@ -8,7 +8,7 @@ #include "vt.h" #include "objects/object_ta/object_ta.h" -#define FLAGS 0x00000009 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3) void EnTa_Init(Actor* thisx, GlobalContext* globalCtx); void EnTa_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -180,7 +180,7 @@ void EnTa_Init(Actor* thisx, GlobalContext* globalCtx2) { Actor_Kill(&this->actor); } else { if (IS_DAY) { - this->actor.flags |= 0x10; + this->actor.flags |= ACTOR_FLAG_4; this->unk_2C4[0] = this->unk_2C4[1] = this->unk_2C4[2] = 7; this->superCuccos[0] = (EnNiw*)Actor_Spawn( &globalCtx->actorCtx, globalCtx, ACTOR_EN_NIW, this->actor.world.pos.x + 5.0f, @@ -453,7 +453,7 @@ void func_80B14AF4(EnTa* this, GlobalContext* globalCtx) { Audio_PlayActorSound2(&this->actor, NA_SE_VO_TA_CRY_1); func_80B13AA0(this, func_80B14A54, func_80B167C0); this->unk_2CC = 65; - this->actor.flags |= 0x10; + this->actor.flags |= ACTOR_FLAG_4; } } @@ -616,7 +616,7 @@ void func_80B15100(EnTa* this, GlobalContext* globalCtx) { void func_80B15260(EnTa* this, GlobalContext* globalCtx) { if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) { this->actionFunc = func_80B15100; - this->actor.flags &= ~0x10000; + this->actor.flags &= ~ACTOR_FLAG_16; } else { func_8002F2CC(&this->actor, globalCtx, 1000.0f); } @@ -723,7 +723,7 @@ void func_80B154FC(EnTa* this, GlobalContext* globalCtx) { break; } this->actionFunc = func_80B15260; - this->actor.flags |= 0x10000; + this->actor.flags |= ACTOR_FLAG_16; func_8002F2CC(&this->actor, globalCtx, 1000.0f); return; } @@ -1045,9 +1045,9 @@ void func_80B16608(EnTa* this, GlobalContext* globalCtx) { this->actionFunc = func_80B1642C; break; } - this->actor.flags &= ~0x10000; + this->actor.flags &= ~ACTOR_FLAG_16; } else { - this->actor.flags |= 0x10000; + this->actor.flags |= ACTOR_FLAG_16; func_8002F2CC(&this->actor, globalCtx, 1000.0f); } this->unk_2E0 |= 1; diff --git a/src/overlays/actors/ovl_En_Takara_Man/z_en_takara_man.c b/src/overlays/actors/ovl_En_Takara_Man/z_en_takara_man.c index 9ef47064a2..be89bc67f1 100644 --- a/src/overlays/actors/ovl_En_Takara_Man/z_en_takara_man.c +++ b/src/overlays/actors/ovl_En_Takara_Man/z_en_takara_man.c @@ -8,7 +8,7 @@ #include "vt.h" #include "objects/object_ts/object_ts.h" -#define FLAGS 0x08000039 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_4 | ACTOR_FLAG_5 | ACTOR_FLAG_27) void EnTakaraMan_Init(Actor* thisx, GlobalContext* globalCtx); void EnTakaraMan_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -113,11 +113,11 @@ void func_80B1778C(EnTakaraMan* this, GlobalContext* globalCtx) { absYawDiff = ABS(yawDiff); if (absYawDiff < 0x4300) { if (globalCtx->roomCtx.curRoom.num != this->originalRoomNum) { - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; this->unk_218 = 0; } else { if (!this->unk_218) { - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0; this->unk_218 = 1; } func_8002F2CC(&this->actor, globalCtx, 100.0f); diff --git a/src/overlays/actors/ovl_En_Tana/z_en_tana.c b/src/overlays/actors/ovl_En_Tana/z_en_tana.c index 4f057e96d4..6aa6488e29 100644 --- a/src/overlays/actors/ovl_En_Tana/z_en_tana.c +++ b/src/overlays/actors/ovl_En_Tana/z_en_tana.c @@ -7,7 +7,7 @@ #include "z_en_tana.h" #include "objects/object_shop_dungen/object_shop_dungen.h" -#define FLAGS 0x00000009 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3) void EnTana_Init(Actor* thisx, GlobalContext* globalCtx); void EnTana_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -58,7 +58,7 @@ void EnTana_Init(Actor* thisx, GlobalContext* globalCtx) { osSyncPrintf("☆☆☆ %s ☆☆☆\n", sShelfTypes[thisx->params]); Actor_SetScale(thisx, 1.0f); - thisx->flags &= ~1; + thisx->flags &= ~ACTOR_FLAG_0; thisx->draw = sDrawFuncs[thisx->params]; } diff --git a/src/overlays/actors/ovl_En_Test/z_en_test.c b/src/overlays/actors/ovl_En_Test/z_en_test.c index 4f844301ef..f5966372e5 100644 --- a/src/overlays/actors/ovl_En_Test/z_en_test.c +++ b/src/overlays/actors/ovl_En_Test/z_en_test.c @@ -7,7 +7,7 @@ #include "z_en_test.h" #include "objects/object_sk2/object_sk2.h" -#define FLAGS 0x00000015 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4) void EnTest_Init(Actor* thisx, GlobalContext* globalCtx); void EnTest_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -304,7 +304,7 @@ void EnTest_Init(Actor* thisx, GlobalContext* globalCtx) { } if (this->actor.params == STALFOS_TYPE_INVISIBLE) { - this->actor.flags |= 0x80; + this->actor.flags |= ACTOR_FLAG_7; } } @@ -427,7 +427,7 @@ void EnTest_SetupWaitGround(EnTest* this) { this->timer = 15; this->actor.scale.y = 0.0f; this->actor.world.pos.y = this->actor.home.pos.y - 3.5f; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; EnTest_SetupAction(this, EnTest_WaitGround); } @@ -457,7 +457,7 @@ void EnTest_SetupWaitAbove(EnTest* this) { this->unk_7C8 = 0; this->actor.world.pos.y = this->actor.home.pos.y + 150.0f; Actor_SetScale(&this->actor, 0.0f); - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; EnTest_SetupAction(this, EnTest_WaitAbove); } @@ -467,7 +467,7 @@ void EnTest_WaitAbove(EnTest* this, GlobalContext* globalCtx) { if ((this->actor.xzDistToPlayer < 200.0f) && (ABS(this->actor.yDistToPlayer) < 450.0f)) { EnTest_SetupAction(this, EnTest_Fall); - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0; this->actor.shape.rot.y = this->actor.world.rot.y = this->actor.yawTowardsPlayer; Actor_SetScale(&this->actor, 0.015f); } @@ -1065,7 +1065,7 @@ void EnTest_JumpBack(EnTest* this, GlobalContext* globalCtx) { this->timer = (Rand_ZeroOne() * 5.0f) + 5.0f; } } - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0; } } else if (this->skelAnime.curFrame == (this->skelAnime.endFrame - 4.0f)) { Audio_PlayActorSound2(&this->actor, NA_SE_EN_DODO_M_GND); @@ -1484,7 +1484,7 @@ void func_80862DBC(EnTest* this, GlobalContext* globalCtx) { this->swordState = -1; } - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; if (this->actor.params == STALFOS_TYPE_5) { Actor_ChangeCategory(globalCtx, &globalCtx->actorCtx, &this->actor, ACTORCAT_PROP); @@ -1513,7 +1513,7 @@ void func_80862E6C(EnTest* this, GlobalContext* globalCtx) { } this->actor.child = NULL; - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0; EnTest_SetupJumpBack(this); } else if ((this->actor.params == STALFOS_TYPE_5) && !Actor_FindNearby(globalCtx, &this->actor, ACTOR_EN_TEST, ACTORCAT_ENEMY, 8000.0f)) { @@ -1532,7 +1532,7 @@ void func_80862FA8(EnTest* this, GlobalContext* globalCtx) { Animation_PlayOnce(&this->skelAnime, &gStalfosFallOverBackwardsAnim); Audio_PlayActorSound2(&this->actor, NA_SE_EN_STAL_DEAD); this->unk_7DE = 0; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; this->actor.colorFilterTimer = 0; this->actor.speedXZ = 0.0f; @@ -1566,7 +1566,7 @@ void func_808630F0(EnTest* this, GlobalContext* globalCtx) { this->actor.speedXZ = 0.0f; if (this->actor.params <= STALFOS_TYPE_CEILING) { - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; EnTest_SetupAction(this, func_8086318C); } else { func_80862DBC(this, globalCtx); @@ -1804,10 +1804,10 @@ void EnTest_Update(Actor* thisx, GlobalContext* globalCtx) { if (this->actor.params == STALFOS_TYPE_INVISIBLE) { if (globalCtx->actorCtx.unk_03 != 0) { - this->actor.flags |= 0x81; + this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_7; this->actor.shape.shadowDraw = ActorShadow_DrawFeet; } else { - this->actor.flags &= ~0x81; + this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_7); this->actor.shape.shadowDraw = NULL; } } @@ -1831,7 +1831,7 @@ s32 EnTest_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_test.c", 3587); } - if ((this->actor.params == STALFOS_TYPE_INVISIBLE) && ((this->actor.flags & 0x80) != 0x80)) { + if ((this->actor.params == STALFOS_TYPE_INVISIBLE) && !CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_7)) { *dList = NULL; } diff --git a/src/overlays/actors/ovl_En_Tg/z_en_tg.c b/src/overlays/actors/ovl_En_Tg/z_en_tg.c index 3b4471d791..8f5763d046 100644 --- a/src/overlays/actors/ovl_En_Tg/z_en_tg.c +++ b/src/overlays/actors/ovl_En_Tg/z_en_tg.c @@ -7,7 +7,7 @@ #include "z_en_tg.h" #include "objects/object_mu/object_mu.h" -#define FLAGS 0x00000009 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3) void EnTg_Init(Actor* thisx, GlobalContext* globalCtx); void EnTg_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_En_Tite/z_en_tite.c b/src/overlays/actors/ovl_En_Tite/z_en_tite.c index a1b8f4d8f1..99eac97651 100644 --- a/src/overlays/actors/ovl_En_Tite/z_en_tite.c +++ b/src/overlays/actors/ovl_En_Tite/z_en_tite.c @@ -10,7 +10,7 @@ #include "vt.h" #include "objects/object_tite/object_tite.h" -#define FLAGS 0x00000015 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4) // EnTite_Idle #define vIdleTimer actionVar1 @@ -288,7 +288,7 @@ void EnTite_Attack(EnTite* this, GlobalContext* globalCtx) { case TEKTITE_MID_LUNGE: // Continue trajectory until tektite has negative velocity and has landed on ground/water surface // Snap to ground/water surface, or if falling fast dip into the water and slow fall speed - this->actor.flags |= 0x1000000; + this->actor.flags |= ACTOR_FLAG_24; if ((this->actor.bgCheckFlags & 3) || ((this->actor.params == TEKTITE_BLUE) && (this->actor.bgCheckFlags & 0x20))) { if (this->actor.velocity.y <= 0.0f) { @@ -363,7 +363,7 @@ void EnTite_Attack(EnTite* this, GlobalContext* globalCtx) { func_800355B8(globalCtx, &this->backLeftFootPos); } } - if (!(this->collider.base.atFlags & AT_HIT) && (this->actor.flags & 0x40)) { + if (!(this->collider.base.atFlags & AT_HIT) && (this->actor.flags & ACTOR_FLAG_6)) { CollisionCheck_SetAT(globalCtx, &globalCtx->colChkCtx, &this->collider.base); } else { Player* player = GET_PLAYER(globalCtx); @@ -566,7 +566,7 @@ void EnTite_MoveTowardPlayer(EnTite* this, GlobalContext* globalCtx) { } else { this->actor.velocity.y = 10.0f; this->actor.speedXZ = 4.0f; - this->actor.flags |= 0x1000000; + this->actor.flags |= ACTOR_FLAG_24; this->actor.gravity = -1.0f; if ((this->actor.params == TEKTITE_BLUE) && (this->actor.bgCheckFlags & 0x20)) { Audio_PlayActorSound2(&this->actor, NA_SE_EN_TEKU_JUMP_WATER); @@ -577,7 +577,7 @@ void EnTite_MoveTowardPlayer(EnTite* this, GlobalContext* globalCtx) { } else { this->actor.velocity.y = 10.0f; this->actor.speedXZ = 4.0f; - this->actor.flags |= 0x1000000; + this->actor.flags |= ACTOR_FLAG_24; this->actor.gravity = -1.0f; if ((this->actor.params == TEKTITE_BLUE) && (this->actor.bgCheckFlags & 0x20)) { Audio_PlayActorSound2(&this->actor, NA_SE_EN_TEKU_JUMP_WATER); @@ -588,7 +588,7 @@ void EnTite_MoveTowardPlayer(EnTite* this, GlobalContext* globalCtx) { // If in midair: } else { // Turn slowly toward player - this->actor.flags |= 0x1000000; + this->actor.flags |= ACTOR_FLAG_24; Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 1, 1000, 0); if (this->actor.velocity.y >= 6.0f) { if (this->actor.bgCheckFlags & 1) { diff --git a/src/overlays/actors/ovl_En_Tk/z_en_tk.c b/src/overlays/actors/ovl_En_Tk/z_en_tk.c index ecc3aee71e..c7e74d1428 100644 --- a/src/overlays/actors/ovl_En_Tk/z_en_tk.c +++ b/src/overlays/actors/ovl_En_Tk/z_en_tk.c @@ -8,7 +8,7 @@ #include "objects/gameplay_keep/gameplay_keep.h" #include "objects/object_tk/object_tk.h" -#define FLAGS 0x00000009 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3) void EnTk_Init(Actor* thisx, GlobalContext* globalCtx); void EnTk_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_En_Torch/z_en_torch.c b/src/overlays/actors/ovl_En_Torch/z_en_torch.c index 11f51ee9a3..8b64418afc 100644 --- a/src/overlays/actors/ovl_En_Torch/z_en_torch.c +++ b/src/overlays/actors/ovl_En_Torch/z_en_torch.c @@ -6,7 +6,7 @@ #include "z_en_torch.h" -#define FLAGS 0x00000000 +#define FLAGS 0 void EnTorch_Init(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_En_Torch2/z_en_torch2.c b/src/overlays/actors/ovl_En_Torch2/z_en_torch2.c index d20571e9b9..75ca816442 100644 --- a/src/overlays/actors/ovl_En_Torch2/z_en_torch2.c +++ b/src/overlays/actors/ovl_En_Torch2/z_en_torch2.c @@ -7,7 +7,7 @@ #include "z_en_torch2.h" #include "objects/object_torch2/object_torch2.h" -#define FLAGS 0x00000035 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4 | ACTOR_FLAG_5) typedef enum { /* 0 */ ENTORCH2_WAIT, @@ -362,7 +362,7 @@ void EnTorch2_Update(Actor* thisx, GlobalContext* globalCtx2) { player->skelAnime.curFrame = 3.0f; sStickAngle = this->actor.yawTowardsPlayer + 0x8000; sSwordJumpTimer = sSwordJumpState = 0; - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0; } else if (sSwordJumpState == 1) { if (sSwordJumpTimer < 16) { EnTorch2_SwingSword(globalCtx, input, this); @@ -393,7 +393,7 @@ void EnTorch2_Update(Actor* thisx, GlobalContext* globalCtx2) { sStickTilt = 0.0f; sSwordJumpState = 1; player->stateFlags3 |= 4; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; sSwordJumpTimer = 27; player->swordState = 0; player->linearVelocity = 0.0f; @@ -512,7 +512,7 @@ void EnTorch2_Update(Actor* thisx, GlobalContext* globalCtx2) { input->cur.stick_x = input->cur.stick_y = 0; if ((this->invincibilityTimer > 0) && (this->actor.world.pos.y < (this->actor.floorHeight - 160.0f))) { this->stateFlags3 &= ~1; - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0; this->invincibilityTimer = 0; this->actor.velocity.y = 0.0f; this->actor.world.pos.y = sSpawnPoint.y + 40.0f; @@ -596,7 +596,7 @@ void EnTorch2_Update(Actor* thisx, GlobalContext* globalCtx2) { if (!Actor_ApplyDamage(&this->actor)) { func_800F5B58(); - this->actor.flags &= ~5; + this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_2); this->unk_8A1 = 2; this->unk_8A4 = 6.0f; this->unk_8A8 = 6.0f; @@ -616,7 +616,7 @@ void EnTorch2_Update(Actor* thisx, GlobalContext* globalCtx2) { Actor_SetColorFilter(&this->actor, 0, 0xFF, 0x2000, 0x50); } } else { - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; this->unk_8A0 = this->actor.colChkInfo.damage; this->unk_8A1 = 1; this->unk_8A8 = 6.0f; diff --git a/src/overlays/actors/ovl_En_Toryo/z_en_toryo.c b/src/overlays/actors/ovl_En_Toryo/z_en_toryo.c index de8cff00fd..440b3240c1 100644 --- a/src/overlays/actors/ovl_En_Toryo/z_en_toryo.c +++ b/src/overlays/actors/ovl_En_Toryo/z_en_toryo.c @@ -7,7 +7,7 @@ #include "z_en_toryo.h" #include "objects/object_toryo/object_toryo.h" -#define FLAGS 0x00000009 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3) void EnToryo_Init(Actor* thisx, GlobalContext* globalCtx); void EnToryo_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_En_Tp/z_en_tp.c b/src/overlays/actors/ovl_En_Tp/z_en_tp.c index af1039e511..196ea1d6d5 100644 --- a/src/overlays/actors/ovl_En_Tp/z_en_tp.c +++ b/src/overlays/actors/ovl_En_Tp/z_en_tp.c @@ -7,7 +7,7 @@ #include "z_en_tp.h" #include "objects/object_tp/object_tp.h" -#define FLAGS 0x00000000 +#define FLAGS 0 void EnTp_Init(Actor* thisx, GlobalContext* globalCtx); void EnTp_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -153,7 +153,7 @@ void EnTp_Init(Actor* thisx, GlobalContext* globalCtx2) { this->collider.elements->dim.modelSphere.radius = this->collider.elements->dim.worldSphere.radius = 8; EnTp_Head_SetupWait(this); this->actor.focus.pos = this->actor.world.pos; - this->actor.flags |= 0x15; + this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4; Actor_SetScale(&this->actor, 1.5f); for (i = 0; i <= 6; i++) { @@ -169,7 +169,7 @@ void EnTp_Init(Actor* thisx, GlobalContext* globalCtx2) { Actor_SetScale(&next->actor, 0.3f); if (i == 2) { - next->actor.flags |= 0x15; + next->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4; next->unk_150 = 1; // Why? } @@ -209,13 +209,13 @@ void EnTp_Tail_FollowHead(EnTp* this, GlobalContext* globalCtx) { } } else { if (this->unk_150 != 0) { - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0; } if (this->head->unk_150 != 0) { this->actor.speedXZ = this->red = this->actor.velocity.y = this->heightPhase = 0.0f; if (this->actor.world.pos.y < this->head->actor.home.pos.y) { - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; } this->actor.world.pos = this->actor.parent->prevPos; @@ -348,7 +348,7 @@ void EnTp_Fragment_SetupFade(EnTp* this) { this->actor.velocity.x = (Rand_ZeroOne() - 0.5f) * 1.5f; this->actor.velocity.y = (Rand_ZeroOne() - 0.5f) * 1.5f; this->actor.velocity.z = (Rand_ZeroOne() - 0.5f) * 1.5f; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; EnTp_SetupAction(this, EnTp_Fragment_Fade); } @@ -592,7 +592,7 @@ void EnTp_UpdateDamage(EnTp* this, GlobalContext* globalCtx) { } if (this->actor.colChkInfo.health == 0) { - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; head = this->head; if (head->actor.params <= TAILPASARAN_HEAD) { diff --git a/src/overlays/actors/ovl_En_Tr/z_en_tr.c b/src/overlays/actors/ovl_En_Tr/z_en_tr.c index acca5add4e..bd34569817 100644 --- a/src/overlays/actors/ovl_En_Tr/z_en_tr.c +++ b/src/overlays/actors/ovl_En_Tr/z_en_tr.c @@ -7,7 +7,7 @@ #include "z_en_tr.h" #include "objects/object_tr/object_tr.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 void EnTr_Init(Actor* thisx, GlobalContext* globalCtx); void EnTr_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_En_Trap/z_en_trap.c b/src/overlays/actors/ovl_En_Trap/z_en_trap.c index a1bff00eff..13a05121d0 100644 --- a/src/overlays/actors/ovl_En_Trap/z_en_trap.c +++ b/src/overlays/actors/ovl_En_Trap/z_en_trap.c @@ -7,7 +7,7 @@ #include "z_en_trap.h" #include "objects/object_trap/object_trap.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 #define BEGIN_MOVE_OUT 65535.0f diff --git a/src/overlays/actors/ovl_En_Tubo_Trap/z_en_tubo_trap.c b/src/overlays/actors/ovl_En_Tubo_Trap/z_en_tubo_trap.c index f78bafca18..02f1acbf85 100644 --- a/src/overlays/actors/ovl_En_Tubo_Trap/z_en_tubo_trap.c +++ b/src/overlays/actors/ovl_En_Tubo_Trap/z_en_tubo_trap.c @@ -9,7 +9,7 @@ #include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h" #include "vt.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 void EnTuboTrap_Init(Actor* thisx, GlobalContext* globalCtx); void EnTuboTrap_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -231,7 +231,7 @@ void EnTuboTrap_WaitForProximity(EnTuboTrap* this, GlobalContext* globalCtx) { if (this->actor.xzDistToPlayer < 200.0f && this->actor.world.pos.y <= player->actor.world.pos.y) { Actor_ChangeCategory(globalCtx, &globalCtx->actorCtx, &this->actor, ACTORCAT_ENEMY); - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0; targetHeight = 40.0f + -10.0f * gSaveContext.linkAge; this->targetY = player->actor.world.pos.y + targetHeight; diff --git a/src/overlays/actors/ovl_En_Vali/z_en_vali.c b/src/overlays/actors/ovl_En_Vali/z_en_vali.c index ad093e17e0..daef70a23f 100644 --- a/src/overlays/actors/ovl_En_Vali/z_en_vali.c +++ b/src/overlays/actors/ovl_En_Vali/z_en_vali.c @@ -7,7 +7,7 @@ #include "z_en_vali.h" #include "objects/object_vali/object_vali.h" -#define FLAGS 0x00001015 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4 | ACTOR_FLAG_12) void EnVali_Init(Actor* thisx, GlobalContext* globalCtx); void EnVali_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -154,7 +154,7 @@ void EnVali_Init(Actor* thisx, GlobalContext* globalCtx) { EnVali_SetupLurk(this); - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; this->actor.floorHeight = BgCheck_EntityRaycastFloor4(&globalCtx->colCtx, &this->actor.floorPoly, &bgId, &this->actor, &this->actor.world.pos); this->actor.params = BARI_TYPE_NORMAL; @@ -181,7 +181,7 @@ void EnVali_SetupLurk(EnVali* this) { void EnVali_SetupDropAppear(EnVali* this) { this->actor.draw = EnVali_Draw; - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0; this->actor.velocity.y = 1.0f; this->actionFunc = EnVali_DropAppear; } @@ -197,7 +197,7 @@ void EnVali_SetupFloatIdle(EnVali* this) { this->leftArmCollider.dim.quad[1].y = this->rightArmCollider.dim.quad[0].y = this->rightArmCollider.dim.quad[1].y = this->actor.world.pos.y - 10.0f; - this->actor.flags &= ~0x10; + this->actor.flags &= ~ACTOR_FLAG_4; this->bodyCollider.base.acFlags |= AC_ON; this->slingshotReactionTimer = 0; this->floatHomeHeight = this->actor.world.pos.y; @@ -209,7 +209,7 @@ void EnVali_SetupFloatIdle(EnVali* this) { */ void EnVali_SetupAttacked(EnVali* this) { this->lightningTimer = 20; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; this->bodyCollider.base.acFlags &= ~AC_ON; this->actionFunc = EnVali_Attacked; } @@ -248,7 +248,7 @@ void EnVali_SetupDivideAndDie(EnVali* this, GlobalContext* globalCtx) { this->timer = Rand_S16Offset(10, 10); this->bodyCollider.base.acFlags &= ~AC_ON; Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 40, NA_SE_EN_BARI_SPLIT); - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; this->actor.draw = NULL; this->actionFunc = EnVali_DivideAndDie; } @@ -274,8 +274,8 @@ void EnVali_SetupFrozen(EnVali* this) { void EnVali_SetupReturnToLurk(EnVali* this) { Animation_MorphToPlayOnce(&this->skelAnime, &gBariLurkingAnim, 10.0f); - this->actor.flags |= 0x10; - this->actor.flags &= ~1; + this->actor.flags |= ACTOR_FLAG_4; + this->actor.flags &= ~ACTOR_FLAG_0; this->actionFunc = EnVali_ReturnToLurk; } @@ -361,7 +361,7 @@ void EnVali_Attacked(EnVali* this, GlobalContext* globalCtx) { EnVali_DischargeLightning(this, globalCtx); if (this->lightningTimer == 0) { - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0; this->bodyCollider.base.acFlags |= AC_ON; if (this->actor.params == BARI_TYPE_SWORD_DAMAGE) { EnVali_SetupRetaliate(this); @@ -502,7 +502,7 @@ void EnVali_UpdateDamage(EnVali* this, GlobalContext* globalCtx) { if (Actor_ApplyDamage(&this->actor) == 0) { Audio_PlayActorSound2(&this->actor, NA_SE_EN_BARI_DEAD); Enemy_StartFinishingBlow(globalCtx, &this->actor); - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; } else if ((this->actor.colChkInfo.damageEffect != BARI_DMGEFF_STUN) && (this->actor.colChkInfo.damageEffect != BARI_DMGEFF_SLINGSHOT)) { Audio_PlayActorSound2(&this->actor, NA_SE_EN_BARI_DAMAGE); diff --git a/src/overlays/actors/ovl_En_Vase/z_en_vase.c b/src/overlays/actors/ovl_En_Vase/z_en_vase.c index 4d27563eef..ac59a8852e 100644 --- a/src/overlays/actors/ovl_En_Vase/z_en_vase.c +++ b/src/overlays/actors/ovl_En_Vase/z_en_vase.c @@ -7,7 +7,7 @@ #include "z_en_vase.h" #include "objects/object_vase/object_vase.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 void EnVase_Init(Actor* thisx, GlobalContext* globalCtx); void EnVase_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_En_Vb_Ball/z_en_vb_ball.c b/src/overlays/actors/ovl_En_Vb_Ball/z_en_vb_ball.c index eb457ea036..7509c53ce6 100644 --- a/src/overlays/actors/ovl_En_Vb_Ball/z_en_vb_ball.c +++ b/src/overlays/actors/ovl_En_Vb_Ball/z_en_vb_ball.c @@ -9,7 +9,7 @@ #include "objects/gameplay_keep/gameplay_keep.h" #include "overlays/actors/ovl_Boss_Fd/z_boss_fd.h" -#define FLAGS 0x00000030 +#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) void EnVbBall_Init(Actor* thisx, GlobalContext* globalCtx); void EnVbBall_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_En_Viewer/z_en_viewer.c b/src/overlays/actors/ovl_En_Viewer/z_en_viewer.c index 63a7a5facc..a4d7adb914 100644 --- a/src/overlays/actors/ovl_En_Viewer/z_en_viewer.c +++ b/src/overlays/actors/ovl_En_Viewer/z_en_viewer.c @@ -15,7 +15,7 @@ #include "objects/object_ganon/object_ganon.h" #include "objects/object_opening_demo1/object_opening_demo1.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 void EnViewer_Init(Actor* thisx, GlobalContext* globalCtx); void EnViewer_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -175,7 +175,7 @@ void EnViewer_InitImpl(EnViewer* this, GlobalContext* globalCtx) { if (!Object_IsLoaded(&globalCtx->objectCtx, skelObjBankIndex) || !Object_IsLoaded(&globalCtx->objectCtx, this->animObjBankIndex)) { - this->actor.flags &= ~0x40; + this->actor.flags &= ~ACTOR_FLAG_6; return; } diff --git a/src/overlays/actors/ovl_En_Vm/z_en_vm.c b/src/overlays/actors/ovl_En_Vm/z_en_vm.c index 3fb6f46b94..6b84f329f0 100644 --- a/src/overlays/actors/ovl_En_Vm/z_en_vm.c +++ b/src/overlays/actors/ovl_En_Vm/z_en_vm.c @@ -9,7 +9,7 @@ #include "overlays/actors/ovl_En_Bom/z_en_bom.h" #include "objects/gameplay_keep/gameplay_keep.h" -#define FLAGS 0x00000011 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_4) void EnVm_Init(Actor* thisx, GlobalContext* globalCtx); void EnVm_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_En_Wall_Tubo/z_en_wall_tubo.c b/src/overlays/actors/ovl_En_Wall_Tubo/z_en_wall_tubo.c index 4222c695cd..3a09029539 100644 --- a/src/overlays/actors/ovl_En_Wall_Tubo/z_en_wall_tubo.c +++ b/src/overlays/actors/ovl_En_Wall_Tubo/z_en_wall_tubo.c @@ -10,7 +10,7 @@ #include "overlays/actors/ovl_Bg_Bowl_Wall/z_bg_bowl_wall.h" #include "overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 void EnWallTubo_Init(Actor* thisx, GlobalContext* globalCtx); void EnWallTubo_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c b/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c index 4cce00ad12..75245befbc 100644 --- a/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c +++ b/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c @@ -8,7 +8,7 @@ #include "objects/object_wallmaster/object_wallmaster.h" #include "objects/gameplay_keep/gameplay_keep.h" -#define FLAGS 0x00000015 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4) #define TIMER_SCALE ((f32)OS_CLOCK_RATE / 10000000000) #define DEGREE_60_RAD (60.0f * M_PI / 180.0f) @@ -152,8 +152,8 @@ void EnWallmas_Destroy(Actor* thisx, GlobalContext* globalCtx) { void EnWallmas_TimerInit(EnWallmas* this, GlobalContext* globalCtx) { Player* player = GET_PLAYER(globalCtx); - this->actor.flags &= ~1; - this->actor.flags |= 0x20; + this->actor.flags &= ~ACTOR_FLAG_0; + this->actor.flags |= ACTOR_FLAG_5; this->timer = 0x82; this->actor.velocity.y = 0.0f; this->actor.world.pos.y = player->actor.world.pos.y; @@ -173,8 +173,8 @@ void EnWallmas_SetupDrop(EnWallmas* this, GlobalContext* globalCtx) { this->actor.world.pos.y = player->actor.world.pos.y + 300.0f; this->actor.world.rot.y = player->actor.shape.rot.y + 0x8000; this->actor.floorHeight = player->actor.floorHeight; - this->actor.flags |= 1; - this->actor.flags &= ~0x20; + this->actor.flags |= ACTOR_FLAG_0; + this->actor.flags &= ~ACTOR_FLAG_5; this->actionFunc = EnWallmas_Drop; } @@ -268,7 +268,7 @@ void EnWallmas_SetupTakePlayer(EnWallmas* this, GlobalContext* globalCtx) { void EnWallmas_ProximityOrSwitchInit(EnWallmas* this) { this->timer = 0; this->actor.draw = NULL; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; if (this->actor.params == WMT_PROXIMITY) { this->actionFunc = EnWallmas_WaitForProximity; } else { @@ -509,7 +509,7 @@ void EnWallmas_ColUpdate(EnWallmas* this, GlobalContext* globalCtx) { if (Actor_ApplyDamage(&this->actor) == 0) { Enemy_StartFinishingBlow(globalCtx, &this->actor); Audio_PlayActorSound2(&this->actor, NA_SE_EN_FALL_DEAD); - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; } else { if (this->actor.colChkInfo.damage != 0) { Audio_PlayActorSound2(&this->actor, NA_SE_EN_FALL_DAMAGE); diff --git a/src/overlays/actors/ovl_En_Weather_Tag/z_en_weather_tag.c b/src/overlays/actors/ovl_En_Weather_Tag/z_en_weather_tag.c index f53968eda9..5325bd5b60 100644 --- a/src/overlays/actors/ovl_En_Weather_Tag/z_en_weather_tag.c +++ b/src/overlays/actors/ovl_En_Weather_Tag/z_en_weather_tag.c @@ -7,7 +7,7 @@ #include "z_en_weather_tag.h" #include "vt.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 void EnWeatherTag_Init(Actor* thisx, GlobalContext* globalCtx); void EnWeatherTag_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -53,7 +53,7 @@ void EnWeatherTag_Destroy(Actor* thisx, GlobalContext* globalCtx) { void EnWeatherTag_Init(Actor* thisx, GlobalContext* globalCtx) { EnWeatherTag* this = (EnWeatherTag*)thisx; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; switch (this->actor.params & 0xF) { case EN_WEATHER_TAG_TYPE_CLOUDY_MARKET: diff --git a/src/overlays/actors/ovl_En_Weiyer/z_en_weiyer.c b/src/overlays/actors/ovl_En_Weiyer/z_en_weiyer.c index 922003c40a..b71d7ff7f4 100644 --- a/src/overlays/actors/ovl_En_Weiyer/z_en_weiyer.c +++ b/src/overlays/actors/ovl_En_Weiyer/z_en_weiyer.c @@ -7,7 +7,7 @@ #include "z_en_weiyer.h" #include "objects/object_ei/object_ei.h" -#define FLAGS 0x00000005 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2) void EnWeiyer_Init(Actor* thisx, GlobalContext* globalCtx); void EnWeiyer_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -571,7 +571,7 @@ void func_80B3368C(EnWeiyer* this, GlobalContext* globalCtx) { } else if (Actor_ApplyDamage(&this->actor) == 0) { Enemy_StartFinishingBlow(globalCtx, &this->actor); Audio_PlayActorSound2(&this->actor, NA_SE_EN_EIER_DEAD); - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; func_80B32724(this); } else { func_80B325A0(this); diff --git a/src/overlays/actors/ovl_En_Wf/z_en_wf.c b/src/overlays/actors/ovl_En_Wf/z_en_wf.c index 33390d23cc..f59355852f 100644 --- a/src/overlays/actors/ovl_En_Wf/z_en_wf.c +++ b/src/overlays/actors/ovl_En_Wf/z_en_wf.c @@ -9,7 +9,7 @@ #include "overlays/actors/ovl_En_Encount1/z_en_encount1.h" #include "objects/object_wf/object_wf.h" -#define FLAGS 0x00000015 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4) void EnWf_Init(Actor* thisx, GlobalContext* globalCtx); void EnWf_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -370,7 +370,7 @@ void EnWf_SetupWaitToAppear(EnWf* this) { this->actionTimer = 20; this->unk_300 = false; this->action = WOLFOS_ACTION_WAIT_TO_APPEAR; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; this->actor.scale.y = 0.0f; this->actor.gravity = 0.0f; EnWf_SetupAction(this, EnWf_WaitToAppear); @@ -382,7 +382,7 @@ void EnWf_WaitToAppear(EnWf* this, GlobalContext* globalCtx) { if (this->actor.xzDistToPlayer < 240.0f) { this->actionTimer = 5; - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0; if ((this->actor.params != WOLFOS_NORMAL) && (this->switchFlag != 0xFF)) { func_800F5ACC(0x38); // Mini-Boss Battle Theme @@ -1188,7 +1188,7 @@ void EnWf_SetupDie(EnWf* this) { } this->action = WOLFOS_ACTION_DIE; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; this->actionTimer = this->skelAnime.animLength; Audio_PlayActorSound2(&this->actor, NA_SE_EN_WOLFOS_DEAD); EnWf_SetupAction(this, EnWf_Die); diff --git a/src/overlays/actors/ovl_En_Wonder_Item/z_en_wonder_item.c b/src/overlays/actors/ovl_En_Wonder_Item/z_en_wonder_item.c index a9ef14ba86..8dd064f6e3 100644 --- a/src/overlays/actors/ovl_En_Wonder_Item/z_en_wonder_item.c +++ b/src/overlays/actors/ovl_En_Wonder_Item/z_en_wonder_item.c @@ -7,7 +7,7 @@ #include "z_en_wonder_item.h" #include "vt.h" -#define FLAGS 0x00000000 +#define FLAGS 0 void EnWonderItem_Init(Actor* thisx, GlobalContext* globalCtx); void EnWonderItem_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -115,7 +115,7 @@ void EnWonderItem_Init(Actor* thisx, GlobalContext* globalCtx) { osSyncPrintf("\n\n"); // "Mysterious mystery, very mysterious" osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ 不思議不思議まか不思議 \t ☆☆☆☆☆ %x\n" VT_RST, this->actor.params); - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; this->wonderMode = (this->actor.params >> 0xB) & 0x1F; this->itemDrop = (this->actor.params >> 6) & 0x1F; diff --git a/src/overlays/actors/ovl_En_Wonder_Talk/z_en_wonder_talk.c b/src/overlays/actors/ovl_En_Wonder_Talk/z_en_wonder_talk.c index 63deb4c95d..9e7001e2de 100644 --- a/src/overlays/actors/ovl_En_Wonder_Talk/z_en_wonder_talk.c +++ b/src/overlays/actors/ovl_En_Wonder_Talk/z_en_wonder_talk.c @@ -7,7 +7,7 @@ #include "z_en_wonder_talk.h" #include "vt.h" -#define FLAGS 0x08000009 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_27) void EnWonderTalk_Init(Actor* thisx, GlobalContext* globalCtx); void EnWonderTalk_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -143,7 +143,7 @@ void func_80B3943C(EnWonderTalk* this, GlobalContext* globalCtx) { this->actionFunc = func_80B395F0; } else { if (this->switchFlag >= 0) { - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; Flags_SetSwitch(globalCtx, this->switchFlag); } this->actionFunc = func_80B391CC; @@ -175,7 +175,7 @@ void func_80B3943C(EnWonderTalk* this, GlobalContext* globalCtx) { void func_80B395F0(EnWonderTalk* this, GlobalContext* globalCtx) { if (this->unk_156 == Message_GetState(&globalCtx->msgCtx) && Message_ShouldAdvance(globalCtx)) { if (this->switchFlag >= 0) { - this->actor.flags &= -2; + this->actor.flags &= ~ACTOR_FLAG_0; Flags_SetSwitch(globalCtx, this->switchFlag); } switch (this->unk_150) { diff --git a/src/overlays/actors/ovl_En_Wonder_Talk2/z_en_wonder_talk2.c b/src/overlays/actors/ovl_En_Wonder_Talk2/z_en_wonder_talk2.c index ec65d8dda7..880e4eba7a 100644 --- a/src/overlays/actors/ovl_En_Wonder_Talk2/z_en_wonder_talk2.c +++ b/src/overlays/actors/ovl_En_Wonder_Talk2/z_en_wonder_talk2.c @@ -7,7 +7,7 @@ #include "z_en_wonder_talk2.h" #include "vt.h" -#define FLAGS 0x08000009 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_27) void EnWonderTalk2_Init(Actor* thisx, GlobalContext* globalCtx); void EnWonderTalk2_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -91,7 +91,7 @@ void EnWonderTalk2_Init(Actor* thisx, GlobalContext* globalCtx) { this->talkMode = 4; } if (this->talkMode == 3) { - this->actor.flags &= ~0x08000000; + this->actor.flags &= ~ACTOR_FLAG_27; this->actionFunc = EnWonderTalk2_DoNothing; } else { this->actionFunc = func_80B3A10C; @@ -114,7 +114,7 @@ void func_80B3A15C(EnWonderTalk2* this, GlobalContext* globalCtx) { this->unk_158++; if ((this->switchFlag >= 0) && Flags_GetSwitch(globalCtx, this->switchFlag)) { if (!this->unk_15A) { - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; this->unk_15A = true; } } else if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) { @@ -192,7 +192,7 @@ void func_80B3A3D4(EnWonderTalk2* this, GlobalContext* globalCtx) { if (this->talkMode == 4) { this->unk_15A = true; } - this->actor.flags &= ~0x11; + this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_4); func_8002DF54(globalCtx, NULL, 7); this->unk_156 = true; this->actionFunc = func_80B3A4F8; @@ -207,7 +207,7 @@ void func_80B3A4F8(EnWonderTalk2* this, GlobalContext* globalCtx) { this->unk_158++; if (this->switchFlag >= 0 && Flags_GetSwitch(globalCtx, this->switchFlag)) { if (!this->unk_15A) { - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; this->unk_15A = true; } } else if ((this->talkMode != 4) || !this->unk_15A) { @@ -253,7 +253,7 @@ void func_80B3A4F8(EnWonderTalk2* this, GlobalContext* globalCtx) { if (!this->unk_156) { Message_StartTextbox(globalCtx, this->actor.textId, NULL); func_8002DF54(globalCtx, NULL, 8); - this->actor.flags |= 0x11; + this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_4; this->actionFunc = func_80B3A3D4; } diff --git a/src/overlays/actors/ovl_En_Wood02/z_en_wood02.c b/src/overlays/actors/ovl_En_Wood02/z_en_wood02.c index 472a3f9080..7b72d5444d 100644 --- a/src/overlays/actors/ovl_En_Wood02/z_en_wood02.c +++ b/src/overlays/actors/ovl_En_Wood02/z_en_wood02.c @@ -7,7 +7,7 @@ #include "z_en_wood02.h" #include "objects/object_wood02/object_wood02.h" -#define FLAGS 0x00000000 +#define FLAGS 0 void EnWood02_Init(Actor* thisx, GlobalContext* globalCtx); void EnWood02_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -271,7 +271,7 @@ void EnWood02_Init(Actor* thisx, GlobalContext* globalCtx2) { this->actor.world.pos.x += (sSpawnSin * sSpawnDistance[5]); this->actor.world.pos.z += (sSpawnCos * sSpawnDistance[5]); } else { - this->actor.flags |= 0x10; + this->actor.flags |= ACTOR_FLAG_4; } // Snap to floor, or remove if over void @@ -311,7 +311,7 @@ void EnWood02_Update(Actor* thisx, GlobalContext* globalCtx2) { // Despawn extra trees in a group if out of range if ((this->spawnType == WOOD_SPAWN_SPAWNED) && (this->actor.parent != NULL)) { - if (!(this->actor.flags & 0x40)) { + if (!(this->actor.flags & ACTOR_FLAG_6)) { new_var = this->unk_14E[0]; phi_v0 = 0; diff --git a/src/overlays/actors/ovl_En_Xc/z_en_xc.c b/src/overlays/actors/ovl_En_Xc/z_en_xc.c index c42326db7d..e54e9daf41 100644 --- a/src/overlays/actors/ovl_En_Xc/z_en_xc.c +++ b/src/overlays/actors/ovl_En_Xc/z_en_xc.c @@ -14,7 +14,7 @@ #include "scenes/dungeons/ice_doukutu/ice_doukutu_scene.h" #include "vt.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 void EnXc_Init(Actor* thisx, GlobalContext* globalCtx); void EnXc_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -2170,7 +2170,7 @@ void EnXc_SetupDialogueAction(EnXc* this, GlobalContext* globalCtx) { if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) { this->action = SHEIK_ACTION_IN_DIALOGUE; } else { - this->actor.flags |= 9; + this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_3; if (INV_CONTENT(ITEM_HOOKSHOT) != ITEM_NONE) { this->actor.textId = 0x7010; } else { @@ -2183,7 +2183,7 @@ void EnXc_SetupDialogueAction(EnXc* this, GlobalContext* globalCtx) { void func_80B41798(EnXc* this, GlobalContext* globalCtx) { if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_CLOSING) { this->action = SHEIK_ACTION_BLOCK_PEDESTAL; - this->actor.flags &= ~9; + this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_3); } } diff --git a/src/overlays/actors/ovl_En_Yabusame_Mark/z_en_yabusame_mark.c b/src/overlays/actors/ovl_En_Yabusame_Mark/z_en_yabusame_mark.c index 68e065a458..eeffd30336 100644 --- a/src/overlays/actors/ovl_En_Yabusame_Mark/z_en_yabusame_mark.c +++ b/src/overlays/actors/ovl_En_Yabusame_Mark/z_en_yabusame_mark.c @@ -7,7 +7,7 @@ #include "z_en_yabusame_mark.h" #include "vt.h" -#define FLAGS 0x00000000 +#define FLAGS 0 void EnYabusameMark_Init(Actor* thisx, GlobalContext* globalCtx); void EnYabusameMark_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -80,7 +80,7 @@ void EnYabusameMark_Init(Actor* thisx, GlobalContext* globalCtx) { osSyncPrintf("\n\n"); osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ やぶさめまと ☆☆☆☆☆ %x\n" VT_RST, this->actor.params); - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; this->typeIndex = this->actor.params; this->actor.targetMode = 5; osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ 種類インデックス \t ☆☆☆☆☆ %d\n" VT_RST, this->typeIndex); @@ -104,7 +104,7 @@ void EnYabusameMark_Init(Actor* thisx, GlobalContext* globalCtx) { Collider_InitQuad(globalCtx, &this->collider); Collider_SetQuad(globalCtx, &this->collider, &this->actor, &sQuadInit); this->worldPos = this->actor.world.pos; - this->actor.flags |= 0x10; + this->actor.flags |= ACTOR_FLAG_4; if (gSaveContext.sceneSetupIndex != 4) { Actor_Kill(&this->actor); return; diff --git a/src/overlays/actors/ovl_En_Yukabyun/z_en_yukabyun.c b/src/overlays/actors/ovl_En_Yukabyun/z_en_yukabyun.c index 347114a42c..8e2368b70f 100644 --- a/src/overlays/actors/ovl_En_Yukabyun/z_en_yukabyun.c +++ b/src/overlays/actors/ovl_En_Yukabyun/z_en_yukabyun.c @@ -7,7 +7,7 @@ #include "z_en_yukabyun.h" #include "objects/object_yukabyun/object_yukabyun.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 void EnYukabyun_Init(Actor* thisx, GlobalContext* globalCtx); void EnYukabyun_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -80,7 +80,7 @@ void func_80B43A94(EnYukabyun* this, GlobalContext* globalCtx) { this->unk_150--; } if (this->unk_150 == 0) { - this->actor.flags |= 0x1005; + this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_12; this->actionfunc = func_80B43AD4; } } @@ -122,7 +122,7 @@ void EnYukabyun_Update(Actor* thisx, GlobalContext* globalCtx) { this->collider.base.atFlags &= ~AT_HIT; this->collider.base.acFlags &= ~AC_HIT; this->collider.base.ocFlags1 &= ~OC1_HIT; - this->actor.flags &= ~0x5; + this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_2); Audio_PlaySoundAtPosition(globalCtx, &this->actor.world.pos, 30, NA_SE_EN_OCTAROCK_ROCK); this->actionfunc = EnYukabyun_Break; } @@ -134,7 +134,7 @@ void EnYukabyun_Update(Actor* thisx, GlobalContext* globalCtx) { Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 5.0f, 20.0f, 8.0f, 5); Collider_UpdateCylinder(&this->actor, &this->collider); - this->actor.flags |= 0x1000000; + this->actor.flags |= ACTOR_FLAG_24; CollisionCheck_SetAT(globalCtx, &globalCtx->colChkCtx, &this->collider.base); CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->collider.base); diff --git a/src/overlays/actors/ovl_En_Zf/z_en_zf.c b/src/overlays/actors/ovl_En_Zf/z_en_zf.c index eb694b225c..68bc879c8d 100644 --- a/src/overlays/actors/ovl_En_Zf/z_en_zf.c +++ b/src/overlays/actors/ovl_En_Zf/z_en_zf.c @@ -7,7 +7,7 @@ #include "z_en_zf.h" #include "objects/object_zf/object_zf.h" -#define FLAGS 0x00000015 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_2 | ACTOR_FLAG_4) void EnZf_Init(Actor* thisx, GlobalContext* globalCtx); void EnZf_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -630,7 +630,7 @@ void EnZf_SetupDropIn(EnZf* this) { this->hopAnimIndex = 1; this->action = ENZF_ACTION_DROP_IN; this->actor.bgCheckFlags &= ~2; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; this->actor.shape.rot.y = this->actor.world.rot.y = this->actor.yawTowardsPlayer; EnZf_SetupAction(this, EnZf_DropIn); } @@ -638,7 +638,7 @@ void EnZf_SetupDropIn(EnZf* this) { void EnZf_DropIn(EnZf* this, GlobalContext* globalCtx) { if (this->unk_3F0 == 1) { Audio_PlayActorSound2(&this->actor, NA_SE_EN_RIZA_CRY); - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0; if (this->actor.params == ENZF_TYPE_LIZALFOS_MINIBOSS_A) { func_800F5ACC(0x38); // Miniboss theme @@ -650,7 +650,7 @@ void EnZf_DropIn(EnZf* this, GlobalContext* globalCtx) { this->unk_3F0--; } else if (this->actor.xzDistToPlayer <= 160.0f) { this->unk_3F0 = 0; - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0; Audio_PlayActorSound2(&this->actor, NA_SE_EN_RIZA_CRY); } @@ -1898,7 +1898,7 @@ void EnZf_SetupDie(EnZf* this) { } this->action = ENZF_ACTION_DIE; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; if (D_80B4A1B4 != -1) { if (this->actor.prev != NULL) { diff --git a/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c b/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c index 439dfafc54..a1c84dcd41 100644 --- a/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c +++ b/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c @@ -7,7 +7,7 @@ #include "z_en_zl1.h" #include "objects/object_zl1/object_zl1.h" -#define FLAGS 0x00000019 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_4) void EnZl1_Init(Actor* thisx, GlobalContext* globalCtx); void EnZl1_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -556,7 +556,7 @@ void func_80B4BF2C(EnZl1* this, GlobalContext* globalCtx) { if (Actor_TextboxIsClosing(&this->actor, globalCtx)) { func_8002DF54(globalCtx, &this->actor, 7); Interface_ChangeAlpha(50); - this->actor.flags &= ~0x100; + this->actor.flags &= ~ACTOR_FLAG_8; this->unk_1E2 = 4; } break; diff --git a/src/overlays/actors/ovl_En_Zl2/z_en_zl2.c b/src/overlays/actors/ovl_En_Zl2/z_en_zl2.c index c87086e7d5..5d5f2850a9 100644 --- a/src/overlays/actors/ovl_En_Zl2/z_en_zl2.c +++ b/src/overlays/actors/ovl_En_Zl2/z_en_zl2.c @@ -11,7 +11,7 @@ #include "objects/object_zl2/object_zl2.h" #include "objects/object_zl2_anime1/object_zl2_anime1.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 void EnZl2_Init(Actor* thisx, GlobalContext* globalCtx); void EnZl2_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_En_Zl3/z_en_zl3.c b/src/overlays/actors/ovl_En_Zl3/z_en_zl3.c index 2a1d9afd49..8f07b3ba49 100644 --- a/src/overlays/actors/ovl_En_Zl3/z_en_zl3.c +++ b/src/overlays/actors/ovl_En_Zl3/z_en_zl3.c @@ -12,7 +12,7 @@ #include "objects/object_zl2/object_zl2.h" #include "objects/object_zl2_anime2/object_zl2_anime2.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 void EnZl3_Init(Actor* thisx, GlobalContext* globalCtx); void EnZl3_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -1008,7 +1008,7 @@ void func_80B55780(EnZl3* this, GlobalContext* globalCtx) { this->drawConfig = 1; osSyncPrintf("ゼルダ姫のEn_Zl3_Actor_inFinal2_Initは通った!!!!!!!!!!!!!!!!!!!!!!!!!\n"); EnZl3_setMouthIndex(this, 1); - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; } void func_80B55808(EnZl3* this) { @@ -1105,8 +1105,8 @@ void func_80B55C4C(EnZl3* this, s32 arg1) { void func_80B55C70(EnZl3* this) { func_80B54E14(this, &gZelda2Anime2Anim_008684, 2, -8.0f, 0); this->action = 12; - this->actor.flags &= ~0x9; - this->actor.flags &= ~0x1; + this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_3); + this->actor.flags &= ~ACTOR_FLAG_0; } void func_80B55CCC(EnZl3* this, s32 arg1) { @@ -1119,20 +1119,20 @@ void func_80B55D00(EnZl3* this, GlobalContext* globalCtx) { if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) { this->action = 13; } else if (ABS((s16)(this->actor.yawTowardsPlayer - this->actor.shape.rot.y)) <= 0x4300) { - this->actor.flags |= 9; - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_3; + this->actor.flags |= ACTOR_FLAG_0; this->actor.textId = 0x70D5; func_8002F2F4(&this->actor, globalCtx); } else { - this->actor.flags &= ~9; - this->actor.flags &= ~1; + this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_3); + this->actor.flags &= ~ACTOR_FLAG_0; } } void func_80B55DB0(EnZl3* this, GlobalContext* globalCtx) { if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_CLOSING) { - this->actor.flags &= ~0x9; - this->actor.flags &= ~0x1; + this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_3); + this->actor.flags &= ~ACTOR_FLAG_0; this->action = 12; } } @@ -1178,14 +1178,14 @@ void func_80B55F6C(EnZl3* this, GlobalContext* globalCtx) { BossGanon2* bossGanon2 = func_80B53488(this, globalCtx); if ((bossGanon2 != NULL) && (bossGanon2->unk_324 <= (10.0f / 81.0f))) { - this->actor.flags |= 9; - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_3; + this->actor.flags |= ACTOR_FLAG_0; this->actor.textId = 0x7059; func_8002F2F4(&this->actor, globalCtx); } } else { - this->actor.flags &= ~9; - this->actor.flags &= ~1; + this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_3); + this->actor.flags &= ~ACTOR_FLAG_0; } } @@ -1210,8 +1210,8 @@ void func_80B56090(EnZl3* this, s32 arg1) { void func_80B56108(EnZl3* this, GlobalContext* globalCtx) { if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_CLOSING) { - this->actor.flags &= ~0x9; - this->actor.flags &= ~0x1; + this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_3); + this->actor.flags &= ~ACTOR_FLAG_0; this->action = 16; } } @@ -1240,22 +1240,22 @@ void func_80B56214(EnZl3* this, GlobalContext* globalCtx) { if (bossGanon2 != NULL) { if (bossGanon2->unk_324 <= (10.0f / 81.0f)) { - this->actor.flags |= 9; - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_3; + this->actor.flags |= ACTOR_FLAG_0; this->actor.textId = 0x7059; func_8002F2F4(&this->actor, globalCtx); } } } else { - this->actor.flags &= ~9; - this->actor.flags &= ~1; + this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_3); + this->actor.flags &= ~ACTOR_FLAG_0; } } void func_80B562F4(EnZl3* this, GlobalContext* globalCtx) { if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_CLOSING) { - this->actor.flags &= ~0x9; - this->actor.flags &= ~0x1; + this->actor.flags &= ~(ACTOR_FLAG_0 | ACTOR_FLAG_3); + this->actor.flags &= ~ACTOR_FLAG_0; this->action = 20; } } @@ -1695,7 +1695,7 @@ void func_80B57350(EnZl3* this, GlobalContext* globalCtx) { s16 temp_v0 = this->actor.yawTowardsPlayer - this->actor.shape.rot.y; if (ABS(temp_v0) <= 0x4300) { - this->actor.flags |= 9; + this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_3; this->actor.textId = func_80B572F0(globalCtx); func_8002F2F4(&this->actor, globalCtx); } @@ -2518,7 +2518,7 @@ void func_80B59828(EnZl3* this, GlobalContext* globalCtx) { s16 newRotY; func_80B54E14(this, &gZelda2Anime2Anim_009FBC, 0, 0.0f, 0); - this->actor.flags |= 9; + this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_3; func_80B56F10(this, globalCtx); newRotY = func_80B571A8(this); this->actor.shape.rot.y = newRotY; diff --git a/src/overlays/actors/ovl_En_Zl4/z_en_zl4.c b/src/overlays/actors/ovl_En_Zl4/z_en_zl4.c index a51281f623..8312009e34 100644 --- a/src/overlays/actors/ovl_En_Zl4/z_en_zl4.c +++ b/src/overlays/actors/ovl_En_Zl4/z_en_zl4.c @@ -8,7 +8,7 @@ #include "objects/object_zl4/object_zl4.h" #include "scenes/indoors/nakaniwa/nakaniwa_scene.h" -#define FLAGS 0x00000019 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3 | ACTOR_FLAG_4) typedef enum { /* 0 */ ZL4_CS_WAIT, diff --git a/src/overlays/actors/ovl_En_Zo/z_en_zo.c b/src/overlays/actors/ovl_En_Zo/z_en_zo.c index 6bfaa9d6f5..1df3efe222 100644 --- a/src/overlays/actors/ovl_En_Zo/z_en_zo.c +++ b/src/overlays/actors/ovl_En_Zo/z_en_zo.c @@ -7,7 +7,7 @@ #include "z_en_zo.h" #include "objects/object_zo/object_zo.h" -#define FLAGS 0x00000009 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3) typedef enum { /* 0 */ ENZO_EFFECT_NONE, @@ -589,7 +589,7 @@ void EnZo_Init(Actor* thisx, GlobalContext* globalCtx) { this->alpha = 255.0f; this->actionFunc = EnZo_Standing; } else { - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; this->actionFunc = EnZo_Submerged; } } @@ -631,7 +631,7 @@ void EnZo_Surface(EnZo* this, GlobalContext* globalCtx) { Audio_PlayActorSound2(&this->actor, NA_SE_EV_OUT_OF_WATER); EnZo_SpawnSplashes(this); func_80034EC0(&this->skelAnime, sAnimations, 3); - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0; this->actionFunc = EnZo_TreadWater; this->actor.velocity.y = 0.0f; this->alpha = 255.0f; @@ -681,7 +681,7 @@ void EnZo_Dive(EnZo* this, GlobalContext* globalCtx) { if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) { Audio_PlayActorSound2(&this->actor, NA_SE_EV_DIVE_WATER); EnZo_SpawnSplashes(this); - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; this->actor.velocity.y = -4.0f; this->skelAnime.playSpeed = 0.0f; } diff --git a/src/overlays/actors/ovl_En_fHG/z_en_fhg.c b/src/overlays/actors/ovl_En_fHG/z_en_fhg.c index 6cac58ed58..a6de5bd745 100644 --- a/src/overlays/actors/ovl_En_fHG/z_en_fhg.c +++ b/src/overlays/actors/ovl_En_fHG/z_en_fhg.c @@ -10,7 +10,7 @@ #include "overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.h" #include "overlays/actors/ovl_En_Fhg_Fire/z_en_fhg_fire.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 typedef struct { /* 0x00 */ Vec3f pos; diff --git a/src/overlays/actors/ovl_End_Title/z_end_title.c b/src/overlays/actors/ovl_End_Title/z_end_title.c index ef6805425e..c2a1b20363 100644 --- a/src/overlays/actors/ovl_End_Title/z_end_title.c +++ b/src/overlays/actors/ovl_End_Title/z_end_title.c @@ -6,7 +6,7 @@ #include "z_end_title.h" -#define FLAGS 0x00000030 +#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) void EndTitle_Init(Actor* thisx, GlobalContext* globalCtx); void EndTitle_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Fishing/z_fishing.c b/src/overlays/actors/ovl_Fishing/z_fishing.c index 23271c16ff..e8f0e2fafc 100644 --- a/src/overlays/actors/ovl_Fishing/z_fishing.c +++ b/src/overlays/actors/ovl_Fishing/z_fishing.c @@ -10,7 +10,7 @@ #include "objects/object_fish/object_fish.h" #include "vt.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 #define WATER_SURFACE_Y(globalCtx) globalCtx->colCtx.colHeader->waterBoxes->ySurface @@ -849,7 +849,7 @@ void Fishing_Init(Actor* thisx, GlobalContext* globalCtx2) { thisx->focus.pos = thisx->world.pos; thisx->focus.pos.y += 75.0f; - thisx->flags |= 9; + thisx->flags |= ACTOR_FLAG_0 | ACTOR_FLAG_3; if (sLinkAge != 1) { if (HIGH_SCORE(HS_FISHING) & 0x1000) { @@ -980,7 +980,7 @@ void Fishing_Init(Actor* thisx, GlobalContext* globalCtx2) { this->unk_158 = 100; Actor_ChangeCategory(globalCtx, &globalCtx->actorCtx, thisx, ACTORCAT_PROP); thisx->targetMode = 0; - thisx->flags |= 9; + thisx->flags |= ACTOR_FLAG_0 | ACTOR_FLAG_3; this->lightNode = LightContext_InsertLight(globalCtx, &globalCtx->lightCtx, &this->lightInfo); } else { this->unk_158 = 10; @@ -2847,7 +2847,7 @@ void Fishing_HandleAquariumDialog(Fishing* this, GlobalContext* globalCtx) { if (this->unk_1D3 == 0) { if (this->unk_1D4 == 0) { - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0; if (Actor_ProcessTalkRequest(&this->actor, globalCtx)) { D_80B7A678 = D_80B7E078; @@ -2857,7 +2857,7 @@ void Fishing_HandleAquariumDialog(Fishing* this, GlobalContext* globalCtx) { } } else { this->unk_1D4--; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; } } else if (Actor_TextboxIsClosing(&this->actor, globalCtx)) { this->unk_1D3 = 0; @@ -2913,9 +2913,9 @@ void Fishing_UpdateFish(Actor* thisx, GlobalContext* globalCtx2) { } if ((D_80B7E0B0 != 0) || (sCameraId != 0) || ((player->actor.world.pos.z > 1150.0f) && (this->unk_158 != 100))) { - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; } else { - this->actor.flags |= 1; + this->actor.flags |= ACTOR_FLAG_0; if (D_80B7A694 != 0) { if (D_80B7E0B2 == 0) { this->actor.focus.pos = sLurePos; @@ -3132,7 +3132,7 @@ void Fishing_UpdateFish(Actor* thisx, GlobalContext* globalCtx2) { if (D_80B7E0B6 == 2) { func_80B70ED4(this, input); } else { - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; } break; @@ -3169,7 +3169,7 @@ void Fishing_UpdateFish(Actor* thisx, GlobalContext* globalCtx2) { if (D_80B7E0B6 == 2) { func_80B70ED4(this, input); } else { - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; } } break; @@ -3213,7 +3213,7 @@ void Fishing_UpdateFish(Actor* thisx, GlobalContext* globalCtx2) { this->unk_1B4.z = Rand_ZeroFloat(50.0f); } - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; break; case -2: @@ -3252,7 +3252,7 @@ void Fishing_UpdateFish(Actor* thisx, GlobalContext* globalCtx2) { } Math_ApproachF(&this->unk_1B0, 2048.0f, 1.0f, 128.0f); - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; } break; @@ -5110,9 +5110,9 @@ void Fishing_UpdateOwner(Actor* thisx, GlobalContext* globalCtx2) { SkelAnime_Update(&this->skelAnime); if ((D_80B7A684 != 0) || (Message_GetState(&globalCtx->msgCtx) != TEXT_STATE_NONE)) { - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; } else { - this->actor.flags |= 0x21; + this->actor.flags |= ACTOR_FLAG_0 | ACTOR_FLAG_5; } if ((this->actor.xzDistToPlayer < 120.0f) || (Message_GetState(&globalCtx->msgCtx) != TEXT_STATE_NONE)) { diff --git a/src/overlays/actors/ovl_Item_B_Heart/z_item_b_heart.c b/src/overlays/actors/ovl_Item_B_Heart/z_item_b_heart.c index ff850862db..c5e8f08b7f 100644 --- a/src/overlays/actors/ovl_Item_B_Heart/z_item_b_heart.c +++ b/src/overlays/actors/ovl_Item_B_Heart/z_item_b_heart.c @@ -7,7 +7,7 @@ #include "z_item_b_heart.h" #include "objects/object_gi_hearts/object_gi_hearts.h" -#define FLAGS 0x00000000 +#define FLAGS 0 void ItemBHeart_Init(Actor* thisx, GlobalContext* globalCtx); void ItemBHeart_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Item_Etcetera/z_item_etcetera.c b/src/overlays/actors/ovl_Item_Etcetera/z_item_etcetera.c index a772a0aa1c..dace98579a 100644 --- a/src/overlays/actors/ovl_Item_Etcetera/z_item_etcetera.c +++ b/src/overlays/actors/ovl_Item_Etcetera/z_item_etcetera.c @@ -6,7 +6,7 @@ #include "z_item_etcetera.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 void ItemEtcetera_Init(Actor* thisx, GlobalContext* globalCtx); void ItemEtcetera_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Item_Inbox/z_item_inbox.c b/src/overlays/actors/ovl_Item_Inbox/z_item_inbox.c index dbd5fa1d94..eb174f693a 100644 --- a/src/overlays/actors/ovl_Item_Inbox/z_item_inbox.c +++ b/src/overlays/actors/ovl_Item_Inbox/z_item_inbox.c @@ -6,7 +6,7 @@ #include "z_item_inbox.h" -#define FLAGS 0x00000009 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3) void ItemInbox_Init(Actor* thisx, GlobalContext* globalCtx); void ItemInbox_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Item_Ocarina/z_item_ocarina.c b/src/overlays/actors/ovl_Item_Ocarina/z_item_ocarina.c index c9d9d57bd6..645b070318 100644 --- a/src/overlays/actors/ovl_Item_Ocarina/z_item_ocarina.c +++ b/src/overlays/actors/ovl_Item_Ocarina/z_item_ocarina.c @@ -7,7 +7,7 @@ #include "z_item_ocarina.h" #include "scenes/overworld/spot00/spot00_scene.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 void ItemOcarina_Init(Actor* thisx, GlobalContext* globalCtx); void ItemOcarina_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Item_Shield/z_item_shield.c b/src/overlays/actors/ovl_Item_Shield/z_item_shield.c index 6bc87f1a2a..33d669a082 100644 --- a/src/overlays/actors/ovl_Item_Shield/z_item_shield.c +++ b/src/overlays/actors/ovl_Item_Shield/z_item_shield.c @@ -8,7 +8,7 @@ #include "z_item_shield.h" #include "objects/object_link_child/object_link_child.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 void ItemShield_Init(Actor* thisx, GlobalContext* globalCtx); void ItemShield_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Magic_Dark/z_magic_dark.c b/src/overlays/actors/ovl_Magic_Dark/z_magic_dark.c index 8bab4fefa6..823f635a31 100644 --- a/src/overlays/actors/ovl_Magic_Dark/z_magic_dark.c +++ b/src/overlays/actors/ovl_Magic_Dark/z_magic_dark.c @@ -7,7 +7,7 @@ #include "z_magic_dark.h" #include "objects/gameplay_keep/gameplay_keep.h" -#define FLAGS 0x02000010 +#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_25) void MagicDark_Init(Actor* thisx, GlobalContext* globalCtx); void MagicDark_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Magic_Fire/z_magic_fire.c b/src/overlays/actors/ovl_Magic_Fire/z_magic_fire.c index a7fe449427..fb3447af6d 100644 --- a/src/overlays/actors/ovl_Magic_Fire/z_magic_fire.c +++ b/src/overlays/actors/ovl_Magic_Fire/z_magic_fire.c @@ -6,7 +6,7 @@ #include "z_magic_fire.h" -#define FLAGS 0x02000010 +#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_25) void MagicFire_Init(Actor* thisx, GlobalContext* globalCtx); void MagicFire_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Magic_Wind/z_magic_wind.c b/src/overlays/actors/ovl_Magic_Wind/z_magic_wind.c index c805f98bbc..6ac1ee4656 100644 --- a/src/overlays/actors/ovl_Magic_Wind/z_magic_wind.c +++ b/src/overlays/actors/ovl_Magic_Wind/z_magic_wind.c @@ -6,7 +6,7 @@ #include "z_magic_wind.h" -#define FLAGS 0x02000010 +#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_25) void MagicWind_Init(Actor* thisx, GlobalContext* globalCtx); void MagicWind_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Mir_Ray/z_mir_ray.c b/src/overlays/actors/ovl_Mir_Ray/z_mir_ray.c index fc387a68ad..229072b1e1 100644 --- a/src/overlays/actors/ovl_Mir_Ray/z_mir_ray.c +++ b/src/overlays/actors/ovl_Mir_Ray/z_mir_ray.c @@ -7,7 +7,7 @@ #include "z_mir_ray.h" #include "objects/object_mir_ray/object_mir_ray.h" -#define FLAGS 0x00000030 +#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5) void MirRay_Init(Actor* thisx, GlobalContext* globalCtx); void MirRay_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Obj_Bean/z_obj_bean.c b/src/overlays/actors/ovl_Obj_Bean/z_obj_bean.c index 6bf38d39ec..096e130584 100644 --- a/src/overlays/actors/ovl_Obj_Bean/z_obj_bean.c +++ b/src/overlays/actors/ovl_Obj_Bean/z_obj_bean.c @@ -9,7 +9,7 @@ #include "objects/gameplay_keep/gameplay_keep.h" #include "vt.h" -#define FLAGS 0x00400000 +#define FLAGS ACTOR_FLAG_22 void ObjBean_Init(Actor* thisx, GlobalContext* globalCtx); void ObjBean_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -638,7 +638,7 @@ void ObjBean_WaitForWater(ObjBean* this, GlobalContext* globalCtx) { ObjBean_SetupGrowWaterPhase1(this); D_80B90E30 = this; OnePointCutscene_Init(globalCtx, 2210, -99, &this->dyna.actor, MAIN_CAM); - this->dyna.actor.flags |= 0x10; + this->dyna.actor.flags |= ACTOR_FLAG_4; return; } @@ -741,7 +741,7 @@ void ObjBean_GrowWaterPhase5(ObjBean* this, GlobalContext* globalCtx) { this->transformFunc(this); if (this->timer <= 0) { func_80B8FF50(this); - this->dyna.actor.flags &= ~0x10; + this->dyna.actor.flags &= ~ACTOR_FLAG_4; } } @@ -766,7 +766,7 @@ void ObjBean_SetupFly(ObjBean* this) { this->actionFunc = ObjBean_Fly; ObjBean_SetDrawMode(this, BEAN_STATE_DRAW_PLANT); this->dyna.actor.speedXZ = 0.0f; - this->dyna.actor.flags |= 0x10; // Never stop updating + this->dyna.actor.flags |= ACTOR_FLAG_4; // Never stop updating } void ObjBean_Fly(ObjBean* this, GlobalContext* globalCtx) { @@ -778,7 +778,7 @@ void ObjBean_Fly(ObjBean* this, GlobalContext* globalCtx) { ObjBean_SetupPath(this, globalCtx); ObjBean_SetupWaitForStepOff(this); - this->dyna.actor.flags &= ~0x10; // Never stop updating (disable) + this->dyna.actor.flags &= ~ACTOR_FLAG_4; // Never stop updating (disable) camera = globalCtx->cameraPtrs[MAIN_CAM]; if ((camera->setting == CAM_SET_BEAN_LOST_WOODS) || (camera->setting == CAM_SET_BEAN_GENERIC)) { diff --git a/src/overlays/actors/ovl_Obj_Blockstop/z_obj_blockstop.c b/src/overlays/actors/ovl_Obj_Blockstop/z_obj_blockstop.c index 0f1e1c6159..27ddda3c9e 100644 --- a/src/overlays/actors/ovl_Obj_Blockstop/z_obj_blockstop.c +++ b/src/overlays/actors/ovl_Obj_Blockstop/z_obj_blockstop.c @@ -7,7 +7,7 @@ #include "z_obj_blockstop.h" #include "overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.h" -#define FLAGS 0x00000000 +#define FLAGS 0 void ObjBlockstop_Init(Actor* thisx, GlobalContext* globalCtx); void ObjBlockstop_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Obj_Bombiwa/z_obj_bombiwa.c b/src/overlays/actors/ovl_Obj_Bombiwa/z_obj_bombiwa.c index 24821cfda3..0c5bca7de4 100644 --- a/src/overlays/actors/ovl_Obj_Bombiwa/z_obj_bombiwa.c +++ b/src/overlays/actors/ovl_Obj_Bombiwa/z_obj_bombiwa.c @@ -8,7 +8,7 @@ #include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h" #include "objects/object_bombiwa/object_bombiwa.h" -#define FLAGS 0x00000000 +#define FLAGS 0 void ObjBombiwa_Init(Actor* thisx, GlobalContext* globalCtx); void ObjBombiwa_InitCollision(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c b/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c index 07da48a0d8..f8ebfe607c 100644 --- a/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c +++ b/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c @@ -8,7 +8,7 @@ #include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h" #include "objects/gameplay_field_keep/gameplay_field_keep.h" -#define FLAGS 0x00000000 +#define FLAGS 0 void ObjComb_Init(Actor* thisx, GlobalContext* globalCtx); void ObjComb_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Obj_Dekujr/z_obj_dekujr.c b/src/overlays/actors/ovl_Obj_Dekujr/z_obj_dekujr.c index 1c81419ea4..2d3ed78ee2 100644 --- a/src/overlays/actors/ovl_Obj_Dekujr/z_obj_dekujr.c +++ b/src/overlays/actors/ovl_Obj_Dekujr/z_obj_dekujr.c @@ -7,7 +7,7 @@ #include "z_obj_dekujr.h" #include "objects/object_dekujr/object_dekujr.h" -#define FLAGS 0x00000009 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3) void ObjDekujr_Init(Actor* thisx, GlobalContext* globalCtx); void ObjDekujr_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Obj_Elevator/z_obj_elevator.c b/src/overlays/actors/ovl_Obj_Elevator/z_obj_elevator.c index fd02c53416..74b52faff6 100644 --- a/src/overlays/actors/ovl_Obj_Elevator/z_obj_elevator.c +++ b/src/overlays/actors/ovl_Obj_Elevator/z_obj_elevator.c @@ -7,7 +7,7 @@ #include "z_obj_elevator.h" #include "objects/object_d_elevator/object_d_elevator.h" -#define FLAGS 0x00000000 +#define FLAGS 0 void ObjElevator_Init(Actor* thisx, GlobalContext* globalCtx); void ObjElevator_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Obj_Hamishi/z_obj_hamishi.c b/src/overlays/actors/ovl_Obj_Hamishi/z_obj_hamishi.c index f22b2422f0..3d18456188 100644 --- a/src/overlays/actors/ovl_Obj_Hamishi/z_obj_hamishi.c +++ b/src/overlays/actors/ovl_Obj_Hamishi/z_obj_hamishi.c @@ -7,7 +7,7 @@ #include "z_obj_hamishi.h" #include "objects/gameplay_field_keep/gameplay_field_keep.h" -#define FLAGS 0x00000000 +#define FLAGS 0 void ObjHamishi_Init(Actor* thisx, GlobalContext* globalCtx); void ObjHamishi_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Obj_Hana/z_obj_hana.c b/src/overlays/actors/ovl_Obj_Hana/z_obj_hana.c index 259429dd3d..20ec4e5d8f 100644 --- a/src/overlays/actors/ovl_Obj_Hana/z_obj_hana.c +++ b/src/overlays/actors/ovl_Obj_Hana/z_obj_hana.c @@ -7,7 +7,7 @@ #include "z_obj_hana.h" #include "objects/gameplay_field_keep/gameplay_field_keep.h" -#define FLAGS 0x00000000 +#define FLAGS 0 void ObjHana_Init(Actor* thisx, GlobalContext* globalCtx); void ObjHana_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Obj_Hsblock/z_obj_hsblock.c b/src/overlays/actors/ovl_Obj_Hsblock/z_obj_hsblock.c index 9d72d42e7e..26dc98e73a 100644 --- a/src/overlays/actors/ovl_Obj_Hsblock/z_obj_hsblock.c +++ b/src/overlays/actors/ovl_Obj_Hsblock/z_obj_hsblock.c @@ -7,7 +7,7 @@ #include "z_obj_hsblock.h" #include "objects/object_d_hsblock/object_d_hsblock.h" -#define FLAGS 0x00000000 +#define FLAGS 0 void ObjHsblock_Init(Actor* thisx, GlobalContext* globalCtx); void ObjHsblock_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -110,7 +110,7 @@ void func_80B93D90(ObjHsblock* this) { } void func_80B93DB0(ObjHsblock* this) { - this->dyna.actor.flags |= 0x10; + this->dyna.actor.flags |= ACTOR_FLAG_4; this->dyna.actor.world.pos.y = this->dyna.actor.home.pos.y - 105.0f; ObjHsblock_SetupAction(this, func_80B93DF4); } @@ -131,7 +131,7 @@ void func_80B93E5C(ObjHsblock* this, GlobalContext* globalCtx) { this->dyna.actor.velocity.y, 0.3f)) < 0.001f) { this->dyna.actor.world.pos.y = this->dyna.actor.home.pos.y; func_80B93D90(this); - this->dyna.actor.flags &= ~0x10; + this->dyna.actor.flags &= ~ACTOR_FLAG_4; } } diff --git a/src/overlays/actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.c b/src/overlays/actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.c index dd0486a00c..210200d534 100644 --- a/src/overlays/actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.c +++ b/src/overlays/actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.c @@ -7,7 +7,7 @@ #include "z_obj_ice_poly.h" #include "objects/gameplay_keep/gameplay_keep.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 void ObjIcePoly_Init(Actor* thisx, GlobalContext* globalCtx); void ObjIcePoly_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Obj_Kibako/z_obj_kibako.c b/src/overlays/actors/ovl_Obj_Kibako/z_obj_kibako.c index 6d8e092308..162ae81357 100644 --- a/src/overlays/actors/ovl_Obj_Kibako/z_obj_kibako.c +++ b/src/overlays/actors/ovl_Obj_Kibako/z_obj_kibako.c @@ -8,7 +8,7 @@ #include "objects/gameplay_dangeon_keep/gameplay_dangeon_keep.h" #include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h" -#define FLAGS 0x04000010 +#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_26) void ObjKibako_Init(Actor* thisx, GlobalContext* globalCtx); void ObjKibako_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Obj_Kibako2/z_obj_kibako2.c b/src/overlays/actors/ovl_Obj_Kibako2/z_obj_kibako2.c index d0570ff1a4..998337f2ad 100644 --- a/src/overlays/actors/ovl_Obj_Kibako2/z_obj_kibako2.c +++ b/src/overlays/actors/ovl_Obj_Kibako2/z_obj_kibako2.c @@ -8,7 +8,7 @@ #include "objects/object_kibako2/object_kibako2.h" #include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h" -#define FLAGS 0x00000000 +#define FLAGS 0 void ObjKibako2_Init(Actor* thisx, GlobalContext* globalCtx); void ObjKibako2_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -147,7 +147,7 @@ void ObjKibako2_Idle(ObjKibako2* this, GlobalContext* globalCtx) { func_80033684(globalCtx, &this->dyna.actor) != NULL) { ObjKibako2_Break(this, globalCtx); Audio_PlaySoundAtPosition(globalCtx, &this->dyna.actor.world.pos, 20, NA_SE_EV_WOODBOX_BREAK); - this->dyna.actor.flags |= 0x10; + this->dyna.actor.flags |= ACTOR_FLAG_4; func_8003EBF8(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); this->dyna.actor.draw = NULL; this->actionFunc = ObjKibako2_Kill; diff --git a/src/overlays/actors/ovl_Obj_Lift/z_obj_lift.c b/src/overlays/actors/ovl_Obj_Lift/z_obj_lift.c index c96b548b0f..3e6c32ad2c 100644 --- a/src/overlays/actors/ovl_Obj_Lift/z_obj_lift.c +++ b/src/overlays/actors/ovl_Obj_Lift/z_obj_lift.c @@ -8,7 +8,7 @@ #include "objects/object_d_lift/object_d_lift.h" #include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 void ObjLift_Init(Actor* thisx, GlobalContext* globalCtx); void ObjLift_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.c b/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.c index dcc83a4de5..c89d8e0476 100644 --- a/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.c +++ b/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.c @@ -9,7 +9,7 @@ #include "overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.h" #include "objects/object_lightswitch/object_lightswitch.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 typedef enum { /* 0x00 */ FACE_EYES_CLOSED, @@ -184,7 +184,7 @@ void ObjLightswitch_Init(Actor* thisx, GlobalContext* globalCtx) { this->actor.shape.rot.z = 0; this->actor.world.rot.x = this->actor.home.rot.x = this->actor.shape.rot.x; this->actor.world.rot.z = this->actor.home.rot.z = this->actor.shape.rot.z; - this->actor.flags |= 0x20; + this->actor.flags |= ACTOR_FLAG_5; if (Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_OBJ_OSHIHIKI, this->actor.home.pos.x, this->actor.home.pos.y, this->actor.home.pos.z, 0, this->actor.home.rot.y, 0, (0xFF << 8) | PUSHBLOCK_SMALL_START_ON) == NULL) { diff --git a/src/overlays/actors/ovl_Obj_Makekinsuta/z_obj_makekinsuta.c b/src/overlays/actors/ovl_Obj_Makekinsuta/z_obj_makekinsuta.c index 8c1be1246b..3a119ad36d 100644 --- a/src/overlays/actors/ovl_Obj_Makekinsuta/z_obj_makekinsuta.c +++ b/src/overlays/actors/ovl_Obj_Makekinsuta/z_obj_makekinsuta.c @@ -7,7 +7,7 @@ #include "z_obj_makekinsuta.h" #include "vt.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 void ObjMakekinsuta_Init(Actor* thisx, GlobalContext* globalCtx); void ObjMakekinsuta_Update(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Obj_Makeoshihiki/z_obj_makeoshihiki.c b/src/overlays/actors/ovl_Obj_Makeoshihiki/z_obj_makeoshihiki.c index c6976f4446..50704ed41a 100644 --- a/src/overlays/actors/ovl_Obj_Makeoshihiki/z_obj_makeoshihiki.c +++ b/src/overlays/actors/ovl_Obj_Makeoshihiki/z_obj_makeoshihiki.c @@ -8,7 +8,7 @@ #include "overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.h" #include "vt.h" -#define FLAGS 0x00000020 +#define FLAGS ACTOR_FLAG_5 void ObjMakeoshihiki_Init(Actor* thisx, GlobalContext* globalCtx); void ObjMakeoshihiki_Draw(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Obj_Mure/z_obj_mure.c b/src/overlays/actors/ovl_Obj_Mure/z_obj_mure.c index 33654d9838..a7a370f5b4 100644 --- a/src/overlays/actors/ovl_Obj_Mure/z_obj_mure.c +++ b/src/overlays/actors/ovl_Obj_Mure/z_obj_mure.c @@ -6,7 +6,7 @@ #include "z_obj_mure.h" -#define FLAGS 0x00000000 +#define FLAGS 0 void ObjMure_Init(Actor* thisx, GlobalContext* globalCtx); void ObjMure_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -154,7 +154,7 @@ void ObjMure_SpawnActors0(ObjMure* this, GlobalContext* globalCtx) { Actor_Spawn(ac, globalCtx, sSpawnActorIds[this->type], pos.x, pos.y, pos.z, this->actor.world.rot.x, this->actor.world.rot.y, this->actor.world.rot.z, sSpawnParams[this->type]); if (this->children[i] != NULL) { - this->children[i]->flags |= 0x800; + this->children[i]->flags |= ACTOR_FLAG_11; this->children[i]->room = this->actor.room; } else { osSyncPrintf("warning 発生失敗 (%s %d)\n", "../z_obj_mure.c", 359); @@ -254,7 +254,7 @@ void ObjMure_CheckChildren(ObjMure* this, GlobalContext* globalCtx) { if (this->children[i] != NULL) { if (this->childrenStates[i] == OBJMURE_CHILD_STATE_0) { if (this->children[i]->update != NULL) { - if (this->children[i]->flags & 0x800) { + if (this->children[i]->flags & ACTOR_FLAG_11) { this->childrenStates[i] = OBJMURE_CHILD_STATE_2; } } else { @@ -276,7 +276,7 @@ void ObjMure_InitialAction(ObjMure* this, GlobalContext* globalCtx) { void ObjMure_CulledState(ObjMure* this, GlobalContext* globalCtx) { if (fabsf(this->actor.projectedPos.z) < sZClip[this->type]) { this->actionFunc = ObjMure_ActiveState; - this->actor.flags |= 0x10; + this->actor.flags |= ACTOR_FLAG_4; ObjMure_SpawnActors(this, globalCtx); } } @@ -399,7 +399,7 @@ void ObjMure_ActiveState(ObjMure* this, GlobalContext* globalCtx) { ObjMure_CheckChildren(this, globalCtx); if (sZClip[this->type] + 40.0f <= fabsf(this->actor.projectedPos.z)) { this->actionFunc = ObjMure_CulledState; - this->actor.flags &= ~0x10; + this->actor.flags &= ~ACTOR_FLAG_4; ObjMure_KillActors(this, globalCtx); } else if (sTypeGroupBehaviorFunc[this->type] != NULL) { sTypeGroupBehaviorFunc[this->type](this, globalCtx); diff --git a/src/overlays/actors/ovl_Obj_Mure2/z_obj_mure2.c b/src/overlays/actors/ovl_Obj_Mure2/z_obj_mure2.c index 757541e210..8ec37ecbf6 100644 --- a/src/overlays/actors/ovl_Obj_Mure2/z_obj_mure2.c +++ b/src/overlays/actors/ovl_Obj_Mure2/z_obj_mure2.c @@ -6,7 +6,7 @@ #include "z_obj_mure2.h" -#define FLAGS 0x00000000 +#define FLAGS 0 typedef void (*ObjMure2SetPosFunc)(Vec3f* vec, ObjMure2* this); @@ -190,7 +190,7 @@ void func_80B9A658(ObjMure2* this) { void func_80B9A668(ObjMure2* this, GlobalContext* globalCtx) { if (Math3D_Dist1DSq(this->actor.projectedPos.x, this->actor.projectedPos.z) < (sDistSquared1[this->actor.params & 3] * this->unk_184)) { - this->actor.flags |= 0x10; + this->actor.flags |= ACTOR_FLAG_4; ObjMure2_SpawnActors(this, globalCtx); func_80B9A6E8(this); } @@ -204,7 +204,7 @@ void func_80B9A6F8(ObjMure2* this, GlobalContext* globalCtx) { func_80B9A534(this); if ((sDistSquared2[this->actor.params & 3] * this->unk_184) <= Math3D_Dist1DSq(this->actor.projectedPos.x, this->actor.projectedPos.z)) { - this->actor.flags &= ~0x10; + this->actor.flags &= ~ACTOR_FLAG_4; ObjMure2_CleanupAndDie(this, globalCtx); func_80B9A658(this); } diff --git a/src/overlays/actors/ovl_Obj_Mure3/z_obj_mure3.c b/src/overlays/actors/ovl_Obj_Mure3/z_obj_mure3.c index 1b5200ff72..83634e255d 100644 --- a/src/overlays/actors/ovl_Obj_Mure3/z_obj_mure3.c +++ b/src/overlays/actors/ovl_Obj_Mure3/z_obj_mure3.c @@ -6,7 +6,7 @@ #include "z_obj_mure3.h" -#define FLAGS 0x00000000 +#define FLAGS 0 void ObjMure3_Init(Actor* thisx, GlobalContext* globalCtx); void ObjMure3_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -171,7 +171,7 @@ void func_80B9AF64(ObjMure3* this, GlobalContext* globalCtx) { static ObjMure3SpawnFunc spawnFuncs[] = { func_80B9A9D0, func_80B9AA90, func_80B9ABA0 }; if (Math3D_Dist1DSq(this->actor.projectedPos.x, this->actor.projectedPos.z) < SQ(1150.0f)) { - this->actor.flags |= 0x10; + this->actor.flags |= ACTOR_FLAG_4; spawnFuncs[(this->actor.params >> 13) & 7](this, globalCtx); func_80B9AFEC(this); } @@ -184,7 +184,7 @@ void func_80B9AFEC(ObjMure3* this) { void func_80B9AFFC(ObjMure3* this, GlobalContext* globalCtx) { func_80B9ADCC(this, globalCtx); if (Math3D_Dist1DSq(this->actor.projectedPos.x, this->actor.projectedPos.z) >= SQ(1450.0f)) { - this->actor.flags &= ~0x10; + this->actor.flags &= ~ACTOR_FLAG_4; func_80B9ACE4(this, globalCtx); func_80B9AF54(this); } diff --git a/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c b/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c index db69fd0d23..eafbe9e3af 100644 --- a/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c +++ b/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c @@ -8,7 +8,7 @@ #include "overlays/actors/ovl_Obj_Switch/z_obj_switch.h" #include "objects/gameplay_dangeon_keep/gameplay_dangeon_keep.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 void ObjOshihiki_Init(Actor* thisx, GlobalContext* globalCtx); void ObjOshihiki_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Obj_Roomtimer/z_obj_roomtimer.c b/src/overlays/actors/ovl_Obj_Roomtimer/z_obj_roomtimer.c index 6e476a5c2c..66f86b6b2a 100644 --- a/src/overlays/actors/ovl_Obj_Roomtimer/z_obj_roomtimer.c +++ b/src/overlays/actors/ovl_Obj_Roomtimer/z_obj_roomtimer.c @@ -6,7 +6,7 @@ #include "z_obj_roomtimer.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 void ObjRoomtimer_Init(Actor* thisx, GlobalContext* globalCtx); void ObjRoomtimer_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c b/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c index d3eb5f668c..4e85a691d0 100644 --- a/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c +++ b/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c @@ -8,7 +8,7 @@ #include "objects/gameplay_dangeon_keep/gameplay_dangeon_keep.h" #include "vt.h" -#define FLAGS 0x00000010 +#define FLAGS ACTOR_FLAG_4 // type: (this->dyna.actor.params & 7) // subtype: (this->dyna.actor.params >> 4 & 7) @@ -306,7 +306,7 @@ void ObjSwitch_Init(Actor* thisx, GlobalContext* globalCtx) { } if (type == OBJSWITCH_TYPE_CRYSTAL_TARGETABLE) { - this->dyna.actor.flags |= 1; + this->dyna.actor.flags |= ACTOR_FLAG_0; this->dyna.actor.targetMode = 4; } diff --git a/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.c b/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.c index 55a3c47983..dc1021da6e 100644 --- a/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.c +++ b/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.c @@ -9,7 +9,7 @@ #include "objects/gameplay_keep/gameplay_keep.h" #include "objects/object_syokudai/object_syokudai.h" -#define FLAGS 0x00000410 +#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_10) void ObjSyokudai_Init(Actor* thisx, GlobalContext* globalCtx); void ObjSyokudai_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Obj_Timeblock/z_obj_timeblock.c b/src/overlays/actors/ovl_Obj_Timeblock/z_obj_timeblock.c index aa036d05ab..1a484099db 100644 --- a/src/overlays/actors/ovl_Obj_Timeblock/z_obj_timeblock.c +++ b/src/overlays/actors/ovl_Obj_Timeblock/z_obj_timeblock.c @@ -7,7 +7,7 @@ #include "z_obj_timeblock.h" #include "objects/object_timeblock/object_timeblock.h" -#define FLAGS 0x0A000011 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_4 | ACTOR_FLAG_25 | ACTOR_FLAG_27) void ObjTimeblock_Init(Actor* thisx, GlobalContext* globalCtx); void ObjTimeblock_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.c b/src/overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.c index e6fb09be01..843cf0dc1b 100644 --- a/src/overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.c +++ b/src/overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.c @@ -9,7 +9,7 @@ #include "objects/gameplay_dangeon_keep/gameplay_dangeon_keep.h" #include "objects/object_tsubo/object_tsubo.h" -#define FLAGS 0x00800010 +#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_23) void ObjTsubo_Init(Actor* thisx, GlobalContext* globalCtx); void ObjTsubo_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -226,7 +226,7 @@ void ObjTsubo_WaitForObject(ObjTsubo* this, GlobalContext* globalCtx) { this->actor.draw = ObjTsubo_Draw; this->actor.objBankIndex = this->objTsuboBankIndex; ObjTsubo_SetupIdle(this); - this->actor.flags &= ~0x10; + this->actor.flags &= ~ACTOR_FLAG_4; } } @@ -276,7 +276,7 @@ void ObjTsubo_SetupLiftedUp(ObjTsubo* this) { this->actionFunc = ObjTsubo_LiftedUp; this->actor.room = -1; func_8002F7DC(&this->actor, NA_SE_PL_PULL_UP_POT); - this->actor.flags |= 0x10; + this->actor.flags |= ACTOR_FLAG_4; } void ObjTsubo_LiftedUp(ObjTsubo* this, GlobalContext* globalCtx) { diff --git a/src/overlays/actors/ovl_Obj_Warp2block/z_obj_warp2block.c b/src/overlays/actors/ovl_Obj_Warp2block/z_obj_warp2block.c index 41b997afbc..182987c2bd 100644 --- a/src/overlays/actors/ovl_Obj_Warp2block/z_obj_warp2block.c +++ b/src/overlays/actors/ovl_Obj_Warp2block/z_obj_warp2block.c @@ -8,7 +8,7 @@ #include "objects/object_timeblock/object_timeblock.h" #include "vt.h" -#define FLAGS 0x0A000011 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_4 | ACTOR_FLAG_25 | ACTOR_FLAG_27) void ObjWarp2block_Init(Actor* thisx, GlobalContext* globalCtx); void ObjWarp2block_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.c b/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.c index 073477c6c8..df0201c4ca 100644 --- a/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.c +++ b/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.c @@ -9,7 +9,7 @@ #include "objects/gameplay_keep/gameplay_keep.h" #include "objects/object_spot02_objects/object_spot02_objects.h" -#define FLAGS 0x02000030 +#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5 | ACTOR_FLAG_25) void ObjectKankyo_Init(Actor* thisx, GlobalContext* globalCtx); void ObjectKankyo_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Oceff_Spot/z_oceff_spot.c b/src/overlays/actors/ovl_Oceff_Spot/z_oceff_spot.c index f2696aed63..2e631ce6d8 100644 --- a/src/overlays/actors/ovl_Oceff_Spot/z_oceff_spot.c +++ b/src/overlays/actors/ovl_Oceff_Spot/z_oceff_spot.c @@ -7,7 +7,7 @@ #include "z_oceff_spot.h" #include "vt.h" -#define FLAGS 0x02000010 +#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_25) void OceffSpot_Init(Actor* thisx, GlobalContext* globalCtx); void OceffSpot_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Oceff_Storm/z_oceff_storm.c b/src/overlays/actors/ovl_Oceff_Storm/z_oceff_storm.c index c5a4c71c79..13395a0dfe 100644 --- a/src/overlays/actors/ovl_Oceff_Storm/z_oceff_storm.c +++ b/src/overlays/actors/ovl_Oceff_Storm/z_oceff_storm.c @@ -6,7 +6,7 @@ #include "z_oceff_storm.h" -#define FLAGS 0x02000030 +#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_5 | ACTOR_FLAG_25) void OceffStorm_Init(Actor* thisx, GlobalContext* globalCtx); void OceffStorm_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.c b/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.c index bf2c497547..84951dbac4 100644 --- a/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.c +++ b/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.c @@ -7,7 +7,7 @@ #include "z_oceff_wipe.h" #include "vt.h" -#define FLAGS 0x02000010 +#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_25) void OceffWipe_Init(Actor* thisx, GlobalContext* globalCtx); void OceffWipe_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Oceff_Wipe2/z_oceff_wipe2.c b/src/overlays/actors/ovl_Oceff_Wipe2/z_oceff_wipe2.c index fd7524a5c8..6fe8aaeba1 100644 --- a/src/overlays/actors/ovl_Oceff_Wipe2/z_oceff_wipe2.c +++ b/src/overlays/actors/ovl_Oceff_Wipe2/z_oceff_wipe2.c @@ -7,7 +7,7 @@ #include "z_oceff_wipe2.h" #include "vt.h" -#define FLAGS 0x02000010 +#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_25) void OceffWipe2_Init(Actor* thisx, GlobalContext* globalCtx); void OceffWipe2_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Oceff_Wipe3/z_oceff_wipe3.c b/src/overlays/actors/ovl_Oceff_Wipe3/z_oceff_wipe3.c index f6ba5f6704..8c36cd9103 100644 --- a/src/overlays/actors/ovl_Oceff_Wipe3/z_oceff_wipe3.c +++ b/src/overlays/actors/ovl_Oceff_Wipe3/z_oceff_wipe3.c @@ -7,7 +7,7 @@ #include "z_oceff_wipe3.h" #include "vt.h" -#define FLAGS 0x02000010 +#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_25) void OceffWipe3_Init(Actor* thisx, GlobalContext* globalCtx); void OceffWipe3_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Oceff_Wipe4/z_oceff_wipe4.c b/src/overlays/actors/ovl_Oceff_Wipe4/z_oceff_wipe4.c index 95b4b846dc..4b18b93f42 100644 --- a/src/overlays/actors/ovl_Oceff_Wipe4/z_oceff_wipe4.c +++ b/src/overlays/actors/ovl_Oceff_Wipe4/z_oceff_wipe4.c @@ -7,7 +7,7 @@ #include "z_oceff_wipe4.h" #include "vt.h" -#define FLAGS 0x02000010 +#define FLAGS (ACTOR_FLAG_4 | ACTOR_FLAG_25) void OceffWipe4_Init(Actor* thisx, GlobalContext* globalCtx); void OceffWipe4_Destroy(Actor* thisx, GlobalContext* globalCtx); diff --git a/src/overlays/actors/ovl_Shot_Sun/z_shot_sun.c b/src/overlays/actors/ovl_Shot_Sun/z_shot_sun.c index 85d10f21ee..250df0f2bf 100644 --- a/src/overlays/actors/ovl_Shot_Sun/z_shot_sun.c +++ b/src/overlays/actors/ovl_Shot_Sun/z_shot_sun.c @@ -9,7 +9,7 @@ #include "scenes/overworld/spot06/spot06_scene.h" #include "vt.h" -#define FLAGS 0x00000009 +#define FLAGS (ACTOR_FLAG_0 | ACTOR_FLAG_3) void ShotSun_Init(Actor* thisx, GlobalContext* globalCtx); void ShotSun_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -61,15 +61,15 @@ void ShotSun_Init(Actor* thisx, GlobalContext* globalCtx) { params = this->actor.params & 0xFF; if (params == 0x40 || params == 0x41) { this->unk_1A4 = 0; - this->actor.flags |= 0x10; - this->actor.flags |= 0x2000000; + this->actor.flags |= ACTOR_FLAG_4; + this->actor.flags |= ACTOR_FLAG_25; this->actionFunc = func_80BADF0C; - this->actor.flags |= 0x8000000; + this->actor.flags |= ACTOR_FLAG_27; } else { Collider_InitCylinder(globalCtx, &this->collider); Collider_SetCylinder(globalCtx, &this->collider, &this->actor, &sCylinderInit); this->actionFunc = ShotSun_UpdateHyliaSun; - this->actor.flags &= ~1; + this->actor.flags &= ~ACTOR_FLAG_0; } } diff --git a/src/overlays/actors/ovl_player_actor/z_player.c b/src/overlays/actors/ovl_player_actor/z_player.c index 6a896557d2..15036bee57 100644 --- a/src/overlays/actors/ovl_player_actor/z_player.c +++ b/src/overlays/actors/ovl_player_actor/z_player.c @@ -1151,7 +1151,7 @@ s32 func_80832224(Player* this) { s32 func_8083224C(GlobalContext* globalCtx) { Player* this = GET_PLAYER(globalCtx); - return (this->actor.flags & 0x100) == 0x100; + return CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_8); } void func_80832264(GlobalContext* globalCtx, Player* this, LinkAnimationHeader* anim) { @@ -1814,7 +1814,7 @@ s32 func_80833B2C(Player* this) { } s32 func_80833B54(Player* this) { - if ((this->unk_664 != NULL) && ((this->unk_664->flags & 5) == 5)) { + if ((this->unk_664 != NULL) && CHECK_FLAG_ALL(this->unk_664->flags, ACTOR_FLAG_0 | ACTOR_FLAG_2)) { this->stateFlags1 |= 0x10; return 1; } @@ -3000,7 +3000,7 @@ void func_80836BEC(Player* this, GlobalContext* globalCtx) { holdTarget = (gSaveContext.zTargetSetting != 0) || (this->actor.category != ACTORCAT_PLAYER); this->stateFlags1 |= 0x8000; - if ((actorToTarget != NULL) && !(actorToTarget->flags & 0x8000000)) { + if ((actorToTarget != NULL) && !(actorToTarget->flags & ACTOR_FLAG_27)) { if ((actorToTarget == this->unk_664) && (this->actor.category == ACTORCAT_PLAYER)) { actorToTarget = globalCtx->actorCtx.targetCtx.unk_94; } @@ -3041,7 +3041,7 @@ void func_80836BEC(Player* this, GlobalContext* globalCtx) { if (this->unk_664 != NULL) { this->stateFlags1 &= ~0x30000; - if ((this->stateFlags1 & 0x800) || ((this->unk_664->flags & 5) != 5)) { + if ((this->stateFlags1 & 0x800) || !CHECK_FLAG_ALL(this->unk_664->flags, ACTOR_FLAG_0 | ACTOR_FLAG_2)) { this->stateFlags1 |= 0x10000; } } else { @@ -3712,7 +3712,7 @@ s32 func_808382DC(Player* this, GlobalContext* globalCtx) { Actor* ac = this->cylinder.base.ac; s32 sp4C; - if (ac->flags & 0x1000000) { + if (ac->flags & ACTOR_FLAG_24) { func_8002F7DC(&this->actor, NA_SE_PL_BODY_HIT); } @@ -4760,7 +4760,7 @@ s32 func_8083B040(Player* this, GlobalContext* globalCtx) { this->unk_850 = 0x50; this->unk_84F = -1; } - targetActor->flags |= 0x100; + targetActor->flags |= ACTOR_FLAG_8; this->unk_664 = this->targetActor; } else if (sp2C == EXCH_ITEM_LETTER_RUTO) { this->unk_84F = 1; @@ -4772,7 +4772,7 @@ s32 func_8083B040(Player* this, GlobalContext* globalCtx) { func_80835EA4(globalCtx, 4); } - this->actor.flags |= 0x100; + this->actor.flags |= ACTOR_FLAG_8; this->exchangeItemId = sp2C; if (this->unk_84F < 0) { @@ -4844,7 +4844,7 @@ s32 func_8083B644(Player* this, GlobalContext* globalCtx) { s32 sp28 = 0; s32 sp24; - sp24 = (sp30 != NULL) && (((sp30->flags & 0x40001) == 0x40001) || (sp30->naviEnemyId != 0xFF)); + sp24 = (sp30 != NULL) && (CHECK_FLAG_ALL(sp30->flags, ACTOR_FLAG_0 | ACTOR_FLAG_18) || (sp30->naviEnemyId != 0xFF)); if (sp24 || (this->naviTextId != 0)) { sp28 = (this->naviTextId < 0) && ((ABS(this->naviTextId) & 0xFF00) != 0x200); @@ -4863,13 +4863,13 @@ s32 func_8083B644(Player* this, GlobalContext* globalCtx) { if ((sp30 == NULL) || (sp30 == sp34) || (sp30 == sp2C)) { if (!(this->stateFlags1 & 0x800) || ((this->heldActor != NULL) && (sp28 || (sp34 == this->heldActor) || (sp2C == this->heldActor) || - ((sp34 != NULL) && (sp34->flags & 0x10000))))) { + ((sp34 != NULL) && (sp34->flags & ACTOR_FLAG_16))))) { if ((this->actor.bgCheckFlags & 1) || (this->stateFlags1 & 0x800000) || (func_808332B8(this) && !(this->stateFlags2 & 0x400))) { if (sp34 != NULL) { this->stateFlags2 |= 2; - if (CHECK_BTN_ALL(sControlInput->press.button, BTN_A) || (sp34->flags & 0x10000)) { + if (CHECK_BTN_ALL(sControlInput->press.button, BTN_A) || (sp34->flags & ACTOR_FLAG_16)) { sp2C = NULL; } else if (sp2C == NULL) { return 0; @@ -4931,7 +4931,7 @@ s32 func_8083B998(Player* this, GlobalContext* globalCtx) { } if ((this->unk_664 != NULL) && - (((this->unk_664->flags & 0x40001) == 0x40001) || (this->unk_664->naviEnemyId != 0xFF))) { + (CHECK_FLAG_ALL(this->unk_664->flags, ACTOR_FLAG_0 | ACTOR_FLAG_18) || (this->unk_664->naviEnemyId != 0xFF))) { this->stateFlags2 |= 0x200000; } else if ((this->naviTextId == 0) && !func_8008E9C4(this) && CHECK_BTN_ALL(sControlInput->press.button, BTN_CUP) && (YREG(15) != 0x10) && (YREG(15) != 0x20) && !func_8083B8F4(this, globalCtx)) { @@ -5993,7 +5993,7 @@ void func_8083EA94(Player* this, GlobalContext* globalCtx) { } s32 func_8083EAF0(Player* this, Actor* actor) { - if ((actor != NULL) && !(actor->flags & 0x800000) && + if ((actor != NULL) && !(actor->flags & ACTOR_FLAG_23) && ((this->linearVelocity < 1.1f) || (actor->id == ACTOR_EN_BOM_CHU))) { return 0; } @@ -7383,7 +7383,7 @@ void func_8084279C(Player* this, GlobalContext* globalCtx) { func_8083A098(this, D_80853C44[this->modelAnimType], globalCtx); } - this->actor.flags &= ~0x100; + this->actor.flags &= ~ACTOR_FLAG_8; func_8005B1A4(Gameplay_GetCamera(globalCtx, 0)); } } @@ -9646,7 +9646,7 @@ void Player_UpdateCamAndSeqModes(GlobalContext* globalCtx, Player* this) { } else if (this->stateFlags2 & 0x100) { camMode = CAM_MODE_PUSHPULL; } else if ((unk_664 = this->unk_664) != NULL) { - if ((this->actor.flags & 0x100) == 0x100) { + if (CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_8)) { camMode = CAM_MODE_TALK; } else if (this->stateFlags1 & 0x10000) { if (this->stateFlags1 & 0x2000000) { @@ -10091,9 +10091,9 @@ void Player_UpdateCommon(Player* this, GlobalContext* globalCtx, Input* input) { func_80837B9C(this, globalCtx); } else if ((this->actor.bgCheckFlags & 1) || (this->stateFlags1 & 0x8000000)) { func_80836448(globalCtx, this, - func_808332B8(this) - ? &gPlayerAnim_003310 - : (this->shockTimer != 0) ? &gPlayerAnim_002F08 : &gPlayerAnim_002878); + func_808332B8(this) ? &gPlayerAnim_003310 + : (this->shockTimer != 0) ? &gPlayerAnim_002F08 + : &gPlayerAnim_002878); } } else { if ((this->actor.parent == NULL) && @@ -10166,7 +10166,7 @@ void Player_UpdateCommon(Player* this, GlobalContext* globalCtx, Input* input) { func_808368EC(this, globalCtx); - if ((this->actor.flags & 0x100) == 0x100) { + if (CHECK_FLAG_ALL(this->actor.flags, ACTOR_FLAG_8)) { this->targetActorDistance = 0.0f; } else { this->targetActor = NULL; @@ -10697,9 +10697,9 @@ void func_8084B530(Player* this, GlobalContext* globalCtx) { func_80836670(this, globalCtx); if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_CLOSING) { - this->actor.flags &= ~0x100; + this->actor.flags &= ~ACTOR_FLAG_8; - if ((this->targetActor->flags & 5) != 5) { + if (!CHECK_FLAG_ALL(this->targetActor->flags, ACTOR_FLAG_0 | ACTOR_FLAG_2)) { this->stateFlags2 &= ~0x2000; } @@ -12250,7 +12250,7 @@ void func_8084F104(Player* this, GlobalContext* globalCtx) { this->unk_862 = 0; if (targetActor->textId != 0xFFFF) { - this->actor.flags |= 0x100; + this->actor.flags |= ACTOR_FLAG_8; } func_80853148(globalCtx, targetActor); @@ -12274,7 +12274,7 @@ void func_8084F104(Player* this, GlobalContext* globalCtx) { this->unk_850 = 1; } else if (Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_CLOSING) { - this->actor.flags &= ~0x100; + this->actor.flags &= ~ACTOR_FLAG_8; this->unk_862 = 0; if (this->unk_84F == 1) { @@ -13985,7 +13985,7 @@ void func_80852C50(GlobalContext* globalCtx, Player* this, CsCmdActorAction* arg } if (linkCsAction == NULL) { - this->actor.flags &= ~0x40; + this->actor.flags &= ~ACTOR_FLAG_6; return; } @@ -14096,8 +14096,9 @@ void func_80853148(GlobalContext* globalCtx, Actor* actor) { Player* this = GET_PLAYER(globalCtx); s32 pad; - if ((this->targetActor != NULL) || (actor == this->naviActor) || ((actor->flags & 0x40001) == 0x40001)) { - actor->flags |= 0x100; + if ((this->targetActor != NULL) || (actor == this->naviActor) || + CHECK_FLAG_ALL(actor->flags, ACTOR_FLAG_0 | ACTOR_FLAG_18)) { + actor->flags |= ACTOR_FLAG_8; } this->targetActor = actor; @@ -14105,13 +14106,13 @@ void func_80853148(GlobalContext* globalCtx, Actor* actor) { if (actor->textId == 0xFFFF) { func_8002DF54(globalCtx, actor, 1); - actor->flags |= 0x100; + actor->flags |= ACTOR_FLAG_8; func_80832528(globalCtx, this); } else { - if (this->actor.flags & 0x100) { + if (this->actor.flags & ACTOR_FLAG_8) { this->actor.textId = 0; } else { - this->actor.flags |= 0x100; + this->actor.flags |= ACTOR_FLAG_8; this->actor.textId = actor->textId; } @@ -14153,7 +14154,7 @@ void func_80853148(GlobalContext* globalCtx, Actor* actor) { } if ((this->naviActor == this->targetActor) && ((this->targetActor->textId & 0xFF00) != 0x200)) { - this->naviActor->flags |= 0x100; + this->naviActor->flags |= ACTOR_FLAG_8; func_80835EA4(globalCtx, 0xB); } }