From e635e34265e5e1bc830193930fa1ea9fd552db8d Mon Sep 17 00:00:00 2001 From: fig02 Date: Sat, 4 Dec 2021 11:33:00 -0500 Subject: [PATCH] Remove THIS macro (#1047) * remove THIS * fix * forgot dorf --- src/code/z_en_a_keep.c | 8 +-- src/code/z_en_item00.c | 10 ++-- src/code/z_fbdemo_circle.c | 18 +++--- src/code/z_fbdemo_fade.c | 16 +++--- src/code/z_fbdemo_triforce.c | 18 +++--- src/code/z_fbdemo_wipe1.c | 18 +++--- .../actors/ovl_Arms_Hook/z_arms_hook.c | 10 ++-- .../actors/ovl_Arrow_Fire/z_arrow_fire.c | 8 +-- .../actors/ovl_Arrow_Ice/z_arrow_ice.c | 8 +-- .../actors/ovl_Arrow_Light/z_arrow_light.c | 8 +-- .../ovl_Bg_Bdan_Objects/z_bg_bdan_objects.c | 10 ++-- .../ovl_Bg_Bdan_Switch/z_bg_bdan_switch.c | 10 ++-- .../actors/ovl_Bg_Bom_Guard/z_bg_bom_guard.c | 8 +-- .../actors/ovl_Bg_Bombwall/z_bg_bombwall.c | 10 ++-- .../actors/ovl_Bg_Bowl_Wall/z_bg_bowl_wall.c | 10 ++-- .../actors/ovl_Bg_Breakwall/z_bg_breakwall.c | 10 ++-- .../actors/ovl_Bg_Ddan_Jd/z_bg_ddan_jd.c | 8 +-- .../actors/ovl_Bg_Ddan_Kd/z_bg_ddan_kd.c | 8 +-- .../actors/ovl_Bg_Dodoago/z_bg_dodoago.c | 8 +-- .../ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.c | 10 ++-- .../ovl_Bg_Ganon_Otyuka/z_bg_ganon_otyuka.c | 10 ++-- .../ovl_Bg_Gate_Shutter/z_bg_gate_shutter.c | 8 +-- .../ovl_Bg_Gjyo_Bridge/z_bg_gjyo_bridge.c | 10 ++-- .../ovl_Bg_Gnd_Darkmeiro/z_bg_gnd_darkmeiro.c | 10 ++-- .../ovl_Bg_Gnd_Firemeiro/z_bg_gnd_firemeiro.c | 8 +-- .../ovl_Bg_Gnd_Iceblock/z_bg_gnd_iceblock.c | 10 ++-- .../ovl_Bg_Gnd_Nisekabe/z_bg_gnd_nisekabe.c | 8 +-- .../ovl_Bg_Gnd_Soulmeiro/z_bg_gnd_soulmeiro.c | 8 +-- src/overlays/actors/ovl_Bg_Haka/z_bg_haka.c | 8 +-- .../actors/ovl_Bg_Haka_Gate/z_bg_haka_gate.c | 10 ++-- .../actors/ovl_Bg_Haka_Huta/z_bg_haka_huta.c | 8 +-- .../ovl_Bg_Haka_Megane/z_bg_haka_megane.c | 10 ++-- .../ovl_Bg_Haka_MeganeBG/z_bg_haka_meganebg.c | 10 ++-- .../ovl_Bg_Haka_Sgami/z_bg_haka_sgami.c | 10 ++-- .../actors/ovl_Bg_Haka_Ship/z_bg_haka_ship.c | 10 ++-- .../actors/ovl_Bg_Haka_Trap/z_bg_haka_trap.c | 10 ++-- .../actors/ovl_Bg_Haka_Tubo/z_bg_haka_tubo.c | 10 ++-- .../ovl_Bg_Haka_Water/z_bg_haka_water.c | 8 +-- .../actors/ovl_Bg_Haka_Zou/z_bg_haka_zou.c | 8 +-- .../ovl_Bg_Heavy_Block/z_bg_heavy_block.c | 10 ++-- .../ovl_Bg_Hidan_Curtain/z_bg_hidan_curtain.c | 10 ++-- .../ovl_Bg_Hidan_Dalm/z_bg_hidan_dalm.c | 10 ++-- .../z_bg_hidan_firewall.c | 10 ++-- .../ovl_Bg_Hidan_Fslift/z_bg_hidan_fslift.c | 8 +-- .../ovl_Bg_Hidan_Fwbig/z_bg_hidan_fwbig.c | 8 +-- .../ovl_Bg_Hidan_Hamstep/z_bg_hidan_hamstep.c | 8 +-- .../ovl_Bg_Hidan_Hrock/z_bg_hidan_hrock.c | 8 +-- .../ovl_Bg_Hidan_Kousi/z_bg_hidan_kousi.c | 8 +-- .../z_bg_hidan_kowarerukabe.c | 10 ++-- .../ovl_Bg_Hidan_Rock/z_bg_hidan_rock.c | 10 ++-- .../z_bg_hidan_rsekizou.c | 10 ++-- .../ovl_Bg_Hidan_Sekizou/z_bg_hidan_sekizou.c | 10 ++-- .../ovl_Bg_Hidan_Sima/z_bg_hidan_sima.c | 10 ++-- .../ovl_Bg_Hidan_Syoku/z_bg_hidan_syoku.c | 8 +-- .../ovl_Bg_Ice_Objects/z_bg_ice_objects.c | 10 ++-- .../ovl_Bg_Ice_Shelter/z_bg_ice_shelter.c | 10 ++-- .../ovl_Bg_Ice_Shutter/z_bg_ice_shutter.c | 8 +-- .../ovl_Bg_Ice_Turara/z_bg_ice_turara.c | 8 +-- .../actors/ovl_Bg_Ingate/z_bg_ingate.c | 8 +-- .../ovl_Bg_Jya_1flift/z_bg_jya_1flift.c | 10 ++-- .../z_bg_jya_amishutter.c | 8 +-- .../ovl_Bg_Jya_Bigmirror/z_bg_jya_bigmirror.c | 18 +++--- .../actors/ovl_Bg_Jya_Block/z_bg_jya_block.c | 8 +-- .../z_bg_jya_bombchuiwa.c | 12 ++-- .../ovl_Bg_Jya_Bombiwa/z_bg_jya_bombiwa.c | 10 ++-- .../actors/ovl_Bg_Jya_Cobra/z_bg_jya_cobra.c | 10 ++-- .../ovl_Bg_Jya_Goroiwa/z_bg_jya_goroiwa.c | 8 +-- .../ovl_Bg_Jya_Haheniron/z_bg_jya_haheniron.c | 10 ++-- .../ovl_Bg_Jya_Ironobj/z_bg_jya_ironobj.c | 8 +-- .../ovl_Bg_Jya_Kanaami/z_bg_jya_kanaami.c | 8 +-- .../actors/ovl_Bg_Jya_Lift/z_bg_jya_lift.c | 8 +-- .../ovl_Bg_Jya_Megami/z_bg_jya_megami.c | 10 ++-- .../z_bg_jya_zurerukabe.c | 8 +-- .../ovl_Bg_Menkuri_Eye/z_bg_menkuri_eye.c | 10 ++-- .../z_bg_menkuri_kaiten.c | 8 +-- .../z_bg_menkuri_nisekabe.c | 8 +-- .../ovl_Bg_Mizu_Bwall/z_bg_mizu_bwall.c | 10 ++-- .../ovl_Bg_Mizu_Movebg/z_bg_mizu_movebg.c | 56 +++++++++---------- .../ovl_Bg_Mizu_Shutter/z_bg_mizu_shutter.c | 10 ++-- .../actors/ovl_Bg_Mizu_Uzu/z_bg_mizu_uzu.c | 8 +-- .../ovl_Bg_Mizu_Water/z_bg_mizu_water.c | 8 +-- src/overlays/actors/ovl_Bg_Mjin/z_bg_mjin.c | 10 ++-- .../ovl_Bg_Mori_Bigst/z_bg_mori_bigst.c | 10 ++-- .../ovl_Bg_Mori_Elevator/z_bg_mori_elevator.c | 10 ++-- .../ovl_Bg_Mori_Hashigo/z_bg_mori_hashigo.c | 10 ++-- .../ovl_Bg_Mori_Hashira4/z_bg_mori_hashira4.c | 10 ++-- .../ovl_Bg_Mori_Hineri/z_bg_mori_hineri.c | 10 ++-- .../ovl_Bg_Mori_Idomizu/z_bg_mori_idomizu.c | 10 ++-- .../z_bg_mori_kaitenkabe.c | 10 ++-- .../z_bg_mori_rakkatenjo.c | 10 ++-- .../actors/ovl_Bg_Po_Event/z_bg_po_event.c | 10 ++-- .../ovl_Bg_Po_Syokudai/z_bg_po_syokudai.c | 10 ++-- .../actors/ovl_Bg_Pushbox/z_bg_pushbox.c | 8 +-- .../ovl_Bg_Relay_Objects/z_bg_relay_objects.c | 10 ++-- .../ovl_Bg_Spot00_Break/z_bg_spot00_break.c | 8 +-- .../z_bg_spot00_hanebasi.c | 8 +-- .../ovl_Bg_Spot01_Fusya/z_bg_spot01_fusya.c | 6 +- .../z_bg_spot01_idohashira.c | 10 ++-- .../z_bg_spot01_idomizu.c | 6 +- .../z_bg_spot01_idosoko.c | 8 +-- .../z_bg_spot01_objects2.c | 6 +- .../z_bg_spot02_objects.c | 12 ++-- .../ovl_Bg_Spot03_Taki/z_bg_spot03_taki.c | 10 ++-- .../ovl_Bg_Spot05_Soko/z_bg_spot05_soko.c | 8 +-- .../z_bg_spot06_objects.c | 10 ++-- .../ovl_Bg_Spot07_Taki/z_bg_spot07_taki.c | 10 ++-- .../z_bg_spot08_bakudankabe.c | 10 ++-- .../z_bg_spot08_iceblock.c | 10 ++-- .../ovl_Bg_Spot09_Obj/z_bg_spot09_obj.c | 6 +- .../z_bg_spot11_bakudankabe.c | 10 ++-- .../ovl_Bg_Spot11_Oasis/z_bg_spot11_oasis.c | 6 +- .../ovl_Bg_Spot12_Gate/z_bg_spot12_gate.c | 8 +-- .../ovl_Bg_Spot12_Saku/z_bg_spot12_saku.c | 8 +-- .../ovl_Bg_Spot15_Rrbox/z_bg_spot15_rrbox.c | 8 +-- .../ovl_Bg_Spot15_Saku/z_bg_spot15_saku.c | 8 +-- .../z_bg_spot16_bombstone.c | 10 ++-- .../z_bg_spot16_doughnut.c | 12 ++-- .../z_bg_spot17_bakudankabe.c | 8 +-- .../ovl_Bg_Spot17_Funen/z_bg_spot17_funen.c | 6 +- .../ovl_Bg_Spot18_Basket/z_bg_spot18_basket.c | 12 ++-- .../ovl_Bg_Spot18_Futa/z_bg_spot18_futa.c | 8 +-- .../ovl_Bg_Spot18_Obj/z_bg_spot18_obj.c | 8 +-- .../z_bg_spot18_shutter.c | 8 +-- .../actors/ovl_Bg_Sst_Floor/z_bg_sst_floor.c | 10 ++-- .../ovl_Bg_Toki_Hikari/z_bg_toki_hikari.c | 8 +-- .../actors/ovl_Bg_Toki_Swd/z_bg_toki_swd.c | 10 ++-- .../actors/ovl_Bg_Treemouth/z_bg_treemouth.c | 8 +-- .../actors/ovl_Bg_Umajump/z_bg_umajump.c | 6 +- .../actors/ovl_Bg_Vb_Sima/z_bg_vb_sima.c | 8 +-- .../actors/ovl_Bg_Ydan_Hasi/z_bg_ydan_hasi.c | 10 ++-- .../ovl_Bg_Ydan_Maruta/z_bg_ydan_maruta.c | 10 ++-- .../actors/ovl_Bg_Ydan_Sp/z_bg_ydan_sp.c | 10 ++-- src/overlays/actors/ovl_Bg_Zg/z_bg_zg.c | 10 ++-- .../actors/ovl_Boss_Dodongo/z_boss_dodongo.c | 14 ++--- src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c | 18 +++--- src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c | 14 ++--- .../actors/ovl_Boss_Ganon/z_boss_ganon.c | 26 ++++----- .../actors/ovl_Boss_Ganon2/z_boss_ganon2.c | 16 +++--- .../ovl_Boss_Ganondrof/z_boss_ganondrof.c | 14 ++--- .../actors/ovl_Boss_Goma/z_boss_goma.c | 14 ++--- src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c | 14 ++--- src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c | 26 ++++----- src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c | 32 +++++------ src/overlays/actors/ovl_Boss_Va/z_boss_va.c | 25 ++++----- src/overlays/actors/ovl_Demo_6K/z_demo_6k.c | 20 +++---- src/overlays/actors/ovl_Demo_Du/z_demo_du.c | 14 ++--- src/overlays/actors/ovl_Demo_Ec/z_demo_ec.c | 18 +++--- .../actors/ovl_Demo_Effect/z_demo_effect.c | 32 +++++------ src/overlays/actors/ovl_Demo_Ext/z_demo_ext.c | 10 ++-- .../actors/ovl_Demo_Geff/z_demo_geff.c | 8 +-- src/overlays/actors/ovl_Demo_Gj/z_demo_gj.c | 10 ++-- src/overlays/actors/ovl_Demo_Go/z_demo_go.c | 10 ++-- src/overlays/actors/ovl_Demo_Gt/z_demo_gt.c | 10 ++-- src/overlays/actors/ovl_Demo_Ik/z_demo_ik.c | 14 ++--- src/overlays/actors/ovl_Demo_Im/z_demo_im.c | 16 +++--- .../actors/ovl_Demo_Kankyo/z_demo_kankyo.c | 24 ++++---- .../actors/ovl_Demo_Kekkai/z_demo_kekkai.c | 16 +++--- src/overlays/actors/ovl_Demo_Sa/z_demo_sa.c | 12 ++-- src/overlays/actors/ovl_Demo_Shd/z_demo_shd.c | 8 +-- .../actors/ovl_Demo_Tre_Lgt/z_demo_tre_lgt.c | 12 ++-- src/overlays/actors/ovl_Door_Ana/z_door_ana.c | 8 +-- .../actors/ovl_Door_Gerudo/z_door_gerudo.c | 10 ++-- .../actors/ovl_Door_Killer/z_door_killer.c | 18 +++--- .../actors/ovl_Door_Shutter/z_door_shutter.c | 10 ++-- .../actors/ovl_Door_Toki/z_door_toki.c | 8 +-- .../actors/ovl_Door_Warp1/z_door_warp1.c | 10 ++-- .../actors/ovl_Efc_Erupc/z_efc_erupc.c | 8 +-- src/overlays/actors/ovl_Eff_Dust/z_eff_dust.c | 12 ++-- src/overlays/actors/ovl_Elf_Msg/z_elf_msg.c | 6 +- src/overlays/actors/ovl_Elf_Msg2/z_elf_msg2.c | 6 +- src/overlays/actors/ovl_En_Am/z_en_am.c | 14 ++--- src/overlays/actors/ovl_En_Ani/z_en_ani.c | 14 ++--- .../actors/ovl_En_Anubice/z_en_anubice.c | 14 ++--- .../ovl_En_Anubice_Fire/z_en_anubice_fire.c | 10 ++-- .../ovl_En_Anubice_Tag/z_en_anubice_tag.c | 8 +-- .../actors/ovl_En_Arow_Trap/z_en_arow_trap.c | 6 +- src/overlays/actors/ovl_En_Arrow/z_en_arrow.c | 10 ++-- .../ovl_En_Attack_Niw/z_en_attack_niw.c | 12 ++-- src/overlays/actors/ovl_En_Ba/z_en_ba.c | 10 ++-- src/overlays/actors/ovl_En_Bb/z_en_bb.c | 12 ++-- .../actors/ovl_En_Bdfire/z_en_bdfire.c | 10 ++-- .../actors/ovl_En_Bigokuta/z_en_bigokuta.c | 12 ++-- src/overlays/actors/ovl_En_Bili/z_en_bili.c | 12 ++-- src/overlays/actors/ovl_En_Bird/z_en_bird.c | 8 +-- .../actors/ovl_En_Blkobj/z_en_blkobj.c | 10 ++-- src/overlays/actors/ovl_En_Bom/z_en_bom.c | 10 ++-- .../ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c | 10 ++-- .../ovl_En_Bom_Bowl_Pit/z_en_bom_bowl_pit.c | 6 +- .../actors/ovl_En_Bom_Chu/z_en_bom_chu.c | 10 ++-- src/overlays/actors/ovl_En_Bombf/z_en_bombf.c | 10 ++-- src/overlays/actors/ovl_En_Boom/z_en_boom.c | 10 ++-- src/overlays/actors/ovl_En_Box/z_en_box.c | 12 ++-- src/overlays/actors/ovl_En_Brob/z_en_brob.c | 12 ++-- .../actors/ovl_En_Bubble/z_en_bubble.c | 10 ++-- src/overlays/actors/ovl_En_Butte/z_en_butte.c | 10 ++-- src/overlays/actors/ovl_En_Bw/z_en_bw.c | 12 ++-- src/overlays/actors/ovl_En_Bx/z_en_bx.c | 12 ++-- .../actors/ovl_En_Changer/z_en_changer.c | 6 +- .../actors/ovl_En_Clear_Tag/z_en_clear_tag.c | 10 ++-- src/overlays/actors/ovl_En_Cow/z_en_cow.c | 18 +++--- src/overlays/actors/ovl_En_Crow/z_en_crow.c | 14 ++--- src/overlays/actors/ovl_En_Cs/z_en_cs.c | 14 ++--- src/overlays/actors/ovl_En_Daiku/z_en_daiku.c | 14 ++--- .../z_en_daiku_kakariko.c | 14 ++--- .../actors/ovl_En_Dekubaba/z_en_dekubaba.c | 12 ++-- .../actors/ovl_En_Dekunuts/z_en_dekunuts.c | 12 ++-- src/overlays/actors/ovl_En_Dh/z_en_dh.c | 12 ++-- src/overlays/actors/ovl_En_Dha/z_en_dha.c | 14 ++--- .../ovl_En_Diving_Game/z_en_diving_game.c | 12 ++-- src/overlays/actors/ovl_En_Dns/z_en_dns.c | 10 ++-- .../actors/ovl_En_Dnt_Demo/z_en_dnt_demo.c | 6 +- .../actors/ovl_En_Dnt_Jiji/z_en_dnt_jiji.c | 10 ++-- .../actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.c | 16 +++--- .../actors/ovl_En_Dodojr/z_en_dodojr.c | 12 ++-- .../actors/ovl_En_Dodongo/z_en_dodongo.c | 14 ++--- src/overlays/actors/ovl_En_Dog/z_en_dog.c | 10 ++-- src/overlays/actors/ovl_En_Door/z_en_door.c | 12 ++-- src/overlays/actors/ovl_En_Ds/z_en_ds.c | 12 ++-- src/overlays/actors/ovl_En_Du/z_en_du.c | 14 ++--- .../actors/ovl_En_Dy_Extra/z_en_dy_extra.c | 8 +-- src/overlays/actors/ovl_En_Eg/z_en_eg.c | 6 +- src/overlays/actors/ovl_En_Eiyer/z_en_eiyer.c | 12 ++-- src/overlays/actors/ovl_En_Elf/z_en_elf.c | 24 ++++---- .../actors/ovl_En_Encount1/z_en_encount1.c | 6 +- .../actors/ovl_En_Encount2/z_en_encount2.c | 10 ++-- .../actors/ovl_En_Ex_Item/z_en_ex_item.c | 8 +-- .../actors/ovl_En_Ex_Ruppy/z_en_ex_ruppy.c | 8 +-- src/overlays/actors/ovl_En_Fd/z_en_fd.c | 14 ++--- .../actors/ovl_En_Fd_Fire/z_en_fd_fire.c | 10 ++-- .../actors/ovl_En_Fhg_Fire/z_en_fhg_fire.c | 10 ++-- .../actors/ovl_En_Fire_Rock/z_en_fire_rock.c | 10 ++-- .../actors/ovl_En_Firefly/z_en_firefly.c | 16 +++--- src/overlays/actors/ovl_En_Fish/z_en_fish.c | 10 ++-- .../actors/ovl_En_Floormas/z_en_floormas.c | 14 ++--- src/overlays/actors/ovl_En_Fr/z_en_fr.c | 16 +++--- src/overlays/actors/ovl_En_Fu/z_en_fu.c | 14 ++--- src/overlays/actors/ovl_En_Fw/z_en_fw.c | 12 ++-- src/overlays/actors/ovl_En_Fz/z_en_fz.c | 10 ++-- .../actors/ovl_En_G_Switch/z_en_g_switch.c | 12 ++-- .../ovl_En_Ganon_Mant/z_en_ganon_mant.c | 8 +-- .../ovl_En_Ganon_Organ/z_en_ganon_organ.c | 2 - src/overlays/actors/ovl_En_Gb/z_en_gb.c | 10 ++-- src/overlays/actors/ovl_En_Ge1/z_en_ge1.c | 14 ++--- src/overlays/actors/ovl_En_Ge2/z_en_ge2.c | 20 +++---- src/overlays/actors/ovl_En_Ge3/z_en_ge3.c | 16 +++--- src/overlays/actors/ovl_En_GeldB/z_en_geldb.c | 14 ++--- src/overlays/actors/ovl_En_GirlA/z_en_girla.c | 10 ++-- src/overlays/actors/ovl_En_Gm/z_en_gm.c | 10 ++-- src/overlays/actors/ovl_En_Go/z_en_go.c | 14 ++--- src/overlays/actors/ovl_En_Go2/z_en_go2.c | 16 +++--- src/overlays/actors/ovl_En_Goma/z_en_goma.c | 12 ++-- .../actors/ovl_En_Goroiwa/z_en_goroiwa.c | 8 +-- src/overlays/actors/ovl_En_Gs/z_en_gs.c | 8 +-- src/overlays/actors/ovl_En_Guest/z_en_guest.c | 14 ++--- src/overlays/actors/ovl_En_Hata/z_en_hata.c | 12 ++-- .../actors/ovl_En_Heishi1/z_en_heishi1.c | 10 ++-- .../actors/ovl_En_Heishi2/z_en_heishi2.c | 14 ++--- .../actors/ovl_En_Heishi3/z_en_heishi3.c | 12 ++-- .../actors/ovl_En_Heishi4/z_en_heishi4.c | 12 ++-- .../actors/ovl_En_Hintnuts/z_en_hintnuts.c | 12 ++-- src/overlays/actors/ovl_En_Holl/z_en_holl.c | 8 +-- .../actors/ovl_En_Honotrap/z_en_honotrap.c | 14 ++--- src/overlays/actors/ovl_En_Horse/z_en_horse.c | 16 +++--- .../z_en_horse_game_check.c | 7 +-- .../ovl_En_Horse_Ganon/z_en_horse_ganon.c | 12 ++-- .../z_en_horse_link_child.c | 14 ++--- .../ovl_En_Horse_Normal/z_en_horse_normal.c | 12 ++-- .../ovl_En_Horse_Zelda/z_en_horse_zelda.c | 12 ++-- src/overlays/actors/ovl_En_Hs/z_en_hs.c | 14 ++--- src/overlays/actors/ovl_En_Hs2/z_en_hs2.c | 14 ++--- src/overlays/actors/ovl_En_Hy/z_en_hy.c | 18 +++--- .../actors/ovl_En_Ice_Hono/z_en_ice_hono.c | 16 +++--- src/overlays/actors/ovl_En_Ik/z_en_ik.c | 34 ++++++----- src/overlays/actors/ovl_En_In/z_en_in.c | 16 +++--- .../actors/ovl_En_Insect/z_en_insect.c | 10 ++-- src/overlays/actors/ovl_En_Ishi/z_en_ishi.c | 12 ++-- src/overlays/actors/ovl_En_It/z_en_it.c | 8 +-- src/overlays/actors/ovl_En_Jj/z_en_jj.c | 10 ++-- src/overlays/actors/ovl_En_Js/z_en_js.c | 14 ++--- .../actors/ovl_En_Jsjutan/z_en_jsjutan.c | 8 +-- .../actors/ovl_En_Kakasi/z_en_kakasi.c | 10 ++-- .../actors/ovl_En_Kakasi2/z_en_kakasi2.c | 10 ++-- .../actors/ovl_En_Kakasi3/z_en_kakasi3.c | 10 ++-- .../actors/ovl_En_Kanban/z_en_kanban.c | 10 ++-- .../actors/ovl_En_Karebaba/z_en_karebaba.c | 10 ++-- src/overlays/actors/ovl_En_Ko/z_en_ko.c | 21 ++++--- src/overlays/actors/ovl_En_Kusa/z_en_kusa.c | 12 ++-- src/overlays/actors/ovl_En_Kz/z_en_kz.c | 18 +++--- src/overlays/actors/ovl_En_Light/z_en_light.c | 12 ++-- .../actors/ovl_En_Lightbox/z_en_lightbox.c | 8 +-- .../actors/ovl_En_M_Fire1/z_en_m_fire1.c | 8 +-- .../actors/ovl_En_M_Thunder/z_en_m_thunder.c | 10 ++-- src/overlays/actors/ovl_En_Ma1/z_en_ma1.c | 14 ++--- src/overlays/actors/ovl_En_Ma2/z_en_ma2.c | 14 ++--- src/overlays/actors/ovl_En_Ma3/z_en_ma3.c | 14 ++--- src/overlays/actors/ovl_En_Mag/z_en_mag.c | 8 +-- src/overlays/actors/ovl_En_Mb/z_en_mb.c | 16 +++--- src/overlays/actors/ovl_En_Md/z_en_md.c | 18 +++--- src/overlays/actors/ovl_En_Mk/z_en_mk.c | 14 ++--- src/overlays/actors/ovl_En_Mm/z_en_mm.c | 14 ++--- src/overlays/actors/ovl_En_Mm2/z_en_mm2.c | 14 ++--- src/overlays/actors/ovl_En_Ms/z_en_ms.c | 10 ++-- src/overlays/actors/ovl_En_Mu/z_en_mu.c | 16 +++--- src/overlays/actors/ovl_En_Nb/z_en_nb.c | 18 +++--- src/overlays/actors/ovl_En_Niw/z_en_niw.c | 12 ++-- .../actors/ovl_En_Niw_Girl/z_en_niw_girl.c | 10 ++-- .../actors/ovl_En_Niw_Lady/z_en_niw_lady.c | 12 ++-- .../actors/ovl_En_Nutsball/z_en_nutsball.c | 8 +-- src/overlays/actors/ovl_En_Nwc/z_en_nwc.c | 10 ++-- src/overlays/actors/ovl_En_Ny/z_en_ny.c | 16 +++--- src/overlays/actors/ovl_En_OE2/z_en_oe2.c | 4 +- .../z_en_okarina_effect.c | 8 +-- .../ovl_En_Okarina_Tag/z_en_okarina_tag.c | 6 +- src/overlays/actors/ovl_En_Okuta/z_en_okuta.c | 12 ++-- src/overlays/actors/ovl_En_Ossan/z_en_ossan.c | 28 +++++----- src/overlays/actors/ovl_En_Owl/z_en_owl.c | 14 ++--- src/overlays/actors/ovl_En_Part/z_en_part.c | 6 +- .../actors/ovl_En_Peehat/z_en_peehat.c | 14 ++--- .../actors/ovl_En_Po_Desert/z_en_po_desert.c | 14 ++--- .../actors/ovl_En_Po_Field/z_en_po_field.c | 18 +++--- .../actors/ovl_En_Po_Relay/z_en_po_relay.c | 12 ++-- .../ovl_En_Po_Sisters/z_en_po_sisters.c | 14 ++--- src/overlays/actors/ovl_En_Poh/z_en_poh.c | 22 ++++---- .../actors/ovl_En_Pu_box/z_en_pu_box.c | 8 +-- src/overlays/actors/ovl_En_Rd/z_en_rd.c | 14 ++--- src/overlays/actors/ovl_En_Reeba/z_en_reeba.c | 10 ++-- .../ovl_En_River_Sound/z_en_river_sound.c | 10 ++-- src/overlays/actors/ovl_En_Rl/z_en_rl.c | 10 ++-- src/overlays/actors/ovl_En_Rr/z_en_rr.c | 10 ++-- src/overlays/actors/ovl_En_Ru1/z_en_ru1.c | 16 +++--- src/overlays/actors/ovl_En_Ru2/z_en_ru2.c | 12 ++-- src/overlays/actors/ovl_En_Sa/z_en_sa.c | 18 +++--- src/overlays/actors/ovl_En_Sb/z_en_sb.c | 12 ++-- .../ovl_En_Scene_Change/z_en_scene_change.c | 6 +- src/overlays/actors/ovl_En_Sda/z_en_sda.c | 6 +- .../actors/ovl_En_Shopnuts/z_en_shopnuts.c | 14 ++--- src/overlays/actors/ovl_En_Si/z_en_si.c | 10 ++-- .../actors/ovl_En_Siofuki/z_en_siofuki.c | 10 ++-- src/overlays/actors/ovl_En_Skb/z_en_skb.c | 14 ++--- src/overlays/actors/ovl_En_Skj/z_en_skj.c | 16 +++--- .../actors/ovl_En_Skjneedle/z_en_skjneedle.c | 8 +-- src/overlays/actors/ovl_En_Ssh/z_en_ssh.c | 14 ++--- src/overlays/actors/ovl_En_St/z_en_st.c | 14 ++--- src/overlays/actors/ovl_En_Sth/z_en_sth.c | 16 +++--- .../actors/ovl_En_Stream/z_en_stream.c | 6 +- src/overlays/actors/ovl_En_Sw/z_en_sw.c | 12 ++-- .../ovl_En_Syateki_Itm/z_en_syateki_itm.c | 6 +- .../ovl_En_Syateki_Man/z_en_syateki_man.c | 10 ++-- .../ovl_En_Syateki_Niw/z_en_syateki_niw.c | 12 ++-- src/overlays/actors/ovl_En_Ta/z_en_ta.c | 14 ++--- .../ovl_En_Takara_Man/z_en_takara_man.c | 10 ++-- src/overlays/actors/ovl_En_Tana/z_en_tana.c | 8 +-- src/overlays/actors/ovl_En_Test/z_en_test.c | 14 ++--- src/overlays/actors/ovl_En_Tg/z_en_tg.c | 16 +++--- src/overlays/actors/ovl_En_Tite/z_en_tite.c | 14 ++--- src/overlays/actors/ovl_En_Tk/z_en_tk.c | 14 ++--- src/overlays/actors/ovl_En_Torch/z_en_torch.c | 4 +- .../actors/ovl_En_Torch2/z_en_torch2.c | 14 ++--- src/overlays/actors/ovl_En_Toryo/z_en_toryo.c | 14 ++--- src/overlays/actors/ovl_En_Tp/z_en_tp.c | 10 ++-- src/overlays/actors/ovl_En_Tr/z_en_tr.c | 10 ++-- src/overlays/actors/ovl_En_Trap/z_en_trap.c | 8 +-- .../actors/ovl_En_Tubo_Trap/z_en_tubo_trap.c | 8 +-- src/overlays/actors/ovl_En_Vali/z_en_vali.c | 14 ++--- src/overlays/actors/ovl_En_Vase/z_en_vase.c | 4 +- .../actors/ovl_En_Vb_Ball/z_en_vb_ball.c | 10 ++-- .../actors/ovl_En_Viewer/z_en_viewer.c | 10 ++-- src/overlays/actors/ovl_En_Vm/z_en_vm.c | 14 ++--- .../actors/ovl_En_Wall_Tubo/z_en_wall_tubo.c | 6 +- .../actors/ovl_En_Wallmas/z_en_wallmas.c | 12 ++-- .../ovl_En_Weather_Tag/z_en_weather_tag.c | 6 +- .../actors/ovl_En_Weiyer/z_en_weiyer.c | 10 ++-- src/overlays/actors/ovl_En_Wf/z_en_wf.c | 14 ++--- .../ovl_En_Wonder_Item/z_en_wonder_item.c | 8 +-- .../ovl_En_Wonder_Talk/z_en_wonder_talk.c | 6 +- .../ovl_En_Wonder_Talk2/z_en_wonder_talk2.c | 6 +- .../actors/ovl_En_Wood02/z_en_wood02.c | 10 ++-- src/overlays/actors/ovl_En_Xc/z_en_xc.c | 44 +++++++-------- .../ovl_En_Yabusame_Mark/z_en_yabusame_mark.c | 8 +-- .../actors/ovl_En_Yukabyun/z_en_yukabyun.c | 10 ++-- src/overlays/actors/ovl_En_Zf/z_en_zf.c | 14 ++--- src/overlays/actors/ovl_En_Zl1/z_en_zl1.c | 14 ++--- src/overlays/actors/ovl_En_Zl2/z_en_zl2.c | 16 +++--- src/overlays/actors/ovl_En_Zl3/z_en_zl3.c | 22 ++++---- src/overlays/actors/ovl_En_Zl4/z_en_zl4.c | 14 ++--- src/overlays/actors/ovl_En_Zo/z_en_zo.c | 12 ++-- src/overlays/actors/ovl_En_fHG/z_en_fhg.c | 10 ++-- .../actors/ovl_End_Title/z_end_title.c | 8 +-- src/overlays/actors/ovl_Fishing/z_fishing.c | 24 ++++---- .../actors/ovl_Item_B_Heart/z_item_b_heart.c | 8 +-- .../ovl_Item_Etcetera/z_item_etcetera.c | 10 ++-- .../actors/ovl_Item_Inbox/z_item_inbox.c | 8 +-- .../actors/ovl_Item_Ocarina/z_item_ocarina.c | 8 +-- .../actors/ovl_Item_Shield/z_item_shield.c | 10 ++-- .../actors/ovl_Magic_Dark/z_magic_dark.c | 12 ++-- .../actors/ovl_Magic_Fire/z_magic_fire.c | 10 ++-- .../actors/ovl_Magic_Wind/z_magic_wind.c | 12 ++-- src/overlays/actors/ovl_Mir_Ray/z_mir_ray.c | 10 ++-- src/overlays/actors/ovl_Obj_Bean/z_obj_bean.c | 12 ++-- .../ovl_Obj_Blockstop/z_obj_blockstop.c | 6 +- .../actors/ovl_Obj_Bombiwa/z_obj_bombiwa.c | 8 +-- src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c | 10 ++-- .../actors/ovl_Obj_Dekujr/z_obj_dekujr.c | 6 +- .../actors/ovl_Obj_Elevator/z_obj_elevator.c | 8 +-- .../actors/ovl_Obj_Hamishi/z_obj_hamishi.c | 10 ++-- src/overlays/actors/ovl_Obj_Hana/z_obj_hana.c | 8 +-- .../actors/ovl_Obj_Hsblock/z_obj_hsblock.c | 8 +-- .../actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.c | 10 ++-- .../actors/ovl_Obj_Kibako/z_obj_kibako.c | 12 ++-- .../actors/ovl_Obj_Kibako2/z_obj_kibako2.c | 10 ++-- src/overlays/actors/ovl_Obj_Lift/z_obj_lift.c | 8 +-- .../ovl_Obj_Lightswitch/z_obj_lightswitch.c | 10 ++-- .../ovl_Obj_Makekinsuta/z_obj_makekinsuta.c | 6 +- .../ovl_Obj_Makeoshihiki/z_obj_makeoshihiki.c | 2 - src/overlays/actors/ovl_Obj_Mure/z_obj_mure.c | 8 +-- .../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 | 10 ++-- .../ovl_Obj_Roomtimer/z_obj_roomtimer.c | 8 +-- .../actors/ovl_Obj_Switch/z_obj_switch.c | 10 ++-- .../actors/ovl_Obj_Syokudai/z_obj_syokudai.c | 10 ++-- .../ovl_Obj_Timeblock/z_obj_timeblock.c | 8 +-- .../actors/ovl_Obj_Tsubo/z_obj_tsubo.c | 10 ++-- .../ovl_Obj_Warp2block/z_obj_warp2block.c | 8 +-- .../ovl_Object_Kankyo/z_object_kankyo.c | 8 +-- .../actors/ovl_Oceff_Spot/z_oceff_spot.c | 10 ++-- .../actors/ovl_Oceff_Storm/z_oceff_storm.c | 12 ++-- .../actors/ovl_Oceff_Wipe/z_oceff_wipe.c | 10 ++-- .../actors/ovl_Oceff_Wipe2/z_oceff_wipe2.c | 10 ++-- .../actors/ovl_Oceff_Wipe3/z_oceff_wipe3.c | 10 ++-- .../actors/ovl_Oceff_Wipe4/z_oceff_wipe4.c | 10 ++-- src/overlays/actors/ovl_Shot_Sun/z_shot_sun.c | 8 +-- .../actors/ovl_player_actor/z_player.c | 10 ++-- 433 files changed, 1996 insertions(+), 2859 deletions(-) diff --git a/src/code/z_en_a_keep.c b/src/code/z_en_a_keep.c index 4dc68d04ab..fd3edc86ee 100644 --- a/src/code/z_en_a_keep.c +++ b/src/code/z_en_a_keep.c @@ -4,8 +4,6 @@ #define FLAGS 0x00000010 -#define THIS ((EnAObj*)thisx) - void EnAObj_Init(Actor* thisx, GlobalContext* globalCtx); void EnAObj_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnAObj_Update(Actor* thisx, GlobalContext* globalCtx); @@ -87,7 +85,7 @@ void EnAObj_SetupAction(EnAObj* this, EnAObjActionFunc actionFunc) { void EnAObj_Init(Actor* thisx, GlobalContext* globalCtx) { CollisionHeader* colHeader = NULL; s32 pad; - EnAObj* this = THIS; + EnAObj* this = (EnAObj*)thisx; f32 shadowScale = 6.0f; this->textId = (thisx->params >> 8) & 0xFF; @@ -186,7 +184,7 @@ void EnAObj_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnAObj_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnAObj* this = THIS; + EnAObj* this = (EnAObj*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); @@ -320,7 +318,7 @@ void EnAObj_Block(EnAObj* this, GlobalContext* globalCtx) { } void EnAObj_Update(Actor* thisx, GlobalContext* globalCtx) { - EnAObj* this = THIS; + EnAObj* this = (EnAObj*)thisx; this->actionFunc(this, globalCtx); Actor_MoveForward(&this->dyna.actor); diff --git a/src/code/z_en_item00.c b/src/code/z_en_item00.c index 3a9be44cb4..ef85217cdc 100644 --- a/src/code/z_en_item00.c +++ b/src/code/z_en_item00.c @@ -5,8 +5,6 @@ #define FLAGS 0x00000000 -#define THIS ((EnItem00*)thisx) - void EnItem00_Init(Actor* thisx, GlobalContext* globalCtx); void EnItem00_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnItem00_Update(Actor* thisx, GlobalContext* globalCtx); @@ -331,7 +329,7 @@ void EnItem00_SetupAction(EnItem00* this, EnItem00ActionFunc actionFunc) { } void EnItem00_Init(Actor* thisx, GlobalContext* globalCtx) { - EnItem00* this = THIS; + EnItem00* this = (EnItem00*)thisx; s32 pad; f32 yOffset = 980.0f; f32 shadowScale = 6.0f; @@ -553,7 +551,7 @@ void EnItem00_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnItem00_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnItem00* this = THIS; + EnItem00* this = (EnItem00*)thisx; Collider_DestroyCylinder(globalCtx, &this->collider); } @@ -729,7 +727,7 @@ void EnItem00_Update(Actor* thisx, GlobalContext* globalCtx) { s16 sp3A = 0; s16 i; u32* temp; - EnItem00* this = THIS; + EnItem00* this = (EnItem00*)thisx; s32 pad; if (this->unk_15A > 0) { @@ -933,7 +931,7 @@ void EnItem00_Update(Actor* thisx, GlobalContext* globalCtx) { } void EnItem00_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnItem00* this = THIS; + EnItem00* this = (EnItem00*)thisx; f32 mtxScale; if (!(this->unk_156 & this->unk_158)) { diff --git a/src/code/z_fbdemo_circle.c b/src/code/z_fbdemo_circle.c index 233665db11..54b64d2ede 100644 --- a/src/code/z_fbdemo_circle.c +++ b/src/code/z_fbdemo_circle.c @@ -34,10 +34,8 @@ Gfx sCircleDList[] = { gsSPEndDisplayList(), }; -#define THIS ((TransitionCircle*)thisx) - void TransitionCircle_Start(void* thisx) { - TransitionCircle* this = THIS; + TransitionCircle* this = (TransitionCircle*)thisx; this->isDone = 0; @@ -92,7 +90,7 @@ void TransitionCircle_Start(void* thisx) { } void* TransitionCircle_Init(void* thisx) { - TransitionCircle* this = THIS; + TransitionCircle* this = (TransitionCircle*)thisx; bzero(this, sizeof(*this)); return this; @@ -102,7 +100,7 @@ void TransitionCircle_Destroy(void* thisx) { } void TransitionCircle_Update(void* thisx, s32 updateRate) { - TransitionCircle* this = THIS; + TransitionCircle* this = (TransitionCircle*)thisx; s32 temp_t2; s32 temp_t3; @@ -136,7 +134,7 @@ void TransitionCircle_Update(void* thisx, s32 updateRate) { void TransitionCircle_Draw(void* thisx, Gfx** gfxP) { Gfx* gfx = *gfxP; Mtx* modelView; - TransitionCircle* this = THIS; + TransitionCircle* this = (TransitionCircle*)thisx; Gfx* texScroll; // These variables are a best guess based on the other transition types. f32 tPos = 0.0f; @@ -176,13 +174,13 @@ void TransitionCircle_Draw(void* thisx, Gfx** gfxP) { } s32 TransitionCircle_IsDone(void* thisx) { - TransitionCircle* this = THIS; + TransitionCircle* this = (TransitionCircle*)thisx; return this->isDone; } void TransitionCircle_SetType(void* thisx, s32 type) { - TransitionCircle* this = THIS; + TransitionCircle* this = (TransitionCircle*)thisx; if (type & 0x80) { this->unk_14 = (type >> 5) & 0x1; @@ -197,13 +195,13 @@ void TransitionCircle_SetType(void* thisx, s32 type) { } void TransitionCircle_SetColor(void* thisx, u32 color) { - TransitionCircle* this = THIS; + TransitionCircle* this = (TransitionCircle*)thisx; this->color.rgba = color; } void TransitionCircle_SetEnvColor(void* thisx, u32 envColor) { - TransitionCircle* this = THIS; + TransitionCircle* this = (TransitionCircle*)thisx; this->envColor.rgba = envColor; } diff --git a/src/code/z_fbdemo_fade.c b/src/code/z_fbdemo_fade.c index 518c31c332..dc2c6e1d03 100644 --- a/src/code/z_fbdemo_fade.c +++ b/src/code/z_fbdemo_fade.c @@ -12,10 +12,8 @@ static Gfx sRCPSetupFade[] = { gsSPEndDisplayList(), }; -#define THIS ((TransitionFade*)thisx) - void TransitionFade_Start(void* thisx) { - TransitionFade* this = THIS; + TransitionFade* this = (TransitionFade*)thisx; switch (this->fadeType) { case 0: @@ -32,7 +30,7 @@ void TransitionFade_Start(void* thisx) { } void* TransitionFade_Init(void* thisx) { - TransitionFade* this = THIS; + TransitionFade* this = (TransitionFade*)thisx; bzero(this, sizeof(*this)); return this; @@ -44,7 +42,7 @@ void TransitionFade_Destroy(void* thisx) { void TransitionFade_Update(void* thisx, s32 updateRate) { s32 alpha; s16 newAlpha; - TransitionFade* this = THIS; + TransitionFade* this = (TransitionFade*)thisx; switch (this->fadeType) { case 0: @@ -84,7 +82,7 @@ void TransitionFade_Update(void* thisx, s32 updateRate) { } void TransitionFade_Draw(void* thisx, Gfx** gfxP) { - TransitionFade* this = THIS; + TransitionFade* this = (TransitionFade*)thisx; Gfx* gfx; Color_RGBA8_u32* color = &this->fadeColor; @@ -99,19 +97,19 @@ void TransitionFade_Draw(void* thisx, Gfx** gfxP) { } s32 TransitionFade_IsDone(void* thisx) { - TransitionFade* this = THIS; + TransitionFade* this = (TransitionFade*)thisx; return this->isDone; } void TransitionFade_SetColor(void* thisx, u32 color) { - TransitionFade* this = THIS; + TransitionFade* this = (TransitionFade*)thisx; this->fadeColor.rgba = color; } void TransitionFade_SetType(void* thisx, s32 type) { - TransitionFade* this = THIS; + TransitionFade* this = (TransitionFade*)thisx; if (type == 1) { this->fadeType = 1; diff --git a/src/code/z_fbdemo_triforce.c b/src/code/z_fbdemo_triforce.c index b17e161015..22cbf6c18c 100644 --- a/src/code/z_fbdemo_triforce.c +++ b/src/code/z_fbdemo_triforce.c @@ -2,10 +2,8 @@ #include "code/fbdemo_triforce/z_fbdemo_triforce.c" -#define THIS ((TransitionTriforce*)thisx) - void TransitionTriforce_Start(void* thisx) { - TransitionTriforce* this = THIS; + TransitionTriforce* this = (TransitionTriforce*)thisx; switch (this->state) { case 1: @@ -17,7 +15,7 @@ void TransitionTriforce_Start(void* thisx) { } void* TransitionTriforce_Init(void* thisx) { - TransitionTriforce* this = THIS; + TransitionTriforce* this = (TransitionTriforce*)thisx; bzero(this, sizeof(*this)); guOrtho(&this->projection, -160.0f, 160.0f, -120.0f, 120.0f, -1000.0f, 1000.0f, 1.0f); @@ -32,7 +30,7 @@ void TransitionTriforce_Destroy(void* thisx) { } void TransitionTriforce_Update(void* thisx, s32 updateRate) { - TransitionTriforce* this = THIS; + TransitionTriforce* this = (TransitionTriforce*)thisx; f32 temp_f0; s32 i; @@ -50,20 +48,20 @@ void TransitionTriforce_Update(void* thisx, s32 updateRate) { } void TransitionTriforce_SetColor(void* thisx, u32 color) { - TransitionTriforce* this = THIS; + TransitionTriforce* this = (TransitionTriforce*)thisx; this->color.rgba = color; } void TransitionTriforce_SetType(void* thisx, s32 type) { - TransitionTriforce* this = THIS; + TransitionTriforce* this = (TransitionTriforce*)thisx; this->fadeDirection = type; } // unused void TransitionTriforce_SetState(void* thisx, s32 state) { - TransitionTriforce* this = THIS; + TransitionTriforce* this = (TransitionTriforce*)thisx; this->state = state; } @@ -72,7 +70,7 @@ void TransitionTriforce_Draw(void* thisx, Gfx** gfxP) { Gfx* gfx = *gfxP; Mtx* modelView; f32 scale; - TransitionTriforce* this = THIS; + TransitionTriforce* this = (TransitionTriforce*)thisx; s32 pad; f32 rotation = this->transPos * 360.0f; @@ -119,7 +117,7 @@ void TransitionTriforce_Draw(void* thisx, Gfx** gfxP) { } s32 TransitionTriforce_IsDone(void* thisx) { - TransitionTriforce* this = THIS; + TransitionTriforce* this = (TransitionTriforce*)thisx; s32 ret = 0; diff --git a/src/code/z_fbdemo_wipe1.c b/src/code/z_fbdemo_wipe1.c index ca238643b5..94e21c341b 100644 --- a/src/code/z_fbdemo_wipe1.c +++ b/src/code/z_fbdemo_wipe1.c @@ -36,10 +36,8 @@ Gfx sWipeSyncDList[] = { gsSPEndDisplayList(), }; -#define THIS ((TransitionWipe*)thisx) - void TransitionWipe_Start(void* thisx) { - TransitionWipe* this = THIS; + TransitionWipe* this = (TransitionWipe*)thisx; this->isDone = 0; @@ -54,7 +52,7 @@ void TransitionWipe_Start(void* thisx) { } void* TransitionWipe_Init(void* thisx) { - TransitionWipe* this = THIS; + TransitionWipe* this = (TransitionWipe*)thisx; bzero(this, sizeof(*this)); return this; @@ -64,7 +62,7 @@ void TransitionWipe_Destroy(void* thisx) { } void TransitionWipe_Update(void* thisx, s32 updateRate) { - TransitionWipe* this = THIS; + TransitionWipe* this = (TransitionWipe*)thisx; u8 unk1419; if (this->direction != 0) { @@ -87,7 +85,7 @@ void TransitionWipe_Update(void* thisx, s32 updateRate) { void TransitionWipe_Draw(void* thisx, Gfx** gfxP) { Gfx* gfx = *gfxP; Mtx* modelView; - TransitionWipe* this = THIS; + TransitionWipe* this = (TransitionWipe*)thisx; s32 pad[4]; Gfx* tex; @@ -113,13 +111,13 @@ void TransitionWipe_Draw(void* thisx, Gfx** gfxP) { } s32 TransitionWipe_IsDone(void* thisx) { - TransitionWipe* this = THIS; + TransitionWipe* this = (TransitionWipe*)thisx; return this->isDone; } void TransitionWipe_SetType(void* thisx, s32 type) { - TransitionWipe* this = THIS; + TransitionWipe* this = (TransitionWipe*)thisx; if (type == 1) { this->direction = 1; @@ -135,13 +133,13 @@ void TransitionWipe_SetType(void* thisx, s32 type) { } void TransitionWipe_SetColor(void* thisx, u32 color) { - TransitionWipe* this = THIS; + TransitionWipe* this = (TransitionWipe*)thisx; this->color.rgba = color; } void TransitionWipe_SetEnvColor(void* thisx, u32 color) { - TransitionWipe* this = THIS; + TransitionWipe* this = (TransitionWipe*)thisx; this->envColor.rgba = color; } 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 82defa74b9..2cd3d99993 100644 --- a/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c +++ b/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c @@ -2,8 +2,6 @@ #define FLAGS 0x00000030 -#define THIS ((ArmsHook*)thisx) - void ArmsHook_Init(Actor* thisx, GlobalContext* globalCtx); void ArmsHook_Destroy(Actor* thisx, GlobalContext* globalCtx); void ArmsHook_Update(Actor* thisx, GlobalContext* globalCtx); @@ -67,7 +65,7 @@ void ArmsHook_SetupAction(ArmsHook* this, ArmsHookActionFunc actionFunc) { } void ArmsHook_Init(Actor* thisx, GlobalContext* globalCtx) { - ArmsHook* this = THIS; + ArmsHook* this = (ArmsHook*)thisx; Collider_InitQuad(globalCtx, &this->collider); Collider_SetQuad(globalCtx, &this->collider, &this->actor, &sQuadInit); @@ -76,7 +74,7 @@ void ArmsHook_Init(Actor* thisx, GlobalContext* globalCtx) { } void ArmsHook_Destroy(Actor* thisx, GlobalContext* globalCtx) { - ArmsHook* this = THIS; + ArmsHook* this = (ArmsHook*)thisx; if (this->grabbed != NULL) { this->grabbed->flags &= ~0x2000; @@ -292,7 +290,7 @@ void ArmsHook_Shoot(ArmsHook* this, GlobalContext* globalCtx) { } void ArmsHook_Update(Actor* thisx, GlobalContext* globalCtx) { - ArmsHook* this = THIS; + ArmsHook* this = (ArmsHook*)thisx; this->actionFunc(this, globalCtx); this->unk_1F4 = this->unk_1E8; @@ -300,7 +298,7 @@ void ArmsHook_Update(Actor* thisx, GlobalContext* globalCtx) { void ArmsHook_Draw(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - ArmsHook* this = THIS; + ArmsHook* this = (ArmsHook*)thisx; Player* player = GET_PLAYER(globalCtx); Vec3f sp78; Vec3f sp6C; 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 3da33f35b1..9e3570ef2b 100644 --- a/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.c +++ b/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.c @@ -9,8 +9,6 @@ #define FLAGS 0x02000010 -#define THIS ((ArrowFire*)thisx) - void ArrowFire_Init(Actor* thisx, GlobalContext* globalCtx); void ArrowFire_Destroy(Actor* thisx, GlobalContext* globalCtx); void ArrowFire_Update(Actor* thisx, GlobalContext* globalCtx); @@ -43,7 +41,7 @@ void ArrowFire_SetupAction(ArrowFire* this, ArrowFireActionFunc actionFunc) { } void ArrowFire_Init(Actor* thisx, GlobalContext* globalCtx) { - ArrowFire* this = THIS; + ArrowFire* this = (ArrowFire*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); this->radius = 0; @@ -180,7 +178,7 @@ void ArrowFire_Fly(ArrowFire* this, GlobalContext* globalCtx) { } void ArrowFire_Update(Actor* thisx, GlobalContext* globalCtx) { - ArrowFire* this = THIS; + ArrowFire* this = (ArrowFire*)thisx; if (globalCtx->msgCtx.msgMode == MSGMODE_OCARINA_CORRECT_PLAYBACK || globalCtx->msgCtx.msgMode == MSGMODE_SONG_PLAYED) { @@ -191,7 +189,7 @@ void ArrowFire_Update(Actor* thisx, GlobalContext* globalCtx) { } void ArrowFire_Draw(Actor* thisx, GlobalContext* globalCtx2) { - ArrowFire* this = THIS; + ArrowFire* this = (ArrowFire*)thisx; GlobalContext* globalCtx = globalCtx2; u32 stateFrames; EnArrow* arrow; 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 45c7af08b5..21a9de2742 100644 --- a/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.c +++ b/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.c @@ -10,8 +10,6 @@ #define FLAGS 0x02000010 -#define THIS ((ArrowIce*)thisx) - void ArrowIce_Init(Actor* thisx, GlobalContext* globalCtx); void ArrowIce_Destroy(Actor* thisx, GlobalContext* globalCtx); void ArrowIce_Update(Actor* thisx, GlobalContext* globalCtx); @@ -44,7 +42,7 @@ void ArrowIce_SetupAction(ArrowIce* this, ArrowIceActionFunc actionFunc) { } void ArrowIce_Init(Actor* thisx, GlobalContext* globalCtx) { - ArrowIce* this = THIS; + ArrowIce* this = (ArrowIce*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); this->radius = 0; @@ -181,7 +179,7 @@ void ArrowIce_Fly(ArrowIce* this, GlobalContext* globalCtx) { } void ArrowIce_Update(Actor* thisx, GlobalContext* globalCtx) { - ArrowIce* this = THIS; + ArrowIce* this = (ArrowIce*)thisx; if (globalCtx->msgCtx.msgMode == MSGMODE_OCARINA_CORRECT_PLAYBACK || globalCtx->msgCtx.msgMode == MSGMODE_SONG_PLAYED) { @@ -192,7 +190,7 @@ void ArrowIce_Update(Actor* thisx, GlobalContext* globalCtx) { } void ArrowIce_Draw(Actor* thisx, GlobalContext* globalCtx) { - ArrowIce* this = THIS; + ArrowIce* this = (ArrowIce*)thisx; s32 pad; Actor* tranform; u32 stateFrames = globalCtx->state.frames; 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 8dff4d9e0f..7ee47e665b 100644 --- a/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.c +++ b/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.c @@ -10,8 +10,6 @@ #define FLAGS 0x02000010 -#define THIS ((ArrowLight*)thisx) - void ArrowLight_Init(Actor* thisx, GlobalContext* globalCtx); void ArrowLight_Destroy(Actor* thisx, GlobalContext* globalCtx); void ArrowLight_Update(Actor* thisx, GlobalContext* globalCtx); @@ -44,7 +42,7 @@ void ArrowLight_SetupAction(ArrowLight* this, ArrowLightActionFunc actionFunc) { } void ArrowLight_Init(Actor* thisx, GlobalContext* globalCtx) { - ArrowLight* this = THIS; + ArrowLight* this = (ArrowLight*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); this->radius = 0; @@ -179,7 +177,7 @@ void ArrowLight_Fly(ArrowLight* this, GlobalContext* globalCtx) { } void ArrowLight_Update(Actor* thisx, GlobalContext* globalCtx) { - ArrowLight* this = THIS; + ArrowLight* this = (ArrowLight*)thisx; if (globalCtx->msgCtx.msgMode == MSGMODE_OCARINA_CORRECT_PLAYBACK || globalCtx->msgCtx.msgMode == MSGMODE_SONG_PLAYED) { @@ -190,7 +188,7 @@ void ArrowLight_Update(Actor* thisx, GlobalContext* globalCtx) { } void ArrowLight_Draw(Actor* thisx, GlobalContext* globalCtx) { - ArrowLight* this = THIS; + ArrowLight* this = (ArrowLight*)thisx; s32 pad; u32 stateFrames = globalCtx->state.frames; EnArrow* arrow = (EnArrow*)this->actor.parent; 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 f15af2763f..898a38df04 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 @@ -9,8 +9,6 @@ #define FLAGS 0x00000010 -#define THIS ((BgBdanObjects*)thisx) - void BgBdanObjects_Init(Actor* thisx, GlobalContext* globalCtx); void BgBdanObjects_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgBdanObjects_Update(Actor* thisx, GlobalContext* globalCtx); @@ -108,7 +106,7 @@ void BgBdanObjects_SetContactRu1(BgBdanObjects* this, s32 arg1) { void BgBdanObjects_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BgBdanObjects* this = THIS; + BgBdanObjects* this = (BgBdanObjects*)thisx; CollisionHeader* colHeader = NULL; Actor_ProcessInitChain(&this->dyna.actor, sInitChain); @@ -165,7 +163,7 @@ void BgBdanObjects_Init(Actor* thisx, GlobalContext* globalCtx) { } void BgBdanObjects_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgBdanObjects* this = THIS; + BgBdanObjects* this = (BgBdanObjects*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); if (thisx->params == 0) { @@ -439,14 +437,14 @@ void func_8086CB8C(BgBdanObjects* this, GlobalContext* globalCtx) { } void BgBdanObjects_Update(Actor* thisx, GlobalContext* globalCtx) { - BgBdanObjects* this = THIS; + BgBdanObjects* this = (BgBdanObjects*)thisx; Actor_SetFocus(thisx, 50.0f); this->actionFunc(this, globalCtx); } void BgBdanObjects_Draw(Actor* thisx, GlobalContext* globalCtx) { - BgBdanObjects* this = THIS; + BgBdanObjects* this = (BgBdanObjects*)thisx; if (thisx->params == 0) { if (this->actionFunc == func_8086C054) { 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 831c7d8674..aeb5631667 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 @@ -9,8 +9,6 @@ #define FLAGS 0x00000010 -#define THIS ((BgBdanSwitch*)thisx) - void BgBdanSwitch_Init(Actor* thisx, GlobalContext* globalCtx); void BgBdanSwitch_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgBdanSwitch_Update(Actor* thisx, GlobalContext* globalCtx); @@ -136,7 +134,7 @@ void func_8086D0EC(BgBdanSwitch* this) { } void BgBdanSwitch_Init(Actor* thisx, GlobalContext* globalCtx) { - BgBdanSwitch* this = THIS; + BgBdanSwitch* this = (BgBdanSwitch*)thisx; s32 pad; s16 type; s32 flag; @@ -203,7 +201,7 @@ void BgBdanSwitch_Init(Actor* thisx, GlobalContext* globalCtx) { } void BgBdanSwitch_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgBdanSwitch* this = THIS; + BgBdanSwitch* this = (BgBdanSwitch*)thisx; switch (this->dyna.actor.params & 0xFF) { case BLUE: @@ -484,7 +482,7 @@ void func_8086DDC0(BgBdanSwitch* this, GlobalContext* globalCtx) { void BgBdanSwitch_Update(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BgBdanSwitch* this = THIS; + BgBdanSwitch* this = (BgBdanSwitch*)thisx; s32 type; if (this->unk_1DA > 0) { @@ -516,7 +514,7 @@ void func_8086DF58(BgBdanSwitch* this, GlobalContext* globalCtx, Gfx* dlist) { } void BgBdanSwitch_Draw(Actor* thisx, GlobalContext* globalCtx) { - BgBdanSwitch* this = THIS; + BgBdanSwitch* this = (BgBdanSwitch*)thisx; switch (this->dyna.actor.params & 0xFF) { case YELLOW_HEAVY: 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 f516291b09..d78a33477a 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 @@ -11,8 +11,6 @@ #define FLAGS 0x00000010 -#define THIS ((BgBomGuard*)thisx) - void BgBomGuard_Init(Actor* thisx, GlobalContext* globalCtx); void BgBomGuard_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgBomGuard_Update(Actor* thisx, GlobalContext* globalCtx); @@ -36,7 +34,7 @@ void BgBomGuard_SetupAction(BgBomGuard* this, BgBomGuardActionFunc actionFunc) { } void BgBomGuard_Init(Actor* thisx, GlobalContext* globalCtx) { - BgBomGuard* this = THIS; + BgBomGuard* this = (BgBomGuard*)thisx; s32 pad[2]; CollisionHeader* colHeader = NULL; @@ -55,7 +53,7 @@ void BgBomGuard_Init(Actor* thisx, GlobalContext* globalCtx) { } void BgBomGuard_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgBomGuard* this = THIS; + BgBomGuard* this = (BgBomGuard*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); } @@ -85,7 +83,7 @@ void func_8086E638(BgBomGuard* this, GlobalContext* globalCtx) { } void BgBomGuard_Update(Actor* thisx, GlobalContext* globalCtx) { - BgBomGuard* this = THIS; + BgBomGuard* this = (BgBomGuard*)thisx; this->actionFunc(this, 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 b06cb6e1b1..1b07ee115d 100644 --- a/src/overlays/actors/ovl_Bg_Bombwall/z_bg_bombwall.c +++ b/src/overlays/actors/ovl_Bg_Bombwall/z_bg_bombwall.c @@ -9,8 +9,6 @@ #define FLAGS 0x00400000 -#define THIS ((BgBombwall*)thisx) - void BgBombwall_Init(Actor* thisx, GlobalContext* globalCtx); void BgBombwall_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgBombwall_Update(Actor* thisx, GlobalContext* globalCtx); @@ -117,7 +115,7 @@ void BgBombwall_Init(Actor* thisx, GlobalContext* globalCtx) { Vec3f vecs[3]; Vec3f sp80; s32 pad; - BgBombwall* this = THIS; + BgBombwall* this = (BgBombwall*)thisx; f32 sin = Math_SinS(this->dyna.actor.shape.rot.y); f32 cos = Math_CosS(this->dyna.actor.shape.rot.y); @@ -168,7 +166,7 @@ void BgBombwall_DestroyCollision(BgBombwall* this, GlobalContext* globalCtx) { } void BgBombwall_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgBombwall* this = THIS; + BgBombwall* this = (BgBombwall*)thisx; BgBombwall_DestroyCollision(this, globalCtx); } @@ -247,7 +245,7 @@ void func_8086EE94(BgBombwall* this, GlobalContext* globalCtx) { } void BgBombwall_Update(Actor* thisx, GlobalContext* globalCtx) { - BgBombwall* this = THIS; + BgBombwall* this = (BgBombwall*)thisx; if (this->actionFunc != NULL) { this->actionFunc(this, globalCtx); @@ -255,7 +253,7 @@ void BgBombwall_Update(Actor* thisx, GlobalContext* globalCtx) { } void BgBombwall_Draw(Actor* thisx, GlobalContext* globalCtx) { - BgBombwall* this = THIS; + BgBombwall* this = (BgBombwall*)thisx; Gfx_DrawDListOpa(globalCtx, this->dList); } 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 8c681e05b3..72ff563039 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 @@ -12,8 +12,6 @@ #define FLAGS 0x00000030 -#define THIS ((BgBowlWall*)thisx) - void BgBowlWall_Init(Actor* thisx, GlobalContext* globalCtx); void BgBowlWall_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgBowlWall_Update(Actor* thisx, GlobalContext* globalCtx); @@ -47,7 +45,7 @@ static Vec3f sBullseyeOffset[] = { static s16 sTargetRot[] = { 0x0000, 0x0000, 0x3FFF, -0x3FFF }; void BgBowlWall_Init(Actor* thisx, GlobalContext* globalCtx) { - BgBowlWall* this = THIS; + BgBowlWall* this = (BgBowlWall*)thisx; s32 pad1; s32 pad2; CollisionHeader* colHeader = NULL; @@ -69,7 +67,7 @@ void BgBowlWall_Init(Actor* thisx, GlobalContext* globalCtx) { } void BgBowlWall_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgBowlWall* this = THIS; + BgBowlWall* this = (BgBowlWall*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); } @@ -189,7 +187,7 @@ void BgBowlWall_Reset(BgBowlWall* this, GlobalContext* globalCtx) { } void BgBowlWall_Update(Actor* thisx, GlobalContext* globalCtx) { - BgBowlWall* this = THIS; + BgBowlWall* this = (BgBowlWall*)thisx; if (this->timer != 0) { this->timer--; @@ -200,7 +198,7 @@ void BgBowlWall_Update(Actor* thisx, GlobalContext* globalCtx) { void BgBowlWall_Draw(Actor* thisx, GlobalContext* globalCtx2) { GlobalContext* globalCtx = globalCtx2; - BgBowlWall* this = THIS; + BgBowlWall* this = (BgBowlWall*)thisx; u32 frames; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_bowl_wall.c", 441); 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 6c631a4f43..8d015e7db1 100644 --- a/src/overlays/actors/ovl_Bg_Breakwall/z_bg_breakwall.c +++ b/src/overlays/actors/ovl_Bg_Breakwall/z_bg_breakwall.c @@ -11,8 +11,6 @@ #define FLAGS 0x00000010 -#define THIS ((BgBreakwall*)thisx) - typedef struct { /* 0x00 */ CollisionHeader* colHeader; /* 0x04 */ Gfx* dList; @@ -79,7 +77,7 @@ void BgBreakwall_SetupAction(BgBreakwall* this, BgBreakwallActionFunc actionFunc } void BgBreakwall_Init(Actor* thisx, GlobalContext* globalCtx) { - BgBreakwall* this = THIS; + BgBreakwall* this = (BgBreakwall*)thisx; s32 pad; s32 wallType = ((this->dyna.actor.params >> 13) & 3) & 0xFF; @@ -116,7 +114,7 @@ void BgBreakwall_Init(Actor* thisx, GlobalContext* globalCtx) { } void BgBreakwall_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgBreakwall* this = THIS; + BgBreakwall* this = (BgBreakwall*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); } @@ -276,7 +274,7 @@ void BgBreakwall_LavaCoverMove(BgBreakwall* this, GlobalContext* globalCtx) { } void BgBreakwall_Update(Actor* thisx, GlobalContext* globalCtx) { - BgBreakwall* this = THIS; + BgBreakwall* this = (BgBreakwall*)thisx; this->actionFunc(this, globalCtx); } @@ -292,7 +290,7 @@ static Vec3f sColQuadList[][4] = { void BgBreakwall_Draw(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BgBreakwall* this = THIS; + BgBreakwall* this = (BgBreakwall*)thisx; if (this->bombableWallDList != NULL) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_breakwall.c", 767); 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 d7689d9fff..2839c0eb22 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 @@ -9,8 +9,6 @@ #define FLAGS 0x00000030 -#define THIS ((BgDdanJd*)thisx) - void BgDdanJd_Init(Actor* thisx, GlobalContext* globalCtx); void BgDdanJd_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgDdanJd_Update(Actor* thisx, GlobalContext* globalCtx); @@ -54,7 +52,7 @@ typedef enum { void BgDdanJd_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BgDdanJd* this = THIS; + BgDdanJd* this = (BgDdanJd*)thisx; CollisionHeader* colHeader = NULL; Actor_ProcessInitChain(&this->dyna.actor, sInitChain); @@ -76,7 +74,7 @@ void BgDdanJd_Init(Actor* thisx, GlobalContext* globalCtx) { } void BgDdanJd_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgDdanJd* this = THIS; + BgDdanJd* this = (BgDdanJd*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); } @@ -171,7 +169,7 @@ void BgDdanJd_Move(BgDdanJd* this, GlobalContext* globalCtx) { } void BgDdanJd_Update(Actor* thisx, GlobalContext* globalCtx) { - BgDdanJd* this = THIS; + BgDdanJd* this = (BgDdanJd*)thisx; this->actionFunc(this, 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 30214a14d2..4c63a0f5a2 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 @@ -9,8 +9,6 @@ #define FLAGS 0x00000010 -#define THIS ((BgDdanKd*)thisx) - void BgDdanKd_Init(Actor* thisx, GlobalContext* globalCtx); void BgDdanKd_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgDdanKd_Update(Actor* thisx, GlobalContext* globalCtx); @@ -64,7 +62,7 @@ void BgDdanKd_SetupAction(BgDdanKd* this, BgDdanKdActionFunc actionFunc) { } void BgDdanKd_Init(Actor* thisx, GlobalContext* globalCtx) { - BgDdanKd* this = THIS; + BgDdanKd* this = (BgDdanKd*)thisx; s32 pad; CollisionHeader* colHeader = NULL; @@ -87,7 +85,7 @@ void BgDdanKd_Init(Actor* thisx, GlobalContext* globalCtx) { } void BgDdanKd_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgDdanKd* this = THIS; + BgDdanKd* this = (BgDdanKd*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); Collider_DestroyCylinder(globalCtx, &this->collider); @@ -179,7 +177,7 @@ void func_80871838(BgDdanKd* this, GlobalContext* globalCtx) { } void BgDdanKd_Update(Actor* thisx, GlobalContext* globalCtx) { - BgDdanKd* this = THIS; + BgDdanKd* this = (BgDdanKd*)thisx; this->actionFunc(this, 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 3804c172eb..ac45baa7bf 100644 --- a/src/overlays/actors/ovl_Bg_Dodoago/z_bg_dodoago.c +++ b/src/overlays/actors/ovl_Bg_Dodoago/z_bg_dodoago.c @@ -10,8 +10,6 @@ #define FLAGS 0x00000000 -#define THIS ((BgDodoago*)thisx) - void BgDodoago_Init(Actor* thisx, GlobalContext* globalCtx); void BgDodoago_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgDodoago_Update(Actor* thisx, GlobalContext* globalCtx); @@ -108,7 +106,7 @@ static u8 D_808727C0[100]; static s32 D_80872824; void BgDodoago_Init(Actor* thisx, GlobalContext* globalCtx) { - BgDodoago* this = THIS; + BgDodoago* this = (BgDodoago*)thisx; s32 pad; CollisionHeader* colHeader = NULL; @@ -136,7 +134,7 @@ void BgDodoago_Init(Actor* thisx, GlobalContext* globalCtx) { } void BgDodoago_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgDodoago* this = THIS; + BgDodoago* this = (BgDodoago*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); Collider_DestroyCylinder(globalCtx, &this->colliders[0]); @@ -258,7 +256,7 @@ void func_80872288(BgDodoago* this, GlobalContext* globalCtx) { } void BgDodoago_Update(Actor* thisx, GlobalContext* globalCtx) { - BgDodoago* this = THIS; + BgDodoago* this = (BgDodoago*)thisx; EnBom* bomb; if (this->dyna.actor.parent == NULL) { 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 aab3cfc505..cc60e28ba5 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 @@ -13,8 +13,6 @@ #define FLAGS 0x02000030 -#define THIS ((BgDyYoseizo*)thisx) - typedef enum { /* 0 */ FAIRY_UPGRADE_MAGIC, /* 1 */ FAIRY_UPGRADE_DOUBLE_MAGIC, @@ -70,7 +68,7 @@ const ActorInit Bg_Dy_Yoseizo_InitVars = { void BgDyYoseizo_Init(Actor* thisx, GlobalContext* globalCtx2) { GlobalContext* globalCtx = globalCtx2; - BgDyYoseizo* this = THIS; + BgDyYoseizo* this = (BgDyYoseizo*)thisx; this->fountainType = globalCtx->curSpawn; @@ -804,7 +802,7 @@ void BgDyYoseizo_Give_Reward(BgDyYoseizo* this, GlobalContext* globalCtx) { void BgDyYoseizo_Update(Actor* thisx, GlobalContext* globalCtx2) { GlobalContext* globalCtx = globalCtx2; - BgDyYoseizo* this = THIS; + BgDyYoseizo* this = (BgDyYoseizo*)thisx; s32 phi_v1; this->absoluteTimer++; @@ -869,7 +867,7 @@ void BgDyYoseizo_Update(Actor* thisx, GlobalContext* globalCtx2) { s32 BgDyYoseizo_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - BgDyYoseizo* this = THIS; + BgDyYoseizo* this = (BgDyYoseizo*)thisx; if (limbIndex == 8) { // Torso rot->x += this->torsoRot.y; @@ -893,7 +891,7 @@ static void* sMouthTextures[] = { }; void BgDyYoseizo_Draw(Actor* thisx, GlobalContext* globalCtx) { - BgDyYoseizo* this = THIS; + BgDyYoseizo* this = (BgDyYoseizo*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_dy_yoseizo.c", 1609); if (this->actionFunc != BgDyYoseizo_Vanish) { 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 c8e6675676..dccb552846 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 @@ -10,8 +10,6 @@ #define FLAGS 0x00000030 -#define THIS ((BgGanonOtyuka*)thisx) - typedef enum { /* 0x00 */ FLASH_NONE, /* 0x01 */ FLASH_GROW, @@ -68,7 +66,7 @@ static f32 sSideAngles[] = { M_PI / 2, -M_PI / 2, 0.0f, M_PI }; #include "overlays/ovl_Bg_Ganon_Otyuka/ovl_Bg_Ganon_Otyuka.c" void BgGanonOtyuka_Init(Actor* thisx, GlobalContext* globalCtx2) { - BgGanonOtyuka* this = THIS; + BgGanonOtyuka* this = (BgGanonOtyuka*)thisx; GlobalContext* globalCtx = globalCtx2; CollisionHeader* colHeader = NULL; @@ -86,7 +84,7 @@ void BgGanonOtyuka_Init(Actor* thisx, GlobalContext* globalCtx2) { } void BgGanonOtyuka_Destroy(Actor* thisx, GlobalContext* globalCtx2) { - BgGanonOtyuka* this = THIS; + BgGanonOtyuka* this = (BgGanonOtyuka*)thisx; GlobalContext* globalCtx = globalCtx2; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); @@ -236,7 +234,7 @@ void BgGanonOtyuka_DoNothing(Actor* thisx, GlobalContext* globalCtx) { } void BgGanonOtyuka_Update(Actor* thisx, GlobalContext* globalCtx) { - BgGanonOtyuka* this = THIS; + BgGanonOtyuka* this = (BgGanonOtyuka*)thisx; this->actionFunc(this, globalCtx); this->flashTimer++; @@ -246,7 +244,7 @@ void BgGanonOtyuka_Update(Actor* thisx, GlobalContext* globalCtx) { } void BgGanonOtyuka_Draw(Actor* thisx, GlobalContext* globalCtx) { - BgGanonOtyuka* this = THIS; + BgGanonOtyuka* this = (BgGanonOtyuka*)thisx; s16 i; Gfx* phi_s2; Gfx* phi_s1; 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 d4ba856a42..19ab7984c3 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 @@ -10,8 +10,6 @@ #define FLAGS 0x00000000 -#define THIS ((BgGateShutter*)thisx) - void BgGateShutter_Init(Actor* thisx, GlobalContext* globalCtx); void BgGateShutter_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgGateShutter_Update(Actor* thisx, GlobalContext* globalCtx); @@ -35,7 +33,7 @@ const ActorInit Bg_Gate_Shutter_InitVars = { }; void BgGateShutter_Init(Actor* thisx, GlobalContext* globalCtx) { - BgGateShutter* this = THIS; + BgGateShutter* this = (BgGateShutter*)thisx; s32 pad[2]; CollisionHeader* colHeader = NULL; @@ -59,7 +57,7 @@ void BgGateShutter_Init(Actor* thisx, GlobalContext* globalCtx) { } void BgGateShutter_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgGateShutter* this = THIS; + BgGateShutter* this = (BgGateShutter*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); } @@ -116,7 +114,7 @@ void func_808783D4(BgGateShutter* this, GlobalContext* globalCtx) { } void BgGateShutter_Update(Actor* thisx, GlobalContext* globalCtx) { - BgGateShutter* this = THIS; + BgGateShutter* this = (BgGateShutter*)thisx; if (this->unk_178 != 0) { this->unk_178 -= 1; 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 62242d4437..4941a27d53 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 @@ -10,8 +10,6 @@ #define FLAGS 0x00000000 -#define THIS ((BgGjyoBridge*)thisx) - void BgGjyoBridge_Init(Actor* thisx, GlobalContext* globalCtx); void BgGjyoBridge_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgGjyoBridge_Update(Actor* thisx, GlobalContext* globalCtx); @@ -39,7 +37,7 @@ static InitChainEntry sInitChain[] = { }; void BgGjyoBridge_Init(Actor* thisx, GlobalContext* globalCtx) { - BgGjyoBridge* this = THIS; + BgGjyoBridge* this = (BgGjyoBridge*)thisx; s32 pad; CollisionHeader* colHeader; @@ -61,7 +59,7 @@ void BgGjyoBridge_Init(Actor* thisx, GlobalContext* globalCtx) { } void BgGjyoBridge_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgGjyoBridge* this = THIS; + BgGjyoBridge* this = (BgGjyoBridge*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); } @@ -93,13 +91,13 @@ void BgGjyoBridge_SpawnBridge(BgGjyoBridge* this, GlobalContext* globalCtx) { } void BgGjyoBridge_Update(Actor* thisx, GlobalContext* globalCtx) { - BgGjyoBridge* this = THIS; + BgGjyoBridge* this = (BgGjyoBridge*)thisx; this->actionFunc(this, globalCtx); } void BgGjyoBridge_Draw(Actor* thisx, GlobalContext* globalCtx) { - BgGjyoBridge* this = THIS; + BgGjyoBridge* this = (BgGjyoBridge*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_gjyo_bridge.c", 260); 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 03de92d657..e256533cc2 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 @@ -9,8 +9,6 @@ #define FLAGS 0x00000030 -#define THIS ((BgGndDarkmeiro*)thisx) - void BgGndDarkmeiro_Init(Actor* thisx, GlobalContext* globalCtx); void BgGndDarkmeiro_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgGndDarkmeiro_Update(Actor* thisx, GlobalContext* globalCtx); @@ -50,7 +48,7 @@ void BgGndDarkmeiro_ToggleBlock(BgGndDarkmeiro* this, GlobalContext* globalCtx) void BgGndDarkmeiro_Init(Actor* thisx, GlobalContext* globalCtx2) { GlobalContext* globalCtx = globalCtx2; CollisionHeader* colHeader = NULL; - BgGndDarkmeiro* this = THIS; + BgGndDarkmeiro* this = (BgGndDarkmeiro*)thisx; this->updateFunc = BgGndDarkmeiro_Noop; Actor_SetScale(&this->dyna.actor, 0.1f); @@ -100,7 +98,7 @@ void BgGndDarkmeiro_Init(Actor* thisx, GlobalContext* globalCtx2) { void BgGndDarkmeiro_Destroy(Actor* thisx, GlobalContext* globalCtx2) { GlobalContext* globalCtx = globalCtx2; - BgGndDarkmeiro* this = THIS; + BgGndDarkmeiro* this = (BgGndDarkmeiro*)thisx; if ((this->dyna.actor.params & 0xFF) == 1) { if (1) {} @@ -171,7 +169,7 @@ void BgGndDarkmeiro_UpdateSwitchBlock(BgGndDarkmeiro* this, GlobalContext* globa } void BgGndDarkmeiro_Update(Actor* thisx, GlobalContext* globalCtx2) { - BgGndDarkmeiro* this = THIS; + BgGndDarkmeiro* this = (BgGndDarkmeiro*)thisx; GlobalContext* globalCtx = globalCtx2; this->updateFunc(this, globalCtx2); @@ -182,7 +180,7 @@ void BgGndDarkmeiro_DrawInvisiblePath(Actor* thisx, GlobalContext* globalCtx) { } void BgGndDarkmeiro_DrawSwitchBlock(Actor* thisx, GlobalContext* globalCtx) { - BgGndDarkmeiro* this = THIS; + BgGndDarkmeiro* this = (BgGndDarkmeiro*)thisx; s16 vanishTimer; vanishTimer = this->timer1; 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 499ac89f7f..b922425085 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 @@ -9,8 +9,6 @@ #define FLAGS 0x00000030 -#define THIS ((BgGndFiremeiro*)thisx) - void BgGndFiremeiro_Init(Actor* thisx, GlobalContext* globalCtx); void BgGndFiremeiro_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgGndFiremeiro_Update(Actor* thisx, GlobalContext* globalCtx); @@ -34,7 +32,7 @@ const ActorInit Bg_Gnd_Firemeiro_InitVars = { void BgGndFiremeiro_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BgGndFiremeiro* this = THIS; + BgGndFiremeiro* this = (BgGndFiremeiro*)thisx; CollisionHeader* colHeader = NULL; ActorShape_Init(&this->dyna.actor.shape, 0.0f, NULL, 0.0f); @@ -51,7 +49,7 @@ void BgGndFiremeiro_Init(Actor* thisx, GlobalContext* globalCtx) { void BgGndFiremeiro_Destroy(Actor* thisx, GlobalContext* globalCtx2) { GlobalContext* globalCtx = globalCtx2; - BgGndFiremeiro* this = THIS; + BgGndFiremeiro* this = (BgGndFiremeiro*)thisx; if (this->dyna.actor.params == 0) { if (1) {} @@ -135,7 +133,7 @@ void BgGndFiremeiro_Rise(BgGndFiremeiro* this, GlobalContext* globalCtx) { } void BgGndFiremeiro_Update(Actor* thisx, GlobalContext* globalCtx) { - BgGndFiremeiro* this = THIS; + BgGndFiremeiro* this = (BgGndFiremeiro*)thisx; this->actionFunc(this, 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 46d357c4c7..3a76a7d5bc 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 @@ -9,8 +9,6 @@ #define FLAGS 0x00000030 -#define THIS ((BgGndIceblock*)thisx) - typedef enum { /* 0 */ GNDICE_IDLE, /* 1 */ GNDICE_FALL, @@ -48,7 +46,7 @@ static u8 sBlockPositions[2]; void BgGndIceblock_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BgGndIceblock* this = THIS; + BgGndIceblock* this = (BgGndIceblock*)thisx; CollisionHeader* colHeader = NULL; Actor_ProcessInitChain(&this->dyna.actor, sInitChain); @@ -71,7 +69,7 @@ void BgGndIceblock_Init(Actor* thisx, GlobalContext* globalCtx) { void BgGndIceblock_Destroy(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BgGndIceblock* this = THIS; + BgGndIceblock* this = (BgGndIceblock*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); } @@ -347,14 +345,14 @@ void BgGndIceblock_Slide(BgGndIceblock* this, GlobalContext* globalCtx) { void BgGndIceblock_Update(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BgGndIceblock* this = THIS; + BgGndIceblock* this = (BgGndIceblock*)thisx; this->actionFunc(this, globalCtx); } void BgGndIceblock_Draw(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BgGndIceblock* this = THIS; + BgGndIceblock* this = (BgGndIceblock*)thisx; Gfx_DrawDListOpa(globalCtx, gWaterTrialIceBlockDL); } 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 c0c5359123..8941672730 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 @@ -9,8 +9,6 @@ #define FLAGS 0x00000010 -#define THIS ((BgGndNisekabe*)thisx) - void BgGndNisekabe_Init(Actor* thisx, GlobalContext* globalCtx); void BgGndNisekabe_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgGndNisekabe_Update(Actor* thisx, GlobalContext* globalCtx); @@ -29,7 +27,7 @@ const ActorInit Bg_Gnd_Nisekabe_InitVars = { }; void BgGndNisekabe_Init(Actor* thisx, GlobalContext* globalCtx) { - BgGndNisekabe* this = THIS; + BgGndNisekabe* this = (BgGndNisekabe*)thisx; Actor_SetScale(&this->actor, 0.1); this->actor.uncullZoneForward = 3000.0; @@ -39,7 +37,7 @@ void BgGndNisekabe_Destroy(Actor* thisx, GlobalContext* globalCtx) { } void BgGndNisekabe_Update(Actor* thisx, GlobalContext* globalCtx) { - BgGndNisekabe* this = THIS; + BgGndNisekabe* this = (BgGndNisekabe*)thisx; if (globalCtx->actorCtx.unk_03 != 0) { this->actor.flags |= 0x80; @@ -54,7 +52,7 @@ void BgGndNisekabe_Draw(Actor* thisx, GlobalContext* globalCtx) { gGanonsCastleUnusedFakeWallDL, gGanonsCastleScrubsFakeWallDL, }; - BgGndNisekabe* this = THIS; + BgGndNisekabe* this = (BgGndNisekabe*)thisx; u32 index = this->actor.params & 0xFF; if ((this->actor.flags & 0x80) == 0x80) { 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 fa1b281e11..22946b3822 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 @@ -10,8 +10,6 @@ #define FLAGS 0x00000000 -#define THIS ((BgGndSoulmeiro*)thisx) - void BgGndSoulmeiro_Init(Actor* thisx, GlobalContext* globalCtx); void BgGndSoulmeiro_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgGndSoulmeiro_Update(Actor* thisx, GlobalContext* globalCtx); @@ -62,7 +60,7 @@ static InitChainEntry sInitChain[] = { void BgGndSoulmeiro_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BgGndSoulmeiro* this = THIS; + BgGndSoulmeiro* this = (BgGndSoulmeiro*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); this->actionFunc = NULL; @@ -96,7 +94,7 @@ void BgGndSoulmeiro_Init(Actor* thisx, GlobalContext* globalCtx) { } void BgGndSoulmeiro_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgGndSoulmeiro* this = THIS; + BgGndSoulmeiro* this = (BgGndSoulmeiro*)thisx; if ((this->actor.params & 0xFF) == 0) { Collider_DestroyCylinder(globalCtx, &this->collider); @@ -183,7 +181,7 @@ void func_8087B350(BgGndSoulmeiro* this, GlobalContext* globalCtx) { } void BgGndSoulmeiro_Update(Actor* thisx, GlobalContext* globalCtx) { - BgGndSoulmeiro* this = THIS; + BgGndSoulmeiro* this = (BgGndSoulmeiro*)thisx; if (this->actionFunc != NULL) { this->actionFunc(this, 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 7515e8e545..26b704c137 100644 --- a/src/overlays/actors/ovl_Bg_Haka/z_bg_haka.c +++ b/src/overlays/actors/ovl_Bg_Haka/z_bg_haka.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000000 -#define THIS ((BgHaka*)thisx) - void BgHaka_Init(Actor* thisx, GlobalContext* globalCtx); void BgHaka_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgHaka_Update(Actor* thisx, GlobalContext* globalCtx); @@ -40,7 +38,7 @@ static InitChainEntry sInitChain[] = { }; void BgHaka_Init(Actor* thisx, GlobalContext* globalCtx) { - BgHaka* this = THIS; + BgHaka* this = (BgHaka*)thisx; s32 pad; CollisionHeader* colHeader = NULL; @@ -52,7 +50,7 @@ void BgHaka_Init(Actor* thisx, GlobalContext* globalCtx) { } void BgHaka_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgHaka* this = THIS; + BgHaka* this = (BgHaka*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); } @@ -143,7 +141,7 @@ void func_8087BAE4(BgHaka* this, GlobalContext* globalCtx) { } void BgHaka_Update(Actor* thisx, GlobalContext* globalCtx) { - BgHaka* this = THIS; + BgHaka* this = (BgHaka*)thisx; this->actionFunc(this, 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 31ff9da9ae..100d7cce1e 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 @@ -10,8 +10,6 @@ #define FLAGS 0x00000000 -#define THIS ((BgHakaGate*)thisx) - // general purpose timer #define vTimer actionVar1 @@ -72,7 +70,7 @@ static InitChainEntry sInitChain[] = { void BgHakaGate_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BgHakaGate* this = THIS; + BgHakaGate* this = (BgHakaGate*)thisx; CollisionHeader* colHeader = NULL; Actor_ProcessInitChain(thisx, sInitChain); @@ -137,7 +135,7 @@ void BgHakaGate_Init(Actor* thisx, GlobalContext* globalCtx) { void BgHakaGate_Destroy(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BgHakaGate* this = THIS; + BgHakaGate* this = (BgHakaGate*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); if (this->dyna.actor.params == BGHAKAGATE_STATUE) { @@ -302,7 +300,7 @@ void BgHakaGate_FalseSkull(BgHakaGate* this, GlobalContext* globalCtx) { void BgHakaGate_Update(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BgHakaGate* this = THIS; + BgHakaGate* this = (BgHakaGate*)thisx; this->actionFunc(this, globalCtx); if (this->dyna.actor.params == BGHAKAGATE_SKULL) { @@ -344,7 +342,7 @@ void BgHakaGate_Draw(Actor* thisx, GlobalContext* globalCtx) { object_haka_objects_DL_00A860, object_haka_objects_DL_00F1B0, }; - BgHakaGate* this = THIS; + BgHakaGate* this = (BgHakaGate*)thisx; MtxF currentMtxF; if ((thisx->flags & 0x80) == 0x80) { 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 fe7d710247..1e8b53880e 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 @@ -9,8 +9,6 @@ #define FLAGS 0x00000010 -#define THIS ((BgHakaHuta*)thisx) - void BgHakaHuta_Init(Actor* thisx, GlobalContext* globalCtx); void BgHakaHuta_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgHakaHuta_Update(Actor* thisx, GlobalContext* globalCtx); @@ -41,7 +39,7 @@ static InitChainEntry sInitChain[] = { }; void BgHakaHuta_Init(Actor* thisx, GlobalContext* globalCtx) { - BgHakaHuta* this = THIS; + BgHakaHuta* this = (BgHakaHuta*)thisx; s16 pad; CollisionHeader* colHeader = NULL; @@ -60,7 +58,7 @@ void BgHakaHuta_Init(Actor* thisx, GlobalContext* globalCtx) { } void BgHakaHuta_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgHakaHuta* this = THIS; + BgHakaHuta* this = (BgHakaHuta*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); } @@ -207,7 +205,7 @@ void BgHakaHuta_DoNothing(BgHakaHuta* this, GlobalContext* globalCtx) { } void BgHakaHuta_Update(Actor* thisx, GlobalContext* globalCtx) { - BgHakaHuta* this = THIS; + BgHakaHuta* this = (BgHakaHuta*)thisx; this->actionFunc(this, 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 92e5894f81..788419248a 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 @@ -10,8 +10,6 @@ #define FLAGS 0x000000B0 -#define THIS ((BgHakaMegane*)thisx) - void BgHakaMegane_Init(Actor* thisx, GlobalContext* globalCtx); void BgHakaMegane_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgHakaMegane_Update(Actor* thisx, GlobalContext* globalCtx); @@ -62,7 +60,7 @@ static Gfx* sDLists[] = { }; void BgHakaMegane_Init(Actor* thisx, GlobalContext* globalCtx) { - BgHakaMegane* this = THIS; + BgHakaMegane* this = (BgHakaMegane*)thisx; Actor_ProcessInitChain(thisx, sInitChain); DynaPolyActor_Init(&this->dyna, DPM_UNK); @@ -81,7 +79,7 @@ void BgHakaMegane_Init(Actor* thisx, GlobalContext* globalCtx) { } void BgHakaMegane_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgHakaMegane* this = THIS; + BgHakaMegane* this = (BgHakaMegane*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); } @@ -123,13 +121,13 @@ void BgHakaMegane_DoNothing(BgHakaMegane* this, GlobalContext* globalCtx) { } void BgHakaMegane_Update(Actor* thisx, GlobalContext* globalCtx) { - BgHakaMegane* this = THIS; + BgHakaMegane* this = (BgHakaMegane*)thisx; this->actionFunc(this, globalCtx); } void BgHakaMegane_Draw(Actor* thisx, GlobalContext* globalCtx) { - BgHakaMegane* this = THIS; + BgHakaMegane* this = (BgHakaMegane*)thisx; if ((thisx->flags & 0x80) == 0x80) { Gfx_DrawDListXlu(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 8374781b54..bcd1a7c147 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 @@ -9,8 +9,6 @@ #define FLAGS 0x00000000 -#define THIS ((BgHakaMeganeBG*)thisx) - void BgHakaMeganeBG_Init(Actor* thisx, GlobalContext* globalCtx); void BgHakaMeganeBG_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgHakaMeganeBG_Update(Actor* thisx, GlobalContext* globalCtx); @@ -57,7 +55,7 @@ static Gfx* D_8087E410[] = { void BgHakaMeganeBG_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BgHakaMeganeBG* this = THIS; + BgHakaMeganeBG* this = (BgHakaMeganeBG*)thisx; CollisionHeader* colHeader = NULL; Actor_ProcessInitChain(&this->dyna.actor, sInitChain); @@ -101,7 +99,7 @@ void BgHakaMeganeBG_Init(Actor* thisx, GlobalContext* globalCtx) { } void BgHakaMeganeBG_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgHakaMeganeBG* this = THIS; + BgHakaMeganeBG* this = (BgHakaMeganeBG*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); } @@ -205,13 +203,13 @@ void func_8087E34C(BgHakaMeganeBG* this, GlobalContext* globalCtx) { } void BgHakaMeganeBG_Update(Actor* thisx, GlobalContext* globalCtx) { - BgHakaMeganeBG* this = THIS; + BgHakaMeganeBG* this = (BgHakaMeganeBG*)thisx; this->actionFunc(this, globalCtx); } void BgHakaMeganeBG_Draw(Actor* thisx, GlobalContext* globalCtx) { - BgHakaMeganeBG* this = THIS; + BgHakaMeganeBG* this = (BgHakaMeganeBG*)thisx; s16 params = this->dyna.actor.params; if (params == 0) { 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 4a4d836155..f850cb98fd 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 @@ -10,8 +10,6 @@ #define FLAGS 0x00000011 -#define THIS ((BgHakaSgami*)thisx) - typedef enum { /* 0 */ SCYTHE_TRAP_SHADOW_TEMPLE, /* 1 */ SCYTHE_TRAP_SHADOW_TEMPLE_INVISIBLE, @@ -133,7 +131,7 @@ void BgHakaSgami_Init(Actor* thisx, GlobalContext* globalCtx) { static u8 sP2StartColor[] = { 200, 200, 200, 130 }; static u8 sP1EndColor[] = { 200, 200, 200, 60 }; static u8 sP2EndColor[] = { 150, 150, 150, 20 }; - BgHakaSgami* this = THIS; + BgHakaSgami* this = (BgHakaSgami*)thisx; EffectBlureInit1 blureInit; s32 i; ColliderTris* colliderScythe = &this->colliderScythe; @@ -189,7 +187,7 @@ void BgHakaSgami_Init(Actor* thisx, GlobalContext* globalCtx) { } void BgHakaSgami_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgHakaSgami* this = THIS; + BgHakaSgami* this = (BgHakaSgami*)thisx; Effect_Delete(globalCtx, this->blureEffectIndex[0]); Effect_Delete(globalCtx, this->blureEffectIndex[1]); @@ -288,7 +286,7 @@ void BgHakaSgami_Spin(BgHakaSgami* this, GlobalContext* globalCtx) { } void BgHakaSgami_Update(Actor* thisx, GlobalContext* globalCtx) { - BgHakaSgami* this = THIS; + BgHakaSgami* this = (BgHakaSgami*)thisx; Player* player = GET_PLAYER(globalCtx); if (!(player->stateFlags1 & 0x300000C0) || (this->actionFunc == BgHakaSgami_SetupSpin)) { @@ -297,7 +295,7 @@ void BgHakaSgami_Update(Actor* thisx, GlobalContext* globalCtx) { } void BgHakaSgami_Draw(Actor* thisx, GlobalContext* globalCtx) { - BgHakaSgami* this = THIS; + BgHakaSgami* this = (BgHakaSgami*)thisx; if (this->unk_151 != 0) { Gfx_DrawDListXlu(globalCtx, object_haka_objects_DL_00BF20); 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 dc00076be5..dcb98696ad 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 @@ -9,8 +9,6 @@ #define FLAGS 0x00000030 -#define THIS ((BgHakaShip*)thisx) - void BgHakaShip_Init(Actor* thisx, GlobalContext* globalCtx); void BgHakaShip_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgHakaShip_Update(Actor* thisx, GlobalContext* globalCtx); @@ -40,7 +38,7 @@ static InitChainEntry sInitChain[] = { }; void BgHakaShip_Init(Actor* thisx, GlobalContext* globalCtx) { - BgHakaShip* this = THIS; + BgHakaShip* this = (BgHakaShip*)thisx; s32 pad; CollisionHeader* colHeader = NULL; @@ -69,7 +67,7 @@ void BgHakaShip_Init(Actor* thisx, GlobalContext* globalCtx) { } void BgHakaShip_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgHakaShip* this = THIS; + BgHakaShip* this = (BgHakaShip*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); Audio_StopSfxByPos(&this->bellSoundPos); @@ -187,7 +185,7 @@ void BgHakaShip_CrashFall(BgHakaShip* this, GlobalContext* globalCtx) { } void BgHakaShip_Update(Actor* thisx, GlobalContext* globalCtx) { - BgHakaShip* this = THIS; + BgHakaShip* this = (BgHakaShip*)thisx; this->actionFunc(this, globalCtx); if (this->dyna.actor.params == 0) { @@ -196,7 +194,7 @@ void BgHakaShip_Update(Actor* thisx, GlobalContext* globalCtx) { } void BgHakaShip_Draw(Actor* thisx, GlobalContext* globalCtx) { - BgHakaShip* this = THIS; + BgHakaShip* this = (BgHakaShip*)thisx; f32 angleTemp; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_haka_ship.c", 528); 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 49825f9633..49bc1a7f32 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 @@ -9,8 +9,6 @@ #define FLAGS 0x00000000 -#define THIS ((BgHakaTrap*)thisx) - void BgHakaTrap_Init(Actor* thisx, GlobalContext* globalCtx); void BgHakaTrap_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgHakaTrap_Update(Actor* thisx, GlobalContext* globalCtx); @@ -109,7 +107,7 @@ static InitChainEntry sInitChain[] = { void BgHakaTrap_Init(Actor* thisx, GlobalContext* globalCtx) { static UNK_TYPE D_80881014 = 0; - BgHakaTrap* this = THIS; + BgHakaTrap* this = (BgHakaTrap*)thisx; s32 pad; CollisionHeader* colHeader = NULL; @@ -186,7 +184,7 @@ void BgHakaTrap_Init(Actor* thisx, GlobalContext* globalCtx) { } void BgHakaTrap_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgHakaTrap* this = THIS; + BgHakaTrap* this = (BgHakaTrap*)thisx; if (this->dyna.actor.params != HAKA_TRAP_PROPELLER) { if (this->dyna.actor.params != HAKA_TRAP_GUILLOTINE_SLOW) { @@ -481,7 +479,7 @@ void func_80880C0C(BgHakaTrap* this, GlobalContext* globalCtx) { } void BgHakaTrap_Update(Actor* thisx, GlobalContext* globalCtx) { - BgHakaTrap* this = THIS; + BgHakaTrap* this = (BgHakaTrap*)thisx; Vec3f* actorPos = &this->dyna.actor.world.pos; this->actionFunc(this, globalCtx); @@ -522,7 +520,7 @@ void BgHakaTrap_Draw(Actor* thisx, GlobalContext* globalCtx) { object_haka_objects_DL_008A20, object_haka_objects_DL_0072C0, }; static Color_RGBA8 D_8088103C = { 0, 0, 0, 0 }; - BgHakaTrap* this = THIS; + BgHakaTrap* this = (BgHakaTrap*)thisx; s32 pad; Vec3f sp2C; 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 e527ee826a..da0cfd0ffa 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 @@ -10,8 +10,6 @@ #define FLAGS 0x00000010 -#define THIS ((BgHakaTubo*)thisx) - void BgHakaTubo_Init(Actor* thisx, GlobalContext* globalCtx); void BgHakaTubo_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgHakaTubo_Update(Actor* thisx, GlobalContext* globalCtx); @@ -79,7 +77,7 @@ static InitChainEntry sInitChain[] = { }; void BgHakaTubo_Init(Actor* thisx, GlobalContext* globalCtx) { - BgHakaTubo* this = THIS; + BgHakaTubo* this = (BgHakaTubo*)thisx; s32 pad; CollisionHeader* colHeader = NULL; @@ -97,7 +95,7 @@ void BgHakaTubo_Init(Actor* thisx, GlobalContext* globalCtx) { } void BgHakaTubo_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgHakaTubo* this = THIS; + BgHakaTubo* this = (BgHakaTubo*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); Collider_DestroyCylinder(globalCtx, &this->potCollider); @@ -214,7 +212,7 @@ void BgHakaTubo_DropCollectible(BgHakaTubo* this, GlobalContext* globalCtx) { } void BgHakaTubo_Update(Actor* thisx, GlobalContext* globalCtx) { - BgHakaTubo* this = THIS; + BgHakaTubo* this = (BgHakaTubo*)thisx; this->actionFunc(this, globalCtx); this->fireScroll++; @@ -244,7 +242,7 @@ void BgHakaTubo_DrawFlameCircle(BgHakaTubo* this, GlobalContext* globalCtx) { } void BgHakaTubo_Draw(Actor* thisx, GlobalContext* globalCtx) { - BgHakaTubo* this = THIS; + BgHakaTubo* this = (BgHakaTubo*)thisx; Gfx_DrawDListOpa(globalCtx, object_haka_objects_DL_00FE40); BgHakaTubo_DrawFlameCircle(this, 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 10853bedb3..62c3aa2dce 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 @@ -9,8 +9,6 @@ #define FLAGS 0x00000030 -#define THIS ((BgHakaWater*)thisx) - void BgHakaWater_Init(Actor* thisx, GlobalContext* globalCtx); void BgHakaWater_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgHakaWater_Update(Actor* thisx, GlobalContext* globalCtx); @@ -37,7 +35,7 @@ static InitChainEntry sInitChain[] = { }; void BgHakaWater_Init(Actor* thisx, GlobalContext* globalCtx) { - BgHakaWater* this = THIS; + BgHakaWater* this = (BgHakaWater*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); if (Flags_GetSwitch(globalCtx, this->actor.params)) { @@ -102,13 +100,13 @@ void BgHakaWater_ChangeWaterLevel(BgHakaWater* this, GlobalContext* globalCtx) { } void BgHakaWater_Update(Actor* thisx, GlobalContext* globalCtx) { - BgHakaWater* this = THIS; + BgHakaWater* this = (BgHakaWater*)thisx; this->actionFunc(this, globalCtx); } void BgHakaWater_Draw(Actor* thisx, GlobalContext* globalCtx) { - BgHakaWater* this = THIS; + BgHakaWater* this = (BgHakaWater*)thisx; s32 pad; f32 temp; s32 pad2; 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 0b7af0eb19..4cbcc4f1fa 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 @@ -17,8 +17,6 @@ typedef enum { /* 0x3 */ STA_UNKNOWN } ShadowTempleAssetsType; -#define THIS ((BgHakaZou*)thisx) - void BgHakaZou_Init(Actor* thisx, GlobalContext* globalCtx); void BgHakaZou_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgHakaZou_Update(Actor* thisx, GlobalContext* globalCtx); @@ -75,7 +73,7 @@ static InitChainEntry sInitChain[] = { void BgHakaZou_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BgHakaZou* this = THIS; + BgHakaZou* this = (BgHakaZou*)thisx; Actor_ProcessInitChain(thisx, sInitChain); @@ -124,7 +122,7 @@ void BgHakaZou_Init(Actor* thisx, GlobalContext* globalCtx) { } void BgHakaZou_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgHakaZou* this = THIS; + BgHakaZou* this = (BgHakaZou*)thisx; if (this->dyna.actor.params != STA_UNKNOWN) { DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); @@ -392,7 +390,7 @@ void BgHakaZou_DoNothing(BgHakaZou* this, GlobalContext* globalCtx) { } void BgHakaZou_Update(Actor* thisx, GlobalContext* globalCtx) { - BgHakaZou* this = THIS; + BgHakaZou* this = (BgHakaZou*)thisx; this->actionFunc(this, globalCtx); 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 dd084b922d..cfcbe5adab 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 @@ -10,8 +10,6 @@ #define FLAGS 0x00000000 -#define THIS ((BgHeavyBlock*)thisx) - #define PIECE_FLAG_HIT_FLOOR (1 << 0) void BgHeavyBlock_Init(Actor* thisx, GlobalContext* globalCtx); @@ -84,7 +82,7 @@ void BgHeavyBlock_SetupDynapoly(BgHeavyBlock* this, GlobalContext* globalCtx) { } void BgHeavyBlock_Init(Actor* thisx, GlobalContext* globalCtx) { - BgHeavyBlock* this = THIS; + BgHeavyBlock* this = (BgHeavyBlock*)thisx; Actor_ProcessInitChain(thisx, sInitChain); ActorShape_Init(&thisx->shape, 0.0f, NULL, 0.0f); @@ -151,7 +149,7 @@ void BgHeavyBlock_Init(Actor* thisx, GlobalContext* globalCtx) { } void BgHeavyBlock_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgHeavyBlock* this = THIS; + BgHeavyBlock* this = (BgHeavyBlock*)thisx; switch (this->dyna.actor.params & 0xFF) { case HEAVYBLOCK_BIG_PIECE: break; @@ -477,7 +475,7 @@ void BgHeavyBlock_Land(BgHeavyBlock* this, GlobalContext* globalCtx) { } void BgHeavyBlock_Update(Actor* thisx, GlobalContext* globalCtx) { - BgHeavyBlock* this = THIS; + BgHeavyBlock* this = (BgHeavyBlock*)thisx; this->actionFunc(this, globalCtx); } @@ -485,7 +483,7 @@ void BgHeavyBlock_Update(Actor* thisx, GlobalContext* globalCtx) { void BgHeavyBlock_Draw(Actor* thisx, GlobalContext* globalCtx) { static Vec3f D_80884EC8 = { 0.0f, 0.0f, 0.0f }; static Vec3f D_80884ED4 = { 0.0f, 400.0f, 0.0f }; - BgHeavyBlock* this = THIS; + BgHeavyBlock* this = (BgHeavyBlock*)thisx; s32 pad; Player* player = GET_PLAYER(globalCtx); 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 08996fd889..2b889315f6 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 @@ -9,8 +9,6 @@ #define FLAGS 0x00000010 -#define THIS ((BgHidanCurtain*)thisx) - void BgHidanCurtain_Init(Actor* thisx, GlobalContext* globalCtx); void BgHidanCurtain_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgHidanCurtain_Update(Actor* thisx, GlobalContext* globalCtx); @@ -69,7 +67,7 @@ const ActorInit Bg_Hidan_Curtain_InitVars = { void BgHidanCurtain_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BgHidanCurtain* this = THIS; + BgHidanCurtain* this = (BgHidanCurtain*)thisx; BgHidanCurtainParams* hcParams; osSyncPrintf("Curtain (arg_data 0x%04x)\n", this->actor.params); @@ -120,7 +118,7 @@ void BgHidanCurtain_Init(Actor* thisx, GlobalContext* globalCtx) { void BgHidanCurtain_Destroy(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BgHidanCurtain* this = THIS; + BgHidanCurtain* this = (BgHidanCurtain*)thisx; Collider_DestroyCylinder(globalCtx, &this->collider); } @@ -203,7 +201,7 @@ void BgHidanCurtain_WaitForTimer(BgHidanCurtain* this, GlobalContext* globalCtx) void BgHidanCurtain_Update(Actor* thisx, GlobalContext* globalCtx2) { GlobalContext* globalCtx = globalCtx2; - BgHidanCurtain* this = THIS; + BgHidanCurtain* this = (BgHidanCurtain*)thisx; BgHidanCurtainParams* hcParams = &sHCParams[this->size]; f32 riseProgress; @@ -241,7 +239,7 @@ void BgHidanCurtain_Update(Actor* thisx, GlobalContext* globalCtx2) { } void BgHidanCurtain_Draw(Actor* thisx, GlobalContext* globalCtx) { - BgHidanCurtain* this = THIS; + BgHidanCurtain* this = (BgHidanCurtain*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_hidan_curtain.c", 685); func_80093D84(globalCtx->state.gfxCtx); 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 e8dd81e65a..4b8c8f36f5 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 @@ -9,8 +9,6 @@ #define FLAGS 0x00000000 -#define THIS ((BgHidanDalm*)thisx) - void BgHidanDalm_Init(Actor* thisx, GlobalContext* globalCtx); void BgHidanDalm_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgHidanDalm_Update(Actor* thisx, GlobalContext* globalCtx); @@ -97,7 +95,7 @@ static InitChainEntry sInitChain[] = { }; void BgHidanDalm_Init(Actor* thisx, GlobalContext* globalCtx) { - BgHidanDalm* this = THIS; + BgHidanDalm* this = (BgHidanDalm*)thisx; s32 pad; CollisionHeader* colHeader = NULL; @@ -118,7 +116,7 @@ void BgHidanDalm_Init(Actor* thisx, GlobalContext* globalCtx) { } void BgHidanDalm_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgHidanDalm* this = THIS; + BgHidanDalm* this = (BgHidanDalm*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); Collider_DestroyTris(globalCtx, &this->collider); @@ -179,7 +177,7 @@ void BgHidanDalm_Shrink(BgHidanDalm* this, GlobalContext* globalCtx) { } void BgHidanDalm_Update(Actor* thisx, GlobalContext* globalCtx) { - BgHidanDalm* this = THIS; + BgHidanDalm* this = (BgHidanDalm*)thisx; this->actionFunc(this, globalCtx); Actor_MoveForward(&this->dyna.actor); @@ -210,7 +208,7 @@ void BgHidanDalm_UpdateCollider(BgHidanDalm* this) { } void BgHidanDalm_Draw(Actor* thisx, GlobalContext* globalCtx) { - BgHidanDalm* this = THIS; + BgHidanDalm* this = (BgHidanDalm*)thisx; if (this->dyna.actor.params == 0) { Gfx_DrawDListOpa(globalCtx, gFireTempleHammerableTotemBodyDL); 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 89c905cb20..ebc51e5e8b 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 @@ -9,8 +9,6 @@ #define FLAGS 0x00000000 -#define THIS ((BgHidanFirewall*)thisx) - void BgHidanFirewall_Init(Actor* thisx, GlobalContext* globalCtx); void BgHidanFirewall_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgHidanFirewall_Update(Actor* thisx, GlobalContext* globalCtx); @@ -58,7 +56,7 @@ static ColliderCylinderInit sCylinderInit = { static CollisionCheckInfoInit sColChkInfoInit = { 1, 80, 100, MASS_IMMOVABLE }; void BgHidanFirewall_Init(Actor* thisx, GlobalContext* globalCtx) { - BgHidanFirewall* this = THIS; + BgHidanFirewall* this = (BgHidanFirewall*)thisx; this->actor.scale.x = 0.12f; this->actor.scale.z = 0.12f; @@ -77,7 +75,7 @@ void BgHidanFirewall_Init(Actor* thisx, GlobalContext* globalCtx) { } void BgHidanFirewall_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgHidanFirewall* this = THIS; + BgHidanFirewall* this = (BgHidanFirewall*)thisx; Collider_DestroyCylinder(globalCtx, &this->collider); } @@ -176,7 +174,7 @@ void BgHidanFirewall_ColliderFollowPlayer(BgHidanFirewall* this, GlobalContext* } void BgHidanFirewall_Update(Actor* thisx, GlobalContext* globalCtx) { - BgHidanFirewall* this = THIS; + BgHidanFirewall* this = (BgHidanFirewall*)thisx; s32 pad; this->unk_150 = (this->unk_150 + 1) % 8; @@ -201,7 +199,7 @@ static void* sFireballTexs[] = { }; void BgHidanFirewall_Draw(Actor* thisx, GlobalContext* globalCtx) { - BgHidanFirewall* this = THIS; + BgHidanFirewall* this = (BgHidanFirewall*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_hidan_firewall.c", 448); 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 2ed866467b..3660fdc1c2 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 @@ -9,8 +9,6 @@ #define FLAGS 0x00000010 -#define THIS ((BgHidanFslift*)thisx) - void BgHidanFslift_Init(Actor* thisx, GlobalContext* globalCtx); void BgHidanFslift_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgHidanFslift_Update(Actor* thisx, GlobalContext* globalCtx); @@ -41,7 +39,7 @@ static InitChainEntry sInitChain[] = { void BgHidanFslift_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad1; - BgHidanFslift* this = THIS; + BgHidanFslift* this = (BgHidanFslift*)thisx; CollisionHeader* colHeader = NULL; s32 pad2; @@ -69,7 +67,7 @@ void func_80886F24(BgHidanFslift* this) { } void BgHidanFslift_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgHidanFslift* this = THIS; + BgHidanFslift* this = (BgHidanFslift*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); } @@ -124,7 +122,7 @@ void func_808870D8(BgHidanFslift* this, GlobalContext* globalCtx) { } void BgHidanFslift_Update(Actor* thisx, GlobalContext* globalCtx) { - BgHidanFslift* this = THIS; + BgHidanFslift* this = (BgHidanFslift*)thisx; this->actionFunc(this, globalCtx); if (func_8004356C(&this->dyna)) { 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 1fdb3c8a5d..e5343e2600 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 @@ -11,8 +11,6 @@ #define FLAGS 0x00000010 -#define THIS ((BgHidanFwbig*)thisx) - typedef enum { /* 0 */ FWBIG_MOVE, /* 1 */ FWBIG_RESET, @@ -71,7 +69,7 @@ static InitChainEntry sInitChain[] = { void BgHidanFwbig_Init(Actor* thisx, GlobalContext* globalCtx2) { GlobalContext* globalCtx = globalCtx2; - BgHidanFwbig* this = THIS; + BgHidanFwbig* this = (BgHidanFwbig*)thisx; Player* player = GET_PLAYER(globalCtx); Actor_ProcessInitChain(&this->actor, sInitChain); @@ -108,7 +106,7 @@ void BgHidanFwbig_Init(Actor* thisx, GlobalContext* globalCtx2) { void BgHidanFwbig_Destroy(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BgHidanFwbig* this = THIS; + BgHidanFwbig* this = (BgHidanFwbig*)thisx; Collider_DestroyCylinder(globalCtx, &this->collider); } @@ -220,7 +218,7 @@ void BgHidanFwbig_MoveCollider(BgHidanFwbig* this, GlobalContext* globalCtx) { void BgHidanFwbig_Update(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BgHidanFwbig* this = THIS; + BgHidanFwbig* this = (BgHidanFwbig*)thisx; if (this->collider.base.atFlags & AT_HIT) { this->collider.base.atFlags &= ~AT_HIT; 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 7170621c10..1f926e617d 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 @@ -9,8 +9,6 @@ #define FLAGS 0x00000000 -#define THIS ((BgHidanHamstep*)thisx) - void BgHidanHamstep_Init(Actor* thisx, GlobalContext* globalCtx); void BgHidanHamstep_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgHidanHamstep_Update(Actor* thisx, GlobalContext* globalCtx); @@ -128,7 +126,7 @@ s32 BgHidanHamstep_SpawnChildren(BgHidanHamstep* this, GlobalContext* globalCtx2 } void BgHidanHamstep_Init(Actor* thisx, GlobalContext* globalCtx) { - BgHidanHamstep* this = THIS; + BgHidanHamstep* this = (BgHidanHamstep*)thisx; s32 pad; CollisionHeader* colHeader = NULL; Vec3f sp48[3]; @@ -198,7 +196,7 @@ void BgHidanHamstep_Init(Actor* thisx, GlobalContext* globalCtx) { } void BgHidanHamstep_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgHidanHamstep* this = THIS; + BgHidanHamstep* this = (BgHidanHamstep*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); @@ -392,7 +390,7 @@ void BgHidanHamstep_DoNothing(BgHidanHamstep* this, GlobalContext* globalCtx) { } void BgHidanHamstep_Update(Actor* thisx, GlobalContext* globalCtx) { - BgHidanHamstep* this = THIS; + BgHidanHamstep* this = (BgHidanHamstep*)thisx; this->actionFunc(this, 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 617e50bd9c..cd5e091c1e 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 @@ -9,8 +9,6 @@ #define FLAGS 0x00000000 -#define THIS ((BgHidanHrock*)thisx) - void BgHidanHrock_Init(Actor* thisx, GlobalContext* globalCtx); void BgHidanHrock_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgHidanHrock_Update(Actor* thisx, GlobalContext* globalCtx); @@ -76,7 +74,7 @@ static InitChainEntry sInitChain[] = { }; void BgHidanHrock_Init(Actor* thisx, GlobalContext* globalCtx) { - BgHidanHrock* this = THIS; + BgHidanHrock* this = (BgHidanHrock*)thisx; ColliderTrisElementInit* colliderElementInit; Vec3f vertices[3]; f32 cosRotY; @@ -143,7 +141,7 @@ void BgHidanHrock_Init(Actor* thisx, GlobalContext* globalCtx) { } void BgHidanHrock_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgHidanHrock* this = THIS; + BgHidanHrock* this = (BgHidanHrock*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); Collider_DestroyTris(globalCtx, &this->collider); @@ -225,7 +223,7 @@ void func_808896B8(BgHidanHrock* this, GlobalContext* globalCtx) { } void BgHidanHrock_Update(Actor* thisx, GlobalContext* globalCtx) { - BgHidanHrock* this = THIS; + BgHidanHrock* this = (BgHidanHrock*)thisx; this->actionFunc(this, globalCtx); } 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 70829c6c7b..7c6737c205 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 @@ -9,8 +9,6 @@ #define FLAGS 0x00000010 -#define THIS ((BgHidanKousi*)thisx) - void BgHidanKousi_Init(Actor* thisx, GlobalContext* globalCtx); void BgHidanKousi_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgHidanKousi_Update(Actor* thisx, GlobalContext* globalCtx); @@ -65,7 +63,7 @@ void BgHidanKousi_SetupAction(BgHidanKousi* this, BgHidanKousiActionFunc actionF } void BgHidanKousi_Init(Actor* thisx, GlobalContext* globalCtx) { - BgHidanKousi* this = THIS; + BgHidanKousi* this = (BgHidanKousi*)thisx; s32 pad; CollisionHeader* colHeader = NULL; @@ -91,7 +89,7 @@ void BgHidanKousi_Init(Actor* thisx, GlobalContext* globalCtx) { } void BgHidanKousi_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgHidanKousi* this = THIS; + BgHidanKousi* this = (BgHidanKousi*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); } @@ -146,7 +144,7 @@ void func_80889D28(BgHidanKousi* this, GlobalContext* globalCtx) { } void BgHidanKousi_Update(Actor* thisx, GlobalContext* globalCtx) { - BgHidanKousi* this = THIS; + BgHidanKousi* this = (BgHidanKousi*)thisx; this->actionFunc(this, 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 e9c2390185..503d9b8a99 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 @@ -11,8 +11,6 @@ #define FLAGS 0x00000000 -#define THIS ((BgHidanKowarerukabe*)thisx) - typedef enum { /* 0 */ CRACKED_STONE_FLOOR, /* 1 */ BOMBABLE_WALL, @@ -113,7 +111,7 @@ static InitChainEntry sInitChain[] = { }; void BgHidanKowarerukabe_Init(Actor* thisx, GlobalContext* globalCtx) { - BgHidanKowarerukabe* this = THIS; + BgHidanKowarerukabe* this = (BgHidanKowarerukabe*)thisx; BgHidanKowarerukabe_InitDynaPoly(this, globalCtx); @@ -140,7 +138,7 @@ void BgHidanKowarerukabe_Init(Actor* thisx, GlobalContext* globalCtx) { } void BgHidanKowarerukabe_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgHidanKowarerukabe* this = THIS; + BgHidanKowarerukabe* this = (BgHidanKowarerukabe*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); Collider_DestroyJntSph(globalCtx, &this->collider); @@ -301,7 +299,7 @@ void BgHidanKowarerukabe_Break(BgHidanKowarerukabe* this, GlobalContext* globalC } void BgHidanKowarerukabe_Update(Actor* thisx, GlobalContext* globalCtx) { - BgHidanKowarerukabe* this = THIS; + BgHidanKowarerukabe* this = (BgHidanKowarerukabe*)thisx; s32 pad; if (Actor_GetCollidedExplosive(globalCtx, &this->collider.base) != NULL) { @@ -323,7 +321,7 @@ void BgHidanKowarerukabe_Update(Actor* thisx, GlobalContext* globalCtx) { } void BgHidanKowarerukabe_Draw(Actor* thisx, GlobalContext* globalCtx) { - BgHidanKowarerukabe* this = THIS; + BgHidanKowarerukabe* this = (BgHidanKowarerukabe*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_hidan_kowarerukabe.c", 565); 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 eb61c0fca3..b43ec1c96e 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 @@ -9,8 +9,6 @@ #define FLAGS 0x00000000 -#define THIS ((BgHidanRock*)thisx) - void BgHidanRock_Init(Actor* thisx, GlobalContext* globalCtx); void BgHidanRock_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgHidanRock_Update(Actor* thisx, GlobalContext* globalCtx); @@ -69,7 +67,7 @@ static InitChainEntry sInitChain[] = { }; void BgHidanRock_Init(Actor* thisx, GlobalContext* globalCtx) { - BgHidanRock* this = THIS; + BgHidanRock* this = (BgHidanRock*)thisx; s32 pad; CollisionHeader* colHeader = NULL; @@ -108,7 +106,7 @@ void BgHidanRock_Init(Actor* thisx, GlobalContext* globalCtx) { } void BgHidanRock_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgHidanRock* this = THIS; + BgHidanRock* this = (BgHidanRock*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); Collider_DestroyCylinder(globalCtx, &this->collider); @@ -330,7 +328,7 @@ void func_8088B990(BgHidanRock* this, GlobalContext* globalCtx) { } void BgHidanRock_Update(Actor* thisx, GlobalContext* globalCtx) { - BgHidanRock* this = THIS; + BgHidanRock* this = (BgHidanRock*)thisx; this->actionFunc(this, globalCtx); if (this->actionFunc == func_8088B79C) { @@ -379,7 +377,7 @@ void func_8088BC40(GlobalContext* globalCtx, BgHidanRock* this) { } void BgHidanRock_Draw(Actor* thisx, GlobalContext* globalCtx) { - BgHidanRock* this = THIS; + BgHidanRock* this = (BgHidanRock*)thisx; s32 pad; if (this->type == 0) { 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 4a4cab37f8..354584d097 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 @@ -9,8 +9,6 @@ #define FLAGS 0x00000000 -#define THIS ((BgHidanRsekizou*)thisx) - void BgHidanRsekizou_Init(Actor* thisx, GlobalContext* globalCtx); void BgHidanRsekizou_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgHidanRsekizou_Update(Actor* thisx, GlobalContext* globalCtx); @@ -122,7 +120,7 @@ static void* sFireballsTexs[] = { }; void BgHidanRsekizou_Init(Actor* thisx, GlobalContext* globalCtx) { - BgHidanRsekizou* this = THIS; + BgHidanRsekizou* this = (BgHidanRsekizou*)thisx; s32 i; s32 pad; CollisionHeader* colHeader; @@ -142,14 +140,14 @@ void BgHidanRsekizou_Init(Actor* thisx, GlobalContext* globalCtx) { } void BgHidanRsekizou_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgHidanRsekizou* this = THIS; + BgHidanRsekizou* this = (BgHidanRsekizou*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); Collider_DestroyJntSph(globalCtx, &this->collider); } void BgHidanRsekizou_Update(Actor* thisx, GlobalContext* globalCtx) { - BgHidanRsekizou* this = THIS; + BgHidanRsekizou* this = (BgHidanRsekizou*)thisx; s32 i; ColliderJntSphElement* sphere; s32 pad; @@ -225,7 +223,7 @@ Gfx* BgHidanRsekizou_DrawFireball(GlobalContext* globalCtx, BgHidanRsekizou* thi } void BgHidanRsekizou_Draw(Actor* thisx, GlobalContext* globalCtx) { - BgHidanRsekizou* this = THIS; + BgHidanRsekizou* this = (BgHidanRsekizou*)thisx; s32 i; s32 pad; MtxF mf; 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 767cbda2c0..b4a988eea4 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 @@ -9,8 +9,6 @@ #define FLAGS 0x00000000 -#define THIS ((BgHidanSekizou*)thisx) - void BgHidanSekizou_Init(Actor* thisx, GlobalContext* globalCtx); void BgHidanSekizou_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgHidanSekizou_Update(Actor* thisx, GlobalContext* globalCtx); @@ -148,7 +146,7 @@ void func_8088CEC0(BgHidanSekizou* this, s32 arg1, s16 arg2) { void BgHidanSekizou_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BgHidanSekizou* this = THIS; + BgHidanSekizou* this = (BgHidanSekizou*)thisx; s32 i; CollisionHeader* colHeader = NULL; @@ -178,7 +176,7 @@ void BgHidanSekizou_Init(Actor* thisx, GlobalContext* globalCtx) { void BgHidanSekizou_Destroy(Actor* thisx, GlobalContext* globalCtx2) { GlobalContext* globalCtx = globalCtx2; - BgHidanSekizou* this = THIS; + BgHidanSekizou* this = (BgHidanSekizou*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); Collider_DestroyJntSph(globalCtx, &this->collider); @@ -265,7 +263,7 @@ void func_8088D750(BgHidanSekizou* this, GlobalContext* globalCtx) { void BgHidanSekizou_Update(Actor* thisx, GlobalContext* globalCtx2) { GlobalContext* globalCtx = globalCtx2; - BgHidanSekizou* this = THIS; + BgHidanSekizou* this = (BgHidanSekizou*)thisx; if (this->unk_170 != 0) { this->unk_170--; @@ -392,7 +390,7 @@ void func_8088DE08(s16 arg0, s16 arg1, s32 arg2[]) { void BgHidanSekizou_Draw(Actor* thisx, GlobalContext* globalCtx2) { GlobalContext* globalCtx = globalCtx2; - BgHidanSekizou* this = THIS; + BgHidanSekizou* this = (BgHidanSekizou*)thisx; s32 i; s32 sp6C[4]; 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 f9de888fa1..7acf5863d5 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 @@ -9,8 +9,6 @@ #define FLAGS 0x00000000 -#define THIS ((BgHidanSima*)thisx) - void BgHidanSima_Init(Actor* thisx, GlobalContext* globalCtx); void BgHidanSima_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgHidanSima_Update(Actor* thisx, GlobalContext* globalCtx); @@ -83,7 +81,7 @@ static void* sFireballsTexs[] = { }; void BgHidanSima_Init(Actor* thisx, GlobalContext* globalCtx) { - BgHidanSima* this = THIS; + BgHidanSima* this = (BgHidanSima*)thisx; s32 pad; CollisionHeader* colHeader = NULL; s32 i; @@ -109,7 +107,7 @@ void BgHidanSima_Init(Actor* thisx, GlobalContext* globalCtx) { } void BgHidanSima_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgHidanSima* this = THIS; + BgHidanSima* this = (BgHidanSima*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); Collider_DestroyJntSph(globalCtx, &this->collider); @@ -208,7 +206,7 @@ void func_8088E90C(BgHidanSima* this) { } void BgHidanSima_Update(Actor* thisx, GlobalContext* globalCtx) { - BgHidanSima* this = THIS; + BgHidanSima* this = (BgHidanSima*)thisx; s32 pad; this->actionFunc(this, globalCtx); @@ -278,7 +276,7 @@ Gfx* func_8088EB54(GlobalContext* globalCtx, BgHidanSima* this, Gfx* gfx) { } void BgHidanSima_Draw(Actor* thisx, GlobalContext* globalCtx) { - BgHidanSima* this = THIS; + BgHidanSima* this = (BgHidanSima*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_hidan_sima.c", 641); func_80093D18(globalCtx->state.gfxCtx); 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 85a266f20f..dffe32a441 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 @@ -9,8 +9,6 @@ #define FLAGS 0x00000010 -#define THIS ((BgHidanSyoku*)thisx) - void BgHidanSyoku_Init(Actor* thisx, GlobalContext* globalCtx); void BgHidanSyoku_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgHidanSyoku_Update(Actor* thisx, GlobalContext* globalCtx); @@ -38,7 +36,7 @@ static InitChainEntry sInitChain[] = { void BgHidanSyoku_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BgHidanSyoku* this = THIS; + BgHidanSyoku* this = (BgHidanSyoku*)thisx; CollisionHeader* colHeader = NULL; Actor_ProcessInitChain(&this->dyna.actor, sInitChain); @@ -50,7 +48,7 @@ void BgHidanSyoku_Init(Actor* thisx, GlobalContext* globalCtx) { } void BgHidanSyoku_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgHidanSyoku* this = THIS; + BgHidanSyoku* this = (BgHidanSyoku*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); } @@ -107,7 +105,7 @@ void func_8088F62C(BgHidanSyoku* this, GlobalContext* globalCtx) { } void BgHidanSyoku_Update(Actor* thisx, GlobalContext* globalCtx) { - BgHidanSyoku* this = THIS; + BgHidanSyoku* this = (BgHidanSyoku*)thisx; this->actionFunc(this, globalCtx); if (func_8004356C(&this->dyna)) { 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 06af0a3577..ae05868a22 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 @@ -9,8 +9,6 @@ #define FLAGS 0x00000000 -#define THIS ((BgIceObjects*)thisx) - void BgIceObjects_Init(Actor* thisx, GlobalContext* globalCtx); void BgIceObjects_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgIceObjects_Update(Actor* thisx, GlobalContext* globalCtx); @@ -43,7 +41,7 @@ static InitChainEntry sInitChain[] = { void BgIceObjects_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BgIceObjects* this = THIS; + BgIceObjects* this = (BgIceObjects*)thisx; CollisionHeader* colHeader = NULL; Actor_ProcessInitChain(&this->dyna.actor, sInitChain); @@ -57,7 +55,7 @@ void BgIceObjects_Init(Actor* thisx, GlobalContext* globalCtx) { void BgIceObjects_Destroy(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BgIceObjects* this = THIS; + BgIceObjects* this = (BgIceObjects*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); } @@ -226,14 +224,14 @@ void BgIceObjects_Stuck(BgIceObjects* this, GlobalContext* globalCtx) { void BgIceObjects_Update(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BgIceObjects* this = THIS; + BgIceObjects* this = (BgIceObjects*)thisx; this->actionFunc(this, globalCtx); } void BgIceObjects_Draw(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BgIceObjects* this = THIS; + BgIceObjects* this = (BgIceObjects*)thisx; Gfx_DrawDListOpa(globalCtx, object_ice_objects_DL_000190); } 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 fc4da74626..1581174bee 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 @@ -3,8 +3,6 @@ #define FLAGS 0x00000000 -#define THIS ((BgIceShelter*)thisx) - void BgIceShelter_Init(Actor* thisx, GlobalContext* globalCtx); void BgIceShelter_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgIceShelter_Update(Actor* thisx, GlobalContext* globalCtx); @@ -133,7 +131,7 @@ static InitChainEntry sInitChain[] = { void BgIceShelter_Init(Actor* thisx, GlobalContext* globalCtx) { static Vec3f kzIceScale = { 0.18f, 0.27f, 0.24f }; - BgIceShelter* this = THIS; + BgIceShelter* this = (BgIceShelter*)thisx; s16 type = (this->dyna.actor.params >> 8) & 7; Actor_ProcessInitChain(&this->dyna.actor, sInitChain); @@ -175,7 +173,7 @@ void BgIceShelter_Init(Actor* thisx, GlobalContext* globalCtx) { } void BgIceShelter_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgIceShelter* this = THIS; + BgIceShelter* this = (BgIceShelter*)thisx; switch ((this->dyna.actor.params >> 8) & 7) { case 2: @@ -380,14 +378,14 @@ void func_808911D4(BgIceShelter* this, GlobalContext* globalCtx) { } void BgIceShelter_Update(Actor* thisx, GlobalContext* globalCtx) { - BgIceShelter* this = THIS; + BgIceShelter* this = (BgIceShelter*)thisx; this->actionFunc(this, globalCtx); } void BgIceShelter_Draw(Actor* thisx, GlobalContext* globalCtx2) { GlobalContext* globalCtx = globalCtx2; - BgIceShelter* this = THIS; + BgIceShelter* this = (BgIceShelter*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_ice_shelter.c", 748); 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 d4dedaf561..4da0ca4a6c 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 @@ -9,8 +9,6 @@ #define FLAGS 0x00000010 -#define THIS ((BgIceShutter*)thisx) - void BgIceShutter_Init(Actor* thisx, GlobalContext* globalCtx); void BgIceShutter_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgIceShutter_Update(Actor* thisx, GlobalContext* globalCtx); @@ -47,7 +45,7 @@ void func_80891AC0(BgIceShutter* this) { } void BgIceShutter_Init(Actor* thisx, GlobalContext* globalCtx) { - BgIceShutter* this = THIS; + BgIceShutter* this = (BgIceShutter*)thisx; f32 sp24; CollisionHeader* colHeader; s32 sp28; @@ -92,7 +90,7 @@ void BgIceShutter_Init(Actor* thisx, GlobalContext* globalCtx) { } void BgIceShutter_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgIceShutter* this = THIS; + BgIceShutter* this = (BgIceShutter*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); } @@ -126,7 +124,7 @@ void func_80891DD4(BgIceShutter* this, GlobalContext* globalCtx) { } void BgIceShutter_Update(Actor* thisx, GlobalContext* globalCtx) { - BgIceShutter* this = THIS; + BgIceShutter* this = (BgIceShutter*)thisx; this->actionFunc(this, 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 4c6557b34e..26452d13cc 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 @@ -9,8 +9,6 @@ #define FLAGS 0x00000000 -#define THIS ((BgIceTurara*)thisx) - void BgIceTurara_Init(Actor* thisx, GlobalContext* globalCtx); void BgIceTurara_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgIceTurara_Update(Actor* thisx, GlobalContext* globalCtx); @@ -62,7 +60,7 @@ static InitChainEntry sInitChain[] = { }; void BgIceTurara_Init(Actor* thisx, GlobalContext* globalCtx) { - BgIceTurara* this = THIS; + BgIceTurara* this = (BgIceTurara*)thisx; s32 pad; CollisionHeader* colHeader = NULL; @@ -83,7 +81,7 @@ void BgIceTurara_Init(Actor* thisx, GlobalContext* globalCtx) { } void BgIceTurara_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgIceTurara* this = THIS; + BgIceTurara* this = (BgIceTurara*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); Collider_DestroyCylinder(globalCtx, &this->collider); @@ -193,7 +191,7 @@ void BgIceTurara_Regrow(BgIceTurara* this, GlobalContext* globalCtx) { } void BgIceTurara_Update(Actor* thisx, GlobalContext* globalCtx) { - BgIceTurara* this = THIS; + BgIceTurara* this = (BgIceTurara*)thisx; this->actionFunc(this, 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 e8eda54a6f..18c57c8f6c 100644 --- a/src/overlays/actors/ovl_Bg_Ingate/z_bg_ingate.c +++ b/src/overlays/actors/ovl_Bg_Ingate/z_bg_ingate.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000000 -#define THIS ((BgInGate*)thisx) - void BgInGate_Init(Actor* thisx, GlobalContext* globalCtx); void BgInGate_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgInGate_Update(Actor* thisx, GlobalContext* globalCtx); @@ -36,7 +34,7 @@ void BgInGate_SetupAction(BgInGate* this, BgInGateActionFunc actionFunc) { } void BgInGate_Init(Actor* thisx, GlobalContext* globalCtx) { - BgInGate* this = THIS; + BgInGate* this = (BgInGate*)thisx; s32 pad; CollisionHeader* colHeader = NULL; @@ -62,7 +60,7 @@ void BgInGate_Init(Actor* thisx, GlobalContext* globalCtx) { } void BgInGate_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgInGate* this = THIS; + BgInGate* this = (BgInGate*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); } @@ -99,7 +97,7 @@ void BgInGate_DoNothing(BgInGate* this, GlobalContext* globalCtx) { } void BgInGate_Update(Actor* thisx, GlobalContext* globalCtx) { - BgInGate* this = THIS; + BgInGate* this = (BgInGate*)thisx; this->actionFunc(this, 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 c1fa3943b2..1b331c2284 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 @@ -9,8 +9,6 @@ #define FLAGS 0x00000010 -#define THIS ((BgJya1flift*)thisx) - void BgJya1flift_Init(Actor* thisx, GlobalContext* globalCtx); void BgJya1flift_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgJya1flift_Update(Actor* thisx, GlobalContext* globalCtx); @@ -85,7 +83,7 @@ void BgJya1flift_InitDynapoly(BgJya1flift* this, GlobalContext* globalCtx, Colli } void BgJya1flift_InitCollision(Actor* thisx, GlobalContext* globalCtx) { - BgJya1flift* this = THIS; + BgJya1flift* this = (BgJya1flift*)thisx; Collider_InitCylinder(globalCtx, &this->collider); Collider_SetCylinder(globalCtx, &this->collider, &this->dyna.actor, &sCylinderInit); @@ -93,7 +91,7 @@ void BgJya1flift_InitCollision(Actor* thisx, GlobalContext* globalCtx) { } void BgJya1flift_Init(Actor* thisx, GlobalContext* globalCtx) { - BgJya1flift* this = THIS; + BgJya1flift* this = (BgJya1flift*)thisx; // "1 F lift" osSyncPrintf("(1Fリフト)(flag %d)(room %d)\n", sIsSpawned, globalCtx->roomCtx.curRoom.num); this->hasInitialized = false; @@ -115,7 +113,7 @@ void BgJya1flift_Init(Actor* thisx, GlobalContext* globalCtx) { } void BgJya1flift_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgJya1flift* this = THIS; + BgJya1flift* this = (BgJya1flift*)thisx; if (this->hasInitialized) { sIsSpawned = false; @@ -181,7 +179,7 @@ void BgJya1flift_DelayMove(BgJya1flift* this, GlobalContext* globalCtx) { } void BgJya1flift_Update(Actor* thisx, GlobalContext* globalCtx2) { - BgJya1flift* this = THIS; + BgJya1flift* this = (BgJya1flift*)thisx; GlobalContext* globalCtx = globalCtx2; s32 tempIsRiding; 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 abd926fb23..ca559dc140 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 @@ -9,8 +9,6 @@ #define FLAGS 0x00000000 -#define THIS ((BgJyaAmishutter*)thisx) - void BgJyaAmishutter_Init(Actor* thisx, GlobalContext* globalCtx); void BgJyaAmishutter_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgJyaAmishutter_Update(Actor* thisx, GlobalContext* globalCtx); @@ -60,7 +58,7 @@ void BgJyaAmishutter_InitDynaPoly(BgJyaAmishutter* this, GlobalContext* globalCt } void BgJyaAmishutter_Init(Actor* thisx, GlobalContext* globalCtx) { - BgJyaAmishutter* this = THIS; + BgJyaAmishutter* this = (BgJyaAmishutter*)thisx; BgJyaAmishutter_InitDynaPoly(this, globalCtx, &gAmishutterCol, DPM_UNK); Actor_ProcessInitChain(&this->dyna.actor, sInitChain); @@ -68,7 +66,7 @@ void BgJyaAmishutter_Init(Actor* thisx, GlobalContext* globalCtx) { } void BgJyaAmishutter_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgJyaAmishutter* this = THIS; + BgJyaAmishutter* this = (BgJyaAmishutter*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); } @@ -120,7 +118,7 @@ void func_8089350C(BgJyaAmishutter* this) { } void BgJyaAmishutter_Update(Actor* thisx, GlobalContext* globalCtx) { - BgJyaAmishutter* this = THIS; + BgJyaAmishutter* this = (BgJyaAmishutter*)thisx; this->actionFunc(this); } 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 c187ec6128..c41cfaefc3 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 @@ -9,8 +9,6 @@ #define FLAGS 0x00000030 -#define THIS ((BgJyaBigmirror*)thisx) - void BgJyaBigmirror_Init(Actor* thisx, GlobalContext* globalCtx); void BgJyaBigmirror_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgJyaBigmirror_Update(Actor* thisx, GlobalContext* globalCtx); @@ -43,7 +41,7 @@ static BigMirrorDataEntry sCobraSpawnData[] = { }; void BgJyaBigmirror_SetRoomFlag(Actor* thisx, GlobalContext* globalCtx) { - BgJyaBigmirror* this = THIS; + BgJyaBigmirror* this = (BgJyaBigmirror*)thisx; this->puzzleFlags &= ~(BIGMIR_PUZZLE_IN_STATUE_ROOM | BIGMIR_PUZZLE_IN_1ST_TOP_ROOM | BIGMIR_PUZZLE_IN_2ND_TOP_ROOM); @@ -58,7 +56,7 @@ void BgJyaBigmirror_SetRoomFlag(Actor* thisx, GlobalContext* globalCtx) { void BgJyaBigmirror_HandleCobra(Actor* thisx, GlobalContext* globalCtx) { static u8 cobraPuzzleFlags[] = { BIGMIR_PUZZLE_COBRA1_SOLVED, BIGMIR_PUZZLE_COBRA2_SOLVED }; - BgJyaBigmirror* this = THIS; + BgJyaBigmirror* this = (BgJyaBigmirror*)thisx; BigMirrorDataEntry* curSpawnData; BigmirrorCobra* curCobraInfo; s32 i; @@ -109,7 +107,7 @@ void BgJyaBigmirror_HandleCobra(Actor* thisx, GlobalContext* globalCtx) { } void BgJyaBigmirror_SetBombiwaFlag(Actor* thisx, GlobalContext* globalCtx) { - BgJyaBigmirror* this = THIS; + BgJyaBigmirror* this = (BgJyaBigmirror*)thisx; if (Flags_GetSwitch(globalCtx, 0x29)) { this->puzzleFlags |= BIGMIR_PUZZLE_BOMBIWA_DESTROYED; @@ -125,7 +123,7 @@ void BgJyaBigmirror_HandleMirRay(Actor* thisx, GlobalContext* globalCtx) { { -560.0f, 1800.0f, -310.0f }, { 60.0f, 1800.0f, -310.0f }, }; - BgJyaBigmirror* this = THIS; + BgJyaBigmirror* this = (BgJyaBigmirror*)thisx; s32 puzzleSolved; s32 lightBeamToggles[3]; s32 i; @@ -175,7 +173,7 @@ void BgJyaBigmirror_HandleMirRay(Actor* thisx, GlobalContext* globalCtx) { } void BgJyaBigmirror_Init(Actor* thisx, GlobalContext* globalCtx) { - BgJyaBigmirror* this = THIS; + BgJyaBigmirror* this = (BgJyaBigmirror*)thisx; if (sIsSpawned) { Actor_Kill(&this->actor); @@ -195,7 +193,7 @@ void BgJyaBigmirror_Init(Actor* thisx, GlobalContext* globalCtx) { } void BgJyaBigmirror_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgJyaBigmirror* this = THIS; + BgJyaBigmirror* this = (BgJyaBigmirror*)thisx; if (this->spawned) { sIsSpawned = false; @@ -211,7 +209,7 @@ void BgJyaBigmirror_Update(Actor* thisx, GlobalContext* globalCtx) { void BgJyaBigmirror_DrawLightBeam(Actor* thisx, GlobalContext* globalCtx) { static Vec3s D_80893F4C = { 0, 0, 0 }; - BgJyaBigmirror* this = THIS; + BgJyaBigmirror* this = (BgJyaBigmirror*)thisx; Actor* lift; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_jya_bigmirror.c", 435); @@ -240,7 +238,7 @@ void BgJyaBigmirror_DrawLightBeam(Actor* thisx, GlobalContext* globalCtx) { } void BgJyaBigmirror_Draw(Actor* thisx, GlobalContext* globalCtx) { - BgJyaBigmirror* this = THIS; + BgJyaBigmirror* this = (BgJyaBigmirror*)thisx; if (this->puzzleFlags & BIGMIR_PUZZLE_IN_1ST_TOP_ROOM) { Gfx_DrawDListOpa(globalCtx, gBigMirror3DL); 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 756da36936..fbf9f32a46 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 @@ -9,8 +9,6 @@ #define FLAGS 0x00000000 -#define THIS ((BgJyaBlock*)thisx) - void BgJyaBlock_Init(Actor* thisx, GlobalContext* globalCtx); void BgJyaBlock_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgJyaBlock_Update(Actor* thisx, GlobalContext* globalCtx); @@ -37,7 +35,7 @@ static InitChainEntry sInitChain[] = { void BgJyaBlock_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BgJyaBlock* this = THIS; + BgJyaBlock* this = (BgJyaBlock*)thisx; CollisionHeader* colHeader = NULL; DynaPolyActor_Init(&this->dyna, 0); @@ -51,13 +49,13 @@ void BgJyaBlock_Init(Actor* thisx, GlobalContext* globalCtx) { } void BgJyaBlock_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgJyaBlock* this = THIS; + BgJyaBlock* this = (BgJyaBlock*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); } void BgJyaBlock_Update(Actor* thisx, GlobalContext* globalCtx) { - BgJyaBlock* this = THIS; + BgJyaBlock* this = (BgJyaBlock*)thisx; Player* player = GET_PLAYER(globalCtx); player->stateFlags2 &= ~0x10; 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 1e5bbd5444..5066dc6d08 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 @@ -3,8 +3,6 @@ #include "objects/object_jya_obj/object_jya_obj.h" #define FLAGS 0x00000001 -#define THIS ((BgJyaBombchuiwa*)thisx) - void BgJyaBombchuiwa_Init(Actor* thisx, GlobalContext* globalCtx); void BgJyaBombchuiwa_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgJyaBombchuiwa_Update(Actor* thisx, GlobalContext* globalCtx); @@ -76,7 +74,7 @@ void BgJyaBombchuiwa_SetDrawFlags(BgJyaBombchuiwa* this, u8 drawFlags) { } void BgJyaBombchuiwa_Init(Actor* thisx, GlobalContext* globalCtx) { - BgJyaBombchuiwa* this = THIS; + BgJyaBombchuiwa* this = (BgJyaBombchuiwa*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); BgJyaBombchuiwa_SetupCollider(this, globalCtx); @@ -90,7 +88,7 @@ void BgJyaBombchuiwa_Init(Actor* thisx, GlobalContext* globalCtx) { void BgJyaBombchuiwa_Destroy(Actor* thisx, GlobalContext* globalCtx2) { GlobalContext* globalCtx = globalCtx2; - BgJyaBombchuiwa* this = THIS; + BgJyaBombchuiwa* this = (BgJyaBombchuiwa*)thisx; Collider_DestroyJntSph(globalCtx, &this->collider); } @@ -190,7 +188,7 @@ void BgJyaBombchuiwa_SpawnLightRay(BgJyaBombchuiwa* this, GlobalContext* globalC } void BgJyaBombchuiwa_Update(Actor* thisx, GlobalContext* globalCtx) { - BgJyaBombchuiwa* this = THIS; + BgJyaBombchuiwa* this = (BgJyaBombchuiwa*)thisx; if (this->actionFunc != NULL) { this->actionFunc(this, globalCtx); @@ -207,7 +205,7 @@ void BgJyaBombchuiwa_DrawRock(GlobalContext* globalCtx) { } void BgJyaBombchuiwa_DrawLight(Actor* thisx, GlobalContext* globalCtx) { - BgJyaBombchuiwa* this = THIS; + BgJyaBombchuiwa* this = (BgJyaBombchuiwa*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_jya_bombchuiwa.c", 453); func_80093D84(globalCtx->state.gfxCtx); @@ -224,7 +222,7 @@ void BgJyaBombchuiwa_DrawLight(Actor* thisx, GlobalContext* globalCtx) { void BgJyaBombchuiwa_Draw(Actor* thisx, GlobalContext* globalCtx) { static Vec3f D_80894F88 = { -920.0f, 480.0f, -889.0f }; static Vec3s D_80894F94 = { 0, 0, 0 }; - BgJyaBombchuiwa* this = THIS; + BgJyaBombchuiwa* this = (BgJyaBombchuiwa*)thisx; if (this->drawFlags & 1) { Gfx_DrawDListOpa(globalCtx, gBombchuiwaDL); 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 7e64b9e040..610c33a1dd 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 @@ -11,8 +11,6 @@ #define FLAGS 0x00000000 -#define THIS ((BgJyaBombiwa*)thisx) - void BgJyaBombiwa_Init(Actor* thisx, GlobalContext* globalCtx); void BgJyaBombiwa_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgJyaBombiwa_Update(Actor* thisx, GlobalContext* globalCtx); @@ -88,7 +86,7 @@ void BgJyaBombiwa_InitCollider(BgJyaBombiwa* this, GlobalContext* globalCtx) { } void BgJyaBombiwa_Init(Actor* thisx, GlobalContext* globalCtx) { - BgJyaBombiwa* this = THIS; + BgJyaBombiwa* this = (BgJyaBombiwa*)thisx; if ((this->dyna.actor.params & 0x3F) != 0x29) { osSyncPrintf(VT_COL(YELLOW, BLACK)); @@ -111,7 +109,7 @@ void BgJyaBombiwa_Init(Actor* thisx, GlobalContext* globalCtx) { } void BgJyaBombiwa_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgJyaBombiwa* this = THIS; + BgJyaBombiwa* this = (BgJyaBombiwa*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); Collider_DestroyJntSph(globalCtx, &this->collider); @@ -162,7 +160,7 @@ void BgJyaBombiwa_Break(BgJyaBombiwa* this, GlobalContext* globalCtx) { } void BgJyaBombiwa_Update(Actor* thisx, GlobalContext* globalCtx) { - BgJyaBombiwa* this = THIS; + BgJyaBombiwa* this = (BgJyaBombiwa*)thisx; if (this->collider.base.acFlags & AC_HIT) { BgJyaBombiwa_Break(this, globalCtx); @@ -175,7 +173,7 @@ void BgJyaBombiwa_Update(Actor* thisx, GlobalContext* globalCtx) { } void BgJyaBombiwa_Draw(Actor* thisx, GlobalContext* globalCtx) { - BgJyaBombiwa* this = THIS; + BgJyaBombiwa* this = (BgJyaBombiwa*)thisx; Gfx_DrawDListOpa(globalCtx, gBombiwaDL); Collider_UpdateSpheres(0, &this->collider); 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 bbaed9d41d..756970f83f 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 @@ -6,8 +6,6 @@ #define FLAGS 0x00000010 -#define THIS ((BgJyaCobra*)thisx) - void BgJyaCobra_Init(Actor* thisx, GlobalContext* globalCtx); void BgJyaCobra_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgJyaCobra_Update(Actor* thisx, GlobalContext* globalCtx); @@ -397,7 +395,7 @@ void BgJyaCobra_UpdateShadowFromTop(BgJyaCobra* this) { } void BgJyaCobra_Init(Actor* thisx, GlobalContext* globalCtx) { - BgJyaCobra* this = THIS; + BgJyaCobra* this = (BgJyaCobra*)thisx; BgJyaCobra_InitDynapoly(this, globalCtx, &gCobraCol, DPM_UNK); Actor_ProcessInitChain(&this->dyna.actor, sInitChain); @@ -425,7 +423,7 @@ void BgJyaCobra_Init(Actor* thisx, GlobalContext* globalCtx) { } void BgJyaCobra_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgJyaCobra* this = THIS; + BgJyaCobra* this = (BgJyaCobra*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); } @@ -514,7 +512,7 @@ void func_80896ABC(BgJyaCobra* this, GlobalContext* globalCtx) { void BgJyaCobra_Update(Actor* thisx, GlobalContext* globalCtx2) { GlobalContext* globalCtx = globalCtx2; - BgJyaCobra* this = THIS; + BgJyaCobra* this = (BgJyaCobra*)thisx; this->actionFunc(this, globalCtx); @@ -602,7 +600,7 @@ void BgJyaCobra_DrawShadow(BgJyaCobra* this, GlobalContext* globalCtx) { } void BgJyaCobra_Draw(Actor* thisx, GlobalContext* globalCtx) { - BgJyaCobra* this = THIS; + BgJyaCobra* this = (BgJyaCobra*)thisx; func_80896CB4(globalCtx); Gfx_DrawDListOpa(globalCtx, gCobra1DL); 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 09b86ff86c..8373ae06d4 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 @@ -10,8 +10,6 @@ #define FLAGS 0x00000010 -#define THIS ((BgJyaGoroiwa*)thisx) - void BgJyaGoroiwa_Init(Actor* thisx, GlobalContext* globalCtx); void BgJyaGoroiwa_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgJyaGoroiwa_Update(Actor* thisx, GlobalContext* globalCtx); @@ -97,7 +95,7 @@ void BgJyaGoroiwa_UpdateRotation(BgJyaGoroiwa* this) { } void BgJyaGoroiwa_Init(Actor* thisx, GlobalContext* globalCtx) { - BgJyaGoroiwa* this = THIS; + BgJyaGoroiwa* this = (BgJyaGoroiwa*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); BgJyaGoroiwa_InitCollider(this, globalCtx); @@ -109,7 +107,7 @@ void BgJyaGoroiwa_Init(Actor* thisx, GlobalContext* globalCtx) { } void BgJyaGoroiwa_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgJyaGoroiwa* this = THIS; + BgJyaGoroiwa* this = (BgJyaGoroiwa*)thisx; Collider_DestroyJntSph(globalCtx, &this->collider); } @@ -197,7 +195,7 @@ void BgJyaGoroiwa_Wait(BgJyaGoroiwa* this, GlobalContext* globalCtx) { void BgJyaGoroiwa_Update(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BgJyaGoroiwa* this = THIS; + BgJyaGoroiwa* this = (BgJyaGoroiwa*)thisx; Player* player = GET_PLAYER(globalCtx); s32 bgId; Vec3f pos; 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 82515cd21b..6ba786550c 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 @@ -10,8 +10,6 @@ #define FLAGS 0x00000010 -#define THIS ((BgJyaHaheniron*)thisx) - void BgJyaHaheniron_Init(Actor* thisx, GlobalContext* globalCtx); void BgJyaHaheniron_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgJyaHaheniron_Update(Actor* thisx, GlobalContext* globalCtx); @@ -119,7 +117,7 @@ void BgJyaHaheniron_SpawnFragments(GlobalContext* globalCtx, Vec3f* vec1, Vec3f* void BgJyaHaheniron_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BgJyaHaheniron* this = THIS; + BgJyaHaheniron* this = (BgJyaHaheniron*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); Actor_SetScale(&this->actor, D_80898794[this->actor.params]); @@ -136,7 +134,7 @@ void BgJyaHaheniron_Init(Actor* thisx, GlobalContext* globalCtx) { void BgJyaHaheniron_Destroy(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BgJyaHaheniron* this = THIS; + BgJyaHaheniron* this = (BgJyaHaheniron*)thisx; if (this->actor.params == 0) { Collider_DestroyJntSph(globalCtx, &this->collider); @@ -197,7 +195,7 @@ void BgJyaHaheniron_RubbleCollide(BgJyaHaheniron* this, GlobalContext* globalCtx void BgJyaHaheniron_Update(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BgJyaHaheniron* this = THIS; + BgJyaHaheniron* this = (BgJyaHaheniron*)thisx; this->timer++; this->actionFunc(this, globalCtx); @@ -210,7 +208,7 @@ void BgJyaHaheniron_Draw(Actor* thisx, GlobalContext* globalCtx) { gObjectJyaIronDL_000600, }; s32 pad; - BgJyaHaheniron* this = THIS; + BgJyaHaheniron* this = (BgJyaHaheniron*)thisx; if (this->actor.params == 0) { Collider_UpdateSpheres(0, &this->collider); 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 370f65a3dc..37f513702b 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 @@ -10,8 +10,6 @@ #define FLAGS 0x00000000 -#define THIS ((BgJyaIronobj*)thisx) - typedef void (*BgJyaIronobjIkFunc)(BgJyaIronobj*, GlobalContext*, EnIk*); void BgJyaIronobj_Init(Actor* thisx, GlobalContext* globalCtx); @@ -216,7 +214,7 @@ void BgJyaIronobj_SpawnThoneParticles(BgJyaIronobj* this, GlobalContext* arg1, E } void BgJyaIronobj_Init(Actor* thisx, GlobalContext* globalCtx) { - BgJyaIronobj* this = THIS; + BgJyaIronobj* this = (BgJyaIronobj*)thisx; s32 pad; CollisionHeader* colHeader = NULL; @@ -229,7 +227,7 @@ void BgJyaIronobj_Init(Actor* thisx, GlobalContext* globalCtx) { } void BgJyaIronobj_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgJyaIronobj* this = THIS; + BgJyaIronobj* this = (BgJyaIronobj*)thisx; Collider_DestroyCylinder(globalCtx, &this->colCylinder); DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); @@ -267,7 +265,7 @@ void func_808992E8(BgJyaIronobj* this, GlobalContext* globalCtx) { } void BgJyaIronobj_Update(Actor* thisx, GlobalContext* globalCtx) { - BgJyaIronobj* this = THIS; + BgJyaIronobj* this = (BgJyaIronobj*)thisx; this->actionFunc(this, globalCtx); } 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 00ee4ce590..7d839791b7 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 @@ -9,8 +9,6 @@ #define FLAGS 0x00000000 -#define THIS ((BgJyaKanaami*)thisx) - void BgJyaKanaami_Init(Actor* thisx, GlobalContext* globalCtx); void BgJyaKanaami_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgJyaKanaami_Update(Actor* thisx, GlobalContext* globalCtx); @@ -56,7 +54,7 @@ void BgJyaKanaami_InitDynaPoly(BgJyaKanaami* this, GlobalContext* globalCtx, Col } void BgJyaKanaami_Init(Actor* thisx, GlobalContext* globalCtx) { - BgJyaKanaami* this = THIS; + BgJyaKanaami* this = (BgJyaKanaami*)thisx; BgJyaKanaami_InitDynaPoly(this, globalCtx, &gKanaamiCol, DPM_UNK); Actor_ProcessInitChain(&this->dyna.actor, sInitChain); @@ -69,7 +67,7 @@ void BgJyaKanaami_Init(Actor* thisx, GlobalContext* globalCtx) { } void BgJyaKanaami_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgJyaKanaami* this = THIS; + BgJyaKanaami* this = (BgJyaKanaami*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); } @@ -117,7 +115,7 @@ void func_80899A08(BgJyaKanaami* this) { } void BgJyaKanaami_Update(Actor* thisx, GlobalContext* globalCtx) { - BgJyaKanaami* this = THIS; + BgJyaKanaami* this = (BgJyaKanaami*)thisx; if (this->actionFunc != NULL) { this->actionFunc(this, 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 1cf110e445..261e44faf5 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 @@ -9,8 +9,6 @@ #define FLAGS 0x00000010 -#define THIS ((BgJyaLift*)thisx) - void BgJyaLift_Init(Actor* thisx, GlobalContext* globalCtx); void BgJyaLift_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgJyaLift_Update(Actor* thisx, GlobalContext* globalCtx); @@ -53,7 +51,7 @@ void BgJyaLift_InitDynapoly(BgJyaLift* this, GlobalContext* globalCtx, Collision } void BgJyaLift_Init(Actor* thisx, GlobalContext* globalCtx) { - BgJyaLift* this = THIS; + BgJyaLift* this = (BgJyaLift*)thisx; this->isSpawned = false; if (sIsSpawned) { @@ -76,7 +74,7 @@ void BgJyaLift_Init(Actor* thisx, GlobalContext* globalCtx) { } void BgJyaLift_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgJyaLift* this = THIS; + BgJyaLift* this = (BgJyaLift*)thisx; if (this->isSpawned) { @@ -131,7 +129,7 @@ void BgJyaLift_SetFinalPosY(BgJyaLift* this) { } void BgJyaLift_Update(Actor* thisx, GlobalContext* globalCtx2) { - BgJyaLift* this = THIS; + BgJyaLift* this = (BgJyaLift*)thisx; GlobalContext* globalCtx = globalCtx2; if (this->actionFunc != NULL) { 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 8d265a3cb0..bfdac72002 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 @@ -4,8 +4,6 @@ #define FLAGS 0x00000000 -#define THIS ((BgJyaMegami*)thisx) - void BgJyaMegami_Init(Actor* thisx, GlobalContext* globalCtx); void BgJyaMegami_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgJyaMegami_Update(Actor* thisx, GlobalContext* globalCtx); @@ -153,7 +151,7 @@ void BgJyaMegami_SetupSpawnEffect(BgJyaMegami* this, GlobalContext* globalCtx, f } void BgJyaMegami_Init(Actor* thisx, GlobalContext* globalCtx) { - BgJyaMegami* this = THIS; + BgJyaMegami* this = (BgJyaMegami*)thisx; BgJyaMegami_InitDynaPoly(this, globalCtx, &GMegamiCol, DPM_UNK); BgJyaMegami_InitCollider(this, globalCtx); @@ -167,7 +165,7 @@ void BgJyaMegami_Init(Actor* thisx, GlobalContext* globalCtx) { } void BgJyaMegami_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgJyaMegami* this = THIS; + BgJyaMegami* this = (BgJyaMegami*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); Collider_DestroyJntSph(globalCtx, &this->collider); @@ -282,7 +280,7 @@ void BgJyaMegami_Explode(BgJyaMegami* this, GlobalContext* globalCtx) { } void BgJyaMegami_Update(Actor* thisx, GlobalContext* globalCtx) { - BgJyaMegami* this = THIS; + BgJyaMegami* this = (BgJyaMegami*)thisx; this->actionFunc(this, globalCtx); } @@ -344,7 +342,7 @@ void BgJyaMegami_DrawExplode(BgJyaMegami* this, GlobalContext* globalCtx) { } void BgJyaMegami_Draw(Actor* thisx, GlobalContext* globalCtx) { - BgJyaMegami* this = THIS; + BgJyaMegami* this = (BgJyaMegami*)thisx; Collider_UpdateSpheres(0, &this->collider); if (this->actionFunc == BgJyaMegami_Explode) { 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 a26d89b3b2..a7b20a46b3 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 @@ -10,8 +10,6 @@ #define FLAGS 0x00000010 -#define THIS ((BgJyaZurerukabe*)thisx) - void BgJyaZurerukabe_Init(Actor* thisx, GlobalContext* globalCtx); void BgJyaZurerukabe_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgJyaZurerukabe_Update(Actor* thisx, GlobalContext* globalCtx); @@ -110,7 +108,7 @@ void func_8089B4C8(BgJyaZurerukabe* this, GlobalContext* globalCtx) { } void BgJyaZurerukabe_Init(Actor* thisx, GlobalContext* globalCtx) { - BgJyaZurerukabe* this = THIS; + BgJyaZurerukabe* this = (BgJyaZurerukabe*)thisx; s32 i; BgJyaZurerukabe_InitDynaPoly(this, globalCtx, &gZurerukabeCol, DPM_UNK); @@ -136,7 +134,7 @@ void BgJyaZurerukabe_Init(Actor* thisx, GlobalContext* globalCtx) { } void BgJyaZurerukabe_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgJyaZurerukabe* this = THIS; + BgJyaZurerukabe* this = (BgJyaZurerukabe*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); D_8089B9C0[this->unk_168] = 0.0f; @@ -173,7 +171,7 @@ void func_8089B870(BgJyaZurerukabe* this, GlobalContext* globalCtx) { } void BgJyaZurerukabe_Update(Actor* thisx, GlobalContext* globalCtx) { - BgJyaZurerukabe* this = THIS; + BgJyaZurerukabe* this = (BgJyaZurerukabe*)thisx; if (this->unk_16A > 0) { this->unk_16A--; 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 1f51016a0f..916fa976c3 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 @@ -9,8 +9,6 @@ #define FLAGS 0x00000020 -#define THIS ((BgMenkuriEye*)thisx) - void BgMenkuriEye_Init(Actor* thisx, GlobalContext* globalCtx); void BgMenkuriEye_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgMenkuriEye_Update(Actor* thisx, GlobalContext* globalCtx); @@ -62,7 +60,7 @@ static InitChainEntry sInitChain[] = { }; void BgMenkuriEye_Init(Actor* thisx, GlobalContext* globalCtx) { - BgMenkuriEye* this = THIS; + BgMenkuriEye* this = (BgMenkuriEye*)thisx; ColliderJntSphElement* colliderList; Actor_ProcessInitChain(&this->actor, sInitChain); @@ -80,13 +78,13 @@ void BgMenkuriEye_Init(Actor* thisx, GlobalContext* globalCtx) { } void BgMenkuriEye_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgMenkuriEye* this = THIS; + BgMenkuriEye* this = (BgMenkuriEye*)thisx; Collider_DestroyJntSph(globalCtx, &this->collider); } void BgMenkuriEye_Update(Actor* thisx, GlobalContext* globalCtx) { - BgMenkuriEye* this = THIS; + BgMenkuriEye* this = (BgMenkuriEye*)thisx; if (!Flags_GetSwitch(globalCtx, this->actor.params)) { if (this->framesUntilDisable != -1) { @@ -120,7 +118,7 @@ void BgMenkuriEye_Update(Actor* thisx, GlobalContext* globalCtx) { } void BgMenkuriEye_Draw(Actor* thisx, GlobalContext* globalCtx) { - BgMenkuriEye* this = THIS; + BgMenkuriEye* this = (BgMenkuriEye*)thisx; s32 pad; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_menkuri_eye.c", 292); 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 e9572b9001..5b70fdd60b 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 @@ -9,8 +9,6 @@ #define FLAGS 0x00000030 -#define THIS ((BgMenkuriKaiten*)thisx) - void BgMenkuriKaiten_Init(Actor* thisx, GlobalContext* globalCtx); void BgMenkuriKaiten_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgMenkuriKaiten_Update(Actor* thisx, GlobalContext* globalCtx); @@ -33,7 +31,7 @@ static InitChainEntry sInitChain[] = { }; void BgMenkuriKaiten_Init(Actor* thisx, GlobalContext* globalCtx) { - BgMenkuriKaiten* this = THIS; + BgMenkuriKaiten* this = (BgMenkuriKaiten*)thisx; s32 pad; CollisionHeader* colHeader = NULL; @@ -44,13 +42,13 @@ void BgMenkuriKaiten_Init(Actor* thisx, GlobalContext* globalCtx) { } void BgMenkuriKaiten_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgMenkuriKaiten* this = THIS; + BgMenkuriKaiten* this = (BgMenkuriKaiten*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); } void BgMenkuriKaiten_Update(Actor* thisx, GlobalContext* globalCtx) { - BgMenkuriKaiten* this = THIS; + BgMenkuriKaiten* this = (BgMenkuriKaiten*)thisx; if (!Flags_GetSwitch(globalCtx, this->dyna.actor.params) && func_80043590(&this->dyna)) { func_8002F974(&this->dyna.actor, NA_SE_EV_ELEVATOR_MOVE - SFX_FLAG); 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 007f99b6e1..c5939f6f5e 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 @@ -9,8 +9,6 @@ #define FLAGS 0x00000000 -#define THIS ((BgMenkuriNisekabe*)thisx) - void BgMenkuriNisekabe_Init(Actor* thisx, GlobalContext* globalCtx); void BgMenkuriNisekabe_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgMenkuriNisekabe_Update(Actor* thisx, GlobalContext* globalCtx); @@ -31,7 +29,7 @@ const ActorInit Bg_Menkuri_Nisekabe_InitVars = { static Gfx* sDLists[] = { gGTGFakeWallDL, gGTGFakeCeilingDL }; void BgMenkuriNisekabe_Init(Actor* thisx, GlobalContext* globalCtx) { - BgMenkuriNisekabe* this = THIS; + BgMenkuriNisekabe* this = (BgMenkuriNisekabe*)thisx; Actor_SetScale(&this->actor, 0.1f); } @@ -40,7 +38,7 @@ void BgMenkuriNisekabe_Destroy(Actor* thisx, GlobalContext* globalCtx) { } void BgMenkuriNisekabe_Update(Actor* thisx, GlobalContext* globalCtx) { - BgMenkuriNisekabe* this = THIS; + BgMenkuriNisekabe* this = (BgMenkuriNisekabe*)thisx; if (globalCtx->actorCtx.unk_03 != 0) { this->actor.flags |= 0x80; @@ -50,7 +48,7 @@ void BgMenkuriNisekabe_Update(Actor* thisx, GlobalContext* globalCtx) { } void BgMenkuriNisekabe_Draw(Actor* thisx, GlobalContext* globalCtx) { - BgMenkuriNisekabe* this = THIS; + BgMenkuriNisekabe* this = (BgMenkuriNisekabe*)thisx; u32 index = this->actor.params & 0xFF; if ((this->actor.flags & 0x80) == 0x80) { 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 f13eb68770..a9e36d813f 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 @@ -10,8 +10,6 @@ #define FLAGS 0x00000010 -#define THIS ((BgMizuBwall*)thisx) - void BgMizuBwall_Init(Actor* thisx, GlobalContext* globalCtx); void BgMizuBwall_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgMizuBwall_Update(Actor* thisx, GlobalContext* globalCtx); @@ -173,7 +171,7 @@ void BgMizuBwall_RotateVec3f(Vec3f* out, Vec3f* in, f32 sin, f32 cos) { void BgMizuBwall_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BgMizuBwall* this = THIS; + BgMizuBwall* this = (BgMizuBwall*)thisx; CollisionHeader* colHeader = NULL; Actor_ProcessInitChain(&this->dyna.actor, D_8089D854); @@ -374,7 +372,7 @@ void BgMizuBwall_Init(Actor* thisx, GlobalContext* globalCtx) { void BgMizuBwall_Destroy(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BgMizuBwall* this = THIS; + BgMizuBwall* this = (BgMizuBwall*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); Collider_DestroyTris(globalCtx, &this->collider); @@ -496,13 +494,13 @@ void BgMizuBwall_DoNothing(BgMizuBwall* this, GlobalContext* globalCtx) { void BgMizuBwall_Update(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BgMizuBwall* this = THIS; + BgMizuBwall* this = (BgMizuBwall*)thisx; this->actionFunc(this, globalCtx); } void BgMizuBwall_Draw(Actor* thisx, GlobalContext* globalCtx2) { - BgMizuBwall* this = THIS; + BgMizuBwall* this = (BgMizuBwall*)thisx; GlobalContext* globalCtx = globalCtx2; u32 frames; 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 fb48f94c50..cbcfddc097 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 @@ -10,8 +10,6 @@ #define FLAGS 0x00000010 -#define THIS ((BgMizuMovebg*)thisx) - #define MOVEBG_TYPE(params) (((u16)(params) >> 0xC) & 0xF) #define MOVEBG_FLAGS(params) ((u16)(params)&0x3F) #define MOVEBG_PATH_ID(params) (((u16)(params) >> 0x8) & 0xF) @@ -89,64 +87,64 @@ void BgMizuMovebg_Init(Actor* thisx, GlobalContext* globalCtx) { Vec3f sp48; Actor_ProcessInitChain(thisx, D_8089EB90); - THIS->homeY = thisx->world.pos.y; - THIS->dlist = D_8089EB50[MOVEBG_TYPE(thisx->params)]; - DynaPolyActor_Init(&THIS->dyna, DPM_PLAYER); + ((BgMizuMovebg*)thisx)->homeY = thisx->world.pos.y; + ((BgMizuMovebg*)thisx)->dlist = D_8089EB50[MOVEBG_TYPE(thisx->params)]; + DynaPolyActor_Init(&((BgMizuMovebg*)thisx)->dyna, DPM_PLAYER); CollisionHeader_GetVirtual(D_8089EB70[MOVEBG_TYPE(thisx->params)], &colHeader); - THIS->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, thisx, colHeader); + ((BgMizuMovebg*)thisx)->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, thisx, colHeader); type = MOVEBG_TYPE(thisx->params); switch (type) { case 0: temp = waterBoxes[2].ySurface + 15.0f; - if (temp < THIS->homeY - 700.0f) { - thisx->world.pos.y = THIS->homeY - 700.0f; + if (temp < ((BgMizuMovebg*)thisx)->homeY - 700.0f) { + thisx->world.pos.y = ((BgMizuMovebg*)thisx)->homeY - 700.0f; } else { thisx->world.pos.y = temp; } - THIS->actionFunc = func_8089E318; + ((BgMizuMovebg*)thisx)->actionFunc = func_8089E318; break; case 1: temp = waterBoxes[2].ySurface + 15.0f; - if (temp < THIS->homeY - 710.0f) { - thisx->world.pos.y = THIS->homeY - 710.0f; + if (temp < ((BgMizuMovebg*)thisx)->homeY - 710.0f) { + thisx->world.pos.y = ((BgMizuMovebg*)thisx)->homeY - 710.0f; } else { thisx->world.pos.y = temp; } - THIS->actionFunc = func_8089E318; + ((BgMizuMovebg*)thisx)->actionFunc = func_8089E318; break; case 2: temp = waterBoxes[2].ySurface + 15.0f; - if (temp < THIS->homeY - 700.0f) { - thisx->world.pos.y = THIS->homeY - 700.0f; + if (temp < ((BgMizuMovebg*)thisx)->homeY - 700.0f) { + thisx->world.pos.y = ((BgMizuMovebg*)thisx)->homeY - 700.0f; } else { thisx->world.pos.y = temp; } - THIS->actionFunc = func_8089E318; + ((BgMizuMovebg*)thisx)->actionFunc = func_8089E318; break; case 3: - thisx->world.pos.y = THIS->homeY + D_8089EB40[func_8089DC30(globalCtx)]; - THIS->actionFunc = func_8089E318; + thisx->world.pos.y = ((BgMizuMovebg*)thisx)->homeY + D_8089EB40[func_8089DC30(globalCtx)]; + ((BgMizuMovebg*)thisx)->actionFunc = func_8089E318; break; case 4: case 5: case 6: if (Flags_GetSwitch(globalCtx, MOVEBG_FLAGS(thisx->params))) { - thisx->world.pos.y = THIS->homeY + 115.19999999999999; + thisx->world.pos.y = ((BgMizuMovebg*)thisx)->homeY + 115.19999999999999; } else { - thisx->world.pos.y = THIS->homeY; + thisx->world.pos.y = ((BgMizuMovebg*)thisx)->homeY; } - THIS->actionFunc = func_8089E318; + ((BgMizuMovebg*)thisx)->actionFunc = func_8089E318; break; case 7: - THIS->scrollAlpha1 = 160; - THIS->scrollAlpha2 = 160; - THIS->scrollAlpha3 = 160; - THIS->scrollAlpha4 = 160; + ((BgMizuMovebg*)thisx)->scrollAlpha1 = 160; + ((BgMizuMovebg*)thisx)->scrollAlpha2 = 160; + ((BgMizuMovebg*)thisx)->scrollAlpha3 = 160; + ((BgMizuMovebg*)thisx)->scrollAlpha4 = 160; waypointId = MOVEBG_POINT_ID(thisx->params); - THIS->waypointId = waypointId; + ((BgMizuMovebg*)thisx)->waypointId = waypointId; func_8089E108(globalCtx->setupPathList, &thisx->world.pos, MOVEBG_PATH_ID(thisx->params), waypointId); - THIS->actionFunc = func_8089E650; + ((BgMizuMovebg*)thisx)->actionFunc = func_8089E650; break; } @@ -170,7 +168,7 @@ void BgMizuMovebg_Init(Actor* thisx, GlobalContext* globalCtx) { } void BgMizuMovebg_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgMizuMovebg* this = THIS; + BgMizuMovebg* this = (BgMizuMovebg*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); switch (MOVEBG_TYPE(thisx->params)) { @@ -354,13 +352,13 @@ void func_8089E650(BgMizuMovebg* this, GlobalContext* globalCtx) { } void BgMizuMovebg_Update(Actor* thisx, GlobalContext* globalCtx) { - BgMizuMovebg* this = THIS; + BgMizuMovebg* this = (BgMizuMovebg*)thisx; this->actionFunc(this, globalCtx); } void BgMizuMovebg_Draw(Actor* thisx, GlobalContext* globalCtx2) { - BgMizuMovebg* this = THIS; + BgMizuMovebg* this = (BgMizuMovebg*)thisx; GlobalContext* globalCtx = globalCtx2; u32 frames; 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 6d26562a50..ef75d82dbd 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 @@ -3,8 +3,6 @@ #define FLAGS 0x00000010 -#define THIS ((BgMizuShutter*)thisx) - #define SIZE_PARAM (((u16)this->dyna.actor.params >> 0xC) & 0xF) #define TIMER_PARAM (((u16)this->dyna.actor.params >> 6) & 0x3F) @@ -51,7 +49,7 @@ static InitChainEntry sInitChain[] = { void BgMizuShutter_Init(BgMizuShutter* thisx, GlobalContext* globalCtx) { s32 pad; - BgMizuShutter* this = THIS; + BgMizuShutter* this = (BgMizuShutter*)thisx; s32 pad2; CollisionHeader* sp30 = NULL; s32 pad3; @@ -87,7 +85,7 @@ void BgMizuShutter_Init(BgMizuShutter* thisx, GlobalContext* globalCtx) { void BgMizuShutter_Destroy(BgMizuShutter* thisx, GlobalContext* globalCtx) { s32 pad; - BgMizuShutter* this = THIS; + BgMizuShutter* this = (BgMizuShutter*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); } @@ -150,14 +148,14 @@ void BgMizuShutter_WaitForTimer(BgMizuShutter* this, GlobalContext* globalCtx) { void BgMizuShutter_Update(BgMizuShutter* thisx, GlobalContext* globalCtx) { s32 pad; - BgMizuShutter* this = THIS; + BgMizuShutter* this = (BgMizuShutter*)thisx; this->actionFunc(this, globalCtx); } void BgMizuShutter_Draw(BgMizuShutter* thisx, GlobalContext* globalCtx) { s32 pad; - BgMizuShutter* this = THIS; + BgMizuShutter* this = (BgMizuShutter*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_mizu_shutter.c", 410); func_80093D18(globalCtx->state.gfxCtx); 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 039a490f10..62e9809535 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 @@ -9,8 +9,6 @@ #define FLAGS 0x00000000 -#define THIS ((BgMizuUzu*)thisx) - void BgMizuUzu_Init(Actor* thisx, GlobalContext* globalCtx); void BgMizuUzu_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgMizuUzu_Update(Actor* thisx, GlobalContext* globalCtx); @@ -38,7 +36,7 @@ static InitChainEntry sInitChain[] = { void BgMizuUzu_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BgMizuUzu* this = THIS; + BgMizuUzu* this = (BgMizuUzu*)thisx; CollisionHeader* colHeader = NULL; s32 pad2; @@ -50,7 +48,7 @@ void BgMizuUzu_Init(Actor* thisx, GlobalContext* globalCtx) { } void BgMizuUzu_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgMizuUzu* this = THIS; + BgMizuUzu* this = (BgMizuUzu*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); } @@ -68,7 +66,7 @@ void func_8089F788(BgMizuUzu* this, GlobalContext* globalCtx) { } void BgMizuUzu_Update(Actor* thisx, GlobalContext* globalCtx) { - BgMizuUzu* this = THIS; + BgMizuUzu* this = (BgMizuUzu*)thisx; this->actionFunc(this, 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 d88f291c81..8b9ad11430 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 @@ -9,8 +9,6 @@ #define FLAGS 0x00000030 -#define THIS ((BgMizuWater*)thisx) - void BgMizuWater_Init(Actor* thisx, GlobalContext* globalCtx); void BgMizuWater_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgMizuWater_Update(Actor* thisx, GlobalContext* globalCtx); @@ -91,7 +89,7 @@ void BgMizuWater_SetWaterBoxesHeight(WaterBox* waterBoxes, s16 height) { } void BgMizuWater_Init(Actor* thisx, GlobalContext* globalCtx) { - BgMizuWater* this = THIS; + BgMizuWater* this = (BgMizuWater*)thisx; f32 initialActorY; WaterBox* waterBoxes; s32 waterLevelActionIndex; @@ -293,7 +291,7 @@ void BgMizuWater_ChangeWaterLevel(BgMizuWater* this, GlobalContext* globalCtx) { } void BgMizuWater_Update(Actor* thisx, GlobalContext* globalCtx) { - BgMizuWater* this = THIS; + BgMizuWater* this = (BgMizuWater*)thisx; s32 posY; s32 unk0; s32 unk1; @@ -327,7 +325,7 @@ void BgMizuWater_Update(Actor* thisx, GlobalContext* globalCtx) { } void BgMizuWater_Draw(Actor* thisx, GlobalContext* globalCtx) { - BgMizuWater* this = THIS; + BgMizuWater* this = (BgMizuWater*)thisx; s32 gameplayFrames; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_mizu_water.c", 738); 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 502a82ebdc..4ca8efe583 100644 --- a/src/overlays/actors/ovl_Bg_Mjin/z_bg_mjin.c +++ b/src/overlays/actors/ovl_Bg_Mjin/z_bg_mjin.c @@ -16,8 +16,6 @@ #define FLAGS 0x00000010 -#define THIS ((BgMjin*)thisx) - void BgMjin_Init(Actor* thisx, GlobalContext* globalCtx); void BgMjin_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgMjin_Update(Actor* thisx, GlobalContext* globalCtx); @@ -55,7 +53,7 @@ void BgMjin_SetupAction(BgMjin* this, BgMjinActionFunc actionFunc) { } void BgMjin_Init(Actor* thisx, GlobalContext* globalCtx) { - BgMjin* this = THIS; + BgMjin* this = (BgMjin*)thisx; s8 objBankIndex; Actor_ProcessInitChain(thisx, sInitChain); @@ -69,7 +67,7 @@ void BgMjin_Init(Actor* thisx, GlobalContext* globalCtx) { } void BgMjin_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgMjin* this = THIS; + BgMjin* this = (BgMjin*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); } @@ -96,13 +94,13 @@ void BgMjin_DoNothing(BgMjin* this, GlobalContext* globalCtx) { } void BgMjin_Update(Actor* thisx, GlobalContext* globalCtx) { - BgMjin* this = THIS; + BgMjin* this = (BgMjin*)thisx; this->actionFunc(this, globalCtx); } void BgMjin_Draw(Actor* thisx, GlobalContext* globalCtx) { - BgMjin* this = THIS; + BgMjin* this = (BgMjin*)thisx; Gfx* dlist; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_mjin.c", 250); 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 34ddb31ac4..cc9f5620dd 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 @@ -9,8 +9,6 @@ #define FLAGS 0x00000010 -#define THIS ((BgMoriBigst*)thisx) - void BgMoriBigst_Init(Actor* thisx, GlobalContext* globalCtx); void BgMoriBigst_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgMoriBigst_Update(Actor* thisx, GlobalContext* globalCtx); @@ -69,7 +67,7 @@ void BgMoriBigst_InitDynapoly(BgMoriBigst* this, GlobalContext* globalCtx, Colli void BgMoriBigst_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BgMoriBigst* this = THIS; + BgMoriBigst* this = (BgMoriBigst*)thisx; // "mori (bigST.keyceiling)" osSyncPrintf("mori (bigST.鍵型天井)(arg : %04x)(sw %d)(noE %d)(roomC %d)(playerPosY %f)\n", this->dyna.actor.params, @@ -97,7 +95,7 @@ void BgMoriBigst_Init(Actor* thisx, GlobalContext* globalCtx) { void BgMoriBigst_Destroy(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BgMoriBigst* this = THIS; + BgMoriBigst* this = (BgMoriBigst*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); } @@ -227,7 +225,7 @@ void BgMoriBigst_SetupDone(BgMoriBigst* this, GlobalContext* globalCtx) { void BgMoriBigst_Update(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BgMoriBigst* this = THIS; + BgMoriBigst* this = (BgMoriBigst*)thisx; Actor_SetFocus(&this->dyna.actor, 50.0f); if (this->waitTimer > 0) { @@ -243,7 +241,7 @@ void BgMoriBigst_Update(Actor* thisx, GlobalContext* globalCtx) { void BgMoriBigst_Draw(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BgMoriBigst* this = THIS; + BgMoriBigst* this = (BgMoriBigst*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_mori_bigst.c", 541); func_80093D18(globalCtx->state.gfxCtx); 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 308417405d..d0cd11a832 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 @@ -3,8 +3,6 @@ #define FLAGS 0x00000010 -#define THIS ((BgMoriElevator*)thisx) - void BgMoriElevator_Init(Actor* thisx, GlobalContext* globalCtx); void BgMoriElevator_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgMoriElevator_Update(Actor* thisx, GlobalContext* globalCtx); @@ -84,7 +82,7 @@ void func_808A18FC(BgMoriElevator* this, f32 distTo) { } void BgMoriElevator_Init(Actor* thisx, GlobalContext* globalCtx) { - BgMoriElevator* this = THIS; + BgMoriElevator* this = (BgMoriElevator*)thisx; s32 pad; CollisionHeader* colHeader = NULL; @@ -115,7 +113,7 @@ void BgMoriElevator_Init(Actor* thisx, GlobalContext* globalCtx) { } void BgMoriElevator_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgMoriElevator* this = THIS; + BgMoriElevator* this = (BgMoriElevator*)thisx; if (this->unk_172 == 0) { // "Forest Temple elevator DT" @@ -242,7 +240,7 @@ void func_808A2008(BgMoriElevator* this, GlobalContext* globalCtx) { } void BgMoriElevator_Update(Actor* thisx, GlobalContext* globalCtx) { - BgMoriElevator* this = THIS; + BgMoriElevator* this = (BgMoriElevator*)thisx; this->actionFunc(this, globalCtx); this->unk_170 = this->dyna.unk_160; @@ -251,7 +249,7 @@ void BgMoriElevator_Update(Actor* thisx, GlobalContext* globalCtx) { void BgMoriElevator_Draw(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BgMoriElevator* this = THIS; + BgMoriElevator* this = (BgMoriElevator*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_mori_elevator.c", 575); 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 2f3aab3912..9350a4ab20 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 @@ -9,8 +9,6 @@ #define FLAGS 0x00000000 -#define THIS ((BgMoriHashigo*)thisx) - void BgMoriHashigo_Init(Actor* thisx, GlobalContext* globalCtx); void BgMoriHashigo_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgMoriHashigo_Update(Actor* thisx, GlobalContext* globalCtx); @@ -154,7 +152,7 @@ s32 BgMoriHashigo_InitLadder(BgMoriHashigo* this, GlobalContext* globalCtx) { void BgMoriHashigo_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BgMoriHashigo* this = THIS; + BgMoriHashigo* this = (BgMoriHashigo*)thisx; if (this->dyna.actor.params == HASHIGO_CLASP) { if (!BgMoriHashigo_InitClasp(this, globalCtx)) { @@ -182,7 +180,7 @@ void BgMoriHashigo_Init(Actor* thisx, GlobalContext* globalCtx) { void BgMoriHashigo_Destroy(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BgMoriHashigo* this = THIS; + BgMoriHashigo* this = (BgMoriHashigo*)thisx; if (this->dyna.actor.params == HASHIGO_LADDER) { DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); @@ -269,7 +267,7 @@ void BgMoriHashigo_SetupLadderRest(BgMoriHashigo* this) { void BgMoriHashigo_Update(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BgMoriHashigo* this = THIS; + BgMoriHashigo* this = (BgMoriHashigo*)thisx; if (this->hitTimer > 0) { this->hitTimer--; @@ -281,7 +279,7 @@ void BgMoriHashigo_Update(Actor* thisx, GlobalContext* globalCtx) { void BgMoriHashigo_Draw(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BgMoriHashigo* this = THIS; + BgMoriHashigo* this = (BgMoriHashigo*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_mori_hashigo.c", 516); func_80093D18(globalCtx->state.gfxCtx); 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 f3c7600449..9541ce6cdc 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 @@ -9,8 +9,6 @@ #define FLAGS 0x00000010 -#define THIS ((BgMoriHashira4*)thisx) - void BgMoriHashira4_Init(Actor* thisx, GlobalContext* globalCtx); void BgMoriHashira4_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgMoriHashira4_Update(Actor* thisx, GlobalContext* globalCtx); @@ -70,7 +68,7 @@ void BgMoriHashira4_InitDynaPoly(BgMoriHashira4* this, GlobalContext* globalCtx, void BgMoriHashira4_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BgMoriHashira4* this = THIS; + BgMoriHashira4* this = (BgMoriHashira4*)thisx; this->switchFlag = (this->dyna.actor.params >> 8) & 0x3F; this->dyna.actor.params &= 0xFF; @@ -102,7 +100,7 @@ void BgMoriHashira4_Init(Actor* thisx, GlobalContext* globalCtx) { void BgMoriHashira4_Destroy(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BgMoriHashira4* this = THIS; + BgMoriHashira4* this = (BgMoriHashira4*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); } @@ -152,7 +150,7 @@ void BgMoriHashira4_GateOpen(BgMoriHashira4* this, GlobalContext* globalCtx) { void BgMoriHashira4_Update(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BgMoriHashira4* this = THIS; + BgMoriHashira4* this = (BgMoriHashira4*)thisx; if (this->actionFunc != NULL) { this->actionFunc(this, globalCtx); @@ -161,7 +159,7 @@ void BgMoriHashira4_Update(Actor* thisx, GlobalContext* globalCtx) { void BgMoriHashira4_Draw(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BgMoriHashira4* this = THIS; + BgMoriHashira4* this = (BgMoriHashira4*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_mori_hashira4.c", 339); func_80093D18(globalCtx->state.gfxCtx); 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 9fa475ac14..feab90811a 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 @@ -15,8 +15,6 @@ #define FLAGS 0x00000030 -#define THIS ((BgMoriHineri*)thisx) - void BgMoriHineri_Init(Actor* thisx, GlobalContext* globalCtx); void BgMoriHineri_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgMoriHineri_Update(Actor* thisx, GlobalContext* globalCtx); @@ -55,7 +53,7 @@ static Gfx* sDLists[] = { }; void BgMoriHineri_Init(Actor* thisx, GlobalContext* globalCtx) { - BgMoriHineri* this = THIS; + BgMoriHineri* this = (BgMoriHineri*)thisx; s8 moriHineriObjIdx; u32 switchFlagParam; s32 t6; @@ -108,7 +106,7 @@ void BgMoriHineri_Init(Actor* thisx, GlobalContext* globalCtx) { } void BgMoriHineri_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgMoriHineri* this = THIS; + BgMoriHineri* this = (BgMoriHineri*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); } @@ -222,13 +220,13 @@ void func_808A3E54(BgMoriHineri* this, GlobalContext* globalCtx) { } void BgMoriHineri_Update(Actor* thisx, GlobalContext* globalCtx) { - BgMoriHineri* this = THIS; + BgMoriHineri* this = (BgMoriHineri*)thisx; this->actionFunc(this, globalCtx); } void BgMoriHineri_DrawHallAndRoom(Actor* thisx, GlobalContext* globalCtx) { - BgMoriHineri* this = THIS; + BgMoriHineri* this = (BgMoriHineri*)thisx; s8 objIndex; MtxF mtx; 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 cadeab284c..72533671c5 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 @@ -9,8 +9,6 @@ #define FLAGS 0x00000030 -#define THIS ((BgMoriIdomizu*)thisx) - void BgMoriIdomizu_Init(Actor* thisx, GlobalContext* globalCtx); void BgMoriIdomizu_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgMoriIdomizu_Update(Actor* thisx, GlobalContext* globalCtx); @@ -49,7 +47,7 @@ void BgMoriIdomizu_SetWaterLevel(GlobalContext* globalCtx, s16 waterLevel) { void BgMoriIdomizu_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BgMoriIdomizu* this = THIS; + BgMoriIdomizu* this = (BgMoriIdomizu*)thisx; if (sIsSpawned) { Actor_Kill(&this->actor); @@ -86,7 +84,7 @@ void BgMoriIdomizu_Init(Actor* thisx, GlobalContext* globalCtx) { void BgMoriIdomizu_Destroy(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BgMoriIdomizu* this = THIS; + BgMoriIdomizu* this = (BgMoriIdomizu*)thisx; if (this->isLoaded) { sIsSpawned = false; @@ -152,7 +150,7 @@ void BgMoriIdomizu_Main(BgMoriIdomizu* this, GlobalContext* globalCtx) { void BgMoriIdomizu_Update(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BgMoriIdomizu* this = THIS; + BgMoriIdomizu* this = (BgMoriIdomizu*)thisx; if (this->actionFunc != NULL) { this->actionFunc(this, globalCtx); @@ -161,7 +159,7 @@ void BgMoriIdomizu_Update(Actor* thisx, GlobalContext* globalCtx) { void BgMoriIdomizu_Draw(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BgMoriIdomizu* this = THIS; + BgMoriIdomizu* this = (BgMoriIdomizu*)thisx; u32 gameplayFrames = globalCtx->gameplayFrames; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_mori_idomizu.c", 356); 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 b641b830e9..8357f66bd3 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 @@ -9,8 +9,6 @@ #define FLAGS 0x00000000 -#define THIS ((BgMoriKaitenkabe*)thisx) - void BgMoriKaitenkabe_Init(Actor* thisx, GlobalContext* globalCtx); void BgMoriKaitenkabe_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgMoriKaitenkabe_Update(Actor* thisx, GlobalContext* globalCtx); @@ -49,7 +47,7 @@ void BgMoriKaitenkabe_CrossProduct(Vec3f* dest, Vec3f* v1, Vec3f* v2) { void BgMoriKaitenkabe_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BgMoriKaitenkabe* this = THIS; + BgMoriKaitenkabe* this = (BgMoriKaitenkabe*)thisx; CollisionHeader* colHeader = NULL; // "Forest Temple object 【Rotating Wall (arg_data: 0x% 04x)】 appears" @@ -70,7 +68,7 @@ void BgMoriKaitenkabe_Init(Actor* thisx, GlobalContext* globalCtx) { void BgMoriKaitenkabe_Destroy(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BgMoriKaitenkabe* this = THIS; + BgMoriKaitenkabe* this = (BgMoriKaitenkabe*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); } @@ -153,14 +151,14 @@ void BgMoriKaitenkabe_Rotate(BgMoriKaitenkabe* this, GlobalContext* globalCtx) { void BgMoriKaitenkabe_Update(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BgMoriKaitenkabe* this = THIS; + BgMoriKaitenkabe* this = (BgMoriKaitenkabe*)thisx; this->actionFunc(this, globalCtx); } void BgMoriKaitenkabe_Draw(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BgMoriKaitenkabe* this = THIS; + BgMoriKaitenkabe* this = (BgMoriKaitenkabe*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_mori_kaitenkabe.c", 347); func_80093D18(globalCtx->state.gfxCtx); 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 9a84b0a39d..b6365eea58 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 @@ -9,8 +9,6 @@ #define FLAGS 0x00000030 -#define THIS ((BgMoriRakkatenjo*)thisx) - void BgMoriRakkatenjo_Init(Actor* thisx, GlobalContext* globalCtx); void BgMoriRakkatenjo_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgMoriRakkatenjo_Update(Actor* thisx, GlobalContext* globalCtx); @@ -49,7 +47,7 @@ static InitChainEntry sInitChain[] = { void BgMoriRakkatenjo_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BgMoriRakkatenjo* this = THIS; + BgMoriRakkatenjo* this = (BgMoriRakkatenjo*)thisx; CollisionHeader* colHeader = NULL; DynaPolyActor_Init(&this->dyna, DPM_PLAYER); @@ -81,7 +79,7 @@ void BgMoriRakkatenjo_Init(Actor* thisx, GlobalContext* globalCtx) { void BgMoriRakkatenjo_Destroy(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BgMoriRakkatenjo* this = THIS; + BgMoriRakkatenjo* this = (BgMoriRakkatenjo*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); } @@ -199,7 +197,7 @@ void BgMoriRakkatenjo_Rise(BgMoriRakkatenjo* this, GlobalContext* globalCtx) { void BgMoriRakkatenjo_Update(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BgMoriRakkatenjo* this = THIS; + BgMoriRakkatenjo* this = (BgMoriRakkatenjo*)thisx; if (this->timer > 0) { this->timer--; @@ -221,7 +219,7 @@ void BgMoriRakkatenjo_Update(Actor* thisx, GlobalContext* globalCtx) { void BgMoriRakkatenjo_Draw(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BgMoriRakkatenjo* this = THIS; + BgMoriRakkatenjo* this = (BgMoriRakkatenjo*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_mori_rakkatenjo.c", 497); func_80093D18(globalCtx->state.gfxCtx); 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 7a3e0c76f8..f17c8c70ae 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 @@ -9,8 +9,6 @@ #define FLAGS 0x00000000 -#define THIS ((BgPoEvent*)thisx) - void BgPoEvent_Init(Actor* thisx, GlobalContext* globalCtx); void BgPoEvent_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgPoEvent_Update(Actor* thisx, GlobalContext* globalCtx); @@ -195,7 +193,7 @@ static InitChainEntry sInitChain[] = { void BgPoEvent_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BgPoEvent* this = THIS; + BgPoEvent* this = (BgPoEvent*)thisx; Actor_ProcessInitChain(thisx, sInitChain); this->type = (thisx->params >> 8) & 0xF; @@ -222,7 +220,7 @@ void BgPoEvent_Init(Actor* thisx, GlobalContext* globalCtx) { void BgPoEvent_Destroy(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BgPoEvent* this = THIS; + BgPoEvent* this = (BgPoEvent*)thisx; if (this->type >= 2) { Collider_DestroyTris(globalCtx, &this->collider); @@ -584,7 +582,7 @@ void BgPoEvent_PaintingBurn(BgPoEvent* this, GlobalContext* globalCtx) { void BgPoEvent_Update(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BgPoEvent* this = THIS; + BgPoEvent* this = (BgPoEvent*)thisx; this->actionFunc(this, globalCtx); if ((this->actionFunc == BgPoEvent_AmyWait) || (this->actionFunc == BgPoEvent_PaintingPresent)) { @@ -598,7 +596,7 @@ void BgPoEvent_Draw(Actor* thisx, GlobalContext* globalCtx) { gPoSistersBethPaintingDL, gPoSistersAmyPaintingDL, }; s32 pad; - BgPoEvent* this = THIS; + BgPoEvent* this = (BgPoEvent*)thisx; u8 alpha; Vec3f sp58; Vec3f sp4C; 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 7546da1f49..6eabc4af04 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 @@ -10,8 +10,6 @@ #define FLAGS 0x00000000 -#define THIS ((BgPoSyokudai*)thisx) - typedef enum { POE_FLAME_PURPLE, // Meg POE_FLAME_RED, // Joelle @@ -77,7 +75,7 @@ static InitChainEntry sInitChain[] = { }; void BgPoSyokudai_Init(Actor* thisx, GlobalContext* globalCtx) { - BgPoSyokudai* this = THIS; + BgPoSyokudai* this = (BgPoSyokudai*)thisx; s32 pad; Actor_ProcessInitChain(thisx, sInitChain); @@ -122,7 +120,7 @@ void BgPoSyokudai_Init(Actor* thisx, GlobalContext* globalCtx) { } void BgPoSyokudai_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgPoSyokudai* this = THIS; + BgPoSyokudai* this = (BgPoSyokudai*)thisx; LightContext_RemoveLight(globalCtx, &globalCtx->lightCtx, this->lightNode); Collider_DestroyCylinder(globalCtx, &this->collider); @@ -133,7 +131,7 @@ void BgPoSyokudai_Destroy(Actor* thisx, GlobalContext* globalCtx) { } void BgPoSyokudai_Update(Actor* thisx, GlobalContext* globalCtx) { - BgPoSyokudai* this = THIS; + BgPoSyokudai* this = (BgPoSyokudai*)thisx; s32 pad; CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->collider.base); @@ -145,7 +143,7 @@ void BgPoSyokudai_Update(Actor* thisx, GlobalContext* globalCtx) { } void BgPoSyokudai_Draw(Actor* thisx, GlobalContext* globalCtx) { - BgPoSyokudai* this = THIS; + BgPoSyokudai* this = (BgPoSyokudai*)thisx; f32 lightBrightness; u8 red; u8 green; 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 0ce54204c8..fe5962893a 100644 --- a/src/overlays/actors/ovl_Bg_Pushbox/z_bg_pushbox.c +++ b/src/overlays/actors/ovl_Bg_Pushbox/z_bg_pushbox.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000000 -#define THIS ((BgPushbox*)thisx) - void BgPushbox_Init(Actor* thisx, GlobalContext* globalCtx); void BgPushbox_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgPushbox_Update(Actor* thisx, GlobalContext* globalCtx); @@ -41,7 +39,7 @@ void BgPushbox_SetupAction(BgPushbox* this, BgPushboxActionFunc actionFunc) { void BgPushbox_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BgPushbox* this = THIS; + BgPushbox* this = (BgPushbox*)thisx; CollisionHeader* colHeader = NULL; s32 pad2; @@ -54,7 +52,7 @@ void BgPushbox_Init(Actor* thisx, GlobalContext* globalCtx) { } void BgPushbox_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgPushbox* this = THIS; + BgPushbox* this = (BgPushbox*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); } @@ -71,7 +69,7 @@ void BgPushbox_UpdateImpl(BgPushbox* this, GlobalContext* globalCtx) { } void BgPushbox_Update(Actor* thisx, GlobalContext* globalCtx) { - BgPushbox* this = THIS; + BgPushbox* this = (BgPushbox*)thisx; this->actionFunc(this, globalCtx); func_8002DF90(&this->dyna); 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 d97990736d..5f7502952a 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 @@ -9,8 +9,6 @@ #define FLAGS 0x00000010 -#define THIS ((BgRelayObjects*)thisx) - typedef enum { /* 0 */ WINDMILL_ROTATING_GEAR, /* 1 */ WINDMILL_DAMPE_STONE_DOOR @@ -47,7 +45,7 @@ static InitChainEntry sInitChain[] = { void BgRelayObjects_Init(Actor* thisx, GlobalContext* globalCtx) { static u32 D_808A9508 = 0; - BgRelayObjects* this = THIS; + BgRelayObjects* this = (BgRelayObjects*)thisx; s32 pad; CollisionHeader* colHeader = NULL; @@ -107,7 +105,7 @@ void BgRelayObjects_Init(Actor* thisx, GlobalContext* globalCtx) { } void BgRelayObjects_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgRelayObjects* this = THIS; + BgRelayObjects* this = (BgRelayObjects*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); if ((this->dyna.actor.params == WINDMILL_ROTATING_GEAR) && (gSaveContext.cutsceneIndex < 0xFFF0)) { @@ -195,13 +193,13 @@ void func_808A939C(BgRelayObjects* this, GlobalContext* globalCtx) { } void BgRelayObjects_Update(Actor* thisx, GlobalContext* globalCtx) { - BgRelayObjects* this = THIS; + BgRelayObjects* this = (BgRelayObjects*)thisx; this->actionFunc(this, globalCtx); } void BgRelayObjects_Draw(Actor* thisx, GlobalContext* globalCtx) { - BgRelayObjects* this = THIS; + BgRelayObjects* this = (BgRelayObjects*)thisx; if (this->dyna.actor.params == WINDMILL_ROTATING_GEAR) { Gfx_DrawDListOpa(globalCtx, gWindmillRotatingPlatformDL); 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 1e26704f31..fdafd4a81b 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 @@ -9,8 +9,6 @@ #define FLAGS 0x00000000 -#define THIS ((BgSpot00Break*)thisx) - void BgSpot00Break_Init(Actor* thisx, GlobalContext* globalCtx); void BgSpot00Break_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgSpot00Break_Update(Actor* thisx, GlobalContext* globalCtx); @@ -36,7 +34,7 @@ static InitChainEntry sInitChain[] = { }; void BgSpot00Break_Init(Actor* thisx, GlobalContext* globalCtx) { - BgSpot00Break* this = THIS; + BgSpot00Break* this = (BgSpot00Break*)thisx; s32 pad; CollisionHeader* colHeader = NULL; @@ -57,7 +55,7 @@ void BgSpot00Break_Init(Actor* thisx, GlobalContext* globalCtx) { } void BgSpot00Break_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgSpot00Break* this = THIS; + BgSpot00Break* this = (BgSpot00Break*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); } @@ -66,7 +64,7 @@ void BgSpot00Break_Update(Actor* thisx, GlobalContext* globalCtx) { } void BgSpot00Break_Draw(Actor* thisx, GlobalContext* globalCtx) { - BgSpot00Break* this = THIS; + BgSpot00Break* this = (BgSpot00Break*)thisx; if (this->dyna.actor.params == 1) { Gfx_DrawDListOpa(globalCtx, gBarbedWireFenceDL); 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 caf583f503..a5c84eacdd 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 @@ -10,8 +10,6 @@ #define FLAGS 0x00000010 -#define THIS ((BgSpot00Hanebasi*)thisx) - typedef enum { /* -1 */ DT_DRAWBRIDGE = -1, /* 0 */ DT_CHAIN_1, @@ -49,7 +47,7 @@ static InitChainEntry sInitChain[] = { }; void BgSpot00Hanebasi_Init(Actor* thisx, GlobalContext* globalCtx) { - BgSpot00Hanebasi* this = THIS; + BgSpot00Hanebasi* this = (BgSpot00Hanebasi*)thisx; s32 pad; Vec3f chainPos; CollisionHeader* colHeader = NULL; @@ -128,7 +126,7 @@ void BgSpot00Hanebasi_Init(Actor* thisx, GlobalContext* globalCtx) { } void BgSpot00Hanebasi_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgSpot00Hanebasi* this = THIS; + BgSpot00Hanebasi* this = (BgSpot00Hanebasi*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); @@ -206,7 +204,7 @@ void BgSpot00Hanebasi_SetTorchLightInfo(BgSpot00Hanebasi* this, GlobalContext* g } void BgSpot00Hanebasi_Update(Actor* thisx, GlobalContext* globalCtx) { - BgSpot00Hanebasi* this = THIS; + BgSpot00Hanebasi* this = (BgSpot00Hanebasi*)thisx; s32 pad; this->actionFunc(this, globalCtx); 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 4a2f78f039..aaf54bdb9e 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 @@ -8,8 +8,6 @@ #include "objects/object_spot01_objects/object_spot01_objects.h" #define FLAGS 0x00000010 -#define THIS ((BgSpot01Fusya*)thisx) - void BgSpot01Fusya_Init(Actor* thisx, GlobalContext* globalCtx); void BgSpot01Fusya_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgSpot01Fusya_Update(Actor* thisx, GlobalContext* globalCtx); @@ -41,7 +39,7 @@ void BgSpot01Fusya_SetupAction(BgSpot01Fusya* this, BgSpot01FusyaActionFunc acti } void BgSpot01Fusya_Init(Actor* thisx, GlobalContext* globalCtx) { - BgSpot01Fusya* this = THIS; + BgSpot01Fusya* this = (BgSpot01Fusya*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); this->unk_154 = 100.0f; @@ -70,7 +68,7 @@ void func_808AAA50(BgSpot01Fusya* this, GlobalContext* globalCtx) { } void BgSpot01Fusya_Update(Actor* thisx, GlobalContext* globalCtx) { - BgSpot01Fusya* this = THIS; + BgSpot01Fusya* this = (BgSpot01Fusya*)thisx; this->actionFunc(this, 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 a56ce91ee4..21a3656d34 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 @@ -10,8 +10,6 @@ #define FLAGS 0x00000010 -#define THIS ((BgSpot01Idohashira*)thisx) - void BgSpot01Idohashira_Init(Actor* thisx, GlobalContext* globalCtx); void BgSpot01Idohashira_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgSpot01Idohashira_Update(Actor* thisx, GlobalContext* globalCtx); @@ -141,7 +139,7 @@ void func_808AAF34(BgSpot01Idohashira* this, GlobalContext* globalCtx) { } void BgSpot01Idohashira_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgSpot01Idohashira* this = THIS; + BgSpot01Idohashira* this = (BgSpot01Idohashira*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); } @@ -283,7 +281,7 @@ void func_808AB570(BgSpot01Idohashira* this, GlobalContext* globalCtx) { } void BgSpot01Idohashira_Update(Actor* thisx, GlobalContext* globalCtx) { - BgSpot01Idohashira* this = THIS; + BgSpot01Idohashira* this = (BgSpot01Idohashira*)thisx; if (this->action < 0 || this->action >= 4 || sActionFuncs[this->action] == NULL) { osSyncPrintf(VT_FGCOL(RED) "メインモードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST); @@ -294,7 +292,7 @@ void BgSpot01Idohashira_Update(Actor* thisx, GlobalContext* globalCtx) { void BgSpot01Idohashira_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad[2]; - BgSpot01Idohashira* this = THIS; + BgSpot01Idohashira* this = (BgSpot01Idohashira*)thisx; CollisionHeader* colHeader; Actor_ProcessInitChain(&this->dyna.actor, sInitChain); @@ -335,7 +333,7 @@ void func_808AB700(BgSpot01Idohashira* this, GlobalContext* globalCtx) { } void BgSpot01Idohashira_Draw(Actor* thisx, GlobalContext* globalCtx) { - BgSpot01Idohashira* this = THIS; + BgSpot01Idohashira* this = (BgSpot01Idohashira*)thisx; if (this->drawConfig < 0 || this->drawConfig > 0 || sDrawFuncs[this->drawConfig] == NULL) { osSyncPrintf(VT_FGCOL(RED) "描画モードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST); 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 4eed5a61fb..3e003fca02 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 @@ -9,8 +9,6 @@ #define FLAGS 0x00000020 -#define THIS ((BgSpot01Idomizu*)thisx) - void BgSpot01Idomizu_Init(Actor* thisx, GlobalContext* globalCtx); void BgSpot01Idomizu_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgSpot01Idomizu_Update(Actor* thisx, GlobalContext* globalCtx); @@ -35,7 +33,7 @@ static InitChainEntry sInitChain[] = { }; void BgSpot01Idomizu_Init(Actor* thisx, GlobalContext* globalCtx) { - BgSpot01Idomizu* this = THIS; + BgSpot01Idomizu* this = (BgSpot01Idomizu*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); if (gSaveContext.eventChkInf[6] & 0x80 || LINK_AGE_IN_YEARS == YEARS_ADULT) { @@ -63,7 +61,7 @@ void func_808ABB84(BgSpot01Idomizu* this, GlobalContext* globalCtx) { } void BgSpot01Idomizu_Update(Actor* thisx, GlobalContext* globalCtx) { - BgSpot01Idomizu* this = THIS; + BgSpot01Idomizu* this = (BgSpot01Idomizu*)thisx; this->actionFunc(this, 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 6357c47676..ad23964bb0 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 @@ -9,8 +9,6 @@ #define FLAGS 0x00000010 -#define THIS ((BgSpot01Idosoko*)thisx) - void BgSpot01Idosoko_Init(Actor* thisx, GlobalContext* globalCtx); void BgSpot01Idosoko_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgSpot01Idosoko_Update(Actor* thisx, GlobalContext* globalCtx); @@ -40,7 +38,7 @@ void BgSpot01Idosoko_SetupAction(BgSpot01Idosoko* this, BgSpot01IdosokoActionFun void BgSpot01Idosoko_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BgSpot01Idosoko* this = THIS; + BgSpot01Idosoko* this = (BgSpot01Idosoko*)thisx; CollisionHeader* colHeader = NULL; s32 pad2; @@ -56,7 +54,7 @@ void BgSpot01Idosoko_Init(Actor* thisx, GlobalContext* globalCtx) { } void BgSpot01Idosoko_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgSpot01Idosoko* this = THIS; + BgSpot01Idosoko* this = (BgSpot01Idosoko*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); } @@ -65,7 +63,7 @@ void func_808ABF54(BgSpot01Idosoko* this, GlobalContext* globalCtx) { } void BgSpot01Idosoko_Update(Actor* thisx, GlobalContext* globalCtx) { - BgSpot01Idosoko* this = THIS; + BgSpot01Idosoko* this = (BgSpot01Idosoko*)thisx; this->actionFunc(this, 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 469d168b52..3c2d8a89a4 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 @@ -10,8 +10,6 @@ #define FLAGS 0x00000010 -#define THIS ((BgSpot01Objects2*)thisx) - void BgSpot01Objects2_Init(Actor* thisx, GlobalContext* globalCtx); void BgSpot01Objects2_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgSpot01Objects2_Update(Actor* thisx, GlobalContext* globalCtx); @@ -45,7 +43,7 @@ static Gfx* D_808AC510[] = { }; void BgSpot01Objects2_Init(Actor* thisx, GlobalContext* globalCtx) { - BgSpot01Objects2* this = THIS; + BgSpot01Objects2* this = (BgSpot01Objects2*)thisx; switch (this->dyna.actor.params & 7) { case 0: @@ -131,7 +129,7 @@ void func_808AC474(BgSpot01Objects2* this, GlobalContext* globalCtx) { } void BgSpot01Objects2_Update(Actor* thisx, GlobalContext* globalCtx) { - BgSpot01Objects2* this = THIS; + BgSpot01Objects2* this = (BgSpot01Objects2*)thisx; this->actionFunc(this, 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 2a46e65d55..a9f4c694a6 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 @@ -9,8 +9,6 @@ #define FLAGS 0x00000030 -#define THIS ((BgSpot02Objects*)thisx) - void BgSpot02Objects_Init(Actor* thisx, GlobalContext* globalCtx); void BgSpot02Objects_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgSpot02Objects_Update(Actor* thisx, GlobalContext* globalCtx); @@ -51,7 +49,7 @@ static InitChainEntry sInitChain[] = { void BgSpot02Objects_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BgSpot02Objects* this = THIS; + BgSpot02Objects* this = (BgSpot02Objects*)thisx; CollisionHeader* colHeader = NULL; DynaPolyActor_Init(&this->dyna, 0); @@ -118,7 +116,7 @@ void BgSpot02Objects_Init(Actor* thisx, GlobalContext* globalCtx) { } void BgSpot02Objects_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgSpot02Objects* this = THIS; + BgSpot02Objects* this = (BgSpot02Objects*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); } @@ -186,7 +184,7 @@ void func_808ACB58(BgSpot02Objects* this, GlobalContext* globalCtx) { } void BgSpot02Objects_Update(Actor* thisx, GlobalContext* globalCtx) { - BgSpot02Objects* this = THIS; + BgSpot02Objects* this = (BgSpot02Objects*)thisx; this->actionFunc(this, globalCtx); } @@ -217,7 +215,7 @@ void func_808ACC34(BgSpot02Objects* this, GlobalContext* globalCtx) { } void func_808ACCB8(Actor* thisx, GlobalContext* globalCtx) { - BgSpot02Objects* this = THIS; + BgSpot02Objects* this = (BgSpot02Objects*)thisx; f32 rate; s32 pad; u8 redPrim; @@ -285,7 +283,7 @@ void func_808AD3D4(BgSpot02Objects* this, GlobalContext* globalCtx) { } void func_808AD450(Actor* thisx, GlobalContext* globalCtx) { - BgSpot02Objects* this = THIS; + BgSpot02Objects* this = (BgSpot02Objects*)thisx; s32 pad; f32 lerp; 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 c92b726973..423c3bb3f4 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 @@ -9,8 +9,6 @@ #define FLAGS 0x00000030 -#define THIS ((BgSpot03Taki*)thisx) - void BgSpot03Taki_Init(Actor* thisx, GlobalContext* globalCtx); void BgSpot03Taki_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgSpot03Taki_Update(Actor* thisx, GlobalContext* globalCtx); @@ -45,7 +43,7 @@ void BgSpot03Taki_ApplyOpeningAlpha(BgSpot03Taki* this, s32 bufferIndex) { } void BgSpot03Taki_Init(Actor* thisx, GlobalContext* globalCtx) { - BgSpot03Taki* this = THIS; + BgSpot03Taki* this = (BgSpot03Taki*)thisx; s16 pad; CollisionHeader* colHeader = NULL; @@ -62,7 +60,7 @@ void BgSpot03Taki_Init(Actor* thisx, GlobalContext* globalCtx) { } void BgSpot03Taki_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgSpot03Taki* this = THIS; + BgSpot03Taki* this = (BgSpot03Taki*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); } @@ -110,13 +108,13 @@ void func_808ADEF0(BgSpot03Taki* this, GlobalContext* globalCtx) { } void BgSpot03Taki_Update(Actor* thisx, GlobalContext* globalCtx) { - BgSpot03Taki* this = THIS; + BgSpot03Taki* this = (BgSpot03Taki*)thisx; this->actionFunc(this, globalCtx); } void BgSpot03Taki_Draw(Actor* thisx, GlobalContext* globalCtx) { - BgSpot03Taki* this = THIS; + BgSpot03Taki* this = (BgSpot03Taki*)thisx; s32 pad; u32 gameplayFrames; 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 1e8f1e7d82..de9398eb95 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 @@ -9,8 +9,6 @@ #define FLAGS 0x00000000 -#define THIS ((BgSpot05Soko*)thisx) - void BgSpot05Soko_Init(Actor* thisx, GlobalContext* globalCtx); void BgSpot05Soko_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgSpot05Soko_Update(Actor* thisx, GlobalContext* globalCtx); @@ -42,7 +40,7 @@ static Gfx* sDLists[] = { void BgSpot05Soko_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad1; - BgSpot05Soko* this = THIS; + BgSpot05Soko* this = (BgSpot05Soko*)thisx; CollisionHeader* colHeader = NULL; s32 pad2; @@ -70,7 +68,7 @@ void BgSpot05Soko_Init(Actor* thisx, GlobalContext* globalCtx) { } void BgSpot05Soko_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgSpot05Soko* this = THIS; + BgSpot05Soko* this = (BgSpot05Soko*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); } @@ -97,7 +95,7 @@ void func_808AE630(BgSpot05Soko* this, GlobalContext* globalCtx) { } void BgSpot05Soko_Update(Actor* thisx, GlobalContext* globalCtx) { - BgSpot05Soko* this = THIS; + BgSpot05Soko* this = (BgSpot05Soko*)thisx; this->actionFunc(this, globalCtx); } 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 212147b06d..3d50685311 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 @@ -9,8 +9,6 @@ #define FLAGS 0x00000200 -#define THIS ((BgSpot06Objects*)thisx) - typedef enum { /* 0x0 */ LHO_WATER_TEMPLE_ENTRACE_GATE, /* 0x1 */ LHO_WATER_TEMPLE_ENTRANCE_LOCK, @@ -94,7 +92,7 @@ static InitChainEntry sInitChainWaterPlane[] = { }; void BgSpot06Objects_Init(Actor* thisx, GlobalContext* globalCtx) { - BgSpot06Objects* this = THIS; + BgSpot06Objects* this = (BgSpot06Objects*)thisx; s32 pad; CollisionHeader* colHeader = NULL; @@ -185,7 +183,7 @@ void BgSpot06Objects_Init(Actor* thisx, GlobalContext* globalCtx) { } void BgSpot06Objects_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgSpot06Objects* this = THIS; + BgSpot06Objects* this = (BgSpot06Objects*)thisx; switch (this->dyna.actor.params) { case LHO_WATER_TEMPLE_ENTRACE_GATE: @@ -413,7 +411,7 @@ void BgSpot06Objects_LockFloat(BgSpot06Objects* this, GlobalContext* globalCtx) } void BgSpot06Objects_Update(Actor* thisx, GlobalContext* globalCtx) { - BgSpot06Objects* this = THIS; + BgSpot06Objects* this = (BgSpot06Objects*)thisx; this->actionFunc(this, globalCtx); @@ -457,7 +455,7 @@ void BgSpot06Objects_DrawLakeHyliaWater(BgSpot06Objects* this, GlobalContext* gl } void BgSpot06Objects_Draw(Actor* thisx, GlobalContext* globalCtx) { - BgSpot06Objects* this = THIS; + BgSpot06Objects* this = (BgSpot06Objects*)thisx; switch (this->dyna.actor.params) { case LHO_WATER_TEMPLE_ENTRACE_GATE: 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 ae86b32975..5f878096a2 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 @@ -9,8 +9,6 @@ #define FLAGS 0x00000030 -#define THIS ((BgSpot07Taki*)thisx) - void BgSpot07Taki_Init(Actor* thisx, GlobalContext* globalCtx); void BgSpot07Taki_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgSpot07Taki_Update(Actor* thisx, GlobalContext* globalCtx); @@ -35,7 +33,7 @@ static InitChainEntry sInitChain[] = { }; void BgSpot07Taki_Init(Actor* thisx, GlobalContext* globalCtx) { - BgSpot07Taki* this = THIS; + BgSpot07Taki* this = (BgSpot07Taki*)thisx; s32 pad; CollisionHeader* colHeader = NULL; @@ -53,7 +51,7 @@ void BgSpot07Taki_Init(Actor* thisx, GlobalContext* globalCtx) { } void BgSpot07Taki_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgSpot07Taki* this = THIS; + BgSpot07Taki* this = (BgSpot07Taki*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); } @@ -62,13 +60,13 @@ void BgSpot07Taki_DoNothing(BgSpot07Taki* this, GlobalContext* globalCtx) { } void BgSpot07Taki_Update(Actor* thisx, GlobalContext* globalCtx) { - BgSpot07Taki* this = THIS; + BgSpot07Taki* this = (BgSpot07Taki*)thisx; this->actionFunc(this, globalCtx); } void BgSpot07Taki_Draw(Actor* thisx, GlobalContext* globalCtx) { - BgSpot07Taki* this = THIS; + BgSpot07Taki* this = (BgSpot07Taki*)thisx; u32 frames; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_spot07_taki.c", 169); 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 250ef0faa6..d9f32dd5c3 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 @@ -11,8 +11,6 @@ #define FLAGS 0x00400000 -#define THIS ((BgSpot08Bakudankabe*)thisx) - void BgSpot08Bakudankabe_Init(Actor* thisx, GlobalContext* globalCtx); void BgSpot08Bakudankabe_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgSpot08Bakudankabe_Update(Actor* thisx, GlobalContext* globalCtx); @@ -159,7 +157,7 @@ void func_808B0324(BgSpot08Bakudankabe* this, GlobalContext* globalCtx) { } void BgSpot08Bakudankabe_Init(Actor* thisx, GlobalContext* globalCtx) { - BgSpot08Bakudankabe* this = THIS; + BgSpot08Bakudankabe* this = (BgSpot08Bakudankabe*)thisx; s32 pad; CollisionHeader* colHeader = NULL; @@ -175,14 +173,14 @@ void BgSpot08Bakudankabe_Init(Actor* thisx, GlobalContext* globalCtx) { } void BgSpot08Bakudankabe_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgSpot08Bakudankabe* this = THIS; + BgSpot08Bakudankabe* this = (BgSpot08Bakudankabe*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); Collider_DestroyJntSph(globalCtx, &this->collider); } void BgSpot08Bakudankabe_Update(Actor* thisx, GlobalContext* globalCtx) { - BgSpot08Bakudankabe* this = THIS; + BgSpot08Bakudankabe* this = (BgSpot08Bakudankabe*)thisx; if (this->collider.base.acFlags & AC_HIT) { func_808B0324(this, globalCtx); @@ -196,7 +194,7 @@ void BgSpot08Bakudankabe_Update(Actor* thisx, GlobalContext* globalCtx) { } void BgSpot08Bakudankabe_Draw(Actor* thisx, GlobalContext* globalCtx) { - BgSpot08Bakudankabe* this = THIS; + BgSpot08Bakudankabe* this = (BgSpot08Bakudankabe*)thisx; Collider_UpdateSpheres(0, &this->collider); Collider_UpdateSpheres(1, &this->collider); 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 c36cbab393..9b3d369ec1 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 @@ -9,8 +9,6 @@ #define FLAGS 0x00000000 -#define THIS ((BgSpot08Iceblock*)thisx) - void BgSpot08Iceblock_Init(Actor* thisx, GlobalContext* globalCtx); void BgSpot08Iceblock_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgSpot08Iceblock_Update(Actor* thisx, GlobalContext* globalCtx); @@ -283,7 +281,7 @@ static InitChainEntry sInitChain[] = { }; void BgSpot08Iceblock_Init(Actor* thisx, GlobalContext* globalCtx) { - BgSpot08Iceblock* this = THIS; + BgSpot08Iceblock* this = (BgSpot08Iceblock*)thisx; CollisionHeader* colHeader; // "spot08 ice floe" @@ -351,7 +349,7 @@ void BgSpot08Iceblock_Init(Actor* thisx, GlobalContext* globalCtx) { } void BgSpot08Iceblock_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgSpot08Iceblock* this = THIS; + BgSpot08Iceblock* this = (BgSpot08Iceblock*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); } @@ -417,7 +415,7 @@ void BgSpot08Iceblock_SetupNoAction(BgSpot08Iceblock* this) { } void BgSpot08Iceblock_Update(Actor* thisx, GlobalContext* globalCtx) { - BgSpot08Iceblock* this = THIS; + BgSpot08Iceblock* this = (BgSpot08Iceblock*)thisx; if (Rand_ZeroOne() < 0.05f) { this->bobIncrSlow = Rand_S16Offset(300, 100); @@ -433,7 +431,7 @@ void BgSpot08Iceblock_Update(Actor* thisx, GlobalContext* globalCtx) { void BgSpot08Iceblock_Draw(Actor* thisx, GlobalContext* globalCtx) { Gfx* dList; - BgSpot08Iceblock* this = THIS; + BgSpot08Iceblock* this = (BgSpot08Iceblock*)thisx; switch (this->dyna.actor.params & 0x200) { case 0: 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 b915fa62a3..de7a38d257 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 @@ -9,8 +9,6 @@ #define FLAGS 0x00000000 -#define THIS ((BgSpot09Obj*)thisx) - void BgSpot09Obj_Init(Actor* thisx, GlobalContext* globalCtx); void BgSpot09Obj_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgSpot09Obj_Update(Actor* thisx, GlobalContext* globalCtx); @@ -137,7 +135,7 @@ s32 func_808B1D44(BgSpot09Obj* this, GlobalContext* globalCtx) { } void BgSpot09Obj_Init(Actor* thisx, GlobalContext* globalCtx) { - BgSpot09Obj* this = THIS; + BgSpot09Obj* this = (BgSpot09Obj*)thisx; osSyncPrintf("Spot09 Object [arg_data : 0x%04x](大工救出フラグ 0x%x)\n", this->dyna.actor.params, gSaveContext.eventChkInf[9] & 0xF); @@ -156,7 +154,7 @@ void BgSpot09Obj_Init(Actor* thisx, GlobalContext* globalCtx) { void BgSpot09Obj_Destroy(Actor* thisx, GlobalContext* globalCtx) { DynaCollisionContext* dynaColCtx = &globalCtx->colCtx.dyna; - BgSpot09Obj* this = THIS; + BgSpot09Obj* this = (BgSpot09Obj*)thisx; if (this->dyna.actor.params != 0) { DynaPoly_DeleteBgActor(globalCtx, dynaColCtx, this->dyna.bgId); 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 00497efdfe..614886964d 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 @@ -11,8 +11,6 @@ #define FLAGS 0x00000030 -#define THIS ((BgSpot11Bakudankabe*)thisx) - void BgSpot11Bakudankabe_Init(Actor* thisx, GlobalContext* globalCtx); void BgSpot11Bakudankabe_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgSpot11Bakudankabe_Update(Actor* thisx, GlobalContext* globalCtx); @@ -110,7 +108,7 @@ void func_808B2218(BgSpot11Bakudankabe* this, GlobalContext* globalCtx) { } void BgSpot11Bakudankabe_Init(Actor* thisx, GlobalContext* globalCtx) { - BgSpot11Bakudankabe* this = THIS; + BgSpot11Bakudankabe* this = (BgSpot11Bakudankabe*)thisx; s32 pad; CollisionHeader* colHeader = NULL; @@ -127,14 +125,14 @@ void BgSpot11Bakudankabe_Init(Actor* thisx, GlobalContext* globalCtx) { } void BgSpot11Bakudankabe_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgSpot11Bakudankabe* this = THIS; + BgSpot11Bakudankabe* this = (BgSpot11Bakudankabe*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); Collider_DestroyCylinder(globalCtx, &this->collider); } void BgSpot11Bakudankabe_Update(Actor* thisx, GlobalContext* globalCtx) { - BgSpot11Bakudankabe* this = THIS; + BgSpot11Bakudankabe* this = (BgSpot11Bakudankabe*)thisx; if (this->collider.base.acFlags & AC_HIT) { func_808B2218(this, globalCtx); @@ -148,7 +146,7 @@ void BgSpot11Bakudankabe_Update(Actor* thisx, GlobalContext* globalCtx) { } void BgSpot11Bakudankabe_Draw(Actor* thisx, GlobalContext* globalCtx) { - BgSpot11Bakudankabe* this = THIS; + BgSpot11Bakudankabe* this = (BgSpot11Bakudankabe*)thisx; Gfx_DrawDListOpa(globalCtx, gDesertColossusBombableWallDL); } 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 e2068abfc9..0d7712eab5 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 @@ -10,8 +10,6 @@ #define FLAGS 0x00000010 -#define THIS ((BgSpot11Oasis*)thisx) - void BgSpot11Oasis_Init(Actor* thisx, GlobalContext* globalCtx); void BgSpot11Oasis_Update(Actor* thisx, GlobalContext* globalCtx); void BgSpot11Oasis_Draw(Actor* thisx, GlobalContext* globalCtx); @@ -83,7 +81,7 @@ s32 func_808B280C(GlobalContext* globalCtx) { } void BgSpot11Oasis_Init(Actor* thisx, GlobalContext* globalCtx) { - BgSpot11Oasis* this = THIS; + BgSpot11Oasis* this = (BgSpot11Oasis*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); func_808B2970(this); @@ -124,7 +122,7 @@ void func_808B2AB8(BgSpot11Oasis* this, GlobalContext* globalCtx) { } void BgSpot11Oasis_Update(Actor* thisx, GlobalContext* globalCtx) { - BgSpot11Oasis* this = THIS; + BgSpot11Oasis* this = (BgSpot11Oasis*)thisx; s32 pad; u32 gameplayFrames; Vec3f sp30; 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 fb73a1f077..86494b4a4c 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 @@ -9,8 +9,6 @@ #define FLAGS 0x00000000 -#define THIS ((BgSpot12Gate*)thisx) - void BgSpot12Gate_Init(Actor* thisx, GlobalContext* globalCtx); void BgSpot12Gate_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgSpot12Gate_Update(Actor* thisx, GlobalContext* globalCtx); @@ -59,7 +57,7 @@ void BgSpot12Gate_InitDynaPoly(BgSpot12Gate* this, GlobalContext* globalCtx, Col } void BgSpot12Gate_Init(Actor* thisx, GlobalContext* globalCtx) { - BgSpot12Gate* this = THIS; + BgSpot12Gate* this = (BgSpot12Gate*)thisx; BgSpot12Gate_InitDynaPoly(this, globalCtx, &gGerudoFortressWastelandGateCol, DPM_UNK); Actor_ProcessInitChain(&this->dyna.actor, sInitChain); @@ -72,7 +70,7 @@ void BgSpot12Gate_Init(Actor* thisx, GlobalContext* globalCtx) { } void BgSpot12Gate_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgSpot12Gate* this = THIS; + BgSpot12Gate* this = (BgSpot12Gate*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); } @@ -131,7 +129,7 @@ void func_808B3298(BgSpot12Gate* this, GlobalContext* globalCtx) { } void BgSpot12Gate_Update(Actor* thisx, GlobalContext* globalCtx) { - BgSpot12Gate* this = THIS; + BgSpot12Gate* this = (BgSpot12Gate*)thisx; if (this->unk_168 > 0) { this->unk_168--; 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 321f43c6e9..e2a5e2ca17 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 @@ -9,8 +9,6 @@ #define FLAGS 0x00000000 -#define THIS ((BgSpot12Saku*)thisx) - void BgSpot12Saku_Init(Actor* thisx, GlobalContext* globalCtx); void BgSpot12Saku_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgSpot12Saku_Update(Actor* thisx, GlobalContext* globalCtx); @@ -57,7 +55,7 @@ void func_808B3420(BgSpot12Saku* this, GlobalContext* globalCtx, CollisionHeader } void BgSpot12Saku_Init(Actor* thisx, GlobalContext* globalCtx) { - BgSpot12Saku* this = THIS; + BgSpot12Saku* this = (BgSpot12Saku*)thisx; func_808B3420(this, globalCtx, &gGerudoFortressGTGShutterCol, DPM_UNK); Actor_ProcessInitChain(&this->dyna.actor, sInitChain); @@ -69,7 +67,7 @@ void BgSpot12Saku_Init(Actor* thisx, GlobalContext* globalCtx) { } void BgSpot12Saku_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgSpot12Saku* this = THIS; + BgSpot12Saku* this = (BgSpot12Saku*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); } @@ -124,7 +122,7 @@ void func_808B37AC(BgSpot12Saku* this, GlobalContext* globalCtx) { } void BgSpot12Saku_Update(Actor* thisx, GlobalContext* globalCtx) { - BgSpot12Saku* this = THIS; + BgSpot12Saku* this = (BgSpot12Saku*)thisx; if (this->timer > 0) { this->timer--; 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 721449b6fe..c89234ec43 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 @@ -9,8 +9,6 @@ #define FLAGS 0x00000000 -#define THIS ((BgSpot15Rrbox*)thisx) - void BgSpot15Rrbox_Init(Actor* thisx, GlobalContext* globalCtx); void BgSpot15Rrbox_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgSpot15Rrbox_Update(Actor* thisx, GlobalContext* globalCtx); @@ -120,7 +118,7 @@ s32 func_808B3AAC(BgSpot15Rrbox* this, GlobalContext* globalCtx) { } void BgSpot15Rrbox_Init(Actor* thisx, GlobalContext* globalCtx) { - BgSpot15Rrbox* this = THIS; + BgSpot15Rrbox* this = (BgSpot15Rrbox*)thisx; func_808B3960(this, globalCtx, &gLonLonMilkCrateCol, DPM_UNK); Actor_ProcessInitChain(&this->dyna.actor, sInitChain); @@ -136,7 +134,7 @@ void BgSpot15Rrbox_Init(Actor* thisx, GlobalContext* globalCtx) { } void BgSpot15Rrbox_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgSpot15Rrbox* this = THIS; + BgSpot15Rrbox* this = (BgSpot15Rrbox*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); D_808B4590 = 0; @@ -353,7 +351,7 @@ void func_808B44CC(BgSpot15Rrbox* this, GlobalContext* globalCtx) { } void BgSpot15Rrbox_Update(Actor* thisx, GlobalContext* globalCtx) { - BgSpot15Rrbox* this = THIS; + BgSpot15Rrbox* this = (BgSpot15Rrbox*)thisx; if (this->unk_168 > 0) { this->unk_168--; 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 c16f7a5dd7..e114e8a7d9 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 @@ -9,8 +9,6 @@ #define FLAGS 0x00000000 -#define THIS ((BgSpot15Saku*)thisx) - void BgSpot15Saku_Init(Actor* thisx, GlobalContext* globalCtx); void BgSpot15Saku_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgSpot15Saku_Update(Actor* thisx, GlobalContext* globalCtx); @@ -34,7 +32,7 @@ const ActorInit Bg_Spot15_Saku_InitVars = { void BgSpot15Saku_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BgSpot15Saku* this = THIS; + BgSpot15Saku* this = (BgSpot15Saku*)thisx; s32 pad2; CollisionHeader* colHeader = NULL; @@ -54,7 +52,7 @@ void BgSpot15Saku_Init(Actor* thisx, GlobalContext* globalCtx) { } void BgSpot15Saku_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgSpot15Saku* this = THIS; + BgSpot15Saku* this = (BgSpot15Saku*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); } @@ -86,7 +84,7 @@ void func_808B4A04(BgSpot15Saku* this, GlobalContext* globalCtx) { } void BgSpot15Saku_Update(Actor* thisx, GlobalContext* globalCtx) { - BgSpot15Saku* this = THIS; + BgSpot15Saku* this = (BgSpot15Saku*)thisx; if (this->timer != 0) { this->timer--; 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 8a09e39b93..3564eae950 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 @@ -6,8 +6,6 @@ #define FLAGS 0x00000010 -#define THIS ((BgSpot16Bombstone*)thisx) - void BgSpot16Bombstone_Init(Actor* thisx, GlobalContext* globalCtx); void BgSpot16Bombstone_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgSpot16Bombstone_Update(Actor* thisx, GlobalContext* globalCtx); @@ -233,7 +231,7 @@ s32 func_808B4E58(BgSpot16Bombstone* this, GlobalContext* globalctx) { } void BgSpot16Bombstone_Init(Actor* thisx, GlobalContext* globalCtx) { - BgSpot16Bombstone* this = THIS; + BgSpot16Bombstone* this = (BgSpot16Bombstone*)thisx; s16 shouldLive; func_808B4C30(this); @@ -267,7 +265,7 @@ void BgSpot16Bombstone_Init(Actor* thisx, GlobalContext* globalCtx) { } void BgSpot16Bombstone_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgSpot16Bombstone* this = THIS; + BgSpot16Bombstone* this = (BgSpot16Bombstone*)thisx; if (this->actor.params == 0xFF) { // Boulder is intact so remove its collider @@ -523,7 +521,7 @@ void func_808B5B6C(BgSpot16Bombstone* this, GlobalContext* globalCtx) { } void BgSpot16Bombstone_Update(Actor* thisx, GlobalContext* globalCtx) { - BgSpot16Bombstone* this = THIS; + BgSpot16Bombstone* this = (BgSpot16Bombstone*)thisx; this->unk_154++; if (this->actionFunc != NULL) { @@ -532,7 +530,7 @@ void BgSpot16Bombstone_Update(Actor* thisx, GlobalContext* globalCtx) { } void BgSpot16Bombstone_Draw(Actor* thisx, GlobalContext* globalCtx) { - BgSpot16Bombstone* this = THIS; + BgSpot16Bombstone* this = (BgSpot16Bombstone*)thisx; s32 pad; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_spot16_bombstone.c", 1253); 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 45ec1ef6a5..d6cd62fba0 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 @@ -10,8 +10,6 @@ #define FLAGS 0x00000000 -#define THIS ((BgSpot16Doughnut*)thisx) - void BgSpot16Doughnut_Init(Actor* thisx, GlobalContext* globalCtx); void BgSpot16Doughnut_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgSpot16Doughnut_Update(Actor* thisx, GlobalContext* globalCtx); @@ -43,7 +41,7 @@ static s16 sScales[] = { }; void BgSpot16Doughnut_Init(Actor* thisx, GlobalContext* globalCtx) { - BgSpot16Doughnut* this = THIS; + BgSpot16Doughnut* this = (BgSpot16Doughnut*)thisx; s32 params; Actor_ProcessInitChain(&this->actor, sInitChain); @@ -85,7 +83,7 @@ void BgSpot16Doughnut_Destroy(Actor* thisx, GlobalContext* globalCtx) { } void BgSpot16Doughnut_Update(Actor* thisx, GlobalContext* globalCtx) { - BgSpot16Doughnut* this = THIS; + BgSpot16Doughnut* this = (BgSpot16Doughnut*)thisx; if (!(this->fireFlag & 1)) { this->actor.shape.rot.y -= 0x20; @@ -107,7 +105,7 @@ void BgSpot16Doughnut_Update(Actor* thisx, GlobalContext* globalCtx) { // Update function for outwardly expanding and dissipating void BgSpot16Doughnut_UpdateExpanding(Actor* thisx, GlobalContext* globalCtx) { - BgSpot16Doughnut* this = THIS; + BgSpot16Doughnut* this = (BgSpot16Doughnut*)thisx; if (this->envColorAlpha >= 6) { this->envColorAlpha -= 5; @@ -119,7 +117,7 @@ void BgSpot16Doughnut_UpdateExpanding(Actor* thisx, GlobalContext* globalCtx) { } void BgSpot16Doughnut_Draw(Actor* thisx, GlobalContext* globalCtx) { - BgSpot16Doughnut* this = THIS; + BgSpot16Doughnut* this = (BgSpot16Doughnut*)thisx; u32 scroll = globalCtx->gameplayFrames & 0xFFFF; s32 pad; @@ -148,7 +146,7 @@ void BgSpot16Doughnut_Draw(Actor* thisx, GlobalContext* globalCtx) { // Draw function for outwardly expanding and dissipating void BgSpot16Doughnut_DrawExpanding(Actor* thisx, GlobalContext* globalCtx) { - BgSpot16Doughnut* this = THIS; + BgSpot16Doughnut* this = (BgSpot16Doughnut*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_spot16_doughnut.c", 245); 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 5816e890f6..5bac550db0 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 @@ -11,8 +11,6 @@ #define FLAGS 0x00000000 -#define THIS ((BgSpot17Bakudankabe*)thisx) - void BgSpot17Bakudankabe_Init(Actor* thisx, GlobalContext* globalCtx); void BgSpot17Bakudankabe_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgSpot17Bakudankabe_Update(Actor* thisx, GlobalContext* globalCtx); @@ -93,7 +91,7 @@ void func_808B6BC0(BgSpot17Bakudankabe* this, GlobalContext* globalCtx) { } void BgSpot17Bakudankabe_Init(Actor* thisx, GlobalContext* globalCtx) { - BgSpot17Bakudankabe* this = THIS; + BgSpot17Bakudankabe* this = (BgSpot17Bakudankabe*)thisx; s32 pad; CollisionHeader* colHeader = NULL; @@ -109,12 +107,12 @@ void BgSpot17Bakudankabe_Init(Actor* thisx, GlobalContext* globalCtx) { } void BgSpot17Bakudankabe_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgSpot17Bakudankabe* this = THIS; + BgSpot17Bakudankabe* this = (BgSpot17Bakudankabe*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); } void BgSpot17Bakudankabe_Update(Actor* thisx, GlobalContext* globalCtx) { - BgSpot17Bakudankabe* this = THIS; + BgSpot17Bakudankabe* this = (BgSpot17Bakudankabe*)thisx; if (this->dyna.actor.xzDistToPlayer < 650.0f && func_80033684(globalCtx, &this->dyna.actor) != NULL) { func_808B6BC0(this, globalCtx); Flags_SetSwitch(globalCtx, (this->dyna.actor.params & 0x3F)); 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 bbd178cfa8..12e8166be9 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 @@ -9,8 +9,6 @@ #define FLAGS 0x00000030 -#define THIS ((BgSpot17Funen*)thisx) - void BgSpot17Funen_Init(Actor* thisx, GlobalContext* globalCtx); void BgSpot17Funen_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgSpot17Funen_Update(Actor* thisx, GlobalContext* globalCtx); @@ -34,7 +32,7 @@ static InitChainEntry sInitChain[] = { }; void BgSpot17Funen_Init(Actor* thisx, GlobalContext* globalCtx) { - BgSpot17Funen* this = THIS; + BgSpot17Funen* this = (BgSpot17Funen*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); osSyncPrintf("spot17 obj. 噴煙 (arg_data 0x%04x)\n", this->actor.params); @@ -44,7 +42,7 @@ void BgSpot17Funen_Destroy(Actor* thisx, GlobalContext* globalCtx) { } void BgSpot17Funen_Update(Actor* thisx, GlobalContext* globalCtx) { - BgSpot17Funen* this = THIS; + BgSpot17Funen* this = (BgSpot17Funen*)thisx; this->actor.draw = func_808B7478; this->actor.update = func_808B746C; 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 1a30000f99..eeaf84be5a 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 @@ -4,8 +4,6 @@ #define FLAGS 0x00000010 -#define THIS ((BgSpot18Basket*)thisx) - void BgSpot18Basket_Init(Actor* thisx, GlobalContext* globalCtx); void BgSpot18Basket_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgSpot18Basket_Update(Actor* thisx, GlobalContext* globalCtx); @@ -77,7 +75,7 @@ static ColliderJntSphInit sJntSphInit = { static s16 D_808B85C8[] = { 0x8000, 0x2AAA, 0xD555, 0x0000 }; void func_808B7710(Actor* thisx, GlobalContext* globalCtx) { - BgSpot18Basket* this = THIS; + BgSpot18Basket* this = (BgSpot18Basket*)thisx; Collider_InitJntSph(globalCtx, &this->colliderJntSph); Collider_SetJntSph(globalCtx, &this->colliderJntSph, &this->dyna.actor, &sJntSphInit, this->ColliderJntSphElements); @@ -132,7 +130,7 @@ static InitChainEntry sInitChain[] = { void BgSpot18Basket_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BgSpot18Basket* this = THIS; + BgSpot18Basket* this = (BgSpot18Basket*)thisx; CollisionHeader* colHeader = NULL; DynaPolyActor_Init(&this->dyna, DPM_UNK3); @@ -166,7 +164,7 @@ void BgSpot18Basket_Init(Actor* thisx, GlobalContext* globalCtx) { } void BgSpot18Basket_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgSpot18Basket* this = THIS; + BgSpot18Basket* this = (BgSpot18Basket*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); Collider_DestroyJntSph(globalCtx, &this->colliderJntSph); @@ -429,7 +427,7 @@ void func_808B81A0(BgSpot18Basket* this, GlobalContext* globalCtx) { void BgSpot18Basket_Update(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BgSpot18Basket* this = THIS; + BgSpot18Basket* this = (BgSpot18Basket*)thisx; s32 bgId; this->unk_216++; @@ -446,7 +444,7 @@ void BgSpot18Basket_Update(Actor* thisx, GlobalContext* globalCtx) { } void BgSpot18Basket_Draw(Actor* thisx, GlobalContext* globalCtx) { - BgSpot18Basket* this = THIS; + BgSpot18Basket* this = (BgSpot18Basket*)thisx; Collider_UpdateSpheres(0, &this->colliderJntSph); Collider_UpdateSpheres(1, &this->colliderJntSph); 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 757f8ef264..e62d9dcc7e 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 @@ -9,8 +9,6 @@ #define FLAGS 0x00000000 -#define THIS ((BgSpot18Futa*)thisx) - void BgSpot18Futa_Init(Actor* thisx, GlobalContext* globalCtx); void BgSpot18Futa_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgSpot18Futa_Update(Actor* thisx, GlobalContext* globalCtx); @@ -36,7 +34,7 @@ static InitChainEntry sInitChain[] = { }; void BgSpot18Futa_Init(Actor* thisx, GlobalContext* globalCtx) { - BgSpot18Futa* this = THIS; + BgSpot18Futa* this = (BgSpot18Futa*)thisx; s32 pad; CollisionHeader* colHeader = NULL; @@ -47,13 +45,13 @@ void BgSpot18Futa_Init(Actor* thisx, GlobalContext* globalCtx) { } void BgSpot18Futa_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgSpot18Futa* this = THIS; + BgSpot18Futa* this = (BgSpot18Futa*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); } void BgSpot18Futa_Update(Actor* thisx, GlobalContext* globalCtx) { - BgSpot18Futa* this = THIS; + BgSpot18Futa* this = (BgSpot18Futa*)thisx; s32 iVar1; if (this->dyna.actor.parent == NULL) { 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 eefec054ff..aea435b113 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 @@ -10,8 +10,6 @@ #define FLAGS 0x00000000 -#define THIS ((BgSpot18Obj*)thisx) - void BgSpot18Obj_Init(Actor* thisx, GlobalContext* globalCtx); void BgSpot18Obj_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgSpot18Obj_Update(Actor* thisx, GlobalContext* globalCtx); @@ -182,7 +180,7 @@ s32 func_808B8CC8(BgSpot18Obj* this, GlobalContext* globalCtx) { } void BgSpot18Obj_Init(Actor* thisx, GlobalContext* globalCtx) { - BgSpot18Obj* this = THIS; + BgSpot18Obj* this = (BgSpot18Obj*)thisx; osSyncPrintf("Spot18 Object [arg_data : 0x%04x]\n", this->dyna.actor.params); if (!func_808B8B38(this, globalCtx)) { @@ -193,7 +191,7 @@ void BgSpot18Obj_Init(Actor* thisx, GlobalContext* globalCtx) { } void BgSpot18Obj_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgSpot18Obj* this = THIS; + BgSpot18Obj* this = (BgSpot18Obj*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); } @@ -275,7 +273,7 @@ void func_808B9040(BgSpot18Obj* this, GlobalContext* globalCtx) { } void BgSpot18Obj_Update(Actor* thisx, GlobalContext* globalCtx) { - BgSpot18Obj* this = THIS; + BgSpot18Obj* this = (BgSpot18Obj*)thisx; if (this->unk_168 > 0) { this->unk_168 -= 1; 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 64523eeccb..fcda88fd0d 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 @@ -9,8 +9,6 @@ #define FLAGS 0x00000030 -#define THIS ((BgSpot18Shutter*)thisx) - void BgSpot18Shutter_Init(Actor* thisx, GlobalContext* globalCtx); void BgSpot18Shutter_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgSpot18Shutter_Update(Actor* thisx, GlobalContext* globalCtx); @@ -40,7 +38,7 @@ static InitChainEntry sInitChain[] = { void BgSpot18Shutter_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BgSpot18Shutter* this = THIS; + BgSpot18Shutter* this = (BgSpot18Shutter*)thisx; s32 param = (this->dyna.actor.params >> 8) & 1; CollisionHeader* colHeader = NULL; @@ -78,7 +76,7 @@ void BgSpot18Shutter_Init(Actor* thisx, GlobalContext* globalCtx) { } void BgSpot18Shutter_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgSpot18Shutter* this = THIS; + BgSpot18Shutter* this = (BgSpot18Shutter*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); } @@ -132,7 +130,7 @@ void func_808B971C(BgSpot18Shutter* this, GlobalContext* globalCtx) { } void BgSpot18Shutter_Update(Actor* thisx, GlobalContext* globalCtx) { - BgSpot18Shutter* this = THIS; + BgSpot18Shutter* this = (BgSpot18Shutter*)thisx; this->actionFunc(this, 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 caa0a5724f..711bdda838 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 @@ -9,8 +9,6 @@ #define FLAGS 0x00000030 -#define THIS ((BgSstFloor*)thisx) - void BgSstFloor_Init(BgSstFloor* this, GlobalContext* globalCtx); void BgSstFloor_Destroy(BgSstFloor* this, GlobalContext* globalCtx); void BgSstFloor_Update(BgSstFloor* this, GlobalContext* globalCtx); @@ -36,7 +34,7 @@ static InitChainEntry sInitChain[] = { void BgSstFloor_Init(BgSstFloor* thisx, GlobalContext* globalCtx) { s32 pad; - BgSstFloor* this = THIS; + BgSstFloor* this = (BgSstFloor*)thisx; CollisionHeader* colHeader = NULL; Actor_ProcessInitChain(&this->dyna.actor, sInitChain); @@ -47,14 +45,14 @@ void BgSstFloor_Init(BgSstFloor* thisx, GlobalContext* globalCtx) { void BgSstFloor_Destroy(BgSstFloor* thisx, GlobalContext* globalCtx) { s32 pad; - BgSstFloor* this = THIS; + BgSstFloor* this = (BgSstFloor*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); } void BgSstFloor_Update(BgSstFloor* thisx, GlobalContext* globalCtx) { s32 pad; - BgSstFloor* this = THIS; + BgSstFloor* this = (BgSstFloor*)thisx; Player* player = GET_PLAYER(globalCtx); CollisionHeader* colHeader = SEGMENTED_TO_VIRTUAL(&gBongoDrumCol); @@ -123,7 +121,7 @@ void BgSstFloor_Update(BgSstFloor* thisx, GlobalContext* globalCtx) { } void BgSstFloor_Draw(BgSstFloor* thisx, GlobalContext* globalCtx) { - BgSstFloor* this = THIS; + BgSstFloor* this = (BgSstFloor*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_sst_floor.c", 277); func_80093D18(globalCtx->state.gfxCtx); 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 61cc0b72fc..d2cab5bee3 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 @@ -9,8 +9,6 @@ #define FLAGS 0x00000020 -#define THIS ((BgTokiHikari*)thisx) - void BgTokiHikari_Init(Actor* thisx, GlobalContext* globalCtx); void BgTokiHikari_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgTokiHikari_Update(Actor* thisx, GlobalContext* globalCtx); @@ -40,7 +38,7 @@ static InitChainEntry sInitChain[] = { }; void BgTokiHikari_Init(Actor* thisx, GlobalContext* globalCtx) { - BgTokiHikari* this = THIS; + BgTokiHikari* this = (BgTokiHikari*)thisx; switch (this->actor.params) { case 0: @@ -65,13 +63,13 @@ void BgTokiHikari_DoNothing(BgTokiHikari* this, GlobalContext* globalCtx) { } void BgTokiHikari_Update(Actor* thisx, GlobalContext* globalCtx) { - BgTokiHikari* this = THIS; + BgTokiHikari* this = (BgTokiHikari*)thisx; this->actionFunc(this, globalCtx); } void BgTokiHikari_Draw(Actor* thisx, GlobalContext* globalCtx) { - BgTokiHikari* this = THIS; + BgTokiHikari* this = (BgTokiHikari*)thisx; switch (this->actor.params) { case 0: 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 6380f95948..2bdeb14661 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 @@ -9,8 +9,6 @@ #define FLAGS 0x00000010 -#define THIS ((BgTokiSwd*)thisx) - void BgTokiSwd_Init(Actor* thisx, GlobalContext* globalCtx); void BgTokiSwd_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgTokiSwd_Update(Actor* thisx, GlobalContext* globalCtx); @@ -68,7 +66,7 @@ void BgTokiSwd_SetupAction(BgTokiSwd* this, BgTokiSwdActionFunc actionFunc) { void BgTokiSwd_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BgTokiSwd* this = THIS; + BgTokiSwd* this = (BgTokiSwd*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); this->actor.shape.yOffset = 800.0f; @@ -89,7 +87,7 @@ void BgTokiSwd_Init(Actor* thisx, GlobalContext* globalCtx) { } void BgTokiSwd_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgTokiSwd* this = THIS; + BgTokiSwd* this = (BgTokiSwd*)thisx; Collider_DestroyCylinder(globalCtx, &this->collider); } @@ -154,7 +152,7 @@ void func_808BB128(BgTokiSwd* this, GlobalContext* globalCtx) { } void BgTokiSwd_Update(Actor* thisx, GlobalContext* globalCtx) { - BgTokiSwd* this = THIS; + BgTokiSwd* this = (BgTokiSwd*)thisx; this->actionFunc(this, globalCtx); CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->collider.base); @@ -162,7 +160,7 @@ void BgTokiSwd_Update(Actor* thisx, GlobalContext* globalCtx) { void BgTokiSwd_Draw(Actor* thisx, GlobalContext* globalCtx2) { GlobalContext* globalCtx = globalCtx2; - BgTokiSwd* this = THIS; + BgTokiSwd* this = (BgTokiSwd*)thisx; s32 pad[3]; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_toki_swd.c", 727); 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 55083f29f9..bacad09bcd 100644 --- a/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth.c +++ b/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth.c @@ -10,8 +10,6 @@ #define FLAGS 0x00000030 -#define THIS ((BgTreemouth*)thisx) - void BgTreemouth_Init(Actor* thisx, GlobalContext* globalCtx); void BgTreemouth_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgTreemouth_Update(Actor* thisx, GlobalContext* globalCtx); @@ -62,7 +60,7 @@ void BgTreemouth_SetupAction(BgTreemouth* this, BgTreemouthActionFunc actionFunc void BgTreemouth_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BgTreemouth* this = THIS; + BgTreemouth* this = (BgTreemouth*)thisx; CollisionHeader* colHeader = NULL; Actor_ProcessInitChain(thisx, sInitChain); @@ -86,7 +84,7 @@ void BgTreemouth_Init(Actor* thisx, GlobalContext* globalCtx) { } void BgTreemouth_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgTreemouth* this = THIS; + BgTreemouth* this = (BgTreemouth*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); } @@ -215,7 +213,7 @@ void BgTreemouth_DoNothing(BgTreemouth* this, GlobalContext* globalCtx) { } void BgTreemouth_Update(Actor* thisx, GlobalContext* globalCtx) { - BgTreemouth* this = THIS; + BgTreemouth* this = (BgTreemouth*)thisx; f32 unk_168; this->actionFunc(this, globalCtx); 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 10addd5dbe..52d8e74c93 100644 --- a/src/overlays/actors/ovl_Bg_Umajump/z_bg_umajump.c +++ b/src/overlays/actors/ovl_Bg_Umajump/z_bg_umajump.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000000 -#define THIS ((BgUmaJump*)thisx) - void BgUmaJump_Init(Actor* thisx, GlobalContext* globalCtx); void BgUmaJump_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgUmaJump_Update(Actor* thisx, GlobalContext* globalCtx); @@ -34,7 +32,7 @@ static InitChainEntry sInitChain[] = { void BgUmaJump_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BgUmaJump* this = THIS; + BgUmaJump* this = (BgUmaJump*)thisx; CollisionHeader* colHeader = NULL; Actor_ProcessInitChain(&this->dyna.actor, sInitChain); @@ -52,7 +50,7 @@ void BgUmaJump_Init(Actor* thisx, GlobalContext* globalCtx) { } void BgUmaJump_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgUmaJump* this = THIS; + BgUmaJump* this = (BgUmaJump*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); } 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 b7fa1fe32a..311fb45b78 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 @@ -10,8 +10,6 @@ #define FLAGS 0x00000000 -#define THIS ((BgVbSima*)thisx) - void BgVbSima_Init(Actor* thisx, GlobalContext* globalCtx); void BgVbSima_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgVbSima_Update(Actor* thisx, GlobalContext* globalCtx); @@ -35,7 +33,7 @@ static InitChainEntry sInitChain[] = { void BgVbSima_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BgVbSima* this = THIS; + BgVbSima* this = (BgVbSima*)thisx; CollisionHeader* colHeader = NULL; Actor_ProcessInitChain(&this->dyna.actor, sInitChain); @@ -46,7 +44,7 @@ void BgVbSima_Init(Actor* thisx, GlobalContext* globalCtx) { void BgVbSima_Destroy(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BgVbSima* this = THIS; + BgVbSima* this = (BgVbSima*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); } @@ -72,7 +70,7 @@ void BgVbSima_Update(Actor* thisx, GlobalContext* globalCtx) { static Color_RGBA8 colorYellow = { 255, 255, 0, 255 }; static Color_RGBA8 colorRed = { 255, 10, 0, 255 }; s32 pad; - BgVbSima* this = THIS; + BgVbSima* this = (BgVbSima*)thisx; BossFd* bossFd = (BossFd*)this->dyna.actor.parent; f32 minus1 = -1.0f; 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 b472c26410..a490ea2907 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 @@ -9,8 +9,6 @@ #define FLAGS 0x00000030 -#define THIS ((BgYdanHasi*)thisx) - void BgYdanHasi_Init(Actor* thisx, GlobalContext* globalCtx); void BgYdanHasi_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgYdanHasi_Update(Actor* thisx, GlobalContext* globalCtx); @@ -41,7 +39,7 @@ static InitChainEntry sInitChain[] = { void BgYdanHasi_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BgYdanHasi* this = THIS; + BgYdanHasi* this = (BgYdanHasi*)thisx; CollisionHeader* colHeader = NULL; WaterBox* waterBox; @@ -75,7 +73,7 @@ void BgYdanHasi_Init(Actor* thisx, GlobalContext* globalCtx) { } void BgYdanHasi_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgYdanHasi* this = THIS; + BgYdanHasi* this = (BgYdanHasi*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); } @@ -166,14 +164,14 @@ void BgYdanHasi_UpdateThreeBlocks(BgYdanHasi* this, GlobalContext* globalCtx) { } void BgYdanHasi_Update(Actor* thisx, GlobalContext* globalCtx) { - BgYdanHasi* this = THIS; + BgYdanHasi* this = (BgYdanHasi*)thisx; this->actionFunc(this, globalCtx); } void BgYdanHasi_Draw(Actor* thisx, GlobalContext* globalCtx) { static Gfx* dLists[] = { gDTSlidingPlatformDL, gDTWaterPlaneDL, gDTRisingPlatformsDL }; - BgYdanHasi* this = THIS; + BgYdanHasi* this = (BgYdanHasi*)thisx; if (this->dyna.actor.params == HASI_WATER_BLOCK || this->dyna.actor.params == HASI_THREE_BLOCKS) { Gfx_DrawDListOpa(globalCtx, dLists[this->dyna.actor.params]); 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 76c3dfc7a7..1754d0d1fd 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 @@ -9,8 +9,6 @@ #define FLAGS 0x00000000 -#define THIS ((BgYdanMaruta*)thisx) - void BgYdanMaruta_Init(Actor* thisx, GlobalContext* globalCtx); void BgYdanMaruta_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgYdanMaruta_Update(Actor* thisx, GlobalContext* globalCtx); @@ -78,7 +76,7 @@ static InitChainEntry sInitChain[] = { void BgYdanMaruta_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BgYdanMaruta* this = THIS; + BgYdanMaruta* this = (BgYdanMaruta*)thisx; Vec3f sp4C[3]; s32 i; f32 sinRotY; @@ -129,7 +127,7 @@ void BgYdanMaruta_Init(Actor* thisx, GlobalContext* globalCtx) { } void BgYdanMaruta_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgYdanMaruta* this = THIS; + BgYdanMaruta* this = (BgYdanMaruta*)thisx; Collider_DestroyTris(globalCtx, &this->collider); if (this->dyna.actor.params == 1) { @@ -195,13 +193,13 @@ void BgYdanMaruta_DoNothing(BgYdanMaruta* this, GlobalContext* globalCtx) { } void BgYdanMaruta_Update(Actor* thisx, GlobalContext* globalCtx) { - BgYdanMaruta* this = THIS; + BgYdanMaruta* this = (BgYdanMaruta*)thisx; this->actionFunc(this, globalCtx); } void BgYdanMaruta_Draw(Actor* thisx, GlobalContext* globalCtx) { - BgYdanMaruta* this = THIS; + BgYdanMaruta* this = (BgYdanMaruta*)thisx; if (this->dyna.actor.params == 0) { Gfx_DrawDListOpa(globalCtx, gDTRollingSpikeTrapDL); 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 0f9d56d77b..17afd08443 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 @@ -9,8 +9,6 @@ #define FLAGS 0x00000000 -#define THIS ((BgYdanSp*)thisx) - void BgYdanSp_Init(Actor* thisx, GlobalContext* globalCtx); void BgYdanSp_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgYdanSp_Update(Actor* thisx, GlobalContext* globalCtx); @@ -83,7 +81,7 @@ static InitChainEntry sInitChain[] = { }; void BgYdanSp_Init(Actor* thisx, GlobalContext* globalCtx) { - BgYdanSp* this = THIS; + BgYdanSp* this = (BgYdanSp*)thisx; ColliderTrisElementInit* ti0 = &sTrisItemsInit[0]; Vec3f tri[3]; s32 i; @@ -148,7 +146,7 @@ void BgYdanSp_Init(Actor* thisx, GlobalContext* globalCtx) { } void BgYdanSp_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgYdanSp* this = THIS; + BgYdanSp* this = (BgYdanSp*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); Collider_DestroyTris(globalCtx, &this->trisCollider); } @@ -415,13 +413,13 @@ void BgYdanSp_WallWebIdle(BgYdanSp* this, GlobalContext* globalCtx) { } void BgYdanSp_Update(Actor* thisx, GlobalContext* globalCtx) { - BgYdanSp* this = THIS; + BgYdanSp* this = (BgYdanSp*)thisx; this->actionFunc(this, globalCtx); } void BgYdanSp_Draw(Actor* thisx, GlobalContext* globalCtx) { - BgYdanSp* this = THIS; + BgYdanSp* this = (BgYdanSp*)thisx; s32 i; MtxF mtxF; 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 99e7236f89..ef76f4a8b9 100644 --- a/src/overlays/actors/ovl_Bg_Zg/z_bg_zg.c +++ b/src/overlays/actors/ovl_Bg_Zg/z_bg_zg.c @@ -10,8 +10,6 @@ #define FLAGS 0x00000010 -#define THIS ((BgZg*)thisx) - void BgZg_Init(Actor* thisx, GlobalContext* globalCtx); void BgZg_Destroy(Actor* thisx, GlobalContext* globalCtx); void BgZg_Update(Actor* thisx, GlobalContext* globalCtx); @@ -50,7 +48,7 @@ const ActorInit Bg_Zg_InitVars = { }; void BgZg_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BgZg* this = THIS; + BgZg* this = (BgZg*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); } @@ -87,7 +85,7 @@ void func_808C0D08(BgZg* this, GlobalContext* globalCtx) { } void BgZg_Update(Actor* thisx, GlobalContext* globalCtx) { - BgZg* this = THIS; + BgZg* this = (BgZg*)thisx; s32 action = this->action; if (((action < 0) || (1 < action)) || (sActionFuncs[action] == NULL)) { @@ -100,7 +98,7 @@ void BgZg_Update(Actor* thisx, GlobalContext* globalCtx) { void BgZg_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad[2]; - BgZg* this = THIS; + BgZg* this = (BgZg*)thisx; CollisionHeader* colHeader; Actor_ProcessInitChain(&this->dyna.actor, sInitChain); @@ -135,7 +133,7 @@ void func_808C0EEC(BgZg* this, GlobalContext* globalCtx) { } void BgZg_Draw(Actor* thisx, GlobalContext* globalCtx) { - BgZg* this = THIS; + BgZg* this = (BgZg*)thisx; s32 drawConfig = this->drawConfig; if (((drawConfig < 0) || (drawConfig > 0)) || sDrawFuncs[drawConfig] == NULL) { 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 de56e99c12..80bd2985ac 100644 --- a/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.c +++ b/src/overlays/actors/ovl_Boss_Dodongo/z_boss_dodongo.c @@ -5,8 +5,6 @@ #define FLAGS 0x00000035 -#define THIS ((BossDodongo*)thisx) - void BossDodongo_Init(Actor* thisx, GlobalContext* globalCtx); void BossDodongo_Destroy(Actor* thisx, GlobalContext* globalCtx); void BossDodongo_Update(Actor* thisx, GlobalContext* globalCtx); @@ -179,7 +177,7 @@ s32 BossDodongo_AteExplosive(BossDodongo* this, GlobalContext* globalCtx) { } void BossDodongo_Init(Actor* thisx, GlobalContext* globalCtx) { - BossDodongo* this = THIS; + BossDodongo* this = (BossDodongo*)thisx; s16 i; u16* temp_s1_3; u16* temp_s2; @@ -223,7 +221,7 @@ void BossDodongo_Init(Actor* thisx, GlobalContext* globalCtx) { } void BossDodongo_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BossDodongo* this = THIS; + BossDodongo* this = (BossDodongo*)thisx; SkelAnime_Free(&this->skelAnime, globalCtx); Collider_DestroyJntSph(globalCtx, &this->collider); @@ -817,7 +815,7 @@ void BossDodongo_Roll(BossDodongo* this, GlobalContext* globalCtx) { void BossDodongo_Update(Actor* thisx, GlobalContext* globalCtx2) { GlobalContext* globalCtx = globalCtx2; - BossDodongo* this = THIS; + BossDodongo* this = (BossDodongo*)thisx; f32 temp_f0; s16 i; Player* player = GET_PLAYER(globalCtx); @@ -1052,7 +1050,7 @@ s32 BossDodongo_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** void* thisx) { f32 mtxScaleY; f32 mtxScaleZ; - BossDodongo* this = THIS; + BossDodongo* this = (BossDodongo*)thisx; // required for matching if ((limbIndex == 6) || (limbIndex == 7)) { @@ -1103,7 +1101,7 @@ void BossDodongo_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dLi static Vec3f D_808CA474 = { 5000.0f, -2000.0f, 0.0f }; static Vec3f D_808CA480 = { 8000.0f, 0.0f, 0.0f }; static Vec3f D_808CA48C = { 8000.0f, 0.0f, 0.0f }; - BossDodongo* this = THIS; + BossDodongo* this = (BossDodongo*)thisx; if (limbIndex == 6) { Matrix_MultVec3f(&D_808CA45C, &this->vec); @@ -1119,7 +1117,7 @@ void BossDodongo_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dLi } void BossDodongo_Draw(Actor* thisx, GlobalContext* globalCtx) { - BossDodongo* this = THIS; + BossDodongo* this = (BossDodongo*)thisx; s32 pad; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_boss_dodongo.c", 3922); 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 c76ff94c27..4a092d4a2b 100644 --- a/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c +++ b/src/overlays/actors/ovl_Boss_Fd/z_boss_fd.c @@ -14,8 +14,6 @@ #define FLAGS 0x00000035 -#define THIS ((BossFd*)thisx) - typedef enum { /* 0 */ INTRO_FLY_EMERGE, /* 1 */ INTRO_FLY_HOLE, @@ -174,7 +172,7 @@ void BossFd_UpdateCamera(BossFd* this, GlobalContext* globalCtx) { void BossFd_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BossFd* this = THIS; + BossFd* this = (BossFd*)thisx; s16 i; Flags_SetSwitch(globalCtx, 0x14); @@ -230,7 +228,7 @@ void BossFd_Init(Actor* thisx, GlobalContext* globalCtx) { void BossFd_Destroy(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BossFd* this = THIS; + BossFd* this = (BossFd*)thisx; SkelAnime_Free(&this->skelAnimeHead, globalCtx); SkelAnime_Free(&this->skelAnimeRightArm, globalCtx); @@ -1301,7 +1299,7 @@ void BossFd_CollisionCheck(BossFd* this, GlobalContext* globalCtx) { void BossFd_Update(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BossFd* this = THIS; + BossFd* this = (BossFd*)thisx; f32 headGlow; f32 rManeGlow; f32 lManeGlow; @@ -1633,7 +1631,7 @@ void BossFd_DrawEffects(BossFdEffect* effect, GlobalContext* globalCtx) { void BossFd_Draw(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BossFd* this = THIS; + BossFd* this = (BossFd*)thisx; osSyncPrintf("FD DRAW START\n"); if (this->actionFunc != BossFd_Wait) { @@ -1655,7 +1653,7 @@ void BossFd_Draw(Actor* thisx, GlobalContext* globalCtx) { s32 BossFd_OverrideRightArmDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - BossFd* this = THIS; + BossFd* this = (BossFd*)thisx; switch (limbIndex) { case 1: @@ -1678,7 +1676,7 @@ s32 BossFd_OverrideRightArmDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** d s32 BossFd_OverrideLeftArmDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - BossFd* this = THIS; + BossFd* this = (BossFd*)thisx; switch (limbIndex) { case 1: @@ -1768,7 +1766,7 @@ void BossFd_DrawMane(GlobalContext* globalCtx, BossFd* this, Vec3f* manePos, Vec } s32 BossFd_OverrideHeadDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - BossFd* this = THIS; + BossFd* this = (BossFd*)thisx; switch (limbIndex) { case 5: @@ -1797,7 +1795,7 @@ s32 BossFd_OverrideHeadDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList void BossFd_PostHeadDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) { static Vec3f targetMod = { 4500.0f, 0.0f, 0.0f }; static Vec3f headMod = { 4000.0f, 0.0f, 0.0f }; - BossFd* this = THIS; + BossFd* this = (BossFd*)thisx; if (limbIndex == 5) { Matrix_MultVec3f(&targetMod, &this->actor.focus.pos); 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 4ee175edd8..6864425879 100644 --- a/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c +++ b/src/overlays/actors/ovl_Boss_Fd2/z_boss_fd2.c @@ -12,8 +12,6 @@ #define FLAGS 0x00000035 -#define THIS ((BossFd2*)thisx) - typedef enum { /* 0 */ DEATH_START, /* 1 */ DEATH_RETREAT, @@ -172,7 +170,7 @@ void BossFd2_SpawnDust(BossFdEffect* effect, Vec3f* position, Vec3f* velocity, V void BossFd2_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BossFd2* this = THIS; + BossFd2* this = (BossFd2*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); Actor_SetScale(&this->actor, 0.0069999993f); @@ -190,7 +188,7 @@ void BossFd2_Init(Actor* thisx, GlobalContext* globalCtx) { void BossFd2_Destroy(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BossFd2* this = THIS; + BossFd2* this = (BossFd2*)thisx; SkelAnime_Free(&this->skelAnime, globalCtx); Collider_DestroyJntSph(globalCtx, &this->collider); @@ -954,7 +952,7 @@ void BossFd2_UpdateFace(BossFd2* this, GlobalContext* globalCtx) { void BossFd2_Update(Actor* thisx, GlobalContext* globalCtx2) { GlobalContext* globalCtx = globalCtx2; - BossFd2* this = THIS; + BossFd2* this = (BossFd2*)thisx; s16 i; osSyncPrintf("FD2 move start \n"); @@ -1002,7 +1000,7 @@ void BossFd2_Update(Actor* thisx, GlobalContext* globalCtx2) { s32 BossFd2_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - BossFd2* this = THIS; + BossFd2* this = (BossFd2*)thisx; BossFd* bossFd = (BossFd*)this->actor.parent; if (limbIndex == 31) { @@ -1045,7 +1043,7 @@ void BossFd2_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, static Vec3f centerManeMod = { 4000.0f, -2900.0, 2000.0f }; static Vec3f rightManeMod = { 4000.0f, -1600.0, 0.0f }; static Vec3f leftManeMod = { 4000.0f, -1600.0, -2000.0f }; - BossFd2* this = THIS; + BossFd2* this = (BossFd2*)thisx; if (limbIndex == 35) { Matrix_MultVec3f(&targetMod, &this->actor.focus.pos); @@ -1191,7 +1189,7 @@ void BossFd2_DrawMane(BossFd2* this, GlobalContext* globalCtx) { void BossFd2_Draw(Actor* thisx, GlobalContext* globalCtx) { static void* eyeTextures[] = { gHoleVolvagiaEyeOpenTex, gHoleVolvagiaEyeHalfTex, gHoleVolvagiaEyeClosedTex }; s32 pad; - BossFd2* this = THIS; + BossFd2* this = (BossFd2*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_boss_fd2.c", 2617); osSyncPrintf("FD2 draw start \n"); 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 c4308afb12..43cb23ed08 100644 --- a/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c +++ b/src/overlays/actors/ovl_Boss_Ganon/z_boss_ganon.c @@ -11,8 +11,6 @@ #define FLAGS 0x00000035 -#define THIS ((BossGanon*)thisx) - void BossGanon_Init(Actor* thisx, GlobalContext* globalCtx); void BossGanon_Destroy(Actor* thisx, GlobalContext* globalCtx); void BossGanon_Update(Actor* thisx, GlobalContext* globalCtx); @@ -336,7 +334,7 @@ static InitChainEntry sInitChain[] = { void BossGanon_Init(Actor* thisx, GlobalContext* globalCtx2) { s16 i; GlobalContext* globalCtx = globalCtx2; - BossGanon* this = THIS; + BossGanon* this = (BossGanon*)thisx; s32 cond; f32 xDistFromPlayer; f32 yDistFromPlayer; @@ -461,7 +459,7 @@ void BossGanon_Init(Actor* thisx, GlobalContext* globalCtx2) { } void BossGanon_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BossGanon* this = THIS; + BossGanon* this = (BossGanon*)thisx; if ((this->actor.params < 0xC8) || (this->actor.params >= 0x104)) { Collider_DestroyCylinder(globalCtx, &this->collider); @@ -2767,7 +2765,7 @@ static f32 D_808E4D44[] = { }; void BossGanon_Update(Actor* thisx, GlobalContext* globalCtx2) { - BossGanon* this = THIS; + BossGanon* this = (BossGanon*)thisx; GlobalContext* globalCtx = globalCtx2; f32 legRotX; f32 legRotY; @@ -3193,7 +3191,7 @@ void BossGanon_Update(Actor* thisx, GlobalContext* globalCtx2) { s32 BossGanon_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - BossGanon* this = THIS; + BossGanon* this = (BossGanon*)thisx; switch (limbIndex) { case 10: @@ -3253,7 +3251,7 @@ void BossGanon_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList static Vec3f D_808E4DDC = { 1300.0f, 0.0f, 0.0f }; static Vec3f D_808E4DE8 = { 600.0f, 420.0f, 100.0f }; s8 bodyPart; - BossGanon* this = THIS; + BossGanon* this = (BossGanon*)thisx; bodyPart = bodyPartLimbMap[limbIndex]; if (bodyPart >= 0) { @@ -3784,7 +3782,7 @@ void BossGanon_DrawShadowTexture(void* tex, BossGanon* this, GlobalContext* glob void BossGanon_Draw(Actor* thisx, GlobalContext* globalCtx) { s32 i; - BossGanon* this = THIS; + BossGanon* this = (BossGanon*)thisx; void* shadowTex; shadowTex = Graph_Alloc(globalCtx->state.gfxCtx, 64 * 64); @@ -3864,7 +3862,7 @@ void BossGanon_LightBall_Update(Actor* thisx, GlobalContext* globalCtx2) { Vec3f spAC; Vec3f spA0; Vec3f sp94; - BossGanon* this = THIS; + BossGanon* this = (BossGanon*)thisx; GlobalContext* globalCtx = globalCtx2; f32 xDistFromLink; f32 yDistFromLink; @@ -4124,7 +4122,7 @@ void BossGanon_LightBall_Update(Actor* thisx, GlobalContext* globalCtx2) { } void BossGanon_LightBall_Draw(Actor* thisx, GlobalContext* globalCtx) { - BossGanon* this = THIS; + BossGanon* this = (BossGanon*)thisx; s16 i; f32 alpha; s32 pad; @@ -4174,7 +4172,7 @@ void BossGanon_LightBall_Draw(Actor* thisx, GlobalContext* globalCtx) { void func_808E1EB4(Actor* thisx, GlobalContext* globalCtx2) { s16 i; - BossGanon* this = THIS; + BossGanon* this = (BossGanon*)thisx; GlobalContext* globalCtx = globalCtx2; BossGanon* dorf = (BossGanon*)this->actor.parent; f32 xDiff; @@ -4271,7 +4269,7 @@ void func_808E1EB4(Actor* thisx, GlobalContext* globalCtx2) { } void func_808E229C(Actor* thisx, GlobalContext* globalCtx2) { - BossGanon* this = THIS; + BossGanon* this = (BossGanon*)thisx; GlobalContext* globalCtx = globalCtx2; s16 i; s32 temp; @@ -4308,7 +4306,7 @@ void func_808E2544(Actor* thisx, GlobalContext* globalCtx) { f32 sp84; s16 i; s16 sp80; - BossGanon* this = THIS; + BossGanon* this = (BossGanon*)thisx; BossGanon* dorf = (BossGanon*)this->actor.parent; s32 pad; Player* player = GET_PLAYER(globalCtx); @@ -4550,7 +4548,7 @@ static Gfx* sBigMagicLightStreakDLists[] = { }; void func_808E324C(Actor* thisx, GlobalContext* globalCtx) { - BossGanon* this = THIS; + BossGanon* this = (BossGanon*)thisx; Mtx* mtx; s16 i; s32 temp; 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 955e663132..164bb737c2 100644 --- a/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c +++ b/src/overlays/actors/ovl_Boss_Ganon2/z_boss_ganon2.c @@ -8,8 +8,6 @@ #define FLAGS 0x00000035 -#define THIS ((BossGanon2*)thisx) - void BossGanon2_Init(Actor* thisx, GlobalContext* globalCtx); void BossGanon2_Destroy(Actor* thisx, GlobalContext* globalCtx); void BossGanon2_Update(Actor* thisx, GlobalContext* globalCtx); @@ -130,7 +128,7 @@ void func_808FD27C(GlobalContext* globalCtx, Vec3f* position, Vec3f* velocity, f } void BossGanon2_Init(Actor* thisx, GlobalContext* globalCtx) { - BossGanon2* this = THIS; + BossGanon2* this = (BossGanon2*)thisx; s32 pad; s16 i; @@ -154,7 +152,7 @@ void BossGanon2_Init(Actor* thisx, GlobalContext* globalCtx) { } void BossGanon2_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BossGanon2* this = THIS; + BossGanon2* this = (BossGanon2*)thisx; SkelAnime_Free(&this->skelAnime, globalCtx); Collider_DestroyJntSph(globalCtx, &this->unk_424); @@ -1946,7 +1944,7 @@ void func_80902524(BossGanon2* this, GlobalContext* globalCtx) { } void BossGanon2_Update(Actor* thisx, GlobalContext* globalCtx) { - BossGanon2* this = THIS; + BossGanon2* this = (BossGanon2*)thisx; s32 pad; s16 i; f32 phi_f2; @@ -2501,7 +2499,7 @@ void func_8090464C(BossGanon2* this, GlobalContext* globalCtx) { s32 BossGanon2_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { s32 pad; - BossGanon2* this = THIS; + BossGanon2* this = (BossGanon2*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_boss_ganon2.c", 5355); @@ -2532,7 +2530,7 @@ s32 BossGanon2_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** d void BossGanon2_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) { s8 pad; s8 temp_v0; - BossGanon2* this = THIS; + BossGanon2* this = (BossGanon2*)thisx; Vec3f sp4C; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_boss_ganon2.c", 5459); @@ -2694,7 +2692,7 @@ void func_8090523C(BossGanon2* this, GlobalContext* globalCtx) { void BossGanon2_PostLimbDraw2(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) { s8 temp_v1 = D_80907144[limbIndex]; - BossGanon2* this = THIS; + BossGanon2* this = (BossGanon2*)thisx; if (temp_v1 >= 0) { Matrix_MultVec3f(&D_80906D60, &this->unk_234[temp_v1]); @@ -2741,7 +2739,7 @@ void func_80905674(BossGanon2* this, GlobalContext* globalCtx) { void BossGanon2_Draw(Actor* thisx, GlobalContext* globalCtx) { void* shadowTexture = Graph_Alloc(globalCtx->state.gfxCtx, 4096); - BossGanon2* this = THIS; + BossGanon2* this = (BossGanon2*)thisx; s16 i; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_boss_ganon2.c", 5840); 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 a36b8a3772..fc190e6b36 100644 --- a/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c +++ b/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c @@ -14,8 +14,6 @@ #define FLAGS 0x00000035 -#define THIS ((BossGanondrof*)thisx) - typedef enum { /* 0 */ NOT_DEAD, /* 1 */ DEATH_START, @@ -277,7 +275,7 @@ void BossGanondrof_SetColliderPos(Vec3f* pos, ColliderCylinder* collider) { void BossGanondrof_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BossGanondrof* this = THIS; + BossGanondrof* this = (BossGanondrof*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); ActorShape_Init(&this->actor.shape, 0.0f, NULL, 0.0f); @@ -313,7 +311,7 @@ void BossGanondrof_Init(Actor* thisx, GlobalContext* globalCtx) { void BossGanondrof_Destroy(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BossGanondrof* this = THIS; + BossGanondrof* this = (BossGanondrof*)thisx; osSyncPrintf("DT1\n"); SkelAnime_Free(&this->skelAnime, globalCtx); @@ -1293,7 +1291,7 @@ void BossGanondrof_Update(Actor* thisx, GlobalContext* globalCtx) { s32 pad2; s16 i; s32 pad; - BossGanondrof* this = THIS; + BossGanondrof* this = (BossGanondrof*)thisx; EnfHG* horse; osSyncPrintf("MOVE START %d\n", this->actor.params); @@ -1378,7 +1376,7 @@ void BossGanondrof_Update(Actor* thisx, GlobalContext* globalCtx) { s32 BossGanondrof_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - BossGanondrof* this = THIS; + BossGanondrof* this = (BossGanondrof*)thisx; switch (limbIndex) { case 15: @@ -1450,7 +1448,7 @@ void BossGanondrof_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** d static Vec3f zeroVec = { 0.0f, 0.0f, 0.0f }; static Vec3f spearVec = { 0.0f, 0.0f, 6000.0f }; - BossGanondrof* this = THIS; + BossGanondrof* this = (BossGanondrof*)thisx; if (limbIndex == 14) { Matrix_MultVec3f(&zeroVec, &this->targetPos); @@ -1485,7 +1483,7 @@ Gfx* BossGanondrof_GetNullDList(GraphicsContext* gfxCtx) { void BossGanondrof_Draw(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BossGanondrof* this = THIS; + BossGanondrof* this = (BossGanondrof*)thisx; EnfHG* horse; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_boss_ganondrof.c", 3716); 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 0005a75795..787759c0f8 100644 --- a/src/overlays/actors/ovl_Boss_Goma/z_boss_goma.c +++ b/src/overlays/actors/ovl_Boss_Goma/z_boss_goma.c @@ -6,8 +6,6 @@ #define FLAGS 0x00000035 -#define THIS ((BossGoma*)thisx) - // IRIS_FOLLOW: gohma looks towards the player (iris rotation) // BONUS_IFRAMES: gain invincibility frames when the player does something (throwing things?), or // randomly (see BossGoma_UpdateEye) @@ -340,7 +338,7 @@ static InitChainEntry sInitChain[] = { void BossGoma_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BossGoma* this = THIS; + BossGoma* this = (BossGoma*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); ActorShape_Init(&this->actor.shape, 4000.0f, ActorShadow_DrawCircle, 150.0f); @@ -386,7 +384,7 @@ void BossGoma_PlayEffectsAndSfx(BossGoma* this, GlobalContext* globalCtx, s16 ar } void BossGoma_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BossGoma* this = THIS; + BossGoma* this = (BossGoma*)thisx; SkelAnime_Free(&this->skelanime, globalCtx); Collider_DestroyJntSph(globalCtx, &this->collider); @@ -1899,7 +1897,7 @@ void BossGoma_UpdateEyeEnvColor(BossGoma* this) { } void BossGoma_Update(Actor* thisx, GlobalContext* globalCtx) { - BossGoma* this = THIS; + BossGoma* this = (BossGoma*)thisx; s32 pad; this->visualState = VISUALSTATE_DEFAULT; @@ -1954,7 +1952,7 @@ void BossGoma_Update(Actor* thisx, GlobalContext* globalCtx) { s32 BossGoma_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - BossGoma* this = THIS; + BossGoma* this = (BossGoma*)thisx; s32 doNotDrawLimb = false; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_boss_goma.c", 4685); @@ -2052,7 +2050,7 @@ void BossGoma_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f childPos; Vec3s childRot; EnGoma* babyGohma; - BossGoma* this = THIS; + BossGoma* this = (BossGoma*)thisx; s32 pad; MtxF mtx; @@ -2120,7 +2118,7 @@ Gfx* BossGoma_NoBackfaceCullingDlist(GraphicsContext* gfxCtx) { } void BossGoma_Draw(Actor* thisx, GlobalContext* globalCtx) { - BossGoma* this = THIS; + BossGoma* this = (BossGoma*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_boss_goma.c", 4991); 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 2fb9ce84da..685a29029d 100644 --- a/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c +++ b/src/overlays/actors/ovl_Boss_Mo/z_boss_mo.c @@ -12,8 +12,6 @@ #define FLAGS 0x00000035 -#define THIS ((BossMo*)thisx) - #define MO_WATER_LEVEL(globalCtx) globalCtx->colCtx.colHeader->waterBoxes[0].ySurface #define HAS_LINK(tent) \ @@ -326,7 +324,7 @@ static f32 sDropletWidth[41] = { void BossMo_Init(Actor* thisx, GlobalContext* globalCtx2) { GlobalContext* globalCtx = globalCtx2; - BossMo* this = THIS; + BossMo* this = (BossMo*)thisx; u16 i; Actor_ProcessInitChain(&this->actor, sInitChain); @@ -391,7 +389,7 @@ void BossMo_Init(Actor* thisx, GlobalContext* globalCtx2) { void BossMo_Destroy(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BossMo* this = THIS; + BossMo* this = (BossMo*)thisx; if (this->actor.params >= BOSSMO_TENTACLE) { Collider_DestroyJntSph(globalCtx, &this->tentCollider); @@ -2204,7 +2202,7 @@ void BossMo_Core(BossMo* this, GlobalContext* globalCtx) { void BossMo_UpdateCore(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BossMo* this = THIS; + BossMo* this = (BossMo*)thisx; s16 i; Player* player = GET_PLAYER(globalCtx); @@ -2252,7 +2250,7 @@ void BossMo_UpdateTent(Actor* thisx, GlobalContext* globalCtx) { s16 i; s16 index; s32 pad; - BossMo* this = THIS; + BossMo* this = (BossMo*)thisx; Player* player = GET_PLAYER(globalCtx); f32 phi_f0; @@ -2590,7 +2588,7 @@ void BossMo_DrawWater(BossMo* this, GlobalContext* globalCtx) { void BossMo_DrawCore(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BossMo* this = THIS; + BossMo* this = (BossMo*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_boss_mo.c", 6688); if (this->actor.world.pos.y > MO_WATER_LEVEL(globalCtx)) { @@ -2718,7 +2716,7 @@ void BossMo_DrawCore(Actor* thisx, GlobalContext* globalCtx) { void BossMo_DrawTent(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BossMo* this = THIS; + BossMo* this = (BossMo*)thisx; u16 scroll; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_boss_mo.c", 6958); 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 8b8848bc4b..1c0ea7034d 100644 --- a/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c +++ b/src/overlays/actors/ovl_Boss_Sst/z_boss_sst.c @@ -12,8 +12,6 @@ #define FLAGS 0x00000435 -#define THIS ((BossSst*)thisx) - #define vParity actionVar #define vVanish actionVar @@ -267,7 +265,7 @@ static InitChainEntry sInitChain[] = { void BossSst_Init(Actor* thisx, GlobalContext* globalCtx2) { GlobalContext* globalCtx = globalCtx2; - BossSst* this = THIS; + BossSst* this = (BossSst*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); Collider_InitCylinder(globalCtx, &this->colliderCyl); @@ -338,7 +336,7 @@ void BossSst_Init(Actor* thisx, GlobalContext* globalCtx2) { void BossSst_Destroy(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BossSst* this = THIS; + BossSst* this = (BossSst*)thisx; Collider_DestroyJntSph(globalCtx, &this->colliderJntSph); Collider_DestroyCylinder(globalCtx, &this->colliderCyl); @@ -2570,7 +2568,7 @@ void BossSst_HeadCollisionCheck(BossSst* this, GlobalContext* globalCtx) { void BossSst_UpdateHand(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BossSst* this = THIS; + BossSst* this = (BossSst*)thisx; BossSstHandTrail* trail; if (this->colliderCyl.base.atFlags & AT_ON) { @@ -2625,7 +2623,7 @@ void BossSst_UpdateHand(Actor* thisx, GlobalContext* globalCtx) { void BossSst_UpdateHead(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BossSst* this = THIS; + BossSst* this = (BossSst*)thisx; func_8002DBD0(&this->actor, &sHandOffsets[RIGHT], &sHands[RIGHT]->actor.world.pos); func_8002DBD0(&this->actor, &sHandOffsets[LEFT], &sHands[LEFT]->actor.world.pos); @@ -2677,7 +2675,7 @@ void BossSst_UpdateHead(Actor* thisx, GlobalContext* globalCtx) { s32 BossSst_OverrideHandDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - BossSst* this = THIS; + BossSst* this = (BossSst*)thisx; if (limbIndex == 1) { pos->z += this->handZPosMod; @@ -2687,7 +2685,7 @@ s32 BossSst_OverrideHandDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dLis } void BossSst_PostHandDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) { - BossSst* this = THIS; + BossSst* this = (BossSst*)thisx; Collider_UpdateSpheres(limbIndex, &this->colliderJntSph); } @@ -2704,7 +2702,7 @@ s32 BossSst_OverrideHandTrailDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** } void BossSst_DrawHand(Actor* thisx, GlobalContext* globalCtx) { - BossSst* this = THIS; + BossSst* this = (BossSst*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_boss_sst.c", 6563); @@ -2762,7 +2760,7 @@ void BossSst_DrawHand(Actor* thisx, GlobalContext* globalCtx) { s32 BossSst_OverrideHeadDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx, Gfx** gfx) { - BossSst* this = THIS; + BossSst* this = (BossSst*)thisx; s32 shakeAmp; s32 pad; s32 timer12; @@ -2839,7 +2837,7 @@ s32 BossSst_OverrideHeadDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dLis void BossSst_PostHeadDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx, Gfx** gfx) { static Vec3f zeroVec = { 0.0f, 0.0f, 0.0f }; static Vec3f headVec = { 1000.0f, 0.0f, 0.0f }; - BossSst* this = THIS; + BossSst* this = (BossSst*)thisx; Vec3f headPos; if (limbIndex == 8) { @@ -2855,7 +2853,7 @@ void BossSst_PostHeadDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, void BossSst_DrawHead(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BossSst* this = THIS; + BossSst* this = (BossSst*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_boss_sst.c", 6810); @@ -3085,7 +3083,7 @@ void BossSst_IceShatter(BossSst* this) { } void BossSst_UpdateEffect(Actor* thisx, GlobalContext* globalCtx) { - BossSst* this = THIS; + BossSst* this = (BossSst*)thisx; BossSstEffect* effect; s32 i; @@ -3147,7 +3145,7 @@ void BossSst_UpdateEffect(Actor* thisx, GlobalContext* globalCtx) { void BossSst_DrawEffect(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - BossSst* this = THIS; + BossSst* this = (BossSst*)thisx; s32 i; BossSstEffect* effect; 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 a73192e490..4070a95c56 100644 --- a/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c +++ b/src/overlays/actors/ovl_Boss_Tw/z_boss_tw.c @@ -5,8 +5,6 @@ #define FLAGS 0x00000035 -#define THIS ((BossTw*)thisx) - typedef enum { /* 0 */ TWEFF_NONE, /* 1 */ TWEFF_DOT, @@ -447,7 +445,7 @@ void BossTw_AddShieldHitEffect(GlobalContext* globalCtx, f32 arg1, s16 arg2) { void BossTw_Init(Actor* thisx, GlobalContext* globalCtx2) { GlobalContext* globalCtx = globalCtx2; - BossTw* this = THIS; + BossTw* this = (BossTw*)thisx; s16 i; Actor_ProcessInitChain(&this->actor, sInitChain); @@ -593,7 +591,7 @@ void BossTw_Init(Actor* thisx, GlobalContext* globalCtx2) { } void BossTw_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BossTw* this = THIS; + BossTw* this = (BossTw*)thisx; Collider_DestroyCylinder(globalCtx, &this->collider); if (thisx->params < TW_FIRE_BLAST) { @@ -2847,7 +2845,7 @@ static s16 D_8094A90C[] = { }; void BossTw_Update(Actor* thisx, GlobalContext* globalCtx) { - BossTw* this = THIS; + BossTw* this = (BossTw*)thisx; Player* player = GET_PLAYER(globalCtx); s16 i; s32 pad; @@ -2973,7 +2971,7 @@ void BossTw_Update(Actor* thisx, GlobalContext* globalCtx) { void BossTw_TwinrovaUpdate(Actor* thisx, GlobalContext* globalCtx2) { s16 i; GlobalContext* globalCtx = globalCtx2; - BossTw* this = THIS; + BossTw* this = (BossTw*)thisx; Player* player = GET_PLAYER(globalCtx); this->actor.flags &= ~0x400; @@ -3181,7 +3179,7 @@ void BossTw_TwinrovaUpdate(Actor* thisx, GlobalContext* globalCtx2) { } s32 BossTw_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - BossTw* this = THIS; + BossTw* this = (BossTw*)thisx; if (limbIndex == 21) { if (this->unk_5F8 == 0) { @@ -3215,7 +3213,7 @@ void BossTw_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, V { 0.0f, 0.0f, -10000.0f }, { 0.0f, 0.0f, -8000.0f }, { 0.0f, 0.0f, -9000.0f }, { 0.0f, 0.0f, -11000.0f }, { 0.0f, 0.0f, -12000.0f }, }; - BossTw* this = THIS; + BossTw* this = (BossTw*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_boss_tw.c", 6168); @@ -3409,7 +3407,7 @@ void func_809426F0(BossTw* this, GlobalContext* globalCtx) { } void func_80942C70(Actor* thisx, GlobalContext* globalCtx) { - BossTw* this = THIS; + BossTw* this = (BossTw*)thisx; s16 alpha; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_boss_tw.c", 6765); @@ -3457,7 +3455,7 @@ void func_80942C70(Actor* thisx, GlobalContext* globalCtx) { } void func_80943028(Actor* thisx, GlobalContext* globalCtx) { - BossTw* this = THIS; + BossTw* this = (BossTw*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_boss_tw.c", 6885); @@ -3490,7 +3488,7 @@ static void* sEyeTextures[] = { void BossTw_Draw(Actor* thisx, GlobalContext* globalCtx2) { static Vec3f D_8094A9A4 = { 0.0f, 200.0f, 2000.0f }; GlobalContext* globalCtx = globalCtx2; - BossTw* this = THIS; + BossTw* this = (BossTw*)thisx; Player* player = GET_PLAYER(globalCtx); OPEN_DISPS(globalCtx->state.gfxCtx, "../z_boss_tw.c", 6947); @@ -3576,7 +3574,7 @@ void* D_8094A9B0[] = { s32 BossTw_TwinrovaOverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - BossTw* this = THIS; + BossTw* this = (BossTw*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_boss_tw.c", 7139); @@ -3643,7 +3641,7 @@ void BossTw_TwinrovaPostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** static Vec3f D_8094A9D4 = { 13000.0f, 0.0f, 0.0f }; static Vec3f D_8094A9E0 = { 13000.0f, 0.0f, 0.0f }; - BossTw* this = THIS; + BossTw* this = (BossTw*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_boss_tw.c", 7262); @@ -3870,7 +3868,7 @@ void func_80944C50(BossTw* this, GlobalContext* globalCtx) { void BossTw_TwinrovaDraw(Actor* thisx, GlobalContext* globalCtx2) { static Vec3f D_8094A9EC = { 0.0f, 200.0f, 2000.0f }; GlobalContext* globalCtx = globalCtx2; - BossTw* this = THIS; + BossTw* this = (BossTw*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_boss_tw.c", 7748); @@ -4395,7 +4393,7 @@ s32 BossTw_BlastShieldCheck(BossTw* this, GlobalContext* globalCtx) { } void BossTw_BlastUpdate(Actor* thisx, GlobalContext* globalCtx) { - BossTw* this = THIS; + BossTw* this = (BossTw*)thisx; ColliderCylinder* collider; s16 i; @@ -4439,7 +4437,7 @@ void BossTw_BlastUpdate(Actor* thisx, GlobalContext* globalCtx) { void BossTw_BlastDraw(Actor* thisx, GlobalContext* globalCtx2) { GlobalContext* globalCtx = globalCtx2; - BossTw* this = THIS; + BossTw* this = (BossTw*)thisx; f32 scaleFactor; s16 tailIdx; s16 i; @@ -4503,7 +4501,7 @@ void BossTw_BlastDraw(Actor* thisx, GlobalContext* globalCtx2) { void BossTw_DrawDeathBall(Actor* thisx, GlobalContext* globalCtx2) { GlobalContext* globalCtx = globalCtx2; - BossTw* this = THIS; + BossTw* this = (BossTw*)thisx; f32 scaleFactor; s16 tailIdx; s16 i; 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 0b9d59d921..3ec74786e2 100644 --- a/src/overlays/actors/ovl_Boss_Va/z_boss_va.c +++ b/src/overlays/actors/ovl_Boss_Va/z_boss_va.c @@ -11,7 +11,6 @@ #define FLAGS 0x00000035 -#define THIS ((BossVa*)thisx) #define GET_BODY(this) ((BossVa*)(this)->actor.parent) #define vaGorePulse offset.x #define vaGorePulseRate offset.y @@ -577,7 +576,7 @@ void BossVa_KillBari(BossVa* this, GlobalContext* globalCtx) { void BossVa_Init(Actor* thisx, GlobalContext* globalCtx2) { GlobalContext* globalCtx = globalCtx2; - BossVa* this = THIS; + BossVa* this = (BossVa*)thisx; s32 i; s16 warpId; @@ -746,7 +745,7 @@ void BossVa_Init(Actor* thisx, GlobalContext* globalCtx2) { } void BossVa_Destroy(Actor* thisx, GlobalContext* globalCtx) { - BossVa* this = THIS; + BossVa* this = (BossVa*)thisx; SkelAnime_Free(&this->skelAnime, globalCtx); Collider_DestroyJntSph(globalCtx, &this->colliderSph); @@ -2801,7 +2800,7 @@ void BossVa_Door(BossVa* this, GlobalContext* globalCtx) { void BossVa_Update(Actor* thisx, GlobalContext* globalCtx2) { GlobalContext* globalCtx = globalCtx2; - BossVa* this = THIS; + BossVa* this = (BossVa*)thisx; EnBoom* boomerang; s32 i; @@ -2865,7 +2864,7 @@ void BossVa_Update(Actor* thisx, GlobalContext* globalCtx2) { s32 BossVa_BodyOverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - BossVa* this = THIS; + BossVa* this = (BossVa*)thisx; s32 pad; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_boss_va.c", 4156); @@ -2893,7 +2892,7 @@ s32 BossVa_BodyOverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** d } void BossVa_BodyPostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) { - BossVa* this = THIS; + BossVa* this = (BossVa*)thisx; Vec3f sp78 = { 0.0f, 0.0f, 0.0f }; s32 pad; @@ -2965,7 +2964,7 @@ void BossVa_BodyPostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dLis s32 BossVa_SupportOverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - BossVa* this = THIS; + BossVa* this = (BossVa*)thisx; if (!this->onCeiling && (limbIndex == 4)) { rot->z += this->headRot.x; @@ -2974,7 +2973,7 @@ s32 BossVa_SupportOverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx* } void BossVa_SupportPostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) { - BossVa* this = THIS; + BossVa* this = (BossVa*)thisx; Vec3f sp20 = { 0.0f, 0.0f, 0.0f }; s32 pad; @@ -3019,7 +3018,7 @@ void BossVa_SupportPostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** d s32 BossVa_ZapperOverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - BossVa* this = THIS; + BossVa* this = (BossVa*)thisx; MtxF zapperMtx; switch (limbIndex) { @@ -3048,7 +3047,7 @@ s32 BossVa_ZapperOverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** } void BossVa_ZapperPostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) { - BossVa* this = THIS; + BossVa* this = (BossVa*)thisx; Vec3f sp70 = { 0.0f, 0.0f, 0.0f }; Vec3f sp64 = { 15.0f, 0.0f, 0.0f }; Vec3f sp58 = { -15.0f, 0.0f, 0.0f }; @@ -3132,7 +3131,7 @@ void BossVa_ZapperPostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dL s32 BossVa_BariOverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - BossVa* this = THIS; + BossVa* this = (BossVa*)thisx; switch (limbIndex) { case 2: @@ -3149,7 +3148,7 @@ s32 BossVa_BariOverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** d } void BossVa_BariPostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) { - BossVa* this = THIS; + BossVa* this = (BossVa*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_boss_va.c", 4494); @@ -3171,7 +3170,7 @@ void BossVa_BariPostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dLis void BossVa_Draw(Actor* thisx, GlobalContext* globalCtx) { s16* paramsPtr; // This stack slot is almost certainly actually globalCtx2, but can't make it match - BossVa* this = THIS; + BossVa* this = (BossVa*)thisx; Vec3f spBC; Vec3f spB0 = { 0.0f, 45.0f, 0.0f }; Vec3f spA4 = { 0.4f, 0.4f, 0.4f }; 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 ddf8e3998a..adaa8bff73 100644 --- a/src/overlays/actors/ovl_Demo_6K/z_demo_6k.c +++ b/src/overlays/actors/ovl_Demo_6K/z_demo_6k.c @@ -13,8 +13,6 @@ #define FLAGS 0x00000010 -#define THIS ((Demo6K*)thisx) - void Demo6K_Init(Actor* thisx, GlobalContext* globalCtx); void Demo6K_Destroy(Actor* thisx, GlobalContext* globalCtx); void Demo6K_Update(Actor* thisx, GlobalContext* globalCtx); @@ -68,7 +66,7 @@ void Demo6K_SetupAction(Demo6K* this, Demo6KActionFunc actionFunc) { } void Demo6K_Init(Actor* thisx, GlobalContext* globalCtx) { - Demo6K* this = THIS; + Demo6K* this = (Demo6K*)thisx; s32 pad; s32 params = this->actor.params; s32 objBankIndex; @@ -194,7 +192,7 @@ void Demo6K_Init(Actor* thisx, GlobalContext* globalCtx) { } void Demo6K_Destroy(Actor* thisx, GlobalContext* globalCtx) { - Demo6K* this = THIS; + Demo6K* this = (Demo6K*)thisx; LightContext_RemoveLight(globalCtx, &globalCtx->lightCtx, this->lightNode); } @@ -553,13 +551,13 @@ void func_80967F10(Demo6K* this, GlobalContext* globalCtx) { } void Demo6K_Update(Actor* thisx, GlobalContext* globalCtx) { - Demo6K* this = THIS; + Demo6K* this = (Demo6K*)thisx; this->actionFunc(this, globalCtx); } void func_80967FFC(Actor* thisx, GlobalContext* globalCtx) { - Demo6K* this = THIS; + Demo6K* this = (Demo6K*)thisx; s32 pad; u16 timer1 = this->timer1; @@ -601,7 +599,7 @@ void func_80967FFC(Actor* thisx, GlobalContext* globalCtx) { void func_80968298(Actor* thisx, GlobalContext* globalCtx) { static u8 skipIndices[] = { 6, 7, 11, 16, 20, 24, 28, 33, 35, 41, 45, 50, 57, 58, 62, 255 }; - Demo6K* this = THIS; + Demo6K* this = (Demo6K*)thisx; s32 pad; u32 timer1 = this->timer1; f32 scale = this->unk_164 * this->unk_168; @@ -650,7 +648,7 @@ void func_80968298(Actor* thisx, GlobalContext* globalCtx) { } void func_8096865C(Actor* thisx, GlobalContext* globalCtx) { - Demo6K* this = THIS; + Demo6K* this = (Demo6K*)thisx; s32 pad; Gfx* displayList; @@ -684,7 +682,7 @@ void func_8096865C(Actor* thisx, GlobalContext* globalCtx) { } void func_809688C4(Actor* thisx, GlobalContext* globalCtx2) { - Demo6K* this = THIS; + Demo6K* this = (Demo6K*)thisx; GlobalContext* globalCtx = globalCtx2; u32 frames = globalCtx->state.frames; s32 i; @@ -721,7 +719,7 @@ void func_809688C4(Actor* thisx, GlobalContext* globalCtx2) { void func_80968B70(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - Demo6K* this = THIS; + Demo6K* this = (Demo6K*)thisx; u32 timer2 = this->timer2; u8 primColor[4]; u8 envColor[3]; @@ -770,7 +768,7 @@ void func_80968B70(Actor* thisx, GlobalContext* globalCtx) { void func_80968FB0(Actor* thisx, GlobalContext* globalCtx) { static u8 D_809693CC[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 6, 5, 4, 3, 2, 1 }; - Demo6K* this = THIS; + Demo6K* this = (Demo6K*)thisx; Gfx* displayList = Graph_Alloc(globalCtx->state.gfxCtx, 4 * sizeof(Gfx)); u16 frames = globalCtx->gameplayFrames; f32 scaleFactor; 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 e06667aafb..fff44c57fe 100644 --- a/src/overlays/actors/ovl_Demo_Du/z_demo_du.c +++ b/src/overlays/actors/ovl_Demo_Du/z_demo_du.c @@ -6,8 +6,6 @@ #define FLAGS 0x00000010 -#define THIS ((DemoDu*)thisx) - typedef void (*DemoDuActionFunc)(DemoDu*, GlobalContext*); typedef void (*DemoDuDrawFunc)(Actor*, GlobalContext*); @@ -41,7 +39,7 @@ static void* sMouthTextures[] = { gDaruniaMouthSeriousTex, gDaruniaMouthGrinning #define CS_CREDITS_SUBSCENE(x) (24 + (x)) // DEMO_DU_CS_CREDITS void DemoDu_Destroy(Actor* thisx, GlobalContext* globalCtx) { - DemoDu* this = THIS; + DemoDu* this = (DemoDu*)thisx; SkelAnime_Free(&this->skelAnime, globalCtx); } @@ -798,7 +796,7 @@ void DemoDu_UpdateCs_AG_02(DemoDu* this, GlobalContext* globalCtx) { // Similar to DemoDu_Draw_01, but this uses POLY_XLU_DISP. Also uses this->shadowAlpha for setting the env color. void DemoDu_Draw_02(Actor* thisx, GlobalContext* globalCtx2) { GlobalContext* globalCtx = globalCtx2; - DemoDu* this = THIS; + DemoDu* this = (DemoDu*)thisx; s16 eyeTexIndex = this->eyeTexIndex; void* eyeTexture = sEyeTextures[eyeTexIndex]; s32 pad; @@ -954,7 +952,7 @@ static DemoDuActionFunc sUpdateFuncs[] = { }; void DemoDu_Update(Actor* thisx, GlobalContext* globalCtx) { - DemoDu* this = THIS; + DemoDu* this = (DemoDu*)thisx; if (this->updateIndex < 0 || this->updateIndex >= 29 || sUpdateFuncs[this->updateIndex] == NULL) { // "The main mode is abnormal!!!!!!!!!!!!!!!!!!!!!!!!!" @@ -965,7 +963,7 @@ void DemoDu_Update(Actor* thisx, GlobalContext* globalCtx) { } void DemoDu_Init(Actor* thisx, GlobalContext* globalCtx) { - DemoDu* this = THIS; + DemoDu* this = (DemoDu*)thisx; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f); switch (this->actor.params) { @@ -993,7 +991,7 @@ void DemoDu_Draw_NoDraw(Actor* thisx, GlobalContext* globalCtx2) { // Similar to DemoDu_Draw_02, but this uses POLY_OPA_DISP. Sets the env color to 255. void DemoDu_Draw_01(Actor* thisx, GlobalContext* globalCtx2) { GlobalContext* globalCtx = globalCtx2; - DemoDu* this = THIS; + DemoDu* this = (DemoDu*)thisx; s16 eyeTexIndex = this->eyeTexIndex; void* eyeTexture = sEyeTextures[eyeTexIndex]; s32 pad; @@ -1026,7 +1024,7 @@ static DemoDuDrawFunc sDrawFuncs[] = { }; void DemoDu_Draw(Actor* thisx, GlobalContext* globalCtx) { - DemoDu* this = THIS; + DemoDu* this = (DemoDu*)thisx; if (this->drawIndex < 0 || this->drawIndex >= 3 || sDrawFuncs[this->drawIndex] == NULL) { // "The drawing mode is abnormal!!!!!!!!!!!!!!!!!!!!!!!!!" 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 030abcf2f1..1a7d7fd72b 100644 --- a/src/overlays/actors/ovl_Demo_Ec/z_demo_ec.c +++ b/src/overlays/actors/ovl_Demo_Ec/z_demo_ec.c @@ -39,8 +39,6 @@ #define FLAGS 0x00000010 -#define THIS ((DemoEc*)thisx) - void DemoEc_Init(Actor* thisx, GlobalContext* globalCtx); void DemoEc_Destroy(Actor* thisx, GlobalContext* globalCtx); void DemoEc_Update(Actor* thisx, GlobalContext* globalCtx); @@ -154,13 +152,13 @@ extern FlexSkeletonHeader object_bji_Skel_0000F0; extern FlexSkeletonHeader object_ahg_Skel_0000F0; void DemoEc_Destroy(Actor* thisx, GlobalContext* globalCtx) { - DemoEc* this = THIS; + DemoEc* this = (DemoEc*)thisx; SkelAnime_Free(&this->skelAnime, globalCtx); } void DemoEc_Init(Actor* thisx, GlobalContext* globalCtx) { - DemoEc* this = THIS; + DemoEc* this = (DemoEc*)thisx; if ((this->actor.params < 0) || (this->actor.params > 34)) { osSyncPrintf(VT_FGCOL(RED) "Demo_Ec_Actor_ct:arg_dataがおかしい!!!!!!!!!!!!\n" VT_RST); @@ -643,7 +641,7 @@ void DemoEc_UpdateCarpenter(DemoEc* this, GlobalContext* globalCtx) { s32 DemoEc_CarpenterOverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx, Gfx** gfx) { - DemoEc* this = THIS; + DemoEc* this = (DemoEc*)thisx; if (limbIndex == 1) { gDPPipeSync((*gfx)++); @@ -684,7 +682,7 @@ Gfx* DemoEc_GetCarpenterPostLimbDList(DemoEc* this) { void DemoEc_CarpenterPostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx, Gfx** gfx) { - DemoEc* this = THIS; + DemoEc* this = (DemoEc*)thisx; Gfx* postLimbDList; if (limbIndex == 15) { @@ -731,7 +729,7 @@ Gfx* DemoEc_GetGerudoPostLimbDList(DemoEc* this) { void DemoEc_GerudoPostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx, Gfx** gfx) { - DemoEc* this = THIS; + DemoEc* this = (DemoEc*)thisx; Gfx* postLimbDList; if (limbIndex == 15) { @@ -1050,7 +1048,7 @@ void DemoEc_UpdateFishingOwner(DemoEc* this, GlobalContext* globalCtx) { void DemoEc_FishingOwnerPostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx, Gfx** gfx) { - DemoEc* this = THIS; + DemoEc* this = (DemoEc*)thisx; if ((limbIndex == 8) && !(HIGH_SCORE(HS_FISHING) & 0x1000)) { gSPDisplayList((*gfx)++, SEGMENTED_TO_VIRTUAL(gFishingOwnerHatDL)); @@ -1289,7 +1287,7 @@ static DemoEcUpdateFunc sUpdateFuncs[] = { }; void DemoEc_Update(Actor* thisx, GlobalContext* globalCtx) { - DemoEc* this = THIS; + DemoEc* this = (DemoEc*)thisx; s32 updateMode = this->updateMode; if ((updateMode < 0) || (updateMode >= ARRAY_COUNT(sUpdateFuncs)) || sUpdateFuncs[updateMode] == NULL) { @@ -1322,7 +1320,7 @@ static DemoEcDrawFunc sDrawFuncs[] = { }; void DemoEc_Draw(Actor* thisx, GlobalContext* globalCtx) { - DemoEc* this = THIS; + DemoEc* this = (DemoEc*)thisx; s32 drawConfig = this->drawConfig; if ((drawConfig < 0) || (drawConfig >= ARRAY_COUNT(sDrawFuncs)) || sDrawFuncs[drawConfig] == NULL) { 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 f9d8a882a3..10c7128c06 100644 --- a/src/overlays/actors/ovl_Demo_Effect/z_demo_effect.c +++ b/src/overlays/actors/ovl_Demo_Effect/z_demo_effect.c @@ -12,8 +12,6 @@ #define FLAGS 0x00000030 -#define THIS ((DemoEffect*)thisx) - void DemoEffect_Init(Actor* thisx, GlobalContext* globalCtx); void DemoEffect_Destroy(Actor* thisx, GlobalContext* globalCtx); void DemoEffect_Update(Actor* thisx, GlobalContext* globalCtx); @@ -178,7 +176,7 @@ void DemoEffect_InitGetItem(DemoEffect* this) { */ void DemoEffect_Init(Actor* thisx, GlobalContext* globalCtx2) { GlobalContext* globalCtx = globalCtx2; - DemoEffect* this = THIS; + DemoEffect* this = (DemoEffect*)thisx; s32 effectType; s32 lightEffect; s32 objectIndex; @@ -519,7 +517,7 @@ void DemoEffect_Init(Actor* thisx, GlobalContext* globalCtx2) { * Main Actor Destroy function */ void DemoEffect_Destroy(Actor* thisx, GlobalContext* globalCtx) { - DemoEffect* this = THIS; + DemoEffect* this = (DemoEffect*)thisx; s32 effectType = (this->actor.params & 0x00FF); if (effectType == DEMO_EFFECT_TIMEWARP_MASTERSWORD || effectType == DEMO_EFFECT_TIMEWARP_TIMEBLOCK_LARGE || @@ -1646,7 +1644,7 @@ void DemoEffect_UpdateDust(DemoEffect* this, GlobalContext* globalCtx) { * This is the main Actor Update Function. */ void DemoEffect_Update(Actor* thisx, GlobalContext* globalCtx) { - DemoEffect* this = THIS; + DemoEffect* this = (DemoEffect*)thisx; this->updateFunc(this, globalCtx); } @@ -1666,7 +1664,7 @@ s32 DemoEffect_CheckCsAction(DemoEffect* this, GlobalContext* globalCtx, s32 csA * Draw function for the Jewel Actor. */ void DemoEffect_DrawJewel(Actor* thisx, GlobalContext* globalCtx2) { - DemoEffect* this = THIS; + DemoEffect* this = (DemoEffect*)thisx; GlobalContext* globalCtx = globalCtx2; u32 frames = this->jewel.timer; @@ -1728,7 +1726,7 @@ void DemoEffect_DrawJewel(Actor* thisx, GlobalContext* globalCtx2) { * Draw function for the Crystal Light Actor. */ void DemoEffect_DrawCrystalLight(Actor* thisx, GlobalContext* globalCtx) { - DemoEffect* this = THIS; + DemoEffect* this = (DemoEffect*)thisx; DemoEffect* parent = (DemoEffect*)this->actor.parent; u32 frames = globalCtx->gameplayFrames & 0xFFFF; @@ -1776,7 +1774,7 @@ void DemoEffect_DrawCrystalLight(Actor* thisx, GlobalContext* globalCtx) { * Draw function for the Fire Ball Actor. */ void DemoEffect_DrawFireBall(Actor* thisx, GlobalContext* globalCtx) { - DemoEffect* this = THIS; + DemoEffect* this = (DemoEffect*)thisx; u32 frames = globalCtx->gameplayFrames; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_demo_effect.c", 2701); @@ -1798,7 +1796,7 @@ void DemoEffect_DrawFireBall(Actor* thisx, GlobalContext* globalCtx) { * This draws either Din, Nayru, or Farore based on the colors set in the DemoEffect struct. */ void DemoEffect_DrawGodLgt(Actor* thisx, GlobalContext* globalCtx) { - DemoEffect* this = THIS; + DemoEffect* this = (DemoEffect*)thisx; s32 pad; u32 frames = globalCtx->gameplayFrames; @@ -1857,7 +1855,7 @@ void DemoEffect_DrawGodLgt(Actor* thisx, GlobalContext* globalCtx) { * Draw function for the Light Effect Actor. */ void DemoEffect_DrawLightEffect(Actor* thisx, GlobalContext* globalCtx) { - DemoEffect* this = THIS; + DemoEffect* this = (DemoEffect*)thisx; u8* alpha; Gfx* disp; @@ -1899,7 +1897,7 @@ void DemoEffect_DrawLightEffect(Actor* thisx, GlobalContext* globalCtx) { * Draw function for the Blue Orb Actor. */ void DemoEffect_DrawBlueOrb(Actor* thisx, GlobalContext* globalCtx) { - DemoEffect* this = THIS; + DemoEffect* this = (DemoEffect*)thisx; s32 pad2; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_demo_effect.c", 2892); @@ -1919,7 +1917,7 @@ void DemoEffect_DrawBlueOrb(Actor* thisx, GlobalContext* globalCtx) { * Draw function for the Lgt Shower Actor. */ void DemoEffect_DrawLgtShower(Actor* thisx, GlobalContext* globalCtx) { - DemoEffect* this = THIS; + DemoEffect* this = (DemoEffect*)thisx; s32 pad; u32 frames = globalCtx->gameplayFrames; @@ -1940,7 +1938,7 @@ void DemoEffect_DrawLgtShower(Actor* thisx, GlobalContext* globalCtx) { * Draw function for the Light Ring Actor. */ void DemoEffect_DrawLightRing(Actor* thisx, GlobalContext* globalCtx2) { - DemoEffect* this = THIS; + DemoEffect* this = (DemoEffect*)thisx; GlobalContext* globalCtx = globalCtx2; u32 frames = this->lightRing.timer; @@ -1963,7 +1961,7 @@ void DemoEffect_DrawLightRing(Actor* thisx, GlobalContext* globalCtx2) { * Draw function for the Triforce Spot Actor. */ void DemoEffect_DrawTriforceSpot(Actor* thisx, GlobalContext* globalCtx) { - DemoEffect* this = THIS; + DemoEffect* this = (DemoEffect*)thisx; s32 pad; Vtx* vertices = SEGMENTED_TO_VIRTUAL(gTriforceVtx); u32 frames = globalCtx->gameplayFrames; @@ -2029,7 +2027,7 @@ void DemoEffect_DrawTriforceSpot(Actor* thisx, GlobalContext* globalCtx) { * This is either Medals or Light Arrows based on the drawId. */ void DemoEffect_DrawGetItem(Actor* thisx, GlobalContext* globalCtx) { - DemoEffect* this = THIS; + DemoEffect* this = (DemoEffect*)thisx; if (!DemoEffect_CheckCsAction(this, globalCtx, 1) && !DemoEffect_CheckCsAction(this, globalCtx, 4)) { if (!this->getItem.isLoaded) { this->getItem.isLoaded = 1; @@ -2046,7 +2044,7 @@ void DemoEffect_DrawGetItem(Actor* thisx, GlobalContext* globalCtx) { */ s32 DemoEffect_DrawTimewarpLimbs(GlobalContext* globalCtx, SkelAnimeCurve* skelCuve, s32 limbIndex, void* thisx) { s32 pad; - DemoEffect* this = THIS; + DemoEffect* this = (DemoEffect*)thisx; u32 frames = globalCtx->gameplayFrames; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_demo_effect.c", 3154); @@ -2072,7 +2070,7 @@ s32 DemoEffect_DrawTimewarpLimbs(GlobalContext* globalCtx, SkelAnimeCurve* skelC * Draw function for the Time Warp Actors. */ void DemoEffect_DrawTimeWarp(Actor* thisx, GlobalContext* globalCtx) { - DemoEffect* this = THIS; + DemoEffect* this = (DemoEffect*)thisx; GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; u8 effectType = (this->actor.params & 0x00FF); 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 9cd856cbb8..976d18d22d 100644 --- a/src/overlays/actors/ovl_Demo_Ext/z_demo_ext.c +++ b/src/overlays/actors/ovl_Demo_Ext/z_demo_ext.c @@ -10,8 +10,6 @@ #define FLAGS 0x00000010 -#define THIS ((DemoExt*)thisx) - typedef enum { /* 0x00 */ EXT_WAIT, /* 0x01 */ EXT_MAINTAIN, @@ -32,7 +30,7 @@ void DemoExt_Destroy(Actor* thisx, GlobalContext* globalCtx) { } void DemoExt_Init(Actor* thisx, GlobalContext* globalCtx) { - DemoExt* this = THIS; + DemoExt* this = (DemoExt*)thisx; this->scrollIncr[0] = 25; this->scrollIncr[1] = 40; @@ -170,7 +168,7 @@ static DemoExtActionFunc sActionFuncs[] = { }; void DemoExt_Update(Actor* thisx, GlobalContext* globalCtx) { - DemoExt* this = THIS; + DemoExt* this = (DemoExt*)thisx; if ((this->action < EXT_WAIT) || (this->action > EXT_DISPELL) || sActionFuncs[this->action] == NULL) { // "Main mode is abnormal!" @@ -184,7 +182,7 @@ void DemoExt_DrawNothing(Actor* thisx, GlobalContext* globalCtx) { } void DemoExt_DrawVortex(Actor* thisx, GlobalContext* globalCtx) { - DemoExt* this = THIS; + DemoExt* this = (DemoExt*)thisx; Mtx* mtx; GraphicsContext* gfxCtx; s16* curScroll; @@ -224,7 +222,7 @@ static DemoExtDrawFunc sDrawFuncs[] = { }; void DemoExt_Draw(Actor* thisx, GlobalContext* globalCtx) { - DemoExt* this = THIS; + DemoExt* this = (DemoExt*)thisx; if ((this->drawMode < EXT_DRAW_NOTHING) || (this->drawMode > EXT_DRAW_VORTEX) || sDrawFuncs[this->drawMode] == NULL) { 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 acf847b7f8..aa3a50537d 100644 --- a/src/overlays/actors/ovl_Demo_Geff/z_demo_geff.c +++ b/src/overlays/actors/ovl_Demo_Geff/z_demo_geff.c @@ -10,8 +10,6 @@ #define FLAGS 0x00000030 -#define THIS ((DemoGeff*)thisx) - void DemoGeff_Init(Actor* thisx, GlobalContext* globalCtx); void DemoGeff_Destroy(Actor* thisx, GlobalContext* globalCtx); void DemoGeff_Update(Actor* thisx, GlobalContext* globalCtx); @@ -60,7 +58,7 @@ void DemoGeff_Destroy(Actor* thisx, GlobalContext* globalCtx) { } void DemoGeff_Init(Actor* thisx, GlobalContext* globalCtx) { - DemoGeff* this = THIS; + DemoGeff* this = (DemoGeff*)thisx; if (this->actor.params < 0 || this->actor.params >= 9) { osSyncPrintf(VT_FGCOL(RED) "Demo_Geff_Actor_ct:arg_dataがおかしい!!!!!!!!!!!!\n" VT_RST); @@ -206,7 +204,7 @@ void func_809783D4(DemoGeff* this, GlobalContext* globalCtx) { } void DemoGeff_Update(Actor* thisx, GlobalContext* globalCtx) { - DemoGeff* this = THIS; + DemoGeff* this = (DemoGeff*)thisx; if (this->action < 0 || this->action >= 2 || sActionFuncs[this->action] == NULL) { osSyncPrintf(VT_FGCOL(RED) "メインモードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST); @@ -219,7 +217,7 @@ void func_809784D4(DemoGeff* this, GlobalContext* globalCtx) { } void DemoGeff_Draw(Actor* thisx, GlobalContext* globalCtx) { - DemoGeff* this = THIS; + DemoGeff* this = (DemoGeff*)thisx; s32 drawConfig = this->drawConfig; if (drawConfig < 0 || drawConfig >= 2 || sDrawFuncs[drawConfig] == NULL) { 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 3314a982ec..698440a456 100644 --- a/src/overlays/actors/ovl_Demo_Gj/z_demo_gj.c +++ b/src/overlays/actors/ovl_Demo_Gj/z_demo_gj.c @@ -10,8 +10,6 @@ #define FLAGS 0x00000030 -#define THIS ((DemoGj*)thisx) - void DemoGj_Init(Actor* thisx, GlobalContext* globalCtx); void DemoGj_Destroy(Actor* thisx, GlobalContext* globalCtx); void DemoGj_Update(Actor* thisx, GlobalContext* globalCtx); @@ -132,7 +130,7 @@ void DemoGj_DestroyCylinder(DemoGj* this, GlobalContext* globalCtx) { } void DemoGj_Destroy(Actor* thisx, GlobalContext* globalCtx) { - DemoGj* this = THIS; + DemoGj* this = (DemoGj*)thisx; DemoGj_DestroyCylinder(this, globalCtx); DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); @@ -1343,7 +1341,7 @@ static DemoGjUpdateFunc sUpdateFuncs[] = { }; void DemoGj_Update(Actor* thisx, GlobalContext* globalCtx) { - DemoGj* this = THIS; + DemoGj* this = (DemoGj*)thisx; if (this->updateMode < 0 || this->updateMode >= ARRAY_COUNT(sUpdateFuncs) || sUpdateFuncs[this->updateMode] == NULL) { @@ -1356,7 +1354,7 @@ void DemoGj_Update(Actor* thisx, GlobalContext* globalCtx) { } void DemoGj_Init(Actor* thisx, GlobalContext* globalCtx) { - DemoGj* this = THIS; + DemoGj* this = (DemoGj*)thisx; switch (DemoGj_GetType(this)) { case DEMOGJ_TYPE_AROUNDARENA: @@ -1437,7 +1435,7 @@ static DemoGjDrawFunc sDrawFuncs[] = { }; void DemoGj_Draw(Actor* thisx, GlobalContext* globalCtx) { - DemoGj* this = THIS; + DemoGj* this = (DemoGj*)thisx; if (this->drawConfig < 0 || this->drawConfig >= ARRAY_COUNT(sDrawFuncs) || sDrawFuncs[this->drawConfig] == NULL) { // "The drawing mode is abnormal!!!!!!!!!!!!!!!!!!!!!!!!!" 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 540f2a1b5e..1683b592e5 100644 --- a/src/overlays/actors/ovl_Demo_Go/z_demo_go.c +++ b/src/overlays/actors/ovl_Demo_Go/z_demo_go.c @@ -10,8 +10,6 @@ #define FLAGS 0x00000010 -#define THIS ((DemoGo*)thisx) - void DemoGo_Init(Actor* thisx, GlobalContext* globalCtx); void DemoGo_Destroy(Actor* thisx, GlobalContext* globalCtx); void DemoGo_Update(Actor* thisx, GlobalContext* globalCtx); @@ -82,7 +80,7 @@ void func_8097C8A8(DemoGo* this, GlobalContext* globalCtx) { } void DemoGo_Destroy(Actor* thisx, GlobalContext* globalCtx) { - DemoGo* this = THIS; + DemoGo* this = (DemoGo*)thisx; SkelAnime_Free(&this->skelAnime, globalCtx); } @@ -303,7 +301,7 @@ void func_8097D130(DemoGo* this, GlobalContext* globalCtx) { } void DemoGo_Update(Actor* thisx, GlobalContext* globalCtx) { - DemoGo* this = THIS; + DemoGo* this = (DemoGo*)thisx; if (this->action < 0 || this->action >= 7 || D_8097D44C[this->action] == 0) { osSyncPrintf(VT_FGCOL(RED) "メインモードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST); @@ -313,7 +311,7 @@ void DemoGo_Update(Actor* thisx, GlobalContext* globalCtx) { } void DemoGo_Init(Actor* thisx, GlobalContext* globalCtx) { - DemoGo* this = THIS; + DemoGo* this = (DemoGo*)thisx; AnimationHeader* animation = &gGoronAnim_004930; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f); @@ -345,7 +343,7 @@ void func_8097D29C(DemoGo* this, GlobalContext* globalCtx) { } void DemoGo_Draw(Actor* thisx, GlobalContext* globalCtx) { - DemoGo* this = THIS; + DemoGo* this = (DemoGo*)thisx; if (this->drawConfig < 0 || this->drawConfig >= 2 || D_8097D468[this->drawConfig] == NULL) { osSyncPrintf(VT_FGCOL(RED) "描画モードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST); 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 2d0df2ed4c..4b992c6bdb 100644 --- a/src/overlays/actors/ovl_Demo_Gt/z_demo_gt.c +++ b/src/overlays/actors/ovl_Demo_Gt/z_demo_gt.c @@ -6,15 +6,13 @@ #define FLAGS 0x00000030 -#define THIS ((DemoGt*)thisx) - void DemoGt_Init(Actor* thisx, GlobalContext* globalCtx); void DemoGt_Destroy(Actor* thisx, GlobalContext* globalCtx); void DemoGt_Update(Actor* thisx, GlobalContext* globalCtx); void DemoGt_Draw(Actor* thisx, GlobalContext* globalCtx); void DemoGt_Destroy(Actor* thisx, GlobalContext* globalCtx) { - DemoGt* this = THIS; + DemoGt* this = (DemoGt*)thisx; if ((this->dyna.actor.params == 1) || (this->dyna.actor.params == 2)) { DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); @@ -1704,7 +1702,7 @@ static DemoGtUpdateFunc sUpdateFuncs[] = { }; void DemoGt_Update(Actor* thisx, GlobalContext* globalCtx) { - DemoGt* this = THIS; + DemoGt* this = (DemoGt*)thisx; DemoGtUpdateFunc updateFunc; if ((this->updateMode < 0) || (this->updateMode >= 19) || (updateFunc = sUpdateFuncs[this->updateMode]) == NULL) { @@ -1717,7 +1715,7 @@ void DemoGt_Update(Actor* thisx, GlobalContext* globalCtx) { } void DemoGt_Init(Actor* thisx, GlobalContext* globalCtx) { - DemoGt* this = THIS; + DemoGt* this = (DemoGt*)thisx; switch (this->dyna.actor.params) { case 0: @@ -1760,7 +1758,7 @@ static DemoGtDrawFunc sDrawFuncs[] = { }; void DemoGt_Draw(Actor* thisx, GlobalContext* globalCtx) { - DemoGt* this = THIS; + DemoGt* this = (DemoGt*)thisx; DemoGtDrawFunc drawFunc; if ((this->drawConfig < 0) || (this->drawConfig >= 9) || (drawFunc = sDrawFuncs[this->drawConfig]) == NULL) { 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 5b8d6b6741..a6a6192fd2 100644 --- a/src/overlays/actors/ovl_Demo_Ik/z_demo_ik.c +++ b/src/overlays/actors/ovl_Demo_Ik/z_demo_ik.c @@ -4,8 +4,6 @@ #define FLAGS 0x00000010 -#define THIS ((DemoIk*)thisx) - void DemoIk_Init(Actor* thisx, GlobalContext* globalCtx); void DemoIk_Destroy(Actor* thisx, GlobalContext* globalCtx); void DemoIk_Update(Actor* thisx, GlobalContext* globalCtx); @@ -258,7 +256,7 @@ void DemoIk_Type1Action2(DemoIk* this, GlobalContext* globalCtx) { } void DemoIk_Type1PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) { - DemoIk* this = THIS; + DemoIk* this = (DemoIk*)thisx; GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; OPEN_DISPS(gfxCtx, "../z_demo_ik_inArmer.c", 385); @@ -406,7 +404,7 @@ void DemoIk_Type2Action2(DemoIk* this, GlobalContext* globalCtx) { s32 DemoIk_Type2OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - DemoIk* this = THIS; + DemoIk* this = (DemoIk*)thisx; if ((limbIndex == 1) && (DemoIk_GetCurFrame(this) < 30.0f)) { *dList = NULL; @@ -415,7 +413,7 @@ s32 DemoIk_Type2OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** } void DemoIk_Type2PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) { - DemoIk* this = THIS; + DemoIk* this = (DemoIk*)thisx; GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; f32 frame = DemoIk_GetCurFrame(this); @@ -471,7 +469,7 @@ static DemoIkActionFunc sActionFuncs[] = { void DemoIk_Update(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - DemoIk* this = THIS; + DemoIk* this = (DemoIk*)thisx; if (this->actionMode < 0 || this->actionMode >= ARRAY_COUNT(sActionFuncs) || sActionFuncs[this->actionMode] == NULL) { @@ -493,7 +491,7 @@ static DemoIkDrawFunc sDrawFuncs[] = { void DemoIk_Draw(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - DemoIk* this = THIS; + DemoIk* this = (DemoIk*)thisx; if (this->drawMode < 0 || this->drawMode >= ARRAY_COUNT(sDrawFuncs) || sDrawFuncs[this->drawMode] == NULL) { // "The draw mode is strange" @@ -517,7 +515,7 @@ const ActorInit Demo_Ik_InitVars = { void DemoIk_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - DemoIk* this = THIS; + DemoIk* this = (DemoIk*)thisx; if (this->actor.params == 0 || this->actor.params == 1 || this->actor.params == 2) { DemoIk_Type1Init(this, 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 7b30a42c97..fb183b9ddf 100644 --- a/src/overlays/actors/ovl_Demo_Im/z_demo_im.c +++ b/src/overlays/actors/ovl_Demo_Im/z_demo_im.c @@ -13,8 +13,6 @@ #define FLAGS 0x00000011 -#define THIS ((DemoIm*)thisx) - void DemoIm_Init(Actor* thisx, GlobalContext* globalCtx); void DemoIm_Destroy(Actor* thisx, GlobalContext* globalCtx); void DemoIm_Update(Actor* thisx, GlobalContext* globalCtx); @@ -146,14 +144,14 @@ void func_80984C8C(DemoIm* this, GlobalContext* globalCtx) { } void DemoIm_InitCollider(Actor* thisx, GlobalContext* globalCtx) { - DemoIm* this = THIS; + DemoIm* this = (DemoIm*)thisx; Collider_InitCylinder(globalCtx, &this->collider); Collider_SetCylinderType1(globalCtx, &this->collider, &this->actor, &sCylinderInit); } void DemoIm_DestroyCollider(Actor* thisx, GlobalContext* globalCtx) { - DemoIm* this = THIS; + DemoIm* this = (DemoIm*)thisx; Collider_DestroyCylinder(globalCtx, &this->collider); } @@ -1093,7 +1091,7 @@ void func_80987330(DemoIm* this, GlobalContext* globalCtx) { } void DemoIm_Update(Actor* thisx, GlobalContext* globalCtx) { - DemoIm* this = THIS; + DemoIm* this = (DemoIm*)thisx; if ((this->action < 0) || (this->action >= 31) || (sActionFuncs[this->action] == NULL)) { osSyncPrintf(VT_FGCOL(RED) "メインモードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST); @@ -1103,7 +1101,7 @@ void DemoIm_Update(Actor* thisx, GlobalContext* globalCtx) { } void DemoIm_Init(Actor* thisx, GlobalContext* globalCtx) { - DemoIm* this = THIS; + DemoIm* this = (DemoIm*)thisx; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f); DemoIm_InitCollider(thisx, globalCtx); @@ -1136,7 +1134,7 @@ void DemoIm_Destroy(Actor* thisx, GlobalContext* globalCtx) { } s32 DemoIm_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - DemoIm* this = THIS; + DemoIm* this = (DemoIm*)thisx; s32* unk_2D0 = &this->unk_2D0; if (this->unk_280 != 0) { @@ -1163,7 +1161,7 @@ s32 DemoIm_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList } void DemoIm_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) { - DemoIm* this = THIS; + DemoIm* this = (DemoIm*)thisx; if (limbIndex == IMPA_LIMB_HEAD) { Vec3f sp28 = D_809887D8; @@ -1204,7 +1202,7 @@ void DemoIm_DrawSolid(DemoIm* this, GlobalContext* globalCtx) { } void DemoIm_Draw(Actor* thisx, GlobalContext* globalCtx) { - DemoIm* this = THIS; + DemoIm* this = (DemoIm*)thisx; if ((this->drawConfig < 0) || (this->drawConfig >= 3) || (sDrawFuncs[this->drawConfig] == NULL)) { osSyncPrintf(VT_FGCOL(RED) "描画モードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST); 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 24090c0342..4399427739 100644 --- a/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.c +++ b/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.c @@ -6,8 +6,6 @@ #define FLAGS 0x00000030 -#define THIS ((DemoKankyo*)thisx) - void DemoKankyo_Init(Actor* thisx, GlobalContext* globalCtx); void DemoKankyo_Destroy(Actor* thisx, GlobalContext* globalCtx); void DemoKankyo_Update(Actor* thisx, GlobalContext* globalCtx); @@ -181,7 +179,7 @@ void DemoKankyo_SetupAction(DemoKankyo* this, DemoKankyoActionFunc actionFunc) { } void DemoKankyo_Init(Actor* thisx, GlobalContext* globalCtx) { - DemoKankyo* this = THIS; + DemoKankyo* this = (DemoKankyo*)thisx; s16 i; s32 objBankIndex = Object_GetIndex(&globalCtx->objectCtx, sObjIds[this->actor.params]); @@ -423,12 +421,12 @@ void DemoKankyo_KillDoorOfTimeCollision(DemoKankyo* this, GlobalContext* globalC } void DemoKankyo_Update(Actor* thisx, GlobalContext* globalCtx) { - DemoKankyo* this = THIS; + DemoKankyo* this = (DemoKankyo*)thisx; this->actionFunc(this, globalCtx); } void DemoKankyo_Draw(Actor* thisx, GlobalContext* globalCtx) { - DemoKankyo* this = THIS; + DemoKankyo* this = (DemoKankyo*)thisx; if (this->actor.objBankIndex == this->objBankIndex) { switch (this->actor.params) { @@ -485,7 +483,7 @@ void DemoKankyo_Draw(Actor* thisx, GlobalContext* globalCtx) { // transform relating to blue rain void func_80989B54(Actor* thisx, GlobalContext* globalCtx, s16 i) { - DemoKankyo* this = THIS; + DemoKankyo* this = (DemoKankyo*)thisx; switch (globalCtx->sceneNum) { case SCENE_HIRAL_DEMO: @@ -511,7 +509,7 @@ void func_80989B54(Actor* thisx, GlobalContext* globalCtx, s16 i) { } void DemoKankyo_DrawRain(Actor* thisx, GlobalContext* globalCtx) { - DemoKankyo* this = THIS; + DemoKankyo* this = (DemoKankyo*)thisx; f32 temp_f12_2; s16 i; f32 dx; @@ -630,7 +628,7 @@ void DemoKankyo_DrawRain(Actor* thisx, GlobalContext* globalCtx) { } void DemoKankyo_DrawRock(Actor* thisx, GlobalContext* globalCtx) { - DemoKankyo* this = THIS; + DemoKankyo* this = (DemoKankyo*)thisx; s32 pad; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_demo_kankyo.c", 1376); @@ -651,7 +649,7 @@ void DemoKankyo_DrawRock(Actor* thisx, GlobalContext* globalCtx) { } void DemoKankyo_DrawClouds(Actor* thisx, GlobalContext* globalCtx) { - DemoKankyo* this = THIS; + DemoKankyo* this = (DemoKankyo*)thisx; s16 i; s32 pad; f32 dx; @@ -688,7 +686,7 @@ void DemoKankyo_DrawClouds(Actor* thisx, GlobalContext* globalCtx) { } void DemoKankyo_DrawDoorOfTime(Actor* thisx, GlobalContext* globalCtx) { - DemoKankyo* this = THIS; + DemoKankyo* this = (DemoKankyo*)thisx; s32 pad; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_demo_kankyo.c", 1487); @@ -707,7 +705,7 @@ void DemoKankyo_DrawDoorOfTime(Actor* thisx, GlobalContext* globalCtx) { } void DemoKankyo_DrawLightPlane(Actor* thisx, GlobalContext* globalCtx) { - DemoKankyo* this = THIS; + DemoKankyo* this = (DemoKankyo*)thisx; s32 pad; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_demo_kankyo.c", 1514); @@ -763,7 +761,7 @@ void DemoKankyo_DrawWarpSparkles(Actor* thisx, GlobalContext* globalCtx) { s16 i; f32 temp_f22; - DemoKankyo* this = THIS; + DemoKankyo* this = (DemoKankyo*)thisx; Gfx* disp; Player* player = GET_PLAYER(globalCtx); Vec3f camPos; @@ -899,7 +897,7 @@ void DemoKankyo_DrawSparkles(Actor* thisx, GlobalContext* globalCtx) { static u32 D_8098CFB4; static Vec3f D_8098CFB8; - DemoKankyo* this = THIS; + DemoKankyo* this = (DemoKankyo*)thisx; f32 translateX; f32 translateY; f32 translateZ; 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 1591644a3c..8b6053a40f 100644 --- a/src/overlays/actors/ovl_Demo_Kekkai/z_demo_kekkai.c +++ b/src/overlays/actors/ovl_Demo_Kekkai/z_demo_kekkai.c @@ -10,8 +10,6 @@ #define FLAGS 0x00000030 -#define THIS ((DemoKekkai*)thisx) - void DemoKekkai_Init(Actor* thisx, GlobalContext* globalCtx); void DemoKekkai_Destroy(Actor* thisx, GlobalContext* globalCtx); void DemoKekkai_Update(Actor* thisx, GlobalContext* globalCtx); @@ -75,7 +73,7 @@ s32 DemoKekkai_CheckEventFlag(s32 params) { void DemoKekkai_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - DemoKekkai* this = THIS; + DemoKekkai* this = (DemoKekkai*)thisx; this->sfxFlag = 0; this->energyAlpha = 1.0f; @@ -126,7 +124,7 @@ void DemoKekkai_Init(Actor* thisx, GlobalContext* globalCtx) { void DemoKekkai_Destroy(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - DemoKekkai* this = THIS; + DemoKekkai* this = (DemoKekkai*)thisx; Collider_DestroyCylinder(globalCtx, &this->collider1); Collider_DestroyCylinder(globalCtx, &this->collider2); @@ -184,7 +182,7 @@ void DemoKekkai_TowerBarrier(DemoKekkai* this, GlobalContext* globalCtx) { void DemoKekkai_Update(Actor* thisx, GlobalContext* globalCtx2) { GlobalContext* globalCtx = globalCtx2; - DemoKekkai* this = THIS; + DemoKekkai* this = (DemoKekkai*)thisx; if (this->energyAlpha > 0.99f) { if ((this->collider1.base.atFlags & AT_HIT) || (this->collider2.base.atFlags & AT_HIT)) { @@ -205,7 +203,7 @@ void DemoKekkai_Update(Actor* thisx, GlobalContext* globalCtx2) { void DemoKekkai_TrialBarrierDispel(Actor* thisx, GlobalContext* globalCtx) { static u16 csFrames[] = { 0, 280, 280, 280, 280, 280, 280 }; s32 pad; - DemoKekkai* this = THIS; + DemoKekkai* this = (DemoKekkai*)thisx; if (globalCtx->csCtx.frames == csFrames[this->actor.params]) { func_800F3F3C(0xA); @@ -243,7 +241,7 @@ static CutsceneData* sSageCutscenes[] = { void DemoKekkai_TrialBarrierIdle(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - DemoKekkai* this = THIS; + DemoKekkai* this = (DemoKekkai*)thisx; if (this->collider1.base.atFlags & AT_HIT) { func_8002F71C(globalCtx, &this->actor, 5.0f, this->actor.yawTowardsPlayer, 5.0f); @@ -272,7 +270,7 @@ void DemoKekkai_DrawTrialBarrier(Actor* thisx, GlobalContext* globalCtx2) { 1, 1, 0, 0, 0, 1, 1, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 0, 1, 0, 2, 2, 2, 2, 2, 2, 2, 1, 1, 2, 0, 0, }; s32 colorIndex; - DemoKekkai* this = THIS; + DemoKekkai* this = (DemoKekkai*)thisx; u8 alphas[3]; Vtx* energyVtx = SEGMENTED_TO_VIRTUAL(gTrialBarrierEnergyVtx); s32 i; @@ -321,7 +319,7 @@ void DemoKekkai_DrawTrialBarrier(Actor* thisx, GlobalContext* globalCtx2) { void DemoKekkai_DrawTowerBarrier(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - DemoKekkai* this = THIS; + DemoKekkai* this = (DemoKekkai*)thisx; s32 scroll; scroll = (s32)this->barrierScroll & 0xFFFF; 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 28d3e6a6dc..be39d6e7f1 100644 --- a/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.c +++ b/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.c @@ -13,8 +13,6 @@ #define FLAGS 0x00000010 -#define THIS ((DemoSa*)thisx) - void DemoSa_Init(Actor* thisx, GlobalContext* globalCtx); void DemoSa_Destroy(Actor* thisx, GlobalContext* globalCtx); void DemoSa_Update(Actor* thisx, GlobalContext* globalCtx); @@ -100,7 +98,7 @@ const ActorInit Demo_Sa_InitVars = { }; void DemoSa_Destroy(Actor* thisx, GlobalContext* globalCtx) { - DemoSa* this = THIS; + DemoSa* this = (DemoSa*)thisx; SkelAnime_Free(&this->skelAnime, globalCtx); } @@ -750,7 +748,7 @@ void func_8098FD0C(DemoSa* this, GlobalContext* globalCtx) { } void DemoSa_Update(Actor* thisx, GlobalContext* globalCtx) { - DemoSa* this = THIS; + DemoSa* this = (DemoSa*)thisx; if (this->action < 0 || this->action >= 21 || sActionFuncs[this->action] == NULL) { osSyncPrintf(VT_FGCOL(RED) "メインモードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST); @@ -760,7 +758,7 @@ void DemoSa_Update(Actor* thisx, GlobalContext* globalCtx) { } void DemoSa_Init(Actor* thisx, GlobalContext* globalCtx) { - DemoSa* this = THIS; + DemoSa* this = (DemoSa*)thisx; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f); @@ -783,7 +781,7 @@ void DemoSa_Init(Actor* thisx, GlobalContext* globalCtx) { } s32 DemoSa_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - DemoSa* this = THIS; + DemoSa* this = (DemoSa*)thisx; if ((limbIndex == 15) && (this->unk_1B0 != 0)) { *dList = gSariaRightHandAndOcarinaDL; @@ -820,7 +818,7 @@ void DemoSa_DrawOpa(DemoSa* this, GlobalContext* globalCtx) { } void DemoSa_Draw(Actor* thisx, GlobalContext* globalCtx) { - DemoSa* this = THIS; + DemoSa* this = (DemoSa*)thisx; if (this->drawConfig < 0 || this->drawConfig >= 3 || sDrawFuncs[this->drawConfig] == NULL) { osSyncPrintf(VT_FGCOL(RED) "描画モードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST); 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 290dd82e5d..b1f76a1a81 100644 --- a/src/overlays/actors/ovl_Demo_Shd/z_demo_shd.c +++ b/src/overlays/actors/ovl_Demo_Shd/z_demo_shd.c @@ -8,8 +8,6 @@ #define FLAGS 0x00000030 -#define THIS ((DemoShd*)thisx) - void DemoShd_Init(Actor* thisx, GlobalContext* globalCtx); void DemoShd_Destroy(Actor* thisx, GlobalContext* globalCtx); void DemoShd_Update(Actor* thisx, GlobalContext* globalCtx); @@ -36,7 +34,7 @@ void DemoShd_SetupAction(DemoShd* this, DemoShdActionFunc actionFunc) { } void DemoShd_Init(Actor* thisx, GlobalContext* globalCtx) { - DemoShd* this = THIS; + DemoShd* this = (DemoShd*)thisx; this->unk_14C = 0; DemoShd_SetupAction(this, func_80991298); @@ -93,13 +91,13 @@ void func_80991298(DemoShd* this, GlobalContext* globalCtx) { } void DemoShd_Update(Actor* thisx, GlobalContext* globalCtx) { - DemoShd* this = THIS; + DemoShd* this = (DemoShd*)thisx; this->actionFunc(this, globalCtx); } void DemoShd_Draw(Actor* thisx, GlobalContext* globalCtx) { - DemoShd* this = THIS; + DemoShd* this = (DemoShd*)thisx; s32 pad; u32 unk_14E = this->unk_14E; 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 d4f22f9603..8b21f204c8 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 @@ -4,8 +4,6 @@ #define FLAGS 0x00000010 -#define THIS ((DemoTreLgt*)thisx) - void DemoTreLgt_Init(Actor* thisx, GlobalContext* globalCtx); void DemoTreLgt_Destroy(Actor* thisx, GlobalContext* globalCtx); void DemoTreLgt_Update(Actor* thisx, GlobalContext* globalCtx); @@ -48,7 +46,7 @@ static DemoTreLgtActionFunc sActionFuncs[] = { }; void DemoTreLgt_Init(Actor* thisx, GlobalContext* globalCtx) { - DemoTreLgt* this = THIS; + DemoTreLgt* this = (DemoTreLgt*)thisx; if (!SkelCurve_Init(globalCtx, &this->skelCurve, &gTreasureChestCurveSkel, sTransformUpdIdx[0])) { // "Demo_Tre_Lgt_Actor_ct (); Construct failed" @@ -64,7 +62,7 @@ void DemoTreLgt_Init(Actor* thisx, GlobalContext* globalCtx) { } void DemoTreLgt_Destroy(Actor* thisx, GlobalContext* globalCtx) { - DemoTreLgt* this = THIS; + DemoTreLgt* this = (DemoTreLgt*)thisx; SkelCurve_Destroy(globalCtx, &this->skelCurve); } @@ -128,14 +126,14 @@ void func_80993848(DemoTreLgt* this, GlobalContext* globalCtx) { } void DemoTreLgt_Update(Actor* thisx, GlobalContext* globalCtx) { - DemoTreLgt* this = THIS; + DemoTreLgt* this = (DemoTreLgt*)thisx; sActionFuncs[this->action](this, globalCtx); } s32 DemoTreLgt_PostLimbDraw(GlobalContext* globalCtx, SkelAnimeCurve* skelCurve, s32 limbIndex, void* thisx) { s32 pad; - DemoTreLgt* this = THIS; + DemoTreLgt* this = (DemoTreLgt*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_demo_tre_lgt.c", 423); gSPSegment(POLY_XLU_DISP++, 0x08, @@ -153,7 +151,7 @@ s32 DemoTreLgt_PostLimbDraw(GlobalContext* globalCtx, SkelAnimeCurve* skelCurve, void DemoTreLgt_Draw(Actor* thisx, GlobalContext* globalCtx) { GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - DemoTreLgt* this = THIS; + DemoTreLgt* this = (DemoTreLgt*)thisx; OPEN_DISPS(gfxCtx, "../z_demo_tre_lgt.c", 461); 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 dc3459e2bc..d4d212c997 100644 --- a/src/overlays/actors/ovl_Door_Ana/z_door_ana.c +++ b/src/overlays/actors/ovl_Door_Ana/z_door_ana.c @@ -9,8 +9,6 @@ #define FLAGS 0x02000000 -#define THIS ((DoorAna*)thisx) - void DoorAna_Init(Actor* thisx, GlobalContext* globalCtx); void DoorAna_Destroy(Actor* thisx, GlobalContext* globalCtx); void DoorAna_Update(Actor* thisx, GlobalContext* globalCtx); @@ -63,7 +61,7 @@ void DoorAna_SetupAction(DoorAna* this, DoorAnaActionFunc actionFunc) { } void DoorAna_Init(Actor* thisx, GlobalContext* globalCtx) { - DoorAna* this = THIS; + DoorAna* this = (DoorAna*)thisx; this->actor.shape.rot.z = 0; this->actor.shape.rot.y = this->actor.shape.rot.z; @@ -85,7 +83,7 @@ void DoorAna_Init(Actor* thisx, GlobalContext* globalCtx) { } void DoorAna_Destroy(Actor* thisx, GlobalContext* globalCtx) { - DoorAna* this = THIS; + DoorAna* this = (DoorAna*)thisx; // free collider if it has one if ((this->actor.params & 0x200) != 0) { @@ -167,7 +165,7 @@ void DoorAna_GrabPlayer(DoorAna* this, GlobalContext* globalCtx) { } void DoorAna_Update(Actor* thisx, GlobalContext* globalCtx) { - DoorAna* this = THIS; + DoorAna* this = (DoorAna*)thisx; this->actionFunc(this, globalCtx); // changes the grottos facing angle based on camera angle 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 781654239b..8aa6c8a34e 100644 --- a/src/overlays/actors/ovl_Door_Gerudo/z_door_gerudo.c +++ b/src/overlays/actors/ovl_Door_Gerudo/z_door_gerudo.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000000 -#define THIS ((DoorGerudo*)thisx) - void DoorGerudo_Init(Actor* thisx, GlobalContext* globalCtx); void DoorGerudo_Destroy(Actor* thisx, GlobalContext* globalCtx); void DoorGerudo_Update(Actor* thisx, GlobalContext* globalCtx); @@ -39,7 +37,7 @@ static InitChainEntry sInitChain[] = { void DoorGerudo_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - DoorGerudo* this = THIS; + DoorGerudo* this = (DoorGerudo*)thisx; CollisionHeader* colHeader = NULL; Actor_ProcessInitChain(&this->dyna.actor, sInitChain); @@ -56,7 +54,7 @@ void DoorGerudo_Init(Actor* thisx, GlobalContext* globalCtx) { } void DoorGerudo_Destroy(Actor* thisx, GlobalContext* globalCtx) { - DoorGerudo* this = THIS; + DoorGerudo* this = (DoorGerudo*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); } @@ -137,13 +135,13 @@ void func_809949C8(DoorGerudo* this, GlobalContext* globalCtx) { } void DoorGerudo_Update(Actor* thisx, GlobalContext* globalCtx) { - DoorGerudo* this = THIS; + DoorGerudo* this = (DoorGerudo*)thisx; this->actionFunc(this, globalCtx); } void DoorGerudo_Draw(Actor* thisx, GlobalContext* globalCtx) { - DoorGerudo* this = THIS; + DoorGerudo* this = (DoorGerudo*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_door_gerudo.c", 361); 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 31d936486e..f00719b1a9 100644 --- a/src/overlays/actors/ovl_Door_Killer/z_door_killer.c +++ b/src/overlays/actors/ovl_Door_Killer/z_door_killer.c @@ -13,8 +13,6 @@ #define FLAGS 0x00000010 -#define THIS ((DoorKiller*)thisx) - typedef enum { /* 0 */ DOOR_KILLER_DOOR, /* 1 */ DOOR_KILLER_RUBBLE_PIECE_1, @@ -100,7 +98,7 @@ static DoorKillerTextureEntry sDoorTextures[4] = { void DoorKiller_Init(Actor* thisx, GlobalContext* globalCtx2) { GlobalContext* globalCtx = globalCtx2; f32 randF; - DoorKiller* this = THIS; + DoorKiller* this = (DoorKiller*)thisx; s32 bankIndex; s32 i; @@ -179,7 +177,7 @@ void DoorKiller_Init(Actor* thisx, GlobalContext* globalCtx2) { } void DoorKiller_Destroy(Actor* thisx, GlobalContext* globalCtx) { - DoorKiller* this = THIS; + DoorKiller* this = (DoorKiller*)thisx; if ((thisx->params & 0xFF) == DOOR_KILLER_DOOR) { Collider_DestroyCylinder(globalCtx, &this->colliderCylinder); @@ -228,7 +226,7 @@ void DoorKiller_FallAsRubble(DoorKiller* this, GlobalContext* globalCtx) { } s32 DoorKiller_IsHit(Actor* thisx, GlobalContext* globalCtx) { - DoorKiller* this = THIS; + DoorKiller* this = (DoorKiller*)thisx; if ((this->colliderCylinder.base.acFlags & 2) && (this->colliderCylinder.info.acHitInfo != NULL)) { return true; } @@ -459,7 +457,7 @@ void DoorKiller_Wait(DoorKiller* this, GlobalContext* globalCtx) { * Grabs the virtual address of the texture from the relevant door object */ void DoorKiller_UpdateTexture(Actor* thisx, GlobalContext* globalCtx) { - DoorKiller* this = THIS; + DoorKiller* this = (DoorKiller*)thisx; gSegments[6] = VIRTUAL_TO_PHYSICAL(globalCtx->objectCtx.status[this->doorObjBankIndex].segment); this->texture = SEGMENTED_TO_VIRTUAL(this->texture); @@ -490,13 +488,13 @@ void DoorKiller_SetProperties(DoorKiller* this, GlobalContext* globalCtx) { } void DoorKiller_Update(Actor* thisx, GlobalContext* globalCtx) { - DoorKiller* this = THIS; + DoorKiller* this = (DoorKiller*)thisx; this->actionFunc(this, globalCtx); } void DoorKiller_SetTexture(Actor* thisx, GlobalContext* globalCtx) { - DoorKiller* this = THIS; + DoorKiller* this = (DoorKiller*)thisx; void* doorTexture = this->texture; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_door_killer.c", 883); @@ -505,7 +503,7 @@ void DoorKiller_SetTexture(Actor* thisx, GlobalContext* globalCtx) { } void DoorKiller_DrawDoor(Actor* thisx, GlobalContext* globalCtx) { - DoorKiller* this = THIS; + DoorKiller* this = (DoorKiller*)thisx; func_800943C8(globalCtx->state.gfxCtx); DoorKiller_SetTexture(&this->actor, globalCtx); @@ -517,7 +515,7 @@ void DoorKiller_DrawRubble(Actor* thisx, GlobalContext* globalCtx) { static Gfx* dLists[] = { object_door_killer_DL_001250, object_door_killer_DL_001550, object_door_killer_DL_0017B8, object_door_killer_DL_001A58 }; s32 rubblePieceIndex = (thisx->params & 0xFF) - 1; - DoorKiller* this = THIS; + DoorKiller* this = (DoorKiller*)thisx; if ((this->timer >= 20) || ((this->timer & 1) == 0)) { DoorKiller_SetTexture(thisx, globalCtx); 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 acd47a89e2..f7813c0891 100644 --- a/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c +++ b/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c @@ -18,8 +18,6 @@ #define FLAGS 0x00000010 -#define THIS ((DoorShutter*)thisx) - void DoorShutter_Init(Actor* thisx, GlobalContext* globalCtx); void DoorShutter_Destroy(Actor* thisx, GlobalContext* globalCtx); void DoorShutter_Update(Actor* thisx, GlobalContext* globalCtx); @@ -212,7 +210,7 @@ s32 DoorShutter_SetupDoor(DoorShutter* this, GlobalContext* globalCtx) { } void DoorShutter_Init(Actor* thisx, GlobalContext* globalCtx2) { - DoorShutter* this = THIS; + DoorShutter* this = (DoorShutter*)thisx; GlobalContext* globalCtx = globalCtx2; s32 phi_a3; s32 pad; @@ -268,7 +266,7 @@ void DoorShutter_Init(Actor* thisx, GlobalContext* globalCtx2) { } void DoorShutter_Destroy(Actor* thisx, GlobalContext* globalCtx) { - DoorShutter* this = THIS; + DoorShutter* this = (DoorShutter*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); if (this->dyna.actor.room >= 0) { @@ -627,7 +625,7 @@ void func_80997744(DoorShutter* this, GlobalContext* globalCtx) { } void DoorShutter_Update(Actor* thisx, GlobalContext* globalCtx) { - DoorShutter* this = THIS; + DoorShutter* this = (DoorShutter*)thisx; Player* player = GET_PLAYER(globalCtx); if (!(player->stateFlags1 & 0x100004C0) || (this->actionFunc == DoorShutter_SetupType)) { @@ -681,7 +679,7 @@ s32 func_80997A34(DoorShutter* this, GlobalContext* globalCtx) { } void DoorShutter_Draw(Actor* thisx, GlobalContext* globalCtx) { - DoorShutter* this = THIS; + DoorShutter* this = (DoorShutter*)thisx; //! @bug This actor is not fully initialized until the required object dependency is loaded. //! In most cases, the check for objBankIndex to equal requiredObjBankIndex prevents the actor 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 92e0ca7fac..63281a9dfd 100644 --- a/src/overlays/actors/ovl_Door_Toki/z_door_toki.c +++ b/src/overlays/actors/ovl_Door_Toki/z_door_toki.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000000 -#define THIS ((DoorToki*)thisx) - void DoorToki_Init(Actor* thisx, GlobalContext* globalCtx); void DoorToki_Destroy(Actor* thisx, GlobalContext* globalCtx); void DoorToki_Update(Actor* thisx, GlobalContext* globalCtx); @@ -33,7 +31,7 @@ static InitChainEntry sInitChain[] = { void DoorToki_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - DoorToki* this = THIS; + DoorToki* this = (DoorToki*)thisx; CollisionHeader* colHeader = NULL; Actor_ProcessInitChain(&this->dyna.actor, sInitChain); @@ -43,13 +41,13 @@ void DoorToki_Init(Actor* thisx, GlobalContext* globalCtx) { } void DoorToki_Destroy(Actor* thisx, GlobalContext* globalCtx) { - DoorToki* this = THIS; + DoorToki* this = (DoorToki*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); } void DoorToki_Update(Actor* thisx, GlobalContext* globalCtx) { - DoorToki* this = THIS; + DoorToki* this = (DoorToki*)thisx; if (gSaveContext.eventChkInf[4] & 0x800) { func_8003EBF8(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); 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 8cbdd53a2c..59daa91622 100644 --- a/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c +++ b/src/overlays/actors/ovl_Door_Warp1/z_door_warp1.c @@ -3,8 +3,6 @@ #define FLAGS 0x00000000 -#define THIS ((DoorWarp1*)thisx) - void DoorWarp1_Init(Actor* thisx, GlobalContext* globalCtx); void DoorWarp1_Destroy(Actor* thisx, GlobalContext* globalCtx); void DoorWarp1_Update(Actor* thisx, GlobalContext* globalCtx); @@ -60,7 +58,7 @@ void DoorWarp1_SetupAction(DoorWarp1* this, DoorWarp1ActionFunc actionFunc) { } void DoorWarp1_Init(Actor* thisx, GlobalContext* globalCtx) { - DoorWarp1* this = THIS; + DoorWarp1* this = (DoorWarp1*)thisx; GlobalContext* globalCtx2 = globalCtx; this->unk_1B8 = 0; @@ -85,7 +83,7 @@ void DoorWarp1_Init(Actor* thisx, GlobalContext* globalCtx) { void DoorWarp1_Destroy(Actor* thisx, GlobalContext* globalCtx) { u8 i; - DoorWarp1* this = THIS; + DoorWarp1* this = (DoorWarp1*)thisx; LightContext_RemoveLight(globalCtx, &globalCtx->lightCtx, this->upperLight); LightContext_RemoveLight(globalCtx, &globalCtx->lightCtx, this->lowerLight); @@ -867,7 +865,7 @@ void func_8099B020(DoorWarp1* this, GlobalContext* globalCtx) { } void DoorWarp1_Update(Actor* thisx, GlobalContext* globalCtx) { - DoorWarp1* this = THIS; + DoorWarp1* this = (DoorWarp1*)thisx; this->actionFunc(this, globalCtx); @@ -1022,7 +1020,7 @@ void DoorWarp1_DrawWarp(DoorWarp1* this, GlobalContext* globalCtx) { } void DoorWarp1_Draw(Actor* thisx, GlobalContext* globalCtx) { - DoorWarp1* this = THIS; + DoorWarp1* this = (DoorWarp1*)thisx; switch (this->actor.params) { case WARP_DUNGEON_ADULT: 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 2e27b67446..1de4e5fbfa 100644 --- a/src/overlays/actors/ovl_Efc_Erupc/z_efc_erupc.c +++ b/src/overlays/actors/ovl_Efc_Erupc/z_efc_erupc.c @@ -3,8 +3,6 @@ #define FLAGS 0x00000030 -#define THIS ((EfcErupc*)thisx) - void EfcErupc_Init(Actor* thisx, GlobalContext* globalCtx); void EfcErupc_Destroy(Actor* thisx, GlobalContext* globalCtx); void EfcErupc_Update(Actor* thisx, GlobalContext* globalCtx); @@ -33,7 +31,7 @@ void EfcErupc_SetupAction(EfcErupc* this, EfcErupcActionFunc actionFunc) { } void EfcErupc_Init(Actor* thisx, GlobalContext* globalCtx) { - EfcErupc* this = THIS; + EfcErupc* this = (EfcErupc*)thisx; EfcErupc_SetupAction(this, EfcErupc_UpdateAction); Actor_SetScale(&this->actor, 1.0f); @@ -106,14 +104,14 @@ void EfcErupc_UpdateAction(EfcErupc* this, GlobalContext* globalCtx) { } void EfcErupc_Update(Actor* thisx, GlobalContext* globalCtx) { - EfcErupc* this = THIS; + EfcErupc* this = (EfcErupc*)thisx; this->actionFunc(this, globalCtx); EfcErupc_UpdateParticles(this, globalCtx); } void EfcErupc_Draw(Actor* thisx, GlobalContext* globalCtx) { - EfcErupc* this = THIS; + EfcErupc* this = (EfcErupc*)thisx; u16 csAction; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_efc_erupc.c", 282); 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 76b3466874..398378f299 100644 --- a/src/overlays/actors/ovl_Eff_Dust/z_eff_dust.c +++ b/src/overlays/actors/ovl_Eff_Dust/z_eff_dust.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000030 -#define THIS ((EffDust*)thisx) - void EffDust_Init(Actor* thisx, GlobalContext* globalCtx); void EffDust_Destroy(Actor* thisx, GlobalContext* globalCtx); void EffDust_Update(Actor* thisx, GlobalContext* globalCtx); @@ -62,7 +60,7 @@ void EffDust_InitPosAndDistance(EffDust* this) { } void EffDust_Init(Actor* thisx, GlobalContext* globalCtx) { - EffDust* this = THIS; + EffDust* this = (EffDust*)thisx; EffDustType dustEffect = this->actor.params; EffDust_InitPosAndDistance(this); @@ -256,13 +254,13 @@ void EffDust_UpdateFunc_8099DFC0(EffDust* this, GlobalContext* globalCtx) { } void EffDust_Update(Actor* thisx, GlobalContext* globalCtx) { - EffDust* this = THIS; + EffDust* this = (EffDust*)thisx; this->actionFunc(this, globalCtx); } void EffDust_DrawFunc_8099E4F4(Actor* thisx, GlobalContext* globalCtx2) { - EffDust* this = THIS; + EffDust* this = (EffDust*)thisx; GlobalContext* globalCtx = globalCtx2; GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; Vec3f* initialPositions; @@ -309,7 +307,7 @@ void EffDust_DrawFunc_8099E4F4(Actor* thisx, GlobalContext* globalCtx2) { } void EffDust_DrawFunc_8099E784(Actor* thisx, GlobalContext* globalCtx2) { - EffDust* this = THIS; + EffDust* this = (EffDust*)thisx; GlobalContext* globalCtx = globalCtx2; GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; f32* distanceTraveled; @@ -368,7 +366,7 @@ void EffDust_DrawFunc_8099E784(Actor* thisx, GlobalContext* globalCtx2) { } void EffDust_Draw(Actor* thisx, GlobalContext* globalCtx) { - EffDust* this = THIS; + EffDust* this = (EffDust*)thisx; this->drawFunc(thisx, 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 f0c7fda56e..d3cd37bed3 100644 --- a/src/overlays/actors/ovl_Elf_Msg/z_elf_msg.c +++ b/src/overlays/actors/ovl_Elf_Msg/z_elf_msg.c @@ -10,8 +10,6 @@ #define FLAGS 0x00000010 -#define THIS ((ElfMsg*)thisx) - void ElfMsg_Init(Actor* thisx, GlobalContext* globalCtx); void ElfMsg_Destroy(Actor* thisx, GlobalContext* globalCtx); void ElfMsg_Update(Actor* thisx, GlobalContext* globalCtx); @@ -71,7 +69,7 @@ s32 ElfMsg_KillCheck(ElfMsg* this, GlobalContext* globalCtx) { } void ElfMsg_Init(Actor* thisx, GlobalContext* globalCtx) { - ElfMsg* this = THIS; + ElfMsg* this = (ElfMsg*)thisx; // "Conditions for Elf Tag disappearing" osSyncPrintf(VT_FGCOL(CYAN) "\nエルフ タグ 消える条件 %d" VT_RST "\n", (thisx->params >> 8) & 0x3F); @@ -148,7 +146,7 @@ void ElfMsg_CallNaviCylinder(ElfMsg* this, GlobalContext* globalCtx) { } void ElfMsg_Update(Actor* thisx, GlobalContext* globalCtx) { - ElfMsg* this = THIS; + ElfMsg* this = (ElfMsg*)thisx; if (!ElfMsg_KillCheck(this, globalCtx)) { if (Actor_ProcessTalkRequest(&this->actor, 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 128b588031..dd037ff8d4 100644 --- a/src/overlays/actors/ovl_Elf_Msg2/z_elf_msg2.c +++ b/src/overlays/actors/ovl_Elf_Msg2/z_elf_msg2.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000010 -#define THIS ((ElfMsg2*)thisx) - void ElfMsg2_Init(Actor* thisx, GlobalContext* globalCtx); void ElfMsg2_Destroy(Actor* thisx, GlobalContext* globalCtx); void ElfMsg2_Update(Actor* thisx, GlobalContext* globalCtx); @@ -72,7 +70,7 @@ s32 ElfMsg2_KillCheck(ElfMsg2* this, GlobalContext* globalCtx) { } void ElfMsg2_Init(Actor* thisx, GlobalContext* globalCtx) { - ElfMsg2* this = THIS; + ElfMsg2* this = (ElfMsg2*)thisx; osSyncPrintf(VT_FGCOL(CYAN) " Elf_Msg2_Actor_ct %04x\n\n" VT_RST, this->actor.params); if (!ElfMsg2_KillCheck(this, globalCtx)) { @@ -142,7 +140,7 @@ void ElfMsg2_WaitUntilActivated(ElfMsg2* this, GlobalContext* globalCtx) { } void ElfMsg2_Update(Actor* thisx, GlobalContext* globalCtx) { - ElfMsg2* this = THIS; + ElfMsg2* this = (ElfMsg2*)thisx; if (!ElfMsg2_KillCheck(this, globalCtx)) { this->actionFunc(this, globalCtx); 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 694898c5a7..69ed438361 100644 --- a/src/overlays/actors/ovl_En_Am/z_en_am.c +++ b/src/overlays/actors/ovl_En_Am/z_en_am.c @@ -10,8 +10,6 @@ #define FLAGS 0x04000015 -#define THIS ((EnAm*)thisx) - void EnAm_Init(Actor* thisx, GlobalContext* globalCtx); void EnAm_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnAm_Update(Actor* thisx, GlobalContext* globalCtx); @@ -208,7 +206,7 @@ s32 EnAm_CanMove(EnAm* this, GlobalContext* globalCtx, f32 distance, s16 yaw) { void EnAm_Init(Actor* thisx, GlobalContext* globalCtx) { CollisionHeader* colHeader = NULL; s32 pad; - EnAm* this = THIS; + EnAm* this = (EnAm*)thisx; Actor_ProcessInitChain(&this->dyna.actor, sInitChain); ActorShape_Init(&this->dyna.actor.shape, 0.0f, ActorShadow_DrawCircle, 48.0f); @@ -244,7 +242,7 @@ void EnAm_Init(Actor* thisx, GlobalContext* globalCtx) { void EnAm_Destroy(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnAm* this = THIS; + EnAm* this = (EnAm*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); Collider_DestroyCylinder(globalCtx, &this->hurtCollider); @@ -771,7 +769,7 @@ void EnAm_TransformSwordHitbox(Actor* thisx, GlobalContext* globalCtx) { static Vec3f D_809B0080 = { -2500.0f, 0.0f, 0.0f }; static Vec3f D_809B008C = { 2500.0f, 7000.0f, 4000.0f }; static Vec3f D_809B0098 = { -2500.0f, 0.0f, 4000.0f }; - EnAm* this = THIS; + EnAm* this = (EnAm*)thisx; Matrix_MultVec3f(&D_809B0074, &this->hitCollider.dim.quad[1]); Matrix_MultVec3f(&D_809B0080, &this->hitCollider.dim.quad[0]); @@ -834,7 +832,7 @@ void EnAm_Update(Actor* thisx, GlobalContext* globalCtx) { static Color_RGBA8 dustPrimColor = { 150, 150, 150, 255 }; static Color_RGBA8 dustEnvColor = { 100, 100, 100, 150 }; s32 pad; - EnAm* this = THIS; + EnAm* this = (EnAm*)thisx; EnBom* bomb; Vec3f dustPos; s32 i; @@ -929,7 +927,7 @@ static Vec3f sUnused1 = { 1100.0f, -700.0f, 0.0f }; static Vec3f sUnused2 = { 0.0f, 0.0f, 0.0f }; void EnAm_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) { - EnAm* this = THIS; + EnAm* this = (EnAm*)thisx; if ((limbIndex == 1) && (this->unk_264 != 0)) { EnAm_TransformSwordHitbox(&this->dyna.actor, globalCtx); @@ -945,7 +943,7 @@ static Vec3f sIcePosOffsets[] = { void EnAm_Draw(Actor* thisx, GlobalContext* globalCtx) { s32 pad; Vec3f sp68; - EnAm* this = THIS; + EnAm* this = (EnAm*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_am.c", 1580); 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 d3f6ce3ade..c6a6711c19 100644 --- a/src/overlays/actors/ovl_En_Ani/z_en_ani.c +++ b/src/overlays/actors/ovl_En_Ani/z_en_ani.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000009 -#define THIS ((EnAni*)thisx) - void EnAni_Init(Actor* thisx, GlobalContext* globalCtx); void EnAni_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnAni_Update(Actor* thisx, GlobalContext* globalCtx); @@ -71,7 +69,7 @@ static InitChainEntry sInitChain[] = { void EnAni_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnAni* this = THIS; + EnAni* this = (EnAni*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); ActorShape_Init(&this->actor.shape, -2800.0f, ActorShadow_DrawCircle, 36.0f); @@ -93,7 +91,7 @@ void EnAni_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnAni_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnAni* this = THIS; + EnAni* this = (EnAni*)thisx; Collider_DestroyCylinder(globalCtx, &this->collider); } @@ -235,7 +233,7 @@ void func_809B0A6C(EnAni* this, GlobalContext* globalCtx) { } void EnAni_Update(Actor* thisx, GlobalContext* globalCtx) { - EnAni* this = THIS; + EnAni* this = (EnAni*)thisx; s32 pad[2]; Collider_UpdateCylinder(&this->actor, &this->collider); @@ -293,7 +291,7 @@ void EnAni_Update(Actor* thisx, GlobalContext* globalCtx) { } s32 EnAni_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - EnAni* this = THIS; + EnAni* this = (EnAni*)thisx; if (limbIndex == 15) { rot->x += this->unk_29C.y; @@ -304,7 +302,7 @@ s32 EnAni_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, void EnAni_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) { static Vec3f sMultVec = { 800.0f, 500.0f, 0.0f }; - EnAni* this = THIS; + EnAni* this = (EnAni*)thisx; if (limbIndex == 15) { Matrix_MultVec3f(&sMultVec, &this->actor.focus.pos); @@ -317,7 +315,7 @@ void EnAni_Draw(Actor* thisx, GlobalContext* globalCtx) { gRoofManEyeHalfTex, gRoofManEyeClosedTex, }; - EnAni* this = THIS; + EnAni* this = (EnAni*)thisx; s32 pad; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_ani.c", 719); 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 61200b1282..285a15b4a4 100644 --- a/src/overlays/actors/ovl_En_Anubice/z_en_anubice.c +++ b/src/overlays/actors/ovl_En_Anubice/z_en_anubice.c @@ -12,8 +12,6 @@ #define FLAGS 0x00000015 -#define THIS ((EnAnubice*)thisx) - void EnAnubice_Init(Actor* thisx, GlobalContext* globalCtx); void EnAnubice_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnAnubice_Update(Actor* thisx, GlobalContext* globalCtx); @@ -121,7 +119,7 @@ void EnAnubice_SetFireballRot(EnAnubice* this, GlobalContext* globalCtx) { } void EnAnubice_Init(Actor* thisx, GlobalContext* globalCtx) { - EnAnubice* this = THIS; + EnAnubice* this = (EnAnubice*)thisx; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 20.0f); SkelAnime_Init(globalCtx, &this->skelAnime, &gAnubiceSkel, &gAnubiceIdleAnim, this->jointTable, this->morphTable, @@ -149,7 +147,7 @@ void EnAnubice_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnAnubice_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnAnubice* this = THIS; + EnAnubice* this = (EnAnubice*)thisx; EnAnubiceTag* temp_v1; Collider_DestroyCylinder(globalCtx, &this->col); @@ -354,7 +352,7 @@ void EnAnubice_Update(Actor* thisx, GlobalContext* globalCtx) { s32 i; Vec3f sp48; Vec3f sp3C; - EnAnubice* this = THIS; + EnAnubice* this = (EnAnubice*)thisx; if (this->actionFunc != EnAnubice_SetupDie && this->actionFunc != EnAnubice_Die && this->actor.shape.yOffset == 0.0f) { @@ -458,7 +456,7 @@ void EnAnubice_Update(Actor* thisx, GlobalContext* globalCtx) { s32 EnAnubis_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - EnAnubice* this = THIS; + EnAnubice* this = (EnAnubice*)thisx; if (limbIndex == 13) { rot->z += this->unk_278; @@ -468,7 +466,7 @@ s32 EnAnubis_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dLi } void EnAnubis_PostLimbDraw(struct GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) { - EnAnubice* this = THIS; + EnAnubice* this = (EnAnubice*)thisx; Vec3f pos = { 0.0f, 0.0f, 0.0f }; if (limbIndex == 13) { @@ -484,7 +482,7 @@ void EnAnubis_PostLimbDraw(struct GlobalContext* globalCtx, s32 limbIndex, Gfx** } void EnAnubice_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnAnubice* this = THIS; + EnAnubice* this = (EnAnubice*)thisx; func_80093D84(globalCtx->state.gfxCtx); SkelAnime_DrawOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, EnAnubis_OverrideLimbDraw, 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 00de23547e..64ef7cb831 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 @@ -10,8 +10,6 @@ #define FLAGS 0x00000010 -#define THIS ((EnAnubiceFire*)thisx) - void EnAnubiceFire_Init(Actor* thisx, GlobalContext* globalCtx); void EnAnubiceFire_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnAnubiceFire_Update(Actor* thisx, GlobalContext* globalCtx); @@ -54,7 +52,7 @@ static ColliderCylinderInit sCylinderInit = { }; void EnAnubiceFire_Init(Actor* thisx, GlobalContext* globalCtx) { - EnAnubiceFire* this = THIS; + EnAnubiceFire* this = (EnAnubiceFire*)thisx; s32 i; Collider_InitCylinder(globalCtx, &this->cylinder); @@ -73,7 +71,7 @@ void EnAnubiceFire_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnAnubiceFire_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnAnubiceFire* this = THIS; + EnAnubiceFire* this = (EnAnubiceFire*)thisx; Collider_DestroyCylinder(globalCtx, &this->cylinder); } @@ -172,7 +170,7 @@ void func_809B2B48(EnAnubiceFire* this, GlobalContext* globalCtx) { } void EnAnubiceFire_Update(Actor* thisx, GlobalContext* globalCtx) { - EnAnubiceFire* this = THIS; + EnAnubiceFire* this = (EnAnubiceFire*)thisx; s32 pad; s32 i; @@ -219,7 +217,7 @@ void EnAnubiceFire_Draw(Actor* thisx, GlobalContext* globalCtx) { static void* D_809B3270[] = { gDust4Tex, gDust5Tex, gDust6Tex, gDust7Tex, gDust8Tex, gDust7Tex, gDust6Tex, gDust5Tex, }; - EnAnubiceFire* this = THIS; + EnAnubiceFire* this = (EnAnubiceFire*)thisx; s32 pad[2]; s32 i; 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 2b99106909..a8a946eeaa 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 @@ -9,8 +9,6 @@ #define FLAGS 0x00000010 -#define THIS ((EnAnubiceTag*)thisx) - void EnAnubiceTag_Init(Actor* thisx, GlobalContext* globalCtx); void EnAnubiceTag_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnAnubiceTag_Update(Actor* thisx, GlobalContext* globalCtx); @@ -32,7 +30,7 @@ const ActorInit En_Anubice_Tag_InitVars = { }; void EnAnubiceTag_Init(Actor* thisx, GlobalContext* globalCtx) { - EnAnubiceTag* this = THIS; + EnAnubiceTag* this = (EnAnubiceTag*)thisx; osSyncPrintf("\n\n"); // "Anubis control tag generated" @@ -98,13 +96,13 @@ void EnAnubiceTag_ManageAnubis(EnAnubiceTag* this, GlobalContext* globalCtx) { } void EnAnubiceTag_Update(Actor* thisx, GlobalContext* globalCtx) { - EnAnubiceTag* this = THIS; + EnAnubiceTag* this = (EnAnubiceTag*)thisx; this->actionFunc(this, globalCtx); } void EnAnubiceTag_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnAnubiceTag* this = THIS; + EnAnubiceTag* this = (EnAnubiceTag*)thisx; if (BREG(0) != 0) { DebugDisplay_AddObject(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, 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 2541977914..b55e841108 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 @@ -8,8 +8,6 @@ #include "overlays/actors/ovl_En_Arrow/z_en_arrow.h" #define FLAGS 0x00000010 -#define THIS ((EnArowTrap*)thisx) - void EnArowTrap_Init(Actor* thisx, GlobalContext* globalCtx); void EnArowTrap_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnArowTrap_Update(Actor* thisx, GlobalContext* globalCtx); @@ -27,7 +25,7 @@ const ActorInit En_Arow_Trap_InitVars = { }; void EnArowTrap_Init(Actor* thisx, GlobalContext* globalCtx) { - EnArowTrap* this = THIS; + EnArowTrap* this = (EnArowTrap*)thisx; Actor_SetScale(&this->actor, 0.01); this->unk_14C = 0; @@ -39,7 +37,7 @@ void EnArowTrap_Destroy(Actor* thisx, GlobalContext* globalCtx) { } void EnArowTrap_Update(Actor* thisx, GlobalContext* globalCtx) { - EnArowTrap* this = THIS; + EnArowTrap* this = (EnArowTrap*)thisx; if (this->actor.xzDistToPlayer <= 400) { this->attackTimer--; 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 6dc30b146f..3830c3727f 100644 --- a/src/overlays/actors/ovl_En_Arrow/z_en_arrow.c +++ b/src/overlays/actors/ovl_En_Arrow/z_en_arrow.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000030 -#define THIS ((EnArrow*)thisx) - void EnArrow_Init(Actor* thisx, GlobalContext* globalCtx); void EnArrow_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnArrow_Update(Actor* thisx, GlobalContext* globalCtx); @@ -82,7 +80,7 @@ void EnArrow_Init(Actor* thisx, GlobalContext* globalCtx) { 0x00000800, 0x00000020, 0x00000020, 0x00000800, 0x00001000, 0x00002000, 0x00010000, 0x00004000, 0x00008000, 0x00000004, }; - EnArrow* this = THIS; + EnArrow* this = (EnArrow*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); @@ -140,7 +138,7 @@ void EnArrow_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnArrow_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnArrow* this = THIS; + EnArrow* this = (EnArrow*)thisx; if (this->actor.params <= ARROW_LIGHT) { Effect_Delete(globalCtx, this->effectIndex); @@ -388,7 +386,7 @@ void func_809B4640(EnArrow* this, GlobalContext* globalCtx) { void EnArrow_Update(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnArrow* this = THIS; + EnArrow* this = (EnArrow*)thisx; Player* player = GET_PLAYER(globalCtx); if (this->isCsNut || ((this->actor.params >= ARROW_NORMAL_LIT) && (player->unk_A73 != 0)) || @@ -452,7 +450,7 @@ void func_809B4800(EnArrow* this, GlobalContext* globalCtx) { void EnArrow_Draw(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnArrow* this = THIS; + EnArrow* this = (EnArrow*)thisx; u8 alpha; f32 scale; 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 69eb9e2aa1..aa94702d14 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 @@ -10,8 +10,6 @@ #define FLAGS 0x00000010 -#define THIS ((EnAttackNiw*)thisx) - void EnAttackNiw_Init(Actor* thisx, GlobalContext* globalCtx); void EnAttackNiw_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnAttackNiw_Update(Actor* thisx, GlobalContext* globalCtx); @@ -40,7 +38,7 @@ static InitChainEntry sInitChain[] = { }; void EnAttackNiw_Init(Actor* thisx, GlobalContext* globalCtx) { - EnAttackNiw* this = THIS; + EnAttackNiw* this = (EnAttackNiw*)thisx; s32 pad; Actor_ProcessInitChain(&this->actor, sInitChain); @@ -61,7 +59,7 @@ void EnAttackNiw_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnAttackNiw_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnAttackNiw* this = THIS; + EnAttackNiw* this = (EnAttackNiw*)thisx; EnNiw* cucco = (EnNiw*)this->actor.parent; if (this->actor.parent != NULL) { @@ -296,7 +294,7 @@ void func_809B5C18(EnAttackNiw* this, GlobalContext* globalCtx) { void EnAttackNiw_Update(Actor* thisx, GlobalContext* globalCtx) { f32 tmpf1; - EnAttackNiw* this = THIS; + EnAttackNiw* this = (EnAttackNiw*)thisx; EnNiw* cucco; Player* player = GET_PLAYER(globalCtx); s32 pad; @@ -374,7 +372,7 @@ void EnAttackNiw_Update(Actor* thisx, GlobalContext* globalCtx) { } s32 func_809B5F98(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - EnAttackNiw* this = THIS; + EnAttackNiw* this = (EnAttackNiw*)thisx; Vec3f sp0 = { 0.0f, 0.0f, 0.0f }; if (limbIndex == 13) { @@ -397,7 +395,7 @@ s32 func_809B5F98(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* p } void EnAttackNiw_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnAttackNiw* this = THIS; + EnAttackNiw* this = (EnAttackNiw*)thisx; func_80093D18(globalCtx->state.gfxCtx); SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, 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 626fb2f4cb..31ba7d5288 100644 --- a/src/overlays/actors/ovl_En_Ba/z_en_ba.c +++ b/src/overlays/actors/ovl_En_Ba/z_en_ba.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000015 -#define THIS ((EnBa*)thisx) - void EnBa_Init(Actor* thisx, GlobalContext* globalCtx); void EnBa_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnBa_Update(Actor* thisx, GlobalContext* globalCtx); @@ -91,7 +89,7 @@ static InitChainEntry sInitChain[] = { }; void EnBa_Init(Actor* thisx, GlobalContext* globalCtx) { - EnBa* this = THIS; + EnBa* this = (EnBa*)thisx; Vec3f sp38 = D_809B80E4; s32 pad; s16 i; @@ -128,7 +126,7 @@ void EnBa_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnBa_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnBa* this = THIS; + EnBa* this = (EnBa*)thisx; Collider_DestroyJntSph(globalCtx, &this->collider); } @@ -447,7 +445,7 @@ void EnBa_Die(EnBa* this, GlobalContext* globalCtx) { } void EnBa_Update(Actor* thisx, GlobalContext* globalCtx) { - EnBa* this = THIS; + EnBa* this = (EnBa*)thisx; if ((this->actor.params < EN_BA_DEAD_BLOB) && (this->collider.base.acFlags & 2)) { this->collider.base.acFlags &= ~2; @@ -470,7 +468,7 @@ void EnBa_Update(Actor* thisx, GlobalContext* globalCtx) { static Gfx* D_809B8118[] = { 0x060024F0, 0x060027F0, 0x060029F0 }; void EnBa_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnBa* this = THIS; + EnBa* this = (EnBa*)thisx; s32 pad; s16 i; Mtx* mtx = Graph_Alloc(globalCtx->state.gfxCtx, sizeof(Mtx) * 14); 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 25530486df..61b5af37b0 100644 --- a/src/overlays/actors/ovl_En_Bb/z_en_bb.c +++ b/src/overlays/actors/ovl_En_Bb/z_en_bb.c @@ -10,8 +10,6 @@ #define FLAGS 0x01000015 -#define THIS ((EnBb*)thisx) - #define vBombHopPhase actionVar1 #define vTrailIdx actionVar1 #define vTrailMaxAlpha actionVar2 @@ -310,7 +308,7 @@ void EnBb_KillFlameTrail(EnBb* this) { void EnBb_Init(Actor* thisx, GlobalContext* globalCtx) { EffectBlureInit1 blureInit; s32 pad; - EnBb* this = THIS; + EnBb* this = (EnBb*)thisx; Actor_ProcessInitChain(thisx, sInitChain); SkelAnime_Init(globalCtx, &this->skelAnime, &object_Bb_Skel_001A30, &object_Bb_Anim_000444, this->jointTable, @@ -401,7 +399,7 @@ void EnBb_Init(Actor* thisx, GlobalContext* globalCtx) { void EnBb_Destroy(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnBb* this = THIS; + EnBb* this = (EnBb*)thisx; Collider_DestroyJntSph(globalCtx, &this->collider); } @@ -1221,7 +1219,7 @@ void EnBb_CollisionCheck(EnBb* this, GlobalContext* globalCtx) { void EnBb_Update(Actor* thisx, GlobalContext* globalCtx2) { GlobalContext* globalCtx = globalCtx2; - EnBb* this = THIS; + EnBb* this = (EnBb*)thisx; Vec3f sp4C = { 0.0f, 0.0f, 0.0f }; Vec3f sp40 = { 0.0f, -0.6f, 0.0f }; Color_RGBA8 sp3C = { 0, 0, 255, 255 }; @@ -1262,7 +1260,7 @@ void EnBb_Update(Actor* thisx, GlobalContext* globalCtx2) { } void EnBb_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) { - EnBb* this = THIS; + EnBb* this = (EnBb*)thisx; BodyBreak_SetInfo(&this->bodyBreak, limbIndex, 4, 15, 15, dList, BODYBREAK_OBJECT_DEFAULT); } @@ -1275,7 +1273,7 @@ static Vec3f sFireIceOffsets[] = { void EnBb_Draw(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnBb* this = THIS; + EnBb* this = (EnBb*)thisx; Vec3f blureBase1 = { 0.0f, 5000.0f, 0.0f }; Vec3f blureBase2 = { 0.0f, 2000.0f, 0.0f }; Vec3f blureVtx1; 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 7378121c41..a988cfef19 100644 --- a/src/overlays/actors/ovl_En_Bdfire/z_en_bdfire.c +++ b/src/overlays/actors/ovl_En_Bdfire/z_en_bdfire.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000030 -#define THIS ((EnBdfire*)thisx) - void EnBdfire_Init(Actor* thisx, GlobalContext* globalCtx); void EnBdfire_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnBdfire_Update(Actor* thisx, GlobalContext* globalCtx); @@ -41,7 +39,7 @@ void EnbdFire_SetupDraw(EnBdfire* this, EnBdfireDrawFunc drawFunc) { } void EnBdfire_Init(Actor* thisx, GlobalContext* globalCtx) { - EnBdfire* this = THIS; + EnBdfire* this = (EnBdfire*)thisx; s32 pad; Actor_SetScale(&this->actor, 0.6f); @@ -75,7 +73,7 @@ void EnBdfire_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnBdfire_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnBdfire* this = THIS; + EnBdfire* this = (EnBdfire*)thisx; if (this->actor.params < 0) { LightContext_RemoveLight(globalCtx, &globalCtx->lightCtx, this->lightNode); @@ -189,7 +187,7 @@ void func_809BC598(EnBdfire* this, GlobalContext* globalCtx) { } void EnBdfire_Update(Actor* thisx, GlobalContext* globalCtx) { - EnBdfire* this = THIS; + EnBdfire* this = (EnBdfire*)thisx; this->unk_156++; this->actionFunc(this, globalCtx); @@ -223,7 +221,7 @@ void EnBdfire_DrawFire(EnBdfire* this, GlobalContext* globalCtx) { } void EnBdfire_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnBdfire* this = THIS; + EnBdfire* this = (EnBdfire*)thisx; this->drawFunc(this, 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 01ce4ea0e2..f14cd0b848 100644 --- a/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.c +++ b/src/overlays/actors/ovl_En_Bigokuta/z_en_bigokuta.c @@ -3,8 +3,6 @@ #define FLAGS 0x00000035 -#define THIS ((EnBigokuta*)thisx) - void EnBigokuta_Init(Actor* thisx, GlobalContext* globalCtx); void EnBigokuta_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnBigokuta_Update(Actor* thisx, GlobalContext* globalCtx); @@ -157,7 +155,7 @@ static InitChainEntry sInitChain[] = { static s32 sUnused[] = { 0xFFFFFFFF, 0x969696FF }; void EnBigokuta_Init(Actor* thisx, GlobalContext* globalCtx) { - EnBigokuta* this = THIS; + EnBigokuta* this = (EnBigokuta*)thisx; s32 i; Actor_ProcessInitChain(&this->actor, sInitChain); @@ -190,7 +188,7 @@ void EnBigokuta_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnBigokuta_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnBigokuta* this = THIS; + EnBigokuta* this = (EnBigokuta*)thisx; s32 i; Collider_DestroyJntSph(globalCtx, &this->collider); @@ -770,7 +768,7 @@ void EnBigokuta_UpdateDamage(EnBigokuta* this, GlobalContext* globalCtx) { } void EnBigokuta_Update(Actor* thisx, GlobalContext* globalCtx2) { - EnBigokuta* this = THIS; + EnBigokuta* this = (EnBigokuta*)thisx; s32 i; GlobalContext* globalCtx = globalCtx2; @@ -811,7 +809,7 @@ void EnBigokuta_Update(Actor* thisx, GlobalContext* globalCtx2) { s32 EnBigokuta_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - EnBigokuta* this = THIS; + EnBigokuta* this = (EnBigokuta*)thisx; u8 intensity; f32 temp_f0; s32 temp_hi; @@ -868,7 +866,7 @@ s32 EnBigokuta_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** d } void EnBigokuta_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnBigokuta* this = THIS; + EnBigokuta* this = (EnBigokuta*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_bigokuta.c", 2017); 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 fa4b538166..981d0e818f 100644 --- a/src/overlays/actors/ovl_En_Bili/z_en_bili.c +++ b/src/overlays/actors/ovl_En_Bili/z_en_bili.c @@ -9,8 +9,6 @@ #define FLAGS 0x00005005 -#define THIS ((EnBili*)thisx) - void EnBili_Init(Actor* thisx, GlobalContext* globalCtx); void EnBili_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnBili_Update(Actor* thisx, GlobalContext* globalCtx); @@ -114,7 +112,7 @@ static InitChainEntry sInitChain[] = { }; void EnBili_Init(Actor* thisx, GlobalContext* globalCtx) { - EnBili* this = THIS; + EnBili* this = (EnBili*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 17.0f); @@ -134,7 +132,7 @@ void EnBili_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnBili_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnBili* this = THIS; + EnBili* this = (EnBili*)thisx; Collider_DestroyCylinder(globalCtx, &this->collider); } @@ -597,7 +595,7 @@ void EnBili_UpdateDamage(EnBili* this, GlobalContext* globalCtx) { void EnBili_Update(Actor* thisx, GlobalContext* globalCtx2) { GlobalContext* globalCtx = globalCtx2; - EnBili* this = THIS; + EnBili* this = (EnBili*)thisx; if (this->collider.base.atFlags & AT_HIT) { this->collider.base.atFlags &= ~AT_HIT; @@ -725,7 +723,7 @@ void EnBili_PulseLimb4(EnBili* this, f32 frame, Vec3f* arg2) { s32 EnBili_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx, Gfx** gfx) { - EnBili* this = THIS; + EnBili* this = (EnBili*)thisx; Vec3f limbScale = { 1.0f, 1.0f, 1.0f }; f32 curFrame = this->skelAnime.curFrame; @@ -750,7 +748,7 @@ static void* sTentaclesTextures[] = { #include "overlays/ovl_En_Bili/ovl_En_Bili.c" void EnBili_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnBili* this = THIS; + EnBili* this = (EnBili*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_bili.c", 1521); func_80093D84(globalCtx->state.gfxCtx); 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 3066bafa1f..5a16774e2a 100644 --- a/src/overlays/actors/ovl_En_Bird/z_en_bird.c +++ b/src/overlays/actors/ovl_En_Bird/z_en_bird.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000000 -#define THIS ((EnBird*)thisx) - void EnBird_Init(Actor* thisx, GlobalContext* globalCtx); void EnBird_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnBird_Update(Actor* thisx, GlobalContext* globalCtx); @@ -42,7 +40,7 @@ void EnBird_SetupAction(EnBird* this, EnBirdActionFunc actionFunc) { } void EnBird_Init(Actor* thisx, GlobalContext* globalCtx) { - EnBird* this = THIS; + EnBird* this = (EnBird*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); Actor_SetScale(&this->actor, 0.01); @@ -121,14 +119,14 @@ void func_809C1E40(EnBird* this, GlobalContext* globalCtx) { } void EnBird_Update(Actor* thisx, GlobalContext* globalCtx) { - EnBird* this = THIS; + EnBird* this = (EnBird*)thisx; this->unk_1B4 += this->unk_1B8; this->actionFunc(this, globalCtx); } void EnBird_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnBird* this = THIS; + EnBird* this = (EnBird*)thisx; SkelAnime_DrawOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, NULL, NULL, NULL); } 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 1ee789c20f..a6d3e6fe8d 100644 --- a/src/overlays/actors/ovl_En_Blkobj/z_en_blkobj.c +++ b/src/overlays/actors/ovl_En_Blkobj/z_en_blkobj.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000030 -#define THIS ((EnBlkobj*)thisx) - void EnBlkobj_Init(Actor* thisx, GlobalContext* globalCtx); void EnBlkobj_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnBlkobj_Update(Actor* thisx, GlobalContext* globalCtx); @@ -57,7 +55,7 @@ void EnBlkobj_SetupAction(EnBlkobj* this, EnBlkobjActionFunc actionFunc) { void EnBlkobj_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnBlkobj* this = THIS; + EnBlkobj* this = (EnBlkobj*)thisx; CollisionHeader* colHeader = NULL; Actor_ProcessInitChain(&this->dyna.actor, sInitChain); @@ -74,7 +72,7 @@ void EnBlkobj_Init(Actor* thisx, GlobalContext* globalCtx) { void EnBlkobj_Destroy(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnBlkobj* this = THIS; + EnBlkobj* this = (EnBlkobj*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); } @@ -124,7 +122,7 @@ void EnBlkobj_DoNothing(EnBlkobj* this, GlobalContext* globalCtx) { void EnBlkobj_Update(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnBlkobj* this = THIS; + EnBlkobj* this = (EnBlkobj*)thisx; this->actionFunc(this, globalCtx); } @@ -149,7 +147,7 @@ void EnBlkobj_DrawAlpha(GlobalContext* globalCtx, Gfx* dList, s32 alpha) { void EnBlkobj_Draw(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnBlkobj* this = THIS; + EnBlkobj* this = (EnBlkobj*)thisx; s32 illusionAlpha; u32 gameplayFrames; 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 a935441685..e71a4dad1a 100644 --- a/src/overlays/actors/ovl_En_Bom/z_en_bom.c +++ b/src/overlays/actors/ovl_En_Bom/z_en_bom.c @@ -10,8 +10,6 @@ #define FLAGS 0x00000030 -#define THIS ((EnBom*)thisx) - void EnBom_Init(Actor* thisx, GlobalContext* globalCtx); void EnBom_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnBom_Update(Actor* thisx, GlobalContext* globalCtx); @@ -90,7 +88,7 @@ void EnBom_SetupAction(EnBom* this, EnBomActionFunc actionFunc) { } void EnBom_Init(Actor* thisx, GlobalContext* globalCtx) { - EnBom* this = THIS; + EnBom* this = (EnBom*)thisx; Actor_ProcessInitChain(thisx, sInitChain); ActorShape_Init(&thisx->shape, 700.0f, ActorShadow_DrawCircle, 16.0f); @@ -114,7 +112,7 @@ void EnBom_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnBom_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnBom* this = THIS; + EnBom* this = (EnBom*)thisx; Collider_DestroyJntSph(globalCtx, &this->explosionCollider); Collider_DestroyCylinder(globalCtx, &this->bombCollider); @@ -228,7 +226,7 @@ void EnBom_Update(Actor* thisx, GlobalContext* globalCtx2) { Color_RGBA8 dustColor = { 255, 255, 255, 255 }; s32 pad; GlobalContext* globalCtx = globalCtx2; - EnBom* this = THIS; + EnBom* this = (EnBom*)thisx; thisx->gravity = -1.2f; @@ -359,7 +357,7 @@ void EnBom_Update(Actor* thisx, GlobalContext* globalCtx2) { void EnBom_Draw(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnBom* this = THIS; + EnBom* this = (EnBom*)thisx; if (1) {} 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 8865372b1b..de2ef511de 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 @@ -6,8 +6,6 @@ #define FLAGS 0x08000039 -#define THIS ((EnBomBowlMan*)thisx) - typedef enum { /* 0 */ CHU_GIRL_EYES_ASLEEP, /* 1 */ CHU_GIRL_EYES_OPEN_SLOWLY, @@ -52,7 +50,7 @@ void EnBomBowlMan_Init(Actor* thisx, GlobalContext* globalCtx2) { static f32 cuccoColliderDims[][3] = { { 16.0f, 46.0f, 0.0f }, { 36.0f, 56.0f, 0.0f } }; static Vec3f cuccoSpawnPos[] = { { 60, -60, -430 }, { 0, -120, -620 } }; static f32 cuccoScales[] = { 0.01f, 0.03f }; - EnBomBowlMan* this = THIS; + EnBomBowlMan* this = (EnBomBowlMan*)thisx; EnSyatekiNiw* cucco; s32 i; GlobalContext* globalCtx = globalCtx2; @@ -469,7 +467,7 @@ void EnBomBowlMan_BeginPlayGame(EnBomBowlMan* this, GlobalContext* globalCtx) { } void EnBomBowlMan_Update(Actor* thisx, GlobalContext* globalCtx) { - EnBomBowlMan* this = THIS; + EnBomBowlMan* this = (EnBomBowlMan*)thisx; this->timer++; this->actor.focus.pos.y = 60.0f; @@ -513,7 +511,7 @@ void EnBomBowlMan_Update(Actor* thisx, GlobalContext* globalCtx) { s32 EnBomBowlMan_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - EnBomBowlMan* this = THIS; + EnBomBowlMan* this = (EnBomBowlMan*)thisx; if (limbIndex == 4) { // head rot->x += this->unk_218.y; @@ -525,7 +523,7 @@ s32 EnBomBowlMan_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** void EnBomBowlMan_Draw(Actor* thisx, GlobalContext* globalCtx) { static void* eyeTextures[] = { gChuGirlEyeOpenTex, gChuGirlEyeHalfTex, gChuGirlEyeClosedTex }; - EnBomBowlMan* this = THIS; + EnBomBowlMan* this = (EnBomBowlMan*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_bom_bowl_man.c", 907); 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 d1956de9d7..ddf32bb43f 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 @@ -5,8 +5,6 @@ #define FLAGS 0x00000010 -#define THIS ((EnBomBowlPit*)thisx) - void EnBomBowlPit_Init(Actor* thisx, GlobalContext* globalCtx); void EnBomBowlPit_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnBomBowlPit_Update(Actor* thisx, GlobalContext* globalCtx); @@ -35,7 +33,7 @@ const ActorInit En_Bom_Bowl_Pit_InitVars = { }; void EnBomBowlPit_Init(Actor* thisx, GlobalContext* globalCtx) { - EnBomBowlPit* this = THIS; + EnBomBowlPit* this = (EnBomBowlPit*)thisx; this->actionFunc = EnBomBowlPit_SetupDetectHit; } @@ -214,7 +212,7 @@ void EnBomBowlPit_Reset(EnBomBowlPit* this, GlobalContext* globalCtx) { } void EnBomBowlPit_Update(Actor* thisx, GlobalContext* globalCtx) { - EnBomBowlPit* this = THIS; + EnBomBowlPit* this = (EnBomBowlPit*)thisx; this->actionFunc(this, 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 d604761646..05e0a90a68 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 @@ -4,8 +4,6 @@ #define FLAGS 0x00000010 -#define THIS ((EnBomChu*)thisx) - #define BOMBCHU_SCALE 0.01f void EnBomChu_Init(Actor* thisx, GlobalContext* globalCtx); @@ -66,7 +64,7 @@ void EnBomChu_Init(Actor* thisx, GlobalContext* globalCtx) { static u8 p2StartColor[] = { 200, 0, 0, 130 }; static u8 p1EndColor[] = { 150, 0, 0, 100 }; static u8 p2EndColor[] = { 100, 0, 0, 50 }; - EnBomChu* this = THIS; + EnBomChu* this = (EnBomChu*)thisx; EffectBlureInit1 blureInit; s32 i; @@ -96,7 +94,7 @@ void EnBomChu_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnBomChu_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnBomChu* this = THIS; + EnBomChu* this = (EnBomChu*)thisx; Effect_Delete(globalCtx, this->blure1Index); Effect_Delete(globalCtx, this->blure2Index); @@ -389,7 +387,7 @@ void EnBomChu_Update(Actor* thisx, GlobalContext* globalCtx2) { static Vec3f blureP2LeftModel = { 12.0f, 0.0f, -5.0f }; static Vec3f blureP2RightModel = { -12.0f, 0.0f, -5.0f }; GlobalContext* globalCtx = globalCtx2; - EnBomChu* this = THIS; + EnBomChu* this = (EnBomChu*)thisx; s16 yaw; f32 sin; f32 cos; @@ -480,7 +478,7 @@ void EnBomChu_Update(Actor* thisx, GlobalContext* globalCtx2) { void EnBomChu_Draw(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnBomChu* this = THIS; + EnBomChu* this = (EnBomChu*)thisx; f32 colorIntensity; s32 blinkHalfPeriod; s32 blinkTime; 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 e64785fba6..530e362d93 100644 --- a/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c +++ b/src/overlays/actors/ovl_En_Bombf/z_en_bombf.c @@ -10,8 +10,6 @@ #define FLAGS 0x00000011 -#define THIS ((EnBombf*)thisx) - void EnBombf_Init(Actor* thisx, GlobalContext* globalCtx); void EnBombf_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnBombf_Update(Actor* thisx, GlobalContext* globalCtx); @@ -89,7 +87,7 @@ void EnBombf_SetupAction(EnBombf* this, EnBombfActionFunc actionFunc) { void EnBombf_Init(Actor* thisx, GlobalContext* globalCtx) { f32 shapeUnk10 = 0.0f; s32 pad; - EnBombf* this = THIS; + EnBombf* this = (EnBombf*)thisx; Actor_SetScale(thisx, 0.01f); this->unk_200 = 1; @@ -133,7 +131,7 @@ void EnBombf_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnBombf_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnBombf* this = THIS; + EnBombf* this = (EnBombf*)thisx; Collider_DestroyCylinder(globalCtx, &this->bombCollider); Collider_DestroyJntSph(globalCtx, &this->explosionCollider); @@ -322,7 +320,7 @@ void EnBombf_Update(Actor* thisx, GlobalContext* globalCtx) { Vec3f dustAccel = { 0.0f, 0.6f, 0.0f }; Color_RGBA8 dustColor = { 255, 255, 255, 255 }; s32 pad[2]; - EnBombf* this = THIS; + EnBombf* this = (EnBombf*)thisx; if ((this->unk_200 != 0) && (this->timer != 0)) { this->timer--; @@ -481,7 +479,7 @@ Gfx* EnBombf_NewMtxDList(GraphicsContext* gfxCtx, GlobalContext* globalCtx) { void EnBombf_Draw(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnBombf* this = THIS; + EnBombf* this = (EnBombf*)thisx; if (1) {} 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 b382329c67..17a031e1e7 100644 --- a/src/overlays/actors/ovl_En_Boom/z_en_boom.c +++ b/src/overlays/actors/ovl_En_Boom/z_en_boom.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000030 -#define THIS ((EnBoom*)thisx) - void EnBoom_Init(Actor* thisx, GlobalContext* globalCtx); void EnBoom_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnBoom_Update(Actor* thisx, GlobalContext* globalCtx); @@ -60,7 +58,7 @@ void EnBoom_SetupAction(EnBoom* this, EnBoomActionFunc actionFunc) { } void EnBoom_Init(Actor* thisx, GlobalContext* globalCtx) { - EnBoom* this = THIS; + EnBoom* this = (EnBoom*)thisx; EffectBlureInit1 blure; this->actor.room = -1; @@ -100,7 +98,7 @@ void EnBoom_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnBoom_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnBoom* this = THIS; + EnBoom* this = (EnBoom*)thisx; Effect_Delete(globalCtx, this->effectIndex); Collider_DestroyQuad(globalCtx, &this->collider); @@ -239,7 +237,7 @@ void EnBoom_Fly(EnBoom* this, GlobalContext* globalCtx) { } void EnBoom_Update(Actor* thisx, GlobalContext* globalCtx) { - EnBoom* this = THIS; + EnBoom* this = (EnBoom*)thisx; Player* player = GET_PLAYER(globalCtx); if (!(player->stateFlags1 & 0x20000000)) { @@ -252,7 +250,7 @@ void EnBoom_Update(Actor* thisx, GlobalContext* globalCtx) { void EnBoom_Draw(Actor* thisx, GlobalContext* globalCtx) { static Vec3f sMultVec1 = { -960.0f, 0.0f, 0.0f }; static Vec3f sMultVec2 = { 960.0f, 0.0f, 0.0f }; - EnBoom* this = THIS; + EnBoom* this = (EnBoom*)thisx; Vec3f vec1; Vec3f vec2; 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 f4142cad5e..b3d574ee04 100644 --- a/src/overlays/actors/ovl_En_Box/z_en_box.c +++ b/src/overlays/actors/ovl_En_Box/z_en_box.c @@ -3,8 +3,6 @@ #define FLAGS 0x00000000 -#define THIS ((EnBox*)thisx) - // movement flags /* @@ -92,7 +90,7 @@ void EnBox_ClipToGround(EnBox* this, GlobalContext* globalCtx) { void EnBox_Init(Actor* thisx, GlobalContext* globalCtx2) { GlobalContext* globalCtx = globalCtx2; - EnBox* this = THIS; + EnBox* this = (EnBox*)thisx; AnimationHeader* anim; CollisionHeader* colHeader; f32 animFrameStart; @@ -189,7 +187,7 @@ void EnBox_Init(Actor* thisx, GlobalContext* globalCtx2) { } void EnBox_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnBox* this = THIS; + EnBox* this = (EnBox*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); } @@ -511,7 +509,7 @@ void EnBox_SpawnIceSmoke(EnBox* this, GlobalContext* globalCtx) { } void EnBox_Update(Actor* thisx, GlobalContext* globalCtx) { - EnBox* this = THIS; + EnBox* this = (EnBox*)thisx; if (this->movementFlags & ENBOX_MOVE_STICK_TO_GROUND) { this->movementFlags &= ~ENBOX_MOVE_STICK_TO_GROUND; @@ -543,7 +541,7 @@ void EnBox_Update(Actor* thisx, GlobalContext* globalCtx) { } void EnBox_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx, Gfx** gfx) { - EnBox* this = THIS; + EnBox* this = (EnBox*)thisx; s32 pad; if (limbIndex == 1) { @@ -615,7 +613,7 @@ Gfx* func_809CA518(GraphicsContext* gfxCtx) { } void EnBox_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnBox* this = THIS; + EnBox* this = (EnBox*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_box.c", 1581); 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 96d1d8a53c..4245d1851c 100644 --- a/src/overlays/actors/ovl_En_Brob/z_en_brob.c +++ b/src/overlays/actors/ovl_En_Brob/z_en_brob.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000005 -#define THIS ((EnBrob*)thisx) - void EnBrob_Init(Actor* thisx, GlobalContext* globalCtx); void EnBrob_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnBrob_Update(Actor* thisx, GlobalContext* globalCtx); @@ -60,7 +58,7 @@ static CollisionCheckInfoInit sColChkInfoInit = { 0, 60, 120, MASS_IMMOVABLE }; void EnBrob_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnBrob* this = THIS; + EnBrob* this = (EnBrob*)thisx; CollisionHeader* colHeader = NULL; SkelAnime_InitFlex(globalCtx, &this->skelAnime, &object_brob_Skel_0015D8, &object_brob_Anim_001750, @@ -98,7 +96,7 @@ void EnBrob_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnBrob_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnBrob* this = THIS; + EnBrob* this = (EnBrob*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); Collider_DestroyCylinder(globalCtx, &this->colliders[0]); @@ -258,7 +256,7 @@ void func_809CB458(EnBrob* this, GlobalContext* globalCtx) { void EnBrob_Update(Actor* thisx, GlobalContext* globalCtx2) { GlobalContext* globalCtx = globalCtx2; - EnBrob* this = THIS; + EnBrob* this = (EnBrob*)thisx; s32 i; s32 acHits[2]; @@ -305,7 +303,7 @@ void EnBrob_Update(Actor* thisx, GlobalContext* globalCtx2) { } void EnBrob_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) { - EnBrob* this = THIS; + EnBrob* this = (EnBrob*)thisx; MtxF mtx; Matrix_Get(&mtx); @@ -321,7 +319,7 @@ void EnBrob_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, V } void EnBrob_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnBrob* this = THIS; + EnBrob* this = (EnBrob*)thisx; func_80093D18(globalCtx->state.gfxCtx); Matrix_Translate(0.0f, this->unk_1AE, 0.0f, MTXMODE_APPLY); 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 62f4458ad5..80288b38e1 100644 --- a/src/overlays/actors/ovl_En_Bubble/z_en_bubble.c +++ b/src/overlays/actors/ovl_En_Bubble/z_en_bubble.c @@ -3,8 +3,6 @@ #define FLAGS 0x00000001 -#define THIS ((EnBubble*)thisx) - void EnBubble_Init(Actor* thisx, GlobalContext* globalCtx); void EnBubble_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnBubble_Update(Actor* thisx, GlobalContext* globalCtx); @@ -332,7 +330,7 @@ void func_809CC774(EnBubble* this) { } void EnBubble_Init(Actor* thisx, GlobalContext* globalCtx) { - EnBubble* this = THIS; + EnBubble* this = (EnBubble*)thisx; u32 pad; ActorShape_Init(&this->actor.shape, 16.0f, ActorShadow_DrawCircle, 0.2f); @@ -352,7 +350,7 @@ void EnBubble_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnBubble_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnBubble* this = THIS; + EnBubble* this = (EnBubble*)thisx; Collider_DestroyJntSph(globalCtx, &this->colliderSphere); } @@ -398,7 +396,7 @@ void EnBubble_Regrow(EnBubble* this, GlobalContext* globalCtx) { } void EnBubble_Update(Actor* thisx, GlobalContext* globalCtx) { - EnBubble* this = THIS; + EnBubble* this = (EnBubble*)thisx; func_8002D7EC(&this->actor); Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 16.0f, 16.0f, 0.0f, 7); @@ -407,7 +405,7 @@ void EnBubble_Update(Actor* thisx, GlobalContext* globalCtx) { } void EnBubble_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnBubble* this = THIS; + EnBubble* this = (EnBubble*)thisx; u32 pad; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_bubble.c", 1175); 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 21e7f57c62..20012aa9dc 100644 --- a/src/overlays/actors/ovl_En_Butte/z_en_butte.c +++ b/src/overlays/actors/ovl_En_Butte/z_en_butte.c @@ -11,8 +11,6 @@ #define FLAGS 0x00000000 -#define THIS ((EnButte*)thisx) - void EnButte_Init(Actor* thisx, GlobalContext* globalCtx); void EnButte_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnButte_Update(Actor* thisx, GlobalContext* globalCtx); @@ -148,7 +146,7 @@ static InitChainEntry sInitChain[] = { }; void EnButte_Init(Actor* thisx, GlobalContext* globalCtx) { - EnButte* this = THIS; + EnButte* this = (EnButte*)thisx; if (this->actor.params == -1) { this->actor.params = 0; @@ -178,7 +176,7 @@ void EnButte_Init(Actor* thisx, GlobalContext* globalCtx) { void EnButte_Destroy(Actor* thisx, GlobalContext* globalCtx2) { GlobalContext* globalCtx = globalCtx2; - EnButte* this = THIS; + EnButte* this = (EnButte*)thisx; Collider_DestroyJntSph(globalCtx, &this->collider); } @@ -385,7 +383,7 @@ void EnButte_WaitToDie(EnButte* this, GlobalContext* globalCtx) { } void EnButte_Update(Actor* thisx, GlobalContext* globalCtx) { - EnButte* this = THIS; + EnButte* this = (EnButte*)thisx; if ((this->actor.child != NULL) && (this->actor.child->update == NULL) && (this->actor.child != &this->actor)) { this->actor.child = NULL; @@ -422,7 +420,7 @@ void EnButte_Update(Actor* thisx, GlobalContext* globalCtx) { } void EnButte_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnButte* this = THIS; + EnButte* this = (EnButte*)thisx; if (this->drawSkelAnime) { func_80093D18(globalCtx->state.gfxCtx); 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 259f85860c..bc9b96e930 100644 --- a/src/overlays/actors/ovl_En_Bw/z_en_bw.c +++ b/src/overlays/actors/ovl_En_Bw/z_en_bw.c @@ -10,8 +10,6 @@ #define FLAGS 0x00000015 -#define THIS ((EnBw*)thisx) - void EnBw_Init(Actor* thisx, GlobalContext* globalCtx); void EnBw_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnBw_Update(Actor* thisx, GlobalContext* globalCtx); @@ -129,7 +127,7 @@ void EnBw_SetupAction(EnBw* this, EnBwActionFunc actionFunc) { } void EnBw_Init(Actor* thisx, GlobalContext* globalCtx) { - EnBw* this = THIS; + EnBw* this = (EnBw*)thisx; Actor_SetScale(&this->actor, 0.012999999f); this->actor.naviEnemyId = 0x23; @@ -157,7 +155,7 @@ void EnBw_Init(Actor* thisx, GlobalContext* globalCtx) { void EnBw_Destroy(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnBw* this = THIS; + EnBw* this = (EnBw*)thisx; Collider_DestroyCylinder(globalCtx, &this->collider1); Collider_DestroyCylinder(globalCtx, &this->collider2); @@ -739,7 +737,7 @@ void func_809D0584(EnBw* this, GlobalContext* globalCtx) { void EnBw_Update(Actor* thisx, GlobalContext* globalCtx2) { GlobalContext* globalCtx = globalCtx2; - EnBw* this = THIS; + EnBw* this = (EnBw*)thisx; Vec3f velocity = { 0.0f, 0.0f, 0.0f }; Vec3f accel = { 0.0f, 0.0f, 0.0f }; s32 pad[3]; // probably an unused Vec3f @@ -809,7 +807,7 @@ void EnBw_Update(Actor* thisx, GlobalContext* globalCtx2) { s32 EnBw_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx, Gfx** gfx) { - EnBw* this = THIS; + EnBw* this = (EnBw*)thisx; if (limbIndex == 1) { gSPSegment((*gfx)++, 0x09, @@ -842,7 +840,7 @@ static Vec3f sIceOffsets[] = { void EnBw_Draw(Actor* thisx, GlobalContext* globalCtx2) { Vec3f spAC = { 0.0f, 0.0f, 0.0f }; GlobalContext* globalCtx = globalCtx2; - EnBw* this = THIS; + EnBw* this = (EnBw*)thisx; Vec3f icePos; s32 iceIndex; 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 c8c24da4a0..79a3b47d7c 100644 --- a/src/overlays/actors/ovl_En_Bx/z_en_bx.c +++ b/src/overlays/actors/ovl_En_Bx/z_en_bx.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000010 -#define THIS ((EnBx*)thisx) - void EnBx_Init(Actor* thisx, GlobalContext* globalCtx); void EnBx_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnBx_Update(Actor* thisx, GlobalContext* globalCtx); @@ -69,7 +67,7 @@ static ColliderQuadInit sQuadInit = { }; void EnBx_Init(Actor* thisx, GlobalContext* globalCtx) { - EnBx* this = THIS; + EnBx* this = (EnBx*)thisx; Vec3f sp48 = { 0.015f, 0.015f, 0.015f }; Vec3f sp3C = { 0.0f, 0.0f, 0.0f }; static InitChainEntry sInitChain[] = { @@ -107,7 +105,7 @@ void EnBx_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnBx_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnBx* this = THIS; + EnBx* this = (EnBx*)thisx; Collider_DestroyCylinder(globalCtx, &this->collider); } @@ -119,7 +117,7 @@ void func_809D1D0C(Actor* thisx, GlobalContext* globalCtx) { static Vec3f D_809D254C = { -8000.0f, 10000.0f, 2500.0f }; Vec3f sp44; Vec3f sp38; - EnBx* this = THIS; + EnBx* this = (EnBx*)thisx; Matrix_MultVec3f(&D_809D2540, &sp44); Matrix_MultVec3f(&D_809D254C, &sp38); @@ -130,7 +128,7 @@ void func_809D1D0C(Actor* thisx, GlobalContext* globalCtx) { } void EnBx_Update(Actor* thisx, GlobalContext* globalCtx) { - EnBx* this = THIS; + EnBx* this = (EnBx*)thisx; Player* player = GET_PLAYER(globalCtx); s32 i; s16 tmp32; @@ -198,7 +196,7 @@ void EnBx_Update(Actor* thisx, GlobalContext* globalCtx) { void EnBx_Draw(Actor* thisx, GlobalContext* globalCtx) { static void* D_809D2560[] = { 0x060024F0, 0x060027F0, 0x060029F0 }; - EnBx* this = THIS; + EnBx* this = (EnBx*)thisx; s32 pad; Mtx* mtx = Graph_Alloc(globalCtx->state.gfxCtx, 4 * sizeof(Mtx)); s16 i; 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 cd15ac0053..ef8f38d217 100644 --- a/src/overlays/actors/ovl_En_Changer/z_en_changer.c +++ b/src/overlays/actors/ovl_En_Changer/z_en_changer.c @@ -11,8 +11,6 @@ #define FLAGS 0x00000000 -#define THIS ((EnChanger*)thisx) - typedef enum { /* 0 */ CHEST_LEFT, /* 1 */ CHEST_RIGHT @@ -67,7 +65,7 @@ void EnChanger_Destroy(Actor* thisx, GlobalContext* globalCtx) { } void EnChanger_Init(Actor* thisx, GlobalContext* globalCtx2) { - EnChanger* this = THIS; + EnChanger* this = (EnChanger*)thisx; GlobalContext* globalCtx = globalCtx2; s16 leftChestParams; s16 rightChestParams; @@ -286,7 +284,7 @@ void EnChanger_SetHeartPieceFlag(EnChanger* this, GlobalContext* globalCtx) { } void EnChanger_Update(Actor* thisx, GlobalContext* globalCtx) { - EnChanger* this = THIS; + EnChanger* this = (EnChanger*)thisx; this->actionFunc(this, globalCtx); 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 d3eea7a6f0..ebace9bf06 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 @@ -2,8 +2,6 @@ #define FLAGS 0x00000035 -#define THIS ((EnClearTag*)thisx) - void EnClearTag_Init(Actor* thisx, GlobalContext* globalCtx); void EnClearTag_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnClearTag_Update(Actor* thisx, GlobalContext* globalCtx); @@ -218,7 +216,7 @@ void EnClearTag_CreateFlashEffect(GlobalContext* globalCtx, Vec3f* position, f32 * This just destroys the collider. */ void EnClearTag_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnClearTag* this = THIS; + EnClearTag* this = (EnClearTag*)thisx; Collider_DestroyCylinder(globalCtx, &this->collider); } @@ -228,7 +226,7 @@ void EnClearTag_Destroy(Actor* thisx, GlobalContext* globalCtx) { * This allocates a collider, initializes effects, and sets up ClearTag instance data. */ void EnClearTag_Init(Actor* thisx, GlobalContext* globalCtx) { - EnClearTag* this = THIS; + EnClearTag* this = (EnClearTag*)thisx; s32 defaultCutsceneTimer = 100; s16 i; s16 j; @@ -318,7 +316,7 @@ void EnClearTag_Update(Actor* thisx, GlobalContext* globalCtx2) { s16 xRotationTarget; s16 rotationScale; GlobalContext* globalCtx = globalCtx2; - EnClearTag* this = THIS; + EnClearTag* this = (EnClearTag*)thisx; Player* player = GET_PLAYER(globalCtx); this->frameCounter++; @@ -681,7 +679,7 @@ void EnClearTag_Update(Actor* thisx, GlobalContext* globalCtx2) { */ void EnClearTag_Draw(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnClearTag* this = THIS; + EnClearTag* this = (EnClearTag*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_clear_tag.c", 983); if (this->drawMode != CLEAR_TAG_DRAW_MODE_EFFECT) { 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 ca9f32bdd4..56a71b8704 100644 --- a/src/overlays/actors/ovl_En_Cow/z_en_cow.c +++ b/src/overlays/actors/ovl_En_Cow/z_en_cow.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000009 -#define THIS ((EnCow*)thisx) - void EnCow_Init(Actor* thisx, GlobalContext* globalCtx); void EnCow_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnCow_Update(Actor* thisx, GlobalContext* globalCtx); @@ -104,7 +102,7 @@ void func_809DEF94(EnCow* this) { } void EnCow_Init(Actor* thisx, GlobalContext* globalCtx) { - EnCow* this = THIS; + EnCow* this = (EnCow*)thisx; s32 pad; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 72.0f); @@ -152,7 +150,7 @@ void EnCow_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnCow_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnCow* this = THIS; + EnCow* this = (EnCow*)thisx; if (this->actor.params == 0) { Collider_DestroyCylinder(globalCtx, &this->colliders[0]); @@ -295,7 +293,7 @@ void func_809DFA84(EnCow* this, GlobalContext* globalCtx) { } void EnCow_Update(Actor* thisx, GlobalContext* globalCtx2) { - EnCow* this = THIS; + EnCow* this = (EnCow*)thisx; GlobalContext* globalCtx = globalCtx2; s16 targetX; s16 targetY; @@ -342,7 +340,7 @@ void EnCow_Update(Actor* thisx, GlobalContext* globalCtx2) { } void func_809DFE98(Actor* thisx, GlobalContext* globalCtx) { - EnCow* this = THIS; + EnCow* this = (EnCow*)thisx; s32 pad; if (SkelAnime_Update(&this->skelAnime) != 0) { @@ -358,7 +356,7 @@ void func_809DFE98(Actor* thisx, GlobalContext* globalCtx) { } s32 EnCow_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - EnCow* this = THIS; + EnCow* this = (EnCow*)thisx; if (limbIndex == 2) { rot->y += this->someRot.y; @@ -371,7 +369,7 @@ s32 EnCow_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, } void EnCow_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) { - EnCow* this = THIS; + EnCow* this = (EnCow*)thisx; if (limbIndex == 2) { Matrix_MultVec3f(&D_809E010C, &this->actor.focus.pos); @@ -379,7 +377,7 @@ void EnCow_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Ve } void EnCow_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnCow* this = THIS; + EnCow* this = (EnCow*)thisx; func_800943C8(globalCtx->state.gfxCtx); SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, @@ -387,7 +385,7 @@ void EnCow_Draw(Actor* thisx, GlobalContext* globalCtx) { } void func_809E0070(Actor* thisx, GlobalContext* globalCtx) { - EnCow* this = THIS; + EnCow* this = (EnCow*)thisx; func_800943C8(globalCtx->state.gfxCtx); SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, 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 1f93f6ed9d..0dceef23be 100644 --- a/src/overlays/actors/ovl_En_Crow/z_en_crow.c +++ b/src/overlays/actors/ovl_En_Crow/z_en_crow.c @@ -3,8 +3,6 @@ #define FLAGS 0x00005005 -#define THIS ((EnCrow*)thisx) - void EnCrow_Init(Actor* thisx, GlobalContext* globalCtx); void EnCrow_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnCrow_Update(Actor* thisx, GlobalContext* globalCtx); @@ -108,7 +106,7 @@ static InitChainEntry sInitChain[] = { static Vec3f sHeadVec = { 2500.0f, 0.0f, 0.0f }; void EnCrow_Init(Actor* thisx, GlobalContext* globalCtx) { - EnCrow* this = THIS; + EnCrow* this = (EnCrow*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); SkelAnime_InitFlex(globalCtx, &this->skelAnime, &gGuaySkel, &gGuayFlyAnim, this->jointTable, this->morphTable, 9); @@ -122,7 +120,7 @@ void EnCrow_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnCrow_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnCrow* this = THIS; + EnCrow* this = (EnCrow*)thisx; Collider_DestroyJntSph(globalCtx, &this->collider); } @@ -428,7 +426,7 @@ void EnCrow_UpdateDamage(EnCrow* this, GlobalContext* globalCtx) { } void EnCrow_Update(Actor* thisx, GlobalContext* globalCtx) { - EnCrow* this = THIS; + EnCrow* this = (EnCrow*)thisx; f32 pad; f32 height; f32 scale; @@ -476,7 +474,7 @@ void EnCrow_Update(Actor* thisx, GlobalContext* globalCtx) { } s32 EnCrow_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - EnCrow* this = THIS; + EnCrow* this = (EnCrow*)thisx; if (this->actor.colChkInfo.health != 0) { if (limbIndex == 7) { @@ -489,7 +487,7 @@ s32 EnCrow_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList } void EnCrow_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) { - EnCrow* this = THIS; + EnCrow* this = (EnCrow*)thisx; Vec3f* vec; if (limbIndex == 2) { @@ -503,7 +501,7 @@ void EnCrow_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, V } void EnCrow_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnCrow* this = THIS; + EnCrow* this = (EnCrow*)thisx; func_80093D18(globalCtx->state.gfxCtx); SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, 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 55b280fcba..3846cfc2c3 100644 --- a/src/overlays/actors/ovl_En_Cs/z_en_cs.c +++ b/src/overlays/actors/ovl_En_Cs/z_en_cs.c @@ -4,8 +4,6 @@ #define FLAGS 0x00000009 -#define THIS ((EnCs*)thisx) - void EnCs_Init(Actor* thisx, GlobalContext* globalCtx); void EnCs_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnCs_Update(Actor* thisx, GlobalContext* globalCtx); @@ -116,7 +114,7 @@ void EnCs_SetAnimFromIndex(EnCs* this, s32 animIndex, s32* currentAnimIndex) { } void EnCs_Init(Actor* thisx, GlobalContext* globalCtx) { - EnCs* this = THIS; + EnCs* this = (EnCs*)thisx; s32 pad; if (!IS_DAY) { @@ -152,7 +150,7 @@ void EnCs_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnCs_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnCs* this = THIS; + EnCs* this = (EnCs*)thisx; Collider_DestroyCylinder(globalCtx, &this->collider); } @@ -412,7 +410,7 @@ void EnCs_Talk(EnCs* this, GlobalContext* globalCtx) { void EnCs_Update(Actor* thisx, GlobalContext* globalCtx) { static s32 eyeBlinkFrames[] = { 70, 1, 1 }; - EnCs* this = THIS; + EnCs* this = (EnCs*)thisx; s32 pad; if (this->currentAnimIndex == 0) { @@ -453,7 +451,7 @@ void EnCs_Draw(Actor* thisx, GlobalContext* globalCtx) { gGraveyardKidEyesHalfTex, gGraveyardKidEyesClosedTex, }; - EnCs* this = THIS; + EnCs* this = (EnCs*)thisx; s32 pad; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_cs.c", 968); @@ -484,7 +482,7 @@ void EnCs_Draw(Actor* thisx, GlobalContext* globalCtx) { } s32 EnCs_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - EnCs* this = THIS; + EnCs* this = (EnCs*)thisx; if (this->flag & 1) { switch (limbIndex) { @@ -504,7 +502,7 @@ s32 EnCs_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, void EnCs_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) { static Vec3f D_809E2970 = { 500.0f, 800.0f, 0.0f }; - EnCs* this = THIS; + EnCs* this = (EnCs*)thisx; if (limbIndex == 15) { Matrix_MultVec3f(&D_809E2970, &this->actor.focus.pos); 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 d2c211d035..406f9e0839 100644 --- a/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c +++ b/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c @@ -4,8 +4,6 @@ #define FLAGS 0x00000019 -#define THIS ((EnDaiku*)thisx) - typedef struct { AnimationHeader* anim; f32 unk_4; @@ -156,7 +154,7 @@ void EnDaiku_Change(EnDaiku* this, s32 animIndex, s32* currentAnimIndex) { } void EnDaiku_Init(Actor* thisx, GlobalContext* globalCtx) { - EnDaiku* this = THIS; + EnDaiku* this = (EnDaiku*)thisx; s32 pad; s32 noKill = true; s32 isFree = false; @@ -223,7 +221,7 @@ void EnDaiku_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnDaiku_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnDaiku* this = THIS; + EnDaiku* this = (EnDaiku*)thisx; Collider_DestroyCylinder(globalCtx, &this->collider); } @@ -564,7 +562,7 @@ void EnDaiku_EscapeRun(EnDaiku* this, GlobalContext* globalCtx) { } void EnDaiku_Update(Actor* thisx, GlobalContext* globalCtx) { - EnDaiku* this = THIS; + EnDaiku* this = (EnDaiku*)thisx; s32 curFrame; Player* player = GET_PLAYER(globalCtx); @@ -594,7 +592,7 @@ void EnDaiku_Update(Actor* thisx, GlobalContext* globalCtx) { } void EnDaiku_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnDaiku* this = THIS; + EnDaiku* this = (EnDaiku*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_daiku.c", 1227); @@ -617,7 +615,7 @@ void EnDaiku_Draw(Actor* thisx, GlobalContext* globalCtx) { } s32 EnDaiku_OverrideLimbDraw(GlobalContext* globalCtx, s32 limb, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - EnDaiku* this = THIS; + EnDaiku* this = (EnDaiku*)thisx; switch (limb) { case 8: // torso @@ -637,7 +635,7 @@ void EnDaiku_PostLimbDraw(GlobalContext* globalCtx, s32 limb, Gfx** dList, Vec3s static Gfx* hairDLists[] = { object_daiku_DL_005BD0, object_daiku_DL_005AC0, object_daiku_DL_005990, object_daiku_DL_005880 }; static Vec3f targetPosHeadLocal = { 700, 1100, 0 }; - EnDaiku* this = THIS; + EnDaiku* this = (EnDaiku*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_daiku.c", 1323); 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 a2e3f02445..1eebd92c9e 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 @@ -9,8 +9,6 @@ #define FLAGS 0x00000019 -#define THIS ((EnDaikuKakariko*)thisx) - typedef enum { /* 0x0 */ CARPENTER_ICHIRO, // Red and purple pants, normal hair /* 0x1 */ CARPENTER_SABOORO, // Light blue pants @@ -119,7 +117,7 @@ void EnDaikuKakariko_SetAnimFromIndex(EnDaikuKakariko* this, s32 animIndex, s32* void EnDaikuKakariko_Init(Actor* thisx, GlobalContext* globalCtx) { static u16 initFlags[] = { 0x0080, 0x00B0, 0x0070, 0x0470 }; // List of inital values for this->flags - EnDaikuKakariko* this = THIS; + EnDaikuKakariko* this = (EnDaikuKakariko*)thisx; s32 pad; if (LINK_AGE_IN_YEARS == YEARS_CHILD) { @@ -197,7 +195,7 @@ void EnDaikuKakariko_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnDaikuKakariko_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnDaikuKakariko* this = THIS; + EnDaikuKakariko* this = (EnDaikuKakariko*)thisx; Collider_DestroyCylinder(globalCtx, &this->collider); } @@ -445,7 +443,7 @@ void EnDaikuKakariko_Run(EnDaikuKakariko* this, GlobalContext* globalCtx) { } void EnDaikuKakariko_Update(Actor* thisx, GlobalContext* globalCtx) { - EnDaikuKakariko* this = THIS; + EnDaikuKakariko* this = (EnDaikuKakariko*)thisx; s32 pad; Player* player = GET_PLAYER(globalCtx); s32 pad2; @@ -487,7 +485,7 @@ void EnDaikuKakariko_Update(Actor* thisx, GlobalContext* globalCtx) { s32 EnDaikuKakariko_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - EnDaikuKakariko* this = THIS; + EnDaikuKakariko* this = (EnDaikuKakariko*)thisx; Vec3s angle; switch (limbIndex) { @@ -520,7 +518,7 @@ void EnDaikuKakariko_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** static Gfx* carpenterHeadDLists[] = { object_daiku_DL_005BD0, object_daiku_DL_005AC0, object_daiku_DL_005990, object_daiku_DL_005880 }; static Vec3f unkVec = { 700.0f, 1100.0f, 0.0f }; - EnDaikuKakariko* this = THIS; + EnDaikuKakariko* this = (EnDaikuKakariko*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_daiku_kakariko.c", 1104); @@ -533,7 +531,7 @@ void EnDaikuKakariko_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** } void EnDaikuKakariko_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnDaikuKakariko* this = THIS; + EnDaikuKakariko* this = (EnDaikuKakariko*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_daiku_kakariko.c", 1124); 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 526e82aefb..60c8ec2dea 100644 --- a/src/overlays/actors/ovl_En_Dekubaba/z_en_dekubaba.c +++ b/src/overlays/actors/ovl_En_Dekubaba/z_en_dekubaba.c @@ -5,8 +5,6 @@ #define FLAGS 0x00000005 -#define THIS ((EnDekubaba*)thisx) - void EnDekubaba_Init(Actor* thisx, GlobalContext* globalCtx); void EnDekubaba_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnDekubaba_Update(Actor* thisx, GlobalContext* globalCtx); @@ -223,7 +221,7 @@ static InitChainEntry sInitChain[] = { }; void EnDekubaba_Init(Actor* thisx, GlobalContext* globalCtx) { - EnDekubaba* this = THIS; + EnDekubaba* this = (EnDekubaba*)thisx; s32 i; Actor_ProcessInitChain(&this->actor, sInitChain); @@ -275,7 +273,7 @@ void EnDekubaba_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnDekubaba_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnDekubaba* this = THIS; + EnDekubaba* this = (EnDekubaba*)thisx; Collider_DestroyJntSph(globalCtx, &this->collider); } @@ -1111,7 +1109,7 @@ void EnDekubaba_UpdateDamage(EnDekubaba* this, GlobalContext* globalCtx) { void EnDekubaba_Update(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnDekubaba* this = THIS; + EnDekubaba* this = (EnDekubaba*)thisx; if (this->collider.base.atFlags & AT_HIT) { this->collider.base.atFlags &= ~AT_HIT; @@ -1267,7 +1265,7 @@ void EnDekubaba_DrawBaseShadow(EnDekubaba* this, GlobalContext* globalCtx) { } void EnDekubaba_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) { - EnDekubaba* this = THIS; + EnDekubaba* this = (EnDekubaba*)thisx; if (limbIndex == 1) { Collider_UpdateSpheres(limbIndex, &this->collider); @@ -1275,7 +1273,7 @@ void EnDekubaba_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dLis } void EnDekubaba_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnDekubaba* this = THIS; + EnDekubaba* this = (EnDekubaba*)thisx; f32 scale; if (1) {} 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 0084b03932..dea4ad70b0 100644 --- a/src/overlays/actors/ovl_En_Dekunuts/z_en_dekunuts.c +++ b/src/overlays/actors/ovl_En_Dekunuts/z_en_dekunuts.c @@ -10,8 +10,6 @@ #define FLAGS 0x00000005 -#define THIS ((EnDekunuts*)thisx) - #define DEKUNUTS_FLOWER 10 void EnDekunuts_Init(Actor* thisx, GlobalContext* globalCtx); @@ -108,7 +106,7 @@ static InitChainEntry sInitChain[] = { }; void EnDekunuts_Init(Actor* thisx, GlobalContext* globalCtx) { - EnDekunuts* this = THIS; + EnDekunuts* this = (EnDekunuts*)thisx; s32 pad; Actor_ProcessInitChain(&this->actor, sInitChain); @@ -133,7 +131,7 @@ void EnDekunuts_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnDekunuts_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnDekunuts* this = THIS; + EnDekunuts* this = (EnDekunuts*)thisx; if (this->actor.params != DEKUNUTS_FLOWER) { Collider_DestroyCylinder(globalCtx, &this->collider); @@ -470,7 +468,7 @@ void EnDekunuts_ColliderCheck(EnDekunuts* this, GlobalContext* globalCtx) { } void EnDekunuts_Update(Actor* thisx, GlobalContext* globalCtx) { - EnDekunuts* this = THIS; + EnDekunuts* this = (EnDekunuts*)thisx; s32 pad; if (this->actor.params != DEKUNUTS_FLOWER) { @@ -497,7 +495,7 @@ void EnDekunuts_Update(Actor* thisx, GlobalContext* globalCtx) { s32 EnDekunuts_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - EnDekunuts* this = THIS; + EnDekunuts* this = (EnDekunuts*)thisx; f32 x; f32 y; f32 z; @@ -527,7 +525,7 @@ s32 EnDekunuts_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** d } void EnDekunuts_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnDekunuts* this = THIS; + EnDekunuts* this = (EnDekunuts*)thisx; if (this->actor.params == DEKUNUTS_FLOWER) { Gfx_DrawDListOpa(globalCtx, gDekuNutsFlowerDL); 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 0afc02844d..6774013443 100644 --- a/src/overlays/actors/ovl_En_Dh/z_en_dh.c +++ b/src/overlays/actors/ovl_En_Dh/z_en_dh.c @@ -3,8 +3,6 @@ #define FLAGS 0x00000415 -#define THIS ((EnDh*)thisx) - typedef enum { /* 0 */ DH_WAIT, /* 1 */ DH_RETREAT, @@ -139,7 +137,7 @@ void EnDh_SetupAction(EnDh* this, EnDhActionFunc actionFunc) { } void EnDh_Init(Actor* thisx, GlobalContext* globalCtx) { - EnDh* this = THIS; + EnDh* this = (EnDh*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); this->actor.colChkInfo.damageTable = &D_809EC620; @@ -160,7 +158,7 @@ void EnDh_Init(Actor* thisx, GlobalContext* globalCtx) { void EnDh_Destroy(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnDh* this = THIS; + EnDh* this = (EnDh*)thisx; func_800F5B58(); Collider_DestroyCylinder(globalCtx, &this->collider1); @@ -502,7 +500,7 @@ void EnDh_CollisionCheck(EnDh* this, GlobalContext* globalCtx) { void EnDh_Update(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnDh* this = THIS; + EnDh* this = (EnDh*)thisx; Player* player = GET_PLAYER(globalCtx); s32 pad40; @@ -533,7 +531,7 @@ void EnDh_Update(Actor* thisx, GlobalContext* globalCtx) { void EnDh_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx, Gfx** gfx) { Vec3f headOffset = { 2000.0f, 1000.0f, 0.0f }; - EnDh* this = THIS; + EnDh* this = (EnDh*)thisx; if (limbIndex == 13) { Matrix_MultVec3f(&headOffset, &this->headPos); @@ -546,7 +544,7 @@ void EnDh_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec void EnDh_Draw(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnDh* this = THIS; + EnDh* this = (EnDh*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_dh.c", 1099); if (this->alpha == 255) { 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 fa10dd884d..4f13062536 100644 --- a/src/overlays/actors/ovl_En_Dha/z_en_dha.c +++ b/src/overlays/actors/ovl_En_Dha/z_en_dha.c @@ -10,8 +10,6 @@ #define FLAGS 0x00000015 -#define THIS ((EnDha*)thisx) - void EnDha_Init(Actor* thisx, GlobalContext* globalCtx); void EnDha_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnDha_Update(Actor* thisx, GlobalContext* globalCtx); @@ -154,7 +152,7 @@ void EnDha_SetupAction(EnDha* this, EnDhaActionFunc actionFunc) { } void EnDha_Init(Actor* thisx, GlobalContext* globalCtx) { - EnDha* this = THIS; + EnDha* this = (EnDha*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); this->actor.colChkInfo.damageTable = &sDamageTable; @@ -175,7 +173,7 @@ void EnDha_Init(Actor* thisx, GlobalContext* globalCtx) { void EnDha_Destroy(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnDha* this = THIS; + EnDha* this = (EnDha*)thisx; Collider_DestroyJntSph(globalCtx, &this->collider); } @@ -405,7 +403,7 @@ void EnDha_UpdateHealth(EnDha* this, GlobalContext* globalCtx) { void EnDha_Update(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnDha* this = THIS; + EnDha* this = (EnDha*)thisx; if (this->actor.parent == NULL) { this->actor.parent = Actor_FindNearby(globalCtx, &this->actor, ACTOR_EN_DH, ACTORCAT_ENEMY, 10000.0f); @@ -418,7 +416,7 @@ void EnDha_Update(Actor* thisx, GlobalContext* globalCtx) { } s32 EnDha_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - EnDha* this = THIS; + EnDha* this = (EnDha*)thisx; if (limbIndex == 1) { rot->y = -(s16)(this->limbAngleX[0] + 0x4000); @@ -437,7 +435,7 @@ s32 EnDha_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, void EnDha_OverridePostDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) { Vec3f handVec = { 1100.0f, 0.0f, 0.0f }; Vec3f zeroVec = { 0.0f, 0.0f, 0.0f }; - EnDha* this = THIS; + EnDha* this = (EnDha*)thisx; switch (limbIndex) { case 1: @@ -459,7 +457,7 @@ void EnDha_OverridePostDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList void EnDha_Draw(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnDha* this = THIS; + EnDha* this = (EnDha*)thisx; func_80093D18(globalCtx->state.gfxCtx); SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, 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 894dfc5c66..2e25caee7a 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 @@ -11,8 +11,6 @@ #define FLAGS 0x00000019 -#define THIS ((EnDivingGame*)thisx) - void EnDivingGame_Init(Actor* thisx, GlobalContext* globalCtx); void EnDivingGame_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnDivingGame_Update(Actor* thisx, GlobalContext* globalCtx); @@ -77,7 +75,7 @@ static void* sEyeTextures[] = { }; void EnDivingGame_Init(Actor* thisx, GlobalContext* globalCtx) { - EnDivingGame* this = THIS; + EnDivingGame* this = (EnDivingGame*)thisx; this->actor.gravity = -3.0f; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f); @@ -102,7 +100,7 @@ void EnDivingGame_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnDivingGame_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnDivingGame* this = THIS; + EnDivingGame* this = (EnDivingGame*)thisx; if (this->unk_31F == 0) { gSaveContext.timer1State = 0; @@ -481,7 +479,7 @@ void func_809EEAF8(EnDivingGame* this, GlobalContext* globalCtx) { void EnDivingGame_Update(Actor* thisx, GlobalContext* globalCtx2) { GlobalContext* globalCtx = globalCtx2; - EnDivingGame* this = THIS; + EnDivingGame* this = (EnDivingGame*)thisx; Player* player = GET_PLAYER(globalCtx); Vec3f pos; @@ -538,7 +536,7 @@ Gfx* EnDivingGame_EmptyDList(GraphicsContext* gfxCtx) { s32 EnDivingGame_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - EnDivingGame* this = THIS; + EnDivingGame* this = (EnDivingGame*)thisx; s32 pad; if (limbIndex == 6) { @@ -559,7 +557,7 @@ s32 EnDivingGame_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** } void EnDivingGame_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnDivingGame* this = THIS; + EnDivingGame* this = (EnDivingGame*)thisx; GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_diving_game.c", 1212); 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 71a77088fd..b0deaa4307 100644 --- a/src/overlays/actors/ovl_En_Dns/z_en_dns.c +++ b/src/overlays/actors/ovl_En_Dns/z_en_dns.c @@ -10,8 +10,6 @@ #define FLAGS 0x00000009 -#define THIS ((EnDns*)thisx) - void EnDns_Init(Actor* thisx, GlobalContext* globalCtx); void EnDns_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnDns_Update(Actor* thisx, GlobalContext* globalCtx); @@ -135,7 +133,7 @@ static DnsAnimInfo sAnimInfo[] = { }; void EnDns_Init(Actor* thisx, GlobalContext* globalCtx) { - EnDns* this = THIS; + EnDns* this = (EnDns*)thisx; if (this->actor.params < 0) { // "Function Error (Deku Salesman)" @@ -170,7 +168,7 @@ void EnDns_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnDns_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnDns* this = THIS; + EnDns* this = (EnDns*)thisx; Collider_DestroyCylinder(globalCtx, &this->collider); } @@ -474,7 +472,7 @@ void EnDns_Burrow(EnDns* this, GlobalContext* globalCtx) { } void EnDns_Update(Actor* thisx, GlobalContext* globalCtx) { - EnDns* this = THIS; + EnDns* this = (EnDns*)thisx; s16 pad; this->dustTimer++; @@ -494,7 +492,7 @@ void EnDns_Update(Actor* thisx, GlobalContext* globalCtx) { } void EnDns_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnDns* this = THIS; + EnDns* this = (EnDns*)thisx; func_80093D18(globalCtx->state.gfxCtx); SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, 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 20815d3334..9a3601ebd5 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 @@ -12,8 +12,6 @@ #define FLAGS 0x00000000 -#define THIS ((EnDntDemo*)thisx) - typedef enum { /* 0 */ DNT_LIKE, /* 1 */ DNT_HATE, @@ -72,7 +70,7 @@ void EnDntDemo_Destroy(Actor* thisx, GlobalContext* globalCtx) { void EnDntDemo_Init(Actor* thisx, GlobalContext* globalCtx2) { GlobalContext* globalCtx = globalCtx2; - EnDntDemo* this = THIS; + EnDntDemo* this = (EnDntDemo*)thisx; s32 i; s32 pad; @@ -315,7 +313,7 @@ void EnDntDemo_Prize(EnDntDemo* this, GlobalContext* globalCtx) { void EnDntDemo_Update(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnDntDemo* this = THIS; + EnDntDemo* this = (EnDntDemo*)thisx; if (this->unkTimer2 != 0) { this->unkTimer2--; 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 51a1c583d0..3c491a23d9 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 @@ -12,8 +12,6 @@ #define FLAGS 0x00000019 -#define THIS ((EnDntJiji*)thisx) - void EnDntJiji_Init(Actor* thisx, GlobalContext* globalCtx); void EnDntJiji_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnDntJiji_Update(Actor* thisx, GlobalContext* globalCtx); @@ -74,7 +72,7 @@ static ColliderCylinderInit sCylinderInit = { }; void EnDntJiji_Init(Actor* thisx, GlobalContext* globalCtx) { - EnDntJiji* this = THIS; + EnDntJiji* this = (EnDntJiji*)thisx; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 0.0f); SkelAnime_Init(globalCtx, &this->skelAnime, &gDntJijiSkel, &gDntJijiBurrowAnim, this->jointTable, this->morphTable, @@ -94,7 +92,7 @@ void EnDntJiji_Init(Actor* thisx, GlobalContext* globalCtx) { void EnDntJiji_Destroy(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnDntJiji* this = THIS; + EnDntJiji* this = (EnDntJiji*)thisx; Collider_DestroyCylinder(globalCtx, &this->collider); } @@ -372,7 +370,7 @@ void EnDntJiji_Return(EnDntJiji* this, GlobalContext* globalCtx) { void EnDntJiji_Update(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnDntJiji* this = THIS; + EnDntJiji* this = (EnDntJiji*)thisx; Actor_SetScale(&this->actor, 0.015f); this->unkTimer++; @@ -430,7 +428,7 @@ void EnDntJiji_Update(Actor* thisx, GlobalContext* globalCtx) { void EnDntJiji_Draw(Actor* thisx, GlobalContext* globalCtx) { static void* blinkTex[] = { gDntJijiEyeOpenTex, gDntJijiEyeHalfTex, gDntJijiEyeShutTex }; - EnDntJiji* this = THIS; + EnDntJiji* this = (EnDntJiji*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_dnt_jiji.c", 1019); func_80093D18(globalCtx->state.gfxCtx); 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 4b2dd3068b..c5056a7e33 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 @@ -15,8 +15,6 @@ #define FLAGS 0x00000030 -#define THIS ((EnDntNomal*)thisx) - void EnDntNomal_Init(Actor* thisx, GlobalContext* globalCtx); void EnDntNomal_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnDntNomal_Update(Actor* thisx, GlobalContext* globalCtx); @@ -118,7 +116,7 @@ static Color_RGBA8 sLeafColors[] = { void EnDntNomal_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnDntNomal* this = THIS; + EnDntNomal* this = (EnDntNomal*)thisx; this->type = this->actor.params; if (this->type < ENDNTNOMAL_TARGET) { @@ -161,7 +159,7 @@ void EnDntNomal_Init(Actor* thisx, GlobalContext* globalCtx) { void EnDntNomal_Destroy(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnDntNomal* this = THIS; + EnDntNomal* this = (EnDntNomal*)thisx; if (this->type == ENDNTNOMAL_TARGET) { Collider_DestroyQuad(globalCtx, &this->targetQuad); @@ -739,7 +737,7 @@ void EnDntNomal_StageReturn(EnDntNomal* this, GlobalContext* globalCtx) { void EnDntNomal_Update(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnDntNomal* this = THIS; + EnDntNomal* this = (EnDntNomal*)thisx; if (this->timer1 != 0) { this->timer1--; @@ -823,7 +821,7 @@ void EnDntNomal_Update(Actor* thisx, GlobalContext* globalCtx) { s32 EnDntNomal_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - EnDntNomal* this = THIS; + EnDntNomal* this = (EnDntNomal*)thisx; if ((limbIndex == 1) || (limbIndex == 3) || (limbIndex == 4) || (limbIndex == 5) || (limbIndex == 6)) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_dnt_nomal.c", 1733); @@ -836,7 +834,7 @@ s32 EnDntNomal_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** d } void EnDntNomal_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) { - EnDntNomal* this = THIS; + EnDntNomal* this = (EnDntNomal*)thisx; Vec3f zeroVec = { 0.0f, 0.0f, 0.0f }; if (this->type == ENDNTNOMAL_TARGET) { @@ -850,7 +848,7 @@ void EnDntNomal_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dLis void EnDntNomal_DrawStageScrub(Actor* thisx, GlobalContext* globalCtx) { static void* blinkTex[] = { gDntStageEyeOpenTex, gDntStageEyeHalfTex, gDntStageEyeShutTex }; - EnDntNomal* this = THIS; + EnDntNomal* this = (EnDntNomal*)thisx; Vec3f dustScale = { 0.25f, 0.25f, 0.25f }; s32 pad; @@ -874,7 +872,7 @@ void EnDntNomal_DrawStageScrub(Actor* thisx, GlobalContext* globalCtx) { } void EnDntNomal_DrawTargetScrub(Actor* thisx, GlobalContext* globalCtx) { - EnDntNomal* this = THIS; + EnDntNomal* this = (EnDntNomal*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_dnt_nomal.c", 1833); func_80093D18(globalCtx->state.gfxCtx); 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 c3459331d8..1779be7afe 100644 --- a/src/overlays/actors/ovl_En_Dodojr/z_en_dodojr.c +++ b/src/overlays/actors/ovl_En_Dodojr/z_en_dodojr.c @@ -10,8 +10,6 @@ #define FLAGS 0x00000005 -#define THIS ((EnDodojr*)thisx) - void EnDodojr_Init(Actor* thisx, GlobalContext* globalCtx); void EnDodojr_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnDodojr_Update(Actor* thisx, GlobalContext* globalCtx); @@ -68,7 +66,7 @@ static ColliderCylinderInit sCylinderInit = { static CollisionCheckInfoInit2 sColChkInit = { 1, 2, 25, 25, 0xFF }; void EnDodojr_Init(Actor* thisx, GlobalContext* globalCtx) { - EnDodojr* this = THIS; + EnDodojr* this = (EnDodojr*)thisx; ActorShape_Init(&this->actor.shape, 0.0f, NULL, 18.0f); SkelAnime_Init(globalCtx, &this->skelAnime, &object_dodojr_Skel_0020E0, &object_dodojr_Anim_0009D4, @@ -86,7 +84,7 @@ void EnDodojr_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnDodojr_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnDodojr* this = THIS; + EnDodojr* this = (EnDodojr*)thisx; Collider_DestroyCylinder(globalCtx, &this->collider); } @@ -606,7 +604,7 @@ void func_809F7C48(EnDodojr* this, GlobalContext* globalCtx) { } void EnDodojr_Update(Actor* thisx, GlobalContext* globalCtx) { - EnDodojr* this = THIS; + EnDodojr* this = (EnDodojr*)thisx; SkelAnime_Update(&this->skelAnime); Actor_MoveForward(&this->actor); @@ -622,7 +620,7 @@ void EnDodojr_Update(Actor* thisx, GlobalContext* globalCtx) { } s32 func_809F7D50(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - EnDodojr* this = THIS; + EnDodojr* this = (EnDodojr*)thisx; Vec3f D_809F7F64 = { 480.0f, 620.0f, 0.0f }; if (limbIndex == 1) { @@ -641,7 +639,7 @@ void func_809F7DFC(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* } void EnDodojr_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnDodojr* this = THIS; + EnDodojr* this = (EnDodojr*)thisx; if ((this->actionFunc != func_809F73AC) && (this->actionFunc != func_809F7BE4)) { func_80093D18(globalCtx->state.gfxCtx); 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 eee7aebcc4..e477a575da 100644 --- a/src/overlays/actors/ovl_En_Dodongo/z_en_dodongo.c +++ b/src/overlays/actors/ovl_En_Dodongo/z_en_dodongo.c @@ -5,8 +5,6 @@ #define FLAGS 0x00000015 -#define THIS ((EnDodongo*)thisx) - typedef enum { DODONGO_SWEEP_TAIL, DODONGO_SWALLOW_BOMB, @@ -307,7 +305,7 @@ static InitChainEntry sInitChain[] = { }; void EnDodongo_Init(Actor* thisx, GlobalContext* globalCtx) { - EnDodongo* this = THIS; + EnDodongo* this = (EnDodongo*)thisx; EffectBlureInit1 blureInit; this->actor.targetMode = 3; @@ -348,7 +346,7 @@ void EnDodongo_Init(Actor* thisx, GlobalContext* globalCtx) { void EnDodongo_Destroy(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnDodongo* this = THIS; + EnDodongo* this = (EnDodongo*)thisx; Effect_Delete(globalCtx, this->blureIdx); Collider_DestroyTris(globalCtx, &this->colliderHard); @@ -765,7 +763,7 @@ void EnDodongo_UpdateQuad(EnDodongo* this, GlobalContext* globalCtx) { void EnDodongo_Update(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnDodongo* this = THIS; + EnDodongo* this = (EnDodongo*)thisx; EnDodongo_CollisionCheck(this, globalCtx); if (this->actor.colChkInfo.damageEffect != 0xE) { @@ -798,7 +796,7 @@ void EnDodongo_Update(Actor* thisx, GlobalContext* globalCtx) { s32 EnDodongo_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - EnDodongo* this = THIS; + EnDodongo* this = (EnDodongo*)thisx; if ((limbIndex == 15) || (limbIndex == 16)) { Matrix_Scale(this->bodyScale.x, this->bodyScale.y, this->bodyScale.z, MTXMODE_APPLY); @@ -820,7 +818,7 @@ void EnDodongo_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList Vec3f hardTris2Vtx[3]; Vec3f tailTip; Vec3f tailBase; - EnDodongo* this = THIS; + EnDodongo* this = (EnDodongo*)thisx; Vec3f hardTris0VtxOffset[] = { { -300.0f, -2500.0f, 0.0f }, { -300.0f, 1200.0f, -2700.0f }, @@ -916,7 +914,7 @@ void EnDodongo_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList void EnDodongo_Draw(Actor* thisx, GlobalContext* globalCtx2) { GlobalContext* globalCtx = globalCtx2; - EnDodongo* this = THIS; + EnDodongo* this = (EnDodongo*)thisx; s32 index; func_80093D18(globalCtx->state.gfxCtx); 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 9652f79dc3..9452d63558 100644 --- a/src/overlays/actors/ovl_En_Dog/z_en_dog.c +++ b/src/overlays/actors/ovl_En_Dog/z_en_dog.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000000 -#define THIS ((EnDog*)thisx) - void EnDog_Init(Actor* thisx, GlobalContext* globalCtx); void EnDog_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnDog_Update(Actor* thisx, GlobalContext* globalCtx); @@ -232,7 +230,7 @@ s32 EnDog_Orient(EnDog* this, GlobalContext* globalCtx) { } void EnDog_Init(Actor* thisx, GlobalContext* globalCtx) { - EnDog* this = THIS; + EnDog* this = (EnDog*)thisx; s16 followingDog; s32 pad; @@ -290,7 +288,7 @@ void EnDog_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnDog_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnDog* this = THIS; + EnDog* this = (EnDog*)thisx; Collider_DestroyCylinder(globalCtx, &this->collider); } @@ -441,7 +439,7 @@ void EnDog_Wait(EnDog* this, GlobalContext* globalCtx) { } void EnDog_Update(Actor* thisx, GlobalContext* globalCtx) { - EnDog* this = THIS; + EnDog* this = (EnDog*)thisx; s32 pad; EnDog_PlayAnimAndSFX(this); @@ -462,7 +460,7 @@ void EnDog_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Ve } void EnDog_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnDog* this = THIS; + EnDog* this = (EnDog*)thisx; Color_RGBA8 colors[] = { { 255, 255, 200, 0 }, { 150, 100, 50, 0 } }; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_dog.c", 972); 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 b52b411629..113bdd16ae 100644 --- a/src/overlays/actors/ovl_En_Door/z_en_door.c +++ b/src/overlays/actors/ovl_En_Door/z_en_door.c @@ -12,8 +12,6 @@ #define FLAGS 0x00000010 -#define THIS ((EnDoor*)thisx) - #define DOOR_AJAR_SLAM_RANGE 120.0f #define DOOR_AJAR_OPEN_RANGE (2 * DOOR_AJAR_SLAM_RANGE) @@ -79,7 +77,7 @@ static Gfx* D_809FCEE4[5][2] = { void EnDoor_Init(Actor* thisx, GlobalContext* globalCtx2) { GlobalContext* globalCtx = globalCtx2; - EnDoor* this = THIS; + EnDoor* this = (EnDoor*)thisx; EnDoorInfo* objectInfo; s32 i; s32 objBankIndex; @@ -134,7 +132,7 @@ void EnDoor_Init(Actor* thisx, GlobalContext* globalCtx2) { void EnDoor_Destroy(Actor* thisx, GlobalContext* globalCtx) { TransitionActorEntry* transitionEntry; - EnDoor* this = THIS; + EnDoor* this = (EnDoor*)thisx; transitionEntry = &globalCtx->transiActorCtx.list[(u16)this->actor.params >> 0xA]; if (transitionEntry->id < 0) { @@ -292,7 +290,7 @@ void EnDoor_Open(EnDoor* this, GlobalContext* globalCtx) { } void EnDoor_Update(Actor* thisx, GlobalContext* globalCtx) { - EnDoor* this = THIS; + EnDoor* this = (EnDoor*)thisx; this->actionFunc(this, globalCtx); } @@ -304,7 +302,7 @@ s32 EnDoor_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList s32 pad2; s16 phi_v0_2; s32 phi_v0; - EnDoor* this = THIS; + EnDoor* this = (EnDoor*)thisx; if (limbIndex == 4) { temp_a2 = D_809FCEE4[this->dListIndex]; @@ -327,7 +325,7 @@ s32 EnDoor_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList } void EnDoor_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnDoor* this = THIS; + EnDoor* this = (EnDoor*)thisx; if (this->actor.objBankIndex == this->requiredObjBankIndex) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_door.c", 910); 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 84a8468259..5d44113c9b 100644 --- a/src/overlays/actors/ovl_En_Ds/z_en_ds.c +++ b/src/overlays/actors/ovl_En_Ds/z_en_ds.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000009 -#define THIS ((EnDs*)thisx) - void EnDs_Init(Actor* thisx, GlobalContext* globalCtx); void EnDs_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnDs_Update(Actor* thisx, GlobalContext* globalCtx); @@ -31,7 +29,7 @@ const ActorInit En_Ds_InitVars = { }; void EnDs_Init(Actor* thisx, GlobalContext* globalCtx) { - EnDs* this = THIS; + EnDs* this = (EnDs*)thisx; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 36.0f); SkelAnime_InitFlex(globalCtx, &this->skelAnime, &gPotionShopLadySkel, &gPotionShopLadyAnim, this->jointTable, @@ -235,7 +233,7 @@ void EnDs_Wait(EnDs* this, GlobalContext* globalCtx) { } void EnDs_Update(Actor* thisx, GlobalContext* globalCtx) { - EnDs* this = THIS; + EnDs* this = (EnDs*)thisx; if (SkelAnime_Update(&this->skelAnime) != 0) { this->skelAnime.curFrame = 0.0f; @@ -254,7 +252,7 @@ void EnDs_Update(Actor* thisx, GlobalContext* globalCtx) { } s32 EnDs_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - EnDs* this = THIS; + EnDs* this = (EnDs*)thisx; if (limbIndex == 5) { rot->x += this->unk_1D8.y; @@ -265,7 +263,7 @@ s32 EnDs_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, void EnDs_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) { static Vec3f sMultVec = { 1100.0f, 500.0f, 0.0f }; - EnDs* this = THIS; + EnDs* this = (EnDs*)thisx; if (limbIndex == 5) { Matrix_MultVec3f(&sMultVec, &this->actor.focus.pos); @@ -273,7 +271,7 @@ void EnDs_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec } void EnDs_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnDs* this = THIS; + EnDs* this = (EnDs*)thisx; func_800943C8(globalCtx->state.gfxCtx); SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, 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 a7a389327f..6b115bdd6b 100644 --- a/src/overlays/actors/ovl_En_Du/z_en_du.c +++ b/src/overlays/actors/ovl_En_Du/z_en_du.c @@ -4,8 +4,6 @@ #define FLAGS 0x02000009 -#define THIS ((EnDu*)thisx) - void EnDu_Init(Actor* thisx, GlobalContext* globalCtx); void EnDu_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnDu_Update(Actor* thisx, GlobalContext* globalCtx); @@ -254,7 +252,7 @@ void func_809FE104(EnDu* this) { } void EnDu_Init(Actor* thisx, GlobalContext* globalCtx) { - EnDu* this = THIS; + EnDu* this = (EnDu*)thisx; s32 pad; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f); @@ -285,7 +283,7 @@ void EnDu_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnDu_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnDu* this = THIS; + EnDu* this = (EnDu*)thisx; SkelAnime_Free(&this->skelAnime, globalCtx); Collider_DestroyCylinder(globalCtx, &this->collider); @@ -525,7 +523,7 @@ void func_809FECE4(EnDu* this, GlobalContext* globalCtx) { } void EnDu_Update(Actor* thisx, GlobalContext* globalCtx) { - EnDu* this = THIS; + EnDu* this = (EnDu*)thisx; s32 pad; Collider_UpdateCylinder(&this->actor, &this->collider); @@ -559,7 +557,7 @@ void EnDu_Update(Actor* thisx, GlobalContext* globalCtx) { s32 EnDu_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx, Gfx** gfx) { - EnDu* this = THIS; + EnDu* this = (EnDu*)thisx; Vec3s sp1C; if (limbIndex == 16) { @@ -578,7 +576,7 @@ s32 EnDu_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, } void EnDu_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx, Gfx** gfx) { - EnDu* this = THIS; + EnDu* this = (EnDu*)thisx; Vec3f D_809FF40C = { 0.0f, -1000.0f, 0.0f }; if (limbIndex == 16) { @@ -603,7 +601,7 @@ void EnDu_Draw(Actor* thisx, GlobalContext* globalCtx) { gDaruniaNoseSeriousTex, gDaruniaNoseHappyTex, }; - EnDu* this = THIS; + EnDu* this = (EnDu*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_du.c", 1470); 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 64dfe95fda..16e97fefe3 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 @@ -10,8 +10,6 @@ #define FLAGS 0x00000030 -#define THIS ((EnDyExtra*)thisx) - void EnDyExtra_Init(Actor* thisx, GlobalContext* globalCtx); void EnDyExtra_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnDyExtra_Update(Actor* thisx, GlobalContext* globalCtx); @@ -36,7 +34,7 @@ void EnDyExtra_Destroy(Actor* thisx, GlobalContext* globalCtx) { } void EnDyExtra_Init(Actor* thisx, GlobalContext* globalCtx) { - EnDyExtra* this = THIS; + EnDyExtra* this = (EnDyExtra*)thisx; osSyncPrintf("\n\n"); // "Big fairy effect" @@ -76,7 +74,7 @@ void EnDyExtra_FallAndKill(EnDyExtra* this, GlobalContext* globalCtx) { } void EnDyExtra_Update(Actor* thisx, GlobalContext* globalCtx) { - EnDyExtra* this = THIS; + EnDyExtra* this = (EnDyExtra*)thisx; if (this->timer != 0) { this->timer--; @@ -94,7 +92,7 @@ void EnDyExtra_Draw(Actor* thisx, GlobalContext* globalCtx) { static Color_RGBA8 envColors[] = { { 255, 100, 255, 255 }, { 100, 255, 255, 255 } }; static u8 D_809FFC50[] = { 0x02, 0x01, 0x01, 0x02, 0x00, 0x00, 0x02, 0x01, 0x00, 0x02, 0x01, 0x00, 0x02, 0x01, 0x00, 0x02, 0x01, 0x00, 0x02, 0x01, 0x00, 0x02, 0x01, 0x00, 0x01, 0x02 }; - EnDyExtra* this = THIS; + EnDyExtra* this = (EnDyExtra*)thisx; s32 pad; GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; Vtx* vertices = SEGMENTED_TO_VIRTUAL(gGreatFairySpiralBeamVtx); 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 c9bda71d3b..2486bc4374 100644 --- a/src/overlays/actors/ovl_En_Eg/z_en_eg.c +++ b/src/overlays/actors/ovl_En_Eg/z_en_eg.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000010 -#define THIS ((EnEg*)thisx) - void EnEg_Init(Actor* thisx, GlobalContext* globalCtx); void EnEg_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnEg_Update(Actor* thisx, GlobalContext* globalCtx); @@ -44,7 +42,7 @@ void EnEg_Destroy(Actor* thisx, GlobalContext* globalCtx) { } void EnEg_Init(Actor* thisx, GlobalContext* globalCtx) { - EnEg* this = THIS; + EnEg* this = (EnEg*)thisx; this->action = 0; } @@ -62,7 +60,7 @@ void func_809FFDC8(EnEg* this, GlobalContext* globalCtx) { } void EnEg_Update(Actor* thisx, GlobalContext* globalCtx) { - EnEg* this = THIS; + EnEg* this = (EnEg*)thisx; s32 action = this->action; if (((action < 0) || (0 < action)) || (sActionFuncs[action] == NULL)) { 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 7a95a0325f..85084f6ea0 100644 --- a/src/overlays/actors/ovl_En_Eiyer/z_en_eiyer.c +++ b/src/overlays/actors/ovl_En_Eiyer/z_en_eiyer.c @@ -3,8 +3,6 @@ #define FLAGS 0x00000005 -#define THIS ((EnEiyer*)thisx) - void EnEiyer_Init(Actor* thisx, GlobalContext* globalCtx); void EnEiyer_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnEiyer_Update(Actor* thisx, GlobalContext* globalCtx); @@ -118,7 +116,7 @@ static InitChainEntry sInitChain[] = { * params 10: Normal Eiyer, wander around spawn point */ void EnEiyer_Init(Actor* thisx, GlobalContext* globalCtx) { - EnEiyer* this = THIS; + EnEiyer* this = (EnEiyer*)thisx; s32 pad; Actor_ProcessInitChain(&this->actor, sInitChain); @@ -170,7 +168,7 @@ void EnEiyer_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnEiyer_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnEiyer* this = THIS; + EnEiyer* this = (EnEiyer*)thisx; Collider_DestroyCylinder(globalCtx, &this->collider); } @@ -637,7 +635,7 @@ void EnEiyer_UpdateDamage(EnEiyer* this, GlobalContext* globalCtx) { } void EnEiyer_Update(Actor* thisx, GlobalContext* globalCtx) { - EnEiyer* this = THIS; + EnEiyer* this = (EnEiyer*)thisx; s32 pad; EnEiyer_UpdateDamage(this, globalCtx); @@ -683,7 +681,7 @@ void EnEiyer_Update(Actor* thisx, GlobalContext* globalCtx) { s32 EnEiyer_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx, Gfx** gfx) { - EnEiyer* this = THIS; + EnEiyer* this = (EnEiyer*)thisx; if (limbIndex == 1) { pos->z += 2500.0f; @@ -696,7 +694,7 @@ s32 EnEiyer_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dLis } void EnEiyer_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnEiyer* this = THIS; + EnEiyer* this = (EnEiyer*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_eiyer.c", 1494); if (this->actionFunc != EnEiyer_Dead) { 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 f2df435424..09d1af2b1e 100644 --- a/src/overlays/actors/ovl_En_Elf/z_en_elf.c +++ b/src/overlays/actors/ovl_En_Elf/z_en_elf.c @@ -9,8 +9,6 @@ #define FLAGS 0x02000030 -#define THIS ((EnElf*)thisx) - #define FAIRY_FLAG_TIMED (1 << 8) #define FAIRY_FLAG_BIG (1 << 9) @@ -314,7 +312,7 @@ f32 EnElf_GetColorValue(s32 colorFlag) { } void EnElf_Init(Actor* thisx, GlobalContext* globalCtx) { - EnElf* this = THIS; + EnElf* this = (EnElf*)thisx; s32 pad; Player* player = GET_PLAYER(globalCtx); s32 colorConfig; @@ -434,7 +432,7 @@ void func_80A029A8(EnElf* this, s16 increment) { void EnElf_Destroy(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnElf* this = THIS; + EnElf* this = (EnElf*)thisx; LightContext_RemoveLight(globalCtx, &globalCtx->lightCtx, this->lightNodeGlow); LightContext_RemoveLight(globalCtx, &globalCtx->lightCtx, this->lightNodeNoGlow); @@ -1253,7 +1251,7 @@ void func_80A04F94(EnElf* this, GlobalContext* globalCtx) { // ask to talk to saria again void func_80A05040(Actor* thisx, GlobalContext* globalCtx) { - EnElf* this = THIS; + EnElf* this = (EnElf*)thisx; func_80A04DE4(this, globalCtx); @@ -1276,7 +1274,7 @@ void func_80A05040(Actor* thisx, GlobalContext* globalCtx) { } void func_80A05114(Actor* thisx, GlobalContext* globalCtx) { - EnElf* this = THIS; + EnElf* this = (EnElf*)thisx; func_80A04DE4(this, globalCtx); @@ -1289,7 +1287,7 @@ void func_80A05114(Actor* thisx, GlobalContext* globalCtx) { } void func_80A05188(Actor* thisx, GlobalContext* globalCtx) { - EnElf* this = THIS; + EnElf* this = (EnElf*)thisx; func_80A04DE4(this, globalCtx); @@ -1304,7 +1302,7 @@ void func_80A05188(Actor* thisx, GlobalContext* globalCtx) { // ask to talk to navi void func_80A05208(Actor* thisx, GlobalContext* globalCtx) { s32 naviCUpText; - EnElf* this = THIS; + EnElf* this = (EnElf*)thisx; func_80A04DE4(this, globalCtx); @@ -1335,7 +1333,7 @@ void func_80A05208(Actor* thisx, GlobalContext* globalCtx) { // ask to talk to saria void func_80A052F4(Actor* thisx, GlobalContext* globalCtx) { - EnElf* this = THIS; + EnElf* this = (EnElf*)thisx; func_80A04DE4(this, globalCtx); @@ -1367,7 +1365,7 @@ void func_80A053F0(Actor* thisx, GlobalContext* globalCtx) { u8 unk2C7; s32 pad; Player* player = GET_PLAYER(globalCtx); - EnElf* this = THIS; + EnElf* this = (EnElf*)thisx; if (player->naviTextId == 0) { if (player->unk_664 == NULL) { @@ -1448,7 +1446,7 @@ void func_80A053F0(Actor* thisx, GlobalContext* globalCtx) { void EnElf_Update(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnElf* this = THIS; + EnElf* this = (EnElf*)thisx; this->actionFunc(this, globalCtx); this->actor.shape.rot.y = this->unk_2BC; @@ -1465,7 +1463,7 @@ s32 EnElf_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, s32 pad; f32 scale; Vec3f mtxMult; - EnElf* this = THIS; + EnElf* this = (EnElf*)thisx; if (limbIndex == 8) { scale = ((Math_SinS(this->timer * 4096) * 0.1f) + 1.0f) * 0.012f; @@ -1494,7 +1492,7 @@ void EnElf_Draw(Actor* thisx, GlobalContext* globalCtx) { s32 pad; f32 alphaScale; s32 envAlpha; - EnElf* this = THIS; + EnElf* this = (EnElf*)thisx; s32 pad1; Gfx* dListHead; Player* player = GET_PLAYER(globalCtx); 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 913c8d3351..7e6c8865f2 100644 --- a/src/overlays/actors/ovl_En_Encount1/z_en_encount1.c +++ b/src/overlays/actors/ovl_En_Encount1/z_en_encount1.c @@ -4,8 +4,6 @@ #define FLAGS 0x08000010 -#define THIS ((EnEncount1*)thisx) - void EnEncount1_Init(Actor* thisx, GlobalContext* globalCtx); void EnEncount1_Update(Actor* thisx, GlobalContext* globalCtx); @@ -30,7 +28,7 @@ const ActorInit En_Encount1_InitVars = { void EnEncount1_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnEncount1* this = THIS; + EnEncount1* this = (EnEncount1*)thisx; f32 spawnRange; if (this->actor.params <= 0) { @@ -316,7 +314,7 @@ void EnEncount1_SpawnStalchildOrWolfos(EnEncount1* this, GlobalContext* globalCt void EnEncount1_Update(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnEncount1* this = THIS; + EnEncount1* this = (EnEncount1*)thisx; if (this->timer != 0) { this->timer--; 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 52253fd635..4d7d306ba0 100644 --- a/src/overlays/actors/ovl_En_Encount2/z_en_encount2.c +++ b/src/overlays/actors/ovl_En_Encount2/z_en_encount2.c @@ -5,8 +5,6 @@ #define FLAGS 0x00000030 -#define THIS ((EnEncount2*)thisx) - typedef enum { /* 0x0 */ ENCOUNT2_INACTIVE, /* 0x1 */ ENCOUNT2_ACTIVE_DEATH_MOUNTAIN, @@ -37,7 +35,7 @@ const ActorInit En_Encount2_InitVars = { }; void EnEncount2_Init(Actor* thisx, GlobalContext* globalCtx) { - EnEncount2* this = THIS; + EnEncount2* this = (EnEncount2*)thisx; if (globalCtx->sceneNum != SCENE_SPOT16) { this->isNotDeathMountain = true; @@ -248,7 +246,7 @@ void EnEncount2_SpawnRocks(EnEncount2* this, GlobalContext* globalCtx) { } void EnEncount2_Update(Actor* thisx, GlobalContext* globalCtx2) { - EnEncount2* this = THIS; + EnEncount2* this = (EnEncount2*)thisx; GlobalContext* globalCtx = globalCtx2; if (this->deathMountainSpawnerTimer != 0) { @@ -284,7 +282,7 @@ void EnEncount2_Update(Actor* thisx, GlobalContext* globalCtx2) { } void EnEncount2_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnEncount2* this = THIS; + EnEncount2* this = (EnEncount2*)thisx; EnEncount2_ParticleDraw(&this->actor, globalCtx); } @@ -340,7 +338,7 @@ void EnEncount2_ParticleUpdate(EnEncount2* this, GlobalContext* globalCtx) { } void EnEncount2_ParticleDraw(Actor* thisx, GlobalContext* globalCtx) { - EnEncount2* this = THIS; + EnEncount2* this = (EnEncount2*)thisx; EnEncount2Particle* particle = this->particles; GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; s16 i; 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 81ac7202bf..517f6102b2 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 @@ -11,8 +11,6 @@ #define FLAGS 0x00000030 -#define THIS ((EnExItem*)thisx) - void EnExItem_Init(Actor* thisx, GlobalContext* globalCtx); void EnExItem_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnExItem_Update(Actor* thisx, GlobalContext* globalCtx); @@ -51,7 +49,7 @@ void EnExItem_Destroy(Actor* thisx, GlobalContext* globalCtx) { void EnExItem_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnExItem* this = THIS; + EnExItem* this = (EnExItem*)thisx; this->actor.flags &= ~1; this->type = this->actor.params & 0xFF; @@ -420,7 +418,7 @@ void EnExItem_TargetPrizeFinish(EnExItem* this, GlobalContext* globalCtx) { void EnExItem_Update(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnExItem* this = THIS; + EnExItem* this = (EnExItem*)thisx; if (this->timer != 0) { this->timer--; @@ -436,7 +434,7 @@ void EnExItem_Update(Actor* thisx, GlobalContext* globalCtx) { void EnExItem_Draw(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnExItem* this = THIS; + EnExItem* this = (EnExItem*)thisx; s32 magicType; Actor_SetScale(&this->actor, this->scale); 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 6a11cf72b5..d66a18240b 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 @@ -5,8 +5,6 @@ #define FLAGS 0x00000010 -#define THIS ((EnExRuppy*)thisx) - void EnExRuppy_Init(Actor* thisx, GlobalContext* globalCtx); void EnExRuppy_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnExRuppy_Update(Actor* thisx, GlobalContext* globalCtx); @@ -43,7 +41,7 @@ const ActorInit En_Ex_Ruppy_InitVars = { }; void EnExRuppy_Init(Actor* thisx, GlobalContext* globalCtx) { - EnExRuppy* this = THIS; + EnExRuppy* this = (EnExRuppy*)thisx; EnDivingGame* divingGame; f32 temp1; f32 temp2; @@ -365,7 +363,7 @@ void EnExRuppy_GalleryTarget(EnExRuppy* this, GlobalContext* globalCtx) { } void EnExRuppy_Update(Actor* thisx, GlobalContext* globalCtx) { - EnExRuppy* this = THIS; + EnExRuppy* this = (EnExRuppy*)thisx; this->actor.shape.rot.y += 1960; this->actionFunc(this, globalCtx); @@ -381,7 +379,7 @@ void EnExRuppy_Draw(Actor* thisx, GlobalContext* globalCtx) { gRupeeGreenTex, gRupeeBlueTex, gRupeeRedTex, gRupeePinkTex, gRupeeOrangeTex, }; s32 pad; - EnExRuppy* this = THIS; + EnExRuppy* this = (EnExRuppy*)thisx; if (!this->invisible) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_ex_ruppy.c", 774); 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 b3ceb3ee93..0d077645e6 100644 --- a/src/overlays/actors/ovl_En_Fd/z_en_fd.c +++ b/src/overlays/actors/ovl_En_Fd/z_en_fd.c @@ -10,8 +10,6 @@ #define FLAGS 0x00000215 -#define THIS ((EnFd*)thisx) - #define FLG_COREDEAD (0x4000) #define FLG_COREDONE (0x8000) @@ -443,7 +441,7 @@ void EnFd_Fade(EnFd* this, GlobalContext* globalCtx) { } void EnFd_Init(Actor* thisx, GlobalContext* globalCtx) { - EnFd* this = THIS; + EnFd* this = (EnFd*)thisx; SkelAnime_InitFlex(globalCtx, &this->skelAnime, &gFlareDancerSkel, NULL, this->jointTable, this->morphTable, 27); ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 32.0f); @@ -461,7 +459,7 @@ void EnFd_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnFd_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnFd* this = THIS; + EnFd* this = (EnFd*)thisx; Collider_DestroyJntSph(globalCtx, &this->collider); } @@ -642,7 +640,7 @@ void EnFd_WaitForCore(EnFd* this, GlobalContext* globalCtx) { } void EnFd_Update(Actor* thisx, GlobalContext* globalCtx) { - EnFd* this = THIS; + EnFd* this = (EnFd*)thisx; s32 pad; if (this->firstUpdateFlag) { @@ -689,7 +687,7 @@ void EnFd_Update(Actor* thisx, GlobalContext* globalCtx) { s32 EnFd_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx, Gfx** gfxP) { - EnFd* this = THIS; + EnFd* this = (EnFd*)thisx; if (this->invincibilityTimer != 0) { switch (limbIndex) { @@ -704,7 +702,7 @@ s32 EnFd_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, } void EnFd_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx, Gfx** gfxP) { - EnFd* this = THIS; + EnFd* this = (EnFd*)thisx; Vec3f unused0 = { 6800.0f, 0.0f, 0.0f }; Vec3f unused1 = { 6800.0f, 0.0f, 0.0f }; Vec3f initialPos = { 0.0f, 0.0f, 0.0f }; @@ -742,7 +740,7 @@ void EnFd_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec } void EnFd_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnFd* this = THIS; + EnFd* this = (EnFd*)thisx; s32 clampedHealth; Color_RGBA8 primColors[] = { { 255, 255, 200, 255 }, 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 f14f12506f..90c13d86e7 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 @@ -3,8 +3,6 @@ #define FLAGS 0x00000015 -#define THIS ((EnFdFire*)thisx) - void EnFdFire_Init(Actor* thisx, GlobalContext* globalCtx); void EnFdFire_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnFdFire_Update(Actor* thisx, GlobalContext* globalCtx); @@ -122,7 +120,7 @@ s32 EnFdFire_CheckCollider(EnFdFire* this, GlobalContext* globalCtx) { } void EnFdFire_Init(Actor* thisx, GlobalContext* globalCtx) { - EnFdFire* this = THIS; + EnFdFire* this = (EnFdFire*)thisx; s32 pad; Player* player = GET_PLAYER(globalCtx); @@ -141,7 +139,7 @@ void EnFdFire_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnFdFire_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnFdFire* this = THIS; + EnFdFire* this = (EnFdFire*)thisx; Collider_DestroyCylinder(globalCtx, &this->collider); } @@ -210,7 +208,7 @@ void EnFdFire_Disappear(EnFdFire* this, GlobalContext* globalCtx) { } void EnFdFire_Update(Actor* thisx, GlobalContext* globalCtx) { - EnFdFire* this = THIS; + EnFdFire* this = (EnFdFire*)thisx; s32 pad; if (this->actionFunc != EnFdFire_Disappear) { @@ -240,7 +238,7 @@ void EnFdFire_Draw(Actor* thisx, GlobalContext* globalCtx) { { 0, 10, 255, 255 }, }; s32 pad; - EnFdFire* this = THIS; + EnFdFire* this = (EnFdFire*)thisx; Vec3f scale = { 0.0f, 0.0f, 0.0f }; Vec3f sp90 = { 0.0f, 0.0f, 0.0f }; s16 sp8E; 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 46fe661c31..b6552c900d 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 @@ -13,8 +13,6 @@ #define FLAGS 0x00000030 -#define THIS ((EnFhgFire*)thisx) - typedef enum { /* 0 */ STRIKE_INIT, /* 10 */ STRIKE_BURST = 10, @@ -84,7 +82,7 @@ void EnFhgFire_SetUpdate(EnFhgFire* this, EnFhgFireUpdateFunc updateFunc) { void EnFhgFire_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnFhgFire* this = THIS; + EnFhgFire* this = (EnFhgFire*)thisx; Player* player = GET_PLAYER(globalCtx); ActorShape_Init(&this->actor.shape, 0.0f, NULL, 0.0f); @@ -166,7 +164,7 @@ void EnFhgFire_Init(Actor* thisx, GlobalContext* globalCtx) { void EnFhgFire_Destroy(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnFhgFire* this = THIS; + EnFhgFire* this = (EnFhgFire*)thisx; if ((this->actor.params == FHGFIRE_LIGHTNING_SHOCK) || (this->actor.params == FHGFIRE_LIGHTNING_BURST) || (this->actor.params == FHGFIRE_ENERGY_BALL)) { @@ -679,7 +677,7 @@ void EnFhgFire_PhantomWarp(EnFhgFire* this, GlobalContext* globalCtx) { void EnFhgFire_Update(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnFhgFire* this = THIS; + EnFhgFire* this = (EnFhgFire*)thisx; this->work[FHGFIRE_VARIANCE_TIMER]++; @@ -699,7 +697,7 @@ static void* sDustTextures[] = { void EnFhgFire_Draw(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnFhgFire* this = THIS; + EnFhgFire* this = (EnFhgFire*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_fhg_fire.c", 1723); 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 ed146a7d36..f757e0aec1 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 @@ -5,8 +5,6 @@ #define FLAGS 0x00000030 -#define THIS ((EnFireRock*)thisx) - void EnFireRock_Init(Actor* thisx, GlobalContext* globalCtx); void EnFireRock_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnFireRock_Update(Actor* thisx, GlobalContext* globalCtx); @@ -72,7 +70,7 @@ static ColliderCylinderInit D_80A12CCC = { void EnFireRock_Init(Actor* thisx, GlobalContext* globalCtx) { GlobalContext* globalCtx2 = globalCtx; Player* player = GET_PLAYER(globalCtx); - EnFireRock* this = THIS; + EnFireRock* this = (EnFireRock*)thisx; s16 temp; this->type = this->actor.params; @@ -148,7 +146,7 @@ void EnFireRock_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnFireRock_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnFireRock* this = THIS; + EnFireRock* this = (EnFireRock*)thisx; if ((this->actor.parent != NULL) && (this->actor.parent == &this->spawner->actor)) { EnEncount2* spawner = (EnEncount2*)this->actor.parent; @@ -303,7 +301,7 @@ void FireRock_WaitOnFloor(EnFireRock* this, GlobalContext* globalCtx) { } void EnFireRock_Update(Actor* thisx, GlobalContext* globalCtx) { - EnFireRock* this = THIS; + EnFireRock* this = (EnFireRock*)thisx; s16 setCollision; Player* player = GET_PLAYER(globalCtx); Actor* playerActor = &GET_PLAYER(globalCtx)->actor; @@ -380,7 +378,7 @@ void EnFireRock_Update(Actor* thisx, GlobalContext* globalCtx) { } void EnFireRock_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnFireRock* this = THIS; + EnFireRock* this = (EnFireRock*)thisx; s32 pad; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_fire_rock.c", 747); 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 56f4c57984..b8302f961f 100644 --- a/src/overlays/actors/ovl_En_Firefly/z_en_firefly.c +++ b/src/overlays/actors/ovl_En_Firefly/z_en_firefly.c @@ -10,8 +10,6 @@ #define FLAGS 0x00005005 -#define THIS ((EnFirefly*)thisx) - void EnFirefly_Init(Actor* thisx, GlobalContext* globalCtx); void EnFirefly_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnFirefly_Update(Actor* thisx, GlobalContext* globalCtx); @@ -139,7 +137,7 @@ void EnFirefly_Ignite(EnFirefly* this) { } void EnFirefly_Init(Actor* thisx, GlobalContext* globalCtx) { - EnFirefly* this = THIS; + EnFirefly* this = (EnFirefly*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 25.0f); @@ -197,7 +195,7 @@ void EnFirefly_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnFirefly_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnFirefly* this = THIS; + EnFirefly* this = (EnFirefly*)thisx; Collider_DestroyJntSph(globalCtx, &this->collider); } @@ -666,7 +664,7 @@ void EnFirefly_UpdateDamage(EnFirefly* this, GlobalContext* globalCtx) { } void EnFirefly_Update(Actor* thisx, GlobalContext* globalCtx2) { - EnFirefly* this = THIS; + EnFirefly* this = (EnFirefly*)thisx; GlobalContext* globalCtx = globalCtx2; if (this->collider.base.atFlags & AT_HIT) { @@ -722,7 +720,7 @@ void EnFirefly_Update(Actor* thisx, GlobalContext* globalCtx2) { s32 EnFirefly_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx, Gfx** gfx) { - EnFirefly* this = THIS; + EnFirefly* this = (EnFirefly*)thisx; if ((this->actor.draw == EnFirefly_DrawInvisible) && (globalCtx->actorCtx.unk_03 == 0)) { *dList = NULL; @@ -747,7 +745,7 @@ void EnFirefly_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList MtxF mtx; s16 effScaleStep; s16 effLife; - EnFirefly* this = THIS; + EnFirefly* this = (EnFirefly*)thisx; if (!this->onFire && (limbIndex == 27)) { gSPDisplayList((*gfx)++, gKeeseEyesDL); @@ -803,7 +801,7 @@ void EnFirefly_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList } void EnFirefly_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnFirefly* this = THIS; + EnFirefly* this = (EnFirefly*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_firefly.c", 1733); func_80093D18(globalCtx->state.gfxCtx); @@ -820,7 +818,7 @@ void EnFirefly_Draw(Actor* thisx, GlobalContext* globalCtx) { } void EnFirefly_DrawInvisible(Actor* thisx, GlobalContext* globalCtx) { - EnFirefly* this = THIS; + EnFirefly* this = (EnFirefly*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_firefly.c", 1775); func_80093D84(globalCtx->state.gfxCtx); 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 390eea944f..c1c8f35710 100644 --- a/src/overlays/actors/ovl_En_Fish/z_en_fish.c +++ b/src/overlays/actors/ovl_En_Fish/z_en_fish.c @@ -10,8 +10,6 @@ #define FLAGS 0x00000000 -#define THIS ((EnFish*)thisx) - void EnFish_Init(Actor* thisx, GlobalContext* globalCtx); void EnFish_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnFish_Update(Actor* thisx, GlobalContext* globalCtx); @@ -130,7 +128,7 @@ void EnFish_ClearCutsceneData(EnFish* this) { } void EnFish_Init(Actor* thisx, GlobalContext* globalCtx) { - EnFish* this = THIS; + EnFish* this = (EnFish*)thisx; s16 params = this->actor.params; Actor_ProcessInitChain(&this->actor, sInitChain); @@ -155,7 +153,7 @@ void EnFish_Init(Actor* thisx, GlobalContext* globalCtx) { void EnFish_Destroy(Actor* thisx, GlobalContext* globalCtx2) { GlobalContext* globalCtx = globalCtx2; - EnFish* this = THIS; + EnFish* this = (EnFish*)thisx; Collider_DestroyJntSph(globalCtx, &this->collider); } @@ -742,7 +740,7 @@ void EnFish_RespawningUpdate(EnFish* this, GlobalContext* globalCtx) { } void EnFish_Update(Actor* thisx, GlobalContext* globalCtx) { - EnFish* this = THIS; + EnFish* this = (EnFish*)thisx; if ((D_80A17010 == NULL) && (this->actor.params == FISH_DROPPED) && (globalCtx->csCtx.state != 0) && (globalCtx->csCtx.npcActions[1] != NULL)) { @@ -760,7 +758,7 @@ void EnFish_Update(Actor* thisx, GlobalContext* globalCtx) { } void EnFish_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnFish* this = THIS; + EnFish* this = (EnFish*)thisx; func_80093D18(globalCtx->state.gfxCtx); SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, 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 ce375822ca..fb5df16bfd 100644 --- a/src/overlays/actors/ovl_En_Floormas/z_en_floormas.c +++ b/src/overlays/actors/ovl_En_Floormas/z_en_floormas.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000405 -#define THIS ((EnFloormas*)thisx) - #define SPAWN_INVISIBLE 0x8000 #define SPAWN_SMALL 0x10 @@ -122,7 +120,7 @@ static InitChainEntry sInitChain[] = { }; void EnFloormas_Init(Actor* thisx, GlobalContext* globalCtx2) { - EnFloormas* this = THIS; + EnFloormas* this = (EnFloormas*)thisx; GlobalContext* globalCtx = globalCtx2; s32 invisble; s32 pad; @@ -177,7 +175,7 @@ void EnFloormas_Init(Actor* thisx, GlobalContext* globalCtx2) { } void EnFloormas_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnFloormas* this = THIS; + EnFloormas* this = (EnFloormas*)thisx; ColliderCylinder* col = &this->collider; Collider_DestroyCylinder(globalCtx, col); } @@ -1021,7 +1019,7 @@ void EnFloormas_ColliderCheck(EnFloormas* this, GlobalContext* globalCtx) { } void EnFloormas_Update(Actor* thisx, GlobalContext* globalCtx) { - EnFloormas* this = THIS; + EnFloormas* this = (EnFloormas*)thisx; s32 pad; if (this->actionFunc != EnFloormas_SmWait) { @@ -1083,7 +1081,7 @@ void EnFloormas_Update(Actor* thisx, GlobalContext* globalCtx) { s32 EnFloormas_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx, Gfx** gfx) { - EnFloormas* this = THIS; + EnFloormas* this = (EnFloormas*)thisx; if (limbIndex == 1) { pos->z += this->zOffset; @@ -1107,7 +1105,7 @@ void EnFloormas_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dLis static Color_RGBA8 sMergeColor = { 0, 255, 0, 0 }; void EnFloormas_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnFloormas* this = THIS; + EnFloormas* this = (EnFloormas*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_floormas.c", 2318); @@ -1127,7 +1125,7 @@ void EnFloormas_Draw(Actor* thisx, GlobalContext* globalCtx) { } void EnFloormas_DrawHighlighted(Actor* thisx, GlobalContext* globalCtx) { - EnFloormas* this = THIS; + EnFloormas* this = (EnFloormas*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_floormas.c", 2352); 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 7c8d4592d3..24c1548c5e 100644 --- a/src/overlays/actors/ovl_En_Fr/z_en_fr.c +++ b/src/overlays/actors/ovl_En_Fr/z_en_fr.c @@ -5,8 +5,6 @@ #define FLAGS 0x02000019 -#define THIS ((EnFr*)thisx) - void EnFr_Init(Actor* thisx, GlobalContext* globalCtx); void EnFr_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnFr_Update(Actor* thisx, GlobalContext* globalCtx); @@ -219,7 +217,7 @@ void EnFr_OrientUnderwater(EnFr* this) { } void EnFr_Init(Actor* thisx, GlobalContext* globalCtx) { - EnFr* this = THIS; + EnFr* this = (EnFr*)thisx; if (this->actor.params == 0) { this->actor.destroy = NULL; @@ -261,7 +259,7 @@ void EnFr_DrawActive(EnFr* this) { } void EnFr_Update(Actor* thisx, GlobalContext* globalCtx) { - EnFr* this = THIS; + EnFr* this = (EnFr*)thisx; s32 pad; s32 frogIndex; s32 pad2; @@ -315,7 +313,7 @@ void EnFr_Update(Actor* thisx, GlobalContext* globalCtx) { } void EnFr_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnFr* this = THIS; + EnFr* this = (EnFr*)thisx; LightContext_RemoveLight(globalCtx, &globalCtx->lightCtx, this->lightNode); } @@ -559,7 +557,7 @@ void EnFr_ButterflyPath(EnFr* this, GlobalContext* globalCtx) { } void EnFr_UpdateActive(Actor* thisx, GlobalContext* globalCtx) { - EnFr* this = THIS; + EnFr* this = (EnFr*)thisx; this->jumpCounter++; Actor_SetScale(&this->actor, this->scale * 0.0001f); @@ -1025,7 +1023,7 @@ void EnFr_SetIdle(EnFr* this, GlobalContext* globalCtx) { } void EnFr_UpdateIdle(Actor* thisx, GlobalContext* globalCtx) { - EnFr* this = THIS; + EnFr* this = (EnFr*)thisx; if (BREG(0)) { DebugDisplay_AddObject(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, @@ -1044,7 +1042,7 @@ s32 EnFr_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, } void EnFr_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) { - EnFr* this = THIS; + EnFr* this = (EnFr*)thisx; if ((limbIndex == 7) || (limbIndex == 8)) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_fr.c", 1735); @@ -1061,7 +1059,7 @@ void EnFr_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec void EnFr_Draw(Actor* thisx, GlobalContext* globalCtx) { static void* eyeTextures[] = { 0x060059A0, 0x06005BA0 }; s16 lightRadius; - EnFr* this = THIS; + EnFr* this = (EnFr*)thisx; s16 frogIndex = this->actor.params - 1; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_fr.c", 1754); 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 b4fba0f21c..d9da62e3d0 100644 --- a/src/overlays/actors/ovl_En_Fu/z_en_fu.c +++ b/src/overlays/actors/ovl_En_Fu/z_en_fu.c @@ -10,8 +10,6 @@ #define FLAGS 0x02000019 -#define THIS ((EnFu*)thisx) - #define FU_RESET_LOOK_ANGLE (1 << 0) #define FU_WAIT (1 << 1) @@ -75,7 +73,7 @@ typedef enum { void EnFu_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnFu* this = THIS; + EnFu* this = (EnFu*)thisx; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 36.0f); SkelAnime_InitFlex(globalCtx, &this->skelanime, &gWindmillManSkel, &gWindmillManPlayStillAnim, this->jointTable, @@ -98,7 +96,7 @@ void EnFu_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnFu_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnFu* this = THIS; + EnFu* this = (EnFu*)thisx; Collider_DestroyCylinder(globalCtx, &this->collider); } @@ -236,7 +234,7 @@ void EnFu_WaitAdult(EnFu* this, GlobalContext* globalCtx) { void EnFu_Update(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnFu* this = THIS; + EnFu* this = (EnFu*)thisx; Collider_UpdateCylinder(&this->actor, &this->collider); CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->collider.base); @@ -259,7 +257,7 @@ void EnFu_Update(Actor* thisx, GlobalContext* globalCtx) { } s32 EnFu_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - EnFu* this = THIS; + EnFu* this = (EnFu*)thisx; s32 pad; if (limbIndex == FU_LIMB_UNK) { @@ -286,7 +284,7 @@ s32 EnFu_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, } void EnFu_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) { - EnFu* this = THIS; + EnFu* this = (EnFu*)thisx; if (limbIndex == FU_LIMB_HEAD) { Matrix_MultVec3f(&sMtxSrc, &this->actor.focus.pos); @@ -297,7 +295,7 @@ void EnFu_Draw(Actor* thisx, GlobalContext* globalCtx) { static void* sEyesSegments[] = { gWindmillManEyeClosedTex, gWindmillManEyeAngryTex }; static void* sMouthSegments[] = { gWindmillManMouthOpenTex, gWindmillManMouthAngryTex }; s32 pad; - EnFu* this = THIS; + EnFu* this = (EnFu*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_fu.c", 773); 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 ea1dd5e377..22d7e2a1cb 100644 --- a/src/overlays/actors/ovl_En_Fw/z_en_fw.c +++ b/src/overlays/actors/ovl_En_Fw/z_en_fw.c @@ -11,8 +11,6 @@ #define FLAGS 0x00000215 -#define THIS ((EnFw*)thisx) - void EnFw_Init(Actor* thisx, GlobalContext* globalCtx); void EnFw_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnFw_Update(Actor* thisx, GlobalContext* globalCtx); @@ -184,7 +182,7 @@ s32 EnFw_SpawnDust(EnFw* this, u8 timer, f32 scale, f32 scaleStep, s32 dustCnt, } void EnFw_Init(Actor* thisx, GlobalContext* globalCtx) { - EnFw* this = THIS; + EnFw* this = (EnFw*)thisx; SkelAnime_InitFlex(globalCtx, &this->skelAnime, &gFlareDancerCoreSkel, NULL, this->jointTable, this->morphTable, 11); @@ -200,7 +198,7 @@ void EnFw_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnFw_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnFw* this = THIS; + EnFw* this = (EnFw*)thisx; Collider_DestroyJntSph(globalCtx, &this->collider); } @@ -354,7 +352,7 @@ void EnFw_JumpToParentInitPos(EnFw* this, GlobalContext* globalCtx) { } void EnFw_Update(Actor* thisx, GlobalContext* globalCtx) { - EnFw* this = THIS; + EnFw* this = (EnFw*)thisx; SkelAnime_Update(&this->skelAnime); if ((this->actor.flags & 0x2000) != 0x2000) { // not attached to hookshot. @@ -374,7 +372,7 @@ s32 EnFw_OverrideLimbDraw(GlobalContext* globalContext, s32 limbIndex, Gfx** dLi } void EnFw_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) { - EnFw* this = THIS; + EnFw* this = (EnFw*)thisx; Vec3f zeroVec = { 0.0f, 0.0f, 0.0f }; if (limbIndex == 2) { @@ -391,7 +389,7 @@ void EnFw_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec } void EnFw_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnFw* this = THIS; + EnFw* this = (EnFw*)thisx; EnFw_UpdateDust(this); Matrix_Push(); 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 a121057f89..007bbc334b 100644 --- a/src/overlays/actors/ovl_En_Fz/z_en_fz.c +++ b/src/overlays/actors/ovl_En_Fz/z_en_fz.c @@ -3,8 +3,6 @@ #define FLAGS 0x00000415 -#define THIS ((EnFz*)thisx) - void EnFz_Init(Actor* thisx, GlobalContext* globalCtx); void EnFz_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnFz_Update(Actor* thisx, GlobalContext* globalCtx); @@ -158,7 +156,7 @@ static InitChainEntry sInitChain[] = { }; void EnFz_Init(Actor* thisx, GlobalContext* globalCtx) { - EnFz* this = THIS; + EnFz* this = (EnFz*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); this->actor.colChkInfo.damageTable = &sDamageTable; @@ -205,7 +203,7 @@ void EnFz_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnFz_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnFz* this = THIS; + EnFz* this = (EnFz*)thisx; Collider_DestroyCylinder(globalCtx, &this->collider1); Collider_DestroyCylinder(globalCtx, &this->collider2); @@ -663,7 +661,7 @@ static EnFzSpawnIceSmokeFunc iceSmokeSpawnFuncs[] = { }; void EnFz_Update(Actor* thisx, GlobalContext* globalCtx) { - EnFz* this = THIS; + EnFz* this = (EnFz*)thisx; s32 pad; this->counter++; @@ -712,7 +710,7 @@ void EnFz_Draw(Actor* thisx, GlobalContext* globalCtx) { gFreezardTopRightHornChippedDL, // Top right horn chipped off (from Freezards perspective) (3 or 4 health) gFreezardHeadChippedDL, // Entire head chipped off (1 or 2 health) }; - EnFz* this = THIS; + EnFz* this = (EnFz*)thisx; s32 pad; s32 index; 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 32a2276d62..b8f0872735 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 @@ -14,8 +14,6 @@ #define FLAGS 0x00000030 -#define THIS ((EnGSwitch*)thisx) - typedef enum { /* 0 */ MOVE_TARGET, /* 1 */ MOVE_HOME @@ -80,7 +78,7 @@ const ActorInit En_G_Switch_InitVars = { void EnGSwitch_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnGSwitch* this = THIS; + EnGSwitch* this = (EnGSwitch*)thisx; this->type = (this->actor.params >> 0xC) & 0xF; this->switchFlag = this->actor.params & 0x3F; @@ -168,7 +166,7 @@ void EnGSwitch_Init(Actor* thisx, GlobalContext* globalCtx) { void EnGSwitch_Destroy(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnGSwitch* this = THIS; + EnGSwitch* this = (EnGSwitch*)thisx; Collider_DestroyCylinder(globalCtx, &this->collider); } @@ -418,7 +416,7 @@ void EnGSwitch_Kill(EnGSwitch* this, GlobalContext* globalCtx) { void EnGSwitch_Update(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnGSwitch* this = THIS; + EnGSwitch* this = (EnGSwitch*)thisx; this->actionFunc(this, globalCtx); if (this->killTimer != 0) { @@ -453,7 +451,7 @@ void EnGSwitch_Update(Actor* thisx, GlobalContext* globalCtx) { void EnGSwitch_DrawPot(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnGSwitch* this = THIS; + EnGSwitch* this = (EnGSwitch*)thisx; if (!this->broken) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_g_switch.c", 918); @@ -471,7 +469,7 @@ static void* sRupeeTextures[] = { void EnGSwitch_DrawRupee(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnGSwitch* this = THIS; + EnGSwitch* this = (EnGSwitch*)thisx; if (1) {} if (!this->broken) { 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 e99c6b22af..7d7b38fcf9 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 @@ -9,8 +9,6 @@ #define FLAGS 0x00000030 -#define THIS ((EnGanonMant*)thisx) - void EnGanonMant_Init(Actor* thisx, GlobalContext* globalCtx); void EnGanonMant_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnGanonMant_Update(Actor* thisx, GlobalContext* globalCtx); @@ -102,7 +100,7 @@ static u64 sForceAlignment = 0; #include "overlays/ovl_En_Ganon_Mant/ovl_En_Ganon_Mant.c" void EnGanonMant_Init(Actor* thisx, GlobalContext* globalCtx) { - EnGanonMant* this = THIS; + EnGanonMant* this = (EnGanonMant*)thisx; this->actor.flags &= ~1; } @@ -332,7 +330,7 @@ void EnGanonMant_UpdateVertices(EnGanonMant* this) { } void EnGanonMant_Update(Actor* thisx, GlobalContext* globalCtx) { - EnGanonMant* this = THIS; + EnGanonMant* this = (EnGanonMant*)thisx; BossGanon* ganon = (BossGanon*)this->actor.parent; this->updateHasRun = true; @@ -385,7 +383,7 @@ void EnGanonMant_DrawCloak(GlobalContext* globalCtx, EnGanonMant* this) { } void EnGanonMant_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnGanonMant* this = THIS; + EnGanonMant* this = (EnGanonMant*)thisx; f32 xDiff; f32 pitch; Vec3f strandOffset; 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 69a581c911..611bebcb85 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 @@ -9,8 +9,6 @@ #define FLAGS 0x00000030 -#define THIS ((EnGanonOrgan*)thisx) - void EnGanonOrgan_Init(Actor* thisx, GlobalContext* globalCtx); void EnGanonOrgan_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnGanonOrgan_Update(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 5069e9d1ea..2201f05c2f 100644 --- a/src/overlays/actors/ovl_En_Gb/z_en_gb.c +++ b/src/overlays/actors/ovl_En_Gb/z_en_gb.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000009 -#define THIS ((EnGb*)thisx) - void EnGb_Init(Actor* thisx, GlobalContext* globalCtx); void EnGb_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnGb_Update(Actor* thisx, GlobalContext* globalCtx); @@ -151,7 +149,7 @@ void func_80A2F180(EnGb* this) { } void EnGb_Init(Actor* thisx, GlobalContext* globalCtx) { - EnGb* this = THIS; + EnGb* this = (EnGb*)thisx; s32 pad; CollisionHeader* colHeader = NULL; s32 i; @@ -218,7 +216,7 @@ void EnGb_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnGb_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnGb* this = THIS; + EnGb* this = (EnGb*)thisx; Collider_DestroyCylinder(globalCtx, &this->collider); LightContext_RemoveLight(globalCtx, &globalCtx->lightCtx, this->light); @@ -396,7 +394,7 @@ void func_80A2FC70(EnGb* this, GlobalContext* globalCtx) { } void EnGb_Update(Actor* thisx, GlobalContext* globalCtx2) { - EnGb* this = THIS; + EnGb* this = (EnGb*)thisx; GlobalContext* globalCtx = globalCtx2; s32 i; f32 rand; @@ -421,7 +419,7 @@ void EnGb_Update(Actor* thisx, GlobalContext* globalCtx2) { } void EnGb_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnGb* this = THIS; + EnGb* this = (EnGb*)thisx; s32 pad; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_gb.c", 763); 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 fc2b9cc87c..d75d007dd4 100644 --- a/src/overlays/actors/ovl_En_Ge1/z_en_ge1.c +++ b/src/overlays/actors/ovl_En_Ge1/z_en_ge1.c @@ -10,8 +10,6 @@ #define FLAGS 0x00000009 -#define THIS ((EnGe1*)thisx) - #define GE1_STATE_TALKING (1 << 0) #define GE1_STATE_GIVE_QUIVER (1 << 1) #define GE1_STATE_IDLE_ANIM (1 << 2) @@ -89,7 +87,7 @@ static void* sEyeTextures[] = { void EnGe1_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnGe1* this = THIS; + EnGe1* this = (EnGe1*)thisx; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f); SkelAnime_InitFlex(globalCtx, &this->skelAnime, &gGerudoWhiteSkel, &gGerudoWhiteIdleAnim, this->jointTable, @@ -178,7 +176,7 @@ void EnGe1_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnGe1_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnGe1* this = THIS; + EnGe1* this = (EnGe1*)thisx; Collider_DestroyCylinder(globalCtx, &this->collider); } @@ -720,7 +718,7 @@ void EnGe1_LookAtPlayer(EnGe1* this, GlobalContext* globalCtx) { void EnGe1_Update(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnGe1* this = THIS; + EnGe1* this = (EnGe1*)thisx; Collider_UpdateCylinder(&this->actor, &this->collider); CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->collider.base); @@ -766,7 +764,7 @@ void EnGe1_StopFidget(EnGe1* this) { s32 EnGe1_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { s32 pad; - EnGe1* this = THIS; + EnGe1* this = (EnGe1*)thisx; if (limbIndex == GE1_LIMB_HEAD) { rot->x += this->headRot.y; @@ -788,7 +786,7 @@ s32 EnGe1_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, } void EnGe1_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) { - EnGe1* this = THIS; + EnGe1* this = (EnGe1*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_ge1.c", 1419); @@ -802,7 +800,7 @@ void EnGe1_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Ve void EnGe1_Draw(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnGe1* this = THIS; + EnGe1* this = (EnGe1*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_ge1.c", 1442); 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 a2297ff810..ff83b5bce2 100644 --- a/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c +++ b/src/overlays/actors/ovl_En_Ge2/z_en_ge2.c @@ -10,8 +10,6 @@ #define FLAGS 0x00000019 -#define THIS ((EnGe2*)thisx) - #define GE2_STATE_ANIMCOMPLETE (1 << 1) #define GE2_STATE_KO (1 << 2) #define GE2_STATE_CAPTURING (1 << 3) @@ -115,7 +113,7 @@ void EnGe2_ChangeAction(EnGe2* this, s32 i) { void EnGe2_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnGe2* this = THIS; + EnGe2* this = (EnGe2*)thisx; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 36.0f); SkelAnime_InitFlex(globalCtx, &this->skelAnime, &gGerudoPurpleSkel, NULL, this->jointTable, this->morphTable, 22); @@ -171,7 +169,7 @@ void EnGe2_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnGe2_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnGe2* this = THIS; + EnGe2* this = (EnGe2*)thisx; Collider_DestroyCylinder(globalCtx, &this->collider); } @@ -513,7 +511,7 @@ void EnGe2_MoveAndBlink(EnGe2* this, GlobalContext* globalCtx) { // Update functions void EnGe2_UpdateFriendly(Actor* thisx, GlobalContext* globalCtx) { - EnGe2* this = THIS; + EnGe2* this = (EnGe2*)thisx; EnGe2_MaintainColliderAndSetAnimState(this, globalCtx); this->actionFunc(this, globalCtx); @@ -536,7 +534,7 @@ void EnGe2_UpdateFriendly(Actor* thisx, GlobalContext* globalCtx) { } void EnGe2_UpdateAfterTalk(Actor* thisx, GlobalContext* globalCtx) { - EnGe2* this = THIS; + EnGe2* this = (EnGe2*)thisx; this->stateFlags |= GE2_STATE_TALKED; EnGe2_MaintainColliderAndSetAnimState(this, globalCtx); @@ -545,7 +543,7 @@ void EnGe2_UpdateAfterTalk(Actor* thisx, GlobalContext* globalCtx) { } void EnGe2_Update(Actor* thisx, GlobalContext* globalCtx) { - EnGe2* this = THIS; + EnGe2* this = (EnGe2*)thisx; s32 paramsType; EnGe2_MaintainColliderAndSetAnimState(this, globalCtx); @@ -597,7 +595,7 @@ void EnGe2_Update(Actor* thisx, GlobalContext* globalCtx) { void EnGe2_UpdateStunned(Actor* thisx, GlobalContext* globalCtx2) { GlobalContext* globalCtx = globalCtx2; - EnGe2* this = THIS; + EnGe2* this = (EnGe2*)thisx; Collider_UpdateCylinder(&this->actor, &this->collider); CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->collider.base); @@ -624,7 +622,7 @@ void EnGe2_UpdateStunned(Actor* thisx, GlobalContext* globalCtx2) { } s32 EnGe2_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - EnGe2* this = THIS; + EnGe2* this = (EnGe2*)thisx; if (limbIndex == 3) { rot->x += this->headRot.y; @@ -635,7 +633,7 @@ s32 EnGe2_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, void EnGe2_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) { static Vec3f D_80A343B0 = { 600.0f, 700.0f, 0.0f }; - EnGe2* this = THIS; + EnGe2* this = (EnGe2*)thisx; if (limbIndex == 6) { Matrix_MultVec3f(&D_80A343B0, &this->actor.focus.pos); @@ -645,7 +643,7 @@ void EnGe2_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Ve void EnGe2_Draw(Actor* thisx, GlobalContext* globalCtx) { static void* eyeTextures[] = { gGerudoPurpleEyeOpenTex, gGerudoPurpleEyeHalfTex, gGerudoPurpleEyeClosedTex }; s32 pad; - EnGe2* this = THIS; + EnGe2* this = (EnGe2*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_ge2.c", 1274); 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 4cbd2317c4..dbad2fb629 100644 --- a/src/overlays/actors/ovl_En_Ge3/z_en_ge3.c +++ b/src/overlays/actors/ovl_En_Ge3/z_en_ge3.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000019 -#define THIS ((EnGe3*)thisx) - void EnGe3_Init(Actor* thisx, GlobalContext* globalCtx); void EnGe3_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnGe3_Update(Actor* thisx, GlobalContext* globalCtx); @@ -66,7 +64,7 @@ void EnGe3_ChangeAction(EnGe3* this, s32 i) { } void EnGe3_Init(Actor* thisx, GlobalContext* globalCtx2) { - EnGe3* this = THIS; + EnGe3* this = (EnGe3*)thisx; GlobalContext* globalCtx = globalCtx2; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 36.0f); @@ -88,7 +86,7 @@ void EnGe3_Init(Actor* thisx, GlobalContext* globalCtx2) { } void EnGe3_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnGe3* this = THIS; + EnGe3* this = (EnGe3*)thisx; Collider_DestroyCylinder(globalCtx, &this->collider); } @@ -200,7 +198,7 @@ void EnGe3_MoveAndBlink(EnGe3* this, GlobalContext* globalCtx) { } void EnGe3_UpdateWhenNotTalking(Actor* thisx, GlobalContext* globalCtx) { - EnGe3* this = THIS; + EnGe3* this = (EnGe3*)thisx; EnGe3_UpdateCollision(this, globalCtx); this->actionFunc(this, globalCtx); @@ -219,7 +217,7 @@ void EnGe3_UpdateWhenNotTalking(Actor* thisx, GlobalContext* globalCtx) { } void EnGe3_Update(Actor* thisx, GlobalContext* globalCtx) { - EnGe3* this = THIS; + EnGe3* this = (EnGe3*)thisx; EnGe3_UpdateCollision(this, globalCtx); this->actionFunc(this, globalCtx); @@ -227,7 +225,7 @@ void EnGe3_Update(Actor* thisx, GlobalContext* globalCtx) { } s32 EnGe3_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - EnGe3* this = THIS; + EnGe3* this = (EnGe3*)thisx; switch (limbIndex) { // Hide swords and veil from object_geldb @@ -268,7 +266,7 @@ s32 EnGe3_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, } void EnGe3_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) { - EnGe3* this = THIS; + EnGe3* this = (EnGe3*)thisx; Vec3f D_80A351C8 = { 600.0f, 700.0f, 0.0f }; if (limbIndex == GELDB_LIMB_HEAD) { @@ -282,7 +280,7 @@ void EnGe3_Draw(Actor* thisx, GlobalContext* globalCtx2) { 0x060065A8, // Quarter-open 0x06006D28, // Closed }; - EnGe3* this = THIS; + EnGe3* this = (EnGe3*)thisx; GlobalContext* globalCtx = globalCtx2; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_ge3.c", 614); 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 cc3b40f7b4..1939827509 100644 --- a/src/overlays/actors/ovl_En_GeldB/z_en_geldb.c +++ b/src/overlays/actors/ovl_En_GeldB/z_en_geldb.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000015 -#define THIS ((EnGeldB*)thisx) - typedef enum { /* 0 */ GELDB_WAIT, /* 1 */ GELDB_DEFEAT, @@ -220,7 +218,7 @@ void EnGeldB_SetupAction(EnGeldB* this, EnGeldBActionFunc actionFunc) { void EnGeldB_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad; EffectBlureInit1 blureInit; - EnGeldB* this = THIS; + EnGeldB* this = (EnGeldB*)thisx; Actor_ProcessInitChain(thisx, sInitChain); thisx->colChkInfo.damageTable = &sDamageTable; @@ -262,7 +260,7 @@ void EnGeldB_Init(Actor* thisx, GlobalContext* globalCtx) { void EnGeldB_Destroy(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnGeldB* this = THIS; + EnGeldB* this = (EnGeldB*)thisx; func_800F5B58(); Effect_Delete(globalCtx, this->blureIndex); @@ -1395,7 +1393,7 @@ void EnGeldB_CollisionCheck(EnGeldB* this, GlobalContext* globalCtx) { void EnGeldB_Update(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnGeldB* this = THIS; + EnGeldB* this = (EnGeldB*)thisx; EnGeldB_CollisionCheck(this, globalCtx); if (this->actor.colChkInfo.damageEffect != GELDB_DMG_UNK_6) { @@ -1429,7 +1427,7 @@ void EnGeldB_Update(Actor* thisx, GlobalContext* globalCtx) { s32 EnGeldB_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - EnGeldB* this = THIS; + EnGeldB* this = (EnGeldB*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_geldB.c", 2507); if (limbIndex == GELDB_LIMB_NECK) { @@ -1462,7 +1460,7 @@ void EnGeldB_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, static Vec3f zeroVec = { 0.0f, 0.0f, 0.0f }; Vec3f swordTip; Vec3f swordHilt; - EnGeldB* this = THIS; + EnGeldB* this = (EnGeldB*)thisx; s32 bodyPart = -1; if (limbIndex == GELDB_LIMB_R_SWORD) { @@ -1550,7 +1548,7 @@ void EnGeldB_Draw(Actor* thisx, GlobalContext* globalCtx) { static void* eyeTextures[] = { gGerudoRedEyeOpenTex, gGerudoRedEyeHalfTex, gGerudoRedEyeShutTex, gGerudoRedEyeHalfTex }; s32 pad; - EnGeldB* this = THIS; + EnGeldB* this = (EnGeldB*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_geldB.c", 2672); if (1) {} 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 cbd5222cdd..f1953fe4ea 100644 --- a/src/overlays/actors/ovl_En_GirlA/z_en_girla.c +++ b/src/overlays/actors/ovl_En_GirlA/z_en_girla.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000019 -#define THIS ((EnGirlA*)thisx) - void EnGirlA_Init(Actor* thisx, GlobalContext* globalCtx); void EnGirlA_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnGirlA_Update(Actor* thisx, GlobalContext* globalCtx); @@ -405,7 +403,7 @@ void EnGirlA_InitItem(EnGirlA* this, GlobalContext* globalCtx) { } void EnGirlA_Init(Actor* thisx, GlobalContext* globalCtx) { - EnGirlA* this = THIS; + EnGirlA* this = (EnGirlA*)thisx; EnGirlA_TryChangeShopItem(this); EnGirlA_InitItem(this, globalCtx); @@ -413,7 +411,7 @@ void EnGirlA_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnGirlA_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnGirlA* this = THIS; + EnGirlA* this = (EnGirlA*)thisx; if (this->isInitialized) { SkelAnime_Free(&this->skelAnime, globalCtx); @@ -1091,7 +1089,7 @@ void EnGirlA_Update2(EnGirlA* this, GlobalContext* globalCtx) { } void EnGirlA_Update(Actor* thisx, GlobalContext* globalCtx) { - EnGirlA* this = THIS; + EnGirlA* this = (EnGirlA*)thisx; this->actionFunc2(this, globalCtx); } @@ -1102,7 +1100,7 @@ void func_80A3C498(Actor* thisx, GlobalContext* globalCtx, s32 flags) { } void EnGirlA_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnGirlA* this = THIS; + EnGirlA* this = (EnGirlA*)thisx; Matrix_RotateY(((this->yRotation * 360.0f) / 65536.0f) * (M_PI / 180.0f), MTXMODE_APPLY); if (this->hiliteFunc != NULL) { 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 2e6bec5be6..c2c4dae068 100644 --- a/src/overlays/actors/ovl_En_Gm/z_en_gm.c +++ b/src/overlays/actors/ovl_En_Gm/z_en_gm.c @@ -11,8 +11,6 @@ #define FLAGS 0x00000019 -#define THIS ((EnGm*)thisx) - void EnGm_Init(Actor* thisx, GlobalContext* globalCtx); void EnGm_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnGm_Update(Actor* thisx, GlobalContext* globalCtx); @@ -65,7 +63,7 @@ static InitChainEntry sInitChain[] = { }; void EnGm_Init(Actor* thisx, GlobalContext* globalCtx) { - EnGm* this = THIS; + EnGm* this = (EnGm*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); @@ -86,7 +84,7 @@ void EnGm_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnGm_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnGm* this = THIS; + EnGm* this = (EnGm*)thisx; Collider_DestroyCylinder(globalCtx, &this->collider); } @@ -285,7 +283,7 @@ void func_80A3DFBC(EnGm* this, GlobalContext* globalCtx) { } void EnGm_Update(Actor* thisx, GlobalContext* globalCtx) { - EnGm* this = THIS; + EnGm* this = (EnGm*)thisx; this->updateFunc(this, globalCtx); } @@ -318,7 +316,7 @@ void func_80A3E090(EnGm* this) { void EnGm_Draw(Actor* thisx, GlobalContext* globalCtx) { static void* eyeTextures[] = { gGoronCsEyeOpenTex, gGoronCsEyeHalfTex, gGoronCsEyeClosedTex }; - EnGm* this = THIS; + EnGm* this = (EnGm*)thisx; s32 pad; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_gm.c", 613); 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 e18a64e88b..1d22bb903b 100644 --- a/src/overlays/actors/ovl_En_Go/z_en_go.c +++ b/src/overlays/actors/ovl_En_Go/z_en_go.c @@ -5,8 +5,6 @@ #define FLAGS 0x00000039 -#define THIS ((EnGo*)thisx) - void EnGo_Init(Actor* thisx, GlobalContext* globalCtx); void EnGo_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnGo_Update(Actor* thisx, GlobalContext* globalCtx); @@ -620,7 +618,7 @@ void func_80A3F908(EnGo* this, GlobalContext* globalCtx) { } void EnGo_Init(Actor* thisx, GlobalContext* globalCtx) { - EnGo* this = THIS; + EnGo* this = (EnGo*)thisx; s32 pad; Vec3f D_80A41B9C = { 0.0f, 0.0f, 0.0f }; // unused Vec3f D_80A41BA8 = { 0.0f, 0.0f, 0.0f }; // unused @@ -693,7 +691,7 @@ void EnGo_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnGo_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnGo* this = THIS; + EnGo* this = (EnGo*)thisx; SkelAnime_Free(&this->skelAnime, globalCtx); Collider_DestroyCylinder(globalCtx, &this->collider); @@ -1018,7 +1016,7 @@ void func_80A40DCC(EnGo* this, GlobalContext* globalCtx) { void EnGo_Update(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnGo* this = THIS; + EnGo* this = (EnGo*)thisx; Collider_UpdateCylinder(&this->actor, &this->collider); CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->collider.base); @@ -1080,7 +1078,7 @@ void EnGo_DrawRolling(EnGo* this, GlobalContext* globalCtx) { } s32 EnGo_OverrideLimbDraw(GlobalContext* globalCtx, s32 limb, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - EnGo* this = THIS; + EnGo* this = (EnGo*)thisx; Vec3s vec1; f32 float1; @@ -1113,7 +1111,7 @@ s32 EnGo_OverrideLimbDraw(GlobalContext* globalCtx, s32 limb, Gfx** dList, Vec3f } void EnGo_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) { - EnGo* this = THIS; + EnGo* this = (EnGo*)thisx; Vec3f D_80A41BCC = { 600.0f, 0.0f, 0.0f }; if (limbIndex == 17) { @@ -1122,7 +1120,7 @@ void EnGo_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec } void EnGo_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnGo* this = THIS; + EnGo* this = (EnGo*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_go.c", 2479); 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 1971ad174b..ad91f96038 100644 --- a/src/overlays/actors/ovl_En_Go2/z_en_go2.c +++ b/src/overlays/actors/ovl_En_Go2/z_en_go2.c @@ -5,8 +5,6 @@ #define FLAGS 0x00000039 -#define THIS ((EnGo2*)thisx) - /* FLAGS @@ -712,7 +710,7 @@ s16 EnGo2_GetStateGoronDmtFairyHint(GlobalContext* globalCtx, EnGo2* this) { } u16 EnGo2_GetTextId(GlobalContext* globalCtx, Actor* thisx) { - EnGo2* this = THIS; + EnGo2* this = (EnGo2*)thisx; u16 faceReaction = Text_GetFaceReaction(globalCtx, 0x20); if (faceReaction) { @@ -752,7 +750,7 @@ u16 EnGo2_GetTextId(GlobalContext* globalCtx, Actor* thisx) { } s16 EnGo2_GetState(GlobalContext* globalCtx, Actor* thisx) { - EnGo2* this = THIS; + EnGo2* this = (EnGo2*)thisx; switch (this->actor.params & 0x1F) { case GORON_CITY_ROLLING_BIG: return EnGo2_GetStateGoronCityRollingBig(globalCtx, this); @@ -1474,7 +1472,7 @@ void EnGo2_BiggoronAnimation(EnGo2* this) { } void EnGo2_Init(Actor* thisx, GlobalContext* globalCtx) { - EnGo2* this = THIS; + EnGo2* this = (EnGo2*)thisx; s32 pad; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 28.0f); @@ -1930,7 +1928,7 @@ void EnGo2_GoronFireGenericAction(EnGo2* this, GlobalContext* globalCtx) { } void EnGo2_Update(Actor* thisx, GlobalContext* globalCtx) { - EnGo2* this = THIS; + EnGo2* this = (EnGo2*)thisx; func_80A45360(this, &this->alpha); EnGo2_SitDownAnimation(this); @@ -1982,7 +1980,7 @@ s32 EnGo2_DrawRolling(EnGo2* this, GlobalContext* globalCtx) { } s32 EnGo2_OverrideLimbDraw(GlobalContext* globalCtx, s32 limb, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - EnGo2* this = THIS; + EnGo2* this = (EnGo2*)thisx; Vec3s vec1; f32 float1; @@ -2012,7 +2010,7 @@ s32 EnGo2_OverrideLimbDraw(GlobalContext* globalCtx, s32 limb, Gfx** dList, Vec3 } void EnGo2_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) { - EnGo2* this = THIS; + EnGo2* this = (EnGo2*)thisx; Vec3f D_80A4856C = { 600.0f, 0.0f, 0.0f }; if (limbIndex == 17) { @@ -2021,7 +2019,7 @@ void EnGo2_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Ve } void EnGo2_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnGo2* this = THIS; + EnGo2* this = (EnGo2*)thisx; void* eyeTextures[] = { gGoronCsEyeClosed2Tex, gGoronCsEyeOpenTex, gGoronCsEyeHalfTex, gGoronCsEyeClosedTex }; void* mouthTextures[] = { gGoronCsMouthNeutralTex, gGoronCsMouthSmileTex }; 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 849bdcbfc4..6f05c0d5f0 100644 --- a/src/overlays/actors/ovl_En_Goma/z_en_goma.c +++ b/src/overlays/actors/ovl_En_Goma/z_en_goma.c @@ -6,8 +6,6 @@ #define FLAGS 0x00000035 -#define THIS ((EnGoma*)thisx) - void EnGoma_Init(Actor* thisx, GlobalContext* globalCtx); void EnGoma_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnGoma_Update(Actor* thisx, GlobalContext* globalCtx); @@ -107,7 +105,7 @@ static InitChainEntry sInitChain[] = { }; void EnGoma_Init(Actor* thisx, GlobalContext* globalCtx) { - EnGoma* this = THIS; + EnGoma* this = (EnGoma*)thisx; s16 params; this->eggTimer = Rand_ZeroOne() * 200.0f; @@ -172,7 +170,7 @@ void EnGoma_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnGoma_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnGoma* this = THIS; + EnGoma* this = (EnGoma*)thisx; if (this->actor.params < 10) { Collider_DestroyCylinder(globalCtx, &this->colCyl1); @@ -698,7 +696,7 @@ void EnGoma_SetFloorRot(EnGoma* this) { } void EnGoma_Update(Actor* thisx, GlobalContext* globalCtx) { - EnGoma* this = THIS; + EnGoma* this = (EnGoma*)thisx; s32 pad; Player* player = GET_PLAYER(globalCtx); @@ -748,7 +746,7 @@ void EnGoma_Update(Actor* thisx, GlobalContext* globalCtx) { } s32 EnGoma_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - EnGoma* this = THIS; + EnGoma* this = (EnGoma*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_goma.c", 1976); gDPSetEnvColor(POLY_OPA_DISP++, (s16)this->eyeEnvColor[0], (s16)this->eyeEnvColor[1], (s16)this->eyeEnvColor[2], @@ -779,7 +777,7 @@ Gfx* EnGoma_NoBackfaceCullingDlist(GraphicsContext* gfxCtx) { } void EnGoma_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnGoma* this = THIS; + EnGoma* this = (EnGoma*)thisx; s32 y; s32 pad; 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 4b4d698ba6..b97c39fa0a 100644 --- a/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.c +++ b/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.c @@ -12,8 +12,6 @@ #define FLAGS 0x00000010 -#define THIS ((EnGoroiwa*)thisx) - typedef s32 (*EnGoroiwaUnkFunc1)(EnGoroiwa* this, GlobalContext* globalCtx); typedef void (*EnGoroiwaUnkFunc2)(EnGoroiwa* this); @@ -531,7 +529,7 @@ static InitChainEntry sInitChain[] = { void EnGoroiwa_Init(Actor* thisx, GlobalContext* globalCtx) { static f32 yOffsets[] = { 0.0f, 595.0f }; - EnGoroiwa* this = THIS; + EnGoroiwa* this = (EnGoroiwa*)thisx; s32 pathIdx; Actor_ProcessInitChain(&this->actor, sInitChain); @@ -567,7 +565,7 @@ void EnGoroiwa_Init(Actor* thisx, GlobalContext* globalCtx) { void EnGoroiwa_Destroy(Actor* thisx, GlobalContext* globalCtx2) { GlobalContext* globalCtx = globalCtx2; - EnGoroiwa* this = THIS; + EnGoroiwa* this = (EnGoroiwa*)thisx; Collider_DestroyJntSph(globalCtx, &this->collider); } @@ -722,7 +720,7 @@ void EnGoroiwa_MoveDown(EnGoroiwa* this, GlobalContext* globalCtx) { } void EnGoroiwa_Update(Actor* thisx, GlobalContext* globalCtx) { - EnGoroiwa* this = THIS; + EnGoroiwa* this = (EnGoroiwa*)thisx; Player* player = GET_PLAYER(globalCtx); s32 pad; s32 sp30; 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 c62a35fde6..7ef62940ac 100644 --- a/src/overlays/actors/ovl_En_Gs/z_en_gs.c +++ b/src/overlays/actors/ovl_En_Gs/z_en_gs.c @@ -11,8 +11,6 @@ #define FLAGS 0x02000009 -#define THIS ((EnGs*)thisx) - void EnGs_Init(Actor* thisx, GlobalContext* globalCtx); void EnGs_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnGs_Update(Actor* thisx, GlobalContext* globalCtx); @@ -97,7 +95,7 @@ static InitChainEntry sInitChain[] = { }; void EnGs_Init(Actor* thisx, GlobalContext* globalCtx) { - EnGs* this = THIS; + EnGs* this = (EnGs*)thisx; Actor_ProcessInitChain(thisx, sInitChain); Collider_InitCylinder(globalCtx, &this->collider); @@ -517,7 +515,7 @@ void func_80A4F77C(EnGs* this) { void EnGs_Update(Actor* thisx, GlobalContext* globalCtx2) { GlobalContext* globalCtx = globalCtx2; - EnGs* this = THIS; + EnGs* this = (EnGs*)thisx; Actor_SetFocus(&this->actor, 23.0f); if (!(this->unk_19E & 0x10)) { @@ -562,7 +560,7 @@ void EnGs_Update(Actor* thisx, GlobalContext* globalCtx2) { } void EnGs_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnGs* this = THIS; + EnGs* this = (EnGs*)thisx; s32 tmp; u32 frames; 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 02e0d296a7..ec032dc75e 100644 --- a/src/overlays/actors/ovl_En_Guest/z_en_guest.c +++ b/src/overlays/actors/ovl_En_Guest/z_en_guest.c @@ -11,8 +11,6 @@ #define FLAGS 0x00000019 -#define THIS ((EnGuest*)thisx) - void EnGuest_Init(Actor* thisx, GlobalContext* globalCtx); void EnGuest_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnGuest_Update(Actor* thisx, GlobalContext* globalCtx); @@ -54,7 +52,7 @@ static InitChainEntry sInitChain[] = { extern FlexSkeletonHeader object_boj_Skel_0000F0; void EnGuest_Init(Actor* thisx, GlobalContext* globalCtx) { - EnGuest* this = THIS; + EnGuest* this = (EnGuest*)thisx; if (gSaveContext.infTable[7] & 0x40) { Actor_Kill(&this->actor); @@ -71,13 +69,13 @@ void EnGuest_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnGuest_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnGuest* this = THIS; + EnGuest* this = (EnGuest*)thisx; Collider_DestroyCylinder(globalCtx, &this->collider); } void EnGuest_Update(Actor* thisx, GlobalContext* globalCtx) { - EnGuest* this = THIS; + EnGuest* this = (EnGuest*)thisx; s32 pad; if (Object_IsLoaded(&globalCtx->objectCtx, this->osAnimeBankIndex) != 0) { @@ -144,7 +142,7 @@ void func_80A5057C(EnGuest* this, GlobalContext* globalCtx) { } void func_80A505CC(Actor* thisx, GlobalContext* globalCtx) { - EnGuest* this = THIS; + EnGuest* this = (EnGuest*)thisx; s32 pad; Player* player; @@ -185,7 +183,7 @@ Gfx* func_80A50708(GraphicsContext* gfxCtx, u8 r, u8 g, u8 b, u8 a) { s32 EnGuest_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - EnGuest* this = THIS; + EnGuest* this = (EnGuest*)thisx; Vec3s sp3C; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_guest.c", 352); @@ -221,7 +219,7 @@ void EnGuest_Draw(Actor* thisx, GlobalContext* globalCtx) { 0x060006FC, 0x060007FC, }; - EnGuest* this = THIS; + EnGuest* this = (EnGuest*)thisx; s32 pad; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_guest.c", 404); 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 897d223dec..5f14c3db7f 100644 --- a/src/overlays/actors/ovl_En_Hata/z_en_hata.c +++ b/src/overlays/actors/ovl_En_Hata/z_en_hata.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000000 -#define THIS ((EnHata*)thisx) - void EnHata_Init(Actor* thisx, GlobalContext* globalCtx); void EnHata_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnHata_Update(Actor* thisx, GlobalContext* globalCtx); @@ -52,7 +50,7 @@ static ColliderCylinderInit sCylinderInit = { static CollisionCheckInfoInit2 sColChkInfoInit = { 0, 0, 0, 0, MASS_IMMOVABLE }; void EnHata_Init(Actor* thisx, GlobalContext* globalCtx) { - EnHata* this = THIS; + EnHata* this = (EnHata*)thisx; s32 pad; CollisionHeader* colHeader = NULL; f32 frameCount = Animation_GetLastFrame(&gFlagpoleFlapAnim); @@ -73,7 +71,7 @@ void EnHata_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnHata_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnHata* this = THIS; + EnHata* this = (EnHata*)thisx; SkelAnime_Free(&this->skelAnime, globalCtx); DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); @@ -81,7 +79,7 @@ void EnHata_Destroy(Actor* thisx, GlobalContext* globalCtx) { void EnHata_Update(Actor* thisx, GlobalContext* globalCtx2) { GlobalContext* globalCtx = globalCtx2; - EnHata* this = THIS; + EnHata* this = (EnHata*)thisx; s32 pitch; Vec3f zeroVec = { 0.0f, 0.0f, 0.0f }; Vec3f windVec; @@ -121,7 +119,7 @@ void EnHata_Update(Actor* thisx, GlobalContext* globalCtx2) { } s32 EnHata_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - EnHata* this = THIS; + EnHata* this = (EnHata*)thisx; Vec3s* limbs; if (limbIndex == FLAGPOLE_LIMB_FLAG_2_BASE || limbIndex == FLAGPOLE_LIMB_FLAG_1_BASE || @@ -138,7 +136,7 @@ void EnHata_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, V } void EnHata_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnHata* this = THIS; + EnHata* this = (EnHata*)thisx; func_800943C8(globalCtx->state.gfxCtx); Matrix_Scale(1.0f, 1.1f, 1.0f, MTXMODE_APPLY); 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 c2fc3c1695..6df57a3e62 100644 --- a/src/overlays/actors/ovl_En_Heishi1/z_en_heishi1.c +++ b/src/overlays/actors/ovl_En_Heishi1/z_en_heishi1.c @@ -10,8 +10,6 @@ #define FLAGS 0x00000010 -#define THIS ((EnHeishi1*)thisx) - void EnHeishi1_Init(Actor* thisx, GlobalContext* globalCtx); void EnHeishi1_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnHeishi1_Update(Actor* thisx, GlobalContext* globalCtx); @@ -67,7 +65,7 @@ static s16 sWaypoints[] = { 0, 4, 1, 5, 2, 6, 3, 7 }; void EnHeishi1_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnHeishi1* this = THIS; + EnHeishi1* this = (EnHeishi1*)thisx; Vec3f rupeePos; s32 i; @@ -381,7 +379,7 @@ void EnHeishi1_WaitNight(EnHeishi1* this, GlobalContext* globalCtx) { } void EnHeishi1_Update(Actor* thisx, GlobalContext* globalCtx) { - EnHeishi1* this = THIS; + EnHeishi1* this = (EnHeishi1*)thisx; s16 path; u8 i; s32 pad; @@ -474,7 +472,7 @@ void EnHeishi1_Update(Actor* thisx, GlobalContext* globalCtx) { s32 EnHeishi1_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - EnHeishi1* this = THIS; + EnHeishi1* this = (EnHeishi1*)thisx; // turn the guards head to match the direction he is looking if (limbIndex == 16) { @@ -486,7 +484,7 @@ s32 EnHeishi1_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dL void EnHeishi1_Draw(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnHeishi1* this = THIS; + EnHeishi1* this = (EnHeishi1*)thisx; Vec3f matrixScale = { 0.3f, 0.3f, 0.3f }; func_80093D18(globalCtx->state.gfxCtx); 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 dee0eb1ca4..70149134f6 100644 --- a/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c +++ b/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c @@ -14,8 +14,6 @@ #define FLAGS 0x00000009 -#define THIS ((EnHeishi2*)thisx) - void EnHeishi2_Init(Actor* thisx, GlobalContext* globalCtx); void EnHeishi2_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnHeishi2_Update(Actor* thisx, GlobalContext* globalCtx); @@ -86,7 +84,7 @@ static ColliderCylinderInit sCylinderInit = { void EnHeishi2_Init(Actor* thisx, GlobalContext* globalCtx) { ColliderCylinder* collider; - EnHeishi2* this = THIS; + EnHeishi2* this = (EnHeishi2*)thisx; Actor_SetScale(&this->actor, 0.01f); this->type = this->actor.params & 0xFF; @@ -162,7 +160,7 @@ void EnHeishi2_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnHeishi2_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnHeishi2* this = THIS; + EnHeishi2* this = (EnHeishi2*)thisx; if ((this->collider.dim.radius != 0) || (this->collider.dim.height != 0)) { Collider_DestroyCylinder(globalCtx, &this->collider); @@ -764,7 +762,7 @@ void func_80A549E8(EnHeishi2* this, GlobalContext* globalCtx) { void EnHeishi2_Update(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnHeishi2* this = THIS; + EnHeishi2* this = (EnHeishi2*)thisx; s32 i; Actor_SetFocus(&this->actor, this->unk_2E0); @@ -798,7 +796,7 @@ void EnHeishi2_Update(Actor* thisx, GlobalContext* globalCtx) { s32 EnHeishi2_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - EnHeishi2* this = THIS; + EnHeishi2* this = (EnHeishi2*)thisx; switch (this->type) { case 1: @@ -819,7 +817,7 @@ s32 EnHeishi2_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dL } void EnHeishi2_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) { - EnHeishi2* this = THIS; + EnHeishi2* this = (EnHeishi2*)thisx; if (limbIndex == 16) { Matrix_Get(&this->mtxf_330); @@ -837,7 +835,7 @@ void EnHeishi2_DrawKingGuard(Actor* thisx, GlobalContext* globalCtx) { } void EnHeishi2_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnHeishi2* this = THIS; + EnHeishi2* this = (EnHeishi2*)thisx; Mtx* mtx; s32 linkObjBankIndex; 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 8f9fb78e61..5eb1f34809 100644 --- a/src/overlays/actors/ovl_En_Heishi3/z_en_heishi3.c +++ b/src/overlays/actors/ovl_En_Heishi3/z_en_heishi3.c @@ -10,8 +10,6 @@ #define FLAGS 0x00000000 -#define THIS ((EnHeishi3*)thisx) - void EnHeishi3_Init(Actor* thisx, GlobalContext* globalCtx); void EnHeishi3_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnHeishi3_Update(Actor* thisx, GlobalContext* globalCtx); @@ -60,7 +58,7 @@ static ColliderCylinderInit sCylinderInit = { }; void EnHeishi3_Init(Actor* thisx, GlobalContext* globalCtx) { - EnHeishi3* this = THIS; + EnHeishi3* this = (EnHeishi3*)thisx; sPlayerCaught = 0; if (this->actor.params <= 0) { @@ -88,7 +86,7 @@ void EnHeishi3_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnHeishi3_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnHeishi3* this = THIS; + EnHeishi3* this = (EnHeishi3*)thisx; Collider_DestroyCylinder(globalCtx, &this->collider); } @@ -214,7 +212,7 @@ void func_80A55D00(EnHeishi3* this, GlobalContext* globalCtx) { } void EnHeishi3_Update(Actor* thisx, GlobalContext* globalCtx) { - EnHeishi3* this = THIS; + EnHeishi3* this = (EnHeishi3*)thisx; s32 pad; Actor_SetFocus(&this->actor, 60.0f); @@ -232,7 +230,7 @@ void EnHeishi3_Update(Actor* thisx, GlobalContext* globalCtx) { s32 EnHeishi3_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - EnHeishi3* this = THIS; + EnHeishi3* this = (EnHeishi3*)thisx; if (limbIndex == 9) { rot->x += this->unk_26E; @@ -247,7 +245,7 @@ s32 EnHeishi3_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dL } void EnHeishi3_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnHeishi3* this = THIS; + EnHeishi3* this = (EnHeishi3*)thisx; func_80093D18(globalCtx->state.gfxCtx); SkelAnime_DrawOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, EnHeishi3_OverrideLimbDraw, NULL, 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 af7df9dd03..1fa94a5cbf 100644 --- a/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.c +++ b/src/overlays/actors/ovl_En_Heishi4/z_en_heishi4.c @@ -4,8 +4,6 @@ #define FLAGS 0x00000009 -#define THIS ((EnHeishi4*)thisx) - void EnHeishi4_Init(Actor* thisx, GlobalContext* globalCtx); void EnHeishi4_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnHeishi4_Update(Actor* thisx, GlobalContext* globalCtx); @@ -58,7 +56,7 @@ static ColliderCylinderInit sCylinderInit = { }; void EnHeishi4_Init(Actor* thisx, GlobalContext* globalCtx) { - EnHeishi4* this = THIS; + EnHeishi4* this = (EnHeishi4*)thisx; Actor_SetScale(thisx, 0.01f); this->type = thisx->params & 0xFF; @@ -104,7 +102,7 @@ void EnHeishi4_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnHeishi4_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnHeishi4* this = THIS; + EnHeishi4* this = (EnHeishi4*)thisx; Collider_DestroyCylinder(globalCtx, &this->collider); } @@ -340,7 +338,7 @@ void func_80A56B40(EnHeishi4* this, GlobalContext* globalCtx) { } void EnHeishi4_Update(Actor* thisx, GlobalContext* globalCtx) { - EnHeishi4* this = THIS; + EnHeishi4* this = (EnHeishi4*)thisx; s32 pad; Player* player = GET_PLAYER(globalCtx); @@ -367,7 +365,7 @@ void EnHeishi4_Update(Actor* thisx, GlobalContext* globalCtx) { s32 EnHeishi_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - EnHeishi4* this = THIS; + EnHeishi4* this = (EnHeishi4*)thisx; if (limbIndex == 9) { rot->x += this->unk_266.y; @@ -380,7 +378,7 @@ s32 EnHeishi_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dLi } void EnHeishi4_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnHeishi4* this = THIS; + EnHeishi4* this = (EnHeishi4*)thisx; func_80093D18(globalCtx->state.gfxCtx); SkelAnime_DrawOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, EnHeishi_OverrideLimbDraw, NULL, 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 e08907a8b8..8cd3de1276 100644 --- a/src/overlays/actors/ovl_En_Hintnuts/z_en_hintnuts.c +++ b/src/overlays/actors/ovl_En_Hintnuts/z_en_hintnuts.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000005 -#define THIS ((EnHintnuts*)thisx) - void EnHintnuts_Init(Actor* thisx, GlobalContext* globalCtx); void EnHintnuts_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnHintnuts_Update(Actor* thisx, GlobalContext* globalCtx); @@ -72,7 +70,7 @@ static InitChainEntry sInitChain[] = { }; void EnHintnuts_Init(Actor* thisx, GlobalContext* globalCtx) { - EnHintnuts* this = THIS; + EnHintnuts* this = (EnHintnuts*)thisx; s32 pad; Actor_ProcessInitChain(&this->actor, sInitChain); @@ -102,7 +100,7 @@ void EnHintnuts_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnHintnuts_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnHintnuts* this = THIS; + EnHintnuts* this = (EnHintnuts*)thisx; if (this->actor.params != 0xA) { Collider_DestroyCylinder(globalCtx, &this->collider); @@ -477,7 +475,7 @@ void EnHintnuts_ColliderCheck(EnHintnuts* this, GlobalContext* globalCtx) { } void EnHintnuts_Update(Actor* thisx, GlobalContext* globalCtx) { - EnHintnuts* this = THIS; + EnHintnuts* this = (EnHintnuts*)thisx; s32 pad; if (this->actor.params != 0xA) { @@ -508,7 +506,7 @@ s32 EnHintnuts_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** d void* thisx) { Vec3f vec; f32 curFrame; - EnHintnuts* this = THIS; + EnHintnuts* this = (EnHintnuts*)thisx; if (limbIndex == 5 && this->actionFunc == EnHintnuts_ThrowNut) { curFrame = this->skelAnime.curFrame; @@ -534,7 +532,7 @@ s32 EnHintnuts_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** d } void EnHintnuts_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnHintnuts* this = THIS; + EnHintnuts* this = (EnHintnuts*)thisx; if (this->actor.params == 0xA) { Gfx_DrawDListOpa(globalCtx, gHintNutsFlowerDL); 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 54a7156678..4b3365b408 100644 --- a/src/overlays/actors/ovl_En_Holl/z_en_holl.c +++ b/src/overlays/actors/ovl_En_Holl/z_en_holl.c @@ -2,8 +2,6 @@ #define FLAGS 0x00000010 -#define THIS ((EnHoll*)thisx) - // Horizontal Plane parameters #define PLANE_Y_MIN -50.0f @@ -94,7 +92,7 @@ void EnHoll_ChooseAction(EnHoll* this) { } void EnHoll_Init(Actor* thisx, GlobalContext* globalCtx) { - EnHoll* this = THIS; + EnHoll* this = (EnHoll*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); EnHoll_ChooseAction(this); @@ -316,7 +314,7 @@ void EnHoll_NextAction(EnHoll* this, GlobalContext* globalCtx) { } void EnHoll_Update(Actor* thisx, GlobalContext* globalCtx) { - EnHoll* this = THIS; + EnHoll* this = (EnHoll*)thisx; this->actionFunc(this, globalCtx); } @@ -324,7 +322,7 @@ void EnHoll_Update(Actor* thisx, GlobalContext* globalCtx) { #include "overlays/ovl_En_Holl/ovl_En_Holl.c" void EnHoll_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnHoll* this = THIS; + EnHoll* this = (EnHoll*)thisx; Gfx* gfxP; u32 setupDlIdx; 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 6913e31bbc..04ee4623aa 100644 --- a/src/overlays/actors/ovl_En_Honotrap/z_en_honotrap.c +++ b/src/overlays/actors/ovl_En_Honotrap/z_en_honotrap.c @@ -10,8 +10,6 @@ #define FLAGS 0x00000010 -#define THIS ((EnHonotrap*)thisx) - #define HONOTRAP_AT_ACTIVE (1 << 0) #define HONOTRAP_AC_ACTIVE (1 << 1) #define HONOTRAP_OC_ACTIVE (1 << 2) @@ -156,7 +154,7 @@ void EnHonotrap_GetNormal(Vec3f* normal, Vec3f* vec) { void EnHonotrap_InitEye(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnHonotrap* this = THIS; + EnHonotrap* this = (EnHonotrap*)thisx; s32 i; s32 j; Vec3f* vtx; @@ -187,7 +185,7 @@ void EnHonotrap_InitEye(Actor* thisx, GlobalContext* globalCtx) { void EnHonotrap_InitFlame(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnHonotrap* this = THIS; + EnHonotrap* this = (EnHonotrap*)thisx; Actor_SetScale(&this->actor, 0.0001f); Collider_InitCylinder(globalCtx, &this->collider.cyl); @@ -221,7 +219,7 @@ void EnHonotrap_Init(Actor* thisx, GlobalContext* globalCtx) { void EnHonotrap_Destroy(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnHonotrap* this = THIS; + EnHonotrap* this = (EnHonotrap*)thisx; if (this->actor.params == HONOTRAP_EYE) { Collider_DestroyTris(globalCtx, &this->collider.tris); @@ -459,7 +457,7 @@ void EnHonotrap_Update(Actor* thisx, GlobalContext* globalCtx) { static Vec3f velocity = { 0.0f, 0.0f, 0.0f }; static Vec3f accel = { 0.0f, 0.1f, 0.0f }; s32 pad; - EnHonotrap* this = THIS; + EnHonotrap* this = (EnHonotrap*)thisx; if (this->timer > 0) { this->timer--; @@ -494,7 +492,7 @@ void EnHonotrap_DrawEye(Actor* thisx, GlobalContext* globalCtx) { gEyeSwitchSilverClosedTex, gEyeSwitchSilverClosedTex, }; - EnHonotrap* this = THIS; + EnHonotrap* this = (EnHonotrap*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_honotrap.c", 982); @@ -509,7 +507,7 @@ void EnHonotrap_DrawEye(Actor* thisx, GlobalContext* globalCtx) { void EnHonotrap_DrawFlame(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnHonotrap* this = THIS; + EnHonotrap* this = (EnHonotrap*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_honotrap.c", 1000); 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 ebc9958663..945cab5d7f 100644 --- a/src/overlays/actors/ovl_En_Horse/z_en_horse.c +++ b/src/overlays/actors/ovl_En_Horse/z_en_horse.c @@ -12,8 +12,6 @@ #define FLAGS 0x00000010 -#define THIS ((EnHorse*)thisx) - typedef void (*EnHorseCsFunc)(EnHorse*, GlobalContext*, CsCmdActorAction*); typedef void (*EnHorseActionFunc)(EnHorse*, GlobalContext*); @@ -743,7 +741,7 @@ void EnHorse_ClearDustFlags(u16* dustFlags) { } void EnHorse_Init(Actor* thisx, GlobalContext* globalCtx2) { - EnHorse* this = THIS; + EnHorse* this = (EnHorse*)thisx; GlobalContext* globalCtx = globalCtx2; AREG(6) = 0; @@ -898,7 +896,7 @@ void EnHorse_Init(Actor* thisx, GlobalContext* globalCtx2) { } void EnHorse_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnHorse* this = THIS; + EnHorse* this = (EnHorse*)thisx; if (this->stateFlags & ENHORSE_DRAW) { Audio_StopSfxByPos(&this->unk_21C); @@ -3299,7 +3297,7 @@ void EnHorse_UpdateBgCheckInfo(EnHorse* this, GlobalContext* globalCtx) { } void EnHorse_CheckBoost(EnHorse* thisx, GlobalContext* globalCtx2) { - EnHorse* this = THIS; + EnHorse* this = (EnHorse*)thisx; GlobalContext* globalCtx = globalCtx2; s32 pad; @@ -3462,7 +3460,7 @@ s32 EnHorse_RandInt(f32 range) { } void EnHorse_Update(Actor* thisx, GlobalContext* globalCtx2) { - EnHorse* this = THIS; + EnHorse* this = (EnHorse*)thisx; GlobalContext* globalCtx = globalCtx2; Vec3f dustAcc = { 0.0f, 0.0f, 0.0f }; Vec3f dustVel = { 0.0f, 1.0f, 0.0f }; @@ -3654,7 +3652,7 @@ void EnHorse_RandomOffset(Vec3f* src, f32 dist, Vec3f* dst) { } void EnHorse_SkinCallback1(Actor* thisx, GlobalContext* globalCtx, PSkinAwb* skin) { - EnHorse* this = THIS; + EnHorse* this = (EnHorse*)thisx; s32 pad; Vec3f sp94 = { 0.0f, 0.0f, 0.0f }; Vec3f hoofOffset = { 5.0f, -4.0f, 5.0f }; @@ -3806,7 +3804,7 @@ s32 EnHorse_SkinCallback2(Actor* thisx, GlobalContext* globalCtx, s32 limbIndex, gEponaEyeClosedTex, }; static u8 eyeBlinkIndexes[] = { 0, 1, 2, 1 }; - EnHorse* this = THIS; + EnHorse* this = (EnHorse*)thisx; s32 drawOriginalLimb = true; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_horse.c", 8582); @@ -3823,7 +3821,7 @@ s32 EnHorse_SkinCallback2(Actor* thisx, GlobalContext* globalCtx, s32 limbIndex, } void EnHorse_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnHorse* this = THIS; + EnHorse* this = (EnHorse*)thisx; if (!(this->stateFlags & ENHORSE_INACTIVE)) { func_80093D18(globalCtx->state.gfxCtx); 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 245b8c4a2f..3f73cb4820 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 @@ -9,7 +9,6 @@ #define FLAGS 0x00000010 -#define THIS ((EnHorseGameCheckBase*)thisx) #define AT_FINISH_LINE(actor) \ (Math3D_PointInSquare2D(sFinishLine[0], sFinishLine[1], sFinishLine[2], sFinishLine[3], (actor)->world.pos.x, \ (actor)->world.pos.z)) @@ -439,7 +438,7 @@ static EnHorseGameCheckFunc sUpdateFuncs[] = { void EnHorseGameCheck_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnHorseGameCheckBase* this = THIS; + EnHorseGameCheckBase* this = (EnHorseGameCheckBase*)thisx; if ((globalCtx->sceneNum == SCENE_SPOT20) && (Flags_GetEventChkInf(0x18) || DREG(1))) { this->actor.params = HORSEGAME_MALON_RACE; @@ -451,7 +450,7 @@ void EnHorseGameCheck_Init(Actor* thisx, GlobalContext* globalCtx) { void EnHorseGameCheck_Destroy(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnHorseGameCheckBase* this = THIS; + EnHorseGameCheckBase* this = (EnHorseGameCheckBase*)thisx; if (sDestroyFuncs[this->actor.params] != NULL) { sDestroyFuncs[this->actor.params](this, globalCtx); @@ -460,7 +459,7 @@ void EnHorseGameCheck_Destroy(Actor* thisx, GlobalContext* globalCtx) { void EnHorseGameCheck_Update(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnHorseGameCheckBase* this = THIS; + EnHorseGameCheckBase* this = (EnHorseGameCheckBase*)thisx; if (sUpdateFuncs[this->type] != NULL) { sUpdateFuncs[this->type](this, globalCtx); 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 1af749de10..d5af394f51 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 @@ -9,8 +9,6 @@ #define FLAGS 0x00000010 -#define THIS ((EnHorseGanon*)thisx) - typedef struct { /* 0x0 */ Vec3s unk_0; /* 0x6 */ u8 unk_6; @@ -167,7 +165,7 @@ void func_80A68870(EnHorseGanon* this) { } void EnHorseGanon_Init(Actor* thisx, GlobalContext* globalCtx) { - EnHorseGanon* this = THIS; + EnHorseGanon* this = (EnHorseGanon*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); Actor_SetScale(&this->actor, 0.0115f); @@ -193,7 +191,7 @@ void EnHorseGanon_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnHorseGanon_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnHorseGanon* this = THIS; + EnHorseGanon* this = (EnHorseGanon*)thisx; func_800A6888(globalCtx, &this->skin); Collider_DestroyCylinder(globalCtx, &this->colliderBody); @@ -286,7 +284,7 @@ void func_80A68E14(EnHorseGanon* this, GlobalContext* globalCtx) { } void EnHorseGanon_Update(Actor* thisx, GlobalContext* globalCtx) { - EnHorseGanon* this = THIS; + EnHorseGanon* this = (EnHorseGanon*)thisx; s32 pad; sActionFuncs[this->action](this, globalCtx); @@ -301,7 +299,7 @@ void EnHorseGanon_Update(Actor* thisx, GlobalContext* globalCtx) { void func_80A68FA8(Actor* thisx, GlobalContext* globalCtx, PSkinAwb* skin) { Vec3f sp4C; Vec3f sp40; - EnHorseGanon* this = THIS; + EnHorseGanon* this = (EnHorseGanon*)thisx; s32 index; for (index = 0; index < this->colliderHead.count; index++) { @@ -324,7 +322,7 @@ void func_80A68FA8(Actor* thisx, GlobalContext* globalCtx, PSkinAwb* skin) { } void EnHorseGanon_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnHorseGanon* this = THIS; + EnHorseGanon* this = (EnHorseGanon*)thisx; func_80A68E14(this, globalCtx); func_80093D18(globalCtx->state.gfxCtx); 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 d6abca36ed..13fba382bc 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 @@ -9,8 +9,6 @@ #define FLAGS 0x02000010 -#define THIS ((EnHorseLinkChild*)thisx) - void EnHorseLinkChild_Init(Actor* thisx, GlobalContext* globalCtx); void EnHorseLinkChild_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnHorseLinkChild_Update(Actor* thisx, GlobalContext* globalCtx); @@ -142,7 +140,7 @@ static InitChainEntry sInitChain[] = { }; void EnHorseLinkChild_Init(Actor* thisx, GlobalContext* globalCtx) { - EnHorseLinkChild* this = THIS; + EnHorseLinkChild* this = (EnHorseLinkChild*)thisx; s32 pad; Actor_ProcessInitChain(&this->actor, sInitChain); @@ -181,7 +179,7 @@ void EnHorseLinkChild_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnHorseLinkChild_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnHorseLinkChild* this = THIS; + EnHorseLinkChild* this = (EnHorseLinkChild*)thisx; func_800A6888(globalCtx, &this->skin); Collider_DestroyCylinder(globalCtx, &this->bodyCollider); @@ -552,7 +550,7 @@ static void* sEyeTextures[] = { gChildEponaEyeOpenTex, gChildEponaEyeHalfTex, gC static u8 sEyeIndexOrder[] = { 0, 1, 2, 1 }; void EnHorseLinkChild_Update(Actor* thisx, GlobalContext* globalCtx) { - EnHorseLinkChild* this = THIS; + EnHorseLinkChild* this = (EnHorseLinkChild*)thisx; s32 pad; sActionFuncs[this->action](this, globalCtx); @@ -583,7 +581,7 @@ void EnHorseLinkChild_Update(Actor* thisx, GlobalContext* globalCtx) { void func_80A6ABF8(Actor* thisx, GlobalContext* globalCtx, PSkinAwb* skin) { Vec3f center; Vec3f newCenter; - EnHorseLinkChild* this = THIS; + EnHorseLinkChild* this = (EnHorseLinkChild*)thisx; s32 i; for (i = 0; i < this->headCollider.count; i++) { @@ -603,7 +601,7 @@ void func_80A6ABF8(Actor* thisx, GlobalContext* globalCtx, PSkinAwb* skin) { } s32 func_80A6AD84(Actor* thisx, GlobalContext* globalCtx, s32 arg2, PSkinAwb* arg3) { - EnHorseLinkChild* this = THIS; + EnHorseLinkChild* this = (EnHorseLinkChild*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_horse_link_child.c", 1467); @@ -619,7 +617,7 @@ s32 func_80A6AD84(Actor* thisx, GlobalContext* globalCtx, s32 arg2, PSkinAwb* ar } void EnHorseLinkChild_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnHorseLinkChild* this = THIS; + EnHorseLinkChild* this = (EnHorseLinkChild*)thisx; func_80093D18(globalCtx->state.gfxCtx); func_800A6360(&this->actor, globalCtx, &this->skin, func_80A6ABF8, func_80A6AD84, 1); 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 402fa74ab8..838438f591 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 @@ -10,8 +10,6 @@ #define FLAGS 0x00000000 -#define THIS ((EnHorseNormal*)thisx) - typedef struct { Vec3s pos; u8 unk_06; // this may be a s16 if the always-0 following byte is actually not padding @@ -184,7 +182,7 @@ static InitChainEntry sInitChain[] = { }; void EnHorseNormal_Init(Actor* thisx, GlobalContext* globalCtx) { - EnHorseNormal* this = THIS; + EnHorseNormal* this = (EnHorseNormal*)thisx; s32 pad; Actor_ProcessInitChain(&this->actor, sInitChain); @@ -269,7 +267,7 @@ void EnHorseNormal_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnHorseNormal_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnHorseNormal* this = THIS; + EnHorseNormal* this = (EnHorseNormal*)thisx; func_800A6888(globalCtx, &this->skin); Collider_DestroyCylinder(globalCtx, &this->bodyCollider); @@ -567,7 +565,7 @@ static EnHorseNormalActionFunc sActionFuncs[] = { }; void EnHorseNormal_Update(Actor* thisx, GlobalContext* globalCtx) { - EnHorseNormal* this = THIS; + EnHorseNormal* this = (EnHorseNormal*)thisx; s32 pad; sActionFuncs[this->action](this, globalCtx); @@ -592,7 +590,7 @@ void EnHorseNormal_Update(Actor* thisx, GlobalContext* globalCtx) { void func_80A6CAFC(Actor* thisx, GlobalContext* globalCtx, PSkinAwb* skin) { Vec3f sp4C; Vec3f sp40; - EnHorseNormal* this = THIS; + EnHorseNormal* this = (EnHorseNormal*)thisx; s32 i; for (i = 0; i < this->headCollider.count; i++) { @@ -635,7 +633,7 @@ void func_80A6CC88(GlobalContext* globalCtx, EnHorseNormal* this, Vec3f* arg2) { } void EnHorseNormal_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnHorseNormal* this = THIS; + EnHorseNormal* this = (EnHorseNormal*)thisx; Mtx* mtx2; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_horse_normal.c", 2224); 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 4c8549ffb4..652a542b40 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 @@ -9,8 +9,6 @@ #define FLAGS 0x00000010 -#define THIS ((EnHorseZelda*)thisx) - void EnHorseZelda_Init(Actor* thisx, GlobalContext* globalCtx); void EnHorseZelda_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnHorseZelda_Update(Actor* thisx, GlobalContext* globalCtx); @@ -149,7 +147,7 @@ void func_80A6D918(EnHorseZelda* this, GlobalContext* globalCtx) { } void EnHorseZelda_Init(Actor* thisx, GlobalContext* globalCtx) { - EnHorseZelda* this = THIS; + EnHorseZelda* this = (EnHorseZelda*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); Actor_SetScale(&this->actor, 0.0115f); @@ -172,7 +170,7 @@ void EnHorseZelda_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnHorseZelda_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnHorseZelda* this = THIS; + EnHorseZelda* this = (EnHorseZelda*)thisx; Collider_DestroyCylinder(globalCtx, &this->colliderCylinder); Collider_DestroyJntSph(globalCtx, &this->colliderSphere); @@ -229,7 +227,7 @@ void func_80A6DE38(EnHorseZelda* this, GlobalContext* globalCtx) { } void EnHorseZelda_Update(Actor* thisx, GlobalContext* globalCtx) { - EnHorseZelda* this = THIS; + EnHorseZelda* this = (EnHorseZelda*)thisx; s32 pad; sActionFuncs[this->action](this, globalCtx); @@ -245,7 +243,7 @@ void EnHorseZelda_Update(Actor* thisx, GlobalContext* globalCtx) { void func_80A6DFD4(Actor* thisx, GlobalContext* globalCtx, PSkinAwb* skin) { Vec3f sp4C; Vec3f sp40; - EnHorseZelda* this = THIS; + EnHorseZelda* this = (EnHorseZelda*)thisx; s32 i; for (i = 0; i < this->colliderSphere.count; i++) { @@ -268,7 +266,7 @@ void func_80A6DFD4(Actor* thisx, GlobalContext* globalCtx, PSkinAwb* skin) { } void EnHorseZelda_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnHorseZelda* this = THIS; + EnHorseZelda* this = (EnHorseZelda*)thisx; func_80A6DE38(this, globalCtx); func_80093D18(globalCtx->state.gfxCtx); 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 137de508a7..ebb2afa738 100644 --- a/src/overlays/actors/ovl_En_Hs/z_en_hs.c +++ b/src/overlays/actors/ovl_En_Hs/z_en_hs.c @@ -10,8 +10,6 @@ #define FLAGS 0x00000009 -#define THIS ((EnHs*)thisx) - void EnHs_Init(Actor* thisx, GlobalContext* globalCtx); void EnHs_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnHs_Update(Actor* thisx, GlobalContext* globalCtx); @@ -57,7 +55,7 @@ void func_80A6E3A0(EnHs* this, EnHsActionFunc actionFunc) { } void EnHs_Init(Actor* thisx, GlobalContext* globalCtx) { - EnHs* this = THIS; + EnHs* this = (EnHs*)thisx; s32 pad; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 36.0f); @@ -95,7 +93,7 @@ void EnHs_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnHs_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnHs* this = THIS; + EnHs* this = (EnHs*)thisx; Collider_DestroyCylinder(globalCtx, &this->collider); } @@ -229,7 +227,7 @@ void func_80A6E9AC(EnHs* this, GlobalContext* globalCtx) { } void EnHs_Update(Actor* thisx, GlobalContext* globalCtx) { - EnHs* this = THIS; + EnHs* this = (EnHs*)thisx; s32 pad; Collider_UpdateCylinder(thisx, &this->collider); @@ -254,7 +252,7 @@ void EnHs_Update(Actor* thisx, GlobalContext* globalCtx) { } s32 EnHs_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - EnHs* this = THIS; + EnHs* this = (EnHs*)thisx; switch (limbIndex) { case 9: @@ -285,7 +283,7 @@ s32 EnHs_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, void EnHs_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) { static Vec3f D_80A6EDFC = { 300.0f, 1000.0f, 0.0f }; - EnHs* this = THIS; + EnHs* this = (EnHs*)thisx; if (limbIndex == 9) { Matrix_MultVec3f(&D_80A6EDFC, &this->actor.focus.pos); @@ -293,7 +291,7 @@ void EnHs_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec } void EnHs_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnHs* this = THIS; + EnHs* this = (EnHs*)thisx; func_800943C8(globalCtx->state.gfxCtx); SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, 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 66edaaf463..af50f2c46e 100644 --- a/src/overlays/actors/ovl_En_Hs2/z_en_hs2.c +++ b/src/overlays/actors/ovl_En_Hs2/z_en_hs2.c @@ -10,8 +10,6 @@ #define FLAGS 0x00000009 -#define THIS ((EnHs2*)thisx) - void EnHs2_Init(Actor* thisx, GlobalContext* globalCtx); void EnHs2_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnHs2_Update(Actor* thisx, GlobalContext* globalCtx); @@ -51,7 +49,7 @@ static ColliderCylinderInit sCylinderInit = { }; void EnHs2_Init(Actor* thisx, GlobalContext* globalCtx) { - EnHs2* this = THIS; + EnHs2* this = (EnHs2*)thisx; s32 pad; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 36.0f); @@ -69,7 +67,7 @@ void EnHs2_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnHs2_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnHs2* this = THIS; + EnHs2* this = (EnHs2*)thisx; Collider_DestroyCylinder(globalCtx, &this->collider); } @@ -108,7 +106,7 @@ void func_80A6F1A4(EnHs2* this, GlobalContext* globalCtx) { } void EnHs2_Update(Actor* thisx, GlobalContext* globalCtx) { - EnHs2* this = THIS; + EnHs2* this = (EnHs2*)thisx; s32 pad; Collider_UpdateCylinder(&this->actor, &this->collider); @@ -131,7 +129,7 @@ void EnHs2_Update(Actor* thisx, GlobalContext* globalCtx) { } s32 EnHs2_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - EnHs2* this = THIS; + EnHs2* this = (EnHs2*)thisx; switch (limbIndex) { case 12: @@ -154,7 +152,7 @@ s32 EnHs2_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, void EnHs2_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) { static Vec3f D_80A6F4CC = { 300.0f, 1000.0f, 0.0f }; - EnHs2* this = THIS; + EnHs2* this = (EnHs2*)thisx; if (limbIndex == 9) { Matrix_MultVec3f(&D_80A6F4CC, &this->actor.focus.pos); @@ -162,7 +160,7 @@ void EnHs2_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Ve } void EnHs2_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnHs2* this = THIS; + EnHs2* this = (EnHs2*)thisx; func_800943C8(globalCtx->state.gfxCtx); SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, 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 cd79ae19ed..def3832ad0 100644 --- a/src/overlays/actors/ovl_En_Hy/z_en_hy.c +++ b/src/overlays/actors/ovl_En_Hy/z_en_hy.c @@ -17,8 +17,6 @@ #define FLAGS 0x00000019 -#define THIS ((EnHy*)thisx) - void EnHy_Init(Actor* thisx, GlobalContext* globalCtx); void EnHy_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnHy_Update(Actor* thisx, GlobalContext* globalCtx); @@ -418,7 +416,7 @@ void func_80A6F7CC(EnHy* this, GlobalContext* globalCtx, s32 getItemId) { u16 func_80A6F810(GlobalContext* globalCtx, Actor* thisx) { Player* player = GET_PLAYER(globalCtx); - EnHy* this = THIS; + EnHy* this = (EnHy*)thisx; u16 textId = Text_GetFaceReaction(globalCtx, (this->actor.params & 0x7F) + 37); if (textId != 0) { @@ -555,7 +553,7 @@ u16 func_80A6F810(GlobalContext* globalCtx, Actor* thisx) { } s16 func_80A70058(GlobalContext* globalCtx, Actor* thisx) { - EnHy* this = THIS; + EnHy* this = (EnHy*)thisx; s16 beggarItems[] = { ITEM_BLUE_FIRE, ITEM_FISH, ITEM_BUG, ITEM_FAIRY }; s16 beggarRewards[] = { 150, 100, 50, 25 }; @@ -873,7 +871,7 @@ s32 EnHy_ShouldSpawn(EnHy* this, GlobalContext* globalCtx) { } void EnHy_Init(Actor* thisx, GlobalContext* globalCtx) { - EnHy* this = THIS; + EnHy* this = (EnHy*)thisx; if ((this->actor.params & 0x7F) >= ENHY_TYPE_MAX || !EnHy_FindOsAnimeObject(this, globalCtx) || !EnHy_FindSkelAndHeadObjects(this, globalCtx)) { @@ -888,7 +886,7 @@ void EnHy_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnHy_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnHy* this = THIS; + EnHy* this = (EnHy*)thisx; Collider_DestroyCylinder(globalCtx, &this->collider); } @@ -1076,7 +1074,7 @@ void func_80A71530(EnHy* this, GlobalContext* globalCtx) { } void EnHy_Update(Actor* thisx, GlobalContext* globalCtx) { - EnHy* this = THIS; + EnHy* this = (EnHy*)thisx; if (this->actionFunc != EnHy_InitImpl) { gSegments[6] = VIRTUAL_TO_PHYSICAL(globalCtx->objectCtx.status[this->objBankIndexOsAnime].segment); @@ -1096,7 +1094,7 @@ void EnHy_Update(Actor* thisx, GlobalContext* globalCtx) { } s32 EnHy_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - EnHy* this = THIS; + EnHy* this = (EnHy*)thisx; s32 pad; Vec3s sp48; u8 i; @@ -1145,7 +1143,7 @@ s32 EnHy_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, } void EnHy_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) { - EnHy* this = THIS; + EnHy* this = (EnHy*)thisx; s32 pad; Vec3f sp3C = { 400.0f, 0.0f, 0.0f }; @@ -1178,7 +1176,7 @@ Gfx* EnHy_SetEnvColor(GraphicsContext* globalCtx, u8 envR, u8 envG, u8 envB, u8 } void EnHy_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnHy* this = THIS; + EnHy* this = (EnHy*)thisx; Color_RGBA8 envColorSeg8; Color_RGBA8 envColorSeg9; Color_RGBA8 envColorSeg10; 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 2c23151489..d7558fde6c 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 @@ -9,8 +9,6 @@ #define FLAGS 0x00000000 -#define THIS ((EnIceHono*)thisx) - void EnIceHono_Init(Actor* thisx, GlobalContext* globalCtx); void EnIceHono_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnIceHono_Update(Actor* thisx, GlobalContext* globalCtx); @@ -103,7 +101,7 @@ f32 EnIceHono_XZDistanceSquared(Vec3f* v1, Vec3f* v2) { } void EnIceHono_InitCapturableFlame(Actor* thisx, GlobalContext* globalCtx) { - EnIceHono* this = THIS; + EnIceHono* this = (EnIceHono*)thisx; Actor_ProcessInitChain(&this->actor, sInitChainCapturableFlame); Actor_SetScale(&this->actor, 0.0074f); @@ -119,7 +117,7 @@ void EnIceHono_InitCapturableFlame(Actor* thisx, GlobalContext* globalCtx) { } void EnIceHono_InitDroppedFlame(Actor* thisx, GlobalContext* globalCtx) { - EnIceHono* this = THIS; + EnIceHono* this = (EnIceHono*)thisx; Actor_ProcessInitChain(&this->actor, sInitChainDroppedFlame); this->actor.scale.x = this->actor.scale.z = this->actor.scale.y = 0.00002f; @@ -140,7 +138,7 @@ void EnIceHono_InitDroppedFlame(Actor* thisx, GlobalContext* globalCtx) { } void EnIceHono_InitSmallFlame(Actor* thisx, GlobalContext* globalCtx) { - EnIceHono* this = THIS; + EnIceHono* this = (EnIceHono*)thisx; Actor_ProcessInitChain(&this->actor, sInitChainSmallFlame); this->actor.scale.x = this->actor.scale.z = this->actor.scale.y = 0.0008f; @@ -152,7 +150,7 @@ void EnIceHono_InitSmallFlame(Actor* thisx, GlobalContext* globalCtx) { } void EnIceHono_Init(Actor* thisx, GlobalContext* globalCtx) { - EnIceHono* this = THIS; + EnIceHono* this = (EnIceHono*)thisx; s16 params = this->actor.params; switch (this->actor.params) { @@ -179,7 +177,7 @@ void EnIceHono_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnIceHono_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnIceHono* this = THIS; + EnIceHono* this = (EnIceHono*)thisx; if ((this->actor.params == -1) || (this->actor.params == 0)) { LightContext_RemoveLight(globalCtx, &globalCtx->lightCtx, this->lightNode); @@ -340,7 +338,7 @@ void EnIceHono_SmallFlameMove(EnIceHono* this, GlobalContext* globalCtx) { } void EnIceHono_Update(Actor* thisx, GlobalContext* globalCtx) { - EnIceHono* this = THIS; + EnIceHono* this = (EnIceHono*)thisx; s32 pad1; f32 intensity; s32 pad2; @@ -373,7 +371,7 @@ void EnIceHono_Update(Actor* thisx, GlobalContext* globalCtx) { } void EnIceHono_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnIceHono* this = THIS; + EnIceHono* this = (EnIceHono*)thisx; u32 pad; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_ice_hono.c", 695); 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 3b67762aa5..d95a38895e 100644 --- a/src/overlays/actors/ovl_En_Ik/z_en_ik.c +++ b/src/overlays/actors/ovl_En_Ik/z_en_ik.c @@ -11,8 +11,6 @@ #define FLAGS 0x00000010 -#define THIS ((EnIk*)thisx) - typedef void (*EnIkDrawFunc)(struct EnIk*, GlobalContext*); void EnIk_Init(Actor* thisx, GlobalContext* globalCtx); @@ -168,7 +166,7 @@ static DamageTable sDamageTable = { }; void EnIk_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnIk* this = THIS; + EnIk* this = (EnIk*)thisx; if (Actor_FindNearby(globalCtx, &this->actor, ACTOR_EN_IK, ACTORCAT_ENEMY, 8000.0f) == NULL) { func_800F5B58(); @@ -184,7 +182,7 @@ void EnIk_SetupAction(EnIk* this, EnIkActionFunc actionFunc) { } void func_80A74398(Actor* thisx, GlobalContext* globalCtx) { - EnIk* this = THIS; + EnIk* this = (EnIk*)thisx; s32 pad; EffectBlureInit1 blureInit; @@ -744,7 +742,7 @@ void func_80A75C38(EnIk* this, GlobalContext* globalCtx) { } void func_80A75FA0(Actor* thisx, GlobalContext* globalCtx) { - EnIk* this = THIS; + EnIk* this = (EnIk*)thisx; s32 pad; Player* player = GET_PLAYER(globalCtx); u8 prevInvincibilityTimer; @@ -806,7 +804,7 @@ Gfx* func_80A761B0(GraphicsContext* gfxCtx, u8 primR, u8 primG, u8 primB, u8 env } s32 EnIk_OverrideLimbDraw3(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - EnIk* this = THIS; + EnIk* this = (EnIk*)thisx; if (limbIndex == 12) { if (this->actor.params != 0) { @@ -853,7 +851,7 @@ static Vec3f D_80A784D0[] = { void EnIk_PostLimbDraw3(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) { Vec3f spF4; Vec3f spE8; - EnIk* this = THIS; + EnIk* this = (EnIk*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_ik_inFight.c", 1201); @@ -929,7 +927,7 @@ void EnIk_PostLimbDraw3(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Ve } void func_80A76798(Actor* thisx, GlobalContext* globalCtx) { - EnIk* this = THIS; + EnIk* this = (EnIk*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_ik_inFight.c", 1309); @@ -1058,7 +1056,7 @@ void func_80A770C0(EnIk* this, GlobalContext* globalCtx, s32 actionIdx) { } f32 EnIk_curFrame(Actor* thisx) { - EnIk* this = THIS; + EnIk* this = (EnIk*)thisx; return this->skelAnime.curFrame; } @@ -1152,7 +1150,7 @@ void func_80A774F8(EnIk* this, GlobalContext* globalCtx) { } s32 EnIk_OverrideLimbDraw2(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - EnIk* this = THIS; + EnIk* this = (EnIk*)thisx; if ((limbIndex == 13) || (limbIndex == 26) || (limbIndex == 27)) { if (EnIk_curFrame(&this->actor) >= 30.0f) { @@ -1170,7 +1168,7 @@ void EnIk_PostLimbDraw2(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Ve switch (limbIndex) { case 13: { - EnIk* this = THIS; + EnIk* this = (EnIk*)thisx; if (EnIk_curFrame(&this->actor) < 30.0f) { gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_en_ik_inAwake.c", 267), @@ -1189,7 +1187,7 @@ void EnIk_PostLimbDraw2(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Ve gSPDisplayList(POLY_XLU_DISP++, object_ik_DL_016EE8); break; case 26: { - EnIk* this = THIS; + EnIk* this = (EnIk*)thisx; if (EnIk_curFrame(&this->actor) < 30.0f) { gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_en_ik_inAwake.c", 288), @@ -1198,7 +1196,7 @@ void EnIk_PostLimbDraw2(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Ve } } break; case 27: { - EnIk* this = THIS; + EnIk* this = (EnIk*)thisx; if (EnIk_curFrame(&this->actor) < 30.0f) { gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_en_ik_inAwake.c", 297), @@ -1293,7 +1291,7 @@ static EnIkActionFunc sActionFuncs[] = { }; void EnIk_Update(Actor* thisx, GlobalContext* globalCtx) { - EnIk* this = THIS; + EnIk* this = (EnIk*)thisx; if (this->action < 0 || this->action >= ARRAY_COUNT(sActionFuncs) || sActionFuncs[this->action] == NULL) { osSyncPrintf(VT_FGCOL(RED) "メインモードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST); @@ -1304,7 +1302,7 @@ void EnIk_Update(Actor* thisx, GlobalContext* globalCtx) { } s32 EnIk_OverrideLimbDraw1(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - EnIk* this = THIS; + EnIk* this = (EnIk*)thisx; f32 curFrame; switch (limbIndex) { @@ -1386,7 +1384,7 @@ void func_80A77EDC(EnIk* this, GlobalContext* globalCtx) { static EnIkDrawFunc sDrawFuncs[] = { func_80A77ED0, func_80A77EDC, func_80A77844 }; void EnIk_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnIk* this = THIS; + EnIk* this = (EnIk*)thisx; if (this->drawMode < 0 || this->drawMode >= ARRAY_COUNT(sDrawFuncs) || sDrawFuncs[this->drawMode] == NULL) { osSyncPrintf(VT_FGCOL(RED) "描画モードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST); @@ -1420,7 +1418,7 @@ void func_80A78160(EnIk* this, GlobalContext* globalCtx) { } void func_80A781CC(Actor* thisx, GlobalContext* globalCtx) { - EnIk* this = THIS; + EnIk* this = (EnIk*)thisx; if (!Gameplay_InCsMode(globalCtx)) { this->actor.update = EnIk_Update; @@ -1434,7 +1432,7 @@ void func_80A781CC(Actor* thisx, GlobalContext* globalCtx) { } void EnIk_Init(Actor* thisx, GlobalContext* globalCtx) { - EnIk* this = THIS; + EnIk* this = (EnIk*)thisx; s32 flag = this->actor.params & 0xFF00; if (((this->actor.params & 0xFF) == 0 && (gSaveContext.eventChkInf[3] & 0x1000)) || 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 688f218834..b06cbed6b1 100644 --- a/src/overlays/actors/ovl_En_In/z_en_in.c +++ b/src/overlays/actors/ovl_En_In/z_en_in.c @@ -4,8 +4,6 @@ #define FLAGS 0x00000019 -#define THIS ((EnIn*)thisx) - void EnIn_Init(Actor* thisx, GlobalContext* globalCtx); void EnIn_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnIn_Update(Actor* thisx, GlobalContext* globalCtx); @@ -198,7 +196,7 @@ s16 func_80A791CC(GlobalContext* globalCtx, Actor* thisx) { } s16 func_80A7924C(GlobalContext* globalCtx, Actor* thisx) { - EnIn* this = THIS; + EnIn* this = (EnIn*)thisx; s32 sp18 = 1; switch (this->actor.textId) { @@ -466,7 +464,7 @@ void func_80A79C78(EnIn* this, GlobalContext* globalCtx) { static s32 D_80A7B998 = 0; void EnIn_Init(Actor* thisx, GlobalContext* globalCtx) { - EnIn* this = THIS; + EnIn* this = (EnIn*)thisx; RespawnData* respawn = &gSaveContext.respawn[RESPAWN_MODE_DOWN]; Vec3f respawnPos; @@ -486,7 +484,7 @@ void EnIn_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnIn_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnIn* this = THIS; + EnIn* this = (EnIn*)thisx; if (this->actionFunc != NULL && this->actionFunc != func_80A79FB0) { Collider_DestroyCylinder(globalCtx, &this->collider); @@ -893,7 +891,7 @@ void func_80A7B024(EnIn* this, GlobalContext* globalCtx) { void EnIn_Update(Actor* thisx, GlobalContext* globalCtx) { ColliderCylinder* collider; - EnIn* this = THIS; + EnIn* this = (EnIn*)thisx; if (this->actionFunc == func_80A79FB0) { this->actionFunc(this, globalCtx); @@ -929,7 +927,7 @@ void EnIn_Update(Actor* thisx, GlobalContext* globalCtx) { } s32 EnIn_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - EnIn* this = THIS; + EnIn* this = (EnIn*)thisx; Vec3s sp2C; if (this->actor.params > 0 && limbIndex != INGO_HEAD_LIMB) { @@ -957,7 +955,7 @@ s32 EnIn_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, } void EnIn_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) { - EnIn* this = THIS; + EnIn* this = (EnIn*)thisx; Vec3f D_80A7B9A8 = { 1600.0, 0.0f, 0.0f }; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_in.c", 2335); @@ -979,7 +977,7 @@ void EnIn_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec void EnIn_Draw(Actor* thisx, GlobalContext* globalCtx) { static void* eyeTextures[] = { gIngoEyeOpenTex, gIngoEyeHalfTex, gIngoEyeClosedTex, gIngoEyeClosed2Tex }; - EnIn* this = THIS; + EnIn* this = (EnIn*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_in.c", 2384); if (this->actionFunc != func_80A79FB0) { 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 6104c8fbba..91171c7287 100644 --- a/src/overlays/actors/ovl_En_Insect/z_en_insect.c +++ b/src/overlays/actors/ovl_En_Insect/z_en_insect.c @@ -10,8 +10,6 @@ #define FLAGS 0x00000000 -#define THIS ((EnInsect*)thisx) - void EnInsect_Init(Actor* thisx, GlobalContext* globalCtx); void EnInsect_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnInsect_Update(Actor* thisx, GlobalContext* globalCtx); @@ -165,7 +163,7 @@ void func_80A7C058(EnInsect* this) { } void EnInsect_Init(Actor* thisx, GlobalContext* globalCtx2) { - EnInsect* this = THIS; + EnInsect* this = (EnInsect*)thisx; GlobalContext* globalCtx = globalCtx2; f32 rand; s16 temp_s2; @@ -227,7 +225,7 @@ void EnInsect_Init(Actor* thisx, GlobalContext* globalCtx2) { void EnInsect_Destroy(Actor* thisx, GlobalContext* globalCtx) { s16 temp_v0; - EnInsect* this = THIS; + EnInsect* this = (EnInsect*)thisx; temp_v0 = this->actor.params & 3; Collider_DestroyJntSph(globalCtx, &this->collider); @@ -713,7 +711,7 @@ void func_80A7D460(EnInsect* this, GlobalContext* globalCtx) { } void EnInsect_Update(Actor* thisx, GlobalContext* globalCtx) { - EnInsect* this = THIS; + EnInsect* this = (EnInsect*)thisx; s32 phi_v0; if (this->actor.child != NULL) { @@ -787,7 +785,7 @@ void EnInsect_Update(Actor* thisx, GlobalContext* globalCtx) { } void EnInsect_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnInsect* this = THIS; + EnInsect* this = (EnInsect*)thisx; func_80093D18(globalCtx->state.gfxCtx); SkelAnime_DrawOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, NULL, NULL, NULL); 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 a3f2088e83..dc7fead400 100644 --- a/src/overlays/actors/ovl_En_Ishi/z_en_ishi.c +++ b/src/overlays/actors/ovl_En_Ishi/z_en_ishi.c @@ -12,8 +12,6 @@ #define FLAGS 0x00800000 -#define THIS ((EnIshi*)thisx) - void EnIshi_Init(Actor* thisx, GlobalContext* globalCtx); void EnIshi_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnIshi_Update(Actor* thisx, GlobalContext* globalCtx); @@ -104,7 +102,7 @@ static ColliderCylinderInit sCylinderInits[] = { static CollisionCheckInfoInit sColChkInfoInit = { 0, 12, 60, MASS_IMMOVABLE }; void EnIshi_InitCollider(Actor* thisx, GlobalContext* globalCtx) { - EnIshi* this = THIS; + EnIshi* this = (EnIshi*)thisx; Collider_InitCylinder(globalCtx, &this->collider); Collider_SetCylinder(globalCtx, &this->collider, &this->actor, &sCylinderInits[this->actor.params & 1]); @@ -307,7 +305,7 @@ static InitChainEntry sInitChains[][5] = { }; void EnIshi_Init(Actor* thisx, GlobalContext* globalCtx) { - EnIshi* this = THIS; + EnIshi* this = (EnIshi*)thisx; s16 type = this->actor.params & 1; Actor_ProcessInitChain(&this->actor, sInitChains[type]); @@ -335,7 +333,7 @@ void EnIshi_Init(Actor* thisx, GlobalContext* globalCtx) { void EnIshi_Destroy(Actor* thisx, GlobalContext* globalCtx2) { GlobalContext* globalCtx = globalCtx2; - EnIshi* this = THIS; + EnIshi* this = (EnIshi*)thisx; Collider_DestroyCylinder(globalCtx, &this->collider); } @@ -471,7 +469,7 @@ void EnIshi_Fly(EnIshi* this, GlobalContext* globalCtx) { } void EnIshi_Update(Actor* thisx, GlobalContext* globalCtx) { - EnIshi* this = THIS; + EnIshi* this = (EnIshi*)thisx; this->actionFunc(this, globalCtx); } @@ -495,7 +493,7 @@ void EnIshi_DrawLarge(EnIshi* this, GlobalContext* globalCtx) { static EnIshiDrawFunc sDrawFuncs[] = { EnIshi_DrawSmall, EnIshi_DrawLarge }; void EnIshi_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnIshi* this = THIS; + EnIshi* this = (EnIshi*)thisx; sDrawFuncs[this->actor.params & 1](this, 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 98c2e85007..2c5bfb0ea7 100644 --- a/src/overlays/actors/ovl_En_It/z_en_it.c +++ b/src/overlays/actors/ovl_En_It/z_en_it.c @@ -8,8 +8,6 @@ #define FLAGS 0x00000000 -#define THIS ((EnIt*)thisx) - void EnIt_Init(Actor* thisx, GlobalContext* globalCtx); void EnIt_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnIt_Update(Actor* thisx, GlobalContext* globalCtx); @@ -49,7 +47,7 @@ const ActorInit En_It_InitVars = { }; void EnIt_Init(Actor* thisx, GlobalContext* globalCtx) { - EnIt* this = THIS; + EnIt* this = (EnIt*)thisx; this->actor.params = 0x0D05; Collider_InitCylinder(globalCtx, &this->collider); @@ -58,13 +56,13 @@ void EnIt_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnIt_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnIt* this = THIS; + EnIt* this = (EnIt*)thisx; Collider_DestroyCylinder(globalCtx, &this->collider); } void EnIt_Update(Actor* thisx, GlobalContext* globalCtx) { - EnIt* this = THIS; + EnIt* this = (EnIt*)thisx; s32 pad; Collider_UpdateCylinder(&this->actor, &this->collider); 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 64280297fb..95c053d77a 100644 --- a/src/overlays/actors/ovl_En_Jj/z_en_jj.c +++ b/src/overlays/actors/ovl_En_Jj/z_en_jj.c @@ -10,8 +10,6 @@ #define FLAGS 0x00000030 -#define THIS ((EnJj*)thisx) - typedef enum { /* 0 */ JABUJABU_EYE_OPEN, /* 1 */ JABUJABU_EYE_HALF, @@ -81,7 +79,7 @@ void EnJj_SetupAction(EnJj* this, EnJjActionFunc actionFunc) { void EnJj_Init(Actor* thisx, GlobalContext* globalCtx2) { GlobalContext* globalCtx = globalCtx2; - EnJj* this = THIS; + EnJj* this = (EnJj*)thisx; CollisionHeader* colHeader = NULL; Actor_ProcessInitChain(&this->dyna.actor, sInitChain); @@ -138,7 +136,7 @@ void EnJj_Init(Actor* thisx, GlobalContext* globalCtx2) { } void EnJj_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnJj* this = THIS; + EnJj* this = (EnJj*)thisx; switch (this->dyna.actor.params) { case JABUJABU_MAIN: @@ -286,7 +284,7 @@ void EnJj_UpdateStaticCollision(Actor* thisx, GlobalContext* globalCtx) { } void EnJj_Update(Actor* thisx, GlobalContext* globalCtx) { - EnJj* this = THIS; + EnJj* this = (EnJj*)thisx; if ((globalCtx->csCtx.state != CS_STATE_IDLE) && (globalCtx->csCtx.npcActions[2] != NULL)) { EnJj_CutsceneUpdate(this, globalCtx); @@ -309,7 +307,7 @@ void EnJj_Update(Actor* thisx, GlobalContext* globalCtx) { void EnJj_Draw(Actor* thisx, GlobalContext* globalCtx2) { static void* eyeTextures[] = { gJabuJabuEyeOpenTex, gJabuJabuEyeHalfTex, gJabuJabuEyeClosedTex }; GlobalContext* globalCtx = globalCtx2; - EnJj* this = THIS; + EnJj* this = (EnJj*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_jj.c", 879); 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 253f0a0ad3..813fba8097 100644 --- a/src/overlays/actors/ovl_En_Js/z_en_js.c +++ b/src/overlays/actors/ovl_En_Js/z_en_js.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000009 -#define THIS ((EnJs*)thisx) - void EnJs_Init(Actor* thisx, GlobalContext* globalCtx); void EnJs_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnJs_Update(Actor* thisx, GlobalContext* globalCtx); @@ -55,7 +53,7 @@ void En_Js_SetupAction(EnJs* this, EnJsActionFunc actionFunc) { } void EnJs_Init(Actor* thisx, GlobalContext* globalCtx) { - EnJs* this = THIS; + EnJs* this = (EnJs*)thisx; s32 pad; ActorShape_Init(&this->actor.shape, 0.0f, NULL, 36.0f); @@ -74,7 +72,7 @@ void EnJs_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnJs_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnJs* this = THIS; + EnJs* this = (EnJs*)thisx; Collider_DestroyCylinder(globalCtx, &this->collider); } @@ -166,7 +164,7 @@ void func_80A89304(EnJs* this, GlobalContext* globalCtx) { } void EnJs_Update(Actor* thisx, GlobalContext* globalCtx) { - EnJs* this = THIS; + EnJs* this = (EnJs*)thisx; s32 pad; s32 pad2; @@ -208,7 +206,7 @@ void EnJs_Update(Actor* thisx, GlobalContext* globalCtx) { } s32 EnJs_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - EnJs* this = THIS; + EnJs* this = (EnJs*)thisx; if (limbIndex == 12) { rot->y -= this->unk_278.y; @@ -218,14 +216,14 @@ s32 EnJs_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, void EnJs_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) { static Vec3f D_80A896DC = { 0.0f, 0.0f, 0.0f }; - EnJs* this = THIS; + EnJs* this = (EnJs*)thisx; if (limbIndex == 12) { Matrix_MultVec3f(&D_80A896DC, &this->actor.focus.pos); } } void EnJs_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnJs* this = THIS; + EnJs* this = (EnJs*)thisx; func_800943C8(globalCtx->state.gfxCtx); SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, 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 a252297e4a..e69be21817 100644 --- a/src/overlays/actors/ovl_En_Jsjutan/z_en_jsjutan.c +++ b/src/overlays/actors/ovl_En_Jsjutan/z_en_jsjutan.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000009 -#define THIS ((EnJsjutan*)thisx) - void EnJsjutan_Init(Actor* thisx, GlobalContext* globalCtx); void EnJsjutan_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnJsjutan_Update(Actor* thisx, GlobalContext* globalCtx); @@ -38,7 +36,7 @@ static s32 sUnused[2] = { 0, 0 }; #include "overlays/ovl_En_Jsjutan/ovl_En_Jsjutan.c" void EnJsjutan_Init(Actor* thisx, GlobalContext* globalCtx) { - EnJsjutan* this = THIS; + EnJsjutan* this = (EnJsjutan*)thisx; s32 pad; CollisionHeader* header = NULL; @@ -52,7 +50,7 @@ void EnJsjutan_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnJsjutan_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnJsjutan* this = THIS; + EnJsjutan* this = (EnJsjutan*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); } @@ -366,7 +364,7 @@ void EnJsjutan_Update(Actor* thisx, GlobalContext* globalCtx2) { } void EnJsjutan_Draw(Actor* thisx, GlobalContext* globalCtx2) { - EnJsjutan* this = THIS; + EnJsjutan* this = (EnJsjutan*)thisx; GlobalContext* globalCtx = globalCtx2; s16 i; Actor* parent = thisx->parent; 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 fd249f7fb7..57111610ea 100644 --- a/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.c +++ b/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.c @@ -10,8 +10,6 @@ #define FLAGS 0x02000009 -#define THIS ((EnKakasi*)thisx) - void EnKakasi_Init(Actor* thisx, GlobalContext* globalCtx); void EnKakasi_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnKakasi_Update(Actor* thisx, GlobalContext* globalCtx); @@ -57,14 +55,14 @@ const ActorInit En_Kakasi_InitVars = { }; void EnKakasi_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnKakasi* this = THIS; + EnKakasi* this = (EnKakasi*)thisx; Collider_DestroyCylinder(globalCtx, &this->collider); //! @bug SkelAnime_Free is not called } void EnKakasi_Init(Actor* thisx, GlobalContext* globalCtx) { - EnKakasi* this = THIS; + EnKakasi* this = (EnKakasi*)thisx; osSyncPrintf("\n\n"); osSyncPrintf(VT_FGCOL(YELLOW) "☆☆☆☆☆ Let’s DANCE! ☆☆☆☆☆ %f\n" VT_RST, this->actor.world.pos.y); @@ -315,7 +313,7 @@ void func_80A8FBB8(EnKakasi* this, GlobalContext* globalCtx) { } void EnKakasi_Update(Actor* thisx, GlobalContext* globalCtx) { - EnKakasi* this = THIS; + EnKakasi* this = (EnKakasi*)thisx; s32 pad; s32 i; @@ -337,7 +335,7 @@ void EnKakasi_Update(Actor* thisx, GlobalContext* globalCtx) { } void EnKakasi_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnKakasi* this = THIS; + EnKakasi* this = (EnKakasi*)thisx; if (BREG(3) != 0) { osSyncPrintf("\n\n"); 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 8fe850e36d..63f1faba3d 100644 --- a/src/overlays/actors/ovl_En_Kakasi2/z_en_kakasi2.c +++ b/src/overlays/actors/ovl_En_Kakasi2/z_en_kakasi2.c @@ -10,8 +10,6 @@ #define FLAGS 0x0A000031 -#define THIS ((EnKakasi2*)thisx) - static ColliderCylinderInit sCylinderInit = { { COLTYPE_NONE, @@ -56,7 +54,7 @@ const ActorInit En_Kakasi2_InitVars = { }; void EnKakasi2_Init(Actor* thisx, GlobalContext* globalCtx) { - EnKakasi2* this = THIS; + EnKakasi2* this = (EnKakasi2*)thisx; s32 pad; f32 spawnRangeY; f32 spawnRangeXZ; @@ -107,7 +105,7 @@ void EnKakasi2_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnKakasi2_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnKakasi2* this = THIS; + EnKakasi2* this = (EnKakasi2*)thisx; Collider_DestroyCylinder(globalCtx, &this->collider); //! @bug SkelAnime_Free is not called @@ -203,7 +201,7 @@ void func_80A906C4(EnKakasi2* this, GlobalContext* globalCtx) { } void EnKakasi2_Update(Actor* thisx, GlobalContext* globalCtx2) { - EnKakasi2* this = THIS; + EnKakasi2* this = (EnKakasi2*)thisx; GlobalContext* globalCtx = globalCtx2; this->actor.world.rot = this->actor.shape.rot; @@ -240,7 +238,7 @@ void EnKakasi2_Update(Actor* thisx, GlobalContext* globalCtx2) { } void func_80A90948(Actor* thisx, GlobalContext* globalCtx) { - EnKakasi2* this = THIS; + EnKakasi2* this = (EnKakasi2*)thisx; func_80093D18(globalCtx->state.gfxCtx); SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, 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 53878f9654..5cced2e9cc 100644 --- a/src/overlays/actors/ovl_En_Kakasi3/z_en_kakasi3.c +++ b/src/overlays/actors/ovl_En_Kakasi3/z_en_kakasi3.c @@ -10,8 +10,6 @@ #define FLAGS 0x02000009 -#define THIS ((EnKakasi3*)thisx) - void EnKakasi3_Init(Actor* thisx, GlobalContext* globalCtx); void EnKakasi3_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnKakasi3_Update(Actor* thisx, GlobalContext* globalCtx); @@ -61,14 +59,14 @@ const ActorInit En_Kakasi3_InitVars = { }; void EnKakasi3_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnKakasi3* this = THIS; + EnKakasi3* this = (EnKakasi3*)thisx; Collider_DestroyCylinder(globalCtx, &this->collider); //! @bug SkelAnime_Free is not called } void EnKakasi3_Init(Actor* thisx, GlobalContext* globalCtx) { - EnKakasi3* this = THIS; + EnKakasi3* this = (EnKakasi3*)thisx; osSyncPrintf("\n\n"); // "Obonur" -- Related to the name of the scarecrow (Bonooru) @@ -407,7 +405,7 @@ void func_80A91A90(EnKakasi3* this, GlobalContext* globalCtx) { } void EnKakasi3_Update(Actor* thisx, GlobalContext* globalCtx) { - EnKakasi3* this = THIS; + EnKakasi3* this = (EnKakasi3*)thisx; s32 pad; s32 i; @@ -434,7 +432,7 @@ void EnKakasi3_Update(Actor* thisx, GlobalContext* globalCtx) { } void EnKakasi3_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnKakasi3* this = THIS; + EnKakasi3* this = (EnKakasi3*)thisx; func_80093D18(globalCtx->state.gfxCtx); SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, 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 bbd65f6bd6..c548241705 100644 --- a/src/overlays/actors/ovl_En_Kanban/z_en_kanban.c +++ b/src/overlays/actors/ovl_En_Kanban/z_en_kanban.c @@ -11,8 +11,6 @@ #define FLAGS 0x00000019 -#define THIS ((EnKanban*)thisx) - #define PART_UPPER_LEFT (1 << 0) #define PART_LEFT_UPPER (1 << 1) #define PART_LEFT_LOWER (1 << 2) @@ -193,7 +191,7 @@ void EnKanban_SetFloorRot(EnKanban* this) { } void EnKanban_Init(Actor* thisx, GlobalContext* globalCtx) { - EnKanban* this = THIS; + EnKanban* this = (EnKanban*)thisx; Actor_SetScale(&this->actor, 0.01f); if (this->actor.params != ENKANBAN_PIECE) { @@ -223,7 +221,7 @@ void EnKanban_Init(Actor* thisx, GlobalContext* globalCtx) { void EnKanban_Destroy(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnKanban* this = THIS; + EnKanban* this = (EnKanban*)thisx; if (this->actionState == ENKANBAN_SIGN) { Collider_DestroyCylinder(globalCtx, &this->collider); @@ -254,7 +252,7 @@ void EnKanban_Message(EnKanban* this, GlobalContext* globalCtx) { void EnKanban_Update(Actor* thisx, GlobalContext* globalCtx2) { u8 bounced = false; GlobalContext* globalCtx = globalCtx2; - EnKanban* this = THIS; + EnKanban* this = (EnKanban*)thisx; EnKanban* signpost; EnKanban* piece; Player* player = GET_PLAYER(globalCtx); @@ -785,7 +783,7 @@ static s32 sUnused[] = { 0, 0, 0 }; // Unused zero vector? #include "overlays/ovl_En_Kanban/ovl_En_Kanban.c" void EnKanban_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnKanban* this = THIS; + EnKanban* this = (EnKanban*)thisx; f32 zShift; f32 zShift2; s16 i; 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 57c19565f9..c096ee077e 100644 --- a/src/overlays/actors/ovl_En_Karebaba/z_en_karebaba.c +++ b/src/overlays/actors/ovl_En_Karebaba/z_en_karebaba.c @@ -11,8 +11,6 @@ #define FLAGS 0x00000005 -#define THIS ((EnKarebaba*)thisx) - void EnKarebaba_Init(Actor* thisx, GlobalContext* globalCtx); void EnKarebaba_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnKarebaba_Update(Actor* thisx, GlobalContext* globalCtx); @@ -92,7 +90,7 @@ static InitChainEntry sInitChain[] = { }; void EnKarebaba_Init(Actor* thisx, GlobalContext* globalCtx) { - EnKarebaba* this = THIS; + EnKarebaba* this = (EnKarebaba*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 22.0f); @@ -116,7 +114,7 @@ void EnKarebaba_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnKarebaba_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnKarebaba* this = THIS; + EnKarebaba* this = (EnKarebaba*)thisx; Collider_DestroyCylinder(globalCtx, &this->bodyCollider); Collider_DestroyCylinder(globalCtx, &this->headCollider); @@ -411,7 +409,7 @@ void EnKarebaba_Regrow(EnKarebaba* this, GlobalContext* globalCtx) { void EnKarebaba_Update(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnKarebaba* this = THIS; + EnKarebaba* this = (EnKarebaba*)thisx; f32 height; this->actionFunc(this, globalCtx); @@ -463,7 +461,7 @@ void EnKarebaba_Draw(Actor* thisx, GlobalContext* globalCtx) { static Color_RGBA8 black = { 0, 0, 0, 0 }; static Gfx* stemDLists[] = { gDekuBabaStemTopDL, gDekuBabaStemMiddleDL, gDekuBabaStemBaseDL }; static Vec3f zeroVec = { 0.0f, 0.0f, 0.0f }; - EnKarebaba* this = THIS; + EnKarebaba* this = (EnKarebaba*)thisx; s32 i; s32 stemSections; f32 scale; 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 b687ad5d1b..200f5b732c 100644 --- a/src/overlays/actors/ovl_En_Ko/z_en_ko.c +++ b/src/overlays/actors/ovl_En_Ko/z_en_ko.c @@ -11,7 +11,6 @@ #define FLAGS 0x00000019 -#define THIS ((EnKo*)thisx) #define ENKO_TYPE (this->actor.params & 0xFF) #define ENKO_PATH ((this->actor.params & 0xFF00) >> 8) @@ -245,7 +244,7 @@ s32 EnKo_IsOsAnimeLoaded(EnKo* this, GlobalContext* globalCtx) { } u16 func_80A96FD0(GlobalContext* globalCtx, Actor* thisx) { - EnKo* this = THIS; + EnKo* this = (EnKo*)thisx; switch (ENKO_TYPE) { case ENKO_TYPE_CHILD_FADO: if (gSaveContext.eventChkInf[4] & 1) { @@ -345,7 +344,7 @@ u16 func_80A96FD0(GlobalContext* globalCtx, Actor* thisx) { u16 func_80A97338(GlobalContext* globalCtx, Actor* thisx) { Player* player = GET_PLAYER(globalCtx); - EnKo* this = THIS; + EnKo* this = (EnKo*)thisx; switch (ENKO_TYPE) { case ENKO_TYPE_CHILD_FADO: @@ -430,7 +429,7 @@ u16 func_80A97338(GlobalContext* globalCtx, Actor* thisx) { u16 func_80A97610(GlobalContext* globalCtx, Actor* thisx) { u16 faceReaction; - EnKo* this = THIS; + EnKo* this = (EnKo*)thisx; if (ENKO_TYPE == ENKO_TYPE_CHILD_0 || ENKO_TYPE == ENKO_TYPE_CHILD_2 || ENKO_TYPE == ENKO_TYPE_CHILD_3 || ENKO_TYPE == ENKO_TYPE_CHILD_4 || ENKO_TYPE == ENKO_TYPE_CHILD_7 || ENKO_TYPE == ENKO_TYPE_CHILD_8 || @@ -454,7 +453,7 @@ u16 func_80A97610(GlobalContext* globalCtx, Actor* thisx) { } s16 func_80A97738(GlobalContext* globalCtx, Actor* thisx) { - EnKo* this = THIS; + EnKo* this = (EnKo*)thisx; switch (Message_GetState(&globalCtx->msgCtx)) { case TEXT_STATE_CLOSING: @@ -1068,7 +1067,7 @@ s32 func_80A98ECC(EnKo* this, GlobalContext* globalCtx) { } void EnKo_Init(Actor* thisx, GlobalContext* globalCtx) { - EnKo* this = THIS; + EnKo* this = (EnKo*)thisx; if (ENKO_TYPE >= ENKO_TYPE_CHILD_MAX || !EnKo_IsOsAnimeAvailable(this, globalCtx) || !EnKo_AreObjectsAvailable(this, globalCtx)) { @@ -1081,7 +1080,7 @@ void EnKo_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnKo_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnKo* this = THIS; + EnKo* this = (EnKo*)thisx; Collider_DestroyCylinder(globalCtx, &this->collider); } @@ -1202,7 +1201,7 @@ void func_80A995CC(EnKo* this, GlobalContext* globalCtx) { void EnKo_Update(Actor* thisx, GlobalContext* globalCtx) { ColliderCylinder* collider; - EnKo* this = THIS; + EnKo* this = (EnKo*)thisx; s32 pad; if (this->actionFunc != func_80A99048) { @@ -1233,7 +1232,7 @@ void EnKo_Update(Actor* thisx, GlobalContext* globalCtx) { s32 EnKo_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx, Gfx** gfx) { - EnKo* this = THIS; + EnKo* this = (EnKo*)thisx; void* eyeTexture; Vec3s sp40; u8 headId; @@ -1272,7 +1271,7 @@ s32 EnKo_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, void EnKo_PostLimbDraw(GlobalContext* globalCtx2, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx, Gfx** gfx) { GlobalContext* globalCtx = globalCtx2; - EnKo* this = THIS; + EnKo* this = (EnKo*)thisx; Vec3f D_80A9A774 = { 0.0f, 0.0f, 0.0f }; if (limbIndex == 7) { @@ -1293,7 +1292,7 @@ Gfx* EnKo_SetEnvColor(GraphicsContext* gfxCtx, u8 r, u8 g, u8 b, u8 a) { } void EnKo_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnKo* this = THIS; + EnKo* this = (EnKo*)thisx; Color_RGBA8 tunicColor = sModelInfo[ENKO_TYPE].tunicColor; Color_RGBA8 bootsColor = sModelInfo[ENKO_TYPE].bootsColor; 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 912da66a49..c2515eecc9 100644 --- a/src/overlays/actors/ovl_En_Kusa/z_en_kusa.c +++ b/src/overlays/actors/ovl_En_Kusa/z_en_kusa.c @@ -13,8 +13,6 @@ #define FLAGS 0x00800010 -#define THIS ((EnKusa*)thisx) - void EnKusa_Init(Actor* thisx, GlobalContext* globalCtx); void EnKusa_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnKusa_Update(Actor* thisx, GlobalContext* globalCtx); @@ -221,7 +219,7 @@ void EnKusa_SpawnBugs(EnKusa* this, GlobalContext* globalCtx) { } void EnKusa_InitCollider(Actor* thisx, GlobalContext* globalCtx) { - EnKusa* this = THIS; + EnKusa* this = (EnKusa*)thisx; Collider_InitCylinder(globalCtx, &this->collider); Collider_SetCylinder(globalCtx, &this->collider, &this->actor, &sCylinderInit); @@ -229,7 +227,7 @@ void EnKusa_InitCollider(Actor* thisx, GlobalContext* globalCtx) { } void EnKusa_Init(Actor* thisx, GlobalContext* globalCtx) { - EnKusa* this = THIS; + EnKusa* this = (EnKusa*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); @@ -267,7 +265,7 @@ void EnKusa_Init(Actor* thisx, GlobalContext* globalCtx) { void EnKusa_Destroy(Actor* thisx, GlobalContext* globalCtx2) { GlobalContext* globalCtx = globalCtx2; - EnKusa* this = THIS; + EnKusa* this = (EnKusa*)thisx; Collider_DestroyCylinder(globalCtx, &this->collider); } @@ -480,7 +478,7 @@ void EnKusa_Regrow(EnKusa* this, GlobalContext* globalCtx) { } void EnKusa_Update(Actor* thisx, GlobalContext* globalCtx) { - EnKusa* this = THIS; + EnKusa* this = (EnKusa*)thisx; this->timer++; @@ -495,7 +493,7 @@ void EnKusa_Update(Actor* thisx, GlobalContext* globalCtx) { void EnKusa_Draw(Actor* thisx, GlobalContext* globalCtx) { static Gfx* dLists[] = { gFieldBushDL, object_kusa_DL_000140, object_kusa_DL_000140 }; - EnKusa* this = THIS; + EnKusa* this = (EnKusa*)thisx; if (this->actor.flags & 0x800) { Gfx_DrawDListOpa(globalCtx, object_kusa_DL_0002E0); 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 953d1f52e8..a91727696c 100644 --- a/src/overlays/actors/ovl_En_Kz/z_en_kz.c +++ b/src/overlays/actors/ovl_En_Kz/z_en_kz.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000009 -#define THIS ((EnKz*)thisx) - void EnKz_Init(Actor* thisx, GlobalContext* globalCtx); void EnKz_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnKz_Update(Actor* thisx, GlobalContext* globalCtx); @@ -97,7 +95,7 @@ u16 EnKz_GetTextNoMaskAdult(GlobalContext* globalCtx, EnKz* this) { } u16 EnKz_GetText(GlobalContext* globalCtx, Actor* thisx) { - EnKz* this = THIS; + EnKz* this = (EnKz*)thisx; u16 reactionText = Text_GetFaceReaction(globalCtx, 0x1E); if (reactionText != 0) { @@ -112,7 +110,7 @@ u16 EnKz_GetText(GlobalContext* globalCtx, Actor* thisx) { } s16 func_80A9C6C0(GlobalContext* globalCtx, Actor* thisx) { - EnKz* this = THIS; + EnKz* this = (EnKz*)thisx; s16 ret = 1; switch (Message_GetState(&globalCtx->msgCtx)) { @@ -312,7 +310,7 @@ s32 EnKz_SetMovedPos(EnKz* this, GlobalContext* globalCtx) { } void EnKz_Init(Actor* thisx, GlobalContext* globalCtx) { - EnKz* this = THIS; + EnKz* this = (EnKz*)thisx; s32 pad; SkelAnime_InitFlex(globalCtx, &this->skelanime, &object_kz_Skel_0086D0, NULL, this->jointTable, this->morphTable, @@ -343,7 +341,7 @@ void EnKz_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnKz_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnKz* this = THIS; + EnKz* this = (EnKz*)thisx; Collider_DestroyCylinder(globalCtx, &this->collider); } @@ -447,7 +445,7 @@ void EnKz_StartTimer(EnKz* this, GlobalContext* globalCtx) { } void EnKz_Update(Actor* thisx, GlobalContext* globalCtx) { - EnKz* this = THIS; + EnKz* this = (EnKz*)thisx; s32 pad; if (LINK_IS_ADULT && !(gSaveContext.infTable[19] & 0x100)) { @@ -465,7 +463,7 @@ void EnKz_Update(Actor* thisx, GlobalContext* globalCtx) { } s32 EnKz_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - EnKz* this = THIS; + EnKz* this = (EnKz*)thisx; if (limbIndex == 8 || limbIndex == 9 || limbIndex == 10) { rot->y += Math_SinS(this->unk_2A6[limbIndex]) * 200.0f; @@ -476,7 +474,7 @@ s32 EnKz_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, } void EnKz_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) { - EnKz* this = THIS; + EnKz* this = (EnKz*)thisx; Vec3f mult = { 2600.0f, 0.0f, 0.0f }; if (limbIndex == 11) { @@ -490,7 +488,7 @@ void EnKz_Draw(Actor* thisx, GlobalContext* globalCtx) { object_kz_Tex_001870, object_kz_Tex_001C70, }; - EnKz* this = THIS; + EnKz* this = (EnKz*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_kz.c", 1259); 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 425c4db48a..b101e6e59a 100644 --- a/src/overlays/actors/ovl_En_Light/z_en_light.c +++ b/src/overlays/actors/ovl_En_Light/z_en_light.c @@ -10,8 +10,6 @@ #define FLAGS 0x00000000 -#define THIS ((EnLight*)thisx) - void EnLight_Init(Actor* thisx, GlobalContext* globalCtx); void EnLight_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnLight_Update(Actor* thisx, GlobalContext* globalCtx); @@ -48,7 +46,7 @@ static FlameParams D_80A9E840[] = { }; void EnLight_Init(Actor* thisx, GlobalContext* globalCtx) { - EnLight* this = THIS; + EnLight* this = (EnLight*)thisx; s16 yOffset; if (gSaveContext.gameMode == 3) { @@ -72,7 +70,7 @@ void EnLight_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnLight_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnLight* this = THIS; + EnLight* this = (EnLight*)thisx; LightContext_RemoveLight(globalCtx, &globalCtx->lightCtx, this->lightNode); } @@ -93,7 +91,7 @@ void EnLight_Update(Actor* thisx, GlobalContext* globalCtx) { f32 intensity; FlameParams* flameParams; s16 radius; - EnLight* this = THIS; + EnLight* this = (EnLight*)thisx; flameParams = &D_80A9E840[this->actor.params & 0xF]; intensity = (Rand_ZeroOne() * 0.5f) + 0.5f; @@ -111,7 +109,7 @@ void EnLight_Update(Actor* thisx, GlobalContext* globalCtx) { void EnLight_UpdateSwitch(Actor* thisx, GlobalContext* globalCtx) { f32 intensity; FlameParams* flameParams; - EnLight* this = THIS; + EnLight* this = (EnLight*)thisx; f32 scale; flameParams = &D_80A9E840[this->actor.params & 0xF]; @@ -152,7 +150,7 @@ void EnLight_UpdateSwitch(Actor* thisx, GlobalContext* globalCtx) { } void EnLight_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnLight* this = THIS; + EnLight* this = (EnLight*)thisx; s32 pad; FlameParams* flameParams; Gfx* dList; 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 0cd2063904..b358b0b681 100644 --- a/src/overlays/actors/ovl_En_Lightbox/z_en_lightbox.c +++ b/src/overlays/actors/ovl_En_Lightbox/z_en_lightbox.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000010 -#define THIS ((EnLightbox*)thisx) - void EnLightbox_Init(Actor* thisx, GlobalContext* globalCtx); void EnLightbox_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnLightbox_Update(Actor* thisx, GlobalContext* globalCtx); @@ -30,7 +28,7 @@ const ActorInit En_Lightbox_InitVars = { void EnLightbox_Init(Actor* thisx, GlobalContext* globalCtx) { CollisionHeader* colHeader = NULL; - EnLightbox* this = THIS; + EnLightbox* this = (EnLightbox*)thisx; s32 pad[4]; switch (thisx->params) { @@ -62,13 +60,13 @@ void EnLightbox_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnLightbox_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnLightbox* this = THIS; + EnLightbox* this = (EnLightbox*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); } void EnLightbox_Update(Actor* thisx, GlobalContext* globalCtx) { - EnLightbox* this = THIS; + EnLightbox* this = (EnLightbox*)thisx; if (this->dyna.unk_162 != 0) { if (Actor_HasNoParent(thisx, 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 df283c49e3..68d4c49292 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 @@ -8,8 +8,6 @@ #define FLAGS 0x00000000 -#define THIS ((EnMFire1*)thisx) - void EnMFire1_Init(Actor* thisx, GlobalContext* globalCtx); void EnMFire1_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnMFire1_Update(Actor* thisx, GlobalContext* globalCtx); @@ -47,7 +45,7 @@ static ColliderCylinderInit sCylinderInit = { }; void EnMFire1_Init(Actor* thisx, GlobalContext* globalCtx) { - EnMFire1* this = THIS; + EnMFire1* this = (EnMFire1*)thisx; s32 pad; if (this->actor.params < 0) { @@ -59,13 +57,13 @@ void EnMFire1_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnMFire1_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnMFire1* this = THIS; + EnMFire1* this = (EnMFire1*)thisx; Collider_DestroyCylinder(globalCtx, &this->collider); } void EnMFire1_Update(Actor* thisx, GlobalContext* globalCtx) { - EnMFire1* this = THIS; + EnMFire1* this = (EnMFire1*)thisx; s32 pad; if (Math_StepToF(&this->timer, 1.0f, 0.2f)) { 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 e514418827..2250b17999 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 @@ -3,8 +3,6 @@ #define FLAGS 0x00000000 -#define THIS ((EnMThunder*)thisx) - void EnMThunder_Init(Actor* thisx, GlobalContext* globalCtx); void EnMThunder_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnMThunder_Update(Actor* thisx, GlobalContext* globalCtx); @@ -63,7 +61,7 @@ void func_80A9EFE0(EnMThunder* this, EnMThunderActionFunc actionFunc) { void EnMThunder_Init(Actor* thisx, GlobalContext* globalCtx2) { GlobalContext* globalCtx = globalCtx2; - EnMThunder* this = THIS; + EnMThunder* this = (EnMThunder*)thisx; Player* player = GET_PLAYER(globalCtx); Collider_InitCylinder(globalCtx, &this->collider); @@ -114,7 +112,7 @@ void EnMThunder_Init(Actor* thisx, GlobalContext* globalCtx2) { } void EnMThunder_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnMThunder* this = THIS; + EnMThunder* this = (EnMThunder*)thisx; if (this->unk_1CA != 0) { func_800876C8(globalCtx); @@ -303,7 +301,7 @@ void func_80A9F9B4(EnMThunder* this, GlobalContext* globalCtx) { } void EnMThunder_Update(Actor* thisx, GlobalContext* globalCtx) { - EnMThunder* this = THIS; + EnMThunder* this = (EnMThunder*)thisx; f32 blueRadius; s32 redGreen; @@ -319,7 +317,7 @@ void EnMThunder_Update(Actor* thisx, GlobalContext* globalCtx) { void EnMThunder_Draw(Actor* thisx, GlobalContext* globalCtx2) { static f32 D_80AA046C[] = { 0.1f, 0.15f, 0.2f, 0.25f, 0.3f, 0.25f, 0.2f, 0.15f }; GlobalContext* globalCtx = globalCtx2; - EnMThunder* this = THIS; + EnMThunder* this = (EnMThunder*)thisx; Player* player = GET_PLAYER(globalCtx); f32 phi_f14; s32 phi_t1; 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 d4b8ba6ca7..68c0dafdaa 100644 --- a/src/overlays/actors/ovl_En_Ma1/z_en_ma1.c +++ b/src/overlays/actors/ovl_En_Ma1/z_en_ma1.c @@ -9,8 +9,6 @@ #define FLAGS 0x02000039 -#define THIS ((EnMa1*)thisx) - void EnMa1_Init(Actor* thisx, GlobalContext* globalCtx); void EnMa1_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnMa1_Update(Actor* thisx, GlobalContext* globalCtx); @@ -256,7 +254,7 @@ void func_80AA0B74(EnMa1* this) { } void EnMa1_Init(Actor* thisx, GlobalContext* globalCtx) { - EnMa1* this = THIS; + EnMa1* this = (EnMa1*)thisx; s32 pad; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 18.0f); @@ -285,7 +283,7 @@ void EnMa1_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnMa1_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnMa1* this = THIS; + EnMa1* this = (EnMa1*)thisx; SkelAnime_Free(&this->skelAnime, globalCtx); Collider_DestroyCylinder(globalCtx, &this->collider); @@ -392,7 +390,7 @@ void EnMa1_DoNothing(EnMa1* this, GlobalContext* globalCtx) { } void EnMa1_Update(Actor* thisx, GlobalContext* globalCtx) { - EnMa1* this = THIS; + EnMa1* this = (EnMa1*)thisx; s32 pad; Collider_UpdateCylinder(&this->actor, &this->collider); @@ -409,7 +407,7 @@ void EnMa1_Update(Actor* thisx, GlobalContext* globalCtx) { } s32 EnMa1_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - EnMa1* this = THIS; + EnMa1* this = (EnMa1*)thisx; Vec3s vec; if ((limbIndex == 2) || (limbIndex == 5)) { @@ -431,7 +429,7 @@ s32 EnMa1_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, } void EnMa1_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) { - EnMa1* this = THIS; + EnMa1* this = (EnMa1*)thisx; Vec3f vec = D_80AA16B8; if (limbIndex == 15) { @@ -440,7 +438,7 @@ void EnMa1_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Ve } void EnMa1_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnMa1* this = THIS; + EnMa1* this = (EnMa1*)thisx; Camera* camera; f32 distFromCamera; s32 pad; 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 3cb00fd5af..f2c10b52ba 100644 --- a/src/overlays/actors/ovl_En_Ma2/z_en_ma2.c +++ b/src/overlays/actors/ovl_En_Ma2/z_en_ma2.c @@ -3,8 +3,6 @@ #define FLAGS 0x02000039 -#define THIS ((EnMa2*)thisx) - void EnMa2_Init(Actor* thisx, GlobalContext* globalCtx); void EnMa2_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnMa2_Update(Actor* thisx, GlobalContext* globalCtx); @@ -204,7 +202,7 @@ void func_80AA1DB4(EnMa2* this, GlobalContext* globalCtx) { } void EnMa2_Init(Actor* thisx, GlobalContext* globalCtx) { - EnMa2* this = THIS; + EnMa2* this = (EnMa2*)thisx; s32 pad; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 18.0f); @@ -242,7 +240,7 @@ void EnMa2_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnMa2_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnMa2* this = THIS; + EnMa2* this = (EnMa2*)thisx; SkelAnime_Free(&this->skelAnime, globalCtx); Collider_DestroyCylinder(globalCtx, &this->collider); @@ -302,7 +300,7 @@ void func_80AA21C8(EnMa2* this, GlobalContext* globalCtx) { } void EnMa2_Update(Actor* thisx, GlobalContext* globalCtx) { - EnMa2* this = THIS; + EnMa2* this = (EnMa2*)thisx; s32 pad; Collider_UpdateCylinder(&this->actor, &this->collider); @@ -319,7 +317,7 @@ void EnMa2_Update(Actor* thisx, GlobalContext* globalCtx) { } s32 EnMa2_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - EnMa2* this = THIS; + EnMa2* this = (EnMa2*)thisx; Vec3s vec; if ((limbIndex == MALON_ADULT_LEFT_THIGH_LIMB) || (limbIndex == MALON_ADULT_RIGHT_THIGH_LIMB)) { @@ -346,7 +344,7 @@ s32 EnMa2_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, } void EnMa2_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) { - EnMa2* this = THIS; + EnMa2* this = (EnMa2*)thisx; Vec3f vec = { 900.0f, 0.0f, 0.0f }; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_ma2.c", 904); @@ -365,7 +363,7 @@ void EnMa2_Draw(Actor* thisx, GlobalContext* globalCtx) { static void* sMouthTextures[] = { gMalonAdultMouthNeutralTex, gMalonAdultMouthSadTex, gMalonAdultMouthHappyTex }; static void* sEyeTextures[] = { gMalonAdultEyeOpenTex, gMalonAdultEyeHalfTex, gMalonAdultEyeClosedTex }; - EnMa2* this = THIS; + EnMa2* this = (EnMa2*)thisx; Camera* camera; f32 someFloat; s32 pad; 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 d0deea76f2..fec57cbf94 100644 --- a/src/overlays/actors/ovl_En_Ma3/z_en_ma3.c +++ b/src/overlays/actors/ovl_En_Ma3/z_en_ma3.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000039 -#define THIS ((EnMa3*)thisx) - void EnMa3_Init(Actor* thisx, GlobalContext* globalCtx); void EnMa3_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnMa3_Update(Actor* thisx, GlobalContext* globalCtx); @@ -234,7 +232,7 @@ void EnMa3_ChangeAnim(EnMa3* this, s32 idx) { } void EnMa3_Init(Actor* thisx, GlobalContext* globalCtx) { - EnMa3* this = THIS; + EnMa3* this = (EnMa3*)thisx; s32 pad; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 18.0f); @@ -263,7 +261,7 @@ void EnMa3_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnMa3_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnMa3* this = THIS; + EnMa3* this = (EnMa3*)thisx; SkelAnime_Free(&this->skelAnime, globalCtx); Collider_DestroyCylinder(globalCtx, &this->collider); @@ -277,7 +275,7 @@ void func_80AA3200(EnMa3* this, GlobalContext* globalCtx) { } void EnMa3_Update(Actor* thisx, GlobalContext* globalCtx) { - EnMa3* this = THIS; + EnMa3* this = (EnMa3*)thisx; s32 pad; Collider_UpdateCylinder(&this->actor, &this->collider); @@ -300,7 +298,7 @@ void EnMa3_Update(Actor* thisx, GlobalContext* globalCtx) { } s32 EnMa3_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - EnMa3* this = THIS; + EnMa3* this = (EnMa3*)thisx; Vec3s vec; if ((limbIndex == MALON_ADULT_LIMB_LEFT_THIGH) || (limbIndex == MALON_ADULT_LIMB_RIGHT_THIGH)) { @@ -327,7 +325,7 @@ s32 EnMa3_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, } void EnMa3_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) { - EnMa3* this = THIS; + EnMa3* this = (EnMa3*)thisx; Vec3f vec = { 900.0f, 0.0f, 0.0f }; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_ma3.c", 927); @@ -346,7 +344,7 @@ void EnMa3_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Ve void EnMa3_Draw(Actor* thisx, GlobalContext* globalCtx) { static void* sMouthTextures[] = { gMalonAdultMouthNeutralTex, gMalonAdultMouthSadTex, gMalonAdultMouthHappyTex }; static void* sEyeTextures[] = { gMalonAdultEyeOpenTex, gMalonAdultEyeHalfTex, gMalonAdultEyeClosedTex }; - EnMa3* this = THIS; + EnMa3* this = (EnMa3*)thisx; Camera* camera; f32 someFloat; s32 pad; 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 da0bc681ff..a0179ec2d9 100644 --- a/src/overlays/actors/ovl_En_Mag/z_en_mag.c +++ b/src/overlays/actors/ovl_En_Mag/z_en_mag.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000030 -#define THIS ((EnMag*)thisx) - void EnMag_Init(Actor* thisx, GlobalContext* globalCtx); void EnMag_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnMag_Update(Actor* thisx, GlobalContext* globalCtx); @@ -31,7 +29,7 @@ const ActorInit En_Mag_InitVars = { static s16 sDelayTimer = 0; void EnMag_Init(Actor* thisx, GlobalContext* globalCtx) { - EnMag* this = THIS; + EnMag* this = (EnMag*)thisx; YREG(1) = 63; YREG(3) = 80; @@ -105,7 +103,7 @@ void EnMag_Destroy(Actor* thisx, GlobalContext* globalCtx) { void EnMag_Update(Actor* thisx, GlobalContext* globalCtx) { s32 pad[2]; - EnMag* this = THIS; + EnMag* this = (EnMag*)thisx; if (gSaveContext.fileNum != 0xFEDC) { if (this->globalState < MAG_STATE_DISPLAY) { @@ -386,7 +384,7 @@ void EnMag_DrawInner(Actor* thisx, GlobalContext* globalCtx, Gfx** gfxp) { gTitleEffectMask10Tex, gTitleEffectMask11Tex, gTitleEffectMask12Tex, gTitleEffectMask20Tex, gTitleEffectMask21Tex, gTitleEffectMask22Tex, }; - EnMag* this = THIS; + EnMag* this = (EnMag*)thisx; Font* font = &this->font; s32 pad; Gfx* gfx = *gfxp; 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 22ce465b54..408484a288 100644 --- a/src/overlays/actors/ovl_En_Mb/z_en_mb.c +++ b/src/overlays/actors/ovl_En_Mb/z_en_mb.c @@ -16,8 +16,6 @@ #define FLAGS 0x00000015 -#define THIS ((EnMb*)thisx) - typedef enum { /* -1 */ ENMB_TYPE_SPEAR_GUARD = -1, /* 0 */ ENMB_TYPE_CLUB, @@ -258,7 +256,7 @@ void EnMb_SetupAction(EnMb* this, EnMbActionFunc actionFunc) { } void EnMb_Init(Actor* thisx, GlobalContext* globalCtx) { - EnMb* this = THIS; + EnMb* this = (EnMb*)thisx; s32 pad; Player* player = GET_PLAYER(globalCtx); s16 relYawFromPlayer; @@ -332,7 +330,7 @@ void EnMb_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnMb_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnMb* this = THIS; + EnMb* this = (EnMb*)thisx; Collider_DestroyTris(globalCtx, &this->frontShielding); Collider_DestroyCylinder(globalCtx, &this->hitbox); @@ -1333,7 +1331,7 @@ void EnMb_SpearUpdateAttackCollider(Actor* thisx, GlobalContext* globalCtx) { Vec3f quadModel1 = { -1000.0f, 1500.0f, 0.0f }; Vec3f quadModel2 = { 1000.0f, 1500.0f, 4500.0f }; Vec3f quadModel3 = { -1000.0f, 1500.0f, 4500.0f }; - EnMb* this = THIS; + EnMb* this = (EnMb*)thisx; if (this->actor.params >= ENMB_TYPE_SPEAR_PATROL) { quadModel0.x += 2000.0f; @@ -1359,7 +1357,7 @@ void EnMb_ClubUpdateAttackCollider(Actor* thisx, GlobalContext* globalCtx) { { 1000.0f, 0.0f, 0.0f }, { 1000.0f, -8000.0f, -1500.0f }, { 1000.0f, -9000.0f, 2000.0f } }; - EnMb* this = THIS; + EnMb* this = (EnMb*)thisx; Matrix_MultVec3f(&quadModel[0], &this->attackCollider.dim.quad[1]); Matrix_MultVec3f(&quadModel[1], &this->attackCollider.dim.quad[0]); @@ -1417,7 +1415,7 @@ void EnMb_CheckColliding(EnMb* this, GlobalContext* globalCtx) { } void EnMb_Update(Actor* thisx, GlobalContext* globalCtx) { - EnMb* this = THIS; + EnMb* this = (EnMb*)thisx; s32 pad; EnMb_CheckColliding(this, globalCtx); @@ -1451,7 +1449,7 @@ void EnMb_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec static Vec3f effSpawnPosModel = { 0.0f, -8000.0f, 0.0f }; static Vec3f zeroVec = { 0.0f, 0.0f, 0.0f }; s32 bodyPart = -1; - EnMb* this = THIS; + EnMb* this = (EnMb*)thisx; Vec3f bodyPartPos; if (this->actor.params == ENMB_TYPE_CLUB) { @@ -1522,7 +1520,7 @@ void EnMb_Draw(Actor* thisx, GlobalContext* globalCtx) { Vec3f frontShieldingTri0[3]; Vec3f frontShieldingTri1[3]; s32 bodyPartIdx; - EnMb* this = THIS; + EnMb* this = (EnMb*)thisx; func_80093D18(globalCtx->state.gfxCtx); SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, 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 431144f446..e4fa286a39 100644 --- a/src/overlays/actors/ovl_En_Md/z_en_md.c +++ b/src/overlays/actors/ovl_En_Md/z_en_md.c @@ -10,8 +10,6 @@ #define FLAGS 0x02000019 -#define THIS ((EnMd*)thisx) - void EnMd_Init(Actor* thisx, GlobalContext* globalCtx); void EnMd_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnMd_Update(Actor* thisx, GlobalContext* globalCtx); @@ -409,7 +407,7 @@ u16 EnMd_GetTextLostWoods(GlobalContext* globalCtx, EnMd* this) { } u16 EnMd_GetText(GlobalContext* globalCtx, Actor* thisx) { - EnMd* this = THIS; + EnMd* this = (EnMd*)thisx; switch (globalCtx->sceneNum) { case SCENE_SPOT04: @@ -424,7 +422,7 @@ u16 EnMd_GetText(GlobalContext* globalCtx, Actor* thisx) { } s16 func_80AAAF04(GlobalContext* globalCtx, Actor* thisx) { - EnMd* this = THIS; + EnMd* this = (EnMd*)thisx; switch (func_80AAAC78(this, globalCtx)) { case TEXT_STATE_NONE: case TEXT_STATE_DONE_HAS_NEXT: @@ -610,7 +608,7 @@ void func_80AAB5A4(EnMd* this, GlobalContext* globalCtx) { } void EnMd_Init(Actor* thisx, GlobalContext* globalCtx) { - EnMd* this = THIS; + EnMd* this = (EnMd*)thisx; s32 pad; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 24.0f); @@ -648,7 +646,7 @@ void EnMd_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnMd_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnMd* this = THIS; + EnMd* this = (EnMd*)thisx; Collider_DestroyCylinder(globalCtx, &this->collider); } @@ -778,7 +776,7 @@ void func_80AABD0C(EnMd* this, GlobalContext* globalCtx) { } void EnMd_Update(Actor* thisx, GlobalContext* globalCtx) { - EnMd* this = THIS; + EnMd* this = (EnMd*)thisx; s32 pad; Collider_UpdateCylinder(&this->actor, &this->collider); @@ -794,7 +792,7 @@ void EnMd_Update(Actor* thisx, GlobalContext* globalCtx) { s32 EnMd_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx, Gfx** gfx) { - EnMd* this = THIS; + EnMd* this = (EnMd*)thisx; Vec3s vec; if (limbIndex == 16) { @@ -819,7 +817,7 @@ s32 EnMd_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, } void EnMd_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx, Gfx** gfx) { - EnMd* this = THIS; + EnMd* this = (EnMd*)thisx; Vec3f vec = { 400.0f, 0.0f, 0.0f }; if (limbIndex == 16) { @@ -833,7 +831,7 @@ void EnMd_Draw(Actor* thisx, GlobalContext* globalCtx) { gMidoEyeHalfTex, gMidoEyeClosedTex, }; - EnMd* this = THIS; + EnMd* this = (EnMd*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_md.c", 1280); 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 fa0fc850ec..9ea165b45f 100644 --- a/src/overlays/actors/ovl_En_Mk/z_en_mk.c +++ b/src/overlays/actors/ovl_En_Mk/z_en_mk.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000019 -#define THIS ((EnMk*)thisx) - void EnMk_Init(Actor* thisx, GlobalContext* globalCtx); void EnMk_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnMk_Update(Actor* thisx, GlobalContext* globalCtx); @@ -51,7 +49,7 @@ static ColliderCylinderInit sCylinderInit = { }; void EnMk_Init(Actor* thisx, GlobalContext* globalCtx) { - EnMk* this = THIS; + EnMk* this = (EnMk*)thisx; s32 swimFlag; this->actor.minVelocityY = -4.0f; @@ -76,7 +74,7 @@ void EnMk_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnMk_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnMk* this = THIS; + EnMk* this = (EnMk*)thisx; Collider_DestroyCylinder(globalCtx, &this->collider); } @@ -282,7 +280,7 @@ void EnMk_Wait(EnMk* this, GlobalContext* globalCtx) { } void EnMk_Update(Actor* thisx, GlobalContext* globalCtx) { - EnMk* this = THIS; + EnMk* this = (EnMk*)thisx; s32 pad; Vec3s vec; Player* player; @@ -345,7 +343,7 @@ void EnMk_Update(Actor* thisx, GlobalContext* globalCtx) { } s32 EnMk_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - EnMk* this = THIS; + EnMk* this = (EnMk*)thisx; if (limbIndex == 11) { rot->y -= this->headRotation.y; @@ -357,7 +355,7 @@ s32 EnMk_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, void EnMk_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) { static Vec3f D_80AAD64C = { 1000.0f, -100.0f, 0.0f }; - EnMk* this = THIS; + EnMk* this = (EnMk*)thisx; if (limbIndex == 11) { Matrix_MultVec3f(&D_80AAD64C, &this->actor.focus.pos); @@ -365,7 +363,7 @@ void EnMk_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec } void EnMk_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnMk* this = THIS; + EnMk* this = (EnMk*)thisx; func_800943C8(globalCtx->state.gfxCtx); SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, 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 2a56938d32..0dae9980b0 100644 --- a/src/overlays/actors/ovl_En_Mm/z_en_mm.c +++ b/src/overlays/actors/ovl_En_Mm/z_en_mm.c @@ -10,8 +10,6 @@ #define FLAGS 0x00000019 -#define THIS ((EnMm*)thisx) - typedef enum { /* 0 */ RM_ANIM_RUN, /* 1 */ RM_ANIM_SIT, @@ -168,7 +166,7 @@ void EnMm_ChangeAnimation(EnMm* this, s32 newAnimIndex, s32* curAnimIndex) { void EnMm_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnMm* this = THIS; + EnMm* this = (EnMm*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 21.0f); @@ -205,7 +203,7 @@ void EnMm_Init(Actor* thisx, GlobalContext* globalCtx) { void EnMm_Destroy(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnMm* this = THIS; + EnMm* this = (EnMm*)thisx; Collider_DestroyCylinder(globalCtx, &this->collider); } @@ -512,7 +510,7 @@ void func_80AAE598(EnMm* this, GlobalContext* globalCtx) { void EnMm_Update(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnMm* this = THIS; + EnMm* this = (EnMm*)thisx; this->actionFunc(this, globalCtx); func_80AADCD0(this, globalCtx); @@ -523,7 +521,7 @@ void EnMm_Update(Actor* thisx, GlobalContext* globalCtx) { void EnMm_Draw(Actor* thisx, GlobalContext* globalCtx) { static void* mouthTextures[] = { gRunningManMouthOpenTex, gRunningManMouthClosedTex }; s32 pad; - EnMm* this = THIS; + EnMm* this = (EnMm*)thisx; if (0) {} @@ -574,7 +572,7 @@ void EnMm_Draw(Actor* thisx, GlobalContext* globalCtx) { } s32 EnMm_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - EnMm* this = THIS; + EnMm* this = (EnMm*)thisx; if (this->unk_254 & 1) { switch (limbIndex) { @@ -596,7 +594,7 @@ s32 EnMm_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, void EnMm_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) { static Vec3f headOffset = { 200.0f, 800.0f, 0.0f }; - EnMm* this = THIS; + EnMm* this = (EnMm*)thisx; if (limbIndex == 15) { Matrix_MultVec3f(&headOffset, &this->actor.focus.pos); 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 fce84e6d49..d8297694f1 100644 --- a/src/overlays/actors/ovl_En_Mm2/z_en_mm2.c +++ b/src/overlays/actors/ovl_En_Mm2/z_en_mm2.c @@ -10,8 +10,6 @@ #define FLAGS 0x00000019 -#define THIS ((EnMm2*)thisx) - typedef enum { /* 0 */ RM2_ANIM_RUN, /* 1 */ RM2_ANIM_SIT, @@ -133,7 +131,7 @@ void func_80AAEF70(EnMm2* this, GlobalContext* globalCtx) { } void EnMm2_Init(Actor* thisx, GlobalContext* globalCtx2) { - EnMm2* this = THIS; + EnMm2* this = (EnMm2*)thisx; GlobalContext* globalCtx = globalCtx2; Actor_ProcessInitChain(&this->actor, sInitChain); @@ -168,7 +166,7 @@ void EnMm2_Init(Actor* thisx, GlobalContext* globalCtx2) { } void EnMm2_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnMm2* this = THIS; + EnMm2* this = (EnMm2*)thisx; Collider_DestroyCylinder(globalCtx, &this->collider); } @@ -299,7 +297,7 @@ void func_80AAF668(EnMm2* this, GlobalContext* globalCtx) { } void EnMm2_Update(Actor* thisx, GlobalContext* globalCtx) { - EnMm2* this = THIS; + EnMm2* this = (EnMm2*)thisx; s32 pad; if (this->unk_1F4 & 1) { @@ -319,7 +317,7 @@ void EnMm2_Update(Actor* thisx, GlobalContext* globalCtx) { void EnMm2_Draw(Actor* thisx, GlobalContext* globalCtx) { static void* mouthTextures[] = { gRunningManMouthOpenTex, gRunningManMouthClosedTex }; - EnMm2* this = THIS; + EnMm2* this = (EnMm2*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_mm2.c", 634); func_80093D18(globalCtx->state.gfxCtx); @@ -330,7 +328,7 @@ void EnMm2_Draw(Actor* thisx, GlobalContext* globalCtx) { } s32 EnMm2_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - EnMm2* this = THIS; + EnMm2* this = (EnMm2*)thisx; switch (limbIndex) { case 8: @@ -348,7 +346,7 @@ s32 EnMm2_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, void EnMm2_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) { static Vec3f headOffset = { 200.0f, 800.0f, 0.0f }; - EnMm2* this = THIS; + EnMm2* this = (EnMm2*)thisx; if (limbIndex == 15) { Matrix_MultVec3f(&headOffset, &this->actor.focus.pos); 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 d259dac4da..e3e6397846 100644 --- a/src/overlays/actors/ovl_En_Ms/z_en_ms.c +++ b/src/overlays/actors/ovl_En_Ms/z_en_ms.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000009 -#define THIS ((EnMs*)thisx) - void EnMs_Init(Actor* thisx, GlobalContext* globalCtx); void EnMs_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnMs_Update(Actor* thisx, GlobalContext* globalCtx); @@ -71,7 +69,7 @@ void EnMs_SetOfferText(EnMs* this, GlobalContext* globalCtx) { } void EnMs_Init(Actor* thisx, GlobalContext* globalCtx) { - EnMs* this = THIS; + EnMs* this = (EnMs*)thisx; s32 pad; if (LINK_AGE_IN_YEARS != YEARS_CHILD) { @@ -97,7 +95,7 @@ void EnMs_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnMs_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnMs* this = THIS; + EnMs* this = (EnMs*)thisx; Collider_DestroyCylinder(globalCtx, &this->collider); } @@ -160,7 +158,7 @@ void EnMs_TalkAfterPurchase(EnMs* this, GlobalContext* globalCtx) { } void EnMs_Update(Actor* thisx, GlobalContext* globalCtx) { - EnMs* this = THIS; + EnMs* this = (EnMs*)thisx; s32 pad; this->activeTimer += 1; @@ -180,7 +178,7 @@ void EnMs_Update(Actor* thisx, GlobalContext* globalCtx) { } void EnMs_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnMs* this = THIS; + EnMs* this = (EnMs*)thisx; func_80093D18(globalCtx->state.gfxCtx); SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, 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 43bc838263..249375e32e 100644 --- a/src/overlays/actors/ovl_En_Mu/z_en_mu.c +++ b/src/overlays/actors/ovl_En_Mu/z_en_mu.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000009 -#define THIS ((EnMu*)thisx) - void EnMu_Init(Actor* thisx, GlobalContext* globalCtx); void EnMu_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnMu_Update(Actor* thisx, GlobalContext* globalCtx); @@ -97,7 +95,7 @@ void EnMu_Interact(EnMu* this, GlobalContext* globalCtx) { } u16 EnMu_GetFaceReaction(GlobalContext* globalCtx, Actor* thisx) { - EnMu* this = THIS; + EnMu* this = (EnMu*)thisx; u16 faceReaction = Text_GetFaceReaction(globalCtx, this->actor.params + 0x3A); if (faceReaction != 0) { @@ -107,7 +105,7 @@ u16 EnMu_GetFaceReaction(GlobalContext* globalCtx, Actor* thisx) { } s16 EnMu_CheckDialogState(GlobalContext* globalCtx, Actor* thisx) { - EnMu* this = THIS; + EnMu* this = (EnMu*)thisx; switch (Message_GetState(&globalCtx->msgCtx)) { case TEXT_STATE_NONE: @@ -129,7 +127,7 @@ s16 EnMu_CheckDialogState(GlobalContext* globalCtx, Actor* thisx) { } void EnMu_Init(Actor* thisx, GlobalContext* globalCtx) { - EnMu* this = THIS; + EnMu* this = (EnMu*)thisx; s32 pad; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 160.0f); @@ -144,7 +142,7 @@ void EnMu_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnMu_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnMu* this = THIS; + EnMu* this = (EnMu*)thisx; SkelAnime_Free(&this->skelAnime, globalCtx); } @@ -154,7 +152,7 @@ void EnMu_Pose(EnMu* this, GlobalContext* globalCtx) { } void EnMu_Update(Actor* thisx, GlobalContext* globalCtx) { - EnMu* this = THIS; + EnMu* this = (EnMu*)thisx; s32 pad; f32 talkDist; Vec3s pos; @@ -178,7 +176,7 @@ void EnMu_Update(Actor* thisx, GlobalContext* globalCtx) { } s32 EnMu_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - EnMu* this = THIS; + EnMu* this = (EnMu*)thisx; if ((limbIndex == 5) || (limbIndex == 6) || (limbIndex == 7) || (limbIndex == 11) || (limbIndex == 12) || (limbIndex == 13) || (limbIndex == 14)) { @@ -201,7 +199,7 @@ Gfx* EnMu_DisplayListSetColor(GraphicsContext* gfxCtx, u8 r, u8 g, u8 b, u8 a) { } void EnMu_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnMu* this = THIS; + EnMu* this = (EnMu*)thisx; Color_RGBA8 colors[2][5] = { { { 100, 130, 235, 0 }, { 160, 250, 60, 0 }, { 90, 60, 20, 0 }, { 30, 240, 200, 0 }, { 140, 70, 20, 0 } }, { { 140, 70, 20, 0 }, { 30, 240, 200, 0 }, { 90, 60, 20, 0 }, { 160, 250, 60, 0 }, { 100, 130, 235, 0 } } 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 f5b1876c42..d670ba7fbe 100644 --- a/src/overlays/actors/ovl_En_Nb/z_en_nb.c +++ b/src/overlays/actors/ovl_En_Nb/z_en_nb.c @@ -11,8 +11,6 @@ #define FLAGS 0x00000010 -#define THIS ((EnNb*)thisx) - typedef enum { /* 0x00 */ NB_CHAMBER_INIT, /* 0x01 */ NB_CHAMBER_UNDERGROUND, @@ -130,7 +128,7 @@ void EnNb_UpdatePath(EnNb* this, GlobalContext* globalCtx) { } void EnNb_SetupCollider(Actor* thisx, GlobalContext* globalCtx) { - EnNb* this = THIS; + EnNb* this = (EnNb*)thisx; Collider_InitCylinder(globalCtx, &this->collider); Collider_SetCylinderType1(globalCtx, &this->collider, thisx, &sCylinderInit); @@ -145,7 +143,7 @@ void EnNb_UpdateCollider(EnNb* this, GlobalContext* globalCtx) { } void EnNb_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnNb* this = THIS; + EnNb* this = (EnNb*)thisx; Collider_DestroyCylinder(globalCtx, &this->collider); } @@ -970,7 +968,7 @@ void func_80AB2E70(EnNb* this, GlobalContext* globalCtx) { } s32 func_80AB2FC0(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - EnNb* this = THIS; + EnNb* this = (EnNb*)thisx; if (limbIndex == NB_LIMB_HEAD) { *dList = gNabooruHeadMouthOpenDL; @@ -1412,7 +1410,7 @@ static EnNbActionFunc sActionFuncs[] = { }; void EnNb_Update(Actor* thisx, GlobalContext* globalCtx) { - EnNb* this = THIS; + EnNb* this = (EnNb*)thisx; if (this->action < 0 || this->action > 30 || sActionFuncs[this->action] == NULL) { // "Main mode is wrong!!!!!!!!!!!!!!!!!!!!!!!!!" @@ -1425,7 +1423,7 @@ void EnNb_Update(Actor* thisx, GlobalContext* globalCtx) { void EnNb_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnNb* this = THIS; + EnNb* this = (EnNb*)thisx; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f); EnNb_SetupCollider(thisx, globalCtx); @@ -1455,7 +1453,7 @@ void EnNb_Init(Actor* thisx, GlobalContext* globalCtx) { } s32 EnNb_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - EnNb* this = THIS; + EnNb* this = (EnNb*)thisx; struct_80034A14_arg1* unk_300 = &this->unk_300; s32 ret = false; @@ -1475,7 +1473,7 @@ s32 EnNb_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, } void EnNb_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) { - EnNb* this = THIS; + EnNb* this = (EnNb*)thisx; if (limbIndex == NB_LIMB_HEAD) { Vec3f vec1 = { 0.0f, 10.0f, 0.0f }; @@ -1519,7 +1517,7 @@ static EnNbDrawFunc sDrawFuncs[] = { }; void EnNb_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnNb* this = THIS; + EnNb* this = (EnNb*)thisx; if (this->drawMode < 0 || this->drawMode >= 5 || sDrawFuncs[this->drawMode] == NULL) { // "Draw mode is wrong!!!!!!!!!!!!!!!!!!!!!!!!!" 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 1f0f3c2a77..8a4a28dc05 100644 --- a/src/overlays/actors/ovl_En_Niw/z_en_niw.c +++ b/src/overlays/actors/ovl_En_Niw/z_en_niw.c @@ -11,8 +11,6 @@ #define FLAGS 0x00800010 -#define THIS ((EnNiw*)thisx) - void EnNiw_Init(Actor* thisx, GlobalContext* globalCtx); void EnNiw_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnNiw_Update(Actor* thisx, GlobalContext* globalCtx); @@ -121,7 +119,7 @@ static InitChainEntry sInitChain[] = { }; void EnNiw_Init(Actor* thisx, GlobalContext* globalCtx) { - EnNiw* this = THIS; + EnNiw* this = (EnNiw*)thisx; s32 pad; s32 i; @@ -242,7 +240,7 @@ void EnNiw_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnNiw_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnNiw* this = THIS; + EnNiw* this = (EnNiw*)thisx; Collider_DestroyCylinder(globalCtx, &this->collider); } @@ -874,7 +872,7 @@ void func_80AB747C(EnNiw* this, GlobalContext* globalCtx) { void EnNiw_Update(Actor* thisx, GlobalContext* globalCtx) { s32 pad1; - EnNiw* this = THIS; + EnNiw* this = (EnNiw*)thisx; Player* player = GET_PLAYER(globalCtx); s16 i; s16 featherCount; @@ -1108,7 +1106,7 @@ void EnNiw_Update(Actor* thisx, GlobalContext* globalCtx) { } s32 EnNiw_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - EnNiw* this = THIS; + EnNiw* this = (EnNiw*)thisx; Vec3f zeroVec = { 0.0f, 0.0f, 0.0f }; if (limbIndex == 13) { @@ -1132,7 +1130,7 @@ s32 EnNiw_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, } void EnNiw_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnNiw* this = THIS; + EnNiw* this = (EnNiw*)thisx; Vec3f scale = { 0.15f, 0.15f, 0.15f }; GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; 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 8daeefd01c..34d58fa33b 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 @@ -10,8 +10,6 @@ #define FLAGS 0x00000019 -#define THIS ((EnNiwGirl*)thisx) - void EnNiwGirl_Init(Actor* thisx, GlobalContext* globalCtx); void EnNiwGirl_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnNiwGirl_Update(Actor* thisx, GlobalContext* globalCtx); @@ -54,7 +52,7 @@ static ColliderCylinderInit sCylinderInit = { }; void EnNiwGirl_Init(Actor* thisx, GlobalContext* globalCtx) { - EnNiwGirl* this = THIS; + EnNiwGirl* this = (EnNiwGirl*)thisx; s32 pad; Vec3f vec1; Vec3f vec2; @@ -188,7 +186,7 @@ void func_80AB94D0(EnNiwGirl* this, GlobalContext* globalCtx) { } void EnNiwGirl_Update(Actor* thisx, GlobalContext* globalCtx) { - EnNiwGirl* this = THIS; + EnNiwGirl* this = (EnNiwGirl*)thisx; EnNiwGirlActionFunc tempActionFunc; Player* player = GET_PLAYER(globalCtx); @@ -232,7 +230,7 @@ void EnNiwGirl_Update(Actor* thisx, GlobalContext* globalCtx) { s32 EnNiwGirlOverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - EnNiwGirl* this = THIS; + EnNiwGirl* this = (EnNiwGirl*)thisx; if (limbIndex == 3) { rot->x += this->unk_266.y; @@ -248,7 +246,7 @@ static Vec3f sConstVec3f = { 0.2f, 0.2f, 0.2f }; void EnNiwGirl_Draw(Actor* thisx, GlobalContext* globalCtx) { static void* eyeTextures[] = { gNiwGirlEyeOpenTex, gNiwGirlEyeHalfTex, gNiwGirlEyeClosedTex }; - EnNiwGirl* this = THIS; + EnNiwGirl* this = (EnNiwGirl*)thisx; s32 pad; Vec3f sp4C = sConstVec3f; 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 f22f87ccf1..5c4347735a 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 @@ -6,8 +6,6 @@ #define FLAGS 0x00000019 -#define THIS ((EnNiwLady*)thisx) - void EnNiwLady_Init(Actor* thisx, GlobalContext* globalCtx); void EnNiwLady_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnNiwLady_Update(Actor* thisx, GlobalContext* globalCtx); @@ -69,7 +67,7 @@ static ColliderCylinderInit sCylinderInit = { void EnNiwLady_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnNiwLady* this = THIS; + EnNiwLady* this = (EnNiwLady*)thisx; this->objectAneIndex = Object_GetIndex(&globalCtx->objectCtx, OBJECT_ANE); this->objectOsAnimeIndex = Object_GetIndex(&globalCtx->objectCtx, OBJECT_OS_ANIME); @@ -92,7 +90,7 @@ void EnNiwLady_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnNiwLady_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnNiwLady* this = THIS; + EnNiwLady* this = (EnNiwLady*)thisx; Collider_DestroyCylinder(globalCtx, &this->collider); } @@ -490,7 +488,7 @@ void func_80ABAD7C(EnNiwLady* this, GlobalContext* globalCtx) { void EnNiwLady_Update(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnNiwLady* this = THIS; + EnNiwLady* this = (EnNiwLady*)thisx; Player* player = GET_PLAYER(globalCtx); Actor_SetFocus(thisx, 60.0f); @@ -549,7 +547,7 @@ Gfx* func_80ABB0A0(GraphicsContext* gfxCtx) { s32 EnNiwLady_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - EnNiwLady* this = THIS; + EnNiwLady* this = (EnNiwLady*)thisx; s32 pad; if (limbIndex == 15) { @@ -570,7 +568,7 @@ s32 EnNiwLady_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dL void EnNiwLady_Draw(Actor* thisx, GlobalContext* globalCtx) { static void* sEyeTextures[] = { gCuccoLadyEyeOpenTex, gCuccoLadyEyeHalfTex, gCuccoLadyEyeClosedTex }; - EnNiwLady* this = THIS; + EnNiwLady* this = (EnNiwLady*)thisx; s32 pad; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_niw_lady.c", 1347); 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 5dbe97dd45..1f9cfa65e9 100644 --- a/src/overlays/actors/ovl_En_Nutsball/z_en_nutsball.c +++ b/src/overlays/actors/ovl_En_Nutsball/z_en_nutsball.c @@ -14,8 +14,6 @@ #define FLAGS 0x00000010 -#define THIS ((EnNutsball*)thisx) - void EnNutsball_Init(Actor* thisx, GlobalContext* globalCtx); void EnNutsball_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnNutsball_Update(Actor* thisx, GlobalContext* globalCtx); @@ -65,7 +63,7 @@ static Gfx* sDLists[] = { }; void EnNutsball_Init(Actor* thisx, GlobalContext* globalCtx) { - EnNutsball* this = THIS; + EnNutsball* this = (EnNutsball*)thisx; s32 pad; ActorShape_Init(&this->actor.shape, 400.0f, ActorShadow_DrawCircle, 13.0f); @@ -81,7 +79,7 @@ void EnNutsball_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnNutsball_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnNutsball* this = THIS; + EnNutsball* this = (EnNutsball*)thisx; Collider_DestroyCylinder(globalCtx, &this->collider); } @@ -144,7 +142,7 @@ void func_80ABBBA8(EnNutsball* this, GlobalContext* globalCtx) { } void EnNutsball_Update(Actor* thisx, GlobalContext* globalCtx) { - EnNutsball* this = THIS; + EnNutsball* this = (EnNutsball*)thisx; Player* player = GET_PLAYER(globalCtx); s32 pad; 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 ea2f8108ac..d3cf003dc6 100644 --- a/src/overlays/actors/ovl_En_Nwc/z_en_nwc.c +++ b/src/overlays/actors/ovl_En_Nwc/z_en_nwc.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000030 -#define THIS ((EnNwc*)thisx) - void EnNwc_Init(Actor* thisx, GlobalContext* globalCtx); void EnNwc_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnNwc_Update(Actor* thisx, GlobalContext* globalCtx); @@ -205,7 +203,7 @@ void EnNwc_DrawChicks(EnNwc* this, GlobalContext* globalCtx) { void EnNwc_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnNwc* this = THIS; + EnNwc* this = (EnNwc*)thisx; ColliderJntSphElementInit elementInits[16]; ColliderJntSphElementInit* element; EnNwcChick* chick; @@ -232,7 +230,7 @@ void EnNwc_Init(Actor* thisx, GlobalContext* globalCtx) { void EnNwc_Destroy(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnNwc* this = THIS; + EnNwc* this = (EnNwc*)thisx; Collider_FreeJntSph(globalCtx, &this->collider); } @@ -243,7 +241,7 @@ void EnNwc_Idle(EnNwc* this, GlobalContext* globalCtx) { void EnNwc_Update(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnNwc* this = THIS; + EnNwc* this = (EnNwc*)thisx; this->updateFunc(this, globalCtx); CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->collider.base); @@ -251,7 +249,7 @@ void EnNwc_Update(Actor* thisx, GlobalContext* globalCtx) { void EnNwc_Draw(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnNwc* this = THIS; + EnNwc* this = (EnNwc*)thisx; EnNwc_DrawChicks(this, 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 93d2605505..0cf905450d 100644 --- a/src/overlays/actors/ovl_En_Ny/z_en_ny.c +++ b/src/overlays/actors/ovl_En_Ny/z_en_ny.c @@ -3,8 +3,6 @@ #define FLAGS 0x00000005 -#define THIS ((EnNy*)thisx) - void EnNy_Init(Actor* thisx, GlobalContext* globalCtx); void EnNy_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnNy_Update(Actor* thisx, GlobalContext* globalCtx); @@ -106,7 +104,7 @@ static InitChainEntry sInitChain[] = { }; void EnNy_Init(Actor* thisx, GlobalContext* globalCtx) { - EnNy* this = THIS; + EnNy* this = (EnNy*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); this->actor.colChkInfo.damageTable = &sDamageTable; @@ -147,7 +145,7 @@ void EnNy_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnNy_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnNy* this = THIS; + EnNy* this = (EnNy*)thisx; Collider_DestroyJntSph(globalCtx, &this->collider); } @@ -366,7 +364,7 @@ void func_80ABD3B8(EnNy* this, f32 arg1, f32 arg2) { } void EnNy_Update(Actor* thisx, GlobalContext* globalCtx) { - EnNy* this = THIS; + EnNy* this = (EnNy*)thisx; f32 temp_f20; f32 temp_f22; s32 i; @@ -482,7 +480,7 @@ void EnNy_Die(EnNy* this, GlobalContext* globalCtx) { } void EnNy_UpdateDeath(Actor* thisx, GlobalContext* globalCtx) { - EnNy* this = THIS; + EnNy* this = (EnNy*)thisx; this->timer++; if (this->unk_1CA != 0) { @@ -492,7 +490,7 @@ void EnNy_UpdateDeath(Actor* thisx, GlobalContext* globalCtx) { } void EnNy_UpdateUnused(Actor* thisx, GlobalContext* globalCtx2) { - EnNy* this = THIS; + EnNy* this = (EnNy*)thisx; GlobalContext* globalCtx = globalCtx2; f32 sp3C; f32 temp_f0; @@ -523,7 +521,7 @@ static Vec3f sFireOffsets[] = { void EnNy_Draw(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnNy* this = THIS; + EnNy* this = (EnNy*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_ny.c", 837); Collider_UpdateSpheres(0, &this->collider); @@ -566,7 +564,7 @@ void EnNy_Draw(Actor* thisx, GlobalContext* globalCtx) { } void EnNy_DrawDeathEffect(Actor* thisx, GlobalContext* globalCtx) { - EnNy* this = THIS; + EnNy* this = (EnNy*)thisx; Vec3f* temp; f32 scale; s32 i; 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 422a0a96bb..b205909fd3 100644 --- a/src/overlays/actors/ovl_En_OE2/z_en_oe2.c +++ b/src/overlays/actors/ovl_En_OE2/z_en_oe2.c @@ -8,8 +8,6 @@ #define FLAGS 0x00000009 -#define THIS ((EnOE2*)thisx) - void EnOE2_Init(Actor* thisx, GlobalContext* globalCtx); void EnOE2_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnOE2_Update(Actor* thisx, GlobalContext* globalCtx); @@ -34,7 +32,7 @@ void EnOE2_SetupAction(EnOE2* this, EnOE2ActionFunc actionFunc) { } void EnOE2_Init(Actor* thisx, GlobalContext* globalCtx) { - EnOE2* this = THIS; + EnOE2* this = (EnOE2*)thisx; EnOE2_SetupAction(this, EnOE2_DoNothing); } 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 d6ec04bf80..bbcb76d720 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 @@ -9,8 +9,6 @@ #define FLAGS 0x02000010 -#define THIS ((EnOkarinaEffect*)thisx) - void EnOkarinaEffect_Init(Actor* thisx, GlobalContext* globalCtx); void EnOkarinaEffect_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnOkarinaEffect_Update(Actor* thisx, GlobalContext* globalCtx); @@ -35,7 +33,7 @@ void EnOkarinaEffect_SetupAction(EnOkarinaEffect* this, EnOkarinaEffectActionFun } void EnOkarinaEffect_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnOkarinaEffect* this = THIS; + EnOkarinaEffect* this = (EnOkarinaEffect*)thisx; globalCtx->envCtx.unk_F2[0] = 0; if ((gWeatherMode != 4) && (gWeatherMode != 5) && (globalCtx->envCtx.gloomySkyMode == 1)) { @@ -46,7 +44,7 @@ void EnOkarinaEffect_Destroy(Actor* thisx, GlobalContext* globalCtx) { } void EnOkarinaEffect_Init(Actor* thisx, GlobalContext* globalCtx) { - EnOkarinaEffect* this = THIS; + EnOkarinaEffect* this = (EnOkarinaEffect*)thisx; osSyncPrintf("\n\n"); // "Ocarina Storm Effect" @@ -112,7 +110,7 @@ void EnOkarinaEffect_ManageStorm(EnOkarinaEffect* this, GlobalContext* globalCtx } void EnOkarinaEffect_Update(Actor* thisx, GlobalContext* globalCtx) { - EnOkarinaEffect* this = THIS; + EnOkarinaEffect* this = (EnOkarinaEffect*)thisx; this->actionFunc(this, globalCtx); if (BREG(0) != 0) { 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 6204b81d7d..b6d4edf788 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 @@ -11,8 +11,6 @@ #define FLAGS 0x02000010 -#define THIS ((EnOkarinaTag*)thisx) - void EnOkarinaTag_Init(Actor* thisx, GlobalContext* globalCtx); void EnOkarinaTag_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnOkarinaTag_Update(Actor* thisx, GlobalContext* globalCtx); @@ -43,7 +41,7 @@ void EnOkarinaTag_Destroy(Actor* thisx, GlobalContext* globalCtx) { } void EnOkarinaTag_Init(Actor* thisx, GlobalContext* globalCtx) { - EnOkarinaTag* this = THIS; + EnOkarinaTag* this = (EnOkarinaTag*)thisx; osSyncPrintf("\n\n"); // "Ocarina tag outbreak" @@ -316,7 +314,7 @@ void func_80ABF7CC(EnOkarinaTag* this, GlobalContext* globalCtx) { } void EnOkarinaTag_Update(Actor* thisx, GlobalContext* globalCtx) { - EnOkarinaTag* this = THIS; + EnOkarinaTag* this = (EnOkarinaTag*)thisx; this->actionFunc(this, globalCtx); if (BREG(0) != 0) { 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 cf2a4d99a6..d4042e1a7b 100644 --- a/src/overlays/actors/ovl_En_Okuta/z_en_okuta.c +++ b/src/overlays/actors/ovl_En_Okuta/z_en_okuta.c @@ -3,8 +3,6 @@ #define FLAGS 0x00000005 -#define THIS ((EnOkuta*)thisx) - void EnOkuta_Init(Actor* thisx, GlobalContext* globalCtx); void EnOkuta_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnOkuta_Update(Actor* thisx, GlobalContext* globalCtx); @@ -116,7 +114,7 @@ static InitChainEntry sInitChain[] = { }; void EnOkuta_Init(Actor* thisx, GlobalContext* globalCtx) { - EnOkuta* this = THIS; + EnOkuta* this = (EnOkuta*)thisx; s32 pad; WaterBox* outWaterBox; f32 ySurface; @@ -160,7 +158,7 @@ void EnOkuta_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnOkuta_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnOkuta* this = THIS; + EnOkuta* this = (EnOkuta*)thisx; Collider_DestroyCylinder(globalCtx, &this->collider); } @@ -572,7 +570,7 @@ void EnOkuta_ColliderCheck(EnOkuta* this, GlobalContext* globalCtx) { } void EnOkuta_Update(Actor* thisx, GlobalContext* globalCtx2) { - EnOkuta* this = THIS; + EnOkuta* this = (EnOkuta*)thisx; GlobalContext* globalCtx = globalCtx2; Player* player = GET_PLAYER(globalCtx); WaterBox* outWaterBox; @@ -680,7 +678,7 @@ s32 EnOkuta_GetSnoutScale(EnOkuta* this, f32 curFrame, Vec3f* scale) { s32 EnOkuta_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - EnOkuta* this = THIS; + EnOkuta* this = (EnOkuta*)thisx; f32 curFrame = this->skelAnime.curFrame; Vec3f scale; s32 doScale = false; @@ -703,7 +701,7 @@ s32 EnOkuta_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dLis } void EnOkuta_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnOkuta* this = THIS; + EnOkuta* this = (EnOkuta*)thisx; s32 pad; func_80093D18(globalCtx->state.gfxCtx); 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 c171508fc5..63d8a66337 100644 --- a/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c +++ b/src/overlays/actors/ovl_En_Ossan/z_en_ossan.c @@ -16,8 +16,6 @@ #define FLAGS 0x00000019 -#define THIS ((EnOssan*)thisx) - void EnOssan_Init(Actor* thisx, GlobalContext* globalCtx); void EnOssan_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnOssan_Update(Actor* thisx, GlobalContext* globalCtx); @@ -571,7 +569,7 @@ s32 EnOssan_TryGetObjBankIndexes(EnOssan* this, GlobalContext* globalCtx, s16* o } void EnOssan_Init(Actor* thisx, GlobalContext* globalCtx) { - EnOssan* this = THIS; + EnOssan* this = (EnOssan*)thisx; s32 pad; s16* objectIds; @@ -632,7 +630,7 @@ void EnOssan_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnOssan_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnOssan* this = THIS; + EnOssan* this = (EnOssan*)thisx; SkelAnime_Free(&this->skelAnime, globalCtx); Collider_DestroyCylinder(globalCtx, &this->collider); } @@ -2228,7 +2226,7 @@ void EnOssan_MainActionFunc(EnOssan* this, GlobalContext* globalCtx) { } void EnOssan_Update(Actor* thisx, GlobalContext* globalCtx) { - EnOssan* this = THIS; + EnOssan* this = (EnOssan*)thisx; this->timer++; this->actionFunc(this, globalCtx); @@ -2236,7 +2234,7 @@ void EnOssan_Update(Actor* thisx, GlobalContext* globalCtx) { s32 EnOssan_OverrideLimbDrawDefaultShopkeeper(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - EnOssan* this = THIS; + EnOssan* this = (EnOssan*)thisx; if (limbIndex == 8) { rot->x += this->headRot; @@ -2336,7 +2334,7 @@ void EnOssan_DrawStickDirectionPrompts(GlobalContext* globalCtx, EnOssan* this) void EnOssan_DrawBazaarShopkeeper(Actor* thisx, GlobalContext* globalCtx) { static void* sBazaarShopkeeperEyeTextures[] = { gOssanEyeOpenTex, gOssanEyeHalfTex, gOssanEyeClosedTex }; - EnOssan* this = THIS; + EnOssan* this = (EnOssan*)thisx; s32 pad; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_oB1.c", 4320); @@ -2358,7 +2356,7 @@ s32 EnOssan_OverrideLimbDrawKokiriShopkeeper(GlobalContext* globalCtx, s32 limbI gKokiriShopkeeperEyeHalfTex, gKokiriShopkeeperEyeOpenTex, }; - EnOssan* this = THIS; + EnOssan* this = (EnOssan*)thisx; s32 pad; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_oB1.c", 4354); @@ -2391,7 +2389,7 @@ Gfx* EnOssan_SetEnvColor(GraphicsContext* gfxCtx, u8 r, u8 g, u8 b, u8 a) { } void EnOssan_DrawKokiriShopkeeper(Actor* thisx, GlobalContext* globalCtx) { - EnOssan* this = THIS; + EnOssan* this = (EnOssan*)thisx; s32 pad; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_oB1.c", 4409); @@ -2412,7 +2410,7 @@ void EnOssan_DrawKokiriShopkeeper(Actor* thisx, GlobalContext* globalCtx) { void EnOssan_DrawGoronShopkeeper(Actor* thisx, GlobalContext* globalCtx) { static void* sGoronShopkeeperEyeTextures[] = { gGoronCsEyeOpenTex, gGoronCsEyeHalfTex, gGoronCsEyeClosedTex }; - EnOssan* this = THIS; + EnOssan* this = (EnOssan*)thisx; s32 pad; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_oB1.c", 4455); @@ -2430,7 +2428,7 @@ void EnOssan_DrawGoronShopkeeper(Actor* thisx, GlobalContext* globalCtx) { s32 EnOssan_OverrideLimbDrawZoraShopkeeper(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - EnOssan* this = THIS; + EnOssan* this = (EnOssan*)thisx; if (limbIndex == 15) { rot->x += this->headRot; @@ -2440,7 +2438,7 @@ s32 EnOssan_OverrideLimbDrawZoraShopkeeper(GlobalContext* globalCtx, s32 limbInd void EnOssan_DrawZoraShopkeeper(Actor* thisx, GlobalContext* globalCtx) { static void* sZoraShopkeeperEyeTextures[] = { gZoraEyeOpenTex, gZoraEyeHalfTex, gZoraEyeClosedTex }; - EnOssan* this = THIS; + EnOssan* this = (EnOssan*)thisx; s32 pad; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_oB1.c", 4506); @@ -2461,7 +2459,7 @@ void EnOssan_DrawZoraShopkeeper(Actor* thisx, GlobalContext* globalCtx) { void EnOssan_DrawPotionShopkeeper(Actor* thisx, GlobalContext* globalCtx) { static void* sPotionShopkeeperEyeTextures[] = { gPotionShopkeeperEyeOpenTex, gPotionShopkeeperEyeHalfTex, gPotionShopkeeperEyeClosedTex }; - EnOssan* this = THIS; + EnOssan* this = (EnOssan*)thisx; s32 pad; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_oB1.c", 4544); @@ -2478,7 +2476,7 @@ void EnOssan_DrawPotionShopkeeper(Actor* thisx, GlobalContext* globalCtx) { void EnOssan_DrawHappyMaskShopkeeper(Actor* thisx, GlobalContext* globalCtx) { static void* sHappyMaskShopkeeperEyeTextures[] = { gOsEyeClosedTex, gOsEyeOpenTex }; - EnOssan* this = THIS; + EnOssan* this = (EnOssan*)thisx; s32 pad; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_oB1.c", 4578); @@ -2498,7 +2496,7 @@ void EnOssan_DrawHappyMaskShopkeeper(Actor* thisx, GlobalContext* globalCtx) { void EnOssan_DrawBombchuShopkeeper(Actor* thisx, GlobalContext* globalCtx) { static void* sBombchuShopkeeperEyeTextures[] = { gBombchuShopkeeperEyeOpenTex, gBombchuShopkeeperEyeHalfTex, gBombchuShopkeeperEyeClosedTex }; - EnOssan* this = THIS; + EnOssan* this = (EnOssan*)thisx; s32 pad; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_oB1.c", 4611); 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 c06fc9469b..fdb92d4c01 100644 --- a/src/overlays/actors/ovl_En_Owl/z_en_owl.c +++ b/src/overlays/actors/ovl_En_Owl/z_en_owl.c @@ -12,8 +12,6 @@ #define FLAGS 0x00000019 -#define THIS ((EnOwl*)thisx) - void EnOwl_Init(Actor* thisx, GlobalContext* globalCtx); void EnOwl_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnOwl_Update(Actor* thisx, GlobalContext* globalCtx); @@ -107,7 +105,7 @@ static InitChainEntry sInitChain[] = { }; void EnOwl_Init(Actor* thisx, GlobalContext* globalCtx) { - EnOwl* this = THIS; + EnOwl* this = (EnOwl*)thisx; ColliderCylinder* collider; s32 owlType; s32 switchFlag; @@ -236,7 +234,7 @@ void EnOwl_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnOwl_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnOwl* this = THIS; + EnOwl* this = (EnOwl*)thisx; Collider_DestroyCylinder(globalCtx, &this->collider); } @@ -1079,7 +1077,7 @@ s32 func_80ACC624(EnOwl* this, GlobalContext* globalCtx) { void EnOwl_Update(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnOwl* this = THIS; + EnOwl* this = (EnOwl*)thisx; s16 phi_a1; Collider_UpdateCylinder(&this->actor, &this->collider); @@ -1269,7 +1267,7 @@ void EnOwl_Update(Actor* thisx, GlobalContext* globalCtx) { } s32 EnOwl_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** gfx, Vec3f* pos, Vec3s* rot, void* thisx) { - EnOwl* this = THIS; + EnOwl* this = (EnOwl*)thisx; switch (limbIndex) { case 3: @@ -1297,7 +1295,7 @@ s32 EnOwl_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** gfx, V } void EnOwl_PostLimbUpdate(GlobalContext* globalCtx, s32 limbIndex, Gfx** gfx, Vec3s* rot, void* thisx) { - EnOwl* this = THIS; + EnOwl* this = (EnOwl*)thisx; Vec3f vec; vec.z = 0.0f; @@ -1315,7 +1313,7 @@ void EnOwl_PostLimbUpdate(GlobalContext* globalCtx, s32 limbIndex, Gfx** gfx, Ve void EnOwl_Draw(Actor* thisx, GlobalContext* globalCtx) { static void* eyeTextures[] = { gObjOwlEyeOpenTex, gObjOwlEyeHalfTex, gObjOwlEyeClosedTex }; - EnOwl* this = THIS; + EnOwl* this = (EnOwl*)thisx; s32 pad; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_owl.c", 2247); 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 7477c78c22..e5fe469c07 100644 --- a/src/overlays/actors/ovl_En_Part/z_en_part.c +++ b/src/overlays/actors/ovl_En_Part/z_en_part.c @@ -10,8 +10,6 @@ #define FLAGS 0x00000010 -#define THIS ((EnPart*)thisx) - void EnPart_Init(Actor* thisx, GlobalContext* globalCtx); void EnPart_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnPart_Update(Actor* thisx, GlobalContext* globalCtx); @@ -241,7 +239,7 @@ void EnPart_Update(Actor* thisx, GlobalContext* globalCtx) { func_80ACDDE8, func_80ACE13C, func_80ACE5B8, func_80ACE5C8, func_80ACE7E8, }; - EnPart* this = THIS; + EnPart* this = (EnPart*)thisx; Actor_MoveForward(&this->actor); @@ -275,7 +273,7 @@ Gfx* func_80ACEAC0(GraphicsContext* gfxCtx, u8 primR, u8 primG, u8 primB, u8 env } void EnPart_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnPart* this = THIS; + EnPart* this = (EnPart*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_part.c", 647); 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 8e9a73e04d..0182a60bb2 100644 --- a/src/overlays/actors/ovl_En_Peehat/z_en_peehat.c +++ b/src/overlays/actors/ovl_En_Peehat/z_en_peehat.c @@ -5,8 +5,6 @@ #define FLAGS 0x01000015 -#define THIS ((EnPeehat*)thisx) - #define GROUND_HOVER_HEIGHT 75.0f #define MAX_LARVA 3 @@ -190,7 +188,7 @@ void EnPeehat_SetupAction(EnPeehat* this, EnPeehatActionFunc actionFunc) { } void EnPeehat_Init(Actor* thisx, GlobalContext* globalCtx) { - EnPeehat* this = THIS; + EnPeehat* this = (EnPeehat*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); Actor_SetScale(&this->actor, 36.0f * 0.001f); @@ -244,7 +242,7 @@ void EnPeehat_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnPeehat_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnPeehat* this = THIS; + EnPeehat* this = (EnPeehat*)thisx; EnPeehat* parent; Collider_DestroyCylinder(globalCtx, &this->colCylinder); @@ -922,7 +920,7 @@ void EnPeehat_Adult_CollisionCheck(EnPeehat* this, GlobalContext* globalCtx) { } void EnPeehat_Update(Actor* thisx, GlobalContext* globalCtx) { - EnPeehat* this = THIS; + EnPeehat* this = (EnPeehat*)thisx; s32 i; Player* player = GET_PLAYER(globalCtx); @@ -1006,7 +1004,7 @@ void EnPeehat_Update(Actor* thisx, GlobalContext* globalCtx) { s32 EnPeehat_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - EnPeehat* this = THIS; + EnPeehat* this = (EnPeehat*)thisx; if (limbIndex == 4) { rot->x = -this->bladeRot; @@ -1036,7 +1034,7 @@ s32 EnPeehat_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dLi void EnPeehat_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) { static Vec3f peahatBladeTip[] = { { 0.0f, 0.0f, 5500.0f }, { 0.0f, 0.0f, -5500.0f } }; - EnPeehat* this = THIS; + EnPeehat* this = (EnPeehat*)thisx; f32 damageYRot; if (limbIndex == 4) { @@ -1069,7 +1067,7 @@ void EnPeehat_Draw(Actor* thisx, GlobalContext* globalCtx) { static Vec3f D_80AD285C[] = { { 0.0f, 0.0f, -4500.0f }, { -4500.0f, 0.0f, 0.0f }, { 4500.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 4500.0f } }; - EnPeehat* this = THIS; + EnPeehat* this = (EnPeehat*)thisx; func_80093D18(globalCtx->state.gfxCtx); SkelAnime_DrawOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, EnPeehat_OverrideLimbDraw, 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 18f8193d7e..acecfab68a 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 @@ -9,8 +9,6 @@ #define FLAGS 0x00001090 -#define THIS ((EnPoDesert*)thisx) - void EnPoDesert_Init(Actor* thisx, GlobalContext* globalCtx); void EnPoDesert_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnPoDesert_Update(Actor* thisx, GlobalContext* globalCtx); @@ -61,7 +59,7 @@ static InitChainEntry sInitChain[] = { void EnPoDesert_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnPoDesert* this = THIS; + EnPoDesert* this = (EnPoDesert*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); SkelAnime_Init(globalCtx, &this->skelAnime, &gPoeFieldSkel, &gPoeFieldFloatAnim, this->jointTable, this->morphTable, @@ -83,7 +81,7 @@ void EnPoDesert_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnPoDesert_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnPoDesert* this = THIS; + EnPoDesert* this = (EnPoDesert*)thisx; LightContext_RemoveLight(globalCtx, &globalCtx->lightCtx, this->lightNode); Collider_DestroyCylinder(globalCtx, &this->collider); @@ -188,7 +186,7 @@ void EnPoDesert_Disappear(EnPoDesert* this, GlobalContext* globalCtx) { } void EnPoDesert_Update(Actor* thisx, GlobalContext* globalCtx) { - EnPoDesert* this = THIS; + EnPoDesert* this = (EnPoDesert*)thisx; s32 pad; SkelAnime_Update(&this->skelAnime); @@ -210,7 +208,7 @@ void EnPoDesert_Update(Actor* thisx, GlobalContext* globalCtx) { s32 EnPoDesert_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx, Gfx** gfxP) { - EnPoDesert* this = THIS; + EnPoDesert* this = (EnPoDesert*)thisx; f32 mtxScale; if (this->actionFunc == EnPoDesert_Disappear && limbIndex == 7) { @@ -227,7 +225,7 @@ void EnPoDesert_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dLis Gfx** gfxP) { static Vec3f baseLightPos = { 0.0f, 1400.0f, 0.0f }; - EnPoDesert* this = THIS; + EnPoDesert* this = (EnPoDesert*)thisx; f32 rand; Color_RGBA8 color; Vec3f lightPos; @@ -253,7 +251,7 @@ void EnPoDesert_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dLis } void EnPoDesert_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnPoDesert* this = THIS; + EnPoDesert* this = (EnPoDesert*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_po_desert.c", 559); func_80093D84(globalCtx->state.gfxCtx); 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 38efa39087..3655b94c59 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 @@ -10,8 +10,6 @@ #define FLAGS 0x00001035 -#define THIS ((EnPoField*)thisx) - void EnPoField_Init(Actor* thisx, GlobalContext* globalCtx); void EnPoField_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnPoField_Update(Actor* thisx, GlobalContext* globalCtx); @@ -148,7 +146,7 @@ static u8 sSpawnSwitchFlags[10]; static MtxF sLimb7Mtx; void EnPoField_Init(Actor* thisx, GlobalContext* globalCtx) { - EnPoField* this = THIS; + EnPoField* this = (EnPoField*)thisx; s32 pad; if (sNumSpawned != 10) { @@ -179,7 +177,7 @@ void EnPoField_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnPoField_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnPoField* this = THIS; + EnPoField* this = (EnPoField*)thisx; if (this->actor.params != 0xFF) { LightContext_RemoveLight(globalCtx, &globalCtx->lightCtx, this->lightNode); @@ -853,7 +851,7 @@ void func_80AD6330(EnPoField* this) { void EnPoField_Update(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnPoField* this = THIS; + EnPoField* this = (EnPoField*)thisx; EnPoField_TestForDamage(this, globalCtx); this->actionFunc(this, globalCtx); @@ -877,7 +875,7 @@ void EnPoField_Update(Actor* thisx, GlobalContext* globalCtx) { s32 EnPoField_OverrideLimbDraw2(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx, Gfx** gfxP) { - EnPoField* this = THIS; + EnPoField* this = (EnPoField*)thisx; if (this->lightColor.a == 0 || limbIndex == 7 || (this->actionFunc == EnPoField_Death && this->actionTimer >= 2)) { *dList = NULL; @@ -897,7 +895,7 @@ s32 EnPoField_OverrideLimbDraw2(GlobalContext* globalCtx, s32 limbIndex, Gfx** d } void EnPoField_PostLimDraw2(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx, Gfx** gfxP) { - EnPoField* this = THIS; + EnPoField* this = (EnPoField*)thisx; if (this->actionFunc == EnPoField_Death && this->actionTimer >= 2 && limbIndex == 8) { gSPMatrix((*gfxP)++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_po_field.c", 1916), @@ -923,7 +921,7 @@ void EnPoField_PostLimDraw2(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList } void EnPoField_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnPoField* this = THIS; + EnPoField* this = (EnPoField*)thisx; EnPoFieldInfo* info = &sPoFieldInfo[this->actor.params]; if (this->actionFunc != EnPoField_WaitForSpawn) { @@ -962,7 +960,7 @@ void EnPoField_Draw(Actor* thisx, GlobalContext* globalCtx) { } void EnPoField_UpdateDead(Actor* thisx, GlobalContext* globalCtx) { - EnPoField* this = THIS; + EnPoField* this = (EnPoField*)thisx; this->actionFunc(this, globalCtx); if (this->actionFunc == EnPoField_SoulIdle) { @@ -972,7 +970,7 @@ void EnPoField_UpdateDead(Actor* thisx, GlobalContext* globalCtx) { } void EnPoField_DrawSoul(Actor* thisx, GlobalContext* globalCtx) { - EnPoField* this = THIS; + EnPoField* this = (EnPoField*)thisx; s32 pad; EnPoFieldInfo* info = &sPoFieldInfo[this->actor.params]; 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 73c02ca052..7fd9c9f941 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 @@ -10,8 +10,6 @@ #define FLAGS 0x00011019 -#define THIS ((EnPoRelay*)thisx) - void EnPoRelay_Init(Actor* thisx, GlobalContext* globalCtx); void EnPoRelay_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnPoRelay_Update(Actor* thisx, GlobalContext* globalCtx); @@ -87,7 +85,7 @@ static void* sEyesTextures[] = { }; void EnPoRelay_Init(Actor* thisx, GlobalContext* globalCtx) { - EnPoRelay* this = THIS; + EnPoRelay* this = (EnPoRelay*)thisx; s32 temp; Actor_ProcessInitChain(&this->actor, sInitChain); @@ -113,7 +111,7 @@ void EnPoRelay_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnPoRelay_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnPoRelay* this = THIS; + EnPoRelay* this = (EnPoRelay*)thisx; LightContext_RemoveLight(globalCtx, &globalCtx->lightCtx, this->lightNode); Collider_DestroyCylinder(globalCtx, &this->collider); @@ -351,7 +349,7 @@ void EnPoRelay_DisappearAndReward(EnPoRelay* this, GlobalContext* globalCtx) { } void EnPoRelay_Update(Actor* thisx, GlobalContext* globalCtx) { - EnPoRelay* this = THIS; + EnPoRelay* this = (EnPoRelay*)thisx; s32 pad; SkelAnime_Update(&this->skelAnime); @@ -375,7 +373,7 @@ void EnPoRelay_Update(Actor* thisx, GlobalContext* globalCtx) { } void EnPoRelay_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) { - EnPoRelay* this = THIS; + EnPoRelay* this = (EnPoRelay*)thisx; if (limbIndex == 14) { f32 rand; @@ -404,7 +402,7 @@ void EnPoRelay_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList } void EnPoRelay_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnPoRelay* this = THIS; + EnPoRelay* this = (EnPoRelay*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_po_relay.c", 940); func_80093D18(globalCtx->state.gfxCtx); 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 46840b8fc3..77671cc1bf 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 @@ -10,8 +10,6 @@ #define FLAGS 0x00005215 -#define THIS ((EnPoSisters*)thisx) - void EnPoSisters_Init(Actor* thisx, GlobalContext* globalCtx); void EnPoSisters_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnPoSisters_Update(Actor* thisx, GlobalContext* globalCtx); @@ -176,7 +174,7 @@ static Color_RGBA8 D_80ADD7E8[4] = { static Vec3f D_80ADD7F8 = { 1000.0f, -1700.0f, 0.0f }; void EnPoSisters_Init(Actor* thisx, GlobalContext* globalCtx) { - EnPoSisters* this = THIS; + EnPoSisters* this = (EnPoSisters*)thisx; s32 pad; Actor_ProcessInitChain(&this->actor, sInitChain); @@ -223,7 +221,7 @@ void EnPoSisters_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnPoSisters_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnPoSisters* this = THIS; + EnPoSisters* this = (EnPoSisters*)thisx; LightContext_RemoveLight(globalCtx, &globalCtx->lightCtx, this->lightNode); if (this->unk_194 == 0 && this->unk_195 == 0) { @@ -1174,7 +1172,7 @@ void func_80ADC10C(EnPoSisters* this, GlobalContext* globalCtx) { void EnPoSisters_Update(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnPoSisters* this = THIS; + EnPoSisters* this = (EnPoSisters*)thisx; s16 temp; if (this->collider.base.atFlags & AT_HIT) { @@ -1270,7 +1268,7 @@ void func_80ADC55C(EnPoSisters* this) { s32 EnPoSisters_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx, Gfx** gfxP) { - EnPoSisters* this = THIS; + EnPoSisters* this = (EnPoSisters*)thisx; Color_RGBA8* color; if (limbIndex == 1 && (this->unk_199 & 0x40)) { @@ -1298,7 +1296,7 @@ s32 EnPoSisters_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** void EnPoSisters_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx, Gfx** gfxP) { - EnPoSisters* this = THIS; + EnPoSisters* this = (EnPoSisters*)thisx; s32 i; s32 pad; @@ -1340,7 +1338,7 @@ void EnPoSisters_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dLi } void EnPoSisters_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnPoSisters* this = THIS; + EnPoSisters* this = (EnPoSisters*)thisx; u8 phi_s5; f32 phi_f20; s32 i; 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 42c8aadfc1..04016acfe6 100644 --- a/src/overlays/actors/ovl_En_Poh/z_en_poh.c +++ b/src/overlays/actors/ovl_En_Poh/z_en_poh.c @@ -10,8 +10,6 @@ #define FLAGS 0x00001015 -#define THIS ((EnPoh*)thisx) - void EnPoh_Init(Actor* thisx, GlobalContext* globalCtx); void EnPoh_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnPoh_Update(Actor* thisx, GlobalContext* globalCtx); @@ -186,7 +184,7 @@ static Vec3f D_80AE1B6C = { 0.0f, 0.0f, 0.0f }; void EnPoh_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad; EnItem00* collectible; - EnPoh* this = THIS; + EnPoh* this = (EnPoh*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f); @@ -247,7 +245,7 @@ void EnPoh_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnPoh_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnPoh* this = THIS; + EnPoh* this = (EnPoh*)thisx; LightContext_RemoveLight(globalCtx, &globalCtx->lightCtx, this->lightNode); Collider_DestroyJntSph(globalCtx, &this->colliderSph); @@ -908,7 +906,7 @@ void EnPoh_UpdateVisibility(EnPoh* this) { } void EnPoh_Update(Actor* thisx, GlobalContext* globalCtx) { - EnPoh* this = THIS; + EnPoh* this = (EnPoh*)thisx; if (Object_IsLoaded(&globalCtx->objectCtx, this->objectIdx) != 0) { this->actor.objBankIndex = this->objectIdx; @@ -987,7 +985,7 @@ void func_80AE089C(EnPoh* this) { } void EnPoh_UpdateLiving(Actor* thisx, GlobalContext* globalCtx) { - EnPoh* this = THIS; + EnPoh* this = (EnPoh*)thisx; s32 pad; Vec3f vec; s32 sp38; @@ -1029,7 +1027,7 @@ void EnPoh_UpdateLiving(Actor* thisx, GlobalContext* globalCtx) { s32 EnPoh_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx, Gfx** gfxP) { - EnPoh* this = THIS; + EnPoh* this = (EnPoh*)thisx; if ((this->lightColor.a == 0 || limbIndex == this->info->unk_6) || (this->actionFunc == func_80ADF15C && this->unk_198 >= 2)) { @@ -1046,7 +1044,7 @@ s32 EnPoh_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, } void EnPoh_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx, Gfx** gfxP) { - EnPoh* this = THIS; + EnPoh* this = (EnPoh*)thisx; Collider_UpdateSpheres(limbIndex, &this->colliderSph); if (this->actionFunc == func_80ADF15C && this->unk_198 >= 2 && limbIndex == this->info->unk_7) { @@ -1073,7 +1071,7 @@ void EnPoh_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Ve } void EnPoh_DrawRegular(Actor* thisx, GlobalContext* globalCtx) { - EnPoh* this = THIS; + EnPoh* this = (EnPoh*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_poh.c", 2629); func_80AE067C(this); @@ -1100,7 +1098,7 @@ void EnPoh_DrawRegular(Actor* thisx, GlobalContext* globalCtx) { } void EnPoh_DrawComposer(Actor* thisx, GlobalContext* globalCtx) { - EnPoh* this = THIS; + EnPoh* this = (EnPoh*)thisx; Color_RGBA8* sp90; Color_RGBA8* phi_t0; @@ -1155,7 +1153,7 @@ void EnPoh_DrawComposer(Actor* thisx, GlobalContext* globalCtx) { } void EnPoh_UpdateDead(Actor* thisx, GlobalContext* globalCtx) { - EnPoh* this = THIS; + EnPoh* this = (EnPoh*)thisx; this->actionFunc(this, globalCtx); if (this->actionFunc != EnPoh_Death) { @@ -1165,7 +1163,7 @@ void EnPoh_UpdateDead(Actor* thisx, GlobalContext* globalCtx) { } void EnPoh_DrawSoul(Actor* thisx, GlobalContext* globalCtx) { - EnPoh* this = THIS; + EnPoh* this = (EnPoh*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_poh.c", 2833); 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 97064fda3e..5383163ba4 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 @@ -9,8 +9,6 @@ #define FLAGS 0x00000010 -#define THIS ((EnPubox*)thisx) - void EnPubox_Init(Actor* thisx, GlobalContext* globalCtx); void EnPubox_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnPubox_Update(Actor* thisx, GlobalContext* globalCtx); @@ -30,7 +28,7 @@ const ActorInit En_Pu_box_InitVars = { void EnPubox_Init(Actor* thisx, GlobalContext* globalCtx) { CollisionHeader* colHeader = NULL; - EnPubox* this = THIS; + EnPubox* this = (EnPubox*)thisx; switch (thisx->params) { case 0: @@ -62,13 +60,13 @@ void EnPubox_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnPubox_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnPubox* this = THIS; + EnPubox* this = (EnPubox*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); } void EnPubox_Update(Actor* thisx, GlobalContext* globalCtx) { - EnPubox* this = THIS; + EnPubox* this = (EnPubox*)thisx; thisx->speedXZ += this->dyna.unk_150; thisx->world.rot.y = this->dyna.unk_158; 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 46aa62227c..665903c03e 100644 --- a/src/overlays/actors/ovl_En_Rd/z_en_rd.c +++ b/src/overlays/actors/ovl_En_Rd/z_en_rd.c @@ -3,8 +3,6 @@ #define FLAGS 0x00000415 -#define THIS ((EnRd*)thisx) - void EnRd_Init(Actor* thisx, GlobalContext* globalCtx); void EnRd_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnRd_Update(Actor* thisx, GlobalContext* globalCtx); @@ -123,7 +121,7 @@ void EnRd_SetupAction(EnRd* this, EnRdActionFunc actionFunc) { } void EnRd_Init(Actor* thisx, GlobalContext* globalCtx) { - EnRd* this = THIS; + EnRd* this = (EnRd*)thisx; Actor_ProcessInitChain(thisx, sInitChain); thisx->targetMode = 0; @@ -170,7 +168,7 @@ void EnRd_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnRd_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnRd* this = THIS; + EnRd* this = (EnRd*)thisx; if (gSaveContext.sunsSongState != SUNSSONG_INACTIVE) { gSaveContext.sunsSongState = SUNSSONG_INACTIVE; @@ -788,7 +786,7 @@ void func_80AE4114(EnRd* this, GlobalContext* globalCtx) { void EnRd_Update(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnRd* this = THIS; + EnRd* this = (EnRd*)thisx; Player* player = GET_PLAYER(globalCtx); s32 pad2; @@ -831,7 +829,7 @@ void EnRd_Update(Actor* thisx, GlobalContext* globalCtx) { s32 EnRd_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx, Gfx** gfx) { - EnRd* this = THIS; + EnRd* this = (EnRd*)thisx; if (limbIndex == 23) { rot->y += this->unk_30E; @@ -843,7 +841,7 @@ s32 EnRd_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, void EnRd_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx, Gfx** gfx) { Vec3f sp2C = D_80AE4940; - EnRd* this = THIS; + EnRd* this = (EnRd*)thisx; s32 idx = -1; Vec3f destPos; @@ -892,7 +890,7 @@ void EnRd_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec void EnRd_Draw(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnRd* this = THIS; + EnRd* this = (EnRd*)thisx; Vec3f thisPos = thisx->world.pos; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_rd.c", 1679); 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 cbb5b2618a..18c5eda86a 100644 --- a/src/overlays/actors/ovl_En_Reeba/z_en_reeba.c +++ b/src/overlays/actors/ovl_En_Reeba/z_en_reeba.c @@ -12,8 +12,6 @@ #define FLAGS 0x08000015 -#define THIS ((EnReeba*)thisx) - void EnReeba_Init(Actor* thisx, GlobalContext* globalCtx); void EnReeba_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnReeba_Update(Actor* thisx, GlobalContext* globalCtx); @@ -101,7 +99,7 @@ static ColliderCylinderInit sCylinderInit = { void EnReeba_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnReeba* this = THIS; + EnReeba* this = (EnReeba*)thisx; s32 surfaceType; this->actor.naviEnemyId = 0x47; @@ -145,7 +143,7 @@ void EnReeba_Init(Actor* thisx, GlobalContext* globalCtx) { void EnReeba_Destroy(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnReeba* this = THIS; + EnReeba* this = (EnReeba*)thisx; Collider_DestroyCylinder(globalCtx, &this->collider); @@ -576,7 +574,7 @@ void func_80AE5EDC(EnReeba* this, GlobalContext* globalCtx) { void EnReeba_Update(Actor* thisx, GlobalContext* globalCtx2) { GlobalContext* globalCtx = globalCtx2; - EnReeba* this = THIS; + EnReeba* this = (EnReeba*)thisx; Player* player = GET_PLAYER(globalCtx); func_80AE5EDC(this, globalCtx); @@ -651,7 +649,7 @@ void EnReeba_Update(Actor* thisx, GlobalContext* globalCtx2) { void EnReeba_Draw(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnReeba* this = THIS; + EnReeba* this = (EnReeba*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_reeba.c", 1062); 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 6516a902be..c0927b41ed 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 @@ -8,8 +8,6 @@ #define FLAGS 0x00000030 -#define THIS ((EnRiverSound*)thisx) - void EnRiverSound_Init(Actor* thisx, GlobalContext* globalCtx); void EnRiverSound_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnRiverSound_Update(Actor* thisx, GlobalContext* globalCtx); @@ -28,7 +26,7 @@ const ActorInit En_River_Sound_InitVars = { }; void EnRiverSound_Init(Actor* thisx, GlobalContext* globalCtx) { - EnRiverSound* this = THIS; + EnRiverSound* this = (EnRiverSound*)thisx; this->playSound = 0; this->pathIndex = (this->actor.params >> 8) & 0xFF; @@ -48,7 +46,7 @@ void EnRiverSound_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnRiverSound_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnRiverSound* this = THIS; + EnRiverSound* this = (EnRiverSound*)thisx; if (this->actor.params == RS_SARIAS_SONG) { Audio_ClearSariaBgmAtPos(&this->actor.projectedPos); @@ -168,7 +166,7 @@ void EnRiverSound_Update(Actor* thisx, GlobalContext* globalCtx) { Path* path; Vec3f* pos; Player* player = GET_PLAYER(globalCtx); - EnRiverSound* this = THIS; + EnRiverSound* this = (EnRiverSound*)thisx; s32 sp34; if ((thisx->params == RS_UNK_0) || (thisx->params == RS_UNK_4) || (thisx->params == RS_UNK_5)) { @@ -230,7 +228,7 @@ void EnRiverSound_Draw(Actor* thisx, GlobalContext* globalCtx) { NA_SE_EV_COW_CRY_LV - SFX_FLAG, }; static f32 soundPitch[] = { 0.7f, 1.0f, 1.4f }; - EnRiverSound* this = THIS; + EnRiverSound* this = (EnRiverSound*)thisx; if (!(this->playSound)) { this->playSound = true; 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 79b96f2867..e59ba37cab 100644 --- a/src/overlays/actors/ovl_En_Rl/z_en_rl.c +++ b/src/overlays/actors/ovl_En_Rl/z_en_rl.c @@ -10,8 +10,6 @@ #define FLAGS 0x00000010 -#define THIS ((EnRl*)thisx) - void EnRl_Init(Actor* thisx, GlobalContext* globalCtx); void EnRl_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnRl_Update(Actor* thisx, GlobalContext* globalCtx); @@ -32,7 +30,7 @@ void func_80AE7D94(EnRl* this, GlobalContext* globalCtx); static void* D_80AE81A0[] = { object_rl_Tex_003620, object_rl_Tex_003960, object_rl_Tex_003B60 }; void EnRl_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnRl* this = THIS; + EnRl* this = (EnRl*)thisx; SkelAnime_Free(&this->skelAnime, globalCtx); } @@ -324,7 +322,7 @@ static EnRlActionFunc sActionFuncs[] = { }; void EnRl_Update(Actor* thisx, GlobalContext* globalCtx) { - EnRl* this = THIS; + EnRl* this = (EnRl*)thisx; if ((this->action < 0) || (this->action > 7) || (sActionFuncs[this->action] == NULL)) { osSyncPrintf(VT_FGCOL(RED) "メインモードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST); @@ -334,7 +332,7 @@ void EnRl_Update(Actor* thisx, GlobalContext* globalCtx) { } void EnRl_Init(Actor* thisx, GlobalContext* globalCtx) { - EnRl* this = THIS; + EnRl* this = (EnRl*)thisx; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 50.0f); if (this->actor.params == 2) { @@ -373,7 +371,7 @@ static EnRlDrawFunc sDrawFuncs[] = { }; void EnRl_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnRl* this = THIS; + EnRl* this = (EnRl*)thisx; if (this->drawConfig < 0 || this->drawConfig >= 3 || sDrawFuncs[this->drawConfig] == NULL) { osSyncPrintf(VT_FGCOL(RED) "描画モードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST); 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 8655e018f0..a06f431eb1 100644 --- a/src/overlays/actors/ovl_En_Rr/z_en_rr.c +++ b/src/overlays/actors/ovl_En_Rr/z_en_rr.c @@ -10,8 +10,6 @@ #define FLAGS 0x00000435 -#define THIS ((EnRr*)thisx) - #define RR_MESSAGE_SHIELD (1 << 0) #define RR_MESSAGE_TUNIC (1 << 1) #define RR_MOUTH 4 @@ -164,7 +162,7 @@ static InitChainEntry sInitChain[] = { void EnRr_Init(Actor* thisx, GlobalContext* globalCtx2) { GlobalContext* globalCtx = globalCtx2; - EnRr* this = THIS; + EnRr* this = (EnRr*)thisx; s32 i; Actor_ProcessInitChain(&this->actor, sInitChain); @@ -201,7 +199,7 @@ void EnRr_Init(Actor* thisx, GlobalContext* globalCtx2) { void EnRr_Destroy(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnRr* this = THIS; + EnRr* this = (EnRr*)thisx; Collider_DestroyCylinder(globalCtx, &this->collider1); Collider_DestroyCylinder(globalCtx, &this->collider2); @@ -758,7 +756,7 @@ void EnRr_Stunned(EnRr* this, GlobalContext* globalCtx) { void EnRr_Update(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnRr* this = THIS; + EnRr* this = (EnRr*)thisx; s32 i; this->frameCount++; @@ -842,7 +840,7 @@ static Vec3f sEffectOffsets[] = { void EnRr_Draw(Actor* thisx, GlobalContext* globalCtx) { s32 pad; Vec3f zeroVec; - EnRr* this = THIS; + EnRr* this = (EnRr*)thisx; s32 i; Mtx* segMtx = Graph_Alloc(globalCtx->state.gfxCtx, 4 * sizeof(Mtx)); 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 d59e6a3aa3..9f81904845 100644 --- a/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c +++ b/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c @@ -10,8 +10,6 @@ #define FLAGS 0x04000011 -#define THIS ((EnRu1*)thisx) - void EnRu1_Init(Actor* thisx, GlobalContext* globalCtx); void EnRu1_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnRu1_Update(Actor* thisx, GlobalContext* globalCtx); @@ -171,7 +169,7 @@ void func_80AEACDC(EnRu1* this, GlobalContext* globalCtx) { } void func_80AEAD20(Actor* thisx, GlobalContext* globalCtx) { - EnRu1* this = THIS; + EnRu1* this = (EnRu1*)thisx; Collider_InitCylinder(globalCtx, &this->collider); Collider_SetCylinderType1(globalCtx, &this->collider, &this->actor, &sCylinderInit1); @@ -202,7 +200,7 @@ u8 func_80AEADF0(EnRu1* this) { } void EnRu1_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnRu1* this = THIS; + EnRu1* this = (EnRu1*)thisx; EnRu1_DestroyColliders(this, globalCtx); } @@ -2207,7 +2205,7 @@ void func_80AF0050(EnRu1* this, GlobalContext* globalCtx) { } void EnRu1_Update(Actor* thisx, GlobalContext* globalCtx) { - EnRu1* this = THIS; + EnRu1* this = (EnRu1*)thisx; if (this->action < 0 || this->action >= ARRAY_COUNT(sActionFuncs) || sActionFuncs[this->action] == NULL) { // "Main mode is improper!" @@ -2220,7 +2218,7 @@ void EnRu1_Update(Actor* thisx, GlobalContext* globalCtx) { void EnRu1_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnRu1* this = THIS; + EnRu1* this = (EnRu1*)thisx; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f); SkelAnime_InitFlex(globalCtx, &this->skelAnime, &gRutoChildSkel, NULL, this->jointTable, this->morphTable, 17); @@ -2276,7 +2274,7 @@ void func_80AF0278(EnRu1* this, GlobalContext* globalCtx, s32 limbIndex, Vec3s* s32 EnRu1_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx, Gfx** gfx) { - EnRu1* this = THIS; + EnRu1* this = (EnRu1*)thisx; if ((this->unk_290 < 0) || (this->unk_290 > 0) || (*sPreLimbDrawFuncs[this->unk_290] == NULL)) { // "Neck rotation mode is improper!" @@ -2288,7 +2286,7 @@ s32 EnRu1_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, } void EnRu1_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx, Gfx** gfx) { - EnRu1* this = THIS; + EnRu1* this = (EnRu1*)thisx; Vec3f vec1; Vec3f vec2; @@ -2358,7 +2356,7 @@ void EnRu1_DrawXlu(EnRu1* this, GlobalContext* globalCtx) { } void EnRu1_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnRu1* this = THIS; + EnRu1* this = (EnRu1*)thisx; if (this->drawConfig < 0 || this->drawConfig >= ARRAY_COUNT(sDrawFuncs) || sDrawFuncs[this->drawConfig] == 0) { // "Draw mode is improper!" 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 e71470b6b7..2fe7d2772b 100644 --- a/src/overlays/actors/ovl_En_Ru2/z_en_ru2.c +++ b/src/overlays/actors/ovl_En_Ru2/z_en_ru2.c @@ -11,8 +11,6 @@ #define FLAGS 0x00000010 -#define THIS ((EnRu2*)thisx) - void EnRu2_Init(Actor* thisx, GlobalContext* globalCtx); void EnRu2_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnRu2_Update(Actor* thisx, GlobalContext* globalCtx); @@ -92,7 +90,7 @@ const ActorInit En_Ru2_InitVars = { }; void func_80AF2550(Actor* thisx, GlobalContext* globalCtx) { - EnRu2* this = THIS; + EnRu2* this = (EnRu2*)thisx; Collider_InitCylinder(globalCtx, &this->collider); Collider_SetCylinderType1(globalCtx, &this->collider, &this->actor, &sCylinderInit); @@ -106,7 +104,7 @@ void func_80AF259C(EnRu2* this, GlobalContext* globalCtx) { } void EnRu2_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnRu2* this = THIS; + EnRu2* this = (EnRu2*)thisx; Collider_DestroyCylinder(globalCtx, &this->collider); } @@ -756,7 +754,7 @@ void func_80AF3D60(EnRu2* this, GlobalContext* globalCtx) { } void EnRu2_Update(Actor* thisx, GlobalContext* globalCtx) { - EnRu2* this = THIS; + EnRu2* this = (EnRu2*)thisx; if ((this->action < 0) || (this->action >= ARRAY_COUNT(sActionFuncs)) || (sActionFuncs[this->action] == NULL)) { // "Main Mode is improper!" @@ -767,7 +765,7 @@ void EnRu2_Update(Actor* thisx, GlobalContext* globalCtx) { } void EnRu2_Init(Actor* thisx, GlobalContext* globalCtx) { - EnRu2* this = THIS; + EnRu2* this = (EnRu2*)thisx; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f); func_80AF2550(thisx, globalCtx); @@ -817,7 +815,7 @@ void func_80AF3F20(EnRu2* this, GlobalContext* globalCtx) { } void EnRu2_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnRu2* this = THIS; + EnRu2* this = (EnRu2*)thisx; if ((this->drawConfig < 0) || (this->drawConfig >= ARRAY_COUNT(sDrawFuncs)) || (sDrawFuncs[this->drawConfig] == 0)) { 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 991d71c6ab..1c979b63f9 100644 --- a/src/overlays/actors/ovl_En_Sa/z_en_sa.c +++ b/src/overlays/actors/ovl_En_Sa/z_en_sa.c @@ -6,8 +6,6 @@ #define FLAGS 0x02000019 -#define THIS ((EnSa*)thisx) - void EnSa_Init(Actor* thisx, GlobalContext* globalCtx); void EnSa_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnSa_Update(Actor* thisx, GlobalContext* globalCtx); @@ -113,7 +111,7 @@ s16 func_80AF5560(EnSa* this, GlobalContext* globalCtx) { } u16 func_80AF55E0(GlobalContext* globalCtx, Actor* thisx) { - EnSa* this = THIS; + EnSa* this = (EnSa*)thisx; u16 reaction = Text_GetFaceReaction(globalCtx, 0x10); if (reaction != 0) { @@ -154,7 +152,7 @@ u16 func_80AF55E0(GlobalContext* globalCtx, Actor* thisx) { s16 func_80AF56F4(GlobalContext* globalCtx, Actor* thisx) { s16 ret = 1; - EnSa* this = THIS; + EnSa* this = (EnSa*)thisx; switch (func_80AF5560(this, globalCtx)) { case TEXT_STATE_CLOSING: @@ -445,7 +443,7 @@ void func_80AF6170(CsCmdActorAction* csAction, Vec3f* dst) { } void EnSa_Init(Actor* thisx, GlobalContext* globalCtx) { - EnSa* this = THIS; + EnSa* this = (EnSa*)thisx; s32 pad; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 12.0f); @@ -499,7 +497,7 @@ void EnSa_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnSa_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnSa* this = THIS; + EnSa* this = (EnSa*)thisx; Collider_DestroyCylinder(globalCtx, &this->collider); } @@ -687,7 +685,7 @@ void func_80AF6B20(EnSa* this, GlobalContext* globalCtx) { } void EnSa_Update(Actor* thisx, GlobalContext* globalCtx) { - EnSa* this = THIS; + EnSa* this = (EnSa*)thisx; s32 pad; Collider_UpdateCylinder(&this->actor, &this->collider); @@ -727,7 +725,7 @@ void EnSa_Update(Actor* thisx, GlobalContext* globalCtx) { s32 EnSa_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx, Gfx** gfx) { - EnSa* this = THIS; + EnSa* this = (EnSa*)thisx; s32 pad; Vec3s sp18; @@ -753,7 +751,7 @@ s32 EnSa_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, } void EnSa_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx, Gfx** gfx) { - EnSa* this = THIS; + EnSa* this = (EnSa*)thisx; Vec3f D_80AF7454 = { 400.0, 0.0f, 0.0f }; if (limbIndex == 16) { @@ -769,7 +767,7 @@ void EnSa_Draw(Actor* thisx, GlobalContext* globalCtx) { static void* eyeTextures[] = { gSariaEyeOpenTex, gSariaEyeHalfTex, gSariaEyeClosedTex, gSariaEyeSuprisedTex, gSariaEyeSadTex, }; - EnSa* this = THIS; + EnSa* this = (EnSa*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_sa.c", 1444); 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 361e7e1591..1623761b54 100644 --- a/src/overlays/actors/ovl_En_Sb/z_en_sb.c +++ b/src/overlays/actors/ovl_En_Sb/z_en_sb.c @@ -10,8 +10,6 @@ #define FLAGS 0x00000005 -#define THIS ((EnSb*)thisx) - void EnSb_Init(Actor* thisx, GlobalContext* globalCtx); void EnSb_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnSb_Update(Actor* thisx, GlobalContext* globalCtx); @@ -108,7 +106,7 @@ typedef enum { } ShellbladeBehavior; void EnSb_Init(Actor* thisx, GlobalContext* globalCtx) { - EnSb* this = THIS; + EnSb* this = (EnSb*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); this->actor.colChkInfo.damageTable = sDamageTable; @@ -129,7 +127,7 @@ void EnSb_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnSb_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnSb* this = THIS; + EnSb* this = (EnSb*)thisx; SkelAnime_Free(&this->skelAnime, globalCtx); Collider_DestroyCylinder(globalCtx, &this->collider); } @@ -442,7 +440,7 @@ s32 EnSb_UpdateDamage(EnSb* this, GlobalContext* globalCtx) { } void EnSb_Update(Actor* thisx, GlobalContext* globalCtx) { - EnSb* this = THIS; + EnSb* this = (EnSb*)thisx; s32 pad; if (this->isDead) { @@ -475,13 +473,13 @@ void EnSb_Update(Actor* thisx, GlobalContext* globalCtx) { } void EnSb_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) { - EnSb* this = THIS; + EnSb* this = (EnSb*)thisx; BodyBreak_SetInfo(&this->bodyBreak, limbIndex, 0, 6, 8, dList, BODYBREAK_OBJECT_DEFAULT); } void EnSb_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnSb* this = THIS; + EnSb* this = (EnSb*)thisx; Vec3f flamePos; Vec3f* offset; s16 fireDecr; 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 de41f50e8b..d24aeefe77 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 @@ -8,8 +8,6 @@ #define FLAGS 0x00000000 -#define THIS ((EnSceneChange*)thisx) - void EnSceneChange_Init(Actor* thisx, GlobalContext* globalCtx); void EnSceneChange_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnSceneChange_Update(Actor* thisx, GlobalContext* globalCtx); @@ -34,7 +32,7 @@ void EnSceneChange_SetupAction(EnSceneChange* this, EnSceneChangeActionFunc acti } void EnSceneChange_Init(Actor* thisx, GlobalContext* globalCtx) { - EnSceneChange* this = THIS; + EnSceneChange* this = (EnSceneChange*)thisx; EnSceneChange_SetupAction(this, EnSceneChange_DoNothing); } @@ -46,7 +44,7 @@ void EnSceneChange_DoNothing(EnSceneChange* this, GlobalContext* globalCtx) { } void EnSceneChange_Update(Actor* thisx, GlobalContext* globalCtx) { - EnSceneChange* this = THIS; + EnSceneChange* this = (EnSceneChange*)thisx; this->actionFunc(this, 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 0fbafc7cd0..edf1873646 100644 --- a/src/overlays/actors/ovl_En_Sda/z_en_sda.c +++ b/src/overlays/actors/ovl_En_Sda/z_en_sda.c @@ -8,8 +8,6 @@ #define FLAGS 0x00000030 -#define THIS ((EnSda*)thisx) - void EnSda_Init(Actor* thisx, GlobalContext* globalCtx); void EnSda_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnSda_Update(Actor* thisx, GlobalContext* globalCtx); @@ -98,7 +96,7 @@ void EnSda_Destroy(Actor* thisx, GlobalContext* globalCtx) { void EnSda_Update(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnSda* this = THIS; + EnSda* this = (EnSda*)thisx; Player* player; osSyncPrintf("SDA MOVE\n"); @@ -115,7 +113,7 @@ void EnSda_Update(Actor* thisx, GlobalContext* globalCtx) { } void EnSda_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnSda* this = THIS; + EnSda* this = (EnSda*)thisx; Player* player; u8* shadowTexture = Graph_Alloc(globalCtx->state.gfxCtx, 0x1000); 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 334f43fff0..8370bcc7d1 100644 --- a/src/overlays/actors/ovl_En_Shopnuts/z_en_shopnuts.c +++ b/src/overlays/actors/ovl_En_Shopnuts/z_en_shopnuts.c @@ -3,8 +3,6 @@ #define FLAGS 0x00000005 -#define THIS ((EnShopnuts*)thisx) - void EnShopnuts_Init(Actor* thisx, GlobalContext* globalCtx); void EnShopnuts_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnShopnuts_Update(Actor* thisx, GlobalContext* globalCtx); @@ -59,7 +57,7 @@ static InitChainEntry sInitChain[] = { }; void EnShopnuts_Init(Actor* thisx, GlobalContext* globalCtx) { - EnShopnuts* this = THIS; + EnShopnuts* this = (EnShopnuts*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 35.0f); @@ -80,7 +78,7 @@ void EnShopnuts_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnShopnuts_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnShopnuts* this = THIS; + EnShopnuts* this = (EnShopnuts*)thisx; Collider_DestroyCylinder(globalCtx, &this->collider); } @@ -238,7 +236,7 @@ void EnShopnuts_ColliderCheck(EnShopnuts* this, GlobalContext* globalCtx) { } void EnShopnuts_Update(Actor* thisx, GlobalContext* globalCtx) { - EnShopnuts* this = THIS; + EnShopnuts* this = (EnShopnuts*)thisx; EnShopnuts_ColliderCheck(this, globalCtx); this->actionFunc(this, globalCtx); @@ -259,7 +257,7 @@ void EnShopnuts_Update(Actor* thisx, GlobalContext* globalCtx) { s32 EnShopnuts_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - EnShopnuts* this = THIS; + EnShopnuts* this = (EnShopnuts*)thisx; if ((limbIndex == 9) && (this->actionFunc == EnShopnuts_ThrowNut)) { *dList = NULL; @@ -268,7 +266,7 @@ s32 EnShopnuts_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** d } void EnShopnuts_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) { - EnShopnuts* this = THIS; + EnShopnuts* this = (EnShopnuts*)thisx; f32 curFrame; f32 x; @@ -302,7 +300,7 @@ void EnShopnuts_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dLis } void EnShopnuts_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnShopnuts* this = THIS; + EnShopnuts* this = (EnShopnuts*)thisx; SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, EnShopnuts_OverrideLimbDraw, EnShopnuts_PostLimbDraw, this); 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 b4fe4baef9..ccb3eee0b1 100644 --- a/src/overlays/actors/ovl_En_Si/z_en_si.c +++ b/src/overlays/actors/ovl_En_Si/z_en_si.c @@ -8,8 +8,6 @@ #define FLAGS 0x00000201 -#define THIS ((EnSi*)thisx) - void EnSi_Init(Actor* thisx, GlobalContext* globalCtx); void EnSi_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnSi_Update(Actor* thisx, GlobalContext* globalCtx); @@ -55,7 +53,7 @@ const ActorInit En_Si_InitVars = { }; void EnSi_Init(Actor* thisx, GlobalContext* globalCtx) { - EnSi* this = THIS; + EnSi* this = (EnSi*)thisx; Collider_InitCylinder(globalCtx, &this->collider); Collider_SetCylinder(globalCtx, &this->collider, &this->actor, &sCylinderInit); @@ -67,7 +65,7 @@ void EnSi_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnSi_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnSi* this = THIS; + EnSi* this = (EnSi*)thisx; Collider_DestroyCylinder(globalCtx, &this->collider); } @@ -136,7 +134,7 @@ void func_80AFB950(EnSi* this, GlobalContext* globalCtx) { } void EnSi_Update(Actor* thisx, GlobalContext* globalCtx) { - EnSi* this = THIS; + EnSi* this = (EnSi*)thisx; Actor_MoveForward(&this->actor); Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 0.0f, 0.0f, 0.0f, 4); @@ -145,7 +143,7 @@ void EnSi_Update(Actor* thisx, GlobalContext* globalCtx) { } void EnSi_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnSi* this = THIS; + EnSi* this = (EnSi*)thisx; if (this->actionFunc != func_80AFB950) { func_8002ED80(&this->actor, globalCtx, 0); 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 eef956069a..1d06ccbbf5 100644 --- a/src/overlays/actors/ovl_En_Siofuki/z_en_siofuki.c +++ b/src/overlays/actors/ovl_En_Siofuki/z_en_siofuki.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000030 -#define THIS ((EnSiofuki*)thisx) - void EnSiofuki_Init(Actor* thisx, GlobalContext* globalCtx); void EnSiofuki_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnSiofuki_Update(Actor* thisx, GlobalContext* globalCtx); @@ -37,7 +35,7 @@ static InitChainEntry sInitChain[] = { }; void EnSiofuki_Init(Actor* thisx, GlobalContext* globalCtx) { - EnSiofuki* this = THIS; + EnSiofuki* this = (EnSiofuki*)thisx; s32 type; CollisionHeader* colHeader = NULL; s32 pad; @@ -101,7 +99,7 @@ void EnSiofuki_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnSiofuki_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnSiofuki* this = THIS; + EnSiofuki* this = (EnSiofuki*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); } @@ -272,13 +270,13 @@ void func_80AFC544(EnSiofuki* this, GlobalContext* globalCtx) { } void EnSiofuki_Update(Actor* thisx, GlobalContext* globalCtx) { - EnSiofuki* this = THIS; + EnSiofuki* this = (EnSiofuki*)thisx; this->actionFunc(this, globalCtx); } void EnSiofuki_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnSiofuki* this = THIS; + EnSiofuki* this = (EnSiofuki*)thisx; u32 x; u32 y; u32 gameplayFrames = globalCtx->gameplayFrames; 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 75d68d78d9..2162f13022 100644 --- a/src/overlays/actors/ovl_En_Skb/z_en_skb.c +++ b/src/overlays/actors/ovl_En_Skb/z_en_skb.c @@ -4,8 +4,6 @@ #define FLAGS 0x00000015 -#define THIS ((EnSkb*)thisx) - void EnSkb_Init(Actor* thisx, GlobalContext* globalCtx); void EnSkb_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnSkb_Update(Actor* thisx, GlobalContext* globalCtx); @@ -143,7 +141,7 @@ static InitChainEntry sInitChain[] = { }; void EnSkb_Init(Actor* thisx, GlobalContext* globalCtx) { - EnSkb* this = THIS; + EnSkb* this = (EnSkb*)thisx; s16 paramOffsetBody; s16 paramOffsetArm; @@ -175,7 +173,7 @@ void EnSkb_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnSkb_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnSkb* this = THIS; + EnSkb* this = (EnSkb*)thisx; if (this->actor.parent != NULL) { EnEncount1* spawner = (EnEncount1*)this->actor.parent; @@ -494,7 +492,7 @@ void func_80AFD968(EnSkb* this, GlobalContext* globalCtx) { } void EnSkb_Update(Actor* thisx, GlobalContext* globalCtx) { - EnSkb* this = THIS; + EnSkb* this = (EnSkb*)thisx; s32 pad; func_80AFD968(this, globalCtx); @@ -517,7 +515,7 @@ void EnSkb_Update(Actor* thisx, GlobalContext* globalCtx) { } s32 EnSkb_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - EnSkb* this = THIS; + EnSkb* this = (EnSkb*)thisx; s16 color; s16 pad[2]; @@ -538,7 +536,7 @@ s32 EnSkb_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, } void EnSkb_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) { - EnSkb* this = THIS; + EnSkb* this = (EnSkb*)thisx; Collider_UpdateSpheres(limbIndex, &this->collider); @@ -550,7 +548,7 @@ void EnSkb_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Ve } void EnSkb_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnSkb* this = THIS; + EnSkb* this = (EnSkb*)thisx; func_80093D18(globalCtx->state.gfxCtx); SkelAnime_DrawOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, EnSkb_OverrideLimbDraw, EnSkb_PostLimbDraw, &this->actor); 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 9fc3577c65..2fc48863af 100644 --- a/src/overlays/actors/ovl_En_Skj/z_en_skj.c +++ b/src/overlays/actors/ovl_En_Skj/z_en_skj.c @@ -4,8 +4,6 @@ #define FLAGS 0x02000015 -#define THIS ((EnSkj*)thisx) - void EnSkj_Init(Actor* thisx, GlobalContext* globalCtx); void EnSkj_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnSkj_Update(Actor* thisx, GlobalContext* globalCtx); @@ -379,7 +377,7 @@ void EnSkj_Init(Actor* thisx, GlobalContext* globalCtx2) { switch (type) { case 5: // Invisible on the small stump (sarias song)) sSmallStumpSkullKid.unk0 = 1; - sSmallStumpSkullKid.skullkid = THIS; + sSmallStumpSkullKid.skullkid = (EnSkj*)thisx; this->actor.destroy = NULL; this->actor.draw = NULL; this->actor.update = EnSkj_SariasSongShortStumpUpdate; @@ -390,7 +388,7 @@ void EnSkj_Init(Actor* thisx, GlobalContext* globalCtx2) { case 6: // Invisible on the short stump (ocarina game) sSmallStumpSkullKid.unk0 = 1; - sSmallStumpSkullKid.skullkid = THIS; + sSmallStumpSkullKid.skullkid = (EnSkj*)thisx; this->actor.destroy = NULL; this->actor.draw = NULL; this->actor.update = EnSkj_OcarinaMinigameShortStumpUpdate; @@ -468,7 +466,7 @@ void EnSkj_Init(Actor* thisx, GlobalContext* globalCtx2) { void EnSkj_Destroy(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnSkj* this = THIS; + EnSkj* this = (EnSkj*)thisx; Collider_DestroyCylinder(globalCtx, &this->collider); } @@ -1292,7 +1290,7 @@ void EnSkj_LeaveOcarinaGame(EnSkj* this, GlobalContext* globalCtx) { void EnSkj_Update(Actor* thisx, GlobalContext* globalCtx) { Vec3f dropPos; s32 pad; - EnSkj* this = THIS; + EnSkj* this = (EnSkj*)thisx; D_80B01EA0 = Actor_ProcessTalkRequest(&this->actor, globalCtx); @@ -1348,7 +1346,7 @@ void EnSkj_Update(Actor* thisx, GlobalContext* globalCtx) { } void EnSkj_SariasSongShortStumpUpdate(Actor* thisx, GlobalContext* globalCtx) { - EnSkj* this = THIS; + EnSkj* this = (EnSkj*)thisx; D_80B01EA0 = Actor_ProcessTalkRequest(&this->actor, globalCtx); @@ -1583,7 +1581,7 @@ void EnSkj_CleanupOcarinaGame(EnSkj* this, GlobalContext* globalCtx) { } void EnSkj_OcarinaMinigameShortStumpUpdate(Actor* thisx, GlobalContext* globalCtx) { - EnSkj* this = THIS; + EnSkj* this = (EnSkj*)thisx; D_80B01EA0 = Actor_ProcessTalkRequest(&this->actor, globalCtx); this->timer++; @@ -1651,7 +1649,7 @@ Gfx* EnSkj_OpaqueDL(GraphicsContext* gfxCtx, u32 alpha) { void EnSkj_Draw(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnSkj* this = THIS; + EnSkj* this = (EnSkj*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_skj.c", 2475); 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 ff2418f93b..632425769c 100644 --- a/src/overlays/actors/ovl_En_Skjneedle/z_en_skjneedle.c +++ b/src/overlays/actors/ovl_En_Skjneedle/z_en_skjneedle.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000205 -#define THIS ((EnSkjneedle*)thisx) - void EnSkjneedle_Init(Actor* thisx, GlobalContext* globalCtx); void EnSkjneedle_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnSkjneedle_Update(Actor* thisx, GlobalContext* globalCtx); @@ -55,7 +53,7 @@ static InitChainEntry sInitChain[] = { }; void EnSkjneedle_Init(Actor* thisx, GlobalContext* globalCtx) { - EnSkjneedle* this = THIS; + EnSkjneedle* this = (EnSkjneedle*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); Collider_InitCylinder(globalCtx, &this->collider); @@ -66,7 +64,7 @@ void EnSkjneedle_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnSkjneedle_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnSkjneedle* this = THIS; + EnSkjneedle* this = (EnSkjneedle*)thisx; Collider_DestroyCylinder(globalCtx, &this->collider); } @@ -80,7 +78,7 @@ s32 EnSkjNeedle_CollisionCheck(EnSkjneedle* this) { } void EnSkjneedle_Update(Actor* thisx, GlobalContext* globalCtx2) { - EnSkjneedle* this = THIS; + EnSkjneedle* this = (EnSkjneedle*)thisx; GlobalContext* globalCtx = globalCtx2; this->unusedTimer1++; 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 d6297c2cb3..586ea36481 100644 --- a/src/overlays/actors/ovl_En_Ssh/z_en_ssh.c +++ b/src/overlays/actors/ovl_En_Ssh/z_en_ssh.c @@ -3,8 +3,6 @@ #define FLAGS 0x00000035 -#define THIS ((EnSsh*)thisx) - #define SSH_STATE_STUNNED (1 << 0) #define SSH_STATE_GROUND_START (1 << 2) #define SSH_STATE_ATTACKED (1 << 3) @@ -604,7 +602,7 @@ void EnSsh_SetColliders(EnSsh* this, GlobalContext* globalCtx) { void EnSsh_Init(Actor* thisx, GlobalContext* globalCtx) { f32 frameCount; s32 pad; - EnSsh* this = THIS; + EnSsh* this = (EnSsh*)thisx; frameCount = Animation_GetLastFrame(&object_ssh_Anim_000304); if (this->actor.params == ENSSH_FATHER) { @@ -636,7 +634,7 @@ void EnSsh_Init(Actor* thisx, GlobalContext* globalCtx) { void EnSsh_Destroy(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnSsh* this = THIS; + EnSsh* this = (EnSsh*)thisx; s32 i; Effect_Delete(globalCtx, this->blureIdx); @@ -804,7 +802,7 @@ void EnSsh_Start(EnSsh* this, GlobalContext* globalCtx) { void EnSsh_Update(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnSsh* this = THIS; + EnSsh* this = (EnSsh*)thisx; EnSsh_UpdateColliderScale(this); if (EnSsh_CollisionCheck(this, globalCtx)) { @@ -831,7 +829,7 @@ void EnSsh_Update(Actor* thisx, GlobalContext* globalCtx) { } s32 EnSsh_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - EnSsh* this = THIS; + EnSsh* this = (EnSsh*)thisx; switch (limbIndex) { case 1: @@ -863,7 +861,7 @@ s32 EnSsh_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, } void EnSsh_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) { - EnSsh* this = THIS; + EnSsh* this = (EnSsh*)thisx; Collider_UpdateSpheres(limbIndex, &this->colSph); } @@ -875,7 +873,7 @@ void EnSsh_Draw(Actor* thisx, GlobalContext* globalCtx) { object_ssh_Tex_001060, }; s32 pad; - EnSsh* this = THIS; + EnSsh* this = (EnSsh*)thisx; EnSsh_CheckBodyStickHit(this, globalCtx); EnSsh_Sway(this); 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 78f520e8f4..956ba95853 100644 --- a/src/overlays/actors/ovl_En_St/z_en_st.c +++ b/src/overlays/actors/ovl_En_St/z_en_st.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000035 -#define THIS ((EnSt*)thisx) - void EnSt_Init(Actor* thisx, GlobalContext* globalCtx); void EnSt_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnSt_Update(Actor* thisx, GlobalContext* globalCtx); @@ -766,7 +764,7 @@ void EnSt_Sway(EnSt* this) { } void EnSt_Init(Actor* thisx, GlobalContext* globalCtx) { - EnSt* this = THIS; + EnSt* this = (EnSt*)thisx; s32 pad; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 14.0f); @@ -792,7 +790,7 @@ void EnSt_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnSt_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnSt* this = THIS; + EnSt* this = (EnSt*)thisx; s32 i; Effect_Delete(globalCtx, this->blureIdx); @@ -994,7 +992,7 @@ void EnSt_StartOnCeilingOrGround(EnSt* this, GlobalContext* globalCtx) { } void EnSt_Update(Actor* thisx, GlobalContext* globalCtx) { - EnSt* this = THIS; + EnSt* this = (EnSt*)thisx; s32 pad; Color_RGBA8 color = { 0, 0, 0, 0 }; @@ -1040,7 +1038,7 @@ void EnSt_Update(Actor* thisx, GlobalContext* globalCtx) { } s32 EnSt_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dListP, Vec3f* pos, Vec3s* rot, void* thisx) { - EnSt* this = THIS; + EnSt* this = (EnSt*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_st.c", 2260); switch (limbIndex) { @@ -1064,13 +1062,13 @@ s32 EnSt_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dListP, } void EnSt_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dListP, Vec3s* rot, void* thisx) { - EnSt* this = THIS; + EnSt* this = (EnSt*)thisx; Collider_UpdateSpheres(limbIndex, &this->colSph); } void EnSt_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnSt* this = THIS; + EnSt* this = (EnSt*)thisx; EnSt_CheckBodyStickHit(this, globalCtx); func_80093D18(globalCtx->state.gfxCtx); 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 fc7f041f73..2b98b59821 100644 --- a/src/overlays/actors/ovl_En_Sth/z_en_sth.c +++ b/src/overlays/actors/ovl_En_Sth/z_en_sth.c @@ -11,8 +11,6 @@ #define FLAGS 0x00000019 -#define THIS ((EnSth*)thisx) - void EnSth_Init(Actor* thisx, GlobalContext* globalCtx); void EnSth_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnSth_Update(Actor* thisx, GlobalContext* globalCtx); @@ -99,7 +97,7 @@ void EnSth_SetupAction(EnSth* this, EnSthActionFunc actionFunc) { } void EnSth_Init(Actor* thisx, GlobalContext* globalCtx) { - EnSth* this = THIS; + EnSth* this = (EnSth*)thisx; s16 objectId; s32 params = this->actor.params; @@ -171,7 +169,7 @@ void EnSth_SetupAfterObjectLoaded(EnSth* this, GlobalContext* globalCtx) { } void EnSth_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnSth* this = THIS; + EnSth* this = (EnSth*)thisx; Collider_DestroyCylinder(globalCtx, &this->collider); } @@ -312,13 +310,13 @@ void EnSth_ChildRewardObtainedWait(EnSth* this, GlobalContext* globalCtx) { } void EnSth_Update(Actor* thisx, GlobalContext* globalCtx) { - EnSth* this = THIS; + EnSth* this = (EnSth*)thisx; this->actionFunc(this, globalCtx); } void EnSth_Update2(Actor* thisx, GlobalContext* globalCtx) { - EnSth* this = THIS; + EnSth* this = (EnSth*)thisx; s32 pad; Collider_UpdateCylinder(&this->actor, &this->collider); @@ -341,7 +339,7 @@ void EnSth_Update2(Actor* thisx, GlobalContext* globalCtx) { } s32 EnSth_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - EnSth* this = THIS; + EnSth* this = (EnSth*)thisx; s32 temp_v1; @@ -365,7 +363,7 @@ s32 EnSth_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, } void EnSth_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) { - EnSth* this = THIS; + EnSth* this = (EnSth*)thisx; if (limbIndex == 15) { Matrix_MultVec3f(&D_80B0B49C, &this->actor.focus.pos); @@ -390,7 +388,7 @@ Gfx* EnSth_AllocColorDList(GraphicsContext* globalCtx, u8 envR, u8 envG, u8 envB } void EnSth_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnSth* this = THIS; + EnSth* this = (EnSth*)thisx; Color_RGB8* envColor1; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_sth.c", 2133); 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 1372cfe0d0..563ff29217 100644 --- a/src/overlays/actors/ovl_En_Stream/z_en_stream.c +++ b/src/overlays/actors/ovl_En_Stream/z_en_stream.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000010 -#define THIS ((EnStream*)thisx) - void EnStream_Init(Actor* thisx, GlobalContext* globalCtx); void EnStream_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnStream_Update(Actor* thisx, GlobalContext* globalCtx); @@ -38,7 +36,7 @@ void EnStream_SetupAction(EnStream* this, EnStreamActionFunc actionFunc) { } void EnStream_Init(Actor* thisx, GlobalContext* globalCtx) { - EnStream* this = THIS; + EnStream* this = (EnStream*)thisx; this->unk_150 = thisx->params & 0xFF; Actor_ProcessInitChain(thisx, sInitChain); @@ -123,7 +121,7 @@ void EnStream_WaitForPlayer(EnStream* this, GlobalContext* globalCtx) { } void EnStream_Update(Actor* thisx, GlobalContext* globalCtx) { - EnStream* this = THIS; + EnStream* this = (EnStream*)thisx; this->actionFunc(this, globalCtx); func_8002F948(thisx, NA_SE_EV_WHIRLPOOL - SFX_FLAG); 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 34f5c0b8d3..237bf3e407 100644 --- a/src/overlays/actors/ovl_En_Sw/z_en_sw.c +++ b/src/overlays/actors/ovl_En_Sw/z_en_sw.c @@ -3,8 +3,6 @@ #define FLAGS 0x00000015 -#define THIS ((EnSw*)thisx) - void EnSw_Init(Actor* thisx, GlobalContext* globalCtx); void EnSw_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnSw_Update(Actor* thisx, GlobalContext* globalCtx); @@ -209,7 +207,7 @@ s32 func_80B0C0CC(EnSw* this, GlobalContext* globalCtx, s32 arg2) { } void EnSw_Init(Actor* thisx, GlobalContext* globalCtx) { - EnSw* this = THIS; + EnSw* this = (EnSw*)thisx; s32 phi_v0; Vec3f sp4C = { 0.0f, 0.0f, 0.0f }; s32 pad; @@ -302,7 +300,7 @@ void EnSw_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnSw_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnSw* this = THIS; + EnSw* this = (EnSw*)thisx; Collider_DestroyJntSph(globalCtx, &this->collider); } @@ -883,7 +881,7 @@ void func_80B0E9BC(EnSw* this, GlobalContext* globalCtx) { } void EnSw_Update(Actor* thisx, GlobalContext* globalCtx) { - EnSw* this = THIS; + EnSw* this = (EnSw*)thisx; SkelAnime_Update(&this->skelAnime); func_80B0C9F0(this, globalCtx); @@ -897,7 +895,7 @@ s32 EnSw_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f sp64 = { -1400.0f, -2600.0f, -800.0f }; Vec3f sp58 = { -1400.0f, -1600.0f, 0.0f }; Vec3f sp4C = { 0.0, 0.0f, -600.0f }; - EnSw* this = THIS; + EnSw* this = (EnSw*)thisx; Vec3f sp3C = { 0.0f, 0.0f, 0.0f }; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_sw.c", 2084); @@ -990,7 +988,7 @@ void func_80B0EEA4(GlobalContext* globalCtx) { } void EnSw_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnSw* this = THIS; + EnSw* this = (EnSw*)thisx; Color_RGBA8 sp30 = { 184, 0, 228, 255 }; if (((this->actor.params & 0xE000) >> 0xD) != 0) { 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 835d6c89e4..dd13f98c91 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 @@ -6,8 +6,6 @@ #define FLAGS 0x00000010 -#define THIS ((EnSyatekiItm*)thisx) - typedef enum { SYATEKI_ROUND_GREEN_APPEAR, SYATEKI_ROUND_BLUE_SEQUENTIAL, @@ -71,7 +69,7 @@ static Vec3f sRupeePos[] = { void EnSyatekiItm_Init(Actor* thisx, GlobalContext* globalCtx2) { GlobalContext* globalCtx = globalCtx2; - EnSyatekiItm* this = THIS; + EnSyatekiItm* this = (EnSyatekiItm*)thisx; s32 i; this->man = (EnSyatekiMan*)Actor_SpawnAsChild(&globalCtx->actorCtx, &this->actor, globalCtx, ACTOR_EN_SYATEKI_MAN, @@ -335,7 +333,7 @@ void EnSyatekiItm_EndGame(EnSyatekiItm* this, GlobalContext* globalCtx) { void EnSyatekiItm_Update(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnSyatekiItm* this = THIS; + EnSyatekiItm* this = (EnSyatekiItm*)thisx; this->actionFunc(this, globalCtx); 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 cf35af98de..3b3981477b 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 @@ -5,8 +5,6 @@ #define FLAGS 0x08000019 -#define THIS ((EnSyatekiMan*)thisx) - typedef enum { /* 0 */ SYATEKI_RESULT_NONE, /* 1 */ SYATEKI_RESULT_WINNER, @@ -153,7 +151,7 @@ static s16 sTextBoxCount[] = { TEXT_STATE_CHOICE, TEXT_STATE_EVENT, TEXT_STATE_E void EnSyatekiMan_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnSyatekiMan* this = THIS; + EnSyatekiMan* this = (EnSyatekiMan*)thisx; osSyncPrintf("\n\n"); // "Old man appeared!! Muhohohohohohohon" @@ -463,7 +461,7 @@ void EnSyatekiMan_Blink(EnSyatekiMan* this) { void EnSyatekiMan_Update(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnSyatekiMan* this = THIS; + EnSyatekiMan* this = (EnSyatekiMan*)thisx; if (this->timer != 0) { this->timer--; @@ -478,7 +476,7 @@ void EnSyatekiMan_Update(Actor* thisx, GlobalContext* globalCtx) { s32 EnSyatekiMan_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - EnSyatekiMan* this = THIS; + EnSyatekiMan* this = (EnSyatekiMan*)thisx; s32 turnDirection; if (limbIndex == 1) { @@ -498,7 +496,7 @@ s32 EnSyatekiMan_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** void EnSyatekiMan_Draw(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnSyatekiMan* this = THIS; + EnSyatekiMan* this = (EnSyatekiMan*)thisx; func_80093D18(globalCtx->state.gfxCtx); SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, 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 e252b6caa1..fa3b3421b1 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 @@ -10,8 +10,6 @@ #define FLAGS 0x00000010 -#define THIS ((EnSyatekiNiw*)thisx) - void EnSyatekiNiw_Init(Actor* thisx, GlobalContext* globalCtx); void EnSyatekiNiw_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnSyatekiNiw_Update(Actor* thisx, GlobalContext* globalCtx); @@ -67,7 +65,7 @@ static InitChainEntry sInitChain[] = { }; void EnSyatekiNiw_Init(Actor* thisx, GlobalContext* globalCtx) { - EnSyatekiNiw* this = THIS; + EnSyatekiNiw* this = (EnSyatekiNiw*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); this->actor.flags &= ~1; @@ -100,7 +98,7 @@ void EnSyatekiNiw_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnSyatekiNiw_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnSyatekiNiw* this = THIS; + EnSyatekiNiw* this = (EnSyatekiNiw*)thisx; Collider_DestroyCylinder(globalCtx, &this->collider); } @@ -574,7 +572,7 @@ void func_80B12BA4(EnSyatekiNiw* this, GlobalContext* globalCtx) { } void EnSyatekiNiw_Update(Actor* thisx, GlobalContext* globalCtx) { - EnSyatekiNiw* this = THIS; + EnSyatekiNiw* this = (EnSyatekiNiw*)thisx; s32 pad; s16 i; Vec3f sp90 = { 0.0f, 0.0f, 0.0f }; @@ -673,7 +671,7 @@ void EnSyatekiNiw_Update(Actor* thisx, GlobalContext* globalCtx) { s32 SyatekiNiw_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - EnSyatekiNiw* this = THIS; + EnSyatekiNiw* this = (EnSyatekiNiw*)thisx; Vec3f sp0 = { 0.0f, 0.0f, 0.0f }; if (limbIndex == 13) { @@ -696,7 +694,7 @@ s32 SyatekiNiw_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** d } void EnSyatekiNiw_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnSyatekiNiw* this = THIS; + EnSyatekiNiw* this = (EnSyatekiNiw*)thisx; Color_RGBA8 sp30 = { 0, 0, 0, 255 }; if (this->actionFunc != func_80B128F8) { 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 fd1fe9eb65..dd270142b4 100644 --- a/src/overlays/actors/ovl_En_Ta/z_en_ta.c +++ b/src/overlays/actors/ovl_En_Ta/z_en_ta.c @@ -10,8 +10,6 @@ #define FLAGS 0x00000009 -#define THIS ((EnTa*)thisx) - void EnTa_Init(Actor* thisx, GlobalContext* globalCtx); void EnTa_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnTa_Update(Actor* thisx, GlobalContext* globalCtx); @@ -100,7 +98,7 @@ void func_80B13AAC(EnTa* this, GlobalContext* globalCtx) { } void EnTa_Init(Actor* thisx, GlobalContext* globalCtx2) { - EnTa* this = THIS; + EnTa* this = (EnTa*)thisx; GlobalContext* globalCtx = globalCtx2; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 36.0f); @@ -233,7 +231,7 @@ void func_80B14248(EnTa* this) { } void EnTa_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnTa* this = THIS; + EnTa* this = (EnTa*)thisx; Collider_DestroyCylinder(globalCtx, &this->collider); @@ -1134,7 +1132,7 @@ void func_80B16938(EnTa* this) { } void EnTa_Update(Actor* thisx, GlobalContext* globalCtx) { - EnTa* this = THIS; + EnTa* this = (EnTa*)thisx; s32 pad; Collider_UpdateCylinder(&this->actor, &this->collider); @@ -1165,7 +1163,7 @@ void EnTa_Update(Actor* thisx, GlobalContext* globalCtx) { } s32 EnTa_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - EnTa* this = THIS; + EnTa* this = (EnTa*)thisx; switch (limbIndex) { case 8: @@ -1196,7 +1194,7 @@ void EnTa_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec 1000.0f, 0.0f, }; - EnTa* this = THIS; + EnTa* this = (EnTa*)thisx; if (limbIndex == 15) { Matrix_MultVec3f(&D_80B16E7C, &this->actor.focus.pos); @@ -1209,7 +1207,7 @@ void EnTa_Draw(Actor* thisx, GlobalContext* globalCtx) { gTalonEyeHalfTex, gTalonEyeClosedTex, }; - EnTa* this = THIS; + EnTa* this = (EnTa*)thisx; s32 pad; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_ta.c", 2381); 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 257394dedc..9ef47064a2 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 @@ -10,8 +10,6 @@ #define FLAGS 0x08000039 -#define THIS ((EnTakaraMan*)thisx) - void EnTakaraMan_Init(Actor* thisx, GlobalContext* globalCtx); void EnTakaraMan_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnTakaraMan_Update(Actor* thisx, GlobalContext* globalCtx); @@ -42,7 +40,7 @@ void EnTakaraMan_Destroy(Actor* thisx, GlobalContext* globalCtx) { } void EnTakaraMan_Init(Actor* thisx, GlobalContext* globalCtx) { - EnTakaraMan* this = THIS; + EnTakaraMan* this = (EnTakaraMan*)thisx; if (sTakaraIsInitialized) { Actor_Kill(&this->actor); @@ -180,7 +178,7 @@ void func_80B17B14(EnTakaraMan* this, GlobalContext* globalCtx) { } void EnTakaraMan_Update(Actor* thisx, GlobalContext* globalCtx) { - EnTakaraMan* this = THIS; + EnTakaraMan* this = (EnTakaraMan*)thisx; if (this->eyeTimer != 0) { this->eyeTimer--; @@ -201,7 +199,7 @@ void EnTakaraMan_Update(Actor* thisx, GlobalContext* globalCtx) { s32 EnTakaraMan_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - EnTakaraMan* this = THIS; + EnTakaraMan* this = (EnTakaraMan*)thisx; if (limbIndex == 1) { rot->x += this->unk_232.y; @@ -218,7 +216,7 @@ void EnTakaraMan_Draw(Actor* thisx, GlobalContext* globalCtx) { object_ts_Tex_000970, object_ts_Tex_000D70, }; - EnTakaraMan* this = THIS; + EnTakaraMan* this = (EnTakaraMan*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_takara_man.c", 528); 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 9e249a8f6a..4f057e96d4 100644 --- a/src/overlays/actors/ovl_En_Tana/z_en_tana.c +++ b/src/overlays/actors/ovl_En_Tana/z_en_tana.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000009 -#define THIS ((EnTana*)thisx) - void EnTana_Init(Actor* thisx, GlobalContext* globalCtx); void EnTana_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnTana_Update(Actor* thisx, GlobalContext* globalCtx); @@ -56,7 +54,7 @@ static void* sStoneTextures[] = { }; void EnTana_Init(Actor* thisx, GlobalContext* globalCtx) { - EnTana* this = THIS; + EnTana* this = (EnTana*)thisx; osSyncPrintf("☆☆☆ %s ☆☆☆\n", sShelfTypes[thisx->params]); Actor_SetScale(thisx, 1.0f); @@ -71,7 +69,7 @@ void EnTana_Update(Actor* thisx, GlobalContext* globalCtx) { } void EnTana_DrawWoodenShelves(Actor* thisx, GlobalContext* globalCtx) { - EnTana* this = THIS; + EnTana* this = (EnTana*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_tana.c", 148); @@ -84,7 +82,7 @@ void EnTana_DrawWoodenShelves(Actor* thisx, GlobalContext* globalCtx) { } void EnTana_DrawStoneShelves(Actor* thisx, GlobalContext* globalCtx) { - EnTana* this = THIS; + EnTana* this = (EnTana*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_tana.c", 163); 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 d361988395..4f844301ef 100644 --- a/src/overlays/actors/ovl_En_Test/z_en_test.c +++ b/src/overlays/actors/ovl_En_Test/z_en_test.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000015 -#define THIS ((EnTest*)thisx) - void EnTest_Init(Actor* thisx, GlobalContext* globalCtx); void EnTest_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnTest_Update(Actor* thisx, GlobalContext* globalCtx); @@ -255,7 +253,7 @@ void EnTest_SetupAction(EnTest* this, EnTestActionFunc actionFunc) { void EnTest_Init(Actor* thisx, GlobalContext* globalCtx) { EffectBlureInit1 slashBlure; - EnTest* this = THIS; + EnTest* this = (EnTest*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); @@ -311,7 +309,7 @@ void EnTest_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnTest_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnTest* this = THIS; + EnTest* this = (EnTest*)thisx; if ((this->actor.params != STALFOS_TYPE_2) && !Actor_FindNearby(globalCtx, &this->actor, ACTOR_EN_TEST, ACTORCAT_ENEMY, 8000.0f)) { @@ -1698,7 +1696,7 @@ void EnTest_UpdateDamage(EnTest* this, GlobalContext* globalCtx) { } void EnTest_Update(Actor* thisx, GlobalContext* globalCtx) { - EnTest* this = THIS; + EnTest* this = (EnTest*)thisx; f32 oldWeight; u32 floorProperty; s32 pad; @@ -1816,7 +1814,7 @@ void EnTest_Update(Actor* thisx, GlobalContext* globalCtx) { } s32 EnTest_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - EnTest* this = THIS; + EnTest* this = (EnTest*)thisx; s32 pad; if (limbIndex == STALFOS_LIMB_HEAD_ROOT) { @@ -1858,7 +1856,7 @@ void EnTest_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, V s32 bodyPart = -1; Vec3f sp70; Vec3f sp64; - EnTest* this = THIS; + EnTest* this = (EnTest*)thisx; s32 pad; Vec3f sp50; @@ -1946,7 +1944,7 @@ void EnTest_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, V } void EnTest_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnTest* this = THIS; + EnTest* this = (EnTest*)thisx; func_80093D18(globalCtx->state.gfxCtx); func_8002EBCC(&this->actor, globalCtx, 1); 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 ec0d32ab21..3b4471d791 100644 --- a/src/overlays/actors/ovl_En_Tg/z_en_tg.c +++ b/src/overlays/actors/ovl_En_Tg/z_en_tg.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000009 -#define THIS ((EnTg*)thisx) - void EnTg_Init(Actor* thisx, GlobalContext* globalCtx); void EnTg_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnTg_Update(Actor* thisx, GlobalContext* globalCtx); @@ -53,7 +51,7 @@ const ActorInit En_Tg_InitVars = { }; u16 EnTg_GetTextId(GlobalContext* globalCtx, Actor* thisx) { - EnTg* this = THIS; + EnTg* this = (EnTg*)thisx; u16 temp; u32 phi; @@ -81,7 +79,7 @@ u16 EnTg_GetTextId(GlobalContext* globalCtx, Actor* thisx) { } s16 EnTg_OnTextComplete(GlobalContext* globalCtx, Actor* thisx) { - EnTg* this = THIS; + EnTg* this = (EnTg*)thisx; switch (Message_GetState(&globalCtx->msgCtx)) { case TEXT_STATE_NONE: @@ -113,7 +111,7 @@ s16 EnTg_OnTextComplete(GlobalContext* globalCtx, Actor* thisx) { } void EnTg_Init(Actor* thisx, GlobalContext* globalCtx) { - EnTg* this = THIS; + EnTg* this = (EnTg*)thisx; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 28.0f); SkelAnime_InitFlex(globalCtx, &this->skelAnime, &gDancingCoupleSkel, &gDancingCoupleAnim, NULL, NULL, 0); @@ -127,7 +125,7 @@ void EnTg_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnTg_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnTg* this = THIS; + EnTg* this = (EnTg*)thisx; SkelAnime_Free(&this->skelAnime, globalCtx); Collider_DestroyCylinder(globalCtx, &this->collider); @@ -140,7 +138,7 @@ void EnTg_SpinIfNotTalking(EnTg* this, GlobalContext* globalCtx) { } void EnTg_Update(Actor* thisx, GlobalContext* globalCtx) { - EnTg* this = THIS; + EnTg* this = (EnTg*)thisx; s32 pad; f32 temp; Vec3s sp2C; @@ -162,7 +160,7 @@ s32 EnTg_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, } void EnTg_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) { - EnTg* this = THIS; + EnTg* this = (EnTg*)thisx; Vec3f targetOffset = { 0.0f, 800.0f, 0.0f }; if (limbIndex == 9) { @@ -180,7 +178,7 @@ Gfx* EnTg_SetColor(GraphicsContext* gfxCtx, u8 r, u8 g, u8 b, u8 a) { } void EnTg_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnTg* this = THIS; + EnTg* this = (EnTg*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_tg.c", 462); Matrix_Translate(0.0f, 0.0f, -560.0f, MTXMODE_APPLY); 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 5e0d78cc9a..a1b8f4d8f1 100644 --- a/src/overlays/actors/ovl_En_Tite/z_en_tite.c +++ b/src/overlays/actors/ovl_En_Tite/z_en_tite.c @@ -12,8 +12,6 @@ #define FLAGS 0x00000015 -#define THIS ((EnTite*)thisx) - // EnTite_Idle #define vIdleTimer actionVar1 @@ -176,7 +174,7 @@ void EnTite_SetupAction(EnTite* this, EnTiteActionFunc actionFunc) { } void EnTite_Init(Actor* thisx, GlobalContext* globalCtx) { - EnTite* this = THIS; + EnTite* this = (EnTite*)thisx; Actor_ProcessInitChain(thisx, sInitChain); thisx->targetMode = 3; @@ -204,7 +202,7 @@ void EnTite_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnTite_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnTite* this = THIS; + EnTite* this = (EnTite*)thisx; EnEncount1* spawner; if (thisx->parent != NULL) { @@ -841,7 +839,7 @@ void EnTite_FlipUpright(EnTite* this, GlobalContext* globalCtx) { } void EnTite_CheckDamage(Actor* thisx, GlobalContext* globalCtx) { - EnTite* this = THIS; + EnTite* this = (EnTite*)thisx; if ((this->collider.base.acFlags & AC_HIT) && (this->action >= TEKTITE_IDLE)) { this->collider.base.acFlags &= ~AC_HIT; @@ -887,7 +885,7 @@ void EnTite_CheckDamage(Actor* thisx, GlobalContext* globalCtx) { } void EnTite_Update(Actor* thisx, GlobalContext* globalCtx) { - EnTite* this = THIS; + EnTite* this = (EnTite*)thisx; char pad[0x4]; CollisionPoly* floorPoly; WaterBox* waterBox; @@ -958,7 +956,7 @@ void EnTite_Update(Actor* thisx, GlobalContext* globalCtx) { } void EnTite_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** limbDList, Vec3s* rot, void* thisx) { - EnTite* this = THIS; + EnTite* this = (EnTite*)thisx; switch (limbIndex) { case 8: @@ -979,7 +977,7 @@ void EnTite_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** limbDLis } void EnTite_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnTite* this = THIS; + EnTite* this = (EnTite*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_tite.c", 1704); func_80093D18(globalCtx->state.gfxCtx); 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 15b46aee85..ecc3aee71e 100644 --- a/src/overlays/actors/ovl_En_Tk/z_en_tk.c +++ b/src/overlays/actors/ovl_En_Tk/z_en_tk.c @@ -10,8 +10,6 @@ #define FLAGS 0x00000009 -#define THIS ((EnTk*)thisx) - void EnTk_Init(Actor* thisx, GlobalContext* globalCtx); void EnTk_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnTk_Update(Actor* thisx, GlobalContext* globalCtx); @@ -479,7 +477,7 @@ void EnTk_DigEff(EnTk* this) { } void EnTk_Init(Actor* thisx, GlobalContext* globalCtx) { - EnTk* this = THIS; + EnTk* this = (EnTk*)thisx; s32 pad; ActorShape_Init(&this->actor.shape, 0, ActorShadow_DrawCircle, 24.0f); @@ -509,7 +507,7 @@ void EnTk_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnTk_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnTk* this = THIS; + EnTk* this = (EnTk*)thisx; Collider_DestroyCylinder(globalCtx, &this->collider); } @@ -654,7 +652,7 @@ void EnTk_Dig(EnTk* this, GlobalContext* globalCtx) { } void EnTk_Update(Actor* thisx, GlobalContext* globalCtx) { - EnTk* this = THIS; + EnTk* this = (EnTk*)thisx; s32 pad; Collider_UpdateCylinder(&this->actor, &this->collider); @@ -682,7 +680,7 @@ void func_80B1D200(GlobalContext* globalCtx) { } s32 EnTk_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - EnTk* this = THIS; + EnTk* this = (EnTk*)thisx; switch (limbIndex) { /* Limb 15 - Head */ @@ -700,7 +698,7 @@ s32 EnTk_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, } void EnTk_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) { - EnTk* this = THIS; + EnTk* this = (EnTk*)thisx; Vec3f sp28 = { 0.0f, 0.0f, 4600.0f }; Vec3f sp1C = { 0.0f, 0.0f, 0.0f }; @@ -722,7 +720,7 @@ void EnTk_Draw(Actor* thisx, GlobalContext* globalCtx) { gDampeEyeHalfTex, gDampeEyeClosedTex, }; - EnTk* this = THIS; + EnTk* this = (EnTk*)thisx; Matrix_Push(); EnTkEff_Draw(this, 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 0b8e35ca8e..11f51ee9a3 100644 --- a/src/overlays/actors/ovl_En_Torch/z_en_torch.c +++ b/src/overlays/actors/ovl_En_Torch/z_en_torch.c @@ -8,8 +8,6 @@ #define FLAGS 0x00000000 -#define THIS ((EnTorch*)thisx) - void EnTorch_Init(Actor* thisx, GlobalContext* globalCtx); const ActorInit En_Torch_InitVars = { @@ -29,7 +27,7 @@ static u8 sChestContents[] = { }; void EnTorch_Init(Actor* thisx, GlobalContext* globalCtx) { - EnTorch* this = THIS; + EnTorch* this = (EnTorch*)thisx; s8 returnData = gSaveContext.respawn[RESPAWN_MODE_RETURN].data; /* Spawn chest with desired contents. 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 16b9d39824..d20571e9b9 100644 --- a/src/overlays/actors/ovl_En_Torch2/z_en_torch2.c +++ b/src/overlays/actors/ovl_En_Torch2/z_en_torch2.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000035 -#define THIS ((Player*)thisx) - typedef enum { /* 0 */ ENTORCH2_WAIT, /* 1 */ ENTORCH2_ATTACK, @@ -124,7 +122,7 @@ static DamageTable sDamageTable = { void EnTorch2_Init(Actor* thisx, GlobalContext* globalCtx2) { GlobalContext* globalCtx = globalCtx2; - Player* this = THIS; + Player* this = (Player*)thisx; sInput.cur.button = sInput.press.button = sInput.rel.button = 0; sInput.cur.stick_x = sInput.cur.stick_y = 0; @@ -161,7 +159,7 @@ void EnTorch2_Init(Actor* thisx, GlobalContext* globalCtx2) { void EnTorch2_Destroy(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - Player* this = THIS; + Player* this = (Player*)thisx; Effect_Delete(globalCtx, this->swordEffectIndex); func_800F5B58(); @@ -232,7 +230,7 @@ void EnTorch2_Update(Actor* thisx, GlobalContext* globalCtx2) { GlobalContext* globalCtx = globalCtx2; Player* player2 = GET_PLAYER(globalCtx2); Player* player = player2; - Player* this = THIS; + Player* this = (Player*)thisx; Input* input = &sInput; Camera* camera; s16 sp66; @@ -755,20 +753,20 @@ void EnTorch2_Update(Actor* thisx, GlobalContext* globalCtx2) { s32 EnTorch2_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx, Gfx** gfx) { - Player* this = THIS; + Player* this = (Player*)thisx; return func_8008FCC8(globalCtx, limbIndex, dList, pos, rot, &this->actor); } void EnTorch2_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx, Gfx** gfx) { - Player* this = THIS; + Player* this = (Player*)thisx; func_80090D20(globalCtx, limbIndex, dList, rot, &this->actor); } void EnTorch2_Draw(Actor* thisx, GlobalContext* globalCtx2) { GlobalContext* globalCtx = globalCtx2; - Player* this = THIS; + Player* this = (Player*)thisx; s32 pad; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_torch2.c", 1050); 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 27374fbf10..de8cff00fd 100644 --- a/src/overlays/actors/ovl_En_Toryo/z_en_toryo.c +++ b/src/overlays/actors/ovl_En_Toryo/z_en_toryo.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000009 -#define THIS ((EnToryo*)thisx) - void EnToryo_Init(Actor* thisx, GlobalContext* globalCtx); void EnToryo_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnToryo_Update(Actor* thisx, GlobalContext* globalCtx); @@ -101,7 +99,7 @@ static EnToryoAnimation sEnToryoAnimation = { &object_toryo_Anim_000E50, 1.0f, 0 static Vec3f sMultVec = { 800.0f, 1000.0f, 0.0f }; void EnToryo_Init(Actor* thisx, GlobalContext* globalCtx) { - EnToryo* this = THIS; + EnToryo* this = (EnToryo*)thisx; s32 pad; switch (globalCtx->sceneNum) { @@ -142,7 +140,7 @@ void EnToryo_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnToryo_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnToryo* this = THIS; + EnToryo* this = (EnToryo*)thisx; Collider_DestroyCylinder(globalCtx, &this->collider); } @@ -356,7 +354,7 @@ void func_80B20914(EnToryo* this, GlobalContext* globalCtx) { } void EnToryo_Update(Actor* thisx, GlobalContext* globalCtx) { - EnToryo* this = THIS; + EnToryo* this = (EnToryo*)thisx; ColliderCylinder* collider = &this->collider; Player* player = GET_PLAYER(globalCtx); f32 rot; @@ -386,7 +384,7 @@ void EnToryo_Update(Actor* thisx, GlobalContext* globalCtx) { } void EnToryo_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnToryo* this = THIS; + EnToryo* this = (EnToryo*)thisx; func_80093D18(globalCtx->state.gfxCtx); SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, @@ -395,7 +393,7 @@ void EnToryo_Draw(Actor* thisx, GlobalContext* globalCtx) { s32 EnToryo_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - EnToryo* this = THIS; + EnToryo* this = (EnToryo*)thisx; if ((this->stateFlags & 8)) { switch (limbIndex) { @@ -413,7 +411,7 @@ s32 EnToryo_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dLis } void EnToryo_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) { - EnToryo* this = THIS; + EnToryo* this = (EnToryo*)thisx; switch (limbIndex) { case 15: 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 314c9769f9..af1039e511 100644 --- a/src/overlays/actors/ovl_En_Tp/z_en_tp.c +++ b/src/overlays/actors/ovl_En_Tp/z_en_tp.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000000 -#define THIS ((EnTp*)thisx) - void EnTp_Init(Actor* thisx, GlobalContext* globalCtx); void EnTp_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnTp_Update(Actor* thisx, GlobalContext* globalCtx); @@ -132,7 +130,7 @@ void EnTp_SetupAction(EnTp* this, EnTpActionFunc actionFunc) { void EnTp_Init(Actor* thisx, GlobalContext* globalCtx2) { GlobalContext* globalCtx = globalCtx2; - EnTp* this = THIS; + EnTp* this = (EnTp*)thisx; EnTp* now; EnTp* next; s32 i; @@ -189,7 +187,7 @@ void EnTp_Init(Actor* thisx, GlobalContext* globalCtx2) { } void EnTp_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnTp* this = THIS; + EnTp* this = (EnTp*)thisx; Collider_DestroyJntSph(globalCtx, &this->collider); } @@ -647,7 +645,7 @@ void EnTp_UpdateDamage(EnTp* this, GlobalContext* globalCtx) { void EnTp_Update(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnTp* this = THIS; + EnTp* this = (EnTp*)thisx; Vec3f kiraVelocity = { 0.0f, 0.0f, 0.0f }; Vec3f kiraAccel = { 0.0f, -0.6f, 0.0f }; Vec3f kiraPos; @@ -729,7 +727,7 @@ void EnTp_Update(Actor* thisx, GlobalContext* globalCtx) { void EnTp_Draw(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnTp* this = THIS; + EnTp* this = (EnTp*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_tp.c", 1451); 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 92d1cc24d0..acca5add4e 100644 --- a/src/overlays/actors/ovl_En_Tr/z_en_tr.c +++ b/src/overlays/actors/ovl_En_Tr/z_en_tr.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000010 -#define THIS ((EnTr*)thisx) - void EnTr_Init(Actor* thisx, GlobalContext* globalCtx); void EnTr_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnTr_Update(Actor* thisx, GlobalContext* globalCtx); @@ -87,7 +85,7 @@ void EnTr_SetupAction(EnTr* this, EnTrActionFunc actionFunc) { } void EnTr_Init(Actor* thisx, GlobalContext* globalCtx) { - EnTr* this = THIS; + EnTr* this = (EnTr*)thisx; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f); EnTr_SetupAction(this, EnTr_DoNothing); @@ -375,7 +373,7 @@ void EnTr_ChooseAction1(EnTr* this, GlobalContext* globalCtx) { void EnTr_Update(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnTr* this = THIS; + EnTr* this = (EnTr*)thisx; Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 0.0f, 0.0f, 0.0f, 5); this->actionFunc(this, globalCtx); @@ -415,7 +413,7 @@ void EnTr_Update(Actor* thisx, GlobalContext* globalCtx) { s32 EnTr_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { Vec3f src = { 2300.0f, 0.0f, -600.0f }; Vec3f dest = { 0.0f, 0.0f, 0.0f }; - EnTr* this = THIS; + EnTr* this = (EnTr*)thisx; Actor* child = this->actor.child; if ((child != NULL) && (limbIndex == 19)) { @@ -429,7 +427,7 @@ s32 EnTr_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, void EnTr_Draw(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnTr* this = THIS; + EnTr* this = (EnTr*)thisx; if (1) {} 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 41e91141df..a1bff00eff 100644 --- a/src/overlays/actors/ovl_En_Trap/z_en_trap.c +++ b/src/overlays/actors/ovl_En_Trap/z_en_trap.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000010 -#define THIS ((EnTrap*)thisx) - #define BEGIN_MOVE_OUT 65535.0f #define DIR_FWD 0 @@ -66,7 +64,7 @@ void EnTrap_Init(Actor* thisx, GlobalContext* globalCtx) { f32 trapSpeed; s16 zSpeed; s16 xSpeed; - EnTrap* this = THIS; + EnTrap* this = (EnTrap*)thisx; ColliderCylinder* unused = &this->collider; // required to match this->upperParams = (thisx->params >> 8) & 0xFF; @@ -117,12 +115,12 @@ void EnTrap_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnTrap_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnTrap* this = THIS; + EnTrap* this = (EnTrap*)thisx; Collider_DestroyCylinder(globalCtx, &this->collider); } void EnTrap_Update(Actor* thisx, GlobalContext* globalCtx) { - EnTrap* this = THIS; + EnTrap* this = (EnTrap*)thisx; Vec3f posTemp; s16 angleToKnockPlayer; s16 angleToCollidedActor; 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 47b60c24e0..f78bafca18 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 @@ -11,8 +11,6 @@ #define FLAGS 0x00000010 -#define THIS ((EnTuboTrap*)thisx) - void EnTuboTrap_Init(Actor* thisx, GlobalContext* globalCtx); void EnTuboTrap_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnTuboTrap_Update(Actor* thisx, GlobalContext* globalCtx); @@ -55,7 +53,7 @@ const ActorInit En_Tubo_Trap_InitVars = { }; void EnTuboTrap_Init(Actor* thisx, GlobalContext* globalCtx) { - EnTuboTrap* this = THIS; + EnTuboTrap* this = (EnTuboTrap*)thisx; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 2.0f); osSyncPrintf("\n\n"); @@ -67,7 +65,7 @@ void EnTuboTrap_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnTuboTrap_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnTuboTrap* this = THIS; + EnTuboTrap* this = (EnTuboTrap*)thisx; Collider_DestroyCylinder(globalCtx, &this->collider); } @@ -274,7 +272,7 @@ void EnTuboTrap_Fly(EnTuboTrap* this, GlobalContext* globalCtx) { } void EnTuboTrap_Update(Actor* thisx, GlobalContext* globalCtx) { - EnTuboTrap* this = THIS; + EnTuboTrap* this = (EnTuboTrap*)thisx; s32 pad; this->actionFunc(this, globalCtx); 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 bdf1e5ab6a..ad093e17e0 100644 --- a/src/overlays/actors/ovl_En_Vali/z_en_vali.c +++ b/src/overlays/actors/ovl_En_Vali/z_en_vali.c @@ -9,8 +9,6 @@ #define FLAGS 0x00001015 -#define THIS ((EnVali*)thisx) - void EnVali_Init(Actor* thisx, GlobalContext* globalCtx); void EnVali_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnVali_Update(Actor* thisx, GlobalContext* globalCtx); @@ -137,7 +135,7 @@ static InitChainEntry sInitChain[] = { void EnVali_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnVali* this = THIS; + EnVali* this = (EnVali*)thisx; s32 bgId; Actor_ProcessInitChain(&this->actor, sInitChain); @@ -167,7 +165,7 @@ void EnVali_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnVali_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnVali* this = THIS; + EnVali* this = (EnVali*)thisx; Collider_DestroyQuad(globalCtx, &this->leftArmCollider); Collider_DestroyQuad(globalCtx, &this->rightArmCollider); @@ -539,7 +537,7 @@ void EnVali_UpdateDamage(EnVali* this, GlobalContext* globalCtx) { void EnVali_Update(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnVali* this = THIS; + EnVali* this = (EnVali*)thisx; if ((this->bodyCollider.base.atFlags & AT_HIT) || (this->leftArmCollider.base.atFlags & AT_HIT) || (this->rightArmCollider.base.atFlags & AT_HIT)) { @@ -674,7 +672,7 @@ s32 EnVali_SetArmLength(EnVali* this, f32 curFrame) { s32 EnVali_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx, Gfx** gfx) { - EnVali* this = THIS; + EnVali* this = (EnVali*)thisx; f32 curFrame; if ((limbIndex == EN_VALI_LIMB_NUCLEUS) || (limbIndex == EN_VALI_LIMB_OUTER_HOOD) || @@ -699,7 +697,7 @@ void EnVali_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, V static Vec3f D_80B2897C = { -1000.0f, 0.0f, 0.0f }; Vec3f sp3C; Vec3f sp30; - EnVali* this = THIS; + EnVali* this = (EnVali*)thisx; if (this->actionFunc == EnVali_FloatIdle) { if ((limbIndex == EN_VALI_LIMB_LEFT_FOREARM_BASE) || (limbIndex == EN_VALI_LIMB_RIGHT_FOREARM_BASE)) { @@ -787,7 +785,7 @@ static Gfx D_80B289A8[] = { void EnVali_Draw(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnVali* this = THIS; + EnVali* this = (EnVali*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_vali.c", 1505); func_80093D84(globalCtx->state.gfxCtx); 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 a1a26da342..4d27563eef 100644 --- a/src/overlays/actors/ovl_En_Vase/z_en_vase.c +++ b/src/overlays/actors/ovl_En_Vase/z_en_vase.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000010 -#define THIS ((EnVase*)thisx) - void EnVase_Init(Actor* thisx, GlobalContext* globalCtx); void EnVase_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnVase_Draw(Actor* thisx, GlobalContext* globalCtx); @@ -28,7 +26,7 @@ const ActorInit En_Vase_InitVars = { }; void EnVase_Init(Actor* thisx, GlobalContext* globalCtx) { - EnVase* this = THIS; + EnVase* this = (EnVase*)thisx; Actor_SetScale(&this->actor, 0.01f); this->actor.focus.pos = this->actor.world.pos; 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 873111bd17..eb457ea036 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 @@ -11,8 +11,6 @@ #define FLAGS 0x00000030 -#define THIS ((EnVbBall*)thisx) - void EnVbBall_Init(Actor* thisx, GlobalContext* globalCtx); void EnVbBall_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnVbBall_Update(Actor* thisx, GlobalContext* globalCtx); @@ -52,7 +50,7 @@ static ColliderCylinderInit sCylinderInit = { void EnVbBall_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnVbBall* this = THIS; + EnVbBall* this = (EnVbBall*)thisx; s32 pad2; f32 angle; @@ -79,7 +77,7 @@ void EnVbBall_Init(Actor* thisx, GlobalContext* globalCtx) { void EnVbBall_Destroy(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnVbBall* this = THIS; + EnVbBall* this = (EnVbBall*)thisx; if (this->actor.params < 200) { Collider_DestroyCylinder(globalCtx, &this->collider); @@ -166,7 +164,7 @@ void EnVbBall_UpdateBones(EnVbBall* this, GlobalContext* globalCtx) { void EnVbBall_Update(Actor* thisx, GlobalContext* globalCtx2) { GlobalContext* globalCtx = globalCtx2; - EnVbBall* this = THIS; + EnVbBall* this = (EnVbBall*)thisx; BossFd* bossFd = (BossFd*)this->actor.parent; f32 radius; f32 pad2; @@ -301,7 +299,7 @@ void EnVbBall_Update(Actor* thisx, GlobalContext* globalCtx2) { void EnVbBall_Draw(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnVbBall* this = THIS; + EnVbBall* this = (EnVbBall*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_vb_ball.c", 604); if (1) {} // needed for match 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 19a47f3b78..63a7a5facc 100644 --- a/src/overlays/actors/ovl_En_Viewer/z_en_viewer.c +++ b/src/overlays/actors/ovl_En_Viewer/z_en_viewer.c @@ -17,8 +17,6 @@ #define FLAGS 0x00000010 -#define THIS ((EnViewer*)thisx) - void EnViewer_Init(Actor* thisx, GlobalContext* globalCtx); void EnViewer_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnViewer_Update(Actor* thisx, GlobalContext* globalCtx); @@ -90,7 +88,7 @@ void EnViewer_SetupAction(EnViewer* this, EnViewerActionFunc actionFunc) { } void EnViewer_Init(Actor* thisx, GlobalContext* globalCtx) { - EnViewer* this = THIS; + EnViewer* this = (EnViewer*)thisx; u8 type; Actor_ProcessInitChain(&this->actor, sInitChain); @@ -108,7 +106,7 @@ void EnViewer_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnViewer_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnViewer* this = THIS; + EnViewer* this = (EnViewer*)thisx; func_800A6888(globalCtx, &this->skin); } @@ -479,7 +477,7 @@ void EnViewer_UpdateImpl(EnViewer* this, GlobalContext* globalCtx) { } void EnViewer_Update(Actor* thisx, GlobalContext* globalCtx) { - EnViewer* this = THIS; + EnViewer* this = (EnViewer*)thisx; gSegments[6] = VIRTUAL_TO_PHYSICAL(globalCtx->objectCtx.status[this->animObjBankIndex].segment); this->actionFunc(this, globalCtx); @@ -693,7 +691,7 @@ static EnViewerDrawFunc sDrawFuncs[] = { }; void EnViewer_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnViewer* this = THIS; + EnViewer* this = (EnViewer*)thisx; s32 pad; s16 type; 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 14f499791d..3fb6f46b94 100644 --- a/src/overlays/actors/ovl_En_Vm/z_en_vm.c +++ b/src/overlays/actors/ovl_En_Vm/z_en_vm.c @@ -11,8 +11,6 @@ #define FLAGS 0x00000011 -#define THIS ((EnVm*)thisx) - void EnVm_Init(Actor* thisx, GlobalContext* globalCtx); void EnVm_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnVm_Update(Actor* thisx, GlobalContext* globalCtx); @@ -134,7 +132,7 @@ void EnVm_SetupAction(EnVm* this, EnVmActionFunc actionFunc) { } void EnVm_Init(Actor* thisx, GlobalContext* globalCtx) { - EnVm* this = THIS; + EnVm* this = (EnVm*)thisx; SkelAnime_Init(globalCtx, &this->skelAnime, &gBeamosSkel, &gBeamosAnim, this->jointTable, this->morphTable, 11); ActorShape_Init(&thisx->shape, 0.0f, NULL, 0.0f); @@ -160,7 +158,7 @@ void EnVm_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnVm_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnVm* this = THIS; + EnVm* this = (EnVm*)thisx; Collider_DestroyCylinder(globalCtx, &this->colliderCylinder); } @@ -418,7 +416,7 @@ void EnVm_CheckHealth(EnVm* this, GlobalContext* globalCtx) { } void EnVm_Update(Actor* thisx, GlobalContext* globalCtx) { - EnVm* this = THIS; + EnVm* this = (EnVm*)thisx; CollisionCheckContext* colChkCtx = &globalCtx->colChkCtx; if (this->actor.colChkInfo.health != 0) { @@ -451,7 +449,7 @@ void EnVm_Update(Actor* thisx, GlobalContext* globalCtx) { } s32 EnVm_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - EnVm* this = THIS; + EnVm* this = (EnVm*)thisx; if (limbIndex == 2) { rot->x += this->beamRot.x; @@ -466,7 +464,7 @@ s32 EnVm_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, } void EnVm_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) { - EnVm* this = THIS; + EnVm* this = (EnVm*)thisx; Vec3f sp80 = D_80B2EAF8; Vec3f sp74 = D_80B2EB04; Vec3f sp68 = D_80B2EB10; @@ -517,7 +515,7 @@ void EnVm_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec } void EnVm_Draw(Actor* thisx, GlobalContext* globalCtx2) { - EnVm* this = THIS; + EnVm* this = (EnVm*)thisx; GlobalContext* globalCtx = globalCtx2; Vec3f actorPos; 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 6716c9f41d..4222c695cd 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 @@ -12,8 +12,6 @@ #define FLAGS 0x00000010 -#define THIS ((EnWallTubo*)thisx) - void EnWallTubo_Init(Actor* thisx, GlobalContext* globalCtx); void EnWallTubo_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnWallTubo_Update(Actor* thisx, GlobalContext* globalCtx); @@ -35,7 +33,7 @@ const ActorInit En_Wall_Tubo_InitVars = { }; void EnWallTubo_Init(Actor* thisx, GlobalContext* globalCtx) { - EnWallTubo* this = THIS; + EnWallTubo* this = (EnWallTubo*)thisx; osSyncPrintf("\n\n"); // "Wall Target" @@ -140,7 +138,7 @@ void EnWallTubo_SetWallFall(EnWallTubo* this, GlobalContext* globalCtx) { } void EnWallTubo_Update(Actor* thisx, GlobalContext* globalCtx) { - EnWallTubo* this = THIS; + EnWallTubo* this = (EnWallTubo*)thisx; if (this->timer != 0) { this->timer--; 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 ab6a23a27f..4cce00ad12 100644 --- a/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c +++ b/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c @@ -10,8 +10,6 @@ #define FLAGS 0x00000015 -#define THIS ((EnWallmas*)thisx) - #define TIMER_SCALE ((f32)OS_CLOCK_RATE / 10000000000) #define DEGREE_60_RAD (60.0f * M_PI / 180.0f) #define DEGREE_15_RAD (15.0f * M_PI / 180.0f) @@ -118,7 +116,7 @@ static InitChainEntry sInitChain[] = { }; void EnWallmas_Init(Actor* thisx, GlobalContext* globalCtx) { - EnWallmas* this = THIS; + EnWallmas* this = (EnWallmas*)thisx; Actor_ProcessInitChain(thisx, sInitChain); ActorShape_Init(&thisx->shape, 0, NULL, 0.5f); @@ -146,7 +144,7 @@ void EnWallmas_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnWallmas_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnWallmas* this = THIS; + EnWallmas* this = (EnWallmas*)thisx; Collider_DestroyCylinder(globalCtx, &this->collider); } @@ -535,7 +533,7 @@ void EnWallmas_ColUpdate(EnWallmas* this, GlobalContext* globalCtx) { } void EnWallmas_Update(Actor* thisx, GlobalContext* globalCtx) { - EnWallmas* this = THIS; + EnWallmas* this = (EnWallmas*)thisx; char pad[4]; EnWallmas_ColUpdate(this, globalCtx); @@ -611,7 +609,7 @@ void EnWallmas_DrawXlu(EnWallmas* this, GlobalContext* globalCtx) { s32 EnWallMas_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - EnWallmas* this = THIS; + EnWallmas* this = (EnWallmas*)thisx; if (limbIndex == 1) { if (this->actionFunc != EnWallmas_TakePlayer) { @@ -643,7 +641,7 @@ void EnWallMas_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList } void EnWallmas_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnWallmas* this = THIS; + EnWallmas* this = (EnWallmas*)thisx; if (this->actionFunc != EnWallmas_WaitToDrop) { func_80093D18(globalCtx->state.gfxCtx); 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 bd8125b7d1..f53968eda9 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 @@ -9,8 +9,6 @@ #define FLAGS 0x00000010 -#define THIS ((EnWeatherTag*)thisx) - void EnWeatherTag_Init(Actor* thisx, GlobalContext* globalCtx); void EnWeatherTag_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnWeatherTag_Update(Actor* thisx, GlobalContext* globalCtx); @@ -53,7 +51,7 @@ void EnWeatherTag_Destroy(Actor* thisx, GlobalContext* globalCtx) { } void EnWeatherTag_Init(Actor* thisx, GlobalContext* globalCtx) { - EnWeatherTag* this = THIS; + EnWeatherTag* this = (EnWeatherTag*)thisx; this->actor.flags &= ~1; @@ -323,7 +321,7 @@ void EnWeatherTag_EnabledRainThunder(EnWeatherTag* this, GlobalContext* globalCt } void EnWeatherTag_Update(Actor* thisx, GlobalContext* globalCtx) { - EnWeatherTag* this = THIS; + EnWeatherTag* this = (EnWeatherTag*)thisx; this->actionFunc(this, globalCtx); if (BREG(0) != 0) { 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 9bc55b9cda..922003c40a 100644 --- a/src/overlays/actors/ovl_En_Weiyer/z_en_weiyer.c +++ b/src/overlays/actors/ovl_En_Weiyer/z_en_weiyer.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000005 -#define THIS ((EnWeiyer*)thisx) - void EnWeiyer_Init(Actor* thisx, GlobalContext* globalCtx); void EnWeiyer_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnWeiyer_Update(Actor* thisx, GlobalContext* globalCtx); @@ -103,7 +101,7 @@ static InitChainEntry sInitChain[] = { }; void EnWeiyer_Init(Actor* thisx, GlobalContext* globalCtx) { - EnWeiyer* this = THIS; + EnWeiyer* this = (EnWeiyer*)thisx; Actor_ProcessInitChain(thisx, sInitChain); ActorShape_Init(&this->actor.shape, 1000.0f, ActorShadow_DrawCircle, 65.0f); @@ -116,7 +114,7 @@ void EnWeiyer_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnWeiyer_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnWeiyer* this = THIS; + EnWeiyer* this = (EnWeiyer*)thisx; Collider_DestroyCylinder(globalCtx, &this->collider); } @@ -583,7 +581,7 @@ void func_80B3368C(EnWeiyer* this, GlobalContext* globalCtx) { } void EnWeiyer_Update(Actor* thisx, GlobalContext* globalCtx) { - EnWeiyer* this = THIS; + EnWeiyer* this = (EnWeiyer*)thisx; s32 pad; this->actor.home.pos.y = this->actor.yDistToWater + this->actor.world.pos.y - 5.0f; @@ -629,7 +627,7 @@ s32 EnWeiyer_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dLi } void EnWeiyer_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnWeiyer* this = THIS; + EnWeiyer* this = (EnWeiyer*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_weiyer.c", 1193); 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 726920a803..33390d23cc 100644 --- a/src/overlays/actors/ovl_En_Wf/z_en_wf.c +++ b/src/overlays/actors/ovl_En_Wf/z_en_wf.c @@ -11,8 +11,6 @@ #define FLAGS 0x00000015 -#define THIS ((EnWf*)thisx) - void EnWf_Init(Actor* thisx, GlobalContext* globalCtx); void EnWf_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnWf_Update(Actor* thisx, GlobalContext* globalCtx); @@ -212,7 +210,7 @@ void EnWf_SetupAction(EnWf* this, EnWfActionFunc actionFunc) { void EnWf_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnWf* this = THIS; + EnWf* this = (EnWf*)thisx; Actor_ProcessInitChain(thisx, sInitChain); thisx->colChkInfo.damageTable = &sDamageTable; @@ -256,7 +254,7 @@ void EnWf_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnWf_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnWf* this = THIS; + EnWf* this = (EnWf*)thisx; Collider_DestroyJntSph(globalCtx, &this->colliderSpheres); Collider_DestroyCylinder(globalCtx, &this->colliderCylinderBody); @@ -1296,7 +1294,7 @@ void EnWf_UpdateDamage(EnWf* this, GlobalContext* globalCtx) { void EnWf_Update(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnWf* this = THIS; + EnWf* this = (EnWf*)thisx; EnWf_UpdateDamage(this, globalCtx); @@ -1349,7 +1347,7 @@ void EnWf_Update(Actor* thisx, GlobalContext* globalCtx) { } s32 EnWf_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - EnWf* this = THIS; + EnWf* this = (EnWf*)thisx; if ((limbIndex == WOLFOS_LIMB_HEAD) || (limbIndex == WOLFOS_LIMB_EYES)) { rot->y -= this->unk_4D4.y; @@ -1361,7 +1359,7 @@ s32 EnWf_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, void EnWf_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) { static Vec3f colliderVec = { 1200.0f, 0.0f, 0.0f }; static Vec3f bodyPartVec = { 0.0f, 0.0f, 0.0f }; - EnWf* this = THIS; + EnWf* this = (EnWf*)thisx; s32 bodyPartIndex = -1; Collider_UpdateSpheres(limbIndex, &this->colliderSpheres); @@ -1429,7 +1427,7 @@ static void* sWolfosWhiteEyeTextures[] = { gWolfosWhiteEyeOpenTex, gWolfosWhiteE gWolfosWhiteEyeHalfTex }; void EnWf_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnWf* this = THIS; + EnWf* this = (EnWf*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_wf.c", 2157); 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 f3c146b589..a9ef14ba86 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 @@ -9,8 +9,6 @@ #define FLAGS 0x00000000 -#define THIS ((EnWonderItem*)thisx) - void EnWonderItem_Init(Actor* thisx, GlobalContext* globalCtx); void EnWonderItem_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnWonderItem_Update(Actor* thisx, GlobalContext* globalCtx); @@ -60,7 +58,7 @@ static Vec3f sTagPointsOrdered[9]; void EnWonderItem_Destroy(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnWonderItem* this = THIS; + EnWonderItem* this = (EnWonderItem*)thisx; if ((this->collider.dim.radius != 0) || (this->collider.dim.height != 0)) { Collider_DestroyCylinder(globalCtx, &this->collider); @@ -110,7 +108,7 @@ void EnWonderItem_Init(Actor* thisx, GlobalContext* globalCtx) { }; s32 pad; s16 colTypeIndex; - EnWonderItem* this = THIS; + EnWonderItem* this = (EnWonderItem*)thisx; s16 rotZover10; s16 tagIndex; @@ -336,7 +334,7 @@ void EnWonderItem_Update(Actor* thisx, GlobalContext* globalCtx) { 128, 128, 128, 0, 128, 0, 128, 0, 128, 0, 128, 0, 0, 0, 128, 0, 0, 0, 128, }; // These seem to be mistyped. Logically they should be s16[13][3] and be indexed as [colorIndex][i] s32 pad; - EnWonderItem* this = THIS; + EnWonderItem* this = (EnWonderItem*)thisx; s32 colorIndex; if (this->timer != 0) { 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 e370809ead..63deb4c95d 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 @@ -9,8 +9,6 @@ #define FLAGS 0x08000009 -#define THIS ((EnWonderTalk*)thisx) - void EnWonderTalk_Init(Actor* thisx, GlobalContext* globalCtx); void EnWonderTalk_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnWonderTalk_Update(Actor* thisx, GlobalContext* globalCtx); @@ -35,7 +33,7 @@ void EnWonderTalk_Destroy(Actor* thisx, GlobalContext* globalCtx) { } void EnWonderTalk_Init(Actor* thisx, GlobalContext* globalCtx) { - EnWonderTalk* this = THIS; + EnWonderTalk* this = (EnWonderTalk*)thisx; osSyncPrintf("\n\n"); // "Special conversation" @@ -233,7 +231,7 @@ void func_80B395F0(EnWonderTalk* this, GlobalContext* globalCtx) { } void EnWonderTalk_Update(Actor* thisx, GlobalContext* globalCtx) { - EnWonderTalk* this = THIS; + EnWonderTalk* this = (EnWonderTalk*)thisx; if (this->unk_158 != 0) { this->unk_158--; 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 2a915b1bbf..ec65d8dda7 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 @@ -9,8 +9,6 @@ #define FLAGS 0x08000009 -#define THIS ((EnWonderTalk2*)thisx) - void EnWonderTalk2_Init(Actor* thisx, GlobalContext* globalCtx); void EnWonderTalk2_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnWonderTalk2_Update(Actor* thisx, GlobalContext* globalCtx); @@ -40,7 +38,7 @@ void EnWonderTalk2_Destroy(Actor* thisx, GlobalContext* globalCtx) { void EnWonderTalk2_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnWonderTalk2* this = THIS; + EnWonderTalk2* this = (EnWonderTalk2*)thisx; osSyncPrintf("\n\n"); // "Transparent message" @@ -270,7 +268,7 @@ void EnWonderTalk2_DoNothing(EnWonderTalk2* this, GlobalContext* globalCtx) { void EnWonderTalk2_Update(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnWonderTalk2* this = THIS; + EnWonderTalk2* this = (EnWonderTalk2*)thisx; this->actionFunc(this, globalCtx); this->actor.world.pos.y = this->initPos.y; 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 bbd3184f98..472a3f9080 100644 --- a/src/overlays/actors/ovl_En_Wood02/z_en_wood02.c +++ b/src/overlays/actors/ovl_En_Wood02/z_en_wood02.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000000 -#define THIS ((EnWood02*)thisx) - void EnWood02_Init(Actor* thisx, GlobalContext* globalCtx); void EnWood02_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnWood02_Update(Actor* thisx, GlobalContext* globalCtx); @@ -164,7 +162,7 @@ void EnWood02_Init(Actor* thisx, GlobalContext* globalCtx2) { s16 spawnType; f32 actorScale; GlobalContext* globalCtx = globalCtx2; - EnWood02* this = THIS; + EnWood02* this = (EnWood02*)thisx; CollisionPoly* outPoly; s32 bgId; f32 floorY; @@ -293,7 +291,7 @@ void EnWood02_Init(Actor* thisx, GlobalContext* globalCtx2) { } void EnWood02_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnWood02* this = THIS; + EnWood02* this = (EnWood02*)thisx; if (this->actor.params <= WOOD_TREE_KAKARIKO_ADULT) { Collider_DestroyCylinder(globalCtx, &this->collider); @@ -302,7 +300,7 @@ void EnWood02_Destroy(Actor* thisx, GlobalContext* globalCtx) { void EnWood02_Update(Actor* thisx, GlobalContext* globalCtx2) { GlobalContext* globalCtx = globalCtx2; - EnWood02* this = THIS; + EnWood02* this = (EnWood02*)thisx; f32 wobbleAmplitude; u8 new_var; u8 phi_v0; @@ -414,7 +412,7 @@ void EnWood02_Update(Actor* thisx, GlobalContext* globalCtx2) { } void EnWood02_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnWood02* this = THIS; + EnWood02* this = (EnWood02*)thisx; s16 type; GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; u8 red; 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 d0263f20d7..c42326db7d 100644 --- a/src/overlays/actors/ovl_En_Xc/z_en_xc.c +++ b/src/overlays/actors/ovl_En_Xc/z_en_xc.c @@ -16,8 +16,6 @@ #define FLAGS 0x00000010 -#define THIS ((EnXc*)thisx) - void EnXc_Init(Actor* thisx, GlobalContext* globalCtx); void EnXc_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnXc_Update(Actor* thisx, GlobalContext* globalCtx); @@ -56,14 +54,14 @@ static void* sEyeTextures[] = { }; void EnXc_InitCollider(Actor* thisx, GlobalContext* globalCtx) { - EnXc* this = THIS; + EnXc* this = (EnXc*)thisx; Collider_InitCylinder(globalCtx, &this->collider); Collider_SetCylinderType1(globalCtx, &this->collider, &this->actor, &sCylinderInit); } void EnXc_UpdateCollider(Actor* thisx, GlobalContext* globalCtx) { - EnXc* this = THIS; + EnXc* this = (EnXc*)thisx; Collider* colliderBase = &this->collider.base; s32 pad[3]; @@ -72,7 +70,7 @@ void EnXc_UpdateCollider(Actor* thisx, GlobalContext* globalCtx) { } void EnXc_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnXc* this = THIS; + EnXc* this = (EnXc*)thisx; Collider_DestroyCylinder(globalCtx, &this->collider); } @@ -1050,7 +1048,7 @@ void func_80B3E87C(Gfx** dList, EnXc* this) { s32 EnXc_PullingOutHarpOverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - EnXc* this = THIS; + EnXc* this = (EnXc*)thisx; if (limbIndex == 12) { func_80B3E87C(dList, this); @@ -1061,7 +1059,7 @@ s32 EnXc_PullingOutHarpOverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, s32 EnXc_HarpOverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - EnXc* this = THIS; + EnXc* this = (EnXc*)thisx; if (limbIndex == 12) { *dList = gSheikHarpDL; @@ -1071,7 +1069,7 @@ s32 EnXc_HarpOverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dLi } void EnXc_DrawPullingOutHarp(Actor* thisx, GlobalContext* globalCtx) { - EnXc* this = THIS; + EnXc* this = (EnXc*)thisx; s32 pad; s16 eyePattern = this->eyeIdx; void* eyeTexture = sEyeTextures[eyePattern]; @@ -1093,7 +1091,7 @@ void EnXc_DrawPullingOutHarp(Actor* thisx, GlobalContext* globalCtx) { } void EnXc_DrawHarp(Actor* thisx, GlobalContext* globalCtx) { - EnXc* this = THIS; + EnXc* this = (EnXc*)thisx; s32 pad; s16 eyePattern = this->eyeIdx; void* eyeTexture = sEyeTextures[eyePattern]; @@ -1531,7 +1529,7 @@ void func_80B3FA2C(void) { } void EnXc_PlayTriforceSFX(Actor* thisx, GlobalContext* globalCtx) { - EnXc* this = THIS; + EnXc* this = (EnXc*)thisx; if (this->unk_2A8) { s32 pad; @@ -1555,7 +1553,7 @@ void func_80B3FAE0(EnXc* this) { } void EnXc_CalcTriforce(Actor* thisx, GlobalContext* globalCtx) { - EnXc* this = THIS; + EnXc* this = (EnXc*)thisx; if (EnXc_CompareCsAction(this, globalCtx, 21, 4)) { this->unk_274 = 1; @@ -1695,7 +1693,7 @@ s32 EnXc_TriforceOverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** void EnXc_TriforcePostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) { s32 pad[2]; - EnXc* this = THIS; + EnXc* this = (EnXc*)thisx; if (limbIndex == 15) { Vec3f vec = { 0.0f, 0.0f, 0.0f }; @@ -1706,7 +1704,7 @@ void EnXc_TriforcePostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dL } void EnXc_DrawTriforce(Actor* thisx, GlobalContext* globalCtx) { - EnXc* this = THIS; + EnXc* this = (EnXc*)thisx; s32 pad; s16 eyeIdx = this->eyeIdx; void* eyeTexture = sEyeTextures[eyeIdx]; @@ -1780,7 +1778,7 @@ void EnXc_SetCrySFX(EnXc* this, GlobalContext* globalCtx) { } void func_80B406F8(Actor* thisx) { - EnXc* this = THIS; + EnXc* this = (EnXc*)thisx; this->action = SHEIK_ACTION_NOCTURNE_INIT; this->drawMode = SHEIK_DRAW_NOTHING; @@ -1802,7 +1800,7 @@ void EnXc_SetupIdleInNocturne(EnXc* this, GlobalContext* globalCtx) { } void EnXc_SetupDefenseStance(Actor* thisx) { - EnXc* this = THIS; + EnXc* this = (EnXc*)thisx; SkelAnime* skelAnime = &this->skelAnime; f32 frameCount = Animation_GetLastFrame(&gSheikDefenseStanceAnim); @@ -1952,7 +1950,7 @@ s32 EnXc_SetupNocturneState(Actor* thisx, GlobalContext* globalCtx) { if (npcAction != NULL) { s32 action = npcAction->action; - EnXc* this = THIS; + EnXc* this = (EnXc*)thisx; s32 prevAction = this->unk_26C; if (action != prevAction) { @@ -2132,7 +2130,7 @@ void EnXc_KillInNocturneCS(EnXc* this, GlobalContext* globalCtx) { } void EnXc_DrawSquintingEyes(Actor* thisx, GlobalContext* globalCtx) { - EnXc* this = THIS; + EnXc* this = (EnXc*)thisx; SkelAnime* skelAnime = &this->skelAnime; GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; @@ -2292,7 +2290,7 @@ static EnXcActionFunc sActionFuncs[] = { }; void EnXc_Update(Actor* thisx, GlobalContext* globalCtx) { - EnXc* this = THIS; + EnXc* this = (EnXc*)thisx; s32 action = this->action; if ((action < 0) || (action >= ARRAY_COUNT(sActionFuncs)) || (sActionFuncs[action] == NULL)) { @@ -2303,7 +2301,7 @@ void EnXc_Update(Actor* thisx, GlobalContext* globalCtx) { } void EnXc_Init(Actor* thisx, GlobalContext* globalCtx) { - EnXc* this = THIS; + EnXc* this = (EnXc*)thisx; ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f); SkelAnime_InitFlex(globalCtx, &this->skelAnime, &gSheikSkel, &gSheikIdleAnim, this->jointTable, this->morphTable, @@ -2348,7 +2346,7 @@ void EnXc_Init(Actor* thisx, GlobalContext* globalCtx) { } s32 EnXc_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - EnXc* this = THIS; + EnXc* this = (EnXc*)thisx; if (this->unk_30C != 0) { if (limbIndex == 9) { @@ -2364,7 +2362,7 @@ s32 EnXc_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, void EnXc_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) { if (limbIndex == 16) { - EnXc* this = THIS; + EnXc* this = (EnXc*)thisx; Vec3f src = { 0.0f, 10.0f, 0.0f }; Vec3f dest; @@ -2383,7 +2381,7 @@ void EnXc_DrawNothing(Actor* thisx, GlobalContext* globalCtx) { void EnXc_DrawDefault(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnXc* this = THIS; + EnXc* this = (EnXc*)thisx; s16 eyeIdx = this->eyeIdx; void* eyeSegment = sEyeTextures[eyeIdx]; SkelAnime* skelAnime = &this->skelAnime; @@ -2406,7 +2404,7 @@ static EnXcDrawFunc sDrawFuncs[] = { }; void EnXc_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnXc* this = THIS; + EnXc* this = (EnXc*)thisx; if (this->drawMode < 0 || this->drawMode > 5 || sDrawFuncs[this->drawMode] == NULL) { // "Draw mode is abnormal!!!!!!!!!!!!!!!!!!!!!!!!!" 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 22c695f116..68e065a458 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 @@ -9,8 +9,6 @@ #define FLAGS 0x00000000 -#define THIS ((EnYabusameMark*)thisx) - void EnYabusameMark_Init(Actor* thisx, GlobalContext* globalCtx); void EnYabusameMark_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnYabusameMark_Update(Actor* thisx, GlobalContext* globalCtx); @@ -72,13 +70,13 @@ static f32 sRingDistance[] = { }; void EnYabusameMark_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnYabusameMark* this = THIS; + EnYabusameMark* this = (EnYabusameMark*)thisx; Collider_DestroyQuad(globalCtx, &this->collider); } void EnYabusameMark_Init(Actor* thisx, GlobalContext* globalCtx) { - EnYabusameMark* this = THIS; + EnYabusameMark* this = (EnYabusameMark*)thisx; osSyncPrintf("\n\n"); osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ やぶさめまと ☆☆☆☆☆ %x\n" VT_RST, this->actor.params); @@ -188,7 +186,7 @@ void func_80B42F74(EnYabusameMark* this, GlobalContext* globalCtx) { } void EnYabusameMark_Update(Actor* thisx, GlobalContext* globalCtx) { - EnYabusameMark* this = THIS; + EnYabusameMark* this = (EnYabusameMark*)thisx; Vec3f* vertexArray; u32 arrayIndex; 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 463dee20da..347114a42c 100644 --- a/src/overlays/actors/ovl_En_Yukabyun/z_en_yukabyun.c +++ b/src/overlays/actors/ovl_En_Yukabyun/z_en_yukabyun.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000010 -#define THIS ((EnYukabyun*)thisx) - void EnYukabyun_Init(Actor* thisx, GlobalContext* globalCtx); void EnYukabyun_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnYukabyun_Update(Actor* thisx, GlobalContext* globalCtx); @@ -60,7 +58,7 @@ static InitChainEntry sInitChain[] = { static void* D_80B43F64[] = { gFloorTileEnemyTopTex, gFloorTileEnemyBottomTex }; void EnYukabyun_Init(Actor* thisx, GlobalContext* globalCtx) { - EnYukabyun* this = THIS; + EnYukabyun* this = (EnYukabyun*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 0.4f); @@ -73,7 +71,7 @@ void EnYukabyun_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnYukabyun_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnYukabyun* this = THIS; + EnYukabyun* this = (EnYukabyun*)thisx; Collider_DestroyCylinder(globalCtx, &this->collider); } @@ -115,7 +113,7 @@ void EnYukabyun_Break(EnYukabyun* this, GlobalContext* globalCtx) { } void EnYukabyun_Update(Actor* thisx, GlobalContext* globalCtx) { - EnYukabyun* this = THIS; + EnYukabyun* this = (EnYukabyun*)thisx; s32 pad; if (((this->collider.base.atFlags & AT_HIT) || (this->collider.base.acFlags & AC_HIT) || @@ -146,7 +144,7 @@ void EnYukabyun_Update(Actor* thisx, GlobalContext* globalCtx) { } void EnYukabyun_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnYukabyun* this = THIS; + EnYukabyun* this = (EnYukabyun*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_yukabyun.c", 366); 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 423af4af3b..eb694b225c 100644 --- a/src/overlays/actors/ovl_En_Zf/z_en_zf.c +++ b/src/overlays/actors/ovl_En_Zf/z_en_zf.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000015 -#define THIS ((EnZf*)thisx) - void EnZf_Init(Actor* thisx, GlobalContext* globalCtx); void EnZf_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnZf_Update(Actor* thisx, GlobalContext* globalCtx); @@ -276,7 +274,7 @@ s16 EnZf_SecondaryFloorCheck(EnZf* this, GlobalContext* globalCtx, f32 dist) { void EnZf_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnZf* this = THIS; + EnZf* this = (EnZf*)thisx; Player* player = GET_PLAYER(globalCtx); EffectBlureInit1 blureInit; f32 posDiff; @@ -354,7 +352,7 @@ void EnZf_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnZf_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnZf* this = THIS; + EnZf* this = (EnZf*)thisx; if ((this->actor.params >= ENZF_TYPE_LIZALFOS_MINIBOSS_A) /* miniboss */ && (Actor_FindNearby(globalCtx, &this->actor, ACTOR_EN_ZF, ACTORCAT_ENEMY, 10000.0f) == NULL)) { @@ -2023,7 +2021,7 @@ void EnZf_UpdateDamage(EnZf* this, GlobalContext* globalCtx) { void EnZf_Update(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnZf* this = THIS; + EnZf* this = (EnZf*)thisx; s32 pad2; EnZf_UpdateDamage(this, globalCtx); @@ -2118,7 +2116,7 @@ void EnZf_Update(Actor* thisx, GlobalContext* globalCtx) { s32 EnZf_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx, Gfx** gfx) { - EnZf* this = THIS; + EnZf* this = (EnZf*)thisx; switch (limbIndex) { case ENZF_LIMB_HEAD_ROOT: @@ -2153,7 +2151,7 @@ void EnZf_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec static Vec3f zeroVec = { 0.0f, 0.0f, 0.0f }; Vec3f sp54; Vec3f sp48; - EnZf* this = THIS; + EnZf* this = (EnZf*)thisx; s32 bodyPart = -1; if (limbIndex == ENZF_LIMB_SWORD) { @@ -2232,7 +2230,7 @@ static Gfx D_80B4A2F8[] = { void EnZf_Draw(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnZf* this = THIS; + EnZf* this = (EnZf*)thisx; ; // Extra ";" required for matching. Cannot be if (1) {} or the like. Typo? OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_zf.c", 3533); 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 55ca72a732..439dfafc54 100644 --- a/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c +++ b/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000019 -#define THIS ((EnZl1*)thisx) - void EnZl1_Init(Actor* thisx, GlobalContext* globalCtx); void EnZl1_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnZl1_Update(Actor* thisx, GlobalContext* globalCtx); @@ -77,7 +75,7 @@ void func_80B4AB48(void) { void EnZl1_Init(Actor* thisx, GlobalContext* globalCtx) { f32 frameCount; - EnZl1* this = THIS; + EnZl1* this = (EnZl1*)thisx; frameCount = Animation_GetLastFrame(&gChildZelda1Anim_12118); SkelAnime_InitFlex(globalCtx, &this->skelAnime, &gChildZelda1Skel, NULL, NULL, NULL, 0); @@ -114,7 +112,7 @@ void EnZl1_Init(Actor* thisx, GlobalContext* globalCtx) { } void EnZl1_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnZl1* this = THIS; + EnZl1* this = (EnZl1*)thisx; SkelAnime_Free(&this->skelAnime, globalCtx); Collider_DestroyCylinder(globalCtx, &this->collider); @@ -568,7 +566,7 @@ void func_80B4BF2C(EnZl1* this, GlobalContext* globalCtx) { void EnZl1_Update(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnZl1* this = THIS; + EnZl1* this = (EnZl1*)thisx; if ((this->actionFunc != func_80B4B8B4) && (this->actionFunc != func_80B4BC78)) { SkelAnime_Update(&this->skelAnime); @@ -586,7 +584,7 @@ void EnZl1_Update(Actor* thisx, GlobalContext* globalCtx) { } s32 EnZl1_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - EnZl1* this = THIS; + EnZl1* this = (EnZl1*)thisx; if ((limbIndex == 4) || (limbIndex == 3) || (limbIndex == 6) || (limbIndex == 5)) { *dList = NULL; @@ -608,7 +606,7 @@ s32 EnZl1_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, void EnZl1_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) { Vec3f vec = { 0.0f, 0.0f, 0.0f }; - EnZl1* this = THIS; + EnZl1* this = (EnZl1*)thisx; if (limbIndex == 17) { Matrix_MultVec3f(&vec, &this->actor.focus.pos); @@ -616,7 +614,7 @@ void EnZl1_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Ve } void EnZl1_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnZl1* this = THIS; + EnZl1* this = (EnZl1*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_girlB.c", 2011); 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 82a9540104..c87086e7d5 100644 --- a/src/overlays/actors/ovl_En_Zl2/z_en_zl2.c +++ b/src/overlays/actors/ovl_En_Zl2/z_en_zl2.c @@ -13,8 +13,6 @@ #define FLAGS 0x00000010 -#define THIS ((EnZl2*)thisx) - void EnZl2_Init(Actor* thisx, GlobalContext* globalCtx); void EnZl2_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnZl2_Update(Actor* thisx, GlobalContext* globalCtx); @@ -100,7 +98,7 @@ const ActorInit En_Zl2_InitVars = { }; void EnZl2_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnZl2* this = THIS; + EnZl2* this = (EnZl2*)thisx; SkelAnime_Free(&this->skelAnime, globalCtx); } @@ -437,7 +435,7 @@ void func_80B4F230(EnZl2* this, s16 arg1, s32 arg2) { s32 func_80B4F45C(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx, Gfx** gfx) { s32 pad; - EnZl2* this = THIS; + EnZl2* this = (EnZl2*)thisx; Mtx* sp74; MtxF sp34; Vec3s sp2C; @@ -535,7 +533,7 @@ s32 func_80B4F45C(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* p } void EnZl2_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx, Gfx** gfx) { - EnZl2* this = THIS; + EnZl2* this = (EnZl2*)thisx; s32 pad[2]; if (limbIndex == 10) { @@ -1588,7 +1586,7 @@ void func_80B521A0(EnZl2* this, GlobalContext* globalCtx) { } void EnZl2_Update(Actor* thisx, GlobalContext* globalCtx) { - EnZl2* this = THIS; + EnZl2* this = (EnZl2*)thisx; if (this->action < 0 || this->action >= 0x24 || sActionFuncs[this->action] == NULL) { osSyncPrintf(VT_FGCOL(RED) "メインモードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST); @@ -1598,7 +1596,7 @@ void EnZl2_Update(Actor* thisx, GlobalContext* globalCtx) { } void EnZl2_Init(Actor* thisx, GlobalContext* globalCtx) { - EnZl2* this = THIS; + EnZl2* this = (EnZl2*)thisx; ActorShape* shape = &thisx->shape; s32 pad; @@ -1618,7 +1616,7 @@ void EnZl2_Init(Actor* thisx, GlobalContext* globalCtx) { s32 EnZl2_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx, Gfx** gfx) { - EnZl2* this = THIS; + EnZl2* this = (EnZl2*)thisx; if (this->overrideLimbDrawConfig < 0 || this->overrideLimbDrawConfig > 0 || sOverrideLimbDrawFuncs[this->overrideLimbDrawConfig] == NULL) { @@ -1684,7 +1682,7 @@ void func_80B525D4(EnZl2* this, GlobalContext* globalCtx) { } void EnZl2_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnZl2* this = THIS; + EnZl2* this = (EnZl2*)thisx; if ((this->drawConfig < 0) || (this->drawConfig >= 3) || (sDrawFuncs[this->drawConfig] == NULL)) { osSyncPrintf(VT_FGCOL(RED) "描画モードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST); 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 3bf542ca9f..2a1d9afd49 100644 --- a/src/overlays/actors/ovl_En_Zl3/z_en_zl3.c +++ b/src/overlays/actors/ovl_En_Zl3/z_en_zl3.c @@ -14,8 +14,6 @@ #define FLAGS 0x00000010 -#define THIS ((EnZl3*)thisx) - void EnZl3_Init(Actor* thisx, GlobalContext* globalCtx); void EnZl3_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnZl3_Update(Actor* thisx, GlobalContext* globalCtx); @@ -67,7 +65,7 @@ static Vec3f D_80B5A4B0 = { 42.0f, 260.0f, 13.0f }; static u32 D_80B5A4BC = 0; void func_80B533B0(Actor* thisx, GlobalContext* globalCtx) { - EnZl3* this = THIS; + EnZl3* this = (EnZl3*)thisx; Collider_InitCylinder(globalCtx, &this->collider); Collider_SetCylinderType1(globalCtx, &this->collider, &this->actor, &sCylinderInit); @@ -82,7 +80,7 @@ void func_80B533FC(EnZl3* this, GlobalContext* globalCtx) { } void EnZl3_Destroy(Actor* thisx, GlobalContext* globalCtx) { - EnZl3* this = THIS; + EnZl3* this = (EnZl3*)thisx; Collider_DestroyCylinder(globalCtx, &this->collider); } @@ -212,7 +210,7 @@ void func_80B53974(EnZl3* this, u8 arg1) { } void func_80B53980(EnZl3* thisx, s16 y, s32 idx) { - EnZl3* this = THIS; // this function might take thisx + EnZl3* this = (EnZl3*)thisx; // this function might take thisx s32 action = this->action; s16 y2 = y; s32 yTemp; @@ -600,7 +598,7 @@ void func_80B54360(EnZl3* this, s16 arg1, s32 arg2) { s32 func_80B5458C(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx, Gfx** gfx) { s32 pad[3]; - EnZl3* this = THIS; + EnZl3* this = (EnZl3*)thisx; s16* unk_28C = this->unk_28C; Mtx* sp78; MtxF sp38; @@ -702,7 +700,7 @@ s32 func_80B5458C(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* p } void EnZl3_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx, Gfx** gfx) { - EnZl3* this = THIS; + EnZl3* this = (EnZl3*)thisx; s32 pad; Vec3f sp34; s32 pad2; @@ -2449,7 +2447,7 @@ s32 func_80B5944C(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* p Gfx** gfx) { if (limbIndex == 14) { Mtx* mtx = Graph_Alloc(globalCtx->state.gfxCtx, sizeof(Mtx) * 7); - EnZl3* this = THIS; + EnZl3* this = (EnZl3*)thisx; Vec3s* vec = &this->unk_3F8.unk_08; gSPSegment(gfx[0]++, 0x0C, mtx); @@ -2645,7 +2643,7 @@ static EnZl3ActionFunc sActionFuncs[] = { }; void EnZl3_Update(Actor* thisx, GlobalContext* globalCtx) { - EnZl3* this = THIS; + EnZl3* this = (EnZl3*)thisx; if (this->action < 0 || this->action >= ARRAY_COUNT(sActionFuncs) || sActionFuncs[this->action] == NULL) { osSyncPrintf(VT_FGCOL(RED) "メインモードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST); @@ -2655,7 +2653,7 @@ void EnZl3_Update(Actor* thisx, GlobalContext* globalCtx) { } void EnZl3_Init(Actor* thisx, GlobalContext* globalCtx) { - EnZl3* this = THIS; + EnZl3* this = (EnZl3*)thisx; ActorShape* shape = &this->actor.shape; s32 pad; @@ -2684,7 +2682,7 @@ static OverrideLimbDraw sOverrideLimbDrawFuncs[] = { s32 EnZl3_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx, Gfx** gfx) { - EnZl3* this = THIS; + EnZl3* this = (EnZl3*)thisx; if (this->unk_308 < 0 || this->unk_308 >= ARRAY_COUNT(sOverrideLimbDrawFuncs) || sOverrideLimbDrawFuncs[this->unk_308] == NULL) { @@ -2754,7 +2752,7 @@ static EnZl3DrawFunc sDrawFuncs[] = { }; void EnZl3_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnZl3* this = THIS; + EnZl3* this = (EnZl3*)thisx; if (this->drawConfig < 0 || this->drawConfig >= 3 || sDrawFuncs[this->drawConfig] == NULL) { osSyncPrintf(VT_FGCOL(RED) "描画モードがおかしい!!!!!!!!!!!!!!!!!!!!!!!!!\n" VT_RST); 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 de1e29ae68..a51281f623 100644 --- a/src/overlays/actors/ovl_En_Zl4/z_en_zl4.c +++ b/src/overlays/actors/ovl_En_Zl4/z_en_zl4.c @@ -10,8 +10,6 @@ #define FLAGS 0x00000019 -#define THIS ((EnZl4*)thisx) - typedef enum { /* 0 */ ZL4_CS_WAIT, /* 1 */ ZL4_CS_START, @@ -360,7 +358,7 @@ s32 EnZl4_InMovingAnim(EnZl4* this) { void EnZl4_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnZl4* this = THIS; + EnZl4* this = (EnZl4*)thisx; SkelAnime_InitFlex(globalCtx, &this->skelAnime, &gChildZeldaSkel, NULL, this->jointTable, this->morphTable, 18); ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 18.0f); @@ -396,7 +394,7 @@ void EnZl4_Init(Actor* thisx, GlobalContext* globalCtx) { void EnZl4_Destroy(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnZl4* this = THIS; + EnZl4* this = (EnZl4*)thisx; Collider_DestroyCylinder(globalCtx, &this->collider); } @@ -1238,7 +1236,7 @@ void EnZl4_TheEnd(EnZl4* this, GlobalContext* globalCtx) { void EnZl4_Update(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnZl4* this = THIS; + EnZl4* this = (EnZl4*)thisx; if (this->actionFunc != EnZl4_TheEnd) { SkelAnime_Update(&this->skelAnime); @@ -1251,7 +1249,7 @@ void EnZl4_Update(Actor* thisx, GlobalContext* globalCtx) { } s32 EnZl4_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - EnZl4* this = THIS; + EnZl4* this = (EnZl4*)thisx; Vec3s sp1C; if (limbIndex == 17) { @@ -1274,7 +1272,7 @@ s32 EnZl4_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, void EnZl4_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) { Vec3f zeroVec = { 0.0f, 0.0f, 0.0f }; - EnZl4* this = THIS; + EnZl4* this = (EnZl4*)thisx; if (limbIndex == 17) { Matrix_MultVec3f(&zeroVec, &this->actor.focus.pos); @@ -1282,7 +1280,7 @@ void EnZl4_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Ve } void EnZl4_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnZl4* this = THIS; + EnZl4* this = (EnZl4*)thisx; void* mouthTex[] = { gChildZeldaMouthNeutralTex, gChildZeldaMouthHappyTex, gChildZeldaMouthWorriedTex, gChildZeldaMouthSurprisedTex }; void* eyeTex[] = { 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 936760f222..6bfaa9d6f5 100644 --- a/src/overlays/actors/ovl_En_Zo/z_en_zo.c +++ b/src/overlays/actors/ovl_En_Zo/z_en_zo.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000009 -#define THIS ((EnZo*)thisx) - typedef enum { /* 0 */ ENZO_EFFECT_NONE, /* 1 */ ENZO_EFFECT_RIPPLE, @@ -560,7 +558,7 @@ void EnZo_SetAnimation(EnZo* this) { } void EnZo_Init(Actor* thisx, GlobalContext* globalCtx) { - EnZo* this = THIS; + EnZo* this = (EnZo*)thisx; ActorShape_Init(&this->actor.shape, 0.0f, NULL, 0.0f); SkelAnime_InitFlex(globalCtx, &this->skelAnime, &gZoraSkel, NULL, this->jointTable, this->morphTable, 20); @@ -706,7 +704,7 @@ void EnZo_Dive(EnZo* this, GlobalContext* globalCtx) { } void EnZo_Update(Actor* thisx, GlobalContext* globalCtx) { - EnZo* this = THIS; + EnZo* this = (EnZo*)thisx; u32 pad; Vec3f pos; @@ -742,7 +740,7 @@ void EnZo_Update(Actor* thisx, GlobalContext* globalCtx) { s32 EnZo_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx, Gfx** gfx) { - EnZo* this = THIS; + EnZo* this = (EnZo*)thisx; Vec3s vec; if (limbIndex == 15) { @@ -768,7 +766,7 @@ s32 EnZo_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, } void EnZo_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx, Gfx** gfx) { - EnZo* this = THIS; + EnZo* this = (EnZo*)thisx; Vec3f vec = { 0.0f, 600.0f, 0.0f }; if (limbIndex == 15) { @@ -777,7 +775,7 @@ void EnZo_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec } void EnZo_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnZo* this = THIS; + EnZo* this = (EnZo*)thisx; void* eyeTextures[] = { gZoraEyeOpenTex, gZoraEyeHalfTex, gZoraEyeClosedTex }; Matrix_Push(); 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 9cc5c74a60..6cac58ed58 100644 --- a/src/overlays/actors/ovl_En_fHG/z_en_fhg.c +++ b/src/overlays/actors/ovl_En_fHG/z_en_fhg.c @@ -12,8 +12,6 @@ #define FLAGS 0x00000010 -#define THIS ((EnfHG*)thisx) - typedef struct { /* 0x00 */ Vec3f pos; /* 0x0C */ s16 yRot; @@ -74,7 +72,7 @@ static InitChainEntry sInitChain[] = { void EnfHG_Init(Actor* thisx, GlobalContext* globalCtx2) { GlobalContext* globalCtx = globalCtx2; - EnfHG* this = THIS; + EnfHG* this = (EnfHG*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); Flags_SetSwitch(globalCtx, 0x14); @@ -95,7 +93,7 @@ void EnfHG_Init(Actor* thisx, GlobalContext* globalCtx2) { void EnfHG_Destroy(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnfHG* this = THIS; + EnfHG* this = (EnfHG*)thisx; osSyncPrintf("F DT1\n"); func_800A6888(globalCtx, &this->skin); @@ -681,7 +679,7 @@ void EnfHG_Done(EnfHG* this, GlobalContext* globalCtx) { void EnfHG_Update(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - EnfHG* this = THIS; + EnfHG* this = (EnfHG*)thisx; u8 i; if (this->killActor) { @@ -714,7 +712,7 @@ void EnfHG_Noop(Actor* thisx, GlobalContext* globalCtx, PSkinAwb* skin) { } void EnfHG_Draw(Actor* thisx, GlobalContext* globalCtx) { - EnfHG* this = THIS; + EnfHG* this = (EnfHG*)thisx; BossGanondrof* bossGnd = (BossGanondrof*)this->actor.parent; s32 pad; 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 6337c66d75..ef6805425e 100644 --- a/src/overlays/actors/ovl_End_Title/z_end_title.c +++ b/src/overlays/actors/ovl_End_Title/z_end_title.c @@ -8,8 +8,6 @@ #define FLAGS 0x00000030 -#define THIS ((EndTitle*)thisx) - void EndTitle_Init(Actor* thisx, GlobalContext* globalCtx); void EndTitle_Destroy(Actor* thisx, GlobalContext* globalCtx); void EndTitle_Update(Actor* thisx, GlobalContext* globalCtx); @@ -31,7 +29,7 @@ const ActorInit End_Title_InitVars = { #include "overlays/ovl_End_Title/ovl_End_Title.c" void EndTitle_Init(Actor* thisx, GlobalContext* globalCtx) { - EndTitle* this = THIS; + EndTitle* this = (EndTitle*)thisx; this->endAlpha = 0; this->tlozAlpha = 0; @@ -50,7 +48,7 @@ void EndTitle_Update(Actor* thisx, GlobalContext* globalCtx) { // Used in the castle courtyard void EndTitle_DrawFull(Actor* thisx, GlobalContext* globalCtx) { MtxF* mf; - EndTitle* this = THIS; + EndTitle* this = (EndTitle*)thisx; s32 frameCount = globalCtx->csCtx.frames; Player* player = GET_PLAYER(globalCtx); @@ -114,7 +112,7 @@ void EndTitle_DrawFull(Actor* thisx, GlobalContext* globalCtx) { // Used in the Temple of Time void EndTitle_DrawNintendoLogo(Actor* thisx, GlobalContext* globalCtx) { - EndTitle* this = THIS; + EndTitle* this = (EndTitle*)thisx; s32 pad; s32 frames = globalCtx->csCtx.frames; diff --git a/src/overlays/actors/ovl_Fishing/z_fishing.c b/src/overlays/actors/ovl_Fishing/z_fishing.c index f942e4e6a1..23271c16ff 100644 --- a/src/overlays/actors/ovl_Fishing/z_fishing.c +++ b/src/overlays/actors/ovl_Fishing/z_fishing.c @@ -12,8 +12,6 @@ #define FLAGS 0x00000010 -#define THIS ((Fishing*)thisx) - #define WATER_SURFACE_Y(globalCtx) globalCtx->colCtx.colHeader->waterBoxes->ySurface void Fishing_Init(Actor* thisx, GlobalContext* globalCtx); @@ -815,7 +813,7 @@ static InitChainEntry sInitChain[] = { void Fishing_Init(Actor* thisx, GlobalContext* globalCtx2) { GlobalContext* globalCtx = globalCtx2; - Fishing* this = THIS; + Fishing* this = (Fishing*)thisx; u16 fishCount; s16 i; @@ -1011,7 +1009,7 @@ void Fishing_Init(Actor* thisx, GlobalContext* globalCtx2) { void Fishing_Destroy(Actor* thisx, GlobalContext* globalCtx2) { GlobalContext* globalCtx = globalCtx2; - Fishing* this = THIS; + Fishing* this = (Fishing*)thisx; SkelAnime_Free(&this->skelAnime, globalCtx); @@ -2888,7 +2886,7 @@ void Fishing_UpdateFish(Actor* thisx, GlobalContext* globalCtx2) { s16 spF2; s16 spF0; s16 spEE; - Fishing* this = THIS; + Fishing* this = (Fishing*)thisx; GlobalContext* globalCtx = globalCtx2; Player* player = GET_PLAYER(globalCtx); Input* input = &globalCtx->state.input[0]; @@ -4205,7 +4203,7 @@ void Fishing_UpdateFish(Actor* thisx, GlobalContext* globalCtx2) { s32 Fishing_FishOverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - Fishing* this = THIS; + Fishing* this = (Fishing*)thisx; if (limbIndex == 0xD) { rot->z -= this->unk_170 - 11000; @@ -4227,7 +4225,7 @@ s32 Fishing_FishOverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** } void Fishing_FishPostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) { - Fishing* this = THIS; + Fishing* this = (Fishing*)thisx; if (limbIndex == 0xD) { Matrix_MultVec3f(&sFishMouthOffset, &this->fishMouthPos); @@ -4236,7 +4234,7 @@ void Fishing_FishPostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dLi s32 Fishing_LoachOverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - Fishing* this = THIS; + Fishing* this = (Fishing*)thisx; if (limbIndex == 3) { rot->y += this->unk_1CC[0]; @@ -4251,7 +4249,7 @@ s32 Fishing_LoachOverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** void Fishing_LoachPostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) { static Vec3f sLoachMouthOffset = { 500.0f, 500.0f, 0.0f }; - Fishing* this = THIS; + Fishing* this = (Fishing*)thisx; if (limbIndex == 0xB) { Matrix_MultVec3f(&sLoachMouthOffset, &this->fishMouthPos); @@ -4259,7 +4257,7 @@ void Fishing_LoachPostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dL } void Fishing_DrawFish(Actor* thisx, GlobalContext* globalCtx) { - Fishing* this = THIS; + Fishing* this = (Fishing*)thisx; func_80093D18(globalCtx->state.gfxCtx); @@ -5077,7 +5075,7 @@ static Vec3s sSinkingLureLocationPos[] = { void Fishing_UpdateOwner(Actor* thisx, GlobalContext* globalCtx2) { GlobalContext* globalCtx = globalCtx2; - Fishing* this = THIS; + Fishing* this = (Fishing*)thisx; Vec3f sp114; Vec3f sp108; Vec3f spFC; @@ -5687,7 +5685,7 @@ void Fishing_UpdateOwner(Actor* thisx, GlobalContext* globalCtx2) { s32 Fishing_OwnerOverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { - Fishing* this = THIS; + Fishing* this = (Fishing*)thisx; if (limbIndex == 8) { // Head rot->x -= this->unk_164; @@ -5719,7 +5717,7 @@ static void* sFishingOwnerEyeTexs[] = { void Fishing_DrawOwner(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - Fishing* this = THIS; + Fishing* this = (Fishing*)thisx; Input* input = &globalCtx->state.input[0]; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_fishing.c", 9156); 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 531b1de8f3..ff850862db 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 @@ -9,8 +9,6 @@ #define FLAGS 0x00000000 -#define THIS ((ItemBHeart*)thisx) - void ItemBHeart_Init(Actor* thisx, GlobalContext* globalCtx); void ItemBHeart_Destroy(Actor* thisx, GlobalContext* globalCtx); void ItemBHeart_Update(Actor* thisx, GlobalContext* globalCtx); @@ -38,7 +36,7 @@ static InitChainEntry sInitChain[] = { }; void ItemBHeart_Init(Actor* thisx, GlobalContext* globalCtx) { - ItemBHeart* this = THIS; + ItemBHeart* this = (ItemBHeart*)thisx; if (Flags_GetCollectible(globalCtx, 0x1F)) { Actor_Kill(&this->actor); @@ -52,7 +50,7 @@ void ItemBHeart_Destroy(Actor* thisx, GlobalContext* globalCtx) { } void ItemBHeart_Update(Actor* thisx, GlobalContext* globalCtx) { - ItemBHeart* this = THIS; + ItemBHeart* this = (ItemBHeart*)thisx; func_80B85264(this, globalCtx); Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 0.0f, 0.0f, 0.0f, 4); @@ -78,7 +76,7 @@ void func_80B85264(ItemBHeart* this, GlobalContext* globalCtx) { } void ItemBHeart_Draw(Actor* thisx, GlobalContext* globalCtx) { - ItemBHeart* this = THIS; + ItemBHeart* this = (ItemBHeart*)thisx; Actor* actorIt; u8 flag = false; 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 0eda44cb07..a772a0aa1c 100644 --- a/src/overlays/actors/ovl_Item_Etcetera/z_item_etcetera.c +++ b/src/overlays/actors/ovl_Item_Etcetera/z_item_etcetera.c @@ -8,8 +8,6 @@ #define FLAGS 0x00000010 -#define THIS ((ItemEtcetera*)thisx) - void ItemEtcetera_Init(Actor* thisx, GlobalContext* globalCtx); void ItemEtcetera_Destroy(Actor* thisx, GlobalContext* globalCtx); void ItemEtcetera_Update(Actor* thisx, GlobalContext* globalCtx); @@ -59,7 +57,7 @@ void ItemEtcetera_SetupAction(ItemEtcetera* this, ItemEtceteraActionFunc actionF } void ItemEtcetera_Init(Actor* thisx, GlobalContext* globalCtx) { - ItemEtcetera* this = THIS; + ItemEtcetera* this = (ItemEtcetera*)thisx; s32 pad; s32 type; s32 objBankIndex; @@ -197,12 +195,12 @@ void ItemEtcetera_UpdateFireArrow(ItemEtcetera* this, GlobalContext* globalCtx) } void ItemEtcetera_Update(Actor* thisx, GlobalContext* globalCtx) { - ItemEtcetera* this = THIS; + ItemEtcetera* this = (ItemEtcetera*)thisx; this->actionFunc(this, globalCtx); } void ItemEtcetera_DrawThroughLens(Actor* thisx, GlobalContext* globalCtx) { - ItemEtcetera* this = THIS; + ItemEtcetera* this = (ItemEtcetera*)thisx; if (globalCtx->actorCtx.unk_03 != 0) { func_8002EBCC(&this->actor, globalCtx, 0); func_8002ED80(&this->actor, globalCtx, 0); @@ -211,7 +209,7 @@ void ItemEtcetera_DrawThroughLens(Actor* thisx, GlobalContext* globalCtx) { } void ItemEtcetera_Draw(Actor* thisx, GlobalContext* globalCtx) { - ItemEtcetera* this = THIS; + ItemEtcetera* this = (ItemEtcetera*)thisx; func_8002EBCC(&this->actor, globalCtx, 0); func_8002ED80(&this->actor, globalCtx, 0); 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 683b24477d..dbd5fa1d94 100644 --- a/src/overlays/actors/ovl_Item_Inbox/z_item_inbox.c +++ b/src/overlays/actors/ovl_Item_Inbox/z_item_inbox.c @@ -8,8 +8,6 @@ #define FLAGS 0x00000009 -#define THIS ((ItemInbox*)thisx) - void ItemInbox_Init(Actor* thisx, GlobalContext* globalCtx); void ItemInbox_Destroy(Actor* thisx, GlobalContext* globalCtx); void ItemInbox_Update(Actor* thisx, GlobalContext* globalCtx); @@ -30,7 +28,7 @@ const ActorInit Item_Inbox_InitVars = { }; void ItemInbox_Init(Actor* thisx, GlobalContext* globalCtx) { - ItemInbox* this = THIS; + ItemInbox* this = (ItemInbox*)thisx; this->actionFunc = ItemInbox_Wait; Actor_SetScale(&this->actor, 0.2); @@ -46,13 +44,13 @@ void ItemInbox_Wait(ItemInbox* this, GlobalContext* globalCtx) { } void ItemInbox_Update(Actor* thisx, GlobalContext* globalCtx) { - ItemInbox* this = THIS; + ItemInbox* this = (ItemInbox*)thisx; this->actionFunc(this, globalCtx); } void ItemInbox_Draw(Actor* thisx, GlobalContext* globalCtx) { - ItemInbox* this = THIS; + ItemInbox* this = (ItemInbox*)thisx; func_8002EBCC(&this->actor, globalCtx, 0); func_8002ED80(&this->actor, globalCtx, 0); 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 e815da2ab6..c9d9d57bd6 100644 --- a/src/overlays/actors/ovl_Item_Ocarina/z_item_ocarina.c +++ b/src/overlays/actors/ovl_Item_Ocarina/z_item_ocarina.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000010 -#define THIS ((ItemOcarina*)thisx) - void ItemOcarina_Init(Actor* thisx, GlobalContext* globalCtx); void ItemOcarina_Destroy(Actor* thisx, GlobalContext* globalCtx); void ItemOcarina_Update(Actor* thisx, GlobalContext* globalCtx); @@ -41,7 +39,7 @@ void ItemOcarina_SetupAction(ItemOcarina* this, ItemOcarinaActionFunc actionFunc } void ItemOcarina_Init(Actor* thisx, GlobalContext* globalCtx) { - ItemOcarina* this = THIS; + ItemOcarina* this = (ItemOcarina*)thisx; s32 params = thisx->params; ActorShape_Init(&this->actor.shape, 0, 0, 0); @@ -191,13 +189,13 @@ void ItemOcarina_WaitInWater(ItemOcarina* this, GlobalContext* globalCtx) { } void ItemOcarina_Update(Actor* thisx, GlobalContext* globalCtx) { - ItemOcarina* this = THIS; + ItemOcarina* this = (ItemOcarina*)thisx; this->actionFunc(this, globalCtx); } void ItemOcarina_Draw(Actor* thisx, GlobalContext* globalCtx) { - ItemOcarina* this = THIS; + ItemOcarina* this = (ItemOcarina*)thisx; func_8002EBCC(thisx, globalCtx, 0); func_8002ED80(thisx, globalCtx, 0); 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 625be767c0..6bc87f1a2a 100644 --- a/src/overlays/actors/ovl_Item_Shield/z_item_shield.c +++ b/src/overlays/actors/ovl_Item_Shield/z_item_shield.c @@ -10,8 +10,6 @@ #define FLAGS 0x00000010 -#define THIS ((ItemShield*)thisx) - void ItemShield_Init(Actor* thisx, GlobalContext* globalCtx); void ItemShield_Destroy(Actor* thisx, GlobalContext* globalCtx); void ItemShield_Update(Actor* thisx, GlobalContext* globalCtx); @@ -60,7 +58,7 @@ void ItemShield_SetupAction(ItemShield* this, ItemShieldActionFunc actionFunc) { } void ItemShield_Init(Actor* thisx, GlobalContext* globalCtx) { - ItemShield* this = THIS; + ItemShield* this = (ItemShield*)thisx; s32 i; this->timer = 0; @@ -93,7 +91,7 @@ void ItemShield_Init(Actor* thisx, GlobalContext* globalCtx) { } void ItemShield_Destroy(Actor* thisx, GlobalContext* globalCtx) { - ItemShield* this = THIS; + ItemShield* this = (ItemShield*)thisx; Collider_DestroyCylinder(globalCtx, &this->collider); } @@ -212,13 +210,13 @@ void func_80B86F68(ItemShield* this, GlobalContext* globalCtx) { } void ItemShield_Update(Actor* thisx, GlobalContext* globalCtx) { - ItemShield* this = THIS; + ItemShield* this = (ItemShield*)thisx; this->actionFunc(this, globalCtx); } void ItemShield_Draw(Actor* thisx, GlobalContext* globalCtx) { - ItemShield* this = THIS; + ItemShield* this = (ItemShield*)thisx; if (!(this->unk_19C & 2)) { OPEN_DISPS(globalCtx->state.gfxCtx, "../z_item_shield.c", 457); 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 358ee4eded..8bab4fefa6 100644 --- a/src/overlays/actors/ovl_Magic_Dark/z_magic_dark.c +++ b/src/overlays/actors/ovl_Magic_Dark/z_magic_dark.c @@ -9,8 +9,6 @@ #define FLAGS 0x02000010 -#define THIS ((MagicDark*)thisx) - void MagicDark_Init(Actor* thisx, GlobalContext* globalCtx); void MagicDark_Destroy(Actor* thisx, GlobalContext* globalCtx); void MagicDark_OrbUpdate(Actor* thisx, GlobalContext* globalCtx); @@ -38,7 +36,7 @@ const ActorInit Magic_Dark_InitVars = { static Color_RGBA8 D_80B88B10[] = { { 50, 100, 150, 200 }, { 255, 200, 150, 100 } }; void MagicDark_Init(Actor* thisx, GlobalContext* globalCtx) { - MagicDark* this = THIS; + MagicDark* this = (MagicDark*)thisx; Player* player = GET_PLAYER(globalCtx); if (!LINK_IS_ADULT) { @@ -71,7 +69,7 @@ void MagicDark_Destroy(Actor* thisx, GlobalContext* globalCtx) { } void MagicDark_DiamondUpdate(Actor* thisx, GlobalContext* globalCtx) { - MagicDark* this = THIS; + MagicDark* this = (MagicDark*)thisx; u8 phi_a0; Player* player = GET_PLAYER(globalCtx); s16 pad; @@ -170,7 +168,7 @@ void MagicDark_DimLighting(GlobalContext* globalCtx, f32 intensity) { } void MagicDark_OrbUpdate(Actor* thisx, GlobalContext* globalCtx) { - MagicDark* this = THIS; + MagicDark* this = (MagicDark*)thisx; s32 pad; Player* player = GET_PLAYER(globalCtx); @@ -198,7 +196,7 @@ void MagicDark_OrbUpdate(Actor* thisx, GlobalContext* globalCtx) { } void MagicDark_DiamondDraw(Actor* thisx, GlobalContext* globalCtx) { - MagicDark* this = THIS; + MagicDark* this = (MagicDark*)thisx; s32 pad; u16 gameplayFrames = globalCtx->gameplayFrames; @@ -236,7 +234,7 @@ void MagicDark_DiamondDraw(Actor* thisx, GlobalContext* globalCtx) { } void MagicDark_OrbDraw(Actor* thisx, GlobalContext* globalCtx) { - MagicDark* this = THIS; + MagicDark* this = (MagicDark*)thisx; Vec3f pos; Player* player = GET_PLAYER(globalCtx); s32 pad; 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 74194c3183..a7fe449427 100644 --- a/src/overlays/actors/ovl_Magic_Fire/z_magic_fire.c +++ b/src/overlays/actors/ovl_Magic_Fire/z_magic_fire.c @@ -8,8 +8,6 @@ #define FLAGS 0x02000010 -#define THIS ((MagicFire*)thisx) - void MagicFire_Init(Actor* thisx, GlobalContext* globalCtx); void MagicFire_Destroy(Actor* thisx, GlobalContext* globalCtx); void MagicFire_Update(Actor* thisx, GlobalContext* globalCtx); @@ -77,7 +75,7 @@ static u8 sVertexIndices[] = { }; void MagicFire_Init(Actor* thisx, GlobalContext* globalCtx) { - MagicFire* this = THIS; + MagicFire* this = (MagicFire*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); this->action = 0; @@ -98,7 +96,7 @@ void MagicFire_Destroy(Actor* thisx, GlobalContext* globalCtx) { } void MagicFire_UpdateBeforeCast(Actor* thisx, GlobalContext* globalCtx) { - MagicFire* this = THIS; + MagicFire* this = (MagicFire*)thisx; Player* player = GET_PLAYER(globalCtx); if ((globalCtx->msgCtx.msgMode == MSGMODE_OCARINA_CORRECT_PLAYBACK) || @@ -116,7 +114,7 @@ void MagicFire_UpdateBeforeCast(Actor* thisx, GlobalContext* globalCtx) { } void MagicFire_Update(Actor* thisx, GlobalContext* globalCtx) { - MagicFire* this = THIS; + MagicFire* this = (MagicFire*)thisx; Player* player = GET_PLAYER(globalCtx); s32 pad; @@ -212,7 +210,7 @@ void MagicFire_Update(Actor* thisx, GlobalContext* globalCtx) { } void MagicFire_Draw(Actor* thisx, GlobalContext* globalCtx) { - MagicFire* this = THIS; + MagicFire* this = (MagicFire*)thisx; s32 pad1; u32 gameplayFrames = globalCtx->gameplayFrames; s32 pad2; 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 f0bf33f170..c805f98bbc 100644 --- a/src/overlays/actors/ovl_Magic_Wind/z_magic_wind.c +++ b/src/overlays/actors/ovl_Magic_Wind/z_magic_wind.c @@ -8,8 +8,6 @@ #define FLAGS 0x02000010 -#define THIS ((MagicWind*)thisx) - void MagicWind_Init(Actor* thisx, GlobalContext* globalCtx); void MagicWind_Destroy(Actor* thisx, GlobalContext* globalCtx); void MagicWind_Update(Actor* thisx, GlobalContext* globalCtx); @@ -44,7 +42,7 @@ void MagicWind_SetupAction(MagicWind* this, MagicWindFunc actionFunc) { } void MagicWind_Init(Actor* thisx, GlobalContext* globalCtx) { - MagicWind* this = THIS; + MagicWind* this = (MagicWind*)thisx; Player* player = GET_PLAYER(globalCtx); if (SkelCurve_Init(globalCtx, &this->skelCurve, &sSkel, &sAnim) == 0) { @@ -69,7 +67,7 @@ void MagicWind_Init(Actor* thisx, GlobalContext* globalCtx) { } void MagicWind_Destroy(Actor* thisx, GlobalContext* globalCtx) { - MagicWind* this = THIS; + MagicWind* this = (MagicWind*)thisx; SkelCurve_Destroy(globalCtx, &this->skelCurve); func_800876C8(globalCtx); // "wipe out" @@ -132,7 +130,7 @@ void MagicWind_Shrink(MagicWind* this, GlobalContext* globalCtx) { } void MagicWind_Update(Actor* thisx, GlobalContext* globalCtx) { - MagicWind* this = THIS; + MagicWind* this = (MagicWind*)thisx; if (globalCtx->msgCtx.msgMode == MSGMODE_OCARINA_CORRECT_PLAYBACK || globalCtx->msgCtx.msgMode == MSGMODE_SONG_PLAYED) { Actor_Kill(thisx); @@ -143,7 +141,7 @@ void MagicWind_Update(Actor* thisx, GlobalContext* globalCtx) { } s32 MagicWind_OverrideLimbDraw(GlobalContext* globalCtx, SkelAnimeCurve* skelCurve, s32 limbIndex, void* thisx) { - MagicWind* this = THIS; + MagicWind* this = (MagicWind*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_magic_wind.c", 615); @@ -169,7 +167,7 @@ s32 MagicWind_OverrideLimbDraw(GlobalContext* globalCtx, SkelAnimeCurve* skelCur void MagicWind_Draw(Actor* thisx, GlobalContext* globalCtx) { GraphicsContext* gfxCtx = globalCtx->state.gfxCtx; - MagicWind* this = THIS; + MagicWind* this = (MagicWind*)thisx; OPEN_DISPS(gfxCtx, "../z_magic_wind.c", 661); 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 1931cf2f2d..fc387a68ad 100644 --- a/src/overlays/actors/ovl_Mir_Ray/z_mir_ray.c +++ b/src/overlays/actors/ovl_Mir_Ray/z_mir_ray.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000030 -#define THIS ((MirRay*)thisx) - void MirRay_Init(Actor* thisx, GlobalContext* globalCtx); void MirRay_Destroy(Actor* thisx, GlobalContext* globalCtx); void MirRay_Update(Actor* thisx, GlobalContext* globalCtx); @@ -162,7 +160,7 @@ void MirRay_MakeShieldLight(MirRay* this, GlobalContext* globalCtx) { void MirRay_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - MirRay* this = THIS; + MirRay* this = (MirRay*)thisx; MirRayDataEntry* dataEntry = &sMirRayData[this->actor.params]; Actor_ProcessInitChain(&this->actor, sInitChain); @@ -227,7 +225,7 @@ void MirRay_Init(Actor* thisx, GlobalContext* globalCtx) { } void MirRay_Destroy(Actor* thisx, GlobalContext* globalCtx) { - MirRay* this = THIS; + MirRay* this = (MirRay*)thisx; LightContext_RemoveLight(globalCtx, &globalCtx->lightCtx, this->lightNode); @@ -240,7 +238,7 @@ void MirRay_Destroy(Actor* thisx, GlobalContext* globalCtx) { void MirRay_Update(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - MirRay* this = THIS; + MirRay* this = (MirRay*)thisx; Player* player = GET_PLAYER(globalCtx); D_80B8E670 = 0; @@ -482,7 +480,7 @@ void MirRay_ReflectedBeam(MirRay* this, GlobalContext* globalCtx, MirRayShieldRe } void MirRay_Draw(Actor* thisx, GlobalContext* globalCtx) { - MirRay* this = THIS; + MirRay* this = (MirRay*)thisx; Player* player = GET_PLAYER(globalCtx); s32 i; MirRayShieldReflection reflection[6]; 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 ff6d0817f7..6bf38d39ec 100644 --- a/src/overlays/actors/ovl_Obj_Bean/z_obj_bean.c +++ b/src/overlays/actors/ovl_Obj_Bean/z_obj_bean.c @@ -11,8 +11,6 @@ #define FLAGS 0x00400000 -#define THIS ((ObjBean*)thisx) - void ObjBean_Init(Actor* thisx, GlobalContext* globalCtx); void ObjBean_Destroy(Actor* thisx, GlobalContext* globalCtx); void ObjBean_Update(Actor* thisx, GlobalContext* globalCtx); @@ -128,7 +126,7 @@ static InitChainEntry sInitChain[] = { }; void ObjBean_InitCollider(Actor* thisx, GlobalContext* globalCtx) { - ObjBean* this = THIS; + ObjBean* this = (ObjBean*)thisx; Collider_InitCylinder(globalCtx, &this->collider); Collider_SetCylinder(globalCtx, &this->collider, &this->dyna.actor, &sCylinderInit); @@ -468,7 +466,7 @@ void ObjBean_Grown(ObjBean* this) { void ObjBean_Init(Actor* thisx, GlobalContext* globalCtx) { s32 path; s32 linkAge; - ObjBean* this = THIS; + ObjBean* this = (ObjBean*)thisx; Actor_ProcessInitChain(&this->dyna.actor, sInitChain); if (LINK_AGE_IN_YEARS == YEARS_ADULT) { @@ -520,7 +518,7 @@ void ObjBean_Init(Actor* thisx, GlobalContext* globalCtx) { } void ObjBean_Destroy(Actor* thisx, GlobalContext* globalCtx) { - ObjBean* this = THIS; + ObjBean* this = (ObjBean*)thisx; if (this->stateFlags & BEAN_STATE_DYNAPOLY_SET) { DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); @@ -870,7 +868,7 @@ void func_80B90A34(ObjBean* this, GlobalContext* globalCtx) { } void ObjBean_Update(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - ObjBean* this = THIS; + ObjBean* this = (ObjBean*)thisx; if (this->timer > 0) { this->timer--; @@ -930,7 +928,7 @@ void ObjBean_DrawBeanstalk(ObjBean* this, GlobalContext* globalCtx) { } void ObjBean_Draw(Actor* thisx, GlobalContext* globalCtx) { - ObjBean* this = THIS; + ObjBean* this = (ObjBean*)thisx; if (this->stateFlags & BEAN_STATE_DRAW_SOIL) { Gfx_DrawDListOpa(globalCtx, gMagicBeanSeedlingDL); 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 73cb272b98..0f1e1c6159 100644 --- a/src/overlays/actors/ovl_Obj_Blockstop/z_obj_blockstop.c +++ b/src/overlays/actors/ovl_Obj_Blockstop/z_obj_blockstop.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000000 -#define THIS ((ObjBlockstop*)thisx) - void ObjBlockstop_Init(Actor* thisx, GlobalContext* globalCtx); void ObjBlockstop_Destroy(Actor* thisx, GlobalContext* globalCtx); void ObjBlockstop_Update(Actor* thisx, GlobalContext* globalCtx); @@ -28,7 +26,7 @@ const ActorInit Obj_Blockstop_InitVars = { }; void ObjBlockstop_Init(Actor* thisx, GlobalContext* globalCtx) { - ObjBlockstop* this = THIS; + ObjBlockstop* this = (ObjBlockstop*)thisx; if (Flags_GetSwitch(globalCtx, this->actor.params)) { Actor_Kill(&this->actor); @@ -41,7 +39,7 @@ void ObjBlockstop_Destroy(Actor* thisx, GlobalContext* globalCtx) { } void ObjBlockstop_Update(Actor* thisx, GlobalContext* globalCtx) { - ObjBlockstop* this = THIS; + ObjBlockstop* this = (ObjBlockstop*)thisx; DynaPolyActor* dynaPolyActor; Vec3f sp4C; s32 bgId; 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 c3729545dc..24821cfda3 100644 --- a/src/overlays/actors/ovl_Obj_Bombiwa/z_obj_bombiwa.c +++ b/src/overlays/actors/ovl_Obj_Bombiwa/z_obj_bombiwa.c @@ -10,8 +10,6 @@ #define FLAGS 0x00000000 -#define THIS ((ObjBombiwa*)thisx) - void ObjBombiwa_Init(Actor* thisx, GlobalContext* globalCtx); void ObjBombiwa_InitCollision(Actor* thisx, GlobalContext* globalCtx); void ObjBombiwa_Destroy(Actor* thisx, GlobalContext* globalCtx); @@ -66,7 +64,7 @@ static s16 sEffectScales[] = { }; void ObjBombiwa_InitCollision(Actor* thisx, GlobalContext* globalCtx) { - ObjBombiwa* this = THIS; + ObjBombiwa* this = (ObjBombiwa*)thisx; Collider_InitCylinder(globalCtx, &this->collider); Collider_SetCylinder(globalCtx, &this->collider, &this->actor, &sCylinderInit); @@ -93,7 +91,7 @@ void ObjBombiwa_Init(Actor* thisx, GlobalContext* globalCtx) { void ObjBombiwa_Destroy(Actor* thisx, GlobalContext* globalCtx2) { GlobalContext* globalCtx = globalCtx2; - ObjBombiwa* this = THIS; + ObjBombiwa* this = (ObjBombiwa*)thisx; Collider_DestroyCylinder(globalCtx, &this->collider); } @@ -123,7 +121,7 @@ void ObjBombiwa_Break(ObjBombiwa* this, GlobalContext* globalCtx) { } void ObjBombiwa_Update(Actor* thisx, GlobalContext* globalCtx) { - ObjBombiwa* this = THIS; + ObjBombiwa* this = (ObjBombiwa*)thisx; s32 pad; if ((func_80033684(globalCtx, &this->actor) != NULL) || 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 3ed4a636a5..07da48a0d8 100644 --- a/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c +++ b/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c @@ -10,8 +10,6 @@ #define FLAGS 0x00000000 -#define THIS ((ObjComb*)thisx) - void ObjComb_Init(Actor* thisx, GlobalContext* globalCtx); void ObjComb_Destroy(Actor* thisx, GlobalContext* globalCtx); void ObjComb_Update(Actor* thisx, GlobalContext* globalCtx); @@ -149,7 +147,7 @@ void ObjComb_ChooseItemDrop(ObjComb* this, GlobalContext* globalCtx) { } void ObjComb_Init(Actor* thisx, GlobalContext* globalCtx) { - ObjComb* this = THIS; + ObjComb* this = (ObjComb*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); Collider_InitJntSph(globalCtx, &this->collider); @@ -159,7 +157,7 @@ void ObjComb_Init(Actor* thisx, GlobalContext* globalCtx) { void ObjComb_Destroy(Actor* thisx, GlobalContext* globalCtx2) { GlobalContext* globalCtx = globalCtx2; - ObjComb* this = THIS; + ObjComb* this = (ObjComb*)thisx; Collider_DestroyJntSph(globalCtx, &this->collider); } @@ -196,7 +194,7 @@ void ObjComb_Wait(ObjComb* this, GlobalContext* globalCtx) { } void ObjComb_Update(Actor* thisx, GlobalContext* globalCtx) { - ObjComb* this = THIS; + ObjComb* this = (ObjComb*)thisx; this->unk_1B2 += 0x2EE0; this->actionFunc(this, globalCtx); @@ -204,7 +202,7 @@ void ObjComb_Update(Actor* thisx, GlobalContext* globalCtx) { } void ObjComb_Draw(Actor* thisx, GlobalContext* globalCtx) { - ObjComb* this = THIS; + ObjComb* this = (ObjComb*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_obj_comb.c", 369); 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 c62649d826..1c81419ea4 100644 --- a/src/overlays/actors/ovl_Obj_Dekujr/z_obj_dekujr.c +++ b/src/overlays/actors/ovl_Obj_Dekujr/z_obj_dekujr.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000009 -#define THIS ((ObjDekujr*)thisx) - void ObjDekujr_Init(Actor* thisx, GlobalContext* globalCtx); void ObjDekujr_Destroy(Actor* thisx, GlobalContext* globalCtx); void ObjDekujr_Update(Actor* thisx, GlobalContext* globalCtx); @@ -43,7 +41,7 @@ static ColliderCylinderInitToActor sCylinderInit = { }; void ObjDekujr_Init(Actor* thisx, GlobalContext* globalCtx) { - ObjDekujr* this = THIS; + ObjDekujr* this = (ObjDekujr*)thisx; s32 pad; if (gSaveContext.cutsceneIndex < 0xFFF0) { @@ -128,7 +126,7 @@ void ObjDekujr_ComeUp(ObjDekujr* this, GlobalContext* globalCtx) { } void ObjDekujr_Update(Actor* thisx, GlobalContext* globalCtx) { - ObjDekujr* this = THIS; + ObjDekujr* this = (ObjDekujr*)thisx; s32 pad; Collider_UpdateCylinder(&this->actor, &this->collider); 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 46f5b4bb35..fd02c53416 100644 --- a/src/overlays/actors/ovl_Obj_Elevator/z_obj_elevator.c +++ b/src/overlays/actors/ovl_Obj_Elevator/z_obj_elevator.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000000 -#define THIS ((ObjElevator*)thisx) - void ObjElevator_Init(Actor* thisx, GlobalContext* globalCtx); void ObjElevator_Destroy(Actor* thisx, GlobalContext* globalCtx); void ObjElevator_Update(Actor* thisx, GlobalContext* globalCtx); @@ -61,7 +59,7 @@ void func_80B92B08(ObjElevator* this, GlobalContext* globalCtx, CollisionHeader* } void ObjElevator_Init(Actor* thisx, GlobalContext* globalCtx) { - ObjElevator* this = THIS; + ObjElevator* this = (ObjElevator*)thisx; f32 temp_f0; func_80B92B08(this, globalCtx, &object_d_elevator_Col_000360, DPM_PLAYER); @@ -74,7 +72,7 @@ void ObjElevator_Init(Actor* thisx, GlobalContext* globalCtx) { } void ObjElevator_Destroy(Actor* thisx, GlobalContext* globalCtx) { - ObjElevator* this = THIS; + ObjElevator* this = (ObjElevator*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); } @@ -114,7 +112,7 @@ void func_80B92D44(ObjElevator* this, GlobalContext* globalCtx) { } void ObjElevator_Update(Actor* thisx, GlobalContext* globalCtx) { - ObjElevator* this = THIS; + ObjElevator* this = (ObjElevator*)thisx; if (this->actionFunc) { this->actionFunc(this, 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 1612142ea8..f22b2422f0 100644 --- a/src/overlays/actors/ovl_Obj_Hamishi/z_obj_hamishi.c +++ b/src/overlays/actors/ovl_Obj_Hamishi/z_obj_hamishi.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000000 -#define THIS ((ObjHamishi*)thisx) - void ObjHamishi_Init(Actor* thisx, GlobalContext* globalCtx); void ObjHamishi_Destroy(Actor* thisx, GlobalContext* globalCtx); void ObjHamishi_Update(Actor* thisx, GlobalContext* globalCtx); @@ -62,7 +60,7 @@ static InitChainEntry sInitChain[] = { }; void ObjHamishi_InitCollision(Actor* thisx, GlobalContext* globalCtx) { - ObjHamishi* this = THIS; + ObjHamishi* this = (ObjHamishi*)thisx; Collider_InitCylinder(globalCtx, &this->collider); Collider_SetCylinder(globalCtx, &this->collider, &this->actor, &sCylinderInit); @@ -137,7 +135,7 @@ void ObjHamishi_Break(ObjHamishi* this, GlobalContext* globalCtx) { } void ObjHamishi_Init(Actor* thisx, GlobalContext* globalCtx) { - ObjHamishi* this = THIS; + ObjHamishi* this = (ObjHamishi*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); @@ -161,13 +159,13 @@ void ObjHamishi_Init(Actor* thisx, GlobalContext* globalCtx) { void ObjHamishi_Destroy(Actor* thisx, GlobalContext* globalCtx2) { GlobalContext* globalCtx = globalCtx2; - ObjHamishi* this = THIS; + ObjHamishi* this = (ObjHamishi*)thisx; Collider_DestroyCylinder(globalCtx, &this->collider); } void ObjHamishi_Update(Actor* thisx, GlobalContext* globalCtx) { - ObjHamishi* this = THIS; + ObjHamishi* this = (ObjHamishi*)thisx; CollisionCheckContext* colChkCtx = &globalCtx->colChkCtx; ObjHamishi_Shake(this); 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 fec11a1d4e..259429dd3d 100644 --- a/src/overlays/actors/ovl_Obj_Hana/z_obj_hana.c +++ b/src/overlays/actors/ovl_Obj_Hana/z_obj_hana.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000000 -#define THIS ((ObjHana*)thisx) - void ObjHana_Init(Actor* thisx, GlobalContext* globalCtx); void ObjHana_Destroy(Actor* thisx, GlobalContext* globalCtx); void ObjHana_Update(Actor* thisx, GlobalContext* globalCtx); @@ -72,7 +70,7 @@ static InitChainEntry sInitChain[] = { }; void ObjHana_Init(Actor* thisx, GlobalContext* globalCtx) { - ObjHana* this = THIS; + ObjHana* this = (ObjHana*)thisx; s16 type = this->actor.params & 3; HanaParams* params = &sHanaParams[type]; @@ -94,7 +92,7 @@ void ObjHana_Init(Actor* thisx, GlobalContext* globalCtx) { } void ObjHana_Destroy(Actor* thisx, GlobalContext* globalCtx) { - ObjHana* this = THIS; + ObjHana* this = (ObjHana*)thisx; if (sHanaParams[this->actor.params & 3].radius >= 0) { Collider_DestroyCylinder(globalCtx, &this->collider); @@ -102,7 +100,7 @@ void ObjHana_Destroy(Actor* thisx, GlobalContext* globalCtx) { } void ObjHana_Update(Actor* thisx, GlobalContext* globalCtx) { - ObjHana* this = THIS; + ObjHana* this = (ObjHana*)thisx; if (sHanaParams[this->actor.params & 3].radius >= 0 && this->actor.xzDistToPlayer < 400.0f) { CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->collider.base); 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 e61c961cb8..9d72d42e7e 100644 --- a/src/overlays/actors/ovl_Obj_Hsblock/z_obj_hsblock.c +++ b/src/overlays/actors/ovl_Obj_Hsblock/z_obj_hsblock.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000000 -#define THIS ((ObjHsblock*)thisx) - void ObjHsblock_Init(Actor* thisx, GlobalContext* globalCtx); void ObjHsblock_Destroy(Actor* thisx, GlobalContext* globalCtx); void ObjHsblock_Update(Actor* thisx, GlobalContext* globalCtx); @@ -77,7 +75,7 @@ void func_80B93BF0(ObjHsblock* this, GlobalContext* globalCtx) { } void ObjHsblock_Init(Actor* thisx, GlobalContext* globalCtx) { - ObjHsblock* this = THIS; + ObjHsblock* this = (ObjHsblock*)thisx; func_80B93B68(this, globalCtx, sCollisionHeaders[thisx->params & 3], DPM_UNK); Actor_ProcessInitChain(thisx, sInitChain); @@ -102,7 +100,7 @@ void ObjHsblock_Init(Actor* thisx, GlobalContext* globalCtx) { } void ObjHsblock_Destroy(Actor* thisx, GlobalContext* globalCtx) { - ObjHsblock* this = THIS; + ObjHsblock* this = (ObjHsblock*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); } @@ -138,7 +136,7 @@ void func_80B93E5C(ObjHsblock* this, GlobalContext* globalCtx) { } void ObjHsblock_Update(Actor* thisx, GlobalContext* globalCtx) { - ObjHsblock* this = THIS; + ObjHsblock* this = (ObjHsblock*)thisx; if (this->actionFunc != NULL) { this->actionFunc(this, globalCtx); 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 28aaf57dd6..dd0486a00c 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 @@ -9,8 +9,6 @@ #define FLAGS 0x00000010 -#define THIS ((ObjIcePoly*)thisx) - void ObjIcePoly_Init(Actor* thisx, GlobalContext* globalCtx); void ObjIcePoly_Destroy(Actor* thisx, GlobalContext* globalCtx); void ObjIcePoly_Update(Actor* thisx, GlobalContext* globalCtx); @@ -77,7 +75,7 @@ static Color_RGBA8 sColorWhite = { 250, 250, 250, 255 }; static Color_RGBA8 sColorGray = { 180, 180, 180, 255 }; void ObjIcePoly_Init(Actor* thisx, GlobalContext* globalCtx) { - ObjIcePoly* this = THIS; + ObjIcePoly* this = (ObjIcePoly*)thisx; this->unk_151 = (thisx->params >> 8) & 0xFF; thisx->params &= 0xFF; @@ -105,7 +103,7 @@ void ObjIcePoly_Init(Actor* thisx, GlobalContext* globalCtx) { void ObjIcePoly_Destroy(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - ObjIcePoly* this = THIS; + ObjIcePoly* this = (ObjIcePoly*)thisx; if ((this->actor.params >= 0) && (this->actor.params < 3)) { Collider_DestroyCylinder(globalCtx, &this->colliderIce); @@ -185,14 +183,14 @@ void ObjIcePoly_Melt(ObjIcePoly* this, GlobalContext* globalCtx) { void ObjIcePoly_Update(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - ObjIcePoly* this = THIS; + ObjIcePoly* this = (ObjIcePoly*)thisx; this->actionFunc(this, globalCtx); } void ObjIcePoly_Draw(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - ObjIcePoly* this = THIS; + ObjIcePoly* this = (ObjIcePoly*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_obj_ice_poly.c", 421); func_80093D84(globalCtx->state.gfxCtx); 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 84a4651f38..6d8e092308 100644 --- a/src/overlays/actors/ovl_Obj_Kibako/z_obj_kibako.c +++ b/src/overlays/actors/ovl_Obj_Kibako/z_obj_kibako.c @@ -10,8 +10,6 @@ #define FLAGS 0x04000010 -#define THIS ((ObjKibako*)thisx) - void ObjKibako_Init(Actor* thisx, GlobalContext* globalCtx); void ObjKibako_Destroy(Actor* thisx, GlobalContext* globalCtx); void ObjKibako_Update(Actor* thisx, GlobalContext* globalCtx); @@ -83,7 +81,7 @@ void ObjKibako_ApplyGravity(ObjKibako* this) { } void ObjKibako_InitCollider(Actor* thisx, GlobalContext* globalCtx) { - ObjKibako* this = THIS; + ObjKibako* this = (ObjKibako*)thisx; Collider_InitCylinder(globalCtx, &this->collider); Collider_SetCylinder(globalCtx, &this->collider, &this->actor, &sCylinderInit); @@ -92,7 +90,7 @@ void ObjKibako_InitCollider(Actor* thisx, GlobalContext* globalCtx) { void ObjKibako_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - ObjKibako* this = THIS; + ObjKibako* this = (ObjKibako*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); this->actor.gravity = -1.2f; @@ -106,7 +104,7 @@ void ObjKibako_Init(Actor* thisx, GlobalContext* globalCtx) { void ObjKibako_Destroy(Actor* thisx, GlobalContext* globalCtx2) { GlobalContext* globalCtx = globalCtx2; - ObjKibako* this = THIS; + ObjKibako* this = (ObjKibako*)thisx; Collider_DestroyCylinder(globalCtx, &this->collider); } @@ -276,14 +274,14 @@ void ObjKibako_Thrown(ObjKibako* this, GlobalContext* globalCtx) { void ObjKibako_Update(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - ObjKibako* this = THIS; + ObjKibako* this = (ObjKibako*)thisx; this->actionFunc(this, globalCtx); } void ObjKibako_Draw(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - ObjKibako* this = THIS; + ObjKibako* this = (ObjKibako*)thisx; Gfx_DrawDListOpa(globalCtx, gSmallWoodenBoxDL); } 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 68257cbd1d..d0570ff1a4 100644 --- a/src/overlays/actors/ovl_Obj_Kibako2/z_obj_kibako2.c +++ b/src/overlays/actors/ovl_Obj_Kibako2/z_obj_kibako2.c @@ -10,8 +10,6 @@ #define FLAGS 0x00000000 -#define THIS ((ObjKibako2*)thisx) - void ObjKibako2_Init(Actor* thisx, GlobalContext* globalCtx); void ObjKibako2_Destroy(Actor* thisx, GlobalContext* globalCtx); void ObjKibako2_Update(Actor* thisx, GlobalContext* globalCtx); @@ -59,7 +57,7 @@ static InitChainEntry sInitChain[] = { }; void ObjKibako2_InitCollider(Actor* thisx, GlobalContext* globalCtx) { - ObjKibako2* this = THIS; + ObjKibako2* this = (ObjKibako2*)thisx; Collider_InitCylinder(globalCtx, &this->collider); Collider_SetCylinder(globalCtx, &this->collider, &this->dyna.actor, &sCylinderInit); @@ -117,7 +115,7 @@ void ObjKibako2_SpawnCollectible(ObjKibako2* this, GlobalContext* globalCtx) { } void ObjKibako2_Init(Actor* thisx, GlobalContext* globalCtx) { - ObjKibako2* this = THIS; + ObjKibako2* this = (ObjKibako2*)thisx; s16 pad; CollisionHeader* colHeader = NULL; u32 bgId; @@ -138,7 +136,7 @@ void ObjKibako2_Init(Actor* thisx, GlobalContext* globalCtx) { } void ObjKibako2_Destroy(Actor* thisx, GlobalContext* globalCtx) { - ObjKibako2* this = THIS; + ObjKibako2* this = (ObjKibako2*)thisx; Collider_DestroyCylinder(globalCtx, &this->collider); DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); @@ -171,7 +169,7 @@ void ObjKibako2_Kill(ObjKibako2* this, GlobalContext* globalCtx) { } void ObjKibako2_Update(Actor* thisx, GlobalContext* globalCtx) { - ObjKibako2* this = THIS; + ObjKibako2* this = (ObjKibako2*)thisx; this->actionFunc(this, globalCtx); } 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 eafe67c81f..c96b548b0f 100644 --- a/src/overlays/actors/ovl_Obj_Lift/z_obj_lift.c +++ b/src/overlays/actors/ovl_Obj_Lift/z_obj_lift.c @@ -10,8 +10,6 @@ #define FLAGS 0x00000010 -#define THIS ((ObjLift*)thisx) - void ObjLift_Init(Actor* thisx, GlobalContext* globalCtx); void ObjLift_Destroy(Actor* thisx, GlobalContext* globalCtx); void ObjLift_Update(Actor* thisx, GlobalContext* globalCtx); @@ -106,7 +104,7 @@ void func_80B96160(ObjLift* this, GlobalContext* globalCtx) { } void ObjLift_Init(Actor* thisx, GlobalContext* globalCtx) { - ObjLift* this = THIS; + ObjLift* this = (ObjLift*)thisx; ObjLift_InitDynaPoly(this, globalCtx, &gCollapsingPlatformCol, DPM_PLAYER); @@ -125,7 +123,7 @@ void ObjLift_Init(Actor* thisx, GlobalContext* globalCtx) { } void ObjLift_Destroy(Actor* thisx, GlobalContext* globalCtx) { - ObjLift* this = THIS; + ObjLift* this = (ObjLift*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); } @@ -209,7 +207,7 @@ void func_80B96840(ObjLift* this, GlobalContext* globalCtx) { } void ObjLift_Update(Actor* thisx, GlobalContext* globalCtx) { - ObjLift* this = THIS; + ObjLift* this = (ObjLift*)thisx; if (this->timer > 0) { this->timer--; 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 f3dd42eb8e..dcc83a4de5 100644 --- a/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.c +++ b/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.c @@ -11,8 +11,6 @@ #define FLAGS 0x00000010 -#define THIS ((ObjLightswitch*)thisx) - typedef enum { /* 0x00 */ FACE_EYES_CLOSED, /* 0x01 */ FACE_EYES_OPEN, @@ -162,7 +160,7 @@ void ObjLightswitch_SpawnDisappearEffects(ObjLightswitch* this, GlobalContext* g } void ObjLightswitch_Init(Actor* thisx, GlobalContext* globalCtx) { - ObjLightswitch* this = THIS; + ObjLightswitch* this = (ObjLightswitch*)thisx; s32 switchFlagSet = Flags_GetSwitch(globalCtx, this->actor.params >> 8 & 0x3F); s32 removeSelf = false; @@ -209,7 +207,7 @@ void ObjLightswitch_Init(Actor* thisx, GlobalContext* globalCtx) { void ObjLightswitch_Destroy(Actor* thisx, GlobalContext* globalCtx2) { GlobalContext* globalCtx = globalCtx2; - ObjLightswitch* this = THIS; + ObjLightswitch* this = (ObjLightswitch*)thisx; Collider_DestroyJntSph(globalCtx, &this->collider); } @@ -371,7 +369,7 @@ void ObjLightswitch_Disappear(ObjLightswitch* this, GlobalContext* globalCtx) { } void ObjLightswitch_Update(Actor* thisx, GlobalContext* globalCtx2) { - ObjLightswitch* this = THIS; + ObjLightswitch* this = (ObjLightswitch*)thisx; GlobalContext* globalCtx = globalCtx2; if (this->toggleDelay > 0) { @@ -487,7 +485,7 @@ void ObjLightswitch_DrawXlu(ObjLightswitch* this, GlobalContext* globalCtx) { } void ObjLightswitch_Draw(Actor* thisx, GlobalContext* globalCtx) { - ObjLightswitch* this = THIS; + ObjLightswitch* this = (ObjLightswitch*)thisx; s32 alpha = this->alpha >> 6 & 0xFF; if ((this->actor.params & 1) == 1) { 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 c1da357070..8c1be1246b 100644 --- a/src/overlays/actors/ovl_Obj_Makekinsuta/z_obj_makekinsuta.c +++ b/src/overlays/actors/ovl_Obj_Makekinsuta/z_obj_makekinsuta.c @@ -9,8 +9,6 @@ #define FLAGS 0x00000010 -#define THIS ((ObjMakekinsuta*)thisx) - void ObjMakekinsuta_Init(Actor* thisx, GlobalContext* globalCtx); void ObjMakekinsuta_Update(Actor* thisx, GlobalContext* globalCtx); @@ -30,7 +28,7 @@ const ActorInit Obj_Makekinsuta_InitVars = { }; void ObjMakekinsuta_Init(Actor* thisx, GlobalContext* globalCtx) { - ObjMakekinsuta* this = THIS; + ObjMakekinsuta* this = (ObjMakekinsuta*)thisx; if ((this->actor.params & 0x6000) == 0x4000) { osSyncPrintf(VT_FGCOL(BLUE)); @@ -64,7 +62,7 @@ void ObjMakekinsuta_DoNothing(ObjMakekinsuta* this, GlobalContext* globalCtx) { } void ObjMakekinsuta_Update(Actor* thisx, GlobalContext* globalCtx) { - ObjMakekinsuta* this = THIS; + ObjMakekinsuta* this = (ObjMakekinsuta*)thisx; this->actionFunc(this, 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 f3547a912d..c6976f4446 100644 --- a/src/overlays/actors/ovl_Obj_Makeoshihiki/z_obj_makeoshihiki.c +++ b/src/overlays/actors/ovl_Obj_Makeoshihiki/z_obj_makeoshihiki.c @@ -10,8 +10,6 @@ #define FLAGS 0x00000020 -#define THIS ((ObjMakeoshihiki*)thisx) - 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 5a257eabda..33654d9838 100644 --- a/src/overlays/actors/ovl_Obj_Mure/z_obj_mure.c +++ b/src/overlays/actors/ovl_Obj_Mure/z_obj_mure.c @@ -8,8 +8,6 @@ #define FLAGS 0x00000000 -#define THIS ((ObjMure*)thisx) - void ObjMure_Init(Actor* thisx, GlobalContext* globalCtx); void ObjMure_Destroy(Actor* thisx, GlobalContext* globalCtx); void ObjMure_Update(Actor* thisx, GlobalContext* globalCtx); @@ -61,7 +59,7 @@ static InitChainEntry sInitChain[] = { }; s32 ObjMure_SetCullingImpl(Actor* thisx, GlobalContext* globalCtx) { - ObjMure* this = THIS; + ObjMure* this = (ObjMure*)thisx; s32 result; switch (this->type) { @@ -88,7 +86,7 @@ s32 ObjMure_SetCulling(Actor* thisx, GlobalContext* globalCtx) { } void ObjMure_Init(Actor* thisx, GlobalContext* globalCtx) { - ObjMure* this = THIS; + ObjMure* this = (ObjMure*)thisx; this->chNum = (thisx->params >> 0xC) & 0x0F; this->ptn = (thisx->params >> 8) & 0x07; @@ -409,7 +407,7 @@ void ObjMure_ActiveState(ObjMure* this, GlobalContext* globalCtx) { } void ObjMure_Update(Actor* thisx, GlobalContext* globalCtx) { - ObjMure* this = THIS; + ObjMure* this = (ObjMure*)thisx; if (this->unk_1A4 > 0) { this->unk_1A4--; 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 8d212295a2..757541e210 100644 --- a/src/overlays/actors/ovl_Obj_Mure2/z_obj_mure2.c +++ b/src/overlays/actors/ovl_Obj_Mure2/z_obj_mure2.c @@ -8,8 +8,6 @@ #define FLAGS 0x00000000 -#define THIS ((ObjMure2*)thisx) - typedef void (*ObjMure2SetPosFunc)(Vec3f* vec, ObjMure2* this); typedef struct { @@ -168,7 +166,7 @@ static InitChainEntry sInitChain[] = { }; void ObjMure2_Init(Actor* thisx, GlobalContext* globalCtx) { - ObjMure2* this = THIS; + ObjMure2* this = (ObjMure2*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); if (globalCtx->csCtx.state != CS_STATE_IDLE) { @@ -213,7 +211,7 @@ void func_80B9A6F8(ObjMure2* this, GlobalContext* globalCtx) { } void ObjMure2_Update(Actor* thisx, GlobalContext* globalCtx) { - ObjMure2* this = THIS; + ObjMure2* this = (ObjMure2*)thisx; if (globalCtx->csCtx.state == CS_STATE_IDLE) { this->unk_184 = 1.0f; 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 2bf0a398ec..1b5200ff72 100644 --- a/src/overlays/actors/ovl_Obj_Mure3/z_obj_mure3.c +++ b/src/overlays/actors/ovl_Obj_Mure3/z_obj_mure3.c @@ -8,8 +8,6 @@ #define FLAGS 0x00000000 -#define THIS ((ObjMure3*)thisx) - void ObjMure3_Init(Actor* thisx, GlobalContext* globalCtx); void ObjMure3_Destroy(Actor* thisx, GlobalContext* globalCtx); void ObjMure3_Update(Actor* thisx, GlobalContext* globalCtx); @@ -144,7 +142,7 @@ void func_80B9ADCC(ObjMure3* this, GlobalContext* globalCtx) { void ObjMure3_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - ObjMure3* this = THIS; + ObjMure3* this = (ObjMure3*)thisx; if (Flags_GetSwitch(globalCtx, this->actor.params & 0x3F)) { Actor_Kill(&this->actor); @@ -193,7 +191,7 @@ void func_80B9AFFC(ObjMure3* this, GlobalContext* globalCtx) { } void ObjMure3_Update(Actor* thisx, GlobalContext* globalCtx) { - ObjMure3* this = THIS; + ObjMure3* this = (ObjMure3*)thisx; this->actionFunc(this, globalCtx); } 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 e9a7f9dc14..db69fd0d23 100644 --- a/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c +++ b/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c @@ -10,8 +10,6 @@ #define FLAGS 0x00000010 -#define THIS ((ObjOshihiki*)thisx) - void ObjOshihiki_Init(Actor* thisx, GlobalContext* globalCtx); void ObjOshihiki_Destroy(Actor* thisx, GlobalContext* globalCtx); void ObjOshihiki_Update(Actor* thisx, GlobalContext* globalCtx); @@ -271,7 +269,7 @@ void ObjOshihiki_SetColor(ObjOshihiki* this, GlobalContext* globalCtx) { void ObjOshihiki_Init(Actor* thisx, GlobalContext* globalCtx2) { GlobalContext* globalCtx = globalCtx2; - ObjOshihiki* this = THIS; + ObjOshihiki* this = (ObjOshihiki*)thisx; ObjOshihiki_CheckType(this, globalCtx); @@ -310,7 +308,7 @@ void ObjOshihiki_Init(Actor* thisx, GlobalContext* globalCtx2) { void ObjOshihiki_Destroy(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - ObjOshihiki* this = THIS; + ObjOshihiki* this = (ObjOshihiki*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); } @@ -630,7 +628,7 @@ void ObjOshihiki_Fall(ObjOshihiki* this, GlobalContext* globalCtx) { void ObjOshihiki_Update(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - ObjOshihiki* this = THIS; + ObjOshihiki* this = (ObjOshihiki*)thisx; this->stateFlags &= ~(PUSHBLOCK_SETUP_FALL | PUSHBLOCK_FALL | PUSHBLOCK_SETUP_PUSH | PUSHBLOCK_PUSH | PUSHBLOCK_SETUP_ON_ACTOR | @@ -653,7 +651,7 @@ void ObjOshihiki_Update(Actor* thisx, GlobalContext* globalCtx) { void ObjOshihiki_Draw(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - ObjOshihiki* this = THIS; + ObjOshihiki* this = (ObjOshihiki*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_obj_oshihiki.c", 1289); if (ObjOshihiki_MoveWithBlockUnder(this, 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 325f7b29a0..6e476a5c2c 100644 --- a/src/overlays/actors/ovl_Obj_Roomtimer/z_obj_roomtimer.c +++ b/src/overlays/actors/ovl_Obj_Roomtimer/z_obj_roomtimer.c @@ -8,8 +8,6 @@ #define FLAGS 0x00000010 -#define THIS ((ObjRoomtimer*)thisx) - void ObjRoomtimer_Init(Actor* thisx, GlobalContext* globalCtx); void ObjRoomtimer_Destroy(Actor* thisx, GlobalContext* globalCtx); void ObjRoomtimer_Update(Actor* thisx, GlobalContext* globalCtx); @@ -30,7 +28,7 @@ const ActorInit Obj_Roomtimer_InitVars = { }; void ObjRoomtimer_Init(Actor* thisx, GlobalContext* globalCtx) { - ObjRoomtimer* this = THIS; + ObjRoomtimer* this = (ObjRoomtimer*)thisx; s16 params = this->actor.params; this->switchFlag = (params >> 10) & 0x3F; @@ -49,7 +47,7 @@ void ObjRoomtimer_Init(Actor* thisx, GlobalContext* globalCtx) { } void ObjRoomtimer_Destroy(Actor* thisx, GlobalContext* globalCtx) { - ObjRoomtimer* this = THIS; + ObjRoomtimer* this = (ObjRoomtimer*)thisx; if ((this->actor.params != 0x3FF) && (gSaveContext.timer1Value > 0)) { gSaveContext.timer1State = 10; @@ -84,7 +82,7 @@ void func_80B9D0B0(ObjRoomtimer* this, GlobalContext* globalCtx) { } void ObjRoomtimer_Update(Actor* thisx, GlobalContext* globalCtx) { - ObjRoomtimer* this = THIS; + ObjRoomtimer* this = (ObjRoomtimer*)thisx; this->actionFunc(this, 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 3be3ef2bad..d3eb5f668c 100644 --- a/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c +++ b/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c @@ -10,8 +10,6 @@ #define FLAGS 0x00000010 -#define THIS ((ObjSwitch*)thisx) - // type: (this->dyna.actor.params & 7) // subtype: (this->dyna.actor.params >> 4 & 7) // switch flag: (this->dyna.actor.params >> 8 & 0x3F) @@ -280,7 +278,7 @@ void ObjSwitch_UpdateTwoTexScrollXY(ObjSwitch* this) { } void ObjSwitch_Init(Actor* thisx, GlobalContext* globalCtx) { - ObjSwitch* this = THIS; + ObjSwitch* this = (ObjSwitch*)thisx; s32 switchFlagSet; s32 type; @@ -347,7 +345,7 @@ void ObjSwitch_Init(Actor* thisx, GlobalContext* globalCtx) { } void ObjSwitch_Destroy(Actor* thisx, GlobalContext* globalCtx) { - ObjSwitch* this = THIS; + ObjSwitch* this = (ObjSwitch*)thisx; switch ((this->dyna.actor.params & 7)) { case OBJSWITCH_TYPE_FLOOR: @@ -676,7 +674,7 @@ void ObjSwitch_CrystalTurnOff(ObjSwitch* this, GlobalContext* globalCtx) { } void ObjSwitch_Update(Actor* thisx, GlobalContext* globalCtx) { - ObjSwitch* this = THIS; + ObjSwitch* this = (ObjSwitch*)thisx; if (this->releaseTimer > 0) { this->releaseTimer--; @@ -789,7 +787,7 @@ static ObjSwitchActionFunc sDrawFuncs[] = { }; void ObjSwitch_Draw(Actor* thisx, GlobalContext* globalCtx) { - ObjSwitch* this = THIS; + ObjSwitch* this = (ObjSwitch*)thisx; sDrawFuncs[(this->dyna.actor.params & 7)](this, globalCtx); } 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 6c33ac13ed..55a3c47983 100644 --- a/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.c +++ b/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.c @@ -11,8 +11,6 @@ #define FLAGS 0x00000410 -#define THIS ((ObjSyokudai*)thisx) - void ObjSyokudai_Init(Actor* thisx, GlobalContext* globalCtx); void ObjSyokudai_Destroy(Actor* thisx, GlobalContext* globalCtx); void ObjSyokudai_Update(Actor* thisx, GlobalContext* globalCtx); @@ -82,7 +80,7 @@ static s32 sLitTorchCount; void ObjSyokudai_Init(Actor* thisx, GlobalContext* globalCtx) { static u8 sColTypesStand[] = { 0x09, 0x0B, 0x0B }; s32 pad; - ObjSyokudai* this = THIS; + ObjSyokudai* this = (ObjSyokudai*)thisx; s32 torchType = this->actor.params & 0xF000; Actor_ProcessInitChain(&this->actor, sInitChain); @@ -112,7 +110,7 @@ void ObjSyokudai_Init(Actor* thisx, GlobalContext* globalCtx) { void ObjSyokudai_Destroy(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - ObjSyokudai* this = THIS; + ObjSyokudai* this = (ObjSyokudai*)thisx; Collider_DestroyCylinder(globalCtx, &this->colliderStand); Collider_DestroyCylinder(globalCtx, &this->colliderFlame); @@ -121,7 +119,7 @@ void ObjSyokudai_Destroy(Actor* thisx, GlobalContext* globalCtx) { void ObjSyokudai_Update(Actor* thisx, GlobalContext* globalCtx2) { GlobalContext* globalCtx = globalCtx2; - ObjSyokudai* this = THIS; + ObjSyokudai* this = (ObjSyokudai*)thisx; s32 torchCount = (this->actor.params >> 6) & 0xF; s32 switchFlag = this->actor.params & 0x3F; s32 torchType = this->actor.params & 0xF000; @@ -261,7 +259,7 @@ void ObjSyokudai_Update(Actor* thisx, GlobalContext* globalCtx2) { void ObjSyokudai_Draw(Actor* thisx, GlobalContext* globalCtx) { static Gfx* displayLists[] = { gGoldenTorchDL, gTimedTorchDL, gWoodenTorchDL }; s32 pad; - ObjSyokudai* this = THIS; + ObjSyokudai* this = (ObjSyokudai*)thisx; s32 timerMax; timerMax = (((this->actor.params >> 6) & 0xF) * 50) + 100; 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 4778c0becd..aa036d05ab 100644 --- a/src/overlays/actors/ovl_Obj_Timeblock/z_obj_timeblock.c +++ b/src/overlays/actors/ovl_Obj_Timeblock/z_obj_timeblock.c @@ -9,8 +9,6 @@ #define FLAGS 0x0A000011 -#define THIS ((ObjTimeblock*)thisx) - void ObjTimeblock_Init(Actor* thisx, GlobalContext* globalCtx); void ObjTimeblock_Destroy(Actor* thisx, GlobalContext* globalCtx); void ObjTimeblock_Update(Actor* thisx, GlobalContext* globalCtx); @@ -99,7 +97,7 @@ void ObjTimeblock_ToggleSwitchFlag(GlobalContext* globalCtx, s32 flag) { } void ObjTimeblock_Init(Actor* thisx, GlobalContext* globalCtx) { - ObjTimeblock* this = THIS; + ObjTimeblock* this = (ObjTimeblock*)thisx; s32 pad; CollisionHeader* colHeader = NULL; @@ -143,7 +141,7 @@ void ObjTimeblock_Init(Actor* thisx, GlobalContext* globalCtx) { void ObjTimeblock_Destroy(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - ObjTimeblock* this = THIS; + ObjTimeblock* this = (ObjTimeblock*)thisx; DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); } @@ -317,7 +315,7 @@ void ObjTimeblock_AltBehaviourNotVisible(ObjTimeblock* this, GlobalContext* glob } void ObjTimeblock_Update(Actor* thisx, GlobalContext* globalCtx) { - ObjTimeblock* this = THIS; + ObjTimeblock* this = (ObjTimeblock*)thisx; this->actionFunc(this, 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 305630c114..e6fb09be01 100644 --- a/src/overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.c +++ b/src/overlays/actors/ovl_Obj_Tsubo/z_obj_tsubo.c @@ -11,8 +11,6 @@ #define FLAGS 0x00800010 -#define THIS ((ObjTsubo*)thisx) - void ObjTsubo_Init(Actor* thisx, GlobalContext* globalCtx); void ObjTsubo_Destroy(Actor* thisx, GlobalContext* globalCtx); void ObjTsubo_Update(Actor* thisx, GlobalContext* globalCtx); @@ -121,7 +119,7 @@ s32 ObjTsubo_SnapToFloor(ObjTsubo* this, GlobalContext* globalCtx) { } void ObjTsubo_InitCollider(Actor* thisx, GlobalContext* globalCtx) { - ObjTsubo* this = THIS; + ObjTsubo* this = (ObjTsubo*)thisx; Collider_InitCylinder(globalCtx, &this->collider); Collider_SetCylinder(globalCtx, &this->collider, &this->actor, &sCylinderInit); @@ -129,7 +127,7 @@ void ObjTsubo_InitCollider(Actor* thisx, GlobalContext* globalCtx) { } void ObjTsubo_Init(Actor* thisx, GlobalContext* globalCtx) { - ObjTsubo* this = THIS; + ObjTsubo* this = (ObjTsubo*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); ObjTsubo_InitCollider(&this->actor, globalCtx); @@ -150,7 +148,7 @@ void ObjTsubo_Init(Actor* thisx, GlobalContext* globalCtx) { void ObjTsubo_Destroy(Actor* thisx, GlobalContext* globalCtx2) { GlobalContext* globalCtx = globalCtx2; - ObjTsubo* this = THIS; + ObjTsubo* this = (ObjTsubo*)thisx; Collider_DestroyCylinder(globalCtx, &this->collider); } @@ -330,7 +328,7 @@ void ObjTsubo_Thrown(ObjTsubo* this, GlobalContext* globalCtx) { } void ObjTsubo_Update(Actor* thisx, GlobalContext* globalCtx) { - ObjTsubo* this = THIS; + ObjTsubo* this = (ObjTsubo*)thisx; this->actionFunc(this, 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 93ffcd7fce..41b997afbc 100644 --- a/src/overlays/actors/ovl_Obj_Warp2block/z_obj_warp2block.c +++ b/src/overlays/actors/ovl_Obj_Warp2block/z_obj_warp2block.c @@ -10,8 +10,6 @@ #define FLAGS 0x0A000011 -#define THIS ((ObjWarp2block*)thisx) - void ObjWarp2block_Init(Actor* thisx, GlobalContext* globalCtx); void ObjWarp2block_Destroy(Actor* thisx, GlobalContext* globalCtx); void ObjWarp2block_Update(Actor* thisx, GlobalContext* globalCtx); @@ -199,7 +197,7 @@ s32 func_80BA2304(ObjWarp2block* this, GlobalContext* globalCtx) { void ObjWarp2block_Init(Actor* thisx, GlobalContext* globalCtx2) { GlobalContext* globalCtx = globalCtx2; - ObjWarp2block* this = THIS; + ObjWarp2block* this = (ObjWarp2block*)thisx; CollisionHeader* collisionHeader; collisionHeader = NULL; @@ -227,7 +225,7 @@ void ObjWarp2block_Init(Actor* thisx, GlobalContext* globalCtx2) { } void ObjWarp2block_Destroy(Actor* thisx, GlobalContext* globalCtx) { - ObjWarp2block* this = THIS; + ObjWarp2block* this = (ObjWarp2block*)thisx; if ((this->dyna.actor.params >> 0xF) & 1) { DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId); } @@ -296,7 +294,7 @@ void func_80BA2610(ObjWarp2block* this, GlobalContext* globalCtx) { } void ObjWarp2block_Update(Actor* thisx, GlobalContext* globalCtx) { - ObjWarp2block* this = THIS; + ObjWarp2block* this = (ObjWarp2block*)thisx; this->actionFunc(this, globalCtx); if (this->unk_16C > 0) { 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 9bd689c987..073477c6c8 100644 --- a/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.c +++ b/src/overlays/actors/ovl_Object_Kankyo/z_object_kankyo.c @@ -11,8 +11,6 @@ #define FLAGS 0x02000030 -#define THIS ((ObjectKankyo*)thisx) - void ObjectKankyo_Init(Actor* thisx, GlobalContext* globalCtx); void ObjectKankyo_Destroy(Actor* thisx, GlobalContext* globalCtx); void ObjectKankyo_Update(Actor* thisx, GlobalContext* globalCtx); @@ -67,7 +65,7 @@ void ObjectKankyo_SetupAction(ObjectKankyo* this, ObjectKankyoActionFunc action) } void ObjectKankyo_Init(Actor* thisx, GlobalContext* globalCtx) { - ObjectKankyo* this = THIS; + ObjectKankyo* this = (ObjectKankyo*)thisx; s32 pad; s16 i; @@ -452,13 +450,13 @@ void ObjectKankyo_Fairies(ObjectKankyo* this, GlobalContext* globalCtx) { } void ObjectKankyo_Update(Actor* thisx, GlobalContext* globalCtx) { - ObjectKankyo* this = THIS; + ObjectKankyo* this = (ObjectKankyo*)thisx; this->actionFunc(this, globalCtx); } void ObjectKankyo_Draw(Actor* thisx, GlobalContext* globalCtx) { - ObjectKankyo* this = THIS; + ObjectKankyo* this = (ObjectKankyo*)thisx; switch (this->actor.params) { case 0: 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 985d535528..f2696aed63 100644 --- a/src/overlays/actors/ovl_Oceff_Spot/z_oceff_spot.c +++ b/src/overlays/actors/ovl_Oceff_Spot/z_oceff_spot.c @@ -9,8 +9,6 @@ #define FLAGS 0x02000010 -#define THIS ((OceffSpot*)thisx) - void OceffSpot_Init(Actor* thisx, GlobalContext* globalCtx); void OceffSpot_Destroy(Actor* thisx, GlobalContext* globalCtx); void OceffSpot_Update(Actor* thisx, GlobalContext* globalCtx); @@ -43,7 +41,7 @@ void OceffSpot_SetupAction(OceffSpot* this, OceffSpotActionFunc actionFunc) { void OceffSpot_Init(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - OceffSpot* this = THIS; + OceffSpot* this = (OceffSpot*)thisx; Actor_ProcessInitChain(&this->actor, sInitChain); OceffSpot_SetupAction(this, OceffSpot_GrowCylinder); @@ -66,7 +64,7 @@ void OceffSpot_Init(Actor* thisx, GlobalContext* globalCtx) { void OceffSpot_Destroy(Actor* thisx, GlobalContext* globalCtx) { s32 pad; - OceffSpot* this = THIS; + OceffSpot* this = (OceffSpot*)thisx; Player* player = GET_PLAYER(globalCtx); LightContext_RemoveLight(globalCtx, &globalCtx->lightCtx, this->lightNode1); @@ -119,7 +117,7 @@ void OceffSpot_GrowCylinder(OceffSpot* this, GlobalContext* globalCtx) { } void OceffSpot_Update(Actor* thisx, GlobalContext* globalCtx) { - OceffSpot* this = THIS; + OceffSpot* this = (OceffSpot*)thisx; s32 pad; Player* player = GET_PLAYER(globalCtx); f32 temp; @@ -148,7 +146,7 @@ void OceffSpot_Update(Actor* thisx, GlobalContext* globalCtx) { } void OceffSpot_Draw(Actor* thisx, GlobalContext* globalCtx) { - OceffSpot* this = THIS; + OceffSpot* this = (OceffSpot*)thisx; u32 scroll = globalCtx->state.frames & 0xFFFF; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_oceff_spot.c", 466); 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 e1b66b8f28..c5a4c71c79 100644 --- a/src/overlays/actors/ovl_Oceff_Storm/z_oceff_storm.c +++ b/src/overlays/actors/ovl_Oceff_Storm/z_oceff_storm.c @@ -8,8 +8,6 @@ #define FLAGS 0x02000030 -#define THIS ((OceffStorm*)thisx) - void OceffStorm_Init(Actor* thisx, GlobalContext* globalCtx); void OceffStorm_Destroy(Actor* thisx, GlobalContext* globalCtx); void OceffStorm_Update(Actor* thisx, GlobalContext* globalCtx); @@ -37,7 +35,7 @@ void OceffStorm_SetupAction(OceffStorm* this, OceffStormActionFunc actionFunc) { } void OceffStorm_Init(Actor* thisx, GlobalContext* globalCtx) { - OceffStorm* this = THIS; + OceffStorm* this = (OceffStorm*)thisx; OceffStorm_SetupAction(this, OceffStorm_DefaultAction); this->posYOffAdd = 0; this->counter = 0; @@ -58,7 +56,7 @@ void OceffStorm_Init(Actor* thisx, GlobalContext* globalCtx) { } void OceffStorm_Destroy(Actor* thisx, GlobalContext* globalCtx) { - OceffStorm* this = THIS; + OceffStorm* this = (OceffStorm*)thisx; Player* player = GET_PLAYER(globalCtx); func_800876C8(globalCtx); @@ -114,7 +112,7 @@ void OceffStorm_UnkAction(OceffStorm* this, GlobalContext* globalCtx) { } void OceffStorm_Update(Actor* thisx, GlobalContext* globalCtx) { - OceffStorm* this = THIS; + OceffStorm* this = (OceffStorm*)thisx; Player* player = GET_PLAYER(globalCtx); this->actor.world.pos = player->actor.world.pos; @@ -126,7 +124,7 @@ void OceffStorm_Update(Actor* thisx, GlobalContext* globalCtx) { void OceffStorm_Draw2(Actor* thisx, GlobalContext* globalCtx) { u32 scroll = globalCtx->state.frames & 0xFFF; - OceffStorm* this = THIS; + OceffStorm* this = (OceffStorm*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_oceff_storm.c", 449); @@ -149,7 +147,7 @@ void OceffStorm_Draw2(Actor* thisx, GlobalContext* globalCtx) { void OceffStorm_Draw(Actor* thisx, GlobalContext* globalCtx) { u32 scroll = globalCtx->state.frames & 0xFFF; - OceffStorm* this = THIS; + OceffStorm* this = (OceffStorm*)thisx; Vtx* vtxPtr = sCylinderVtx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_oceff_storm.c", 486); 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 919f8994be..bf2c497547 100644 --- a/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.c +++ b/src/overlays/actors/ovl_Oceff_Wipe/z_oceff_wipe.c @@ -9,8 +9,6 @@ #define FLAGS 0x02000010 -#define THIS ((OceffWipe*)thisx) - void OceffWipe_Init(Actor* thisx, GlobalContext* globalCtx); void OceffWipe_Destroy(Actor* thisx, GlobalContext* globalCtx); void OceffWipe_Update(Actor* thisx, GlobalContext* globalCtx); @@ -29,7 +27,7 @@ const ActorInit Oceff_Wipe_InitVars = { }; void OceffWipe_Init(Actor* thisx, GlobalContext* globalCtx) { - OceffWipe* this = THIS; + OceffWipe* this = (OceffWipe*)thisx; Actor_SetScale(&this->actor, 0.1f); this->timer = 0; @@ -38,7 +36,7 @@ void OceffWipe_Init(Actor* thisx, GlobalContext* globalCtx) { } void OceffWipe_Destroy(Actor* thisx, GlobalContext* globalCtx) { - OceffWipe* this = THIS; + OceffWipe* this = (OceffWipe*)thisx; Player* player = GET_PLAYER(globalCtx); func_800876C8(globalCtx); @@ -48,7 +46,7 @@ void OceffWipe_Destroy(Actor* thisx, GlobalContext* globalCtx) { } void OceffWipe_Update(Actor* thisx, GlobalContext* globalCtx) { - OceffWipe* this = THIS; + OceffWipe* this = (OceffWipe*)thisx; this->actor.world.pos = GET_ACTIVE_CAM(globalCtx)->eye; if (this->timer < 100) { @@ -67,7 +65,7 @@ static u8 sAlphaIndices[] = { void OceffWipe_Draw(Actor* thisx, GlobalContext* globalCtx) { u32 scroll = globalCtx->state.frames & 0xFF; - OceffWipe* this = THIS; + OceffWipe* this = (OceffWipe*)thisx; f32 z; s32 pad; u8 alphaTable[3]; 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 6bb2f0a1a8..fd7524a5c8 100644 --- a/src/overlays/actors/ovl_Oceff_Wipe2/z_oceff_wipe2.c +++ b/src/overlays/actors/ovl_Oceff_Wipe2/z_oceff_wipe2.c @@ -9,8 +9,6 @@ #define FLAGS 0x02000010 -#define THIS ((OceffWipe2*)thisx) - void OceffWipe2_Init(Actor* thisx, GlobalContext* globalCtx); void OceffWipe2_Destroy(Actor* thisx, GlobalContext* globalCtx); void OceffWipe2_Update(Actor* thisx, GlobalContext* globalCtx); @@ -29,7 +27,7 @@ const ActorInit Oceff_Wipe2_InitVars = { }; void OceffWipe2_Init(Actor* thisx, GlobalContext* globalCtx) { - OceffWipe2* this = THIS; + OceffWipe2* this = (OceffWipe2*)thisx; Actor_SetScale(&this->actor, 0.1f); this->timer = 0; @@ -38,7 +36,7 @@ void OceffWipe2_Init(Actor* thisx, GlobalContext* globalCtx) { } void OceffWipe2_Destroy(Actor* thisx, GlobalContext* globalCtx) { - OceffWipe2* this = THIS; + OceffWipe2* this = (OceffWipe2*)thisx; Player* player = GET_PLAYER(globalCtx); func_800876C8(globalCtx); @@ -48,7 +46,7 @@ void OceffWipe2_Destroy(Actor* thisx, GlobalContext* globalCtx) { } void OceffWipe2_Update(Actor* thisx, GlobalContext* globalCtx) { - OceffWipe2* this = THIS; + OceffWipe2* this = (OceffWipe2*)thisx; this->actor.world.pos = GET_ACTIVE_CAM(globalCtx)->eye; if (this->timer < 100) { @@ -62,7 +60,7 @@ void OceffWipe2_Update(Actor* thisx, GlobalContext* globalCtx) { void OceffWipe2_Draw(Actor* thisx, GlobalContext* globalCtx) { u32 scroll = globalCtx->state.frames & 0xFF; - OceffWipe2* this = THIS; + OceffWipe2* this = (OceffWipe2*)thisx; f32 z; u8 alpha; s32 pad[2]; 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 65a1ff1764..f6ba5f6704 100644 --- a/src/overlays/actors/ovl_Oceff_Wipe3/z_oceff_wipe3.c +++ b/src/overlays/actors/ovl_Oceff_Wipe3/z_oceff_wipe3.c @@ -9,8 +9,6 @@ #define FLAGS 0x02000010 -#define THIS ((OceffWipe3*)thisx) - void OceffWipe3_Init(Actor* thisx, GlobalContext* globalCtx); void OceffWipe3_Destroy(Actor* thisx, GlobalContext* globalCtx); void OceffWipe3_Update(Actor* thisx, GlobalContext* globalCtx); @@ -31,7 +29,7 @@ const ActorInit Oceff_Wipe3_InitVars = { #include "overlays/ovl_Oceff_Wipe3/ovl_Oceff_Wipe3.c" void OceffWipe3_Init(Actor* thisx, GlobalContext* globalCtx) { - OceffWipe3* this = THIS; + OceffWipe3* this = (OceffWipe3*)thisx; Actor_SetScale(&this->actor, 0.1f); this->counter = 0; @@ -41,7 +39,7 @@ void OceffWipe3_Init(Actor* thisx, GlobalContext* globalCtx) { } void OceffWipe3_Destroy(Actor* thisx, GlobalContext* globalCtx) { - OceffWipe3* this = THIS; + OceffWipe3* this = (OceffWipe3*)thisx; Player* player = GET_PLAYER(globalCtx); func_800876C8(globalCtx); @@ -51,7 +49,7 @@ void OceffWipe3_Destroy(Actor* thisx, GlobalContext* globalCtx) { } void OceffWipe3_Update(Actor* thisx, GlobalContext* globalCtx) { - OceffWipe3* this = THIS; + OceffWipe3* this = (OceffWipe3*)thisx; this->actor.world.pos = GET_ACTIVE_CAM(globalCtx)->eye; if (this->counter < 100) { @@ -63,7 +61,7 @@ void OceffWipe3_Update(Actor* thisx, GlobalContext* globalCtx) { void OceffWipe3_Draw(Actor* thisx, GlobalContext* globalCtx) { u32 scroll = globalCtx->state.frames & 0xFFF; - OceffWipe3* this = THIS; + OceffWipe3* this = (OceffWipe3*)thisx; f32 z; u8 alpha; s32 pad[2]; 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 22c999952a..95b4b846dc 100644 --- a/src/overlays/actors/ovl_Oceff_Wipe4/z_oceff_wipe4.c +++ b/src/overlays/actors/ovl_Oceff_Wipe4/z_oceff_wipe4.c @@ -9,8 +9,6 @@ #define FLAGS 0x02000010 -#define THIS ((OceffWipe4*)thisx) - void OceffWipe4_Init(Actor* thisx, GlobalContext* globalCtx); void OceffWipe4_Destroy(Actor* thisx, GlobalContext* globalCtx); void OceffWipe4_Update(Actor* thisx, GlobalContext* globalCtx); @@ -29,7 +27,7 @@ const ActorInit Oceff_Wipe4_InitVars = { }; void OceffWipe4_Init(Actor* thisx, GlobalContext* globalCtx) { - OceffWipe4* this = THIS; + OceffWipe4* this = (OceffWipe4*)thisx; Actor_SetScale(&this->actor, 0.1f); this->timer = 0; @@ -38,13 +36,13 @@ void OceffWipe4_Init(Actor* thisx, GlobalContext* globalCtx) { } void OceffWipe4_Destroy(Actor* thisx, GlobalContext* globalCtx) { - OceffWipe4* this = THIS; + OceffWipe4* this = (OceffWipe4*)thisx; func_800876C8(globalCtx); } void OceffWipe4_Update(Actor* thisx, GlobalContext* globalCtx) { - OceffWipe4* this = THIS; + OceffWipe4* this = (OceffWipe4*)thisx; this->actor.world.pos = GET_ACTIVE_CAM(globalCtx)->eye; if (this->timer < 50) { @@ -58,7 +56,7 @@ void OceffWipe4_Update(Actor* thisx, GlobalContext* globalCtx) { void OceffWipe4_Draw(Actor* thisx, GlobalContext* globalCtx) { u32 scroll = globalCtx->state.frames & 0xFFF; - OceffWipe4* this = THIS; + OceffWipe4* this = (OceffWipe4*)thisx; f32 z; u8 alpha; s32 pad[2]; 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 512167442b..85d10f21ee 100644 --- a/src/overlays/actors/ovl_Shot_Sun/z_shot_sun.c +++ b/src/overlays/actors/ovl_Shot_Sun/z_shot_sun.c @@ -11,8 +11,6 @@ #define FLAGS 0x00000009 -#define THIS ((ShotSun*)thisx) - void ShotSun_Init(Actor* thisx, GlobalContext* globalCtx); void ShotSun_Destroy(Actor* thisx, GlobalContext* globalCtx); void ShotSun_Update(Actor* thisx, GlobalContext* globalCtx); @@ -55,7 +53,7 @@ static ColliderCylinderInit sCylinderInit = { }; void ShotSun_Init(Actor* thisx, GlobalContext* globalCtx) { - ShotSun* this = THIS; + ShotSun* this = (ShotSun*)thisx; s32 params; // "Ocarina secret occurrence" @@ -76,7 +74,7 @@ void ShotSun_Init(Actor* thisx, GlobalContext* globalCtx) { } void ShotSun_Destroy(Actor* thisx, GlobalContext* globalCtx) { - ShotSun* this = THIS; + ShotSun* this = (ShotSun*)thisx; s32 params = this->actor.params & 0xFF; if (params != 0x40 && params != 0x41) { @@ -195,7 +193,7 @@ void ShotSun_UpdateHyliaSun(ShotSun* this, GlobalContext* globalCtx) { } void ShotSun_Update(Actor* thisx, GlobalContext* globalCtx) { - ShotSun* this = THIS; + ShotSun* this = (ShotSun*)thisx; this->actionFunc(this, globalCtx); } diff --git a/src/overlays/actors/ovl_player_actor/z_player.c b/src/overlays/actors/ovl_player_actor/z_player.c index 5c0512ea95..60097a3be5 100644 --- a/src/overlays/actors/ovl_player_actor/z_player.c +++ b/src/overlays/actors/ovl_player_actor/z_player.c @@ -20,8 +20,6 @@ #include "objects/gameplay_keep/gameplay_keep.h" #include "objects/object_link_child/object_link_child.h" -#define THIS ((Player*)thisx) - typedef struct { /* 0x00 */ u8 itemId; /* 0x01 */ u8 field; // various bit-packed data @@ -9046,7 +9044,7 @@ static void (*D_80854738[])(GlobalContext* globalCtx, Player* this) = { static Vec3f D_80854778 = { 0.0f, 50.0f, 0.0f }; void Player_Init(Actor* thisx, GlobalContext* globalCtx2) { - Player* this = THIS; + Player* this = (Player*)thisx; GlobalContext* globalCtx = globalCtx2; SceneTableEntry* scene = globalCtx->loadedScene; u32 titleFileSize; @@ -10257,7 +10255,7 @@ static Vec3f D_80854838 = { 0.0f, 0.0f, -30.0f }; void Player_Update(Actor* thisx, GlobalContext* globalCtx) { static Vec3f sDogSpawnPos; - Player* this = THIS; + Player* this = (Player*)thisx; s32 dogParams; s32 pad; Input sp44; @@ -10395,7 +10393,7 @@ void func_8084A0E8(GlobalContext* globalCtx, Player* this, s32 lod, Gfx* cullDLi void Player_Draw(Actor* thisx, GlobalContext* globalCtx2) { GlobalContext* globalCtx = globalCtx2; - Player* this = THIS; + Player* this = (Player*)thisx; OPEN_DISPS(globalCtx->state.gfxCtx, "../z_player.c", 19346); @@ -10488,7 +10486,7 @@ void Player_Draw(Actor* thisx, GlobalContext* globalCtx2) { } void Player_Destroy(Actor* thisx, GlobalContext* globalCtx) { - Player* this = THIS; + Player* this = (Player*)thisx; Effect_Delete(globalCtx, this->swordEffectIndex);