summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorpetrie911 <69443847+petrie911@users.noreply.github.com>2021-03-31 11:18:31 -0500
committerGitHub <noreply@github.com>2021-03-31 12:18:31 -0400
commit9b4482314a1dbbaf8ac354f587db45ee8697d431 (patch)
tree8cac42b160f39a2ff6fd29f6a1948441e6c154ae /src
parent28cfd82a4f692cdeb1e66c2df980da07e6b41e2d (diff)
OnePointDemo OK (#719)
* matches * more matches * progress? * it's time * so close * organize declarations * docs * more fixes * more fixes * fix stage 1 * more fixes * first try * demo ids in decimal * final cleanup * one more thing * fixes * more cleanup * onepointcs * OnePointCutscene Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain>
Diffstat (limited to 'src')
-rw-r--r--src/code/z_actor.c18
-rw-r--r--src/code/z_camera.c350
-rw-r--r--src/code/z_camera_data.c16
-rw-r--r--src/code/z_demo.c16
-rw-r--r--src/code/z_eff_spark.c2
-rw-r--r--src/code/z_effect_soft_sprite_old_init.c2
-rw-r--r--src/code/z_onepointdemo.c1374
-rw-r--r--src/code/z_onepointdemo_data.c670
-rw-r--r--src/code/z_parameter.c7
-rw-r--r--src/code/z_play.c111
-rw-r--r--src/code/z_player_lib.c22
-rw-r--r--src/code/z_quake.c2
-rw-r--r--src/code/z_room.c6
-rw-r--r--src/code/z_scene.c2
-rw-r--r--src/code/z_scene_table.c5
-rw-r--r--src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c166
-rw-r--r--src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.c6
-rw-r--r--src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.c6
-rw-r--r--src/overlays/actors/ovl_Arrow_Light/z_arrow_light.c6
-rw-r--r--src/overlays/actors/ovl_Bg_Bdan_Objects/z_bg_bdan_objects.c26
-rw-r--r--src/overlays/actors/ovl_Bg_Bdan_Switch/z_bg_bdan_switch.c10
-rw-r--r--src/overlays/actors/ovl_Bg_Ddan_Jd/z_bg_ddan_jd.c4
-rw-r--r--src/overlays/actors/ovl_Bg_Ddan_Kd/z_bg_ddan_kd.c2
-rw-r--r--src/overlays/actors/ovl_Bg_Dodoago/z_bg_dodoago.c6
-rw-r--r--src/overlays/actors/ovl_Bg_Dy_Yoseizo/z_bg_dy_yoseizo.c12
-rw-r--r--src/overlays/actors/ovl_Bg_Gjyo_Bridge/z_bg_gjyo_bridge.c2
-rw-r--r--src/overlays/actors/ovl_Bg_Haka_Gate/z_bg_haka_gate.c2
-rw-r--r--src/overlays/actors/ovl_Bg_Haka_Huta/z_bg_haka_huta.c4
-rw-r--r--src/overlays/actors/ovl_Bg_Haka_MeganeBG/z_bg_haka_meganebg.c2
-rw-r--r--src/overlays/actors/ovl_Bg_Haka_Ship/z_bg_haka_ship.c2
-rw-r--r--src/overlays/actors/ovl_Bg_Haka_Trap/z_bg_haka_trap.c2
-rw-r--r--src/overlays/actors/ovl_Bg_Haka_Tubo/z_bg_haka_tubo.c2
-rw-r--r--src/overlays/actors/ovl_Bg_Haka_Zou/z_bg_haka_zou.c72
-rw-r--r--src/overlays/actors/ovl_Bg_Heavy_Block/z_bg_heavy_block.c8
-rw-r--r--src/overlays/actors/ovl_Bg_Hidan_Curtain/z_bg_hidan_curtain.c7
-rw-r--r--src/overlays/actors/ovl_Bg_Hidan_Fslift/z_bg_hidan_fslift.c4
-rw-r--r--src/overlays/actors/ovl_Bg_Hidan_Fwbig/z_bg_hidan_fwbig.c4
-rw-r--r--src/overlays/actors/ovl_Bg_Hidan_Hamstep/z_bg_hidan_hamstep.c2
-rw-r--r--src/overlays/actors/ovl_Bg_Hidan_Kousi/z_bg_hidan_kousi.c2
-rw-r--r--src/overlays/actors/ovl_Bg_Hidan_Rock/z_bg_hidan_rock.c10
-rw-r--r--src/overlays/actors/ovl_Bg_Hidan_Sima/z_bg_hidan_sima.c2
-rw-r--r--src/overlays/actors/ovl_Bg_Hidan_Syoku/z_bg_hidan_syoku.c4
-rw-r--r--src/overlays/actors/ovl_Bg_Ice_Shutter/z_bg_ice_shutter.c4
-rw-r--r--src/overlays/actors/ovl_Bg_Jya_1flift/z_bg_jya_1flift.c4
-rw-r--r--src/overlays/actors/ovl_Bg_Jya_Bigmirror/z_bg_jya_bigmirror.c4
-rw-r--r--src/overlays/actors/ovl_Bg_Jya_Bombchuiwa/z_bg_jya_bombchuiwa.c2
-rw-r--r--src/overlays/actors/ovl_Bg_Jya_Cobra/z_bg_jya_cobra.c8
-rw-r--r--src/overlays/actors/ovl_Bg_Jya_Goroiwa/z_bg_jya_goroiwa.c2
-rw-r--r--src/overlays/actors/ovl_Bg_Jya_Kanaami/z_bg_jya_kanaami.c2
-rw-r--r--src/overlays/actors/ovl_Bg_Jya_Lift/z_bg_jya_lift.c8
-rw-r--r--src/overlays/actors/ovl_Bg_Jya_Megami/z_bg_jya_megami.c6
-rw-r--r--src/overlays/actors/ovl_Bg_Mizu_Shutter/z_bg_mizu_shutter.c4
-rw-r--r--src/overlays/actors/ovl_Bg_Mizu_Water/z_bg_mizu_water.c2
-rw-r--r--src/overlays/actors/ovl_Bg_Mori_Bigst/z_bg_mori_bigst.c4
-rw-r--r--src/overlays/actors/ovl_Bg_Mori_Elevator/z_bg_mori_elevator.c4
-rw-r--r--src/overlays/actors/ovl_Bg_Mori_Hashira4/z_bg_mori_hashira4.c2
-rw-r--r--src/overlays/actors/ovl_Bg_Mori_Hineri/z_bg_mori_hineri.c30
-rw-r--r--src/overlays/actors/ovl_Bg_Mori_Idomizu/z_bg_mori_idomizu.c4
-rw-r--r--src/overlays/actors/ovl_Bg_Mori_Rakkatenjo/z_bg_mori_rakkatenjo.c12
-rw-r--r--src/overlays/actors/ovl_Bg_Po_Event/z_bg_po_event.c8
-rw-r--r--src/overlays/actors/ovl_Bg_Spot01_Idohashira/z_bg_spot01_idohashira.c2
-rw-r--r--src/overlays/actors/ovl_Bg_Spot03_Taki/z_bg_spot03_taki.c2
-rw-r--r--src/overlays/actors/ovl_Bg_Spot05_Soko/z_bg_spot05_soko.c2
-rw-r--r--src/overlays/actors/ovl_Bg_Spot06_Objects/z_bg_spot06_objects.c2
-rw-r--r--src/overlays/actors/ovl_Bg_Spot08_Bakudankabe/z_bg_spot08_bakudankabe.c2
-rw-r--r--src/overlays/actors/ovl_Bg_Spot08_Iceblock/z_bg_spot08_iceblock.c2
-rw-r--r--src/overlays/actors/ovl_Bg_Spot11_Oasis/z_bg_spot11_oasis.c2
-rw-r--r--src/overlays/actors/ovl_Bg_Spot12_Gate/z_bg_spot12_gate.c2
-rw-r--r--src/overlays/actors/ovl_Bg_Spot12_Saku/z_bg_spot12_saku.c2
-rw-r--r--src/overlays/actors/ovl_Bg_Spot16_Bombstone/z_bg_spot16_bombstone.c4
-rw-r--r--src/overlays/actors/ovl_Bg_Spot16_Doughnut/z_bg_spot16_doughnut.c2
-rw-r--r--src/overlays/actors/ovl_Bg_Spot18_Basket/z_bg_spot18_basket.c4
-rw-r--r--src/overlays/actors/ovl_Bg_Spot18_Shutter/z_bg_spot18_shutter.c4
-rw-r--r--src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth.c8
-rw-r--r--src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth_cutscene_data.c128
-rw-r--r--src/overlays/actors/ovl_Bg_Ydan_Hasi/z_bg_ydan_hasi.c82
-rw-r--r--src/overlays/actors/ovl_Bg_Ydan_Maruta/z_bg_ydan_maruta.c2
-rw-r--r--src/overlays/actors/ovl_Bg_Ydan_Sp/z_bg_ydan_sp.c2
-rw-r--r--src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c4
-rw-r--r--src/overlays/actors/ovl_Demo_Du/z_demo_du.c26
-rw-r--r--src/overlays/actors/ovl_Demo_Du/z_demo_du_cutscene_data.c216
-rw-r--r--src/overlays/actors/ovl_Demo_Ec/z_demo_ec.c2
-rw-r--r--src/overlays/actors/ovl_Demo_Effect/z_demo_effect.c18
-rw-r--r--src/overlays/actors/ovl_Demo_Ext/z_demo_ext.c2
-rw-r--r--src/overlays/actors/ovl_Demo_Go/z_demo_go.c11
-rw-r--r--src/overlays/actors/ovl_Demo_Gt/z_demo_gt.c6
-rw-r--r--src/overlays/actors/ovl_Demo_Ik/z_demo_ik.c2
-rw-r--r--src/overlays/actors/ovl_Demo_Im/z_demo_im.c10
-rw-r--r--src/overlays/actors/ovl_Demo_Im/z_demo_im_cutscene_data.c274
-rw-r--r--src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.c12
-rw-r--r--src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data1.c28
-rw-r--r--src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data2.c32
-rw-r--r--src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data3.c24
-rw-r--r--src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data4.c20
-rw-r--r--src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data5.c32
-rw-r--r--src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data6.c32
-rw-r--r--src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data7.c28
-rw-r--r--src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data8.c20
-rw-r--r--src/overlays/actors/ovl_Demo_Kekkai/z_demo_kekkai.c2
-rw-r--r--src/overlays/actors/ovl_Demo_Sa/z_demo_sa.c10
-rw-r--r--src/overlays/actors/ovl_Demo_Sa/z_demo_sa_cutscene_data.c220
-rw-r--r--src/overlays/actors/ovl_Demo_Shd/z_demo_shd.c8
-rw-r--r--src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c8
-rw-r--r--src/overlays/actors/ovl_En_Ani/z_en_ani.c2
-rw-r--r--src/overlays/actors/ovl_En_Arrow/z_en_arrow.c4
-rw-r--r--src/overlays/actors/ovl_En_Bili/z_en_bili.c2
-rw-r--r--src/overlays/actors/ovl_En_Bom_Bowl_Man/z_en_bom_bowl_man.c4
-rw-r--r--src/overlays/actors/ovl_En_Bom_Bowl_Pit/z_en_bom_bowl_pit.c10
-rw-r--r--src/overlays/actors/ovl_En_Bom_Chu/z_en_bom_chu.c6
-rw-r--r--src/overlays/actors/ovl_En_Boom/z_en_boom.c10
-rw-r--r--src/overlays/actors/ovl_En_Box/z_en_box.c12
-rw-r--r--src/overlays/actors/ovl_En_Bubble/z_en_bubble.c19
-rw-r--r--src/overlays/actors/ovl_En_Cs/z_en_cs.c2
-rw-r--r--src/overlays/actors/ovl_En_Daiku/z_en_daiku.c6
-rw-r--r--src/overlays/actors/ovl_En_Dnt_Demo/z_en_dnt_demo.c20
-rw-r--r--src/overlays/actors/ovl_En_Dnt_Jiji/z_en_dnt_jiji.c4
-rw-r--r--src/overlays/actors/ovl_En_Dnt_Nomal/z_en_dnt_nomal.c8
-rw-r--r--src/overlays/actors/ovl_En_Du/z_en_du.c4
-rw-r--r--src/overlays/actors/ovl_En_Elf/z_en_elf.c10
-rw-r--r--src/overlays/actors/ovl_En_Encount1/z_en_encount1.c2
-rw-r--r--src/overlays/actors/ovl_En_Encount2/z_en_encount2.c6
-rw-r--r--src/overlays/actors/ovl_En_Fd/z_en_fd.c8
-rw-r--r--src/overlays/actors/ovl_En_Fhg_Fire/z_en_fhg_fire.c2
-rw-r--r--src/overlays/actors/ovl_En_Fr/z_en_fr.c2
-rw-r--r--src/overlays/actors/ovl_En_Fu/z_en_fu.c2
-rw-r--r--src/overlays/actors/ovl_En_Fw/z_en_fw.c2
-rw-r--r--src/overlays/actors/ovl_En_GeldB/z_en_geldb.c2
-rw-r--r--src/overlays/actors/ovl_En_GirlA/z_en_girla.c2
-rw-r--r--src/overlays/actors/ovl_En_Go/z_en_go.c8
-rw-r--r--src/overlays/actors/ovl_En_Go2/z_en_go2.c10
-rw-r--r--src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.c2
-rw-r--r--src/overlays/actors/ovl_En_Gs/z_en_gs.c46
-rw-r--r--src/overlays/actors/ovl_En_Heishi1/z_en_heishi1.c2
-rw-r--r--src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c12
-rw-r--r--src/overlays/actors/ovl_En_Hintnuts/z_en_hintnuts.c7
-rw-r--r--src/overlays/actors/ovl_En_Holl/z_en_holl.c2
-rw-r--r--src/overlays/actors/ovl_En_Honotrap/z_en_honotrap.c2
-rw-r--r--src/overlays/actors/ovl_En_Horse_Ganon/z_en_horse_ganon.c4
-rw-r--r--src/overlays/actors/ovl_En_Horse_Zelda/z_en_horse_zelda.c2
-rw-r--r--src/overlays/actors/ovl_En_Ik/z_en_ik.c2
-rw-r--r--src/overlays/actors/ovl_En_In/z_en_in.c10
-rw-r--r--src/overlays/actors/ovl_En_Insect/z_en_insect.c2
-rw-r--r--src/overlays/actors/ovl_En_Ishi/z_en_ishi.c2
-rw-r--r--src/overlays/actors/ovl_En_Jj/z_en_jj.c2
-rw-r--r--src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.c62
-rw-r--r--src/overlays/actors/ovl_En_Kakasi2/z_en_kakasi2.c4
-rw-r--r--src/overlays/actors/ovl_En_Kakasi3/z_en_kakasi3.c98
-rw-r--r--src/overlays/actors/ovl_En_Kanban/z_en_kanban.c2
-rw-r--r--src/overlays/actors/ovl_En_Kusa/z_en_kusa.c2
-rw-r--r--src/overlays/actors/ovl_En_Kz/z_en_kz.c9
-rw-r--r--src/overlays/actors/ovl_En_M_Thunder/z_en_m_thunder.c4
-rw-r--r--src/overlays/actors/ovl_En_Ma3/z_en_ma3.c2
-rw-r--r--src/overlays/actors/ovl_En_Md/z_en_md.c2
-rw-r--r--src/overlays/actors/ovl_En_Nb/z_en_nb.c20
-rw-r--r--src/overlays/actors/ovl_En_Nb/z_en_nb_cutscene_data.c192
-rw-r--r--src/overlays/actors/ovl_En_Niw/z_en_niw.c2
-rw-r--r--src/overlays/actors/ovl_En_Niw_Girl/z_en_niw_girl.c2
-rw-r--r--src/overlays/actors/ovl_En_Okarina_Effect/z_en_okarina_effect.c2
-rw-r--r--src/overlays/actors/ovl_En_Okarina_Tag/z_en_okarina_tag_cutscene_data.c4
-rw-r--r--src/overlays/actors/ovl_En_Owl/z_en_owl.c4
-rw-r--r--src/overlays/actors/ovl_En_Po_Desert/z_en_po_desert.c2
-rw-r--r--src/overlays/actors/ovl_En_Po_Field/z_en_po_field.c23
-rw-r--r--src/overlays/actors/ovl_En_Po_Sisters/z_en_po_sisters.c6
-rw-r--r--src/overlays/actors/ovl_En_Poh/z_en_poh.c19
-rw-r--r--src/overlays/actors/ovl_En_Rl/z_en_rl.c10
-rw-r--r--src/overlays/actors/ovl_En_Ru1/z_en_ru1.c12
-rw-r--r--src/overlays/actors/ovl_En_Ru2/z_en_ru2.c16
-rw-r--r--src/overlays/actors/ovl_En_Sa/z_en_sa.c2
-rw-r--r--src/overlays/actors/ovl_En_Siofuki/z_en_siofuki.c2
-rw-r--r--src/overlays/actors/ovl_En_St/z_en_st.c4
-rw-r--r--src/overlays/actors/ovl_En_Stream/z_en_stream.c2
-rw-r--r--src/overlays/actors/ovl_En_Sw/z_en_sw.c49
-rw-r--r--src/overlays/actors/ovl_En_Syateki_Man/z_en_syateki_man.c14
-rw-r--r--src/overlays/actors/ovl_En_Syateki_Man/z_en_syateki_man.h2
-rw-r--r--src/overlays/actors/ovl_En_Syateki_Niw/z_en_syateki_niw.c5
-rw-r--r--src/overlays/actors/ovl_En_Ta/z_en_ta.c8
-rw-r--r--src/overlays/actors/ovl_En_Tr/z_en_tr.c18
-rw-r--r--src/overlays/actors/ovl_En_Trap/z_en_trap.c4
-rw-r--r--src/overlays/actors/ovl_En_Viewer/z_en_viewer.c25
-rw-r--r--src/overlays/actors/ovl_En_Wall_Tubo/z_en_wall_tubo.c2
-rw-r--r--src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c6
-rw-r--r--src/overlays/actors/ovl_En_Zl1/z_en_zl1.c8
-rw-r--r--src/overlays/actors/ovl_En_Zl1/z_en_zl1_cutscene_data.c290
-rw-r--r--src/overlays/actors/ovl_En_Zl2/z_en_zl2.c4
-rw-r--r--src/overlays/actors/ovl_En_Zl3/z_en_zl3.c38
-rw-r--r--src/overlays/actors/ovl_En_Zl4/z_en_zl4.c14
-rw-r--r--src/overlays/actors/ovl_En_fHG/z_en_fhg.c4
-rw-r--r--src/overlays/actors/ovl_Item_Etcetera/z_item_etcetera.c2
-rw-r--r--src/overlays/actors/ovl_Magic_Fire/z_magic_fire.c2
-rw-r--r--src/overlays/actors/ovl_Obj_Blockstop/z_obj_blockstop.c4
-rw-r--r--src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c6
-rw-r--r--src/overlays/actors/ovl_Obj_Dekujr/z_obj_dekujr.c2
-rw-r--r--src/overlays/actors/ovl_Obj_Hamishi/z_obj_hamishi.c2
-rw-r--r--src/overlays/actors/ovl_Obj_Ice_Poly/z_obj_ice_poly.c2
-rw-r--r--src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.c8
-rw-r--r--src/overlays/actors/ovl_Obj_Mure2/z_obj_mure2.c4
-rw-r--r--src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c16
-rw-r--r--src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c6
-rw-r--r--src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.c6
-rw-r--r--src/overlays/actors/ovl_Obj_Timeblock/z_obj_timeblock.c4
-rw-r--r--src/overlays/actors/ovl_Obj_Warp2block/z_obj_warp2block.c2
-rw-r--r--src/overlays/actors/ovl_Shot_Sun/z_shot_sun.c45
-rw-r--r--src/overlays/actors/ovl_player_actor/z_player.c93
-rw-r--r--src/overlays/effects/ovl_Effect_Ss_En_Fire/z_eff_ss_en_fire.c6
-rw-r--r--src/overlays/effects/ovl_Effect_Ss_En_Ice/z_eff_ss_en_ice.c4
-rw-r--r--src/overlays/effects/ovl_Effect_Ss_Fcircle/z_eff_ss_fcircle.c2
-rw-r--r--src/overlays/effects/ovl_Effect_Ss_Fire_Tail/z_eff_ss_fire_tail.c4
-rw-r--r--src/overlays/effects/ovl_Effect_Ss_Ice_Piece/z_eff_ss_ice_piece.c4
-rw-r--r--src/overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.c12
209 files changed, 3913 insertions, 1978 deletions
diff --git a/src/code/z_actor.c b/src/code/z_actor.c
index 807f90356..f5d99fff3 100644
--- a/src/code/z_actor.c
+++ b/src/code/z_actor.c
@@ -42,7 +42,7 @@ void ActorShadow_Draw(Actor* actor, Lights* lights, GlobalContext* globalCtx, Gf
Matrix_Put(&sp60);
if (dlist != gCircleShadowDL) {
- Matrix_RotateY(actor->shape.rot.y * (M_PI / 32768), MTXMODE_APPLY);
+ Matrix_RotateY(actor->shape.rot.y * (M_PI / 0x8000), MTXMODE_APPLY);
}
temp2 = (1.0f - (temp1 * (1.0f / 350))) * actor->shape.shadowScale;
@@ -407,7 +407,7 @@ void func_8002C124(TargetContext* targetCtx, GlobalContext* globalCtx) {
Matrix_Translate(actor->focus.pos.x, actor->focus.pos.y + (actor->targetArrowOffset * actor->scale.y) + 17.0f,
actor->focus.pos.z, MTXMODE_NEW);
- Matrix_RotateY((f32)((u16)(globalCtx->gameplayFrames * 3000)) * (M_PI / 32768), MTXMODE_APPLY);
+ Matrix_RotateY((f32)((u16)(globalCtx->gameplayFrames * 3000)) * (M_PI / 0x8000), MTXMODE_APPLY);
Matrix_Scale((iREG(27) + 35) / 1000.0f, (iREG(28) + 60) / 1000.0f, (iREG(29) + 50) / 1000.0f, MTXMODE_APPLY);
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, naviColor->inner.r, naviColor->inner.g, naviColor->inner.b, 255);
@@ -1898,7 +1898,7 @@ void func_8002FBAC(GlobalContext* globalCtx) {
spD4 = spCC * 0.200000000000000011102230246252 + 1.0f;
}
- if ((globalCtx->csCtx.state == 0) &&
+ if ((globalCtx->csCtx.state == CS_STATE_IDLE) &&
(gSaveContext.respawn[RESPAWN_MODE_TOP].entranceIndex == gSaveContext.entranceIndex) &&
(globalCtx->roomCtx.curRoom.num == gSaveContext.respawn[RESPAWN_MODE_TOP].roomIndex)) {
POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 0x19);
@@ -2430,7 +2430,7 @@ void func_800315AC(GlobalContext* globalCtx, ActorContext* actorCtx) {
if ((HREG(64) != 1) || (HREG(72) != 0)) {
if (globalCtx->actorCtx.unk_03 != 0) {
func_8003115C(globalCtx, invisibleActorCounter, invisibleActors);
- if ((globalCtx->csCtx.state != 0) || Player_InCsMode(globalCtx)) {
+ if ((globalCtx->csCtx.state != CS_STATE_IDLE) || Player_InCsMode(globalCtx)) {
func_800304B0(globalCtx);
}
}
@@ -3842,7 +3842,7 @@ s16 func_80034DD4(Actor* actor, GlobalContext* globalCtx, s16 arg2, f32 arg3) {
Player* player = PLAYER;
f32 var;
- if ((globalCtx->csCtx.state != 0) || (gDbgCamEnabled != 0)) {
+ if ((globalCtx->csCtx.state != CS_STATE_IDLE) || (gDbgCamEnabled)) {
var = Math_Vec3f_DistXYZ(&actor->world.pos, &globalCtx->view.eye) * 0.25f;
} else {
var = Math_Vec3f_DistXYZ(&actor->world.pos, &player->actor.world.pos);
@@ -5488,7 +5488,7 @@ s32 func_80038154(GlobalContext* globalCtx, Actor* actor, Vec3s* arg2, Vec3s* ar
actor->focus.pos = actor->world.pos;
actor->focus.pos.y += arg4;
- if (!(((globalCtx->csCtx.state != 0) || (gDbgCamEnabled != 0)) && (gSaveContext.entranceIndex == 0x00EE))) {
+ if (!(((globalCtx->csCtx.state != CS_STATE_IDLE) || (gDbgCamEnabled)) && (gSaveContext.entranceIndex == 0x00EE))) {
var = actor->yawTowardsPlayer - actor->shape.rot.y;
abs_var = ABS(var);
if (abs_var >= 0x4300) {
@@ -5497,7 +5497,7 @@ s32 func_80038154(GlobalContext* globalCtx, Actor* actor, Vec3s* arg2, Vec3s* ar
}
}
- if (((globalCtx->csCtx.state != 0) || (gDbgCamEnabled != 0)) && (gSaveContext.entranceIndex == 0x00EE)) {
+ if (((globalCtx->csCtx.state != CS_STATE_IDLE) || (gDbgCamEnabled)) && (gSaveContext.entranceIndex == 0x00EE)) {
sp2C = globalCtx->view.eye;
} else {
sp2C = player->actor.focus.pos;
@@ -5517,7 +5517,7 @@ s32 func_80038290(GlobalContext* globalCtx, Actor* actor, Vec3s* arg2, Vec3s* ar
actor->focus.pos = arg4;
- if (!(((globalCtx->csCtx.state != 0) || (gDbgCamEnabled != 0)) && (gSaveContext.entranceIndex == 0x00EE))) {
+ if (!(((globalCtx->csCtx.state != CS_STATE_IDLE) || (gDbgCamEnabled)) && (gSaveContext.entranceIndex == 0x00EE))) {
var = actor->yawTowardsPlayer - actor->shape.rot.y;
abs_var = ABS(var);
if (abs_var >= 0x4300) {
@@ -5526,7 +5526,7 @@ s32 func_80038290(GlobalContext* globalCtx, Actor* actor, Vec3s* arg2, Vec3s* ar
}
}
- if (((globalCtx->csCtx.state != 0) || (gDbgCamEnabled != 0)) && (gSaveContext.entranceIndex == 0x00EE)) {
+ if (((globalCtx->csCtx.state != CS_STATE_IDLE) || (gDbgCamEnabled)) && (gSaveContext.entranceIndex == 0x00EE)) {
sp24 = globalCtx->view.eye;
} else {
sp24 = player->actor.focus.pos;
diff --git a/src/code/z_camera.c b/src/code/z_camera.c
index 4bd292f2e..6b15d4c32 100644
--- a/src/code/z_camera.c
+++ b/src/code/z_camera.c
@@ -15,8 +15,6 @@ s32 Camera_CheckWater(Camera* camera);
#define NEXTSETTING ((values++)->val)
#define NEXTPCT PCT(NEXTSETTING)
-#define ONEPOINTDEMO ((Unique9OnePointDemo*)camera->paramData)
-
#define BGCAM_POS(v) ((v)[0])
#define BGCAM_ROT(v) ((v)[1])
#define BGCAM_FOV(v) ((v)[2].x)
@@ -1498,7 +1496,7 @@ s32 Camera_Normal1(Camera* camera) {
sp9C = camera->speedRatio * PCT(OREG(26));
sp98 = anim->swing.unk_18 != 0 ? PCT(OREG(25)) : spA0;
- sp94 = (camera->xzSpeed - anim->unk_20) * (0.3333329856395721435546875f);
+ sp94 = (camera->xzSpeed - anim->unk_20) * (0.333333f);
if (sp94 > 1.0f) {
sp94 = 1.0f;
}
@@ -4993,13 +4991,13 @@ s32 Camera_Unique8(Camera* camera) {
s32 Camera_Unique9(Camera* camera) {
Vec3f atTarget;
Vec3f eyeTarget;
- Unique9* uniq9 = &ONEPOINTDEMO->uniq9;
+ Unique9* uniq9 = &ONEPOINT_CS_INFO(camera)->uniq9;
Unique9Anim* anim = &uniq9->anim;
f32 invKeyFrameTimer;
VecSph eyeNextAtOffset;
VecSph scratchSph;
VecSph playerTargetOffset;
- s16 pad;
+ s16 action;
s16 atInitFlags;
s16 eyeInitFlags;
s16 pad2;
@@ -5008,19 +5006,17 @@ s32 Camera_Unique9(Camera* camera) {
PosRot playerPosRot;
Vec3f* eyeNext = &camera->eyeNext;
Vec3f* at = &camera->at;
- s16 action;
- Player* player;
+ Vec3f* eye = &camera->eye;
+ Player* player = camera->player;
Actor* focusActor;
f32 spB4;
PosRot atFocusPosRot;
Vec3f eyeLookAtPos;
- Vec3f* eye = &camera->eye;
+ CameraModeValue* values;
PosRot eyeFocusPosRot;
- player = camera->player;
-
if (RELOAD_PARAMS) {
- CameraModeValue* values = sCameraSettings[camera->setting].cameraModes[camera->mode].values;
+ values = sCameraSettings[camera->setting].cameraModes[camera->mode].values;
uniq9->interfaceFlags = NEXTSETTING;
}
@@ -5051,8 +5047,8 @@ s32 Camera_Unique9(Camera* camera) {
if (anim->keyFrameTimer == 0) {
anim->isNewKeyFrame = true;
anim->curKeyFrameIdx++;
- if (anim->curKeyFrameIdx < ONEPOINTDEMO->keyFrameCnt) {
- anim->curKeyFrame = &ONEPOINTDEMO->keyFrames[anim->curKeyFrameIdx];
+ if (anim->curKeyFrameIdx < ONEPOINT_CS_INFO(camera)->keyFrameCnt) {
+ anim->curKeyFrame = &ONEPOINT_CS_INFO(camera)->keyFrames[anim->curKeyFrameIdx];
anim->keyFrameTimer = anim->curKeyFrame->timerInit;
if (anim->curKeyFrame->unk_01 != 0xFF) {
@@ -5070,7 +5066,7 @@ s32 Camera_Unique9(Camera* camera) {
}
} else {
// We've gone through all the keyframes.
- if (camera->thisIdx != 0) {
+ if (camera->thisIdx != MAIN_CAM) {
camera->timer = 0;
}
return true;
@@ -5132,13 +5128,10 @@ s32 Camera_Unique9(Camera* camera) {
if (focusActor != NULL) {
if ((atInitFlags & 0xF) == 1) {
- // head
Actor_GetFocus(&atFocusPosRot, focusActor);
} else if ((atInitFlags & 0xF) == 2) {
- // world
Actor_GetWorld(&atFocusPosRot, focusActor);
} else {
- // world, shape rot
Actor_GetWorldPosShapeRot(&atFocusPosRot, focusActor);
}
@@ -5179,19 +5172,59 @@ s32 Camera_Unique9(Camera* camera) {
anim->eyeTarget.y = camera->eyeNext.y + anim->curKeyFrame->eyeTargetInit.y;
anim->eyeTarget.z = camera->eyeNext.z + anim->curKeyFrame->eyeTargetInit.z;
}
- } else {
- if (eyeInitFlags == 0x400 || eyeInitFlags == (s16)0x8400 || eyeInitFlags == 0x500 ||
- eyeInitFlags == (s16)0x8500) {
- if (camera->target != NULL && camera->target->update != NULL) {
- Actor_GetFocus(&targethead, camera->target);
- Actor_GetFocus(&playerhead, &camera->player->actor);
- playerhead.pos.x = playerPosRot.pos.x;
- playerhead.pos.z = playerPosRot.pos.z;
- OLib_Vec3fDiffToVecSphGeo(&playerTargetOffset, &targethead.pos, &playerhead.pos);
- if (eyeInitFlags == 0x400 || eyeInitFlags == (s16)0x8400) {
- eyeLookAtPos = targethead.pos;
+ } else if (eyeInitFlags == 0x400 || eyeInitFlags == (s16)0x8400 || eyeInitFlags == 0x500 ||
+ eyeInitFlags == (s16)0x8500) {
+ if (camera->target != NULL && camera->target->update != NULL) {
+ Actor_GetFocus(&targethead, camera->target);
+ Actor_GetFocus(&playerhead, &camera->player->actor);
+ playerhead.pos.x = playerPosRot.pos.x;
+ playerhead.pos.z = playerPosRot.pos.z;
+ OLib_Vec3fDiffToVecSphGeo(&playerTargetOffset, &targethead.pos, &playerhead.pos);
+ if (eyeInitFlags == 0x400 || eyeInitFlags == (s16)0x8400) {
+ eyeLookAtPos = targethead.pos;
+ } else {
+ eyeLookAtPos = anim->atTarget;
+ }
+
+ if (eyeInitFlags & (s16)0x8080) {
+ scratchSph.pitch = DEGF_TO_BINANG(anim->curKeyFrame->eyeTargetInit.x);
+ scratchSph.yaw = DEGF_TO_BINANG(anim->curKeyFrame->eyeTargetInit.y);
+ scratchSph.r = anim->curKeyFrame->eyeTargetInit.z;
+ } else {
+ OLib_Vec3fToVecSphGeo(&scratchSph, &anim->curKeyFrame->eyeTargetInit);
+ }
+
+ scratchSph.yaw += playerTargetOffset.yaw;
+ scratchSph.pitch += playerTargetOffset.pitch;
+ Camera_Vec3fVecSphGeoAdd(&anim->eyeTarget, &eyeLookAtPos, &scratchSph);
+ } else {
+ if (camera->target == NULL) {
+ osSyncPrintf(VT_COL(YELLOW, BLACK) "camera: warning: demo C: actor is not valid\n" VT_RST);
+ }
+ camera->target = NULL;
+ anim->eyeTarget = *eyeNext;
+ }
+ } else if (eyeInitFlags & 0x6060) {
+ if (!(eyeInitFlags & 0x400) || anim->isNewKeyFrame) {
+ if (eyeInitFlags & 0x2020) {
+ focusActor = &camera->player->actor;
+ } else if (camera->target != NULL && camera->target->update != NULL) {
+ focusActor = camera->target;
+ } else {
+ camera->target = NULL;
+ focusActor = NULL;
+ }
+
+ if (focusActor != NULL) {
+ if ((eyeInitFlags & 0xF00) == 0x100) {
+ // head
+ Actor_GetFocus(&eyeFocusPosRot, focusActor);
+ } else if ((eyeInitFlags & 0xF00) == 0x200) {
+ // world
+ Actor_GetWorld(&eyeFocusPosRot, focusActor);
} else {
- eyeLookAtPos = anim->atTarget;
+ // world, shapeRot
+ Actor_GetWorldPosShapeRot(&eyeFocusPosRot, focusActor);
}
if (eyeInitFlags & (s16)0x8080) {
@@ -5202,9 +5235,9 @@ s32 Camera_Unique9(Camera* camera) {
OLib_Vec3fToVecSphGeo(&scratchSph, &anim->curKeyFrame->eyeTargetInit);
}
- scratchSph.yaw += playerTargetOffset.yaw;
- scratchSph.pitch += playerTargetOffset.pitch;
- Camera_Vec3fVecSphGeoAdd(&anim->eyeTarget, &eyeLookAtPos, &scratchSph);
+ scratchSph.yaw += eyeFocusPosRot.rot.y;
+ scratchSph.pitch -= eyeFocusPosRot.rot.x;
+ Camera_Vec3fVecSphGeoAdd(&anim->eyeTarget, &eyeFocusPosRot.pos, &scratchSph);
} else {
if (camera->target == NULL) {
osSyncPrintf(VT_COL(YELLOW, BLACK) "camera: warning: demo C: actor is not valid\n" VT_RST);
@@ -5212,53 +5245,9 @@ s32 Camera_Unique9(Camera* camera) {
camera->target = NULL;
anim->eyeTarget = *eyeNext;
}
- } else {
- if (eyeInitFlags & 0x6060) {
- if (!(eyeInitFlags & 0x400) || anim->isNewKeyFrame) {
- if (eyeInitFlags & 0x2020) {
- focusActor = &camera->player->actor;
- } else if (camera->target != NULL && camera->target->update != NULL) {
- focusActor = camera->target;
- } else {
- camera->target = NULL;
- focusActor = NULL;
- }
-
- if (focusActor != NULL) {
- if ((eyeInitFlags & 0xF00) == 0x100) {
- // head
- Actor_GetFocus(&eyeFocusPosRot, focusActor);
- } else if ((eyeInitFlags & 0xF00) == 0x200) {
- // world
- Actor_GetWorld(&eyeFocusPosRot, focusActor);
- } else {
- // world, shapeRot
- Actor_GetWorldPosShapeRot(&eyeFocusPosRot, focusActor);
- }
-
- if (eyeInitFlags & (s16)0x8080) {
- scratchSph.pitch = DEGF_TO_BINANG(anim->curKeyFrame->eyeTargetInit.x);
- scratchSph.yaw = DEGF_TO_BINANG(anim->curKeyFrame->eyeTargetInit.y);
- scratchSph.r = anim->curKeyFrame->eyeTargetInit.z;
- } else {
- OLib_Vec3fToVecSphGeo(&scratchSph, &anim->curKeyFrame->eyeTargetInit);
- }
-
- scratchSph.yaw += eyeFocusPosRot.rot.y;
- scratchSph.pitch -= eyeFocusPosRot.rot.x;
- Camera_Vec3fVecSphGeoAdd(&anim->eyeTarget, &eyeFocusPosRot.pos, &scratchSph);
- } else {
- if (camera->target == NULL) {
- osSyncPrintf(VT_COL(YELLOW, BLACK) "camera: warning: demo C: actor is not valid\n" VT_RST);
- }
- camera->target = NULL;
- anim->eyeTarget = *eyeNext;
- }
- }
- } else {
- anim->eyeTarget = *eyeNext;
- }
}
+ } else {
+ anim->eyeTarget = *eyeNext;
}
if (anim->curKeyFrame->initFlags == 2) {
@@ -5413,19 +5402,22 @@ s32 Camera_Unique9(Camera* camera) {
// Set current keyframe to the roll target?
anim->curKeyFrameIdx = anim->rollTarget;
break;
- case 19:
+ case 19: {
// Change the parent camera (or default)'s mode to normal
- Camera_ChangeModeFlags(camera->globalCtx->cameraPtrs[camera->parentCamIdx < 0 ? 0 : camera->parentCamIdx],
- CAM_MODE_NORMAL, 1);
- case 18:
+ s32 camIdx = camera->parentCamIdx <= SUBCAM_NONE ? MAIN_CAM : camera->parentCamIdx;
+
+ Camera_ChangeModeFlags(camera->globalCtx->cameraPtrs[camIdx], CAM_MODE_NORMAL, 1);
+ }
+ case 18: {
// copy the current camera to the parent (or default)'s camera.
- {
- Camera* cam = camera->globalCtx->cameraPtrs[camera->parentCamIdx < 0 ? 0 : camera->parentCamIdx];
- *eye = *eyeNext;
- Camera_Copy(cam, camera);
- }
+ s32 camIdx = camera->parentCamIdx <= SUBCAM_NONE ? MAIN_CAM : camera->parentCamIdx;
+ Camera* cam = camera->globalCtx->cameraPtrs[camIdx];
+
+ *eye = *eyeNext;
+ Camera_Copy(cam, camera);
+ }
default:
- if (camera->thisIdx != 0) {
+ if (camera->thisIdx != MAIN_CAM) {
camera->timer = 0;
}
}
@@ -5598,19 +5590,18 @@ s32 Camera_Demo3(Camera* camera) {
Vec3f sp5C;
f32 temp_f0;
s32 pad;
- u8 skipUpdateEye;
- f32 yOffset;
+ u8 skipUpdateEye = false;
+ f32 yOffset = Player_GetHeight(camera->player);
s16 angle;
Demo3* demo3 = (Demo3*)camera->paramData;
Demo3Anim* anim = &demo3->anim;
s32 pad2;
- skipUpdateEye = false;
- yOffset = Player_GetHeight(camera->player);
camera->unk_14C &= ~0x10;
if (RELOAD_PARAMS) {
CameraModeValue* values = sCameraSettings[camera->setting].cameraModes[camera->mode].values;
+
demo3->fov = NEXTSETTING;
demo3->unk_04 = NEXTSETTING; // unused.
demo3->interfaceFlags = NEXTSETTING;
@@ -5762,7 +5753,7 @@ s32 Camera_Demo3(Camera* camera) {
}
sCameraInterfaceFlags = 0;
skipeyeUpdate:
- skipUpdateEye = 1;
+ skipUpdateEye = true;
break;
}
@@ -5845,28 +5836,28 @@ s32 Camera_Demo5(Camera* camera) {
D_8011D6AC[1].timerInit = camera->timer - 1;
D_8011D6AC[1].atTargetInit.z = Rand_ZeroOne() * 10.0f;
D_8011D6AC[1].eyeTargetInit.x = Rand_ZeroOne() * 10.0f;
- ONEPOINTDEMO->keyFrames = D_8011D6AC;
- ONEPOINTDEMO->keyFrameCnt = ARRAY_COUNT(D_8011D6AC);
- if (camera->parentCamIdx != 0) {
- ONEPOINTDEMO->keyFrameCnt--;
+ ONEPOINT_CS_INFO(camera)->keyFrames = D_8011D6AC;
+ ONEPOINT_CS_INFO(camera)->keyFrameCnt = ARRAY_COUNT(D_8011D6AC);
+ if (camera->parentCamIdx != MAIN_CAM) {
+ ONEPOINT_CS_INFO(camera)->keyFrameCnt--;
} else {
camera->timer += D_8011D6AC[2].timerInit;
}
} else {
D_8011D724[1].eyeTargetInit.x = Rand_ZeroOne() * 10.0f;
D_8011D724[1].timerInit = camera->timer - 1;
- ONEPOINTDEMO->keyFrames = D_8011D724;
- ONEPOINTDEMO->keyFrameCnt = ARRAY_COUNT(D_8011D724);
- if (camera->parentCamIdx != 0) {
- ONEPOINTDEMO->keyFrameCnt--;
+ ONEPOINT_CS_INFO(camera)->keyFrames = D_8011D724;
+ ONEPOINT_CS_INFO(camera)->keyFrameCnt = ARRAY_COUNT(D_8011D724);
+ if (camera->parentCamIdx != MAIN_CAM) {
+ ONEPOINT_CS_INFO(camera)->keyFrameCnt--;
} else {
camera->timer += D_8011D724[2].timerInit;
}
}
} else if (playerTargetGeo.r < 30.0f) {
// distance between player and target is less than 30 units.
- ONEPOINTDEMO->keyFrames = D_8011D79C;
- ONEPOINTDEMO->keyFrameCnt = ARRAY_COUNT(D_8011D79C);
+ ONEPOINT_CS_INFO(camera)->keyFrames = D_8011D79C;
+ ONEPOINT_CS_INFO(camera)->keyFrameCnt = ARRAY_COUNT(D_8011D79C);
if ((sp78.yaw < 0x15) || (sp78.yaw >= 0x12C) || (sp78.pitch < 0x29) || (sp78.pitch >= 0xC8)) {
D_8011D79C[0].actionFlags = 0x41;
D_8011D79C[0].atTargetInit.y = -30.0f;
@@ -5879,8 +5870,8 @@ s32 Camera_Demo5(Camera* camera) {
D_8011D79C[1].timerInit = camera->timer - 1;
- if (camera->parentCamIdx != 0) {
- ONEPOINTDEMO->keyFrameCnt -= 2;
+ if (camera->parentCamIdx != MAIN_CAM) {
+ ONEPOINT_CS_INFO(camera)->keyFrameCnt -= 2;
} else {
camera->timer += D_8011D79C[2].timerInit + D_8011D79C[3].timerInit;
}
@@ -5888,10 +5879,10 @@ s32 Camera_Demo5(Camera* camera) {
// distance from the camera's current positon and the target is less than 300 units
// and the distance fromthe camera's current position to the player is less than 30 units
D_8011D83C[0].timerInit = camera->timer;
- ONEPOINTDEMO->keyFrames = D_8011D83C;
- ONEPOINTDEMO->keyFrameCnt = ARRAY_COUNT(D_8011D83C);
- if (camera->parentCamIdx != 0) {
- ONEPOINTDEMO->keyFrameCnt--;
+ ONEPOINT_CS_INFO(camera)->keyFrames = D_8011D83C;
+ ONEPOINT_CS_INFO(camera)->keyFrameCnt = ARRAY_COUNT(D_8011D83C);
+ if (camera->parentCamIdx != MAIN_CAM) {
+ ONEPOINT_CS_INFO(camera)->keyFrameCnt--;
} else {
camera->timer += D_8011D83C[1].timerInit;
}
@@ -5901,10 +5892,10 @@ s32 Camera_Demo5(Camera* camera) {
// is less than ~76.9 degrees
if (sp78.yaw >= 0x15 && sp78.yaw < 0x12C && sp78.pitch >= 0x29 && sp78.pitch < 0xC8 && eyePlayerGeo.r > 30.0f) {
D_8011D88C[0].timerInit = camera->timer;
- ONEPOINTDEMO->keyFrames = D_8011D88C;
- ONEPOINTDEMO->keyFrameCnt = ARRAY_COUNT(D_8011D88C);
- if (camera->parentCamIdx != 0) {
- ONEPOINTDEMO->keyFrameCnt--;
+ ONEPOINT_CS_INFO(camera)->keyFrames = D_8011D88C;
+ ONEPOINT_CS_INFO(camera)->keyFrameCnt = ARRAY_COUNT(D_8011D88C);
+ if (camera->parentCamIdx != MAIN_CAM) {
+ ONEPOINT_CS_INFO(camera)->keyFrameCnt--;
} else {
camera->timer += D_8011D88C[1].timerInit;
}
@@ -5919,10 +5910,10 @@ s32 Camera_Demo5(Camera* camera) {
}
D_8011D8DC[0].timerInit = camera->timer;
D_8011D8DC[1].timerInit = (s16)(eyeTargetDist * 0.005f) + 8;
- ONEPOINTDEMO->keyFrames = D_8011D8DC;
- ONEPOINTDEMO->keyFrameCnt = ARRAY_COUNT(D_8011D8DC);
- if (camera->parentCamIdx != 0) {
- ONEPOINTDEMO->keyFrameCnt -= 2;
+ ONEPOINT_CS_INFO(camera)->keyFrames = D_8011D8DC;
+ ONEPOINT_CS_INFO(camera)->keyFrameCnt = ARRAY_COUNT(D_8011D8DC);
+ if (camera->parentCamIdx != MAIN_CAM) {
+ ONEPOINT_CS_INFO(camera)->keyFrameCnt -= 2;
} else {
camera->timer += D_8011D8DC[1].timerInit + D_8011D8DC[2].timerInit;
}
@@ -5956,10 +5947,10 @@ s32 Camera_Demo5(Camera* camera) {
} else {
D_8011D954[2].timerInit = (s16)(eyeTargetDist * 0.004f) + 6;
}
- ONEPOINTDEMO->keyFrames = D_8011D954;
- ONEPOINTDEMO->keyFrameCnt = ARRAY_COUNT(D_8011D954);
- if (camera->parentCamIdx != 0) {
- ONEPOINTDEMO->keyFrameCnt -= 2;
+ ONEPOINT_CS_INFO(camera)->keyFrames = D_8011D954;
+ ONEPOINT_CS_INFO(camera)->keyFrameCnt = ARRAY_COUNT(D_8011D954);
+ if (camera->parentCamIdx != MAIN_CAM) {
+ ONEPOINT_CS_INFO(camera)->keyFrameCnt -= 2;
} else {
camera->timer += D_8011D954[2].timerInit + D_8011D954[3].timerInit;
}
@@ -5981,14 +5972,14 @@ s32 Camera_Demo5(Camera* camera) {
t = eyeTargetDist * 0.005f;
D_8011D9F4[1].timerInit = t + 8;
}
- ONEPOINTDEMO->keyFrames = D_8011D9F4;
- ONEPOINTDEMO->keyFrameCnt = ARRAY_COUNT(D_8011D9F4);
- if (camera->parentCamIdx != 0) {
+ ONEPOINT_CS_INFO(camera)->keyFrames = D_8011D9F4;
+ ONEPOINT_CS_INFO(camera)->keyFrameCnt = ARRAY_COUNT(D_8011D9F4);
+ if (camera->parentCamIdx != MAIN_CAM) {
if (camera->globalCtx->state.frames & 1) {
D_8011D9F4[0].rollTargetInit = -D_8011D9F4[0].rollTargetInit;
D_8011D9F4[1].rollTargetInit = -D_8011D9F4[1].rollTargetInit;
}
- ONEPOINTDEMO->keyFrameCnt -= 2;
+ ONEPOINT_CS_INFO(camera)->keyFrameCnt -= 2;
} else {
camera->timer += D_8011D9F4[1].timerInit + D_8011D9F4[2].timerInit;
D_8011D9F4[0].rollTargetInit = D_8011D9F4[1].rollTargetInit = 0;
@@ -6035,7 +6026,7 @@ s32 Camera_Demo5(Camera* camera) {
* Fixed position, rotates to follow the target
*/
s32 Camera_Demo6(Camera* camera) {
- Camera* cam0;
+ Camera* mainCam;
Demo6Anim* anim = (Demo6Anim*)&((Demo6*)camera->paramData)->anim;
Vec3f* eyeNext = &camera->eyeNext;
CameraModeValue* values;
@@ -6045,7 +6036,7 @@ s32 Camera_Demo6(Camera* camera) {
s16 stateTimers[4];
Vec3f* at = &camera->at;
- cam0 = Gameplay_GetCamera(camera->globalCtx, 0);
+ mainCam = Gameplay_GetCamera(camera->globalCtx, MAIN_CAM);
camFocus = camera->target;
stateTimers[1] = 0x37;
stateTimers[2] = 0x46;
@@ -6071,7 +6062,7 @@ s32 Camera_Demo6(Camera* camera) {
camera->at.z = focusPosRot.pos.z;
eyeOffset.r = 200.0f;
// 0x7D0 ~10.99 degrees
- eyeOffset.yaw = Camera_XZAngle(&focusPosRot.pos, &cam0->playerPosRot.pos) + 0x7D0;
+ eyeOffset.yaw = Camera_XZAngle(&focusPosRot.pos, &mainCam->playerPosRot.pos) + 0x7D0;
// -0x3E8 ~5.49 degrees
eyeOffset.pitch = -0x3E8;
Camera_Vec3fVecSphGeoAdd(eyeNext, at, &eyeOffset);
@@ -6131,17 +6122,17 @@ s32 Camera_Demo8(Camera* camera) {
s32 Camera_Demo9(Camera* camera) {
s32 pad;
s32 finishAction;
- s16 onePointParam;
- Demo9OnePointDemo* demo9OnePoint = (Demo9OnePointDemo*)camera->paramData;
+ s16 onePointTimer;
+ Demo9OnePointCs* demo9OnePoint = (Demo9OnePointCs*)camera->paramData;
Vec3f csEyeUpdate;
Vec3f csAtUpdate;
Vec3f newEye;
Vec3f newAt;
f32 newRoll;
CameraModeValue* values;
- Camera* cam0;
+ Camera* mainCam;
Vec3f* eye = &camera->eye;
- PosRot* cam0PlayerPosRot;
+ PosRot* mainCamPlayerPosRot;
PosRot focusPosRot;
s32 pad3;
Vec3f* eyeNext = &camera->eyeNext;
@@ -6150,8 +6141,8 @@ s32 Camera_Demo9(Camera* camera) {
f32* camFOV = &camera->fov;
Demo9Anim* anim = &demo9->anim;
- cam0 = Gameplay_GetCamera(camera->globalCtx, 0);
- cam0PlayerPosRot = &cam0->playerPosRot;
+ mainCam = Gameplay_GetCamera(camera->globalCtx, MAIN_CAM);
+ mainCamPlayerPosRot = &mainCam->playerPosRot;
if (RELOAD_PARAMS) {
values = sCameraSettings[camera->setting].cameraModes[camera->mode].values;
demo9->interfaceFlags = NEXTSETTING;
@@ -6171,14 +6162,14 @@ s32 Camera_Demo9(Camera* camera) {
anim->curFrame = 0.0f;
camera->animState++;
anim->doLERPAt = false;
- finishAction = demo9OnePoint->onePointDemo.actionParameters & 0xF000;
+ finishAction = demo9OnePoint->onePointCs.actionParameters & 0xF000;
if (finishAction != 0) {
anim->finishAction = finishAction;
// Clear finish parameters
- demo9OnePoint->onePointDemo.actionParameters &= 0xFFF;
+ demo9OnePoint->onePointCs.actionParameters &= 0xFFF;
}
- anim->animTimer = demo9OnePoint->onePointDemo.initTimer;
+ anim->animTimer = demo9OnePoint->onePointCs.initTimer;
case 1:
// Run the camera state
if (anim->animTimer > 0) {
@@ -6187,23 +6178,23 @@ s32 Camera_Demo9(Camera* camera) {
// Run the at and eye cs interpoloation functions, if either of them return 1 (that no more points
// exist) change the animation state to 2 (standby)
- if (func_800BB2B4(&csEyeUpdate, &newRoll, camFOV, demo9OnePoint->onePointDemo.eyePoints,
+ if (func_800BB2B4(&csEyeUpdate, &newRoll, camFOV, demo9OnePoint->onePointCs.eyePoints,
&anim->keyframe, &anim->curFrame) != 0 ||
- func_800BB2B4(&csAtUpdate, &newRoll, camFOV, demo9OnePoint->onePointDemo.atPoints, &anim->keyframe,
+ func_800BB2B4(&csAtUpdate, &newRoll, camFOV, demo9OnePoint->onePointCs.atPoints, &anim->keyframe,
&anim->curFrame) != 0) {
camera->animState = 2;
}
- if (demo9OnePoint->onePointDemo.actionParameters == 1) {
- // rotate around cam0's player
- Camera_RotateAroundPoint(cam0PlayerPosRot, &csEyeUpdate, &newEye);
- Camera_RotateAroundPoint(cam0PlayerPosRot, &csAtUpdate, &newAt);
- } else if (demo9OnePoint->onePointDemo.actionParameters == 4) {
+ if (demo9OnePoint->onePointCs.actionParameters == 1) {
+ // rotate around mainCam's player
+ Camera_RotateAroundPoint(mainCamPlayerPosRot, &csEyeUpdate, &newEye);
+ Camera_RotateAroundPoint(mainCamPlayerPosRot, &csAtUpdate, &newAt);
+ } else if (demo9OnePoint->onePointCs.actionParameters == 4) {
// rotate around the current camera's player
Actor_GetWorld(&focusPosRot, &camera->player->actor);
Camera_RotateAroundPoint(&focusPosRot, &csEyeUpdate, &newEye);
Camera_RotateAroundPoint(&focusPosRot, &csAtUpdate, &newAt);
- } else if (demo9OnePoint->onePointDemo.actionParameters == 8) {
+ } else if (demo9OnePoint->onePointCs.actionParameters == 8) {
// rotate around the current camera's target
if (camera->target != NULL && camera->target->update != NULL) {
Actor_GetWorld(&focusPosRot, camera->target);
@@ -6238,16 +6229,15 @@ s32 Camera_Demo9(Camera* camera) {
if (anim->finishAction != 0) {
if (anim->finishAction != 0x1000) {
if (anim->finishAction == 0x2000) {
- // finish action = 0x2000, run OnePointDemo 0x3FC (Dramatic Return to Link)
- onePointParam = demo9OnePoint->onePointDemo.initTimer < 0x32
- ? 5
- : demo9OnePoint->onePointDemo.initTimer / 5;
- func_800800F8(camera->globalCtx, 0x3FC, onePointParam, NULL, camera->parentCamIdx);
+ // finish action = 0x2000, run OnePointCs 0x3FC (Dramatic Return to Link)
+ onePointTimer =
+ demo9OnePoint->onePointCs.initTimer < 50 ? 5 : demo9OnePoint->onePointCs.initTimer / 5;
+ OnePointCutscene_Init(camera->globalCtx, 1020, onePointTimer, NULL, camera->parentCamIdx);
}
} else {
// finish action = 0x1000, copy the current camera's values to the
// default camera.
- Camera_Copy(cam0, camera);
+ Camera_Copy(mainCam, camera);
}
}
break;
@@ -6804,7 +6794,7 @@ void Camera_Init(Camera* camera, View* view, CollisionContext* colCtx, GlobalCon
sNextUID++;
}
- for (j = 0; j < 4; j++) {
+ for (j = 0; j < NUM_CAMS; j++) {
camP = camera->globalCtx->cameraPtrs[j];
if (camP != NULL && curUID == camP->uid) {
break;
@@ -6835,11 +6825,11 @@ void Camera_Init(Camera* camera, View* view, CollisionContext* colCtx, GlobalCon
sCameraShrinkWindowVal = 0x20;
sCameraInterfaceAlpha = 0;
camera->unk_14C = 0;
- camera->setting = camera->prevSetting = 0x21;
+ camera->setting = camera->prevSetting = CAM_SET_FREE0;
camera->camDataIdx = camera->prevCamDataIdx = -1;
camera->mode = 0;
camera->bgCheckId = BGCHECK_SCENE;
- camera->unk_168 = 0x7FFF;
+ camera->csId = 0x7FFF;
camera->timer = -1;
camera->unk_14C |= 0x4000;
@@ -6947,7 +6937,7 @@ void Camera_InitPlayerSettings(Camera* camera, Player* player) {
Camera_QRegInit();
osSyncPrintf(VT_FGCOL(BLUE) "camera: personalize ---" VT_RST "\n");
- if (camera->thisIdx == 0) {
+ if (camera->thisIdx == MAIN_CAM) {
Camera_CheckWater(camera);
}
}
@@ -6994,7 +6984,7 @@ void Camera_PrintSettings(Camera* camera) {
phi_a1 = 0;
phi_v1 = sp58;
phi_t0 = sp48;
- for (; phi_v1 < sp58 + 4; phi_v1++, phi_t0++, phi_a1++) {
+ for (; phi_v1 < sp58 + NUM_CAMS; phi_v1++, phi_t0++, phi_a1++) {
if (camera->globalCtx->cameraPtrs[phi_a1] == NULL) {
*phi_v1 = '-';
*phi_t0 = ' ';
@@ -7198,7 +7188,7 @@ s32 Camera_SetRoomHotFlag(Camera* camera) {
s32 Camera_DbgChangeMode(Camera* camera) {
s32 changeDir = 0;
- if (gDbgCamEnabled == 0 && camera->globalCtx->activeCamera == 0) {
+ if (!gDbgCamEnabled && camera->globalCtx->activeCamera == MAIN_CAM) {
if (CHECK_BTN_ALL(D_8015BD7C->state.input[2].press.button, BTN_CUP)) {
osSyncPrintf("attention sound URGENCY\n");
func_80078884(NA_SE_SY_ATTENTION_URGENCY);
@@ -7318,7 +7308,7 @@ Vec3s Camera_Update(Camera* camera) {
QuakeCamCalc quake;
Player* player;
- player = camera->globalCtx->cameraPtrs[0]->player;
+ player = camera->globalCtx->cameraPtrs[MAIN_CAM]->player;
if (R_DBG_CAM_UPDATE) {
osSyncPrintf("camera: in %x\n", camera);
@@ -7424,14 +7414,14 @@ Vec3s Camera_Update(Camera* camera) {
if ((gSaveContext.gameMode != 0) && (gSaveContext.gameMode != 3)) {
sCameraInterfaceFlags = 0;
Camera_UpdateInterface(sCameraInterfaceFlags);
- } else if ((D_8011D3F0 != 0) && (camera->thisIdx == 0)) {
+ } else if ((D_8011D3F0 != 0) && (camera->thisIdx == MAIN_CAM)) {
D_8011D3F0--;
sCameraInterfaceFlags = 0x3200;
Camera_UpdateInterface(sCameraInterfaceFlags);
} else if (camera->globalCtx->transitionMode != 0) {
sCameraInterfaceFlags = 0xF200;
Camera_UpdateInterface(sCameraInterfaceFlags);
- } else if (camera->globalCtx->csCtx.state != 0) {
+ } else if (camera->globalCtx->csCtx.state != CS_STATE_IDLE) {
sCameraInterfaceFlags = 0x3200;
Camera_UpdateInterface(sCameraInterfaceFlags);
} else {
@@ -7455,7 +7445,7 @@ Vec3s Camera_Update(Camera* camera) {
gDbgCamEnabled ^= 1;
if (gDbgCamEnabled) {
DbgCamera_Enable(&D_8015BD80, camera);
- } else if (camera->globalCtx->csCtx.state != 0) {
+ } else if (camera->globalCtx->csCtx.state != CS_STATE_IDLE) {
func_80064534(camera->globalCtx, &camera->globalCtx->csCtx);
}
}
@@ -7554,13 +7544,13 @@ Vec3s Camera_Update(Camera* camera) {
* When the camera's timer is 0, change the camera to it's parent
*/
void Camera_Finish(Camera* camera) {
- Camera* defaultCam = camera->globalCtx->cameraPtrs[0];
+ Camera* mainCam = camera->globalCtx->cameraPtrs[MAIN_CAM];
Player* player = (Player*)camera->globalCtx->actorCtx.actorLists[ACTORCAT_PLAYER].head;
if (camera->timer == 0) {
- Gameplay_ChangeCameraStatus(camera->globalCtx, camera->parentCamIdx, 7);
+ Gameplay_ChangeCameraStatus(camera->globalCtx, camera->parentCamIdx, CAM_STAT_ACTIVE);
- if ((camera->parentCamIdx == 0) && (camera->unk_168 != 0)) {
+ if ((camera->parentCamIdx == MAIN_CAM) && (camera->csId != 0)) {
player->actor.freezeTimer = 0;
player->stateFlags1 &= ~0x20000000;
@@ -7569,23 +7559,22 @@ void Camera_Finish(Camera* camera) {
osSyncPrintf("camera: player demo end!!\n");
}
- defaultCam->unk_14C |= 8;
+ mainCam->unk_14C |= 8;
}
- if (camera->globalCtx->cameraPtrs[camera->childCamIdx]->parentCamIdx == camera->thisIdx) {
- camera->globalCtx->cameraPtrs[camera->childCamIdx]->parentCamIdx = camera->parentCamIdx;
+ if (CHILD_CAM(camera)->parentCamIdx == camera->thisIdx) {
+ CHILD_CAM(camera)->parentCamIdx = camera->parentCamIdx;
}
- if (camera->globalCtx->cameraPtrs[camera->parentCamIdx]->childCamIdx == camera->thisIdx) {
- camera->globalCtx->cameraPtrs[camera->parentCamIdx]->childCamIdx = camera->childCamIdx;
+ if (PARENT_CAM(camera)->childCamIdx == camera->thisIdx) {
+ PARENT_CAM(camera)->childCamIdx = camera->childCamIdx;
}
- if (camera->globalCtx->cameraPtrs[camera->parentCamIdx]->thisIdx == 0) {
- camera->globalCtx->cameraPtrs[camera->parentCamIdx]->animState = 0;
+ if (PARENT_CAM(camera)->thisIdx == MAIN_CAM) {
+ PARENT_CAM(camera)->animState = 0;
}
- camera->parentCamIdx = 0;
- camera->childCamIdx = camera->parentCamIdx;
+ camera->childCamIdx = camera->parentCamIdx = SUBCAM_FREE;
camera->timer = -1;
camera->globalCtx->envCtx.unk_E1 = 0;
@@ -7744,7 +7733,7 @@ s32 Camera_CheckValidMode(Camera* camera, s16 mode) {
}
s16 Camera_ChangeSettingFlags(Camera* camera, s16 setting, s16 flags) {
- if ((camera->unk_14A & 1) != 0) {
+ if (camera->unk_14A & 1) {
if ((u32)((u32)(sCameraSettings[camera->setting].unk_00 & 0xF000000) >> 0x18) >=
(u32)((u32)(sCameraSettings[setting].unk_00 & 0xF000000) >> 0x18)) {
camera->unk_14A |= 0x10;
@@ -7759,7 +7748,7 @@ s16 Camera_ChangeSettingFlags(Camera* camera, s16 setting, s16 flags) {
if (setting == CAM_SET_NONE || setting >= CAM_SET_MAX) {
osSyncPrintf(VT_COL(RED, WHITE) "camera: error: illegal camera set (%d) !!!!\n" VT_RST, setting);
- return -0x63;
+ return -99;
}
if ((setting == camera->setting) && (!(flags & 1))) {
@@ -7771,7 +7760,7 @@ s16 Camera_ChangeSettingFlags(Camera* camera, s16 setting, s16 flags) {
}
camera->unk_14A |= 0x10;
- if ((flags & 2) == 0) {
+ if (!(flags & 2)) {
camera->unk_14A |= 1;
}
@@ -7827,7 +7816,8 @@ s32 Camera_ChangeDataIdx(Camera* camera, s32 camDataIdx) {
camera->unk_14A |= 4;
Camera_CopyModeValuesToPREG(camera, camera->mode);
} else if (settingChangeSuccessful < -1) {
- // @bug: This condition can never happen since settingChangeSuccesful is only ever 0 or 1.
+ // @bug: This is likely checking the wrong value. The actual return of Camera_ChangeSettingFlags or
+ // camDataIdx would make more sense.
osSyncPrintf(VT_COL(RED, WHITE) "camera: error: illegal camera ID (%d) !! (%d|%d|%d)\n" VT_RST, camDataIdx,
camera->thisIdx, 0x32, newCameraSetting);
}
@@ -7836,7 +7826,7 @@ s32 Camera_ChangeDataIdx(Camera* camera, s32 camDataIdx) {
}
Vec3s* Camera_GetInputDir(Vec3s* dst, Camera* camera) {
- if (gDbgCamEnabled != 0) {
+ if (gDbgCamEnabled) {
*dst = D_8015BD80.unk_10C6;
return dst;
} else {
@@ -7860,7 +7850,7 @@ s16 Camera_GetInputDirYaw(Camera* camera) {
}
Vec3s* Camera_GetCamDir(Vec3s* dst, Camera* camera) {
- if (gDbgCamEnabled != 0) {
+ if (gDbgCamEnabled) {
*dst = D_8015BD80.unk_10C6;
return dst;
} else {
@@ -8124,7 +8114,7 @@ s32 func_8005B198() {
s16 func_8005B1A4(Camera* camera) {
camera->unk_14C |= 0x8;
- if ((camera->thisIdx == 0) && (camera->globalCtx->activeCamera != 0)) {
+ if ((camera->thisIdx == MAIN_CAM) && (camera->globalCtx->activeCamera != MAIN_CAM)) {
camera->globalCtx->cameraPtrs[camera->globalCtx->activeCamera]->unk_14C |= 0x8;
return camera->globalCtx->activeCamera;
}
diff --git a/src/code/z_camera_data.c b/src/code/z_camera_data.c
index 4ec44ff3d..a88d5e9a1 100644
--- a/src/code/z_camera_data.c
+++ b/src/code/z_camera_data.c
@@ -3445,7 +3445,7 @@ Vec3f D_8011D678[] = {
s32 sDemo5PrevSfxFrame = -200;
// target is player, far from eye
-OnePointDemoFull D_8011D6AC[] = {
+OnePointCsFull D_8011D6AC[] = {
{ // initflags & 0x00FF (at): 2, atTarget is view lookAt + atInit
// initFlags & 0xFF00 (eye): none
// action: 15, copy at, eye, roll, fov to camera
@@ -3487,14 +3487,14 @@ OnePointDemoFull D_8011D6AC[] = {
};
// target is player close to current eye
-OnePointDemoFull D_8011D724[] = {
+OnePointCsFull D_8011D724[] = {
{ 0x8F, 0xFF, 0x2424, 0x0001, 0x0000, 60.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 10.0f, -20.0f } },
{ 0x81, 0xFF, 0x2121, 0x0013, 0x0000, 50.0f, 1.0f, { 0.0f, -10.0f, 0.0f }, { 0.0f, 0.0f, 60.0f } },
{ 0x12, 0xFF, 0x0000, 0x0001, 0x0000, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
};
// target is close to player
-OnePointDemoFull D_8011D79C[] = {
+OnePointCsFull D_8011D79C[] = {
{ 0xCF, 0xFF, 0x0002, 0x0001, 0x0000, 60.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } },
{ 0xC1, 0xFF, 0x0303, 0x0013, 0x0000, 45.0f, 1.0f, { 0.0f, -20.0f, 0.0f }, { 0.0f, -10.0f, 5.0f } },
{
@@ -3512,7 +3512,7 @@ OnePointDemoFull D_8011D79C[] = {
};
// target is within 300 units of eye, and player is within 30 units of eye
-OnePointDemoFull D_8011D83C[] = {
+OnePointCsFull D_8011D83C[] = {
{ 0x83, 0xFF, 0x2141, 0x0014, 0x0000, 45.0f, 0.2f, { 0.0f, 0.0f, 10.0f }, { 0.0f, 0.0f, 10.0f } },
{ 0x12, 0xFF, 0x0000, 0x0001, 0x0000, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
};
@@ -3520,20 +3520,20 @@ OnePointDemoFull D_8011D83C[] = {
// target is within 700 units of eye, angle between player/eye and target/eye is less than
// 76.9 degrees. The x/y coordinates of the target on screen is between (21, 41) and (300, 200),
// and the player is farther than 30 units of the eye
-OnePointDemoFull D_8011D88C[] = {
+OnePointCsFull D_8011D88C[] = {
{ 0x81, 0xFF, 0x0303, 0x0014, 0x0000, 45.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } },
{ 0x12, 0xFF, 0x0000, 0x0001, 0x0000, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
};
// same as above, but the target is NOT within the screen area.
-OnePointDemoFull D_8011D8DC[] = {
+OnePointCsFull D_8011D8DC[] = {
{ 0x8F, 0xFF, 0x0404, 0x0014, 0x0001, 50.0f, 1.0f, { 0.0f, 5.0f, 10.0f }, { 0.0f, 10.0f, -80.0f } },
{ 0x82, 0xFF, 0x2121, 0x0005, 0x0000, 60.0f, 1.0f, { 0.0f, 5.0f, 0.0f }, { 5.0f, 5.0f, -200.0f } },
{ 0x12, 0xFF, 0x0000, 0x0001, 0x0000, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
};
// target is a door.
-OnePointDemoFull D_8011D954[] = {
+OnePointCsFull D_8011D954[] = {
{ 0x0F, 0xFF, 0xC1C1, 0x0014, 0x0000, 60.0f, 1.0f, { 0.0f, 0.0f, 50.0f }, { 0.0f, 0.0f, 250.0f } },
{ 0x83, 0xFF, 0x05B1, 0x0005, 0x0000, 60.0f, 0.1f, { 0.0f, 10.0f, 50.0f }, { 0.0f, 10.0f, 100.0f } },
{ 0x82, 0xFF, 0x2121, 0x0005, 0x0002, 60.0f, 1.0f, { 0.0f, 10.0f, 0.0f }, { 0.0f, 20.0f, -150.0f } },
@@ -3541,7 +3541,7 @@ OnePointDemoFull D_8011D954[] = {
};
// otherwise
-OnePointDemoFull D_8011D9F4[] = {
+OnePointCsFull D_8011D9F4[] = {
{ 0x8F, 0xFF, 0x0504, 0x0014, 0x0002, 60.0f, 1.0f, { 0.0f, 5.0f, 50.0f }, { 0.0f, 20.0f, 300.0f } },
{ 0x82, 0xFF, 0x2121, 0x0005, 0x0002, 60.0f, 1.0f, { 0.0f, 10.0f, 0.0f }, { 0.0f, 20.0f, -150.0f } },
{ 0x12, 0xFF, 0x0000, 0x0001, 0x0000, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
diff --git a/src/code/z_demo.c b/src/code/z_demo.c
index 7a3d4d967..dbde06067 100644
--- a/src/code/z_demo.c
+++ b/src/code/z_demo.c
@@ -106,7 +106,7 @@ void func_800645A0(GlobalContext* globalCtx, CutsceneContext* csCtx) {
}
if (CHECK_BTN_ALL(pad1->press.button, BTN_DUP) && (csCtx->state == CS_STATE_IDLE) &&
- (gSaveContext.sceneSetupIndex >= 4) && (gDbgCamEnabled == 0)) {
+ (gSaveContext.sceneSetupIndex >= 4) && !gDbgCamEnabled) {
D_8015FCC8 = 1;
gSaveContext.cutsceneIndex = 0xFFFD;
gSaveContext.cutsceneTrigger = 1;
@@ -428,8 +428,8 @@ void func_80065134(GlobalContext* globalCtx, CutsceneContext* csCtx, CsCmdDayTim
s16 temp2;
if (csCtx->frames == cmd->startFrame) {
- temp1 = (cmd->hour * 60.0f) / 0.021972656f;
- temp2 = (cmd->minute + 1) / 0.021972656f;
+ temp1 = (cmd->hour * 60.0f) / (360.0f / 0x4000);
+ temp2 = (cmd->minute + 1) / (360.0f / 0x4000);
gSaveContext.dayTime = temp1 + temp2;
gSaveContext.environmentTime = temp1 + temp2;
@@ -1301,7 +1301,7 @@ s32 Cutscene_Command_CameraPositions(GlobalContext* globalCtx, CutsceneContext*
}
while (shouldContinue) {
- if (((CutsceneCameraPoint*)cmd)->continueFlag == -1) {
+ if (((CutsceneCameraPoint*)cmd)->continueFlag == CS_CMD_STOP) {
shouldContinue = 0;
}
cmd += 0x10;
@@ -1338,7 +1338,7 @@ s32 Cutscene_Command_CameraFocus(GlobalContext* globalCtx, CutsceneContext* csCt
}
while (shouldContinue) {
- if (((CutsceneCameraPoint*)cmd)->continueFlag == -1) {
+ if (((CutsceneCameraPoint*)cmd)->continueFlag == CS_CMD_STOP) {
shouldContinue = 0;
}
cmd += 0x10;
@@ -1369,7 +1369,7 @@ s32 Cutscene_Command_07(GlobalContext* globalCtx, CutsceneContext* csCtx, u8* cm
if (D_8015FCC8 != 0) {
sp2C = Gameplay_GetCamera(globalCtx, csCtx->unk_14);
sp2C->player = NULL;
- Gameplay_ChangeCameraStatus(globalCtx, 0, CAM_STAT_WAIT);
+ Gameplay_ChangeCameraStatus(globalCtx, MAIN_CAM, CAM_STAT_WAIT);
Gameplay_ChangeCameraStatus(globalCtx, csCtx->unk_14, CAM_STAT_ACTIVE);
Gameplay_CameraChangeSetting(globalCtx, csCtx->unk_14, CAM_SET_FREE0);
sp28 = csCtx->cameraFocus->cameraRoll * 1.40625f;
@@ -1412,7 +1412,7 @@ s32 Cutscene_Command_08(GlobalContext* globalCtx, CutsceneContext* csCtx, u8* cm
if (D_8015FCC8 != 0) {
sp2C = Gameplay_GetCamera(globalCtx, csCtx->unk_14);
sp2C->player = NULL;
- Gameplay_ChangeCameraStatus(globalCtx, 0, CAM_STAT_WAIT);
+ Gameplay_ChangeCameraStatus(globalCtx, MAIN_CAM, CAM_STAT_WAIT);
Gameplay_ChangeCameraStatus(globalCtx, csCtx->unk_14, CAM_STAT_ACTIVE);
Gameplay_CameraChangeSetting(globalCtx, csCtx->unk_14, CAM_SET_FREE0);
sp3C.x = csCtx->cameraFocus->pos.x;
@@ -1914,7 +1914,7 @@ void func_80068DC0(GlobalContext* globalCtx, CutsceneContext* csCtx) {
Gameplay_CopyCamera(globalCtx, D_8015FCC6, csCtx->unk_14);
}
- Gameplay_ChangeCameraStatus(globalCtx, D_8015FCC6, 7);
+ Gameplay_ChangeCameraStatus(globalCtx, D_8015FCC6, CAM_STAT_ACTIVE);
Gameplay_ClearCamera(globalCtx, csCtx->unk_14);
func_8005B1A4(globalCtx->cameraPtrs[D_8015FCC6]);
}
diff --git a/src/code/z_eff_spark.c b/src/code/z_eff_spark.c
index 480645ea3..dae4d580f 100644
--- a/src/code/z_eff_spark.c
+++ b/src/code/z_eff_spark.c
@@ -211,7 +211,7 @@ void EffectSpark_Draw(void* thisx, GraphicsContext* gfxCtx) {
f32 temp;
SkinMatrix_SetTranslate(&spEC, elem->position.x, elem->position.y, elem->position.z);
- temp = ((Rand_ZeroOne() * 2.5f) + 1.5f) * 0.015625f;
+ temp = ((Rand_ZeroOne() * 2.5f) + 1.5f) / 64.0f;
SkinMatrix_SetScale(&spAC, temp, temp, 1.0f);
SkinMatrix_MtxFMtxFMult(&spEC, &globalCtx->mf_11DA0, &sp6C);
SkinMatrix_MtxFMtxFMult(&sp6C, &spAC, &sp12C);
diff --git a/src/code/z_effect_soft_sprite_old_init.c b/src/code/z_effect_soft_sprite_old_init.c
index 4f66f25df..30390e827 100644
--- a/src/code/z_effect_soft_sprite_old_init.c
+++ b/src/code/z_effect_soft_sprite_old_init.c
@@ -849,7 +849,7 @@ void EffectSsIcePiece_SpawnBurst(GlobalContext* globalCtx, Vec3f* refPos, f32 sc
{ 0.0f, 20.0f, 20.0f },
{ 17.320474f, 20.0f, -9.999695f },
{ -17.320474f, 20.0f, -9.999695f },
- };
+ }; // 17.320474 is approximately 10 * sqrt(3)
s32 i;
Vec3f velocity;
Vec3f pos;
diff --git a/src/code/z_onepointdemo.c b/src/code/z_onepointdemo.c
index 15654cc0d..acdcae4c6 100644
--- a/src/code/z_onepointdemo.c
+++ b/src/code/z_onepointdemo.c
@@ -1,55 +1,1377 @@
#include "global.h"
+#include "vt.h"
+#include "overlays/actors/ovl_En_Sw/z_en_sw.h"
-#pragma GLOBAL_ASM("asm/non_matchings/code/z_onepointdemo/func_8007C680.s")
+static s16 sDisableAttention = false;
+static s16 sUnused = -1;
+static s32 sPrevFrameCs1100 = -4096;
-#pragma GLOBAL_ASM("asm/non_matchings/code/z_onepointdemo/func_8007C704.s")
+#include "z_onepointdemo_data.c"
-void func_8007C76C(Vec3f* src, Vec3s* dst) {
+void OnePointCutscene_AddVecSphToVec3f(Vec3f* dst, Vec3f* src, VecSph* vecSph) {
+ Vec3f out;
+ Vec3f vec;
+
+ OLib_VecSphGeoToVec3f(&vec, vecSph);
+
+ out.x = src->x + vec.x;
+ out.y = src->y + vec.y;
+ out.z = src->z + vec.z;
+ if (dst) {}
+ *dst = out;
+}
+
+s16 OnePointCutscene_Vec3fYaw(Vec3f* vec1, Vec3f* vec2) {
+ return DEGF_TO_BINANG(RADF_TO_DEGF(Math_FAtan2F(vec2->x - vec1->x, vec2->z - vec1->z)));
+}
+
+void OnePointCutscene_Vec3sToVec3f(Vec3f* src, Vec3s* dst) {
dst->x = src->x;
dst->y = src->y;
dst->z = src->z;
}
-#pragma GLOBAL_ASM("asm/non_matchings/code/z_onepointdemo/func_8007C7A8.s")
+s32 OnePointCutscene_BgCheckLineTest(CollisionContext* colCtx, Vec3f* vec1, Vec3f* vec2) {
+ Vec3f posResult;
+ s32 bgId;
+ CollisionPoly* outPoly = NULL;
+
+ return BgCheck_CameraLineTest1(colCtx, vec1, vec2, &posResult, &outPoly, true, true, true, false, &bgId);
+}
-void func_8007C7F8(CollisionContext* colCtx, Vec3f* pos) {
- CollisionPoly* poly;
+f32 OnePointCutscene_RaycastFloor(CollisionContext* colCtx, Vec3f* pos) {
+ CollisionPoly* outPoly;
s32 bgId;
- BgCheck_EntityRaycastFloor3(colCtx, &poly, &bgId, pos);
+ return BgCheck_EntityRaycastFloor3(colCtx, &outPoly, &bgId, pos);
}
-void func_8007C820(OnePointDemoCamera* onePointCamera, s16 actionParameters, s16 initTimer,
- CutsceneCameraPoint* atPoints, CutsceneCameraPoint* eyePoints) {
- onePointCamera->atPoints = atPoints;
- onePointCamera->eyePoints = eyePoints;
- onePointCamera->actionParameters = actionParameters;
- onePointCamera->initTimer = initTimer;
+void OnePointCutscene_SetCsCamPoints(Camera* camera, s16 actionParameters, s16 initTimer, CutsceneCameraPoint* atPoints,
+ CutsceneCameraPoint* eyePoints) {
+ OnePointCsCamera* onePointCamData = (OnePointCsCamera*)&camera->paramData;
+
+ onePointCamData->atPoints = atPoints;
+ onePointCamData->eyePoints = eyePoints;
+ onePointCamData->actionParameters = actionParameters;
+ onePointCamData->initTimer = initTimer;
}
-#pragma GLOBAL_ASM("asm/non_matchings/code/z_onepointdemo/func_8007C850.s")
+s32 OnePointCutscene_SetInfo(GlobalContext* globalCtx, s16 camIdx, s16 csId, Actor* actor, s16 timer) {
+ Camera* csCam = globalCtx->cameraPtrs[camIdx];
+ Camera* childCam = globalCtx->cameraPtrs[csCam->childCamIdx];
+ Camera* mainCam = globalCtx->cameraPtrs[MAIN_CAM];
+ Player* player = mainCam->player;
+ VecSph spD0;
+ s32 i;
+ Vec3f spC0;
+ Vec3f spB4;
+ PosRot spA0;
+ PosRot sp8C;
+ f32 tempRand;
+ Unique9OnePointCs* csInfo = ONEPOINT_CS_INFO(csCam);
+
+ switch (csId) {
+ case 1020:
+ if (timer < 20) {
+ timer = 20;
+ }
+ D_801208EC[0].atTargetInit = globalCtx->view.lookAt;
+ D_801208EC[0].eyeTargetInit = globalCtx->view.eye;
+ D_801208EC[0].fovTargetInit = globalCtx->view.fovy;
+ D_801208EC[1].atTargetInit = mainCam->at;
+ D_801208EC[1].eyeTargetInit = mainCam->eye;
+ D_801208EC[1].fovTargetInit = mainCam->fov;
+ D_801208EC[1].timerInit = timer - 1;
+ csCam->timer = timer + 1;
+ D_801208EC[1].lerpStepScale = 1.0f / (0.5f * timer);
+
+ csInfo->keyFrames = D_801208EC;
+ csInfo->keyFrameCnt = 3;
+
+ func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC);
+ break;
+ case 1030:
+ D_80120964[0].atTargetInit = globalCtx->view.lookAt;
+ D_80120964[0].eyeTargetInit = globalCtx->view.eye;
+ D_80120964[0].fovTargetInit = globalCtx->view.fovy;
+ OLib_Vec3fDiffToVecSphGeo(&spD0, &mainCam->at, &mainCam->eye);
+ D_80120964[1].eyeTargetInit.y = BINANG_TO_DEGF(spD0.yaw);
+ D_80120964[1].timerInit = timer - 1;
+
+ csInfo->keyFrames = D_80120964;
+ csInfo->keyFrameCnt = 2;
+
+ func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC);
+ break;
+ case 5000:
+ D_801209B4[0].atTargetInit = D_801209B4[1].atTargetInit = globalCtx->view.lookAt;
+ D_801209B4[0].eyeTargetInit = globalCtx->view.eye;
+ D_801209B4[0].fovTargetInit = D_801209B4[2].fovTargetInit = globalCtx->view.fovy;
+ OLib_Vec3fDiffToVecSphGeo(&spD0, &actor->focus.pos, &mainCam->at);
+ spD0.r = mainCam->dist;
+ OnePointCutscene_AddVecSphToVec3f(&D_801209B4[1].eyeTargetInit, &D_801209B4[1].atTargetInit, &spD0);
+ D_801209B4[1].atTargetInit.y += 20.0f;
+
+ csInfo->keyFrames = D_801209B4;
+ csInfo->keyFrameCnt = 4;
+
+ func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC);
+ break;
+ case 5010:
+ func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMO4);
+ Gameplay_CameraSetAtEye(globalCtx, camIdx, &mainCam->at, &mainCam->eye);
+ csCam->roll = 0;
+ break;
+ case 9500:
+ csInfo->keyFrames = D_80120A54;
+ csInfo->keyFrameCnt = 3;
+ func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC);
+ break;
+ case 2260:
+ D_80120ACC[0].atTargetInit.x = D_80120ACC[2].atTargetInit.x =
+ ((mainCam->globalCtx->state.frames & 1) ? -10.0f : 10.0f) + (Rand_ZeroOne() * 8.0f);
+
+ D_80120ACC[0].eyeTargetInit.x = D_80120ACC[2].eyeTargetInit.x =
+ ((mainCam->globalCtx->state.frames & 1) ? 20.0f : -20.0f) + (Rand_ZeroOne() * 5.0f);
+
+ csInfo->keyFrames = D_80120ACC;
+ csInfo->keyFrameCnt = 5;
+
+ func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC);
+ break;
+ case 2270:
+ csInfo->keyFrames = D_80120B94;
+ csInfo->keyFrameCnt = 11;
+
+ for (i = 0; i < csInfo->keyFrameCnt - 3; i++) {
+ if (D_80120B94[i].actionFlags != 0x8F) {
+ D_80120B94[i].atTargetInit.x = Rand_ZeroOne() * 5.0f;
+ D_80120B94[i].atTargetInit.z = (Rand_ZeroOne() * 30.0f) + 10.0f;
+ D_80120B94[i].eyeTargetInit.x = (Rand_ZeroOne() * 100.0f) + 20.0f;
+ D_80120B94[i].eyeTargetInit.z = (Rand_ZeroOne() * 80.0f) + 50.0f;
+ }
+ }
+
+ D_80120B94[camIdx - 1].eyeTargetInit.y =
+ ((mainCam->globalCtx->state.frames & 1) ? 3.0f : -3.0f) + Rand_ZeroOne();
+ func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC);
+
+ i = Quake_Add(csCam, 5);
+ Quake_SetSpeed(i, 400);
+ Quake_SetQuakeValues(i, 4, 5, 40, 0x3C);
+ Quake_SetCountdown(i, 1600);
+ break;
+ case 2280:
+ csInfo->keyFrames = D_80120D4C;
+ csInfo->keyFrameCnt = 7;
+
+ for (i = 0; i < csInfo->keyFrameCnt - 3; i++) {
+ if (D_80120D4C[i].actionFlags != 0x8F) {
+ D_80120D4C[i].atTargetInit.x = Rand_ZeroOne() * 20.0f;
+ D_80120D4C[i].atTargetInit.z = (Rand_ZeroOne() * 40.0f) + 10.0f;
+ D_80120D4C[i].eyeTargetInit.x = (Rand_ZeroOne() * 40.0f) + 60.0f;
+ D_80120D4C[i].eyeTargetInit.z = (Rand_ZeroOne() * 40.0f) + 80.0f;
+ }
+ }
+ D_80120D4C[camIdx - 1].eyeTargetInit.y =
+ ((mainCam->globalCtx->state.frames & 1) ? 3.0f : -3.0f) + Rand_ZeroOne();
+ func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC);
+
+ i = Quake_Add(csCam, 5);
+ Quake_SetSpeed(i, 400);
+ Quake_SetQuakeValues(i, 2, 3, 200, 0x32);
+ Quake_SetCountdown(i, 9999);
+ break;
+ case 2220:
+ csInfo->keyFrames = D_80120E64;
+ csInfo->keyFrameCnt = 8;
+
+ func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC);
+
+ i = Quake_Add(csCam, 5);
+ Quake_SetSpeed(i, 400);
+ Quake_SetQuakeValues(i, 2, 2, 50, 0);
+ Quake_SetCountdown(i, 280);
+ break;
+ case 2230:
+ if (player->actor.world.pos.z < 1000.0f) {
+ D_80120FA4[0].eyeTargetInit.x = -D_80120FA4[0].eyeTargetInit.x;
+ D_80120FA4[2].eyeTargetInit.x = -D_80120FA4[2].eyeTargetInit.x;
+ }
+
+ csInfo->keyFrames = D_80120FA4;
+ csInfo->keyFrameCnt = 6;
+
+ func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC);
+ break;
+ case 2340:
+ csInfo->keyFrames = D_80121094;
+ csInfo->keyFrameCnt = 3;
+
+ func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC);
+
+ i = Quake_Add(csCam, 5);
+ Quake_SetSpeed(i, 400);
+ Quake_SetQuakeValues(i, 2, 2, 50, 0);
+ Quake_SetCountdown(i, 60);
+ break;
+ case 2350:
+ csInfo->keyFrames = D_8012110C;
+ csInfo->keyFrameCnt = 3;
+
+ func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC);
+ break;
+ case 2200: {
+ s16 sp82;
+ s16 sp80;
+ s16 sp7E;
+ s16 sp7C;
+
+ func_8002F374(globalCtx, &player->actor, &sp82, &sp7E);
+ func_8002F374(globalCtx, actor, &sp80, &sp7C);
+ if ((sp82 > 0) && (sp82 < 320) && (sp7E > 0) && (sp7E < 240) && (sp80 > 0) && (sp80 < 320) && (sp7C > 0) &&
+ (sp7C < 240) &&
+ !OnePointCutscene_BgCheckLineTest(&globalCtx->colCtx, &actor->focus.pos, &player->actor.focus.pos)) {
+ D_80121184[0].atTargetInit.x = (globalCtx->view.lookAt.x + actor->focus.pos.x) * 0.5f;
+ D_80121184[0].atTargetInit.y = (globalCtx->view.lookAt.y + actor->focus.pos.y) * 0.5f;
+ D_80121184[0].atTargetInit.z = (globalCtx->view.lookAt.z + actor->focus.pos.z) * 0.5f;
+ D_80121184[0].eyeTargetInit = globalCtx->view.eye;
+ D_80121184[0].eyeTargetInit.y = player->actor.focus.pos.y + 20.0f;
+ D_80121184[0].fovTargetInit = mainCam->fov * 0.75f;
+
+ csInfo->keyFrames = D_80121184;
+ csInfo->keyFrameCnt = 2;
+ } else {
+ D_801211D4[0].atTargetInit.x = actor->focus.pos.x;
+ D_801211D4[0].atTargetInit.y = actor->focus.pos.y - 5.0f;
+ D_801211D4[0].atTargetInit.z = actor->focus.pos.z;
+ spC0 = ((EnSw*)actor)->unk_364;
+ osSyncPrintf("%s(%d): xyz_t: %s (%f %f %f)\n", "../z_onepointdemo.c", 1671, "&cp", spC0.x, spC0.y,
+ spC0.z);
+ D_801211D4[0].eyeTargetInit.x = (actor->focus.pos.x + (120.0f * spC0.x)) - (Rand_ZeroOne() * 20.0f);
+ D_801211D4[0].eyeTargetInit.y = actor->focus.pos.y + (120.0f * spC0.y) + 20.0f;
+ D_801211D4[0].eyeTargetInit.z = (actor->focus.pos.z + (120.0f * spC0.z)) - (Rand_ZeroOne() * 20.0f);
+
+ csInfo->keyFrames = D_801211D4;
+ csInfo->keyFrameCnt = 2;
+ }
+ Gameplay_ChangeCameraStatus(globalCtx, MAIN_CAM, CAM_STAT_UNK3);
+ func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC);
+ } break;
+ case 2290: {
+ Actor* rideActor = player->rideActor;
+
+ func_8002DF54(globalCtx, NULL, 8);
+ if (rideActor != NULL) {
+ rideActor->freezeTimer = 180;
+ }
+
+ csInfo->keyFrames = D_80121224;
+ csInfo->keyFrameCnt = 6;
+
+ func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC);
+ } break;
+ case 5120:
+ func_8002DF54(globalCtx, NULL, 8);
+
+ csInfo->keyFrames = D_80121314;
+ csInfo->keyFrameCnt = 1;
+
+ func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC);
+ break;
+ case 4510:
+ D_8012133C[0].eyeTargetInit = actor->world.pos;
+ D_8012133C[0].eyeTargetInit.y = player->actor.world.pos.y + 40.0f;
+ func_8002DF54(globalCtx, NULL, 8);
+
+ csInfo->keyFrames = D_8012133C;
+ csInfo->keyFrameCnt = 3;
+
+ func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC);
+ break;
+ case 4500:
+ Actor_GetFocus(&spA0, actor);
+ spC0 = spA0.pos;
+ spC0.y = OnePointCutscene_RaycastFloor(&globalCtx->colCtx, &spC0) + 40.0f;
+ spD0.r = 150.0f;
+ spD0.yaw = spA0.rot.y;
+ spD0.pitch = 0x3E8;
+
+ OnePointCutscene_AddVecSphToVec3f(&spB4, &spC0, &spD0);
+ Gameplay_CameraChangeSetting(globalCtx, camIdx, CAM_SET_FREE2);
+ Gameplay_CameraSetAtEye(globalCtx, camIdx, &spC0, &spB4);
+ func_8002DF54(globalCtx, NULL, 8);
+ csCam->roll = 0;
+ csCam->fov = 50.0f;
+ if (csCam->childCamIdx != SUBCAM_FREE) {
+ OnePointCutscene_EndCutscene(globalCtx, csCam->childCamIdx);
+ }
+ break;
+ case 2210:
+ OLib_Vec3fDiffToVecSphGeo(&spD0, &player->actor.world.pos, &actor->world.pos);
+ D_801213B4[0].eyeTargetInit.y = D_801213B4[1].eyeTargetInit.y = D_801213B4[2].eyeTargetInit.y =
+ D_801213B4[2].atTargetInit.y = BINANG_TO_DEGF(spD0.yaw);
+ if (Rand_ZeroOne() < 0.0f) {
+ D_801213B4[3].eyeTargetInit.x = -D_801213B4[3].eyeTargetInit.x;
+ }
+ func_8002DF54(globalCtx, NULL, 8);
+
+ csInfo->keyFrames = D_801213B4;
+ csInfo->keyFrameCnt = 5;
+
+ func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC);
+ break;
+ case 1010:
+ Gameplay_CameraChangeSetting(globalCtx, camIdx, CAM_SET_FREE2);
+ Gameplay_CameraSetAtEye(globalCtx, camIdx, &childCam->at, &childCam->eye);
+ Gameplay_CameraSetFov(globalCtx, camIdx, childCam->fov);
+ Gameplay_SetCameraRoll(globalCtx, camIdx, childCam->roll);
+ break;
+ case 9601:
+ Gameplay_CameraChangeSetting(globalCtx, camIdx, CAM_SET_DEMO3);
+ Gameplay_CameraChangeSetting(globalCtx, MAIN_CAM, mainCam->prevSetting);
+ OnePointCutscene_SetCsCamPoints(csCam, D_80120430 | 0x1000, D_8012042C, D_80120308, D_80120398);
+ break;
+ case 9602:
+ Gameplay_CameraChangeSetting(globalCtx, camIdx, CAM_SET_DEMO3);
+ Gameplay_CameraChangeSetting(globalCtx, MAIN_CAM, mainCam->prevSetting);
+ OnePointCutscene_SetCsCamPoints(csCam, D_80120430 | 0x1000, D_8012042C, D_80120308, D_80120434);
+ break;
+ case 4175:
+ csInfo->keyFrames = D_8012147C;
+ csInfo->keyFrameCnt = 4;
+
+ func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC);
+ break;
+ case 4180:
+ spC0.x = -1881.0f;
+ spC0.y = 766.0f;
+ spC0.z = -330.0f;
+ spB4.x = -1979.0f;
+ spB4.y = 703.0f;
+ spB4.z = -269.0f;
+ Gameplay_CameraChangeSetting(globalCtx, camIdx, CAM_SET_FREE2);
+ Gameplay_CameraSetAtEye(globalCtx, camIdx, &spC0, &spB4);
+ csCam->roll = 6;
+ csCam->fov = 75.0f;
+ func_8002DF54(globalCtx, NULL, 8);
+ break;
+ case 3040:
+ func_8002DF54(globalCtx, NULL, 8);
+ D_8012151C[0].timerInit = timer - 1;
+
+ csInfo->keyFrames = D_8012151C;
+ csInfo->keyFrameCnt = 2;
+
+ func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC);
+ break;
+ case 3020:
+ D_8012156C[1].timerInit = timer - 1;
+ if (mainCam->globalCtx->state.frames & 1) {
+ D_8012156C[0].atTargetInit.x = -D_8012156C[0].atTargetInit.x;
+ D_8012156C[0].eyeTargetInit.x = -D_8012156C[0].eyeTargetInit.x;
+ D_8012156C[1].atTargetInit.x = -D_8012156C[1].atTargetInit.x;
+ D_8012156C[1].eyeTargetInit.x = -D_8012156C[1].eyeTargetInit.x;
+ }
+ tempRand = Rand_ZeroOne() * 15.0f;
+ D_8012156C[0].eyeTargetInit.x += tempRand;
+ D_8012156C[1].eyeTargetInit.x += tempRand;
+
+ csInfo->keyFrames = D_8012156C;
+ csInfo->keyFrameCnt = 2;
+
+ func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC);
+ func_8002DF54(globalCtx, NULL, 8);
+ break;
+ case 3010:
+ D_801215BC[0].timerInit = timer;
+
+ csInfo->keyFrames = D_801215BC;
+ csInfo->keyFrameCnt = 1;
+
+ func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC);
+ break;
+ case 3070:
+ csInfo->keyFrames = D_801215E4;
+ csInfo->keyFrameCnt = 10;
+
+ func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC);
+
+ i = Quake_Add(csCam, 3);
+ Quake_SetSpeed(i, 22000);
+ Quake_SetQuakeValues(i, 2, 0, 200, 0);
+ Quake_SetCountdown(i, 10);
+ break;
+ case 3080:
+ csInfo->keyFrames = D_80121774;
+ csInfo->keyFrameCnt = 4;
+
+ func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC);
+ break;
+ case 3090:
+ func_8002DF54(globalCtx, NULL, 8);
+
+ csInfo->keyFrames = D_80121814;
+ csInfo->keyFrameCnt = 4;
+
+ func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC);
+ break;
+ case 3100:
+ VEC_SET(spB4, 0.0f, -280.0f, -1400.0f);
+
+ Actor_GetFocus(&spA0, actor);
+ spC0 = spA0.pos;
+ func_800C0808(globalCtx, camIdx, player, CAM_SET_CIRCLE6);
+ Gameplay_CameraSetAtEye(globalCtx, camIdx, &spC0, &spB4);
+ csCam->roll = 0;
+ csCam->fov = 70.0f;
+ func_8002DF54(globalCtx, NULL, 8);
+ break;
+ case 3380:
+ case 3065:
+ csInfo->keyFrames = D_801218B4;
+ csInfo->keyFrameCnt = 2;
+
+ func_8002DF54(globalCtx, NULL, 8);
+ func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC);
+
+ i = Quake_Add(csCam, 1);
+ Quake_SetSpeed(i, 24000);
+ Quake_SetQuakeValues(i, 2, 0, 0, 0);
+ Quake_SetCountdown(i, 160);
+ break;
+ case 3060:
+ csInfo->keyFrames = D_80121904;
+ csInfo->keyFrameCnt = 2;
+
+ func_8002DF54(globalCtx, NULL, 8);
+ func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC);
+ break;
+ case 3050:
+ Gameplay_CameraChangeSetting(globalCtx, camIdx, CAM_SET_DEMO3);
+ func_8002DF54(globalCtx, &player->actor, 5);
+ OnePointCutscene_SetCsCamPoints(csCam, D_80120304 | 0x2000, D_80120300, D_8012013C, D_8012021C);
+ func_80078884(NA_SE_SY_CORRECT_CHIME);
+ OnePointCutscene_Vec3sToVec3f(&mainCam->at, &D_8012013C[D_801202FC - 2].pos);
+ OnePointCutscene_Vec3sToVec3f(&mainCam->eye, &D_8012021C[D_801202FC - 2].pos);
+ D_8012013C[D_801202FC - 3].pos.x +=
+ (D_8012013C[D_801202FC - 2].pos.x - D_8012013C[D_801202FC - 3].pos.x) / 2;
+ D_8012013C[D_801202FC - 3].pos.y +=
+ (D_8012013C[D_801202FC - 2].pos.y - D_8012013C[D_801202FC - 3].pos.y) / 2;
+ D_8012013C[D_801202FC - 3].pos.z +=
+ (D_8012013C[D_801202FC - 2].pos.z - D_8012013C[D_801202FC - 3].pos.z) / 2;
+ D_8012021C[D_801202FC - 3].pos.x +=
+ (D_8012021C[D_801202FC - 2].pos.x - D_8012021C[D_801202FC - 3].pos.x) / 2;
+ D_8012021C[D_801202FC - 3].pos.y +=
+ (D_8012021C[D_801202FC - 2].pos.y - D_8012021C[D_801202FC - 3].pos.y) / 2;
+ D_8012021C[D_801202FC - 3].pos.z +=
+ (D_8012021C[D_801202FC - 2].pos.z - D_8012021C[D_801202FC - 3].pos.z) / 2;
+
+ i = Quake_Add(mainCam, 3);
+ Quake_SetSpeed(i, 30000);
+ Quake_SetQuakeValues(i, 2, 1, 1, 0);
+ Quake_SetCountdown(i, 200);
+ break;
+ case 3120:
+ csInfo->keyFrames = D_80121954[-(timer + 101)];
+ csCam->timer = 100;
+ csCam->unk_14C |= 2;
+ csInfo->keyFrameCnt = 2;
+
+ func_8002DF54(globalCtx, NULL, 8);
+ func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC);
+ break;
+ case 3130:
+ csInfo->keyFrames = D_80121A44;
+ csInfo->keyFrameCnt = 12;
+
+ func_8002DF54(globalCtx, NULL, 8);
+ func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC);
+ csCam->unk_14C |= 2;
+ break;
+ case 3140:
+ D_80121C24[0].atTargetInit = globalCtx->view.lookAt;
+ D_80121C24[0].eyeTargetInit = globalCtx->view.eye;
+ D_80121C24[0].fovTargetInit = globalCtx->view.fovy;
+
+ csInfo->keyFrames = D_80121C24;
+ csInfo->keyFrameCnt = 7;
+
+ func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC);
+ break;
+ case 3150:
+ spC0.x = 1890.0f;
+ spC0.y = 886.0f;
+ spC0.z = -1432.0f;
+ spB4.x = 1729.0f;
+ spB4.y = 995.0f;
+ spB4.z = -1405.0f;
+ Gameplay_CameraChangeSetting(globalCtx, camIdx, CAM_SET_FREE2);
+ Gameplay_CameraSetAtEye(globalCtx, camIdx, &spC0, &spB4);
+ csCam->roll = 0x50;
+ csCam->fov = 55.0f;
+ func_8002DF38(globalCtx, &player->actor, 8);
+ break;
+ case 3170:
+ Actor_GetWorld(&spA0, actor);
+ spC0 = spA0.pos;
+ spD0.pitch = -0x5DC;
+ spC0.y += 50.0f;
+ spD0.r = 250.0f;
+ Actor_GetWorld(&spA0, &player->actor);
+ spD0.yaw = OnePointCutscene_Vec3fYaw(&spC0, &spA0.pos) - 0x7D0;
+ OnePointCutscene_AddVecSphToVec3f(&spB4, &spC0, &spD0);
+ Gameplay_CameraChangeSetting(globalCtx, camIdx, CAM_SET_FREE2);
+ Gameplay_CameraSetAtEye(globalCtx, camIdx, &spC0, &spB4);
+ Gameplay_CopyCamera(globalCtx, MAIN_CAM, camIdx);
+ csCam->roll = -1;
+ csCam->fov = 55.0f;
+ func_8002DF38(globalCtx, actor, 1);
+ break;
+ case 3160:
+ Actor_GetWorld(&spA0, actor);
+ spC0 = spA0.pos;
+ spD0.pitch = 0;
+ spD0.yaw = spA0.rot.y;
+ spD0.r = 150.0f;
+ OnePointCutscene_AddVecSphToVec3f(&spB4, &spC0, &spD0);
+ Gameplay_CameraChangeSetting(globalCtx, camIdx, CAM_SET_FREE2);
+ Gameplay_CameraSetAtEye(globalCtx, camIdx, &spC0, &spB4);
+ csCam->roll = 0;
+ csCam->fov = 55.0f;
+ func_8002DF38(globalCtx, &player->actor, 8);
+ break;
+ case 3180:
+ Actor_GetWorldPosShapeRot(&spA0, actor);
+ spC0 = spA0.pos;
+ spC0.y += 120.0f;
+ spD0.r = 300.0f;
+ spD0.yaw = spA0.rot.y;
+ spD0.pitch = -0xAF0;
+ OnePointCutscene_AddVecSphToVec3f(&spB4, &spC0, &spD0);
+ Gameplay_CameraChangeSetting(globalCtx, camIdx, CAM_SET_FREE2);
+ Gameplay_CameraSetAtEye(globalCtx, camIdx, &spC0, &spB4);
+ csCam->roll = 0;
+ csCam->fov = 60.0f;
+ func_8002DF38(globalCtx, actor, 1);
+ break;
+ case 3190:
+ Gameplay_CameraChangeSetting(globalCtx, camIdx, CAM_SET_MORI3);
+ Camera_ChangeMode(mainCam, CAM_MODE_NORMAL);
+ func_8002DF38(globalCtx, actor, 0xC);
+ break;
+ case 3230:
+ spC0.x = 120.0f;
+ spC0.y = 265.0f;
+ spC0.z = -1570.0f;
+ spB4.x = 80.0f;
+ spB4.y = 445.0f;
+ spB4.z = -1425.0f;
+ Gameplay_CameraChangeSetting(globalCtx, camIdx, CAM_SET_FREE2);
+ Gameplay_CameraSetAtEye(globalCtx, camIdx, &spC0, &spB4);
+ csCam->roll = 0x1E;
+ csCam->fov = 75.0f;
+ func_8002DF38(globalCtx, &player->actor, 8);
+ Actor_GetWorldPosShapeRot(&spA0, actor);
+ Actor_GetFocus(&sp8C, &player->actor);
+ spC0.x = sp8C.pos.x;
+ spC0.y = sp8C.pos.y + 70.0f;
+ spC0.z = sp8C.pos.z;
+ OLib_Vec3fDiffToVecSphGeo(&spD0, &spA0.pos, &sp8C.pos);
+ spD0.pitch = 0x5DC;
+ spD0.r = 120.0f;
+ OnePointCutscene_AddVecSphToVec3f(&spB4, &spC0, &spD0);
+ Gameplay_CameraSetAtEye(globalCtx, MAIN_CAM, &spC0, &spB4);
+
+ i = Quake_Add(csCam, 3);
+ Quake_SetSpeed(i, 22000);
+ Quake_SetQuakeValues(i, 1, 0, 0, 0);
+ Quake_SetCountdown(i, 90);
+ break;
+ case 6010:
+ Actor_GetWorld(&spA0, actor);
+ spC0 = spA0.pos;
+ spD0.pitch = 0;
+ spC0.y += 70.0f;
+ spD0.yaw = spA0.rot.y + 0x7FFF;
+ spD0.r = 300.0f;
+ OnePointCutscene_AddVecSphToVec3f(&spB4, &spC0, &spD0);
+ Gameplay_CameraChangeSetting(globalCtx, camIdx, CAM_SET_FREE2);
+ Gameplay_CameraSetAtEye(globalCtx, camIdx, &spC0, &spB4);
+ csCam->roll = 0;
+ csCam->fov = 45.0f;
+ func_8002DF38(globalCtx, &player->actor, 8);
+ break;
+ case 3220:
+ Actor_GetFocus(&spA0, actor);
+ spC0 = spA0.pos;
+ func_800C0808(globalCtx, camIdx, player, CAM_SET_CIRCLE6);
+ Actor_GetWorld(&spA0, &player->actor);
+ OLib_Vec3fDiffToVecSphGeo(&spD0, &spC0, &spA0.pos);
+ spD0.yaw += 0x3E8;
+ spD0.r = 400.0f;
+ OnePointCutscene_AddVecSphToVec3f(&spB4, &spC0, &spD0);
+ spB4.y = spA0.pos.y + 60.0f;
+ Gameplay_CameraSetAtEye(globalCtx, camIdx, &spC0, &spB4);
+ csCam->roll = 0;
+ csCam->fov = 75.0f;
+ player->actor.shape.rot.y = player->actor.world.rot.y = player->currentYaw = spD0.yaw + 0x7FFF;
+ func_8002DF54(globalCtx, NULL, 8);
+ break;
+ case 3240:
+ D_80121D3C[2].timerInit = timer - 5;
+
+ csInfo->keyFrames = D_80121D3C;
+ csInfo->keyFrameCnt = 3;
+
+ func_8002DF54(globalCtx, NULL, 8);
+ func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC);
+ break;
+ case 6001:
+ Gameplay_CameraChangeSetting(globalCtx, camIdx, CAM_SET_DEMO3);
+ func_8002DF54(globalCtx, NULL, 8);
+ Actor_GetWorld(&spA0, actor);
+ if (spA0.pos.z > -750.0f) {
+ OnePointCutscene_SetCsCamPoints(csCam, D_801208E8, D_801208E4, D_801206A0, D_80120820);
+ } else {
+ OnePointCutscene_SetCsCamPoints(csCam, D_801208E8, D_801208E4, D_801206A0, D_80120760);
+ }
+
+ i = Quake_Add(csCam, 1);
+ Quake_SetSpeed(i, 32000);
+ Quake_SetQuakeValues(i, 0, 0, 20, 0);
+ Quake_SetCountdown(i, D_801208E4 - 10);
+ break;
+ case 3400:
+ Gameplay_CameraChangeSetting(globalCtx, camIdx, CAM_SET_DEMO3);
+ func_8002DF38(globalCtx, &player->actor, 8);
+ OnePointCutscene_SetCsCamPoints(csCam, D_8012069C | 0x2000, D_80120698, D_801204D4, D_801205B4);
+ OnePointCutscene_Vec3sToVec3f(&mainCam->eye, &D_801205B4[D_80120694 - 2].pos);
+ OnePointCutscene_Vec3sToVec3f(&mainCam->at, &D_801204D4[D_80120694 - 2].pos);
+
+ i = Quake_Add(csCam, 1);
+ Quake_SetSpeed(i, 0x4E20);
+ Quake_SetQuakeValues(i, 1, 0, 50, 0);
+ Quake_SetCountdown(i, D_80120698 - 20);
+ break;
+ case 3390:
+ player->actor.shape.rot.y = player->actor.world.rot.y = player->currentYaw = -0x3FD9;
+
+ csInfo->keyFrames = D_80121DB4;
+ csInfo->keyFrameCnt = 9;
+
+ func_8002DF54(globalCtx, NULL, 8);
+ func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC);
+ break;
+ case 3310:
+ Gameplay_CameraChangeSetting(globalCtx, camIdx, CAM_SET_HIDAN2);
+ func_8002DF54(globalCtx, NULL, 8);
+ Gameplay_CopyCamera(globalCtx, camIdx, MAIN_CAM);
+
+ i = Quake_Add(csCam, 1);
+ Quake_SetSpeed(i, 32000);
+ Quake_SetQuakeValues(i, 2, 0, 0, 0);
+ Quake_SetCountdown(i, timer);
+ break;
+ case 3290:
+ D_80121F1C[0].atTargetInit = globalCtx->view.lookAt;
+ D_80121F1C[0].eyeTargetInit = globalCtx->view.eye;
+ D_80121F1C[0].fovTargetInit = globalCtx->view.fovy;
+ Actor_GetFocus(&spA0, actor);
+ player->actor.shape.rot.y = player->actor.world.rot.y = player->currentYaw = spA0.rot.y;
+
+ csInfo->keyFrames = D_80121F1C;
+ csInfo->keyFrameCnt = 4;
+
+ func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC);
+
+ i = Quake_Add(csCam, 3);
+ Quake_SetSpeed(i, 12000);
+ Quake_SetQuakeValues(i, 0, 0, 1000, 0);
+ Quake_SetCountdown(i, 5);
+ break;
+ case 3340:
+ D_80121FBC[0].atTargetInit = globalCtx->view.lookAt;
+ D_80121FBC[0].eyeTargetInit = globalCtx->view.eye;
+ D_80121FBC[0].fovTargetInit = globalCtx->view.fovy;
+
+ csInfo->keyFrames = D_80121FBC;
+ csInfo->keyFrameCnt = 4;
+
+ func_8002DF54(globalCtx, NULL, 8);
+ func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC);
+
+ i = Quake_Add(csCam, 3);
+ Quake_SetSpeed(i, 12000);
+ Quake_SetQuakeValues(i, 0, 0, 1000, 0);
+ Quake_SetCountdown(i, 5);
+ break;
+ case 3360:
+ csInfo->keyFrames = D_8012205C;
+ csInfo->keyFrameCnt = 3;
+
+ func_8002DF38(globalCtx, &player->actor, 8);
+ func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC);
+ break;
+ case 3350:
+ D_801220D4[0].atTargetInit = globalCtx->view.lookAt;
+ D_801220D4[0].eyeTargetInit = globalCtx->view.eye;
+ D_801220D4[0].fovTargetInit = globalCtx->view.fovy;
+ if (actor->world.pos.x > 0.0f) {
+ D_801220D4[1].rollTargetInit = -D_801220D4[1].rollTargetInit;
+ D_801220D4[2].rollTargetInit = -D_801220D4[2].rollTargetInit;
+ D_801220D4[1].atTargetInit.x = -D_801220D4[1].atTargetInit.x;
+ D_801220D4[1].atTargetInit.y = 50.0f;
+ D_801220D4[1].eyeTargetInit.y = 80.0f;
+ D_801220D4[1].eyeTargetInit.x = -D_801220D4[1].eyeTargetInit.x;
+ }
+ func_8002DF54(globalCtx, NULL, 8);
+
+ csInfo->keyFrames = D_801220D4;
+ csInfo->keyFrameCnt = 5;
+
+ func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC);
+ break;
+ case 3330:
+ csInfo->keyFrames = D_8012219C;
+ csInfo->keyFrameCnt = 7;
+
+ func_8002DF38(globalCtx, &player->actor, 8);
+ func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC);
+ break;
+ case 3410:
+ csInfo->keyFrames = D_801222B4;
+ csInfo->keyFrameCnt = 5;
+
+ func_8002DF54(globalCtx, NULL, 8);
+ func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC);
+
+ i = Quake_Add(csCam, 1);
+ Quake_SetSpeed(i, 32000);
+ Quake_SetQuakeValues(i, 4, 0, 0, 0);
+ Quake_SetCountdown(i, 20);
+ break;
+ case 3450:
+ csInfo->keyFrames = D_8012237C;
+ csInfo->keyFrameCnt = 2;
+
+ func_8002DF38(globalCtx, &player->actor, 8);
+ func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC);
+
+ i = Quake_Add(csCam, 1);
+ Quake_SetSpeed(i, 32000);
+ Quake_SetQuakeValues(i, 2, 0, 0, 0);
+ Quake_SetCountdown(i, 10);
+ break;
+ case 3440:
+ csInfo->keyFrames = D_801223CC;
+ csInfo->keyFrameCnt = 6;
-#pragma GLOBAL_ASM("asm/non_matchings/code/z_onepointdemo/func_8007FFE0.s")
+ func_8002DF54(globalCtx, NULL, 8);
+ func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC);
+ player->stateFlags1 |= 0x20000000;
+ player->actor.freezeTimer = 90;
-#pragma GLOBAL_ASM("asm/non_matchings/code/z_onepointdemo/func_80080024.s")
+ i = Quake_Add(csCam, 1);
+ Quake_SetSpeed(i, 32000);
+ Quake_SetQuakeValues(i, 2, 0, 0, 0);
+ Quake_SetCountdown(i, 10);
+ break;
+ case 3430:
+ csInfo->keyFrames = D_801224BC;
+ csInfo->keyFrameCnt = 7;
-#pragma GLOBAL_ASM("asm/non_matchings/code/z_onepointdemo/func_800800F8.s")
+ func_8002DF54(globalCtx, NULL, 8);
+ func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC);
-#pragma GLOBAL_ASM("asm/non_matchings/code/z_onepointdemo/func_800803F0.s")
+ i = Quake_Add(csCam, 1);
+ Quake_SetSpeed(i, 32000);
+ Quake_SetQuakeValues(i, 1, 0, 10, 0);
+ Quake_SetCountdown(i, 20);
+ break;
+ case 4100:
+ csInfo->keyFrames = D_801225D4;
+ csInfo->keyFrameCnt = 5;
-#pragma GLOBAL_ASM("asm/non_matchings/code/z_onepointdemo/func_80080480.s")
+ player->actor.shape.rot.y = player->actor.world.rot.y = player->currentYaw = 0x3FFC;
+ func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC);
+ func_8002DF54(globalCtx, NULL, 8);
+ break;
+ case 4110:
+ csInfo->keyFrames = D_8012269C;
+ csInfo->keyFrameCnt = 3;
-#pragma GLOBAL_ASM("asm/non_matchings/code/z_onepointdemo/func_800806BC.s")
+ func_8002DF38(globalCtx, &player->actor, 8);
+ func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC);
+ break;
+ case 4120:
+ func_8002DF54(globalCtx, NULL, 8);
+ D_80122714[1].timerInit = 80;
+ csInfo->keyFrames = D_80122714;
+ csInfo->keyFrameCnt = 4;
-void func_8008070C() {
- D_80120130 = 0;
+ func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC);
+ break;
+ case 4140:
+ csInfo->keyFrames = D_801227B4;
+ csInfo->keyFrameCnt = 6;
+
+ func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC);
+ Camera_ChangeMode(mainCam, CAM_MODE_NORMAL);
+ break;
+ case 4150:
+ csInfo->keyFrames = D_801228A4;
+ csInfo->keyFrameCnt = 5;
+
+ func_8002DF54(globalCtx, NULL, 8);
+ Camera_ChangeMode(mainCam, CAM_MODE_NORMAL);
+ func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC);
+ break;
+ case 4160:
+ csInfo->keyFrames = D_8012296C;
+ csInfo->keyFrameCnt = 4;
+
+ func_8002DF54(globalCtx, NULL, 8);
+ Camera_ChangeMode(mainCam, CAM_MODE_NORMAL);
+ func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC);
+ break;
+ case 4170:
+ csInfo->keyFrames = D_80122A0C;
+ csInfo->keyFrameCnt = 2;
+
+ func_8002DF54(globalCtx, NULL, 8);
+ Camera_ChangeMode(mainCam, CAM_MODE_NORMAL);
+ func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC);
+ break;
+ case 4190:
+ csInfo->keyFrames = D_80122A5C;
+ csInfo->keyFrameCnt = 8;
+
+ func_8002DF38(globalCtx, &player->actor, 8);
+ Camera_ChangeMode(mainCam, CAM_MODE_NORMAL);
+ func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC);
+ break;
+ case 4200:
+ csInfo->keyFrames = D_80122B9C;
+ csInfo->keyFrameCnt = 3;
+
+ func_8002DF38(globalCtx, &player->actor, 8);
+ Camera_ChangeMode(mainCam, CAM_MODE_NORMAL);
+ func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC);
+ break;
+ case 4210:
+ player->actor.freezeTimer = timer;
+
+ csInfo->keyFrames = D_80122C14;
+ csInfo->keyFrameCnt = 1;
+
+ func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC);
+
+ i = Quake_Add(csCam, 3);
+ Quake_SetSpeed(i, 12000);
+ Quake_SetQuakeValues(i, 0, 1, 100, 0);
+ Quake_SetCountdown(i, timer - 80);
+ break;
+ case 4220:
+ csInfo->keyFrames = (player->actor.world.pos.z < -15.0f) ? D_80122C3C : D_80122C64;
+ csInfo->keyFrameCnt = 1;
+
+ func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC);
+ func_8002DF38(globalCtx, &player->actor, 1);
+
+ i = Quake_Add(csCam, 3);
+ Quake_SetSpeed(i, 12000);
+ Quake_SetQuakeValues(i, 0, 1, 10, 0);
+ Quake_SetCountdown(i, timer - 10);
+ break;
+ case 4221:
+ csInfo->keyFrames = D_80122C8C;
+ csInfo->keyFrameCnt = 1;
+
+ func_8002DF54(globalCtx, NULL, 8);
+ func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC);
+ break;
+ case 3260:
+ func_8002DF54(globalCtx, NULL, 8);
+ D_80122CB4[1].timerInit = timer - 5;
+
+ csInfo->keyFrames = D_80122CB4;
+ csInfo->keyFrameCnt = 2;
+
+ func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC);
+ break;
+ case 3261:
+ func_8002DF54(globalCtx, NULL, 8);
+ D_80122D04[1].timerInit = timer - 10;
+
+ csInfo->keyFrames = D_80122D04;
+ csInfo->keyFrameCnt = 2;
+
+ func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC);
+ break;
+ case 8010:
+ csInfo->keyFrames = D_80122D54;
+ csInfo->keyFrameCnt = 3;
+
+ func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC);
+ break;
+ case 8002:
+ csInfo->keyFrames = D_80122DCC;
+ csInfo->keyFrameCnt = 3;
+
+ func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC);
+ break;
+ case 8700:
+ Actor_GetFocus(&spA0, actor);
+ Actor_GetFocus(&sp8C, &player->actor);
+ D_80122E44[timer & 1][0].atTargetInit.y = ((spA0.pos.y - sp8C.pos.y) / 10.0f) + 90.0f;
+ D_80122E44[timer & 1][5].atTargetInit = mainCam->at;
+
+ csInfo->keyFrames = D_80122E44[timer & 1];
+ csInfo->keyFrameCnt = 7;
+
+ func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC);
+ break;
+ case 1100: {
+ s32 tempDiff = globalCtx->state.frames - sPrevFrameCs1100;
+
+ if ((tempDiff > 3600) || (tempDiff < -3600)) {
+ csInfo->keyFrames = D_80123074;
+ csInfo->keyFrameCnt = 5;
+ } else {
+ if (globalCtx->state.frames & 1) {
+ D_8012313C[0].rollTargetInit = -D_8012313C[0].rollTargetInit;
+ D_8012313C[0].atTargetInit.y = -D_8012313C[0].atTargetInit.y;
+ D_8012313C[0].eyeTargetInit.y = -D_8012313C[0].eyeTargetInit.y;
+ D_8012313C[1].atTargetInit.y = -D_8012313C[1].atTargetInit.y;
+ }
+ csInfo->keyFrames = D_8012313C;
+ csInfo->keyFrameCnt = 3;
+ }
+ func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC);
+ sPrevFrameCs1100 = globalCtx->state.frames;
+
+ } break;
+ case 9806:
+ csCam->timer = -99;
+ if (func_800C0CB8(globalCtx)) {
+ func_800C0808(globalCtx, camIdx, player, CAM_SET_ITEM2);
+ csCam->data2 = 0xC;
+ } else {
+ Gameplay_CopyCamera(globalCtx, camIdx, MAIN_CAM);
+ Gameplay_CameraChangeSetting(globalCtx, camIdx, CAM_SET_FREE2);
+ }
+ break;
+ case 9908:
+ if (func_800C0CB8(globalCtx)) {
+ D_801231B4[0].eyeTargetInit.z = D_801231B4[1].eyeTargetInit.z = LINK_IS_CHILD ? 100.0f : 120.0f;
+
+ if (player->stateFlags1 & 0x08000000) {
+ D_801231B4[2].atTargetInit.z = 0.0f;
+ }
+ Actor_GetWorldPosShapeRot(&spA0, &player->actor);
+ OLib_Vec3fDiffToVecSphGeo(&spD0, &spA0.pos, &mainCam->at);
+ spD0.yaw -= spA0.rot.y;
+ OLib_VecSphGeoToVec3f(&D_801231B4[3].atTargetInit, &spD0);
+ OLib_Vec3fDiffToVecSphGeo(&spD0, &spA0.pos, &mainCam->eye);
+ spD0.yaw -= spA0.rot.y;
+ OLib_VecSphGeoToVec3f(&D_801231B4[3].eyeTargetInit, &spD0);
+ D_801231B4[3].fovTargetInit = mainCam->fov;
+ D_801231B4[3].timerInit = timer - 50;
+
+ csInfo->keyFrames = D_801231B4;
+ csInfo->keyFrameCnt = 4;
+
+ func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC);
+ } else {
+ D_80123254[1].timerInit = timer - 1;
+ D_80123254[0].fovTargetInit = mainCam->fov;
+ D_80123254[0].atTargetInit = D_80123254[1].atTargetInit = mainCam->at;
+ D_80123254[0].eyeTargetInit = D_80123254[1].eyeTargetInit = mainCam->eye;
+
+ csInfo->keyFrames = D_80123254;
+ csInfo->keyFrameCnt = 2;
+
+ func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC);
+ }
+ break;
+ case 1000:
+ D_801232A4[0].atTargetInit = globalCtx->view.lookAt;
+ D_801232A4[0].eyeTargetInit = globalCtx->view.eye;
+ D_801232A4[0].fovTargetInit = globalCtx->view.fovy;
+
+ csInfo->keyFrames = D_801232A4;
+ csInfo->keyFrameCnt = 1;
+
+ func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC);
+ break;
+ case 8603:
+ csInfo->keyFrames = D_801232CC;
+ csInfo->keyFrameCnt = 5;
+
+ func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC);
+ break;
+ case 8604:
+ csInfo->keyFrames = D_80123394;
+ csInfo->keyFrameCnt = 5;
+
+ func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC);
+ break;
+ case 4000:
+ csInfo->keyFrames = D_8012345C;
+ csInfo->keyFrameCnt = 4;
+
+ func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC);
+ break;
+ case 4010:
+ csInfo->keyFrames = D_801234FC;
+ csInfo->keyFrameCnt = 5;
+
+ func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC);
+ break;
+ case 4011:
+ csInfo->keyFrames = D_801235C4;
+ csInfo->keyFrameCnt = 5;
+
+ func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC);
+ break;
+ case 4020:
+ csInfo->keyFrames = D_8012368C;
+ csInfo->keyFrameCnt = 4;
+
+ func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC);
+ break;
+ case 4021:
+ csInfo->keyFrames = D_8012372C;
+ csInfo->keyFrameCnt = 4;
+
+ func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC);
+ break;
+ case 4022:
+ csCam->timer = D_801237CC[0].timerInit + D_801237CC[3].timerInit + D_801237CC[1].timerInit +
+ D_801237CC[2].timerInit + D_801237CC[4].timerInit;
+
+ csInfo->keyFrames = D_801237CC;
+ csInfo->keyFrameCnt = 5;
+
+ func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC);
+ break;
+ case 9703:
+ D_80123894[0].atTargetInit = globalCtx->view.lookAt;
+ D_80123894[0].eyeTargetInit = globalCtx->view.eye;
+ D_80123894[0].fovTargetInit = globalCtx->view.fovy;
+ if (LINK_IS_ADULT) {
+ D_80123894[1].atTargetInit.y = 60.0f;
+ D_80123894[1].eyeTargetInit.y = 52.0f;
+ }
+
+ csInfo->keyFrames = D_80123894;
+ csInfo->keyFrameCnt = 3;
+
+ func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC);
+ break;
+ case 9704:
+ D_8012390C[0].atTargetInit = globalCtx->view.lookAt;
+ D_8012390C[0].eyeTargetInit = globalCtx->view.eye;
+ D_8012390C[0].fovTargetInit = globalCtx->view.fovy;
+
+ csInfo->keyFrames = D_8012390C;
+ csInfo->keyFrameCnt = 2;
+
+ func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC);
+ break;
+ case 9705:
+ D_8012395C[0].atTargetInit = globalCtx->view.lookAt;
+ D_8012395C[0].eyeTargetInit = globalCtx->view.eye;
+ D_8012395C[0].fovTargetInit = globalCtx->view.fovy;
+
+ csInfo->keyFrames = D_8012395C;
+ csInfo->keyFrameCnt = 3;
+
+ func_800C0808(globalCtx, camIdx, player, CAM_SET_DEMOC);
+ break;
+ case 5110:
+ D_801239D4[1].timerInit = 10;
+
+ csInfo->keyFrames = D_801239D4;
+ csInfo->keyFrameCnt = 3;
+
+ func_800C0808(globalCtx, camIdx, (Player*)actor, CAM_SET_DEMOC);
+ break;
+ default:
+ osSyncPrintf(VT_COL(RED, WHITE) "onepointdemo camera: demo number not found !! (%d)\n" VT_RST, csId);
+ break;
+ }
+ return 0;
+}
+
+s16 OnePointCutscene_SetAsChild(GlobalContext* globalCtx, s16 newCamIdx, s16 parentCamIdx) {
+ s16 prevCamIdx = globalCtx->cameraPtrs[parentCamIdx]->childCamIdx;
+
+ globalCtx->cameraPtrs[newCamIdx]->parentCamIdx = parentCamIdx;
+ globalCtx->cameraPtrs[parentCamIdx]->childCamIdx = newCamIdx;
+
+ return prevCamIdx;
}
-void func_80080718() {
- D_80120130 = 1;
+/**
+ * Removes a cutscene camera from the list. Returns the parent cam if the removed camera is active, otherwise returns
+ * SUBCAM_NONE
+ */
+s32 OnePointCutscene_RemoveCamera(GlobalContext* globalCtx, s16 camIdx) {
+ Camera* camera = globalCtx->cameraPtrs[camIdx];
+ s32 nextCamIdx;
+
+ if (camera->thisIdx == CHILD_CAM(camera)->parentCamIdx) {
+ CHILD_CAM(camera)->parentCamIdx = camera->parentCamIdx;
+ }
+ if (camera->thisIdx == PARENT_CAM(camera)->childCamIdx) {
+ PARENT_CAM(camera)->childCamIdx = camera->childCamIdx;
+ }
+ nextCamIdx = (globalCtx->activeCamera == camIdx) ? camera->parentCamIdx : SUBCAM_NONE;
+ camera->parentCamIdx = MAIN_CAM;
+ camera->childCamIdx = camera->parentCamIdx;
+ camera->timer = -1;
+ Gameplay_ClearCamera(camera->globalCtx, camera->thisIdx);
+ return nextCamIdx;
+}
+
+#define vChildCamIdx temp2
+#define vCsStatus temp1
+#define vCurCamIdx temp2
+#define vNextCamIdx temp1
+
+/**
+ * Creates a cutscene subcamera with the specified ID, duration, and targeted actor. The camera is placed into the
+ * cutscene queue in front of the specified camera, then all lower priority demos in front of it are removed from the
+ * queue.
+ */
+s16 OnePointCutscene_Init(GlobalContext* globalCtx, s16 csId, s16 timer, Actor* actor, s16 parentCamIdx) {
+ s16 temp1;
+ s16 temp2;
+ s16 csCamIdx;
+ Camera* csCam;
+
+ if (parentCamIdx == SUBCAM_ACTIVE) {
+ parentCamIdx = globalCtx->activeCamera;
+ }
+ csCamIdx = Gameplay_CreateSubCamera(globalCtx);
+ if (csCamIdx == SUBCAM_NONE) {
+ osSyncPrintf(VT_COL(RED, WHITE) "onepoint demo: error: too many cameras ... give up! type=%d\n" VT_RST, csId);
+ return SUBCAM_NONE;
+ }
+
+ // Inserts the cutscene camera into the cutscene queue in front of parentCam
+
+ vChildCamIdx = globalCtx->cameraPtrs[parentCamIdx]->childCamIdx;
+ vCsStatus = CAM_STAT_ACTIVE;
+ if (vChildCamIdx >= SUBCAM_FIRST) {
+ OnePointCutscene_SetAsChild(globalCtx, vChildCamIdx, csCamIdx);
+ vCsStatus = CAM_STAT_WAIT;
+ } else {
+ Interface_ChangeAlpha(2);
+ }
+ OnePointCutscene_SetAsChild(globalCtx, csCamIdx, parentCamIdx);
+
+ csCam = globalCtx->cameraPtrs[csCamIdx];
+
+ csCam->timer = timer;
+ csCam->target = actor;
+
+ csCam->at = globalCtx->view.lookAt;
+ csCam->eye = globalCtx->view.eye;
+ csCam->fov = globalCtx->view.fovy;
+
+ csCam->csId = csId;
+
+ if (parentCamIdx == MAIN_CAM) {
+ Gameplay_ChangeCameraStatus(globalCtx, parentCamIdx, CAM_STAT_UNK3);
+ } else {
+ Gameplay_ChangeCameraStatus(globalCtx, parentCamIdx, CAM_STAT_WAIT);
+ }
+ OnePointCutscene_SetInfo(globalCtx, csCamIdx, csId, actor, timer);
+ Gameplay_ChangeCameraStatus(globalCtx, csCamIdx, vCsStatus);
+
+ // Removes all lower priority cutscenes in front of this cutscene from the queue.
+ vCurCamIdx = csCamIdx;
+ vNextCamIdx = globalCtx->cameraPtrs[csCamIdx]->childCamIdx;
+
+ while (vNextCamIdx >= SUBCAM_FIRST) {
+ s16 nextCsId = globalCtx->cameraPtrs[vNextCamIdx]->csId;
+ s16 thisCsId = globalCtx->cameraPtrs[csCamIdx]->csId;
+
+ if ((nextCsId / 100) < (thisCsId / 100)) {
+ osSyncPrintf(VT_COL(YELLOW, BLACK) "onepointdemo camera[%d]: killed 'coz low priority (%d < %d)\n" VT_RST,
+ vNextCamIdx, nextCsId, thisCsId);
+ if (globalCtx->cameraPtrs[vNextCamIdx]->csId != 5010) {
+ if ((vNextCamIdx = OnePointCutscene_RemoveCamera(globalCtx, vNextCamIdx)) != SUBCAM_NONE) {
+ Gameplay_ChangeCameraStatus(globalCtx, vNextCamIdx, CAM_STAT_ACTIVE);
+ }
+ } else {
+ vCurCamIdx = vNextCamIdx;
+ OnePointCutscene_EndCutscene(globalCtx, vNextCamIdx);
+ }
+ } else {
+ vCurCamIdx = vNextCamIdx;
+ }
+ vNextCamIdx = globalCtx->cameraPtrs[vCurCamIdx]->childCamIdx;
+ }
+ return csCamIdx;
}
-#pragma GLOBAL_ASM("asm/non_matchings/code/z_onepointdemo/func_80080728.s")
+/**
+ * Ends the cutscene in camIdx by setting its timer to 0. For attention cutscenes, it is set to 5 instead.
+ */
+s16 OnePointCutscene_EndCutscene(GlobalContext* globalCtx, s16 camIdx) {
+ if (camIdx == SUBCAM_ACTIVE) {
+ camIdx = globalCtx->activeCamera;
+ }
+ if (globalCtx->cameraPtrs[camIdx] != NULL) {
+ osSyncPrintf("onepointdemo camera[%d]: delete timer=%d next=%d\n", camIdx, globalCtx->cameraPtrs[camIdx]->timer,
+ globalCtx->cameraPtrs[camIdx]->parentCamIdx);
+ if (globalCtx->cameraPtrs[camIdx]->csId == 5010) {
+ globalCtx->cameraPtrs[camIdx]->timer = 5;
+ } else {
+ globalCtx->cameraPtrs[camIdx]->timer = 0;
+ }
+ }
+ return camIdx;
+}
+
+#define vTargetCat temp1
+#define vParentCamIdx temp1
+#define vLastHigherCat temp2
+#define vCsCamIdx temp2
+
+/**
+ * Adds an attention cutscene to the cutscene queue.
+ */
+s32 OnePointCutscene_Attention(GlobalContext* globalCtx, Actor* actor) {
+ Camera* parentCam;
+ s32 temp1;
+ s32 temp2;
+ s32 timer;
+
+ if (sDisableAttention) {
+ osSyncPrintf(VT_COL(YELLOW, BLACK) "actor attention demo camera: canceled by other camera\n" VT_RST);
+ return SUBCAM_NONE;
+ }
+ sUnused = -1;
+
+ parentCam = globalCtx->cameraPtrs[MAIN_CAM];
+ if (parentCam->mode == CAM_MODE_BOOMFOLLLOW) {
+ osSyncPrintf(VT_COL(YELLOW, BLACK) "actor attention demo camera: change mode BOOKEEPON -> NORMAL\n" VT_RST);
+ Camera_ChangeMode(parentCam, CAM_MODE_NORMAL);
+ }
+
+ // Finds the camera of the first actor attention demo with a lower category actor, or the first non-attention demo
+ // after at least one attention demo.
+
+ vLastHigherCat = -1;
+ while (parentCam->childCamIdx != SUBCAM_FREE) {
+ parentCam = globalCtx->cameraPtrs[parentCam->childCamIdx];
+ if (parentCam == NULL) {
+ break;
+ } else if (parentCam->setting != CAM_SET_DEMO4) {
+ if (vLastHigherCat == -1) {
+ continue;
+ } else {
+ break;
+ }
+ } else {
+ vTargetCat = parentCam->target->category;
+ if (actor->category > vTargetCat) {
+ break;
+ }
+ vLastHigherCat = vTargetCat;
+ }
+ }
+ // Actorcat is only undefined if the actor is in a higher category than all other attention cutscenes. In this case,
+ // it goes in the first position of the list. Otherwise, it goes in the index found in the loop.
+ vParentCamIdx = (vLastHigherCat == -1) ? MAIN_CAM : parentCam->thisIdx;
+
+ switch (actor->category) {
+ case ACTORCAT_SWITCH:
+ case ACTORCAT_BG:
+ case ACTORCAT_PLAYER:
+ case ACTORCAT_PROP:
+ case ACTORCAT_DOOR:
+ timer = 30;
+ break;
+ case ACTORCAT_NPC:
+ case ACTORCAT_ITEMACTION:
+ case ACTORCAT_CHEST:
+ timer = 100;
+ break;
+ case ACTORCAT_EXPLOSIVE:
+ case ACTORCAT_ENEMY:
+ case ACTORCAT_MISC:
+ case ACTORCAT_BOSS:
+ default:
+ osSyncPrintf(VT_COL(YELLOW, BLACK) "actor attention demo camera: %d: unkown part of actor %d\n" VT_RST,
+ globalCtx->state.frames, actor->category);
+ timer = 30;
+ break;
+ }
+ osSyncPrintf(VT_FGCOL(CYAN) "%06u:" VT_RST " actor attention demo camera: request %d ", globalCtx->state.frames,
+ actor->category);
+
+ // If the previous attention cutscene has an actor in the same category, skip this actor.
+ if (actor->category == vLastHigherCat) {
+ osSyncPrintf("→ " VT_FGCOL(PURPLE) "×" VT_RST " (%d)\n", actor->id);
+ return SUBCAM_NONE;
+ }
+ osSyncPrintf("→ " VT_FGCOL(BLUE) "○" VT_RST " (%d)\n", actor->id);
+ vCsCamIdx = OnePointCutscene_Init(globalCtx, 5010, timer, actor, vParentCamIdx);
+ if (vCsCamIdx == SUBCAM_NONE) {
+ osSyncPrintf(VT_COL(RED, WHITE) "actor attention demo: give up! \n" VT_RST, actor->id);
+ return SUBCAM_NONE;
+ } else {
+ s32* data = (s32*)&globalCtx->cameraPtrs[vCsCamIdx]->data1;
+
+ *data = NA_SE_SY_CORRECT_CHIME;
+ return vCsCamIdx;
+ }
+}
+
+/**
+ * Adds an attention cutscene to the cutscene queue with the specified sound effect
+ */
+s32 OnePointCutscene_AttentionSetSfx(GlobalContext* globalCtx, Actor* actor, s32 sfxId) {
+ s32 csCamIdx = OnePointCutscene_Attention(globalCtx, actor);
+
+ if (csCamIdx != SUBCAM_NONE) {
+ s32* data = (s32*)&globalCtx->cameraPtrs[csCamIdx]->data1;
+
+ *data = sfxId;
+ }
+ return csCamIdx;
+}
+
+// unused
+void OnePointCutscene_EnableAttention() {
+ sDisableAttention = false;
+}
+
+// unused
+void OnePointCutscene_DisableAttention() {
+ sDisableAttention = true;
+}
+
+s32 OnePointCutscene_CheckForCategory(GlobalContext* globalCtx, s32 category) {
+ Camera* parentCam = globalCtx->cameraPtrs[MAIN_CAM];
+
+ while (parentCam->childCamIdx != SUBCAM_FREE) {
+ parentCam = globalCtx->cameraPtrs[parentCam->childCamIdx];
+ if ((parentCam == NULL) || (parentCam->setting != CAM_SET_DEMO4)) {
+ break;
+ } else if (category == parentCam->target->category) {
+ return true;
+ }
+ }
+ return false;
+}
-void func_80080788(UNK_TYPE arg0, UNK_TYPE arg1) {
+// unused, also empty.
+void OnePointCutscene_Noop(GlobalContext* globalCtx, s32 arg1) {
}
diff --git a/src/code/z_onepointdemo_data.c b/src/code/z_onepointdemo_data.c
new file mode 100644
index 000000000..1d1838b05
--- /dev/null
+++ b/src/code/z_onepointdemo_data.c
@@ -0,0 +1,670 @@
+#include "global.h"
+
+static CutsceneCameraPoint D_8012013C[14] = {
+ { CS_CMD_CONTINUE, 25, 40, 70.79991f, { -1814, 533, -1297 } },
+ { CS_CMD_CONTINUE, 20, 40, 70.99991f, { -1805, 434, -1293 } },
+ { CS_CMD_CONTINUE, 10, 30, 60.0f, { -1794, 323, -1280 } },
+ { CS_CMD_CONTINUE, 5, 25, 60.0f, { -1817, 218, -1270 } },
+ { CS_CMD_CONTINUE, 3, 20, 60.0f, { -1836, 168, -1243 } },
+ { CS_CMD_CONTINUE, 0, 20, 60.0f, { -1905, 115, -1193 } },
+ { CS_CMD_CONTINUE, 0, 30, 55.0f, { -1969, 58, -1212 } },
+ { CS_CMD_CONTINUE, 0, 30, 55.0f, { -1969, 31, -1164 } },
+ { CS_CMD_CONTINUE, 0, 30, 60.0f, { -1969, 54, -1209 } },
+ { CS_CMD_CONTINUE, 0, 30, 60.0f, { -1973, 35, -1206 } },
+ { CS_CMD_CONTINUE, 0, 50, 60.0f, { -1974, 12, -1179 } },
+ { CS_CMD_CONTINUE, 0, 50, 60.0f, { -1974, 12, -1179 } },
+ { CS_CMD_STOP, 0, 50, 60.0f, { -1974, 12, -1179 } },
+ { CS_CMD_STOP, 0, 30, 60.0f, { -1974, 12, -1179 } },
+};
+static CutsceneCameraPoint D_8012021C[14] = {
+ { CS_CMD_CONTINUE, 0, 0, 60.0f, { -1751, 604, -1233 } }, { CS_CMD_CONTINUE, 0, 0, 60.0f, { -1752, 516, -1233 } },
+ { CS_CMD_CONTINUE, 0, 0, 60.0f, { -1751, 417, -1233 } }, { CS_CMD_CONTINUE, 0, 0, 60.0f, { -1767, 306, -1219 } },
+ { CS_CMD_CONTINUE, 0, 0, 60.0f, { -1776, 257, -1205 } }, { CS_CMD_CONTINUE, 0, 0, 60.0f, { -1881, 147, -1149 } },
+ { CS_CMD_CONTINUE, 0, 0, 60.0f, { -1969, 72, -1077 } }, { CS_CMD_CONTINUE, 0, 0, 60.0f, { -1969, 7, -1048 } },
+ { CS_CMD_CONTINUE, 0, 0, 60.0f, { -1969, 1, -1030 } }, { CS_CMD_CONTINUE, 0, 0, 60.0f, { -1987, 17, -1076 } },
+ { CS_CMD_CONTINUE, 0, 0, 60.0f, { -2007, 10, -1004 } }, { CS_CMD_CONTINUE, 0, 0, 60.0f, { -2007, 10, -1004 } },
+ { CS_CMD_STOP, 0, 0, 60.0f, { -2007, 10, -1004 } }, { CS_CMD_STOP, 0, 0, 60.0f, { -2007, 10, -1004 } },
+};
+static s16 D_801202FC = 13;
+static s16 D_80120300 = 210;
+static s16 D_80120304 = 0;
+
+static CutsceneCameraPoint D_80120308[9] = {
+ { CS_CMD_CONTINUE, 0, 10, 40.0f, { 0, 4, 0 } }, { CS_CMD_CONTINUE, 0, 10, 40.000004f, { 0, 4, 0 } },
+ { CS_CMD_CONTINUE, 0, 10, 50.0f, { 0, 9, 0 } }, { CS_CMD_CONTINUE, 0, 12, 55.0f, { 0, 12, 0 } },
+ { CS_CMD_CONTINUE, 0, 15, 61.0f, { 0, 18, 0 } }, { CS_CMD_CONTINUE, 0, 20, 65.0f, { 0, 29, 0 } },
+ { CS_CMD_CONTINUE, 0, 40, 60.0f, { 0, 34, 0 } }, { CS_CMD_STOP, 0, 40, 60.0f, { 0, 34, 0 } },
+ { CS_CMD_STOP, 0, 10, 60.0f, { 0, 34, 0 } },
+};
+static CutsceneCameraPoint D_80120398[9] = {
+ { CS_CMD_CONTINUE, 0, 0, 60.0f, { 0, 9, 45 } }, { CS_CMD_CONTINUE, 0, 0, 60.0f, { 0, 8, 50 } },
+ { CS_CMD_CONTINUE, 0, 0, 60.0f, { 0, 17, 58 } }, { CS_CMD_CONTINUE, 0, 0, 60.0f, { 0, 21, 78 } },
+ { CS_CMD_CONTINUE, 0, 0, 60.0f, { 0, 46, 109 } }, { CS_CMD_CONTINUE, 0, 0, 60.0f, { 0, 58, 118 } },
+ { CS_CMD_CONTINUE, 0, 0, 60.0f, { 0, 63, 119 } }, { CS_CMD_STOP, 0, 0, 60.0f, { 0, 62, 119 } },
+ { CS_CMD_STOP, 0, 0, 60.0f, { 0, 62, 119 } },
+};
+static s16 D_80120428 = 9;
+static s16 D_8012042C = 90;
+static s16 D_80120430 = 1;
+static CutsceneCameraPoint D_80120434[10] = {
+ { CS_CMD_CONTINUE, 0, 0, 60.0f, { 0, 9, -45 } }, { CS_CMD_CONTINUE, 0, 0, 60.0f, { 0, 9, -45 } },
+ { CS_CMD_CONTINUE, 0, 0, 60.0f, { 0, 8, -50 } }, { CS_CMD_CONTINUE, 0, 0, 60.0f, { 0, 17, -58 } },
+ { CS_CMD_CONTINUE, 0, 0, 60.0f, { 0, 21, -78 } }, { CS_CMD_CONTINUE, 0, 0, 60.0f, { 0, 46, -109 } },
+ { CS_CMD_CONTINUE, 0, 0, 60.0f, { 0, 58, -118 } }, { CS_CMD_CONTINUE, 0, 0, 60.0f, { 0, 63, -119 } },
+ { CS_CMD_STOP, 0, 0, 60.0f, { 0, 62, -119 } }, { CS_CMD_STOP, 0, 0, 60.0f, { 0, 62, -119 } },
+};
+
+static CutsceneCameraPoint D_801204D4[14] = {
+ { CS_CMD_CONTINUE, -15, 40, 80.600006f, { -60, 332, 183 } },
+ { CS_CMD_CONTINUE, -22, 30, 80.600006f, { -60, 332, 183 } },
+ { CS_CMD_CONTINUE, -20, 38, 80.600006f, { -118, 344, 41 } },
+ { CS_CMD_CONTINUE, -18, 32, 80.600006f, { -80, 251, -8 } },
+ { CS_CMD_CONTINUE, -12, 28, 80.600006f, { -64, 259, -28 } },
+ { CS_CMD_CONTINUE, -8, 22, 80.600006f, { -79, 200, -342 } },
+ { CS_CMD_CONTINUE, -5, 10, 65.80005f, { -110, 140, -549 } },
+ { CS_CMD_CONTINUE, -2, 8, 65.2f, { -74, 109, -507 } },
+ { CS_CMD_CONTINUE, 0, 10, 65.80002f, { -32, 78, -680 } },
+ { CS_CMD_CONTINUE, 0, 20, 85.199936f, { 25, 127, -950 } },
+ { CS_CMD_CONTINUE, 0, 30, 85.199936f, { 25, 127, -950 } },
+ { CS_CMD_CONTINUE, 0, 40, 85.199936f, { 25, 127, -950 } },
+ { CS_CMD_STOP, 6, 30, 85.199936f, { 25, 127, -950 } },
+ { CS_CMD_STOP, 0, 30, 85.199936f, { 25, 127, -950 } },
+};
+static CutsceneCameraPoint D_801205B4[14] = {
+ { CS_CMD_CONTINUE, 0, 0, 60.0f, { -225, 785, -242 } },
+ { CS_CMD_CONTINUE, -21, 0, 80.600006f, { -245, 784, -242 } },
+ { CS_CMD_CONTINUE, -21, 0, 80.600006f, { -288, 485, -379 } },
+ { CS_CMD_CONTINUE, -21, 0, 80.600006f, { -250, 244, -442 } },
+ { CS_CMD_CONTINUE, -21, 0, 80.600006f, { -163, 21, -415 } },
+ { CS_CMD_CONTINUE, -21, 0, 80.600006f, { -98, 86, -520 } },
+ { CS_CMD_CONTINUE, -21, 0, 80.600006f, { -86, 31, -816 } },
+ { CS_CMD_CONTINUE, -21, 0, 80.600006f, { -74, 18, -931 } },
+ { CS_CMD_CONTINUE, 1, 0, 80.600006f, { -91, 80, -1220 } },
+ { CS_CMD_CONTINUE, 0, 0, 85.199936f, { 14, 153, -1340 } },
+ { CS_CMD_CONTINUE, 0, 0, 85.199936f, { 28, 125, -1340 } },
+ { CS_CMD_CONTINUE, 0, 0, 85.199936f, { 48, 124, -1340 } },
+ { CS_CMD_STOP, 0, 0, 85.199936f, { 48, 124, -1502 } },
+ { CS_CMD_STOP, 0, 0, 85.199936f, { 48, 124, -1262 } },
+};
+static s16 D_80120694 = 14;
+static s16 D_80120698 = 190;
+static s16 D_8012069C = 8;
+
+static CutsceneCameraPoint D_801206A0[12] = {
+ { CS_CMD_CONTINUE, 6, 20, 80.0f, { -96, 40, 170 } }, { CS_CMD_CONTINUE, 6, 20, 80.0f, { -96, 40, 170 } },
+ { CS_CMD_CONTINUE, 6, 20, 70.0f, { -70, 35, 150 } }, { CS_CMD_CONTINUE, 5, 10, 60.0f, { -57, 34, 133 } },
+ { CS_CMD_CONTINUE, 4, 25, 65.0f, { -22, 32, 110 } }, { CS_CMD_CONTINUE, 3, 12, 60.0f, { -9, 33, 98 } },
+ { CS_CMD_CONTINUE, 3, 5, 65.0f, { -3, 29, 87 } }, { CS_CMD_CONTINUE, 2, 10, 65.0f, { -1, 15, 84 } },
+ { CS_CMD_CONTINUE, 1, 200, 65.0f, { 0, 17, 82 } }, { CS_CMD_CONTINUE, 1, 500, 65.0f, { 0, 18, 82 } },
+ { CS_CMD_STOP, 8, 50, 65.0f, { 0, 18, 82 } }, { CS_CMD_STOP, 11, 60, 65.0f, { 0, 18, 82 } },
+};
+static CutsceneCameraPoint D_80120760[12] = {
+ { CS_CMD_CONTINUE, 6, 0, 80.0f, { -50, 10, 180 } }, { CS_CMD_CONTINUE, 6, 0, 80.0f, { -50, 20, 180 } },
+ { CS_CMD_CONTINUE, 6, 0, 70.0f, { -40, 30, 177 } }, { CS_CMD_CONTINUE, 5, 0, 65.0f, { 0, 35, 172 } },
+ { CS_CMD_CONTINUE, 4, 0, 65.0f, { 34, 35, 162 } }, { CS_CMD_CONTINUE, 3, 0, 65.0f, { 61, 32, 147 } },
+ { CS_CMD_CONTINUE, 3, 0, 65.0f, { 72, 30, 128 } }, { CS_CMD_CONTINUE, 2, 0, 65.0f, { 74, 20, 125 } },
+ { CS_CMD_CONTINUE, 1, 0, 65.0f, { 75, 18, 123 } }, { CS_CMD_CONTINUE, 1, 0, 65.0f, { 75, 10, 123 } },
+ { CS_CMD_STOP, 0, 0, 65.0f, { 75, 10, 122 } }, { CS_CMD_STOP, 0, 0, 65.0f, { 75, 10, 122 } },
+};
+static CutsceneCameraPoint D_80120820[12] = {
+ { CS_CMD_CONTINUE, 6, 0, 80.0f, { 85, 5, 170 } }, { CS_CMD_CONTINUE, 6, 0, 80.0f, { 85, 10, 170 } },
+ { CS_CMD_CONTINUE, 6, 0, 70.0f, { 80, 20, 167 } }, { CS_CMD_CONTINUE, 5, 0, 65.0f, { 74, 25, 165 } },
+ { CS_CMD_CONTINUE, 4, 0, 65.0f, { 63, 30, 162 } }, { CS_CMD_CONTINUE, 3, 0, 65.0f, { 66, 34, 147 } },
+ { CS_CMD_CONTINUE, 3, 0, 65.0f, { 72, 34, 128 } }, { CS_CMD_CONTINUE, 2, 0, 65.0f, { 74, 20, 125 } },
+ { CS_CMD_CONTINUE, 1, 0, 65.0f, { 75, 18, 123 } }, { CS_CMD_CONTINUE, 1, 0, 65.0f, { 75, 10, 123 } },
+ { CS_CMD_STOP, 0, 0, 65.0f, { 75, 10, 122 } }, { CS_CMD_STOP, 0, 0, 65.0f, { 75, 10, 122 } },
+};
+static s16 D_801208E0 = 12;
+static s16 D_801208E4 = 90;
+static s16 D_801208E8 = 8;
+
+static OnePointCsFull D_801208EC[3] = {
+ { 0x0F, 0x08, 0x0101, 1, 0, 60.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } },
+ { 0x81, 0xFF, 0x0101, 1, 0, 60.0f, 1.0f, { 0.0f, -10.0f, 0.0f }, { 0.0f, 0.0f, 150.0f } },
+ { 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+};
+
+static OnePointCsFull D_80120964[2] = {
+ { 0x8F, 0xFF, 0x0101, 1, 0, 60.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } },
+ { 0x81, 0xFF, 0xA121, 1, 0, 75.0f, 0.6f, { 0.0f, -10.0f, 0.0f }, { 0.0f, 0.0f, 150.0f } },
+};
+
+static OnePointCsFull D_801209B4[4] = {
+ { 0x8F, 0x08, 0x0101, 1, 0, 60.0f, 0.9f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } },
+ { 0x84, 0x01, 0x0100, 29, 0, 45.0f, 0.1f, { 0.0f, -10.0f, 0.0f }, { 0.0f, 0.0f, 150.0f } },
+ { 0x83, 0xFF, 0x0000, 10, 0, 60.0f, 0.2f, { 0.0f, -10.0f, 0.0f }, { 0.0f, 0.0f, 150.0f } },
+ { 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+};
+
+static OnePointCsFull D_80120A54[3] = {
+ { 0x8F, 0xFF, 0x2525, 1, 0, 75.0f, 0.1f, { 0.0f, 20.0f, -10.0f }, { 0.0f, 10.0f, -40.0f } },
+ { 0x8F, 0xFF, 0x0000, 9, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+ { 0x8B, 0xFF, 0x0022, 5000, 0, 75.0f, 0.005f, { 0.0f, 0.0f, -10.0f }, { -1.0f, -1.0f, -1.0f } },
+};
+
+static OnePointCsFull D_80120ACC[5] = {
+ { 0x8F, 0xFF, 0x0442, 10, 0, 40.0f, 1.0f, { -10.0f, 45.0f, 20.0f }, { 20.0f, 30.0f, 160.0f } },
+ { 0x95, 0xFF, 0x0000, 1, 0, 40.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+ { 0x8F, 0x01, 0x0442, 10, 0, 40.0f, 1.0f, { -10.0f, 45.0f, 20.0f }, { 20.0f, 30.0f, 160.0f } },
+ { 0x95, 0xFF, 0x0000, 1, 0, 40.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+ { 0x11, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+};
+
+static OnePointCsFull D_80120B94[11] = {
+ { 0x8F, 0x01, 0x2142, 1, 0, 40.0f, 1.0f, { 20.0f, 40.0f, 20.0f }, { -20.0f, 0.0f, -30.0f } },
+ { 0x84, 0xFF, 0x0404, 19, 5, 70.0f, 0.01f, { 0.0f, 30.0f, 20.0f }, { 120.0f, 60.0f, 120.0f } },
+ { 0x84, 0xFF, 0x0404, 20, 0, 60.0f, 0.01f, { 0.0f, 20.0f, 20.0f }, { 120.0f, 60.0f, 120.0f } },
+ { 0x84, 0xFF, 0x0404, 40, -10, 50.0f, 0.02f, { 0.0f, 30.0f, 20.0f }, { 120.0f, 60.0f, 120.0f } },
+ { 0x8F, 0xFF, 0x4141, 1, 0, 40.0f, 1.0f, { 0.0f, -10.0f, 20.0f }, { 0.0f, 20.0f, 50.0f } },
+ { 0x84, 0xFF, 0x0404, 19, 0, 70.0f, 0.01f, { 0.0f, 30.0f, 20.0f }, { 120.0f, 60.0f, 120.0f } },
+ { 0x84, 0xFF, 0x0404, 40, 10, 50.0f, 0.01f, { 0.0f, 20.0f, 20.0f }, { 120.0f, 60.0f, 120.0f } },
+ { 0x84, 0xFF, 0x0404, 70, 0, 60.0f, 0.01f, { 0.0f, 30.0f, 20.0f }, { 120.0f, 60.0f, 120.0f } },
+ { 0x8F, 0xFF, 0x4141, 1, 0, 50.0f, 1.0f, { 0.0f, -10.0f, 0.0f }, { 80.0f, 20.0f, 60.0f } },
+ { 0x8D, 0xFF, 0x4141, 150, 0, 50.0f, 1.0f, { 0.0f, 5.0f, 0.0f }, { 0.0f, 4.0f, 120.0f } },
+ { 0x98, 0xFF, 0x0000, 1, 0, 50.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+};
+
+static OnePointCsFull D_80120D4C[7] = {
+ { 0x8F, 0x01, 0x2142, 1, 0, 40.0f, 1.0f, { 20.0f, 40.0f, 20.0f }, { -20.0f, 0.0f, -30.0f } },
+ { 0x84, 0xFF, 0x0404, 19, 5, 70.0f, 0.01f, { 0.0f, 30.0f, 20.0f }, { 120.0f, 60.0f, 120.0f } },
+ { 0x84, 0xFF, 0x0404, 20, 0, 60.0f, 0.01f, { 0.0f, 20.0f, 20.0f }, { 120.0f, 60.0f, 120.0f } },
+ { 0x84, 0xFF, 0x0404, 40, -10, 50.0f, 0.02f, { 0.0f, 30.0f, 20.0f }, { 120.0f, 60.0f, 120.0f } },
+ { 0x8F, 0xFF, 0x4141, 1, 0, 50.0f, 1.0f, { 0.0f, -10.0f, 0.0f }, { 80.0f, 20.0f, 60.0f } },
+ { 0x8D, 0xFF, 0x4141, 150, 0, 50.0f, 1.0f, { 0.0f, 5.0f, 0.0f }, { 0.0f, 4.0f, 120.0f } },
+ { 0x98, 0xFF, 0x0000, 1, 0, 50.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+};
+
+static OnePointCsFull D_80120E64[8] = {
+ { 0x41, 0x01, 0x2142, 20, 0, 50.0f, 1.0f, { -25.0f, 20.0f, 0.0f }, { 0.0f, 0.0f, 5.0f } },
+ { 0x4F, 0xFF, 0x0000, 80, 0, 50.0f, 1.0f, { -25.0f, 20.0f, 0.0f }, { 0.0f, 0.0f, 5.0f } },
+ { 0x4B, 0xFF, 0x4242, 8, 0, 60.0f, 0.1f, { -25.0f, 20.0f, 0.0f }, { 0.0f, 0.0f, 5.0f } },
+ { 0x4B, 0xFF, 0x4242, 15, 4, 55.0f, 0.05f, { -50.0f, 20.0f, 20.0f }, { 0.0f, 0.0f, 5.0f } },
+ { 0x4B, 0xFF, 0x4242, 15, -4, 50.0f, 0.05f, { 0.0f, 20.0f, 0.0f }, { 0.0f, 0.0f, 5.0f } },
+ { 0x4B, 0xFF, 0x4242, 15, 0, 50.0f, 0.1f, { -25.0f, 20.0f, 0.0f }, { 0.0f, 0.0f, 5.0f } },
+ { 0x4F, 0xFF, 0x0000, 40, 0, 50.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+ { 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+};
+
+static OnePointCsFull D_80120FA4[6] = {
+ { 0x8F, 0x01, 0x2143, 30, 0, 70.0f, 0.4f, { 0.0f, 40.0f, 50.0f }, { 30.0f, 10.0f, -50.0f } },
+ { 0x95, 0xFF, 0x0000, 1, 0, 50.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+ { 0x8F, 0xFF, 0x2222, 10, 0, 42.0f, 1.0f, { 0.0f, 40.0f, 0.0f }, { 0.0f, 85.0f, 45.0f } },
+ { 0x90, 0xFF, 0x0000, 1, 0, 50.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+ { 0x81, 0xFF, 0x2121, 10, 0, 60.0f, 1.0f, { 0.0f, 10.0f, 0.0f }, { 30.0f, 10.0f, -80.0f } },
+ { 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+};
+
+static OnePointCsFull D_80121094[3] = {
+ { 0x0F, 0x08, 0x2101, 20, 0, 50.0f, 1.0f, { 3840.0f, 10.0f, 950.0f }, { 0.0f, 0.0f, 5.0f } },
+ { 0x01, 0x01, 0x2101, 50, 0, 55.0f, 1.0f, { 4000.0f, 50.0f, 1000.0f }, { 0.0f, 0.0f, 5.0f } },
+ { 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+};
+
+static OnePointCsFull D_8012110C[3] = {
+ { 0x4F, 0x05, 0x2142, 1, 0, 50.0f, 1.0f, { -25.0f, 20.0f, 0.0f }, { 0.0f, 0.0f, 5.0f } },
+ { 0x41, 0xFF, 0x2121, 10, 0, 60.0f, 1.0f, { 0.0f, 10.0f, 0.0f }, { 0.0f, 10.0f, -80.0f } },
+ { 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+};
+
+static OnePointCsFull D_80121184[2] = {
+ { 0x83, 0x01, 0x0101, 40, 0, -1.0f, 0.1f, { 0.0f, 10.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } },
+ { 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+};
+
+static OnePointCsFull D_801211D4[2] = {
+ { 0x8F, 0x08, 0x0101, 50, 0, 60.0f, 1.0f, { 0.0f, 10.0f, 0.0f }, { -10.0f, 85.0f, 0.0f } },
+ { 0x11, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+};
+
+static OnePointCsFull D_80121224[6] = {
+ { 0x8F, 0x01, 0x4141, 2, 0, 60.0f, 1.0f, { 0.0f, 5.0f, 10.0f }, { 0.0f, 0.0f, 45.0f } },
+ { 0x81, 0xFF, 0x4141, 18, 0, 45.0f, 1.0f, { 0.0f, 5.0f, 10.0f }, { 0.0f, -10.0f, 50.0f } },
+ { 0x84, 0x34, 0x4104, 80, 0, 70.0f, 0.05f, { 0.0f, 0.0f, 60.0f }, { 0.0f, 250.0f, -50.0f } },
+ { 0x8F, 0x01, 0x0000, 20, 0, 70.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+ { 0x8F, 0xFF, 0x0421, 60, 0, 50.0f, 1.0f, { 0.0f, -30.0f, 20.0f }, { 10.0f, 5.0f, -50.0f } },
+ { 0x11, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+};
+
+static OnePointCsFull D_80121314[1] = {
+ { 0x8F, 0x08, 0x4141, 1000, 0, 75.0f, 0.6f, { 0.0f, 0.0f, 10.0f }, { 0.0f, 0.0f, 100.0f } },
+};
+
+static OnePointCsFull D_8012133C[3] = {
+ { 0x8F, 0x01, 0x0141, 40, 0, 75.0f, 1.0f, { 0.0f, 60.0f, 0.0f }, { 0.0f, 0.0f, 100.0f } },
+ { 0x83, 0xFF, 0x2121, 20, 0, 60.0f, 0.2f, { 0.0f, -10.0f, -10.0f }, { 0.0f, 10.0f, -100.0f } },
+ { 0x11, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+};
+
+static OnePointCsFull D_801213B4[5] = {
+ { 0x8F, 0x08, 0xC2C2, 40, 0, 70.0f, 1.0f, { 80.0f, 0.0f, 20.0f }, { 20.0f, 0.0f, 80.0f } },
+ { 0x8B, 0x01, 0xC2C2, 120, 0, 70.0f, 0.1f, { 80.0f, 0.0f, 20.0f }, { 20.0f, 0.0f, 80.0f } },
+ { 0x8F, 0x53, 0xC2C2, 30, 0, 50.0f, 1.0f, { 60.0f, 0.0f, 20.0f }, { 60.0f, 0.0f, 60.0f } },
+ { 0x84, 0x45, 0x4222, 30, 0, 60.0f, 0.1f, { 0.0f, 50.0f, 0.0f }, { 5.0f, 30.0f, 220.0f } },
+ { 0x12, 0xFF, 0x0000, 1, 0, 75.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+};
+
+static OnePointCsFull D_8012147C[4] = {
+ { 0x8F, 0x01, 0x0101, 40, 0, 45.0f, 1.0f, { 820.0f, 1600.0f, -400.0f }, { 777.0f, 1577.0f, -577.0f } },
+ { 0x8F, 0x01, 0x0142, 1, 0, 50.0f, 1.0f, { -50.0f, 80.0f, 0.0f }, { 900.0f, 1575.0f, 850.0f } },
+ { 0x83, 0x08, 0x0142, 89, -4, 80.0f, 0.07f, { -50.0f, 70.0f, 0.0f }, { 975.0f, 1575.0f, 770.0f } },
+ { 0x11, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+};
+
+static OnePointCsFull D_8012151C[2] = {
+ { 0x0F, 0x01, 0x0101, 29, 0, 60.0f, 1.0f, { -700.0f, 875.0f, -100.0f }, { -550.0f, 920.0f, -150.0f } },
+ { 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+};
+
+static OnePointCsFull D_8012156C[2] = {
+ { 0x8F, 0x4D, 0x4242, 1, 0, 65.0f, 1.0f, { 60.0f, 30.0f, 0.0f }, { 50.0f, 20.0f, 150.0f } },
+ { 0x81, 0xFF, 0x4242, -1, 0, 65.0f, 1.0f, { -50.0f, 60.0f, 0.0f }, { -60.0f, 40.0f, 150.0f } },
+};
+
+static OnePointCsFull D_801215BC[1] = {
+ { 0x0F, 0xFF, 0x0101, 5, 0, 65.0f, 1.0f, { -1185.0f, 655.0f, 1185.0f }, { -1255.0f, 735.0f, 1255.0f } },
+};
+
+static OnePointCsFull D_801215E4[10] = {
+ { 0x0F, 0x08, 0x4141, 20, 0, 30.0f, 1.0f, { 0.0f, 120.0f, 0.0f }, { -10.0f, 140.0f, -90.0f } },
+ { 0x0F, 0x01, 0x0101, 1, 4, 75.0f, 1.0f, { -1360.0f, -940.0f, -3343.0f }, { -1060.0f, -980.0f, -3325.0f } },
+ { 0x0B, 0xFF, 0x4141, 129, 0, 75.0f, 0.5f, { 0.0f, 50.0f, 0.0f }, { -1.0f, -1.0f, -1.0f } },
+ { 0x03, 0xFF, 0x0303, 30, 0, 70.0f, 0.05f, { 0.0f, 80.0f, 0.0f }, { -10.0f, 120.0f, 10.0f } },
+ { 0x0F, 0x09, 0x0101, 40, -5, 70.0f, 1.0f, { -973.0f, -924.0f, -3263.0f }, { -1190.0f, -1010.0f, -3365.0f } },
+ { 0x0F, 0x01, 0x0101, 1, 0, 75.0f, 1.0f, { -1355.0f, -700.0f, -3340.0f }, { -1040.0f, -940.0f, -3345.0f } },
+ { 0x02, 0xFF, 0x0101, 60, 0, 45.0f, 0.8f, { -1370.0f, -875.0f, -3345.0f }, { -1230.0f, -885.0f, -3345.0f } },
+ { 0x01, 0xFF, 0x0101, 10, 0, 70.0f, 1.0f, { -1370.0f, -875.0f, -3345.0f }, { -1210.0f, -900.0f, -3420.0f } },
+ { 0x0F, 0xFF, 0x0000, 20, 0, 70.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+ { 0x11, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+};
+
+static OnePointCsFull D_80121774[4] = {
+ { 0x0F, 0x08, 0x0101, 1, -2, 75.0f, 1.0f, { -1340.0f, -860.0f, -3345.0f }, { -1415.0f, -940.0f, -3520.0f } },
+ { 0x01, 0x01, 0x0142, 39, 2, 70.0f, 1.0f, { 0.0f, -20.0f, 10.0f }, { -1140.0f, -1010.0f, -3560.0f } },
+ { 0x01, 0x05, 0x0121, 20, 0, 60.0f, 1.0f, { 0.0f, -20.0f, 20.0f }, { -1220.0f, -1005.0f, -3660.0f } },
+ { 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+};
+
+static OnePointCsFull D_80121814[4] = {
+ { 0x0F, 0x4C, 0x0101, 5, 0, 40.0f, 1.0f, { -1400.0f, -540.0f, -3327.0f }, { -1254.0f, -20.0f, -3357.0f } },
+ { 0x01, 0xFF, 0x0101, 70, 0, 75.0f, 0.75f, { -1327.0f, 100.0f, -3342.0f }, { -1320.0f, 350.0f, -3540.0f } },
+ { 0x01, 0xFF, 0x2121, 10, 0, 60.0f, 0.75f, { 0.0f, 10.0f, 0.0f }, { 0.0f, 20.0f, -150.0f } },
+ { 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+};
+
+static OnePointCsFull D_801218B4[2] = {
+ { 0x0F, 0xFF, 0x0101, 60, 0, 65.0f, 1.0f, { 0.0f, 350.0f, -1520.0f }, { 0.0f, 715.0f, -885.0f } },
+ { 0x03, 0xFF, 0x0101, 100, 0, 70.0f, 0.02f, { 0.0f, 75.0f, -1335.0f }, { 0.0f, 20.0f, -1190.0f } },
+};
+
+static OnePointCsFull D_80121904[2] = {
+ { 0x0F, 0xFF, 0x0101, 50, 10, 65.0f, 1.0f, { 165.0f, 85.0f, -920.0f }, { 65.0f, -30.0f, -720.0f } },
+ { 0x11, 0xFF, 0x0000, 1, -1, -1.0f, -1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+};
+
+static OnePointCsFull D_80121954[3][2] = {
+ {
+ { 0x0F, 0xFF, 0x0101, 20, 5, 60.0f, 1.0f, { -700.0f, 940.0f, 300.0f }, { -765.0f, 1000.0f, 335.0f } },
+ { 0x03, 0xFF, 0x0101, 80, -10, 70.0f, 0.1f, { -540.0f, 875.0f, 245.0f }, { -585.0f, 900.0f, 335.0f } },
+ },
+ {
+ { 0x0F, 0xFF, 0x0101, 40, -30, 70.0f, 1.0f, { -80.0f, 115.0f, -180.0f }, { -5.0f, 240.0f, -190.0f } },
+ { 0x0B, 0xFF, 0x0101, 60, 20, 70.0f, 0.1f, { -100.0f, 350.0f, -175.0f }, { -5.0f, 240.0f, -190.0f } },
+ },
+ {
+ { 0x03, 0xFF, 0x0101, 80, 5, 70.0f, 0.2f, { 960.0f, 900.0f, 260.0f }, { 970.0f, 950.0f, 250.0f } },
+ { 0x0F, 0xFF, 0x0101, 20, 5, 70.0f, 1.0f, { 960.0f, 900.0f, 260.0f }, { 970.0f, 950.0f, 250.0f } },
+ },
+};
+
+static OnePointCsFull D_80121A44[12] = {
+ { 0x4F, 0x05, 0x2121, 10, 0, 60.0f, 1.0f, { 0.0f, -5.0f, 0.0f }, { 0.0f, 0.0f, -80.0f } },
+ { 0x42, 0x01, 0x4242, 30, 0, 50.0f, 1.0f, { 0.0f, 45.0f, 0.0f }, { 0.0f, 45.0f, 50.0f } },
+ { 0x55, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+ { 0x4F, 0x05, 0x2222, 40, 5, 50.0f, 1.0f, { 0.0f, 50.0f, 0.0f }, { 0.0f, 50.0f, 50.0f } },
+ { 0x4F, 0x01, 0x4242, 40, 5, 60.0f, 1.0f, { 30.0f, 30.0f, 15.0f }, { 70.0f, 30.0f, -40.0f } },
+ { 0x55, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+ { 0x4F, 0xFF, 0x4242, 30, -5, 50.0f, 1.0f, { 20.0f, 30.0f, -5.0f }, { 0.0f, 70.0f, 70.0f } },
+ { 0x50, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+ { 0x4F, 0x01, 0x2242, 40, 0, 45.0f, 1.0f, { 0.0f, 30.0f, 30.0f }, { 25.0f, 60.0f, -60.0f } },
+ { 0x4B, 0x01, 0x22C2, 140, 0, 60.0f, 0.04f, { 0.0f, 0.0f, 30.0f }, { 25.0f, 60.0f, -60.0f } },
+ { 0x49, 0xFF, 0x2222, 20, 0, 60.0f, 0.8f, { 0.0f, 50.0f, 0.0f }, { 0.0f, 60.0f, -60.0f } },
+ { 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+};
+
+static OnePointCsFull D_80121C24[7] = {
+ { 0x0F, 0x05, 0x0101, 1, 0, 60.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } },
+ { 0x03, 0xFF, 0x0101, 89, 0, 50.0f, 0.4f, { 125.0f, 320.0f, -1500.0f }, { 125.0f, 500.0f, -1150.0f } },
+ { 0x0F, 0x08, 0x0101, 40, 4, 55.0f, 1.0f, { 0.0f, 375.0f, -1440.0f }, { 5.0f, 365.0f, -1315.0f } },
+ { 0x0F, 0xFF, 0x0101, 40, -4, 55.0f, 1.0f, { 250.0f, 375.0f, -1440.0f }, { 235.0f, 365.0f, -1315.0f } },
+ { 0x0F, 0xFF, 0x0101, 100, 0, 95.0f, 1.0f, { 125.0f, 345.0f, -1500.0f }, { 125.0f, 255.0f, -1350.0f } },
+ { 0x02, 0xFF, 0x0101, 100, 0, 60.0f, 1.0f, { 125.0f, 325.0f, -1500.0f }, { 125.0f, 480.0f, -1000.0f } },
+ { 0x11, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+};
+
+static OnePointCsFull D_80121D3C[3] = {
+ { 0x0F, 0xFF, 0x0101, 1, 0, 60.0f, 1.0f, { 1023.0f, 738.0f, -2628.0f }, { 993.0f, 770.0f, -2740.0f } },
+ { 0x02, 0xFF, 0x0101, 4, 0, 50.0f, 1.0f, { 1255.0f, 350.0f, -1870.0f }, { 1240.0f, 575.0f, -2100.0f } },
+ { 0x0F, 0xFF, 0x0000, -1, 0, 75.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+};
+
+static OnePointCsFull D_80121DB4[9] = {
+ { 0x0F, 0xFF, 0x0101, 40, 0, 70.0f, 1.0f, { 4290.0f, -1332.0f, -1900.0f }, { 4155.0f, -1360.0f, -1840.0f } },
+ { 0x02, 0xFF, 0x0101, 60, 0, 70.0f, 1.0f, { 4215.0f, -975.0f, -2095.0f }, { 4070.0f, -1000.0f, -2025.0f } },
+ { 0x0F, 0xFF, 0x0101, 5, 0, 70.0f, 1.0f, { 4215.0f, -975.0f, -2095.0f }, { 4070.0f, -1000.0f, -2025.0f } },
+ { 0x0F, 0xFF, 0x0101, 80, 8, 75.0f, 1.0f, { 4010.0f, -1152.0f, -1728.0f }, { 3997.0f, -1194.0f, -1629.0f } },
+ { 0x0F, 0x39, 0x2121, 1, 8, 75.0f, 1.0f, { 20.0f, 20.0f, 0.0f }, { 50.0f, 30.0f, 200.0f } },
+ { 0x04, 0xFF, 0x2121, 99, 2, 70.0f, 0.02f, { -20.0f, 0.0f, 20.0f }, { 300.0f, 50.0f, -500.0f } },
+ { 0x09, 0x38, 0x2121, 149, -20, 70.0f, 0.1f, { 100.0f, 50.0f, -100.0f }, { 5000.0f, 1055.0f, -2250.0f } },
+ { 0x0F, 0xFF, 0x2121, 1, 0, 60.0f, 1.0f, { 0.0f, -20.0f, 0.0f }, { 0.0f, 20.0f, -150.0f } },
+ { 0x12, 0xFF, 0x0000, 1, -1, -1.0f, -1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+};
+
+static OnePointCsFull D_80121F1C[4] = {
+ { 0x0F, 0x08, 0x0101, 10, 0, 60.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } },
+ { 0x01, 0xFF, 0x2121, 10, 0, 50.0f, 0.5f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 150.0f } },
+ { 0x01, 0x02, 0x2121, 23, 0, 50.0f, 0.5f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 150.0f } },
+ { 0x11, 0xFF, 0x0000, 1, -1, -1.0f, -1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+};
+
+static OnePointCsFull D_80121FBC[4] = {
+ { 0x0F, 0xFF, 0x0101, 5, 0, 60.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } },
+ { 0x01, 0xFF, 0x0101, 10, 0, 30.0f, 1.0f, { -2130.0f, 2885.0f, -1055.0f }, { -2085.0f, 2875.0f, -1145.0f } },
+ { 0x0F, 0xFF, 0x0000, 30, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+ { 0x12, 0xFF, 0x0000, 1, -1, -1.0f, -1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+};
+
+static OnePointCsFull D_8012205C[3] = {
+ { 0x0F, 0xFF, 0x42C2, 1, 0, 50.0f, 1.0f, { 0.0f, 220.0f, 0.0f }, { 0.0f, 220.0f, 240.0f } },
+ { 0x0F, 0xFF, 0x0080, 29, 0, 50.0f, 1.0f, { 0.0f, 220.0f, 0.0f }, { 0.0f, 220.0f, 240.0f } },
+ { 0x01, 0x01, 0x21A1, 10, 0, 60.0f, 1.0f, { 0.0f, -10.0f, 0.0f }, { 0.0f, 10.0f, -200.0f } },
+};
+
+static OnePointCsFull D_801220D4[5] = {
+ { 0x0F, 0x01, 0x0101, 5, 0, 60.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } },
+ { 0x01, 0xFF, 0x4141, 10, 5, 55.0f, 0.75f, { 400.0f, -50.0f, 800.0f }, { 600.0f, -60.0f, 800.0f } },
+ { 0x01, 0xFF, 0x4141, 15, 10, 40.0f, 0.75f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 10.0f, 200.0f } },
+ { 0x0F, 0xFF, 0x0000, 25, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+ { 0x11, 0xFF, 0x0000, 1, -1, -1.0f, -1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+};
+
+static OnePointCsFull D_8012219C[7] = {
+ { 0x0F, 0xFF, 0x2121, 5, 0, 60.0f, 1.0f, { 0.0f, -5.0f, 0.0f }, { 0.0f, 0.0f, -80.0f } },
+ { 0x02, 0xFF, 0x4242, 15, 0, 40.0f, 0.4f, { 0.0f, 60.0f, -20.0f }, { 0.0f, 60.0f, 100.0f } },
+ { 0x0F, 0xFF, 0x0000, 20, 0, 40.0f, 1.0f, { 0.0f, 60.0f, -20.0f }, { 0.0f, 60.0f, 100.0f } },
+ { 0x01, 0xFF, 0x4242, 20, 0, 60.0f, 1.0f, { 20.0f, 60.0f, 20.0f }, { 40.0f, 60.0f, -80.0f } },
+ { 0x10, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+ { 0x0F, 0xFF, 0x0000, 90, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+ { 0x11, 0xFF, 0x0000, 1, -1, -1.0f, -1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+};
+
+static OnePointCsFull D_801222B4[5] = {
+ { 0x0F, 0xFF, 0x0101, 20, 10, 45.0f, 1.0f, { -1200.0f, 730.0f, -860.0f }, { -1100.0f, 500.0f, -1025.0f } },
+ { 0x0B, 0xFF, 0x0101, 20, 10, 45.0f, 0.1f, { -880.0f, 480.0f, -860.0f }, { -1100.0f, 500.0f, -1025.0f } },
+ { 0x0B, 0x81, 0x0101, 20, 10, 45.0f, 0.1f, { -880.0f, 500.0f, -860.0f }, { -1100.0f, 500.0f, -1025.0f } },
+ { 0x0B, 0x8A, 0x0101, 5, 10, 45.0f, 0.1f, { -880.0f, 500.0f, -860.0f }, { -1100.0f, 500.0f, -1025.0f } },
+ { 0x12, 0xFF, 0x0000, 1, -1, -1.0f, -1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+};
+
+static OnePointCsFull D_8012237C[2] = {
+ { 0x0F, 0xFF, 0x0101, 20, -2, 65.0f, 1.0f, { -625.0f, 185.0f, -685.0f }, { -692.0f, 226.0f, -515.0f } },
+ { 0x11, 0xFF, 0x0000, 1, -1, -1.0f, -1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+};
+
+static OnePointCsFull D_801223CC[6] = {
+ { 0x0F, 0xFF, 0x0101, 20, 0, 55.0f, 1.0f, { 60.0f, 1130.0f, -1430.0f }, { 60.0f, 1130.0f, -1190.0f } },
+ { 0x0F, 0xFF, 0x0101, 18, -13, 68.0f, 1.0f, { 60.0f, 1130.0f, -1445.0f }, { 180.0f, 1170.0f, -1240.0f } },
+ { 0x0F, 0xFF, 0x0101, 16, 18, 75.0f, 1.0f, { 42.0f, 1040.0f, -1400.0f }, { -20.0f, 940.0f, -1280.0f } },
+ { 0x0F, 0xFF, 0x0101, 4, 0, 60.0f, 1.0f, { 60.0f, 1100.0f, -1465.0f }, { 60.0f, 1100.0f, -1180.0f } },
+ { 0x02, 0xFF, 0x0101, 32, 0, 70.0f, 1.0f, { 60.0f, 1100.0f, -1030.0f }, { 60.0f, 1150.0f, -740.0f } },
+ { 0x12, 0xFF, 0x0000, 1, -1, -1.0f, -1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+};
+
+static OnePointCsFull D_801224BC[7] = {
+ { 0x0F, 0xFF, 0x0101, 5, 0, 70.0f, 1.0f, { 60.0f, 1800.0f, -920.0f }, { 60.0f, 1860.0f, -800.0f } },
+ { 0x03, 0xFF, 0x0101, 20, 0, 70.0f, 0.1f, { 60.0f, 1720.0f, -920.0f }, { 60.0f, 1780.0f, -800.0f } },
+ { 0x10, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+ { 0x0F, 0xFF, 0x0142, 1, 0, 75.0f, 1.0f, { 0.0f, 70.0f, 0.0f }, { 60.0f, 990.0f, -690.0f } },
+ { 0x03, 0xFF, 0x0142, 119, 0, 75.0f, 0.05f, { 0.0f, 70.0f, 0.0f }, { 60.0f, 990.0f, -690.0f } },
+ { 0x03, 0xFF, 0x4242, 20, 0, 60.0f, 0.1f, { 0.0f, 70.0f, 0.0f }, { 0.0f, 100.0f, 200.0f } },
+ { 0x12, 0xFF, 0x0000, 1, -1, -1.0f, -1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+};
+
+static OnePointCsFull D_801225D4[5] = {
+ { 0x0F, 0x08, 0x0101, 1, 0, 50.0f, 1.0f, { 4100.0f, 1200.0f, -1400.0f }, { 3900.0f, 1100.0f, -1400.0f } },
+ { 0x01, 0x3B, 0x0101, 60, 4, 50.0f, 0.94f, { 4100.0f, 965.0f, -1385.0f }, { 3790.0f, 825.0f, -1325.0f } },
+ { 0x03, 0xFF, 0x0101, 90, -5, 130.0f, 0.02f, { 4100.0f, 975.0f, -1375.0f }, { 3735.0f, 715.0f, -1325.0f } },
+ { 0x0F, 0x08, 0x2323, 2, 0, 60.0f, 1.0f, { 0.0f, 60.0f, 0.0f }, { -10.0f, 15.0f, -200.0f } },
+ { 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+};
+
+static OnePointCsFull D_8012269C[3] = {
+ { 0x0F, 0xFF, 0x0101, 20, 2, 45.0f, 1.0f, { 975.0f, 225.0f, -1195.0f }, { 918.0f, 228.0f, -1228.0f } },
+ { 0x10, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+ { 0x11, 0xFF, 0x0000, 1, -1, -1.0f, -1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+};
+
+static OnePointCsFull D_80122714[4] = {
+ { 0x0F, 0xFF, 0x0101, 20, 0, 45.0f, 1.0f, { -915.0f, -2185.0f, 6335.0f }, { -915.0f, -2290.0f, 6165.0f } },
+ { 0x02, 0xFF, 0x0101, -1, 0, 80.0f, 0.8f, { -920.0f, -2270.0f, 6140.0f }, { -920.0f, -2280.0f, 6070.0f } },
+ { 0x02, 0xFF, 0x0101, 20, 0, 80.0f, 0.9f, { -920.0f, -2300.0f, 6140.0f }, { -920.0f, -2300.0f, 6070.0f } },
+ { 0x11, 0xFF, 0x0000, 1, -1, -1.0f, -1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+};
+
+static OnePointCsFull D_801227B4[6] = {
+ { 0x0F, 0xFF, 0x0101, 30, 0, 60.0f, 1.0f, { 1400.0f, 100.0f, -170.0f }, { 1250.0f, 100.0f, -170.0f } },
+ { 0x03, 0xFF, 0x4242, 130, 0, 60.0f, 0.2f, { 0.0f, -5.0f, 0.0f }, { -150.0f, -5.0f, 0.0f } },
+ { 0x10, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+ { 0x02, 0xFF, 0x0303, 69, 0, 85.0f, 1.0f, { -40.0f, 0.0f, 0.0f }, { -40.0f, 0.0f, 0.0f } },
+ { 0x02, 0xFF, 0x0303, 20, 0, 60.0f, 1.0f, { 10.0f, 0.0f, 0.0f }, { 10.0f, 0.0f, 0.0f } },
+ { 0x11, 0xFF, 0x0000, 1, -1, -1.0f, -1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+};
+
+static OnePointCsFull D_801228A4[5] = {
+ { 0x0F, 0x01, 0x0101, 20, 5, 30.0f, 1.0f, { 800.0f, -40.0f, 2170.0f }, { 512.0f, 142.0f, 2020.0f } },
+ { 0x02, 0xFF, 0x0101, 20, -2, 70.0f, 0.8f, { 800.0f, -40.0f, 2170.0f }, { 512.0f, 142.0f, 2020.0f } },
+ { 0x0F, 0x08, 0x0101, 90, 2, 62.0f, 1.0f, { 1140.0f, 125.0f, 1920.0f }, { 1255.0f, 150.0f, 1785.0f } },
+ { 0x81, 0xFF, 0x2121, 10, 0, 60.0f, 1.0f, { 0.0f, 10.0f, 0.0f }, { 30.0f, 10.0f, -80.0f } },
+ { 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+};
+
+static OnePointCsFull D_8012296C[4] = {
+ { 0x0F, 0xFF, 0x0101, 20, -10, 70.0f, 1.0f, { -930.0f, 765.0f, -3075.0f }, { -700.0f, 700.0f, -3075.0f } },
+ { 0x03, 0xFF, 0x0101, 80, -10, 70.0f, 0.05f, { -930.0f, 205.0f, -3075.0f }, { -700.0f, 140.0f, -3075.0f } },
+ { 0x0F, 0xFF, 0x0000, 120, 0, 70.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+ { 0x11, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+};
+
+static OnePointCsFull D_80122A0C[2] = {
+ { 0x0F, 0xFF, 0x0101, 60, 4, 50.0f, 1.0f, { 0.0f, 400.0f, -1000.0f }, { -200.0f, 500.0f, -850.0f } },
+ { 0x12, 0xFF, 0x0000, 1, 0, 50.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+};
+
+static OnePointCsFull D_80122A5C[8] = {
+ { 0x0F, 0xFF, 0x0101, 1, -15, 70.0f, 1.0f, { 230.0f, 3675.0f, -4230.0f }, { -45.0f, 3650.0f, -4415.0f } },
+ { 0x15, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+ { 0x0F, 0xFF, 0x0101, 1, 0, 60.0f, 1.0f, { -120.0f, 2187.0f, -3286.0f }, { -110.0f, 2162.0f, -3262.0f } },
+ { 0x15, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+ { 0x0F, 0xFF, 0x0101, 55, 0, 60.0f, 1.0f, { -38.0f, 1467.0f, -1102.0f }, { 64.0f, 1423.0f, -1188.0f } },
+ { 0x0F, 0xFF, 0x0101, 1, -15, 70.0f, 1.0f, { 230.0f, 3675.0f, -4230.0f }, { -20.0f, 3650.0f, -4400.0f } },
+ { 0x10, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+ { 0x11, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+};
+
+static OnePointCsFull D_80122B9C[3] = {
+ { 0x0F, 0xFF, 0x0101, 60, 0, 65.0f, 1.0f, { 1095.0f, 2890.0f, -2980.0f }, { 1166.0f, 2695.0f, -2710.0f } },
+ { 0x0F, 0xFF, 0x0101, 60, 15, 65.0f, 1.0f, { 566.0f, 4654.0f, -4550.0f }, { 606.0f, 5160.0f, -4740.0f } },
+ { 0x11, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+};
+
+static OnePointCsFull D_80122C14[1] = {
+ { 0x0F, 0xFF, 0x0101, 999, 0, 85.0f, 1.0f, { -15.0f, 185.0f, 160.0f }, { -15.0f, 210.0f, 250.0f } },
+};
+
+static OnePointCsFull D_80122C3C[1] = {
+ { 0x0F, 0xFF, 0x0101, 999, -2, 70.0f, 1.0f, { -62.0f, 60.0f, -315.0f }, { -115.0f, 30.0f, -445.0f } },
+};
+
+static OnePointCsFull D_80122C64[1] = {
+ { 0x0F, 0xFF, 0x0101, 999, 3, 70.0f, 1.0f, { -40.0f, 80.0f, 375.0f }, { -85.0f, 45.0f, 485.0f } },
+};
+
+static OnePointCsFull D_80122C8C[1] = {
+ { 0x0F, 0xFF, 0x0101, 999, 5, 60.0f, 1.0f, { -70.0f, 140.0f, 25.0f }, { 10.0f, 180.0f, 195.0f } },
+};
+
+static OnePointCsFull D_80122CB4[2] = {
+ { 0x0F, 0xFF, 0x4242, 5, 0, 60.0f, 1.0f, { 0.0f, 0.0f, 1000.0f }, { 0.0f, 0.0f, 1100.0f } },
+ { 0x02, 0xFF, 0x4242, -1, 0, 60.0f, 1.0f, { 0.0f, 0.0f, -100.0f }, { 0.0f, 0.0f, 0.0f } },
+};
+
+static OnePointCsFull D_80122D04[2] = {
+ { 0x0F, 0xFF, 0x4242, 10, 0, 60.0f, 1.0f, { 0.0f, 0.0f, -100.0f }, { 0.0f, 0.0f, 0.0f } },
+ { 0x02, 0xFF, 0x4242, -1, 0, 60.0f, 1.0f, { 0.0f, 0.0f, 1000.0f }, { 0.0f, 0.0f, 1100.0f } },
+};
+
+static OnePointCsFull D_80122D54[3] = {
+ { 0x0F, 0xFF, 0x0101, 1, -4, 50.0f, 1.0f, { 230.0f, 65.0f, 300.0f }, { 50.0f, 50.0f, 225.0f } },
+ { 0x10, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+ { 0x11, 0xFF, 0x0000, 1, -1, -1.0f, -1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+};
+
+static OnePointCsFull D_80122DCC[3] = {
+ { 0x0F, 0xFF, 0x0101, 1, 0, 50.0f, 1.0f, { 0.0f, 5.0f, -145.0f }, { 0.0f, 55.0f, 55.0f } },
+ { 0x10, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+ { 0x11, 0xFF, 0x0000, 1, -1, -1.0f, -1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+};
+
+static OnePointCsFull D_80122E44[2][7] = {
+ {
+ { 0x83, 0xFF, 0x2222, 10, 5, 90.0f, 0.2f, { 50.0f, 100.0f, 140.0f }, { -30.0f, 10.0f, -20.0f } },
+ { 0x8F, 0xFF, 0x0000, 20, 0, 90.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+ { 0x03, 0xFF, 0x4343, 30, -5, 50.0f, 0.2f, { -10.0f, 80.0f, 10.0f }, { 20.0f, 20.0f, 120.0f } },
+ { 0x10, 0xFF, 0x0000, 1, -5, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+ { 0x0B, 0x01, 0x4343, 160, 10, 80.0f, 0.005f, { -50.0f, 60.0f, 0.0f }, { -100.0f, 20.0f, 50.0f } },
+ { 0x02, 0xFF, 0x0501, 50, 0, 60.0f, 1.0f, { 0.0f, -10.0f, 0.0f }, { 0.0f, 10.0f, 80.0f } },
+ { 0x13, 0xFF, 0x0000, 1, -1, -1.0f, -1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+ },
+ {
+ { 0x83, 0xFF, 0x2222, 10, -5, 90.0f, 0.2f, { -50.0f, 100.0f, 140.0f }, { 30.0f, 10.0f, -20.0f } },
+ { 0x8F, 0xFF, 0x0000, 20, 0, 90.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+ { 0x03, 0xFF, 0x4343, 30, 5, 50.0f, 0.2f, { 10.0f, 80.0f, 10.0f }, { -20.0f, 20.0f, 120.0f } },
+ { 0x10, 0xFF, 0x0000, 1, 5, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+ { 0x0B, 0x01, 0x4343, 160, -10, 80.0f, 0.005f, { 50.0f, 60.0f, 0.0f }, { 100.0f, 20.0f, 50.0f } },
+ { 0x02, 0xFF, 0x0501, 50, 0, 60.0f, 1.0f, { 0.0f, -10.0f, 0.0f }, { 0.0f, 10.0f, 80.0f } },
+ { 0x13, 0xFF, 0x0000, 1, -1, -1.0f, -1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+ },
+};
+
+static OnePointCsFull D_80123074[5] = {
+ { 0x8F, 0xFF, 0xA2A2, 2, 8, 70.0f, 1.0f, { -27.0f, -96.0f, 25.0f }, { 37.0f, -5.0f, 100.0f } },
+ { 0x81, 0xFF, 0xA2A2, 38, 4, 60.0f, 1.0f, { 64.0f, -109.0f, 55.0f }, { 37.0f, 150.0f, 155.0f } },
+ { 0x8F, 0xFF, 0xA2A2, 2, 8, 70.0f, 1.0f, { 45.0f, 123.0f, 45.0f }, { 70.0f, 5.0f, 125.0f } },
+ { 0x81, 0xFF, 0xA2A2, 58, 4, 60.0f, 0.9f, { 82.0f, 95.0f, 55.0f }, { 25.0f, -175.0f, 180.0f } },
+ { 0x92, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+};
+
+static OnePointCsFull D_8012313C[3] = {
+ { 0x8F, 0xFF, 0xA2A2, 20, 8, 70.0f, 1.0f, { 65.0f, -150.0f, 50.0f }, { 30.0f, 10.0f, 90.0f } },
+ { 0x81, 0xFF, 0xA2A2, 100, 0, 60.0f, 1.0f, { 70.0f, -160.0f, 50.0f }, { 25.0f, 180.0f, 180.0f } },
+ { 0x92, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+};
+
+static OnePointCsFull D_801231B4[4] = {
+ { 0x8F, 0xC5, 0x4343, 1, 0, 50.0f, 1.0f, { 0.0f, 20.0f, 0.0f }, { 0.0f, 5.0f, -1.0f } },
+ { 0x81, 0xC5, 0x4343, 48, 0, 50.0f, 0.75f, { 0.0f, 80.0f, 0.0f }, { 0.0f, 15.0f, -1.0f } },
+ { 0x8F, 0xC5, 0x4343, 1, 5, 45.0f, 1.0f, { 0.0f, 0.0f, 30.0f }, { 30.0f, 120.0f, 60.0f } },
+ { 0x81, 0xC5, 0x4343, -1, 0, -1.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+};
+
+static OnePointCsFull D_80123254[2] = {
+ { 0x0F, 0xFF, 0x0101, 1, 0, 60.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } },
+ { 0x03, 0xC5, 0x0101, 49, 0, 50.0f, 0.05f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } },
+};
+
+static OnePointCsFull D_801232A4[1] = {
+ { 0x0F, 0x45, 0x0101, 9999, 0, 60.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } },
+};
+
+static OnePointCsFull D_801232CC[5] = {
+ { 0x01, 0xFF, 0x0101, 45, -3, 65.0f, 1.0f, { -52.0f, 84.0f, -846.0f }, { -159.0f, 33.0f, -729.0f } },
+ { 0x10, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+ { 0x0F, 0xFF, 0x0000, 10, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+ { 0x01, 0xFF, 0x2121, 15, 0, 60.0f, 1.0f, { 10.0f, -5.0f, 0.0f }, { 0.0f, 0.0f, -150.0f } },
+ { 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+};
+
+static OnePointCsFull D_80123394[5] = {
+ { 0x01, 0xFF, 0x0101, 45, 3, 65.0f, 1.0f, { -16.0f, 87.0f, -829.0f }, { 98.0f, 24.0f, -714.0f } },
+ { 0x10, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+ { 0x0F, 0xFF, 0x0000, 10, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+ { 0x01, 0xFF, 0x2121, 15, 0, 60.0f, 1.0f, { 10.0f, -5.0f, 0.0f }, { 0.0f, 0.0f, -150.0f } },
+ { 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+};
+
+static OnePointCsFull D_8012345C[4] = {
+ { 0x01, 0x01, 0x4242, 40, 0, 40.0f, 1.0f, { 0.0f, 50.0f, -40.0f }, { 0.0f, 60.0f, -160.0f } },
+ { 0x04, 0x4D, 0x4242, 40, 0, 60.0f, 0.3f, { 0.0f, 90.0f, -40.0f }, { 0.0f, 60.0f, -160.0f } },
+ { 0x04, 0x01, 0x2121, 10, 0, 60.0f, 0.2f, { 0.0f, -10.0f, 10.0f }, { 0.0f, 10.0f, -80.0f } },
+ { 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+};
+
+static OnePointCsFull D_801234FC[5] = {
+ { 0x01, 0x05, 0x0441, 10, 0, 70.0f, 1.0f, { 0.0f, -10.0f, 20.0f }, { 0.0f, 0.0f, 120.0f } },
+ { 0x03, 0xFF, 0x4141, 30, 0, 50.0f, 0.1f, { 0.0f, -10.0f, 20.0f }, { 0.0f, 10.0f, 80.0f } },
+ { 0x10, 0x01, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+ { 0x82, 0xFF, 0x2121, 10, 0, 60.0f, 0.9f, { 0.0f, -10.0f, 0.0f }, { 0.0f, 10.0f, -80.0f } },
+ { 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+};
+
+static OnePointCsFull D_801235C4[5] = {
+ { 0x0F, 0x01, 0x4141, 1, 0, 50.0f, 1.0f, { 0.0f, -10.0f, 20.0f }, { 0.0f, 10.0f, 60.0f } },
+ { 0x83, 0xFF, 0x0441, 39, 0, 70.0f, 0.1f, { 0.0f, -10.0f, 20.0f }, { 0.0f, 0.0f, 100.0f } },
+ { 0x10, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+ { 0x82, 0xFF, 0x2121, 15, 0, 60.0f, 0.9f, { 0.0f, -10.0f, 0.0f }, { 0.0f, 10.0f, -80.0f } },
+ { 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+};
+
+static OnePointCsFull D_8012368C[4] = {
+ { 0x0F, 0xFF, 0x0101, 10, 0, 60.0f, 1.0f, { -1110.0f, -180.0f, -840.0f }, { -985.0f, -220.0f, -840.0f } },
+ { 0x02, 0xFF, 0x0101, 70, -45, 75.0f, 1.0f, { -1060.0f, -160.0f, -840.0f }, { -1005.0f, -230.0f, -840.0f } },
+ { 0x0F, 0xFF, 0x0000, 10, -45, 75.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+ { 0x0F, 0xFF, 0x0101, 180, 9, 80.0f, 1.0f, { -1205.0f, -175.0f, -840.0f }, { -1305.0f, -230.0f, -828.0f } },
+};
+
+static OnePointCsFull D_8012372C[4] = {
+ { 0x0F, 0xFF, 0x0142, 10, 0, 70.0f, 1.0f, { 0.0f, 80.0f, 0.0f }, { -1650.0f, 200.0f, -2920.0f } },
+ { 0x02, 0xFF, 0x0142, 110, -2, 50.0f, 0.5f, { 0.0f, 150.0f, 0.0f }, { -1320.0f, 170.0f, -2900.0f } },
+ { 0x0B, 0xFF, 0x4242, 100, 2, 70.0f, 0.1f, { 0.0f, 150.0f, 50.0f }, { -1.0f, -1.0f, -1.0f } },
+ { 0x03, 0xFF, 0x4242, 60, 2, 45.0f, 0.01f, { 0.0f, 150.0f, 50.0f }, { 0.0f, 200.0f, -80.0f } },
+};
+
+static OnePointCsFull D_801237CC[5] = {
+ { 0x8F, 0xFF, 0x4242, 20, 0, 50.0f, 1.0f, { 0.0f, 50.0f, -10.0f }, { 0.0f, 0.0f, 100.0f } },
+ { 0x0A, 0xFF, 0x0101, 80, 0, 75.0f, 1.0f, { 2900.0f, 1300.0f, 530.0f }, { 2800.0f, 1190.0f, 540.0f } },
+ { 0x0F, 0xFF, 0x0000, 10, 0, 75.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+ { 0x02, 0xFF, 0x0101, 55, 0, 75.0f, 1.0f, { 2900.0f, 1300.0f, 530.0f }, { 1500.0f, 1415.0f, 650.0f } },
+ { 0x0F, 0xFF, 0x0000, 100, -45, 75.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+};
+
+static OnePointCsFull D_80123894[3] = {
+ { 0x0F, 0xFF, 0x0101, 60, 0, 60.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } },
+ { 0x0F, 0xFF, 0x4242, 30, 0, 50.0f, 1.0f, { 0.0f, 28.0f, 0.0f }, { 0.0f, 20.0f, 40.0f } },
+ { 0x0D, 0xFF, 0x0000, 120, 0, 180.0f, 0.4f, { 0.0f, -5.0f, 0.0f }, { 0.0f, 2.0f, 40.0f } },
+};
+
+static OnePointCsFull D_8012390C[2] = {
+ { 0x0F, 0xFF, 0x0101, 30, 0, 60.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } },
+ { 0x0F, 0xFF, 0x4242, 180, 0, 60.0f, 1.0f, { 0.0f, 78.0f, 0.0f }, { 0.0f, 78.0f, 200.0f } },
+};
+
+static OnePointCsFull D_8012395C[3] = {
+ { 0x0F, 0xFF, 0x0101, 60, 0, 60.0f, 1.0f, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } },
+ { 0x0F, 0xFF, 0x4242, 30, 0, 50.0f, 1.0f, { 0.0f, 28.0f, 0.0f }, { 0.0f, 20.0f, -45.0f } },
+ { 0x0D, 0xFF, 0x0000, 120, 0, 180.0f, 0.4f, { 0.0f, -5.0f, 0.0f }, { 0.0f, 2.0f, 45.0f } },
+};
+
+static OnePointCsFull D_801239D4[3] = {
+ { 0x0F, 0xFF, 0x4242, 5, 0, 60.0f, 1.0f, { 0.0f, 20.0f, 0.0f }, { 0.0f, 40.0f, -120.0f } },
+ { 0x09, 0xFF, 0x4242, 0, 0, 60.0f, 1.0f, { 0.0f, 20.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } },
+ { 0x12, 0xFF, 0x0000, 1, 0, 60.0f, 1.0f, { -1.0f, -1.0f, -1.0f }, { -1.0f, -1.0f, -1.0f } },
+};
diff --git a/src/code/z_parameter.c b/src/code/z_parameter.c
index c16001cf1..634009a4e 100644
--- a/src/code/z_parameter.c
+++ b/src/code/z_parameter.c
@@ -2082,7 +2082,7 @@ void Interface_SetNaviCall(GlobalContext* globalCtx, u16 naviCallState) {
InterfaceContext* interfaceCtx = &globalCtx->interfaceCtx;
if (((naviCallState == 0x1D) || (naviCallState == 0x1E)) && !interfaceCtx->naviCalling &&
- (globalCtx->csCtx.state == 0)) {
+ (globalCtx->csCtx.state == CS_STATE_IDLE)) {
// clang-format off
if (naviCallState == 0x1E) { Audio_PlaySoundGeneral(NA_SE_VO_NAVY_CALL, &D_801333D4, 4,
&D_801333E0, &D_801333E0, &D_801333E8); }
@@ -2722,7 +2722,7 @@ void Interface_DrawItemButtons(GlobalContext* globalCtx) {
}
if (interfaceCtx->naviCalling && (globalCtx->pauseCtx.state == 0) && (globalCtx->pauseCtx.flag == 0) &&
- (globalCtx->csCtx.state == 0)) {
+ (globalCtx->csCtx.state == CS_STATE_IDLE)) {
if (!sCUpInvisible) {
// C-Up Button Texture, Color & Label (Navi Text)
gDPPipeSync(OVERLAY_DISP++);
@@ -4058,7 +4058,8 @@ void Interface_Update(GlobalContext* globalCtx) {
if ((globalCtx->pauseCtx.state == 0) && (globalCtx->pauseCtx.flag == 0) && (msgCtx->msgMode == 0) &&
(globalCtx->sceneLoadFlag == 0) && (globalCtx->gameOverCtx.state == GAMEOVER_INACTIVE) &&
- (globalCtx->transitionMode == 0) && ((globalCtx->csCtx.state == 0) || !Player_InCsMode(globalCtx))) {
+ (globalCtx->transitionMode == 0) &&
+ ((globalCtx->csCtx.state == CS_STATE_IDLE) || !Player_InCsMode(globalCtx))) {
if ((gSaveContext.magicAcquired != 0) && (gSaveContext.magicLevel == 0)) {
gSaveContext.magicLevel = gSaveContext.doubleMagic + 1;
gSaveContext.unk_13F0 = 8;
diff --git a/src/code/z_play.c b/src/code/z_play.c
index 513f754bb..23ed6257b 100644
--- a/src/code/z_play.c
+++ b/src/code/z_play.c
@@ -219,12 +219,12 @@ void Gameplay_Init(GameState* thisx) {
for (i = 0; i < 3; i++) {
Camera_Init(&globalCtx->subCameras[i], &globalCtx->view, &globalCtx->colCtx, globalCtx);
- Camera_ChangeStatus(&globalCtx->subCameras[i], 0x100);
+ Camera_ChangeStatus(&globalCtx->subCameras[i], CAM_STAT_UNK100);
}
- globalCtx->cameraPtrs[0] = &globalCtx->mainCamera;
- globalCtx->cameraPtrs[0]->uid = 0;
- globalCtx->activeCamera = 0;
+ globalCtx->cameraPtrs[MAIN_CAM] = &globalCtx->mainCamera;
+ globalCtx->cameraPtrs[MAIN_CAM]->uid = 0;
+ globalCtx->activeCamera = MAIN_CAM;
func_8005AC48(&globalCtx->mainCamera, 0xFF);
Sram_Init(globalCtx, &globalCtx->sramCtx);
func_80112098(globalCtx);
@@ -428,7 +428,7 @@ void Gameplay_Update(GlobalContext* globalCtx) {
for (i = 0; i < gObjectTableSize; i++) {
s32 size = gObjectTable[i].vromEnd - gObjectTable[i].vromStart;
osSyncPrintf("%08x-%08x %08x(%8.3fKB)\n", gObjectTable[i].vromStart, gObjectTable[i].vromEnd, size,
- size * 0.0009765625f);
+ size / 1024.0f);
}
osSyncPrintf("\n");
}
@@ -997,7 +997,7 @@ skip:
LOG_NUM("1", 1, "../z_play.c", 3801);
}
- if ((sp80 == 0) || (gDbgCamEnabled != 0)) {
+ if ((sp80 == 0) || (gDbgCamEnabled)) {
s32 pad3[5];
s32 i;
@@ -1007,7 +1007,7 @@ skip:
LOG_NUM("1", 1, "../z_play.c", 3806);
}
- for (i = 0; i < 4; i++) {
+ for (i = 0; i < NUM_CAMS; i++) {
if ((i != globalCtx->nextCamera) && (globalCtx->cameraPtrs[i] != NULL)) {
if (1 && HREG(63)) {
LOG_NUM("1", 1, "../z_play.c", 3809);
@@ -1104,6 +1104,7 @@ void Gameplay_Draw(GlobalContext* globalCtx) {
if ((HREG(80) != 10) || (HREG(92) != 0)) {
Gfx* gfxP;
Gfx* sp1CC = POLY_OPA_DISP;
+
gfxP = Graph_GfxPlusOne(sp1CC);
gSPDisplayList(OVERLAY_DISP++, gfxP);
@@ -1134,6 +1135,7 @@ void Gameplay_Draw(GlobalContext* globalCtx) {
if (gTrnsnUnkState == 3) {
Gfx* sp88 = POLY_OPA_DISP;
+
TransitionUnk_Draw(&sTrnsnUnk, &sp88);
POLY_OPA_DISP = sp88;
goto Gameplay_Draw_DrawOverlayElements;
@@ -1151,23 +1153,23 @@ void Gameplay_Draw(GlobalContext* globalCtx) {
if (R_PAUSE_MENU_MODE == 3) {
Gfx* sp84 = POLY_OPA_DISP;
+
func_800C24BC(&globalCtx->preRenderCtx, &sp84);
POLY_OPA_DISP = sp84;
goto Gameplay_Draw_DrawOverlayElements;
} else {
s32 sp80;
+
if ((HREG(80) != 10) || (HREG(83) != 0)) {
- if (globalCtx->skyboxId) {
- if ((globalCtx->skyboxId != 0x1D) && !globalCtx->envCtx.skyDisabled) {
- if ((globalCtx->skyboxId == 1) || (globalCtx->skyboxId == 5)) {
- func_8006FC88(globalCtx->skyboxId, &globalCtx->envCtx, &globalCtx->skyboxCtx);
- SkyboxDraw_Draw(&globalCtx->skyboxCtx, gfxCtx, globalCtx->skyboxId,
- globalCtx->envCtx.unk_13, globalCtx->view.eye.x, globalCtx->view.eye.y,
- globalCtx->view.eye.z);
- } else if (globalCtx->skyboxCtx.unk_140 == 0) {
- SkyboxDraw_Draw(&globalCtx->skyboxCtx, gfxCtx, globalCtx->skyboxId, 0,
- globalCtx->view.eye.x, globalCtx->view.eye.y, globalCtx->view.eye.z);
- }
+ if (globalCtx->skyboxId && (globalCtx->skyboxId != 0x1D) && !globalCtx->envCtx.skyDisabled) {
+ if ((globalCtx->skyboxId == 1) || (globalCtx->skyboxId == 5)) {
+ func_8006FC88(globalCtx->skyboxId, &globalCtx->envCtx, &globalCtx->skyboxCtx);
+ SkyboxDraw_Draw(&globalCtx->skyboxCtx, gfxCtx, globalCtx->skyboxId,
+ globalCtx->envCtx.unk_13, globalCtx->view.eye.x, globalCtx->view.eye.y,
+ globalCtx->view.eye.z);
+ } else if (globalCtx->skyboxCtx.unk_140 == 0) {
+ SkyboxDraw_Draw(&globalCtx->skyboxCtx, gfxCtx, globalCtx->skyboxId, 0,
+ globalCtx->view.eye.x, globalCtx->view.eye.y, globalCtx->view.eye.z);
}
}
}
@@ -1207,14 +1209,13 @@ void Gameplay_Draw(GlobalContext* globalCtx) {
}
if ((HREG(80) != 10) || (HREG(83) != 0)) {
- if (globalCtx->skyboxCtx.unk_140 != 0) {
- if (ACTIVE_CAM->setting != 0x19) {
- Vec3f sp74;
- Camera_GetSkyboxOffset(&sp74, ACTIVE_CAM);
- SkyboxDraw_Draw(&globalCtx->skyboxCtx, gfxCtx, globalCtx->skyboxId, 0,
- globalCtx->view.eye.x + sp74.x, globalCtx->view.eye.y + sp74.y,
- globalCtx->view.eye.z + sp74.z);
- }
+ if ((globalCtx->skyboxCtx.unk_140 != 0) && (ACTIVE_CAM->setting != CAM_SET_PREREND0)) {
+ Vec3f sp74;
+
+ Camera_GetSkyboxOffset(&sp74, ACTIVE_CAM);
+ SkyboxDraw_Draw(&globalCtx->skyboxCtx, gfxCtx, globalCtx->skyboxId, 0,
+ globalCtx->view.eye.x + sp74.x, globalCtx->view.eye.y + sp74.y,
+ globalCtx->view.eye.z + sp74.z);
}
}
@@ -1268,6 +1269,7 @@ void Gameplay_Draw(GlobalContext* globalCtx) {
if ((R_PAUSE_MENU_MODE == 1) || (gTrnsnUnkState == 1)) {
Gfx* sp70 = OVERLAY_DISP;
s32 pad[4];
+
globalCtx->preRenderCtx.fbuf = gfxCtx->curFrameBuffer;
globalCtx->preRenderCtx.fbufSave = (u16*)gZBuffer;
func_800C1F20(&globalCtx->preRenderCtx, &sp70);
@@ -1351,7 +1353,7 @@ void Gameplay_Main(GameState* thisx) {
// original name: "Game_play_demo_mode_check"
s32 Gameplay_InCsMode(GlobalContext* globalCtx) {
- return (globalCtx->csCtx.state != 0) || Player_InCsMode(globalCtx);
+ return (globalCtx->csCtx.state != CS_STATE_IDLE) || Player_InCsMode(globalCtx);
}
f32 func_800BFCB8(GlobalContext* globalCtx, MtxF* mf, Vec3f* vec) {
@@ -1463,7 +1465,7 @@ void Gameplay_SpawnScene(GlobalContext* globalCtx, s32 sceneNum, s32 spawn) {
globalCtx->sceneNum = sceneNum;
globalCtx->sceneConfig = scene->config;
- osSyncPrintf("\nSCENE SIZE %fK\n", (scene->sceneFile.vromEnd - scene->sceneFile.vromStart) * 0.0009765625f);
+ osSyncPrintf("\nSCENE SIZE %fK\n", (scene->sceneFile.vromEnd - scene->sceneFile.vromStart) / 1024.0f);
globalCtx->sceneSegment = Gameplay_LoadFile(globalCtx, &scene->sceneFile);
scene->unk_13 = 0;
@@ -1474,7 +1476,7 @@ void Gameplay_SpawnScene(GlobalContext* globalCtx, s32 sceneNum, s32 spawn) {
Gameplay_InitScene(globalCtx, spawn);
- osSyncPrintf("ROOM SIZE=%fK\n", func_80096FE8(globalCtx, &globalCtx->roomCtx) * 0.0009765625f);
+ osSyncPrintf("ROOM SIZE=%fK\n", func_80096FE8(globalCtx, &globalCtx->roomCtx) / 1024.0f);
}
void func_800C016C(GlobalContext* globalCtx, Vec3f* src, Vec3f* dest) {
@@ -1493,22 +1495,22 @@ void func_800C016C(GlobalContext* globalCtx, Vec3f* src, Vec3f* dest) {
s16 Gameplay_CreateSubCamera(GlobalContext* globalCtx) {
s16 i;
- for (i = 1; i < 4; i++) {
+ for (i = SUBCAM_FIRST; i < NUM_CAMS; i++) {
if (globalCtx->cameraPtrs[i] == NULL) {
break;
}
}
- if (i == 4) {
+ if (i == NUM_CAMS) {
osSyncPrintf(VT_COL(RED, WHITE) "camera control: error: fulled sub camera system area\n" VT_RST);
- return -1;
+ return SUBCAM_NONE;
}
osSyncPrintf("camera control: " VT_BGCOL(CYAN) " " VT_COL(WHITE, BLUE) " create new sub camera [%d] " VT_BGCOL(
CYAN) " " VT_RST "\n",
i);
- globalCtx->cameraPtrs[i] = &globalCtx->subCameras[i - 1];
+ globalCtx->cameraPtrs[i] = &globalCtx->subCameras[i - SUBCAM_FIRST];
Camera_Init(globalCtx->cameraPtrs[i], &globalCtx->view, &globalCtx->colCtx, globalCtx);
globalCtx->cameraPtrs[i]->thisIdx = i;
@@ -1520,9 +1522,9 @@ s16 Gameplay_GetActiveCamId(GlobalContext* globalCtx) {
}
s16 Gameplay_ChangeCameraStatus(GlobalContext* globalCtx, s16 camId, s16 status) {
- s16 camIdx = (camId == -1) ? globalCtx->activeCamera : camId;
+ s16 camIdx = (camId == SUBCAM_ACTIVE) ? globalCtx->activeCamera : camId;
- if (status == 7) {
+ if (status == CAM_STAT_ACTIVE) {
globalCtx->activeCamera = camIdx;
}
@@ -1530,14 +1532,14 @@ s16 Gameplay_ChangeCameraStatus(GlobalContext* globalCtx, s16 camId, s16 status)
}
void Gameplay_ClearCamera(GlobalContext* globalCtx, s16 camId) {
- s16 camIdx = (camId == -1) ? globalCtx->activeCamera : camId;
+ s16 camIdx = (camId == SUBCAM_ACTIVE) ? globalCtx->activeCamera : camId;
- if (camIdx == 0) {
+ if (camIdx == MAIN_CAM) {
osSyncPrintf(VT_COL(RED, WHITE) "camera control: error: never clear camera !!\n" VT_RST);
}
if (globalCtx->cameraPtrs[camIdx] != NULL) {
- Camera_ChangeStatus(globalCtx->cameraPtrs[camIdx], 0x100);
+ Camera_ChangeStatus(globalCtx->cameraPtrs[camIdx], CAM_STAT_UNK100);
globalCtx->cameraPtrs[camIdx] = NULL;
osSyncPrintf("camera control: " VT_BGCOL(CYAN) " " VT_COL(WHITE, BLUE) " clear sub camera [%d] " VT_BGCOL(
CYAN) " " VT_RST "\n",
@@ -1550,24 +1552,24 @@ void Gameplay_ClearCamera(GlobalContext* globalCtx, s16 camId) {
void Gameplay_ClearAllSubCameras(GlobalContext* globalCtx) {
s16 i;
- for (i = 1; i < 4; i++) {
+ for (i = SUBCAM_FIRST; i < NUM_CAMS; i++) {
if (globalCtx->cameraPtrs[i] != NULL) {
Gameplay_ClearCamera(globalCtx, i);
}
}
- globalCtx->activeCamera = 0;
+ globalCtx->activeCamera = MAIN_CAM;
}
Camera* Gameplay_GetCamera(GlobalContext* globalCtx, s16 camId) {
- s16 camIdx = (camId == -1) ? globalCtx->activeCamera : camId;
+ s16 camIdx = (camId == SUBCAM_ACTIVE) ? globalCtx->activeCamera : camId;
return globalCtx->cameraPtrs[camIdx];
}
s32 Gameplay_CameraSetAtEye(GlobalContext* globalCtx, s16 camId, Vec3f* at, Vec3f* eye) {
s32 ret = 0;
- s16 camIdx = (camId == -1) ? globalCtx->activeCamera : camId;
+ s16 camIdx = (camId == SUBCAM_ACTIVE) ? globalCtx->activeCamera : camId;
Camera* camera = globalCtx->cameraPtrs[camIdx];
Player* player;
@@ -1593,7 +1595,7 @@ s32 Gameplay_CameraSetAtEye(GlobalContext* globalCtx, s16 camId, Vec3f* at, Vec3
s32 Gameplay_CameraSetAtEyeUp(GlobalContext* globalCtx, s16 camId, Vec3f* at, Vec3f* eye, Vec3f* up) {
s32 ret = 0;
- s16 camIdx = (camId == -1) ? globalCtx->activeCamera : camId;
+ s16 camIdx = (camId == SUBCAM_ACTIVE) ? globalCtx->activeCamera : camId;
Camera* camera = globalCtx->cameraPtrs[camIdx];
Player* player;
@@ -1626,25 +1628,24 @@ s32 Gameplay_CameraSetFov(GlobalContext* globalCtx, s16 camId, f32 fov) {
}
s32 Gameplay_SetCameraRoll(GlobalContext* globalCtx, s16 camId, s16 roll) {
- s16 camIdx = (camId == -1) ? globalCtx->activeCamera : camId;
- Camera* camera;
+ s16 camIdx = (camId == SUBCAM_ACTIVE) ? globalCtx->activeCamera : camId;
+ Camera* camera = globalCtx->cameraPtrs[camIdx];
- camera = globalCtx->cameraPtrs[camIdx];
camera->roll = roll;
return 1;
}
void Gameplay_CopyCamera(GlobalContext* globalCtx, s16 camId1, s16 camId2) {
- s16 camIdx2 = (camId2 == -1) ? globalCtx->activeCamera : camId2;
- s16 camIdx1 = (camId1 == -1) ? globalCtx->activeCamera : camId1;
+ s16 camIdx2 = (camId2 == SUBCAM_ACTIVE) ? globalCtx->activeCamera : camId2;
+ s16 camIdx1 = (camId1 == SUBCAM_ACTIVE) ? globalCtx->activeCamera : camId1;
Camera_Copy(globalCtx->cameraPtrs[camIdx1], globalCtx->cameraPtrs[camIdx2]);
}
s32 func_800C0808(GlobalContext* globalCtx, s16 camId, Player* player, s16 setting) {
Camera* camera;
- s16 camIdx = (camId == -1) ? globalCtx->activeCamera : camId;
+ s16 camIdx = (camId == SUBCAM_ACTIVE) ? globalCtx->activeCamera : camId;
camera = globalCtx->cameraPtrs[camIdx];
Camera_InitPlayerSettings(camera, player);
@@ -1656,12 +1657,12 @@ s32 Gameplay_CameraChangeSetting(GlobalContext* globalCtx, s16 camId, s16 settin
}
void func_800C08AC(GlobalContext* globalCtx, s16 camId, s16 arg2) {
- s16 camIdx = (camId == -1) ? globalCtx->activeCamera : camId;
+ s16 camIdx = (camId == SUBCAM_ACTIVE) ? globalCtx->activeCamera : camId;
s16 i;
Gameplay_ClearCamera(globalCtx, camIdx);
- for (i = 1; i < 4; i++) {
+ for (i = SUBCAM_FIRST; i < NUM_CAMS; i++) {
if (globalCtx->cameraPtrs[i] != NULL) {
osSyncPrintf(
VT_COL(RED, WHITE) "camera control: error: return to main, other camera left. %d cleared!!\n" VT_RST,
@@ -1671,10 +1672,10 @@ void func_800C08AC(GlobalContext* globalCtx, s16 camId, s16 arg2) {
}
if (arg2 <= 0) {
- Gameplay_ChangeCameraStatus(globalCtx, 0, CAM_STAT_ACTIVE);
- globalCtx->cameraPtrs[0]->childCamIdx = globalCtx->cameraPtrs[0]->parentCamIdx = 0;
+ Gameplay_ChangeCameraStatus(globalCtx, MAIN_CAM, CAM_STAT_ACTIVE);
+ globalCtx->cameraPtrs[MAIN_CAM]->childCamIdx = globalCtx->cameraPtrs[MAIN_CAM]->parentCamIdx = SUBCAM_FREE;
} else {
- func_800800F8(globalCtx, 1020, arg2, NULL, 0);
+ OnePointCutscene_Init(globalCtx, 1020, arg2, NULL, MAIN_CAM);
}
}
@@ -1695,7 +1696,7 @@ s16 func_800C09D8(GlobalContext* globalCtx, s16 camId, s16 arg2) {
return 0;
} else if (camera->uid != arg2) {
return 0;
- } else if (camera->status != 7) {
+ } else if (camera->status != CAM_STAT_ACTIVE) {
return 2;
} else {
return 1;
diff --git a/src/code/z_player_lib.c b/src/code/z_player_lib.c
index 6cb9bb436..a337f458e 100644
--- a/src/code/z_player_lib.c
+++ b/src/code/z_player_lib.c
@@ -693,8 +693,8 @@ Vec3f D_80126038[] = {
};
f32 D_80126050[] = { 1265.0f, 826.0f };
-f32 D_80126058[] = { 170.0415955f, 48.30249786f };
-f32 D_80126060[] = { 10.019104f, -19.92510223f };
+f32 D_80126058[] = { SQ(13.04f), SQ(6.95f) };
+f32 D_80126060[] = { 10.019104f, -19.925102f };
f32 D_80126068[] = { 5.0f, 3.0f };
Vec3f D_80126070 = { 0.0f, -300.0f, 0.0f };
@@ -705,7 +705,7 @@ void func_8008F87C(GlobalContext* globalCtx, Player* this, SkelAnime* skelAnime,
Vec3f sp98;
Vec3f footprintPos;
CollisionPoly* sp88;
- UNK_TYPE sp84;
+ s32 sp84;
f32 sp80;
f32 sp7C;
f32 sp78;
@@ -768,14 +768,14 @@ void func_8008F87C(GlobalContext* globalCtx, Player* this, SkelAnime* skelAnime,
sp50 = Math_FAtan2F(sp58, sp60);
- temp1 = (M_PI - (Math_FAtan2F(sp5C, sp58) + ((M_PI / 2) - sp50))) * 10430.378f;
+ temp1 = (M_PI - (Math_FAtan2F(sp5C, sp58) + ((M_PI / 2) - sp50))) * (0x8000 / M_PI);
temp1 = temp1 - skelAnime->jointTable[shinLimbIndex].z;
if ((s16)(ABS(skelAnime->jointTable[shinLimbIndex].x) + ABS(skelAnime->jointTable[shinLimbIndex].y)) < 0) {
temp1 += 0x8000;
}
- temp2 = (sp50 - sp54) * 10430.378f;
+ temp2 = (sp50 - sp54) * (0x8000 / M_PI);
rot->z -= temp2;
skelAnime->jointTable[thighLimbIndex].z = skelAnime->jointTable[thighLimbIndex].z - temp2;
@@ -815,7 +815,7 @@ s32 func_8008FCC8(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* p
if (this->unk_6C2 != 0) {
Matrix_Translate(pos->x, ((Math_CosS(this->unk_6C2) - 1.0f) * 200.0f) + pos->y, pos->z, MTXMODE_APPLY);
- Matrix_RotateX(this->unk_6C2 * (M_PI / 32768), MTXMODE_APPLY);
+ Matrix_RotateX(this->unk_6C2 * (M_PI / 0x8000), MTXMODE_APPLY);
Matrix_RotateRPY(rot->x, rot->y, rot->z, MTXMODE_APPLY);
pos->x = pos->y = pos->z = 0.0f;
rot->x = rot->y = rot->z = 0;
@@ -831,17 +831,17 @@ s32 func_8008FCC8(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* p
rot->z += this->unk_6B6;
} else if (limbIndex == PLAYER_LIMB_UPPER) {
if (this->unk_6B0 != 0) {
- Matrix_RotateZ(0.10546118f, MTXMODE_APPLY);
- Matrix_RotateY(this->unk_6B0 * (M_PI / 32768), MTXMODE_APPLY);
+ Matrix_RotateZ(0x44C * (M_PI / 0x8000), MTXMODE_APPLY);
+ Matrix_RotateY(this->unk_6B0 * (M_PI / 0x8000), MTXMODE_APPLY);
}
if (this->unk_6BE != 0) {
- Matrix_RotateY(this->unk_6BE * (M_PI / 32768), MTXMODE_APPLY);
+ Matrix_RotateY(this->unk_6BE * (M_PI / 0x8000), MTXMODE_APPLY);
}
if (this->unk_6BC != 0) {
- Matrix_RotateX(this->unk_6BC * (M_PI / 32768), MTXMODE_APPLY);
+ Matrix_RotateX(this->unk_6BC * (M_PI / 0x8000), MTXMODE_APPLY);
}
if (this->unk_6C0 != 0) {
- Matrix_RotateZ(this->unk_6C0 * (M_PI / 32768), MTXMODE_APPLY);
+ Matrix_RotateZ(this->unk_6C0 * (M_PI / 0x8000), MTXMODE_APPLY);
}
} else if (limbIndex == PLAYER_LIMB_L_THIGH) {
func_8008F87C(globalCtx, this, &this->skelAnime, pos, rot, PLAYER_LIMB_L_THIGH, PLAYER_LIMB_L_SHIN,
diff --git a/src/code/z_quake.c b/src/code/z_quake.c
index f22fc7023..d3f16f025 100644
--- a/src/code/z_quake.c
+++ b/src/code/z_quake.c
@@ -337,7 +337,7 @@ s16 Quake_Calc(Camera* camera, QuakeCamCalc* camData) {
for (idx = 0; idx < ARRAY_COUNT(sQuakeRequest); idx++) {
req = &sQuakeRequest[idx];
if (req->callbackIdx != 0) {
- if (globalCtx->cameraPtrs[req->camPtrIdx] == 0) {
+ if (globalCtx->cameraPtrs[req->camPtrIdx] == NULL) {
osSyncPrintf(VT_COL(YELLOW, BLACK) "quake: stopped! 'coz camera [%d] killed!!\n" VT_RST,
req->camPtrIdx);
Quake_Remove(req);
diff --git a/src/code/z_room.c b/src/code/z_room.c
index ee49f50c8..6d0d6c4b6 100644
--- a/src/code/z_room.c
+++ b/src/code/z_room.c
@@ -332,7 +332,7 @@ void func_80096680(GlobalContext* globalCtx, Room* room, u32 flags) {
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_room.c", 628);
camera = ACTIVE_CAM;
- sp9C = (camera->setting == 25);
+ sp9C = (camera->setting == CAM_SET_PREREND0);
polygon1 = &room->mesh->polygon1;
polygonDlist = SEGMENTED_TO_VIRTUAL(polygon1->dlist);
sp98 = (flags & 1) && sp9C && polygon1->single.source && !(SREG(25) & 1);
@@ -427,7 +427,7 @@ void func_80096B6C(GlobalContext* globalCtx, Room* room, u32 flags) {
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_room.c", 752);
camera = ACTIVE_CAM;
- sp98 = (camera->setting == 25);
+ sp98 = (camera->setting == CAM_SET_PREREND0);
polygon1 = &room->mesh->polygon1;
polygonDlist = SEGMENTED_TO_VIRTUAL(polygon1->dlist);
bgImage = func_80096A74(polygon1, globalCtx);
@@ -533,7 +533,7 @@ u32 func_80096FE8(GlobalContext* globalCtx, RoomContext* roomCtx) {
osSyncPrintf(VT_FGCOL(YELLOW));
// Translates to: "ROOM BUFFER SIZE=%08x(%5.1fK)"
- osSyncPrintf("部屋バッファサイズ=%08x(%5.1fK)\n", maxRoomSize, maxRoomSize * 0.0009765625f);
+ osSyncPrintf("部屋バッファサイズ=%08x(%5.1fK)\n", maxRoomSize, maxRoomSize / 1024.0f);
roomCtx->bufPtrs[0] = GameState_Alloc(&globalCtx->state, maxRoomSize, "../z_room.c", 946);
// Translates to: "ROOM BUFFER INITIAL POINTER=%08x"
osSyncPrintf("部屋バッファ開始ポインタ=%08x\n", roomCtx->bufPtrs[0]);
diff --git a/src/code/z_scene.c b/src/code/z_scene.c
index 4fecad4cf..0903ef29a 100644
--- a/src/code/z_scene.c
+++ b/src/code/z_scene.c
@@ -364,7 +364,7 @@ void func_80098D80(GlobalContext* globalCtx, SceneCmd* cmd) {
if ((cmd->timeSettings.hour != 0xFF) && (cmd->timeSettings.min != 0xFF)) {
gSaveContext.environmentTime = gSaveContext.dayTime =
- ((cmd->timeSettings.hour + (cmd->timeSettings.min / 60.0f)) * 60.0f) / 0.021972656f;
+ ((cmd->timeSettings.hour + (cmd->timeSettings.min / 60.0f)) * 60.0f) / (360.0f / 0x4000);
}
if (cmd->timeSettings.unk_06 != 0xFF) {
diff --git a/src/code/z_scene_table.c b/src/code/z_scene_table.c
index df06db515..ea81553ea 100644
--- a/src/code/z_scene_table.c
+++ b/src/code/z_scene_table.c
@@ -2332,8 +2332,9 @@ void func_8009FE58(GlobalContext* globalCtx) {
D_8012A3A0 += 1820;
temp = 0.020000001f;
- func_800AA76C(&globalCtx->view, 0.00009587531f * temp * Math_CosS(D_8012A39C),
- 0.00009587531f * temp * Math_SinS(D_8012A39C), 0.00009587531f * temp * Math_SinS(D_8012A3A0));
+ func_800AA76C(&globalCtx->view, ((360.00018f / 65535.0f) * (M_PI / 180.0f)) * temp * Math_CosS(D_8012A39C),
+ ((360.00018f / 65535.0f) * (M_PI / 180.0f)) * temp * Math_SinS(D_8012A39C),
+ ((360.00018f / 65535.0f) * (M_PI / 180.0f)) * temp * Math_SinS(D_8012A3A0));
func_800AA78C(&globalCtx->view, 1.f + (0.79999995f * temp * Math_SinS(D_8012A3A0)),
1.f + (0.39999998f * temp * Math_CosS(D_8012A3A0)), 1.f + (1 * temp * Math_CosS(D_8012A39C)));
func_800AA7AC(&globalCtx->view, 0.95f);
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 618c5276e..f560bc547 100644
--- a/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c
+++ b/src/overlays/actors/ovl_Arms_Hook/z_arms_hook.c
@@ -85,13 +85,10 @@ void ArmsHook_Destroy(Actor* thisx, GlobalContext* globalCtx) {
}
void ArmsHook_Wait(ArmsHook* this, GlobalContext* globalCtx) {
- Player* player;
- s32 length;
-
if (this->actor.parent == NULL) {
- player = PLAYER;
+ Player* player = PLAYER;
// get correct timer length for hookshot or longshot
- length = (player->heldItemActionParam == PLAYER_AP_HOOKSHOT) ? 13 : 26;
+ s32 length = (player->heldItemActionParam == PLAYER_AP_HOOKSHOT) ? 13 : 26;
ArmsHook_SetupAction(this, ArmsHook_Shoot);
func_8002D9A4(&this->actor, 20.0f);
@@ -125,6 +122,7 @@ void ArmsHook_DetachHookFromActor(ArmsHook* this) {
s32 ArmsHook_CheckForCancel(ArmsHook* this) {
Player* player = (Player*)this->actor.parent;
+
if (Player_HoldsHookshot(player)) {
if ((player->itemActionParam != player->heldItemActionParam) || ((player->actor.flags & 0x100)) ||
((player->stateFlags1 & 0x4000080))) {
@@ -174,40 +172,33 @@ void ArmsHook_Shoot(ArmsHook* this, GlobalContext* globalCtx) {
func_8002F8F0(&player->actor, NA_SE_IT_HOOKSHOT_CHAIN - SFX_FLAG);
ArmsHook_CheckForCancel(this);
- if (this->timer != 0) {
- if ((this->collider.base.atFlags & AT_HIT) && (this->collider.info.atHitInfo->elemType != ELEMTYPE_UNK4)) {
- touchedActor = this->collider.base.at;
- if ((touchedActor->update != NULL) && (touchedActor->flags & 0x600)) {
- if (this->collider.info.atHitInfo->bumperFlags & BUMP_HOOKABLE) {
- ArmsHook_AttachHookToActor(this, touchedActor);
- if ((touchedActor->flags & 0x400) == 0x400) {
- func_80865044(this);
- }
+ if ((this->timer != 0) && (this->collider.base.atFlags & AT_HIT) &&
+ (this->collider.info.atHitInfo->elemType != ELEMTYPE_UNK4)) {
+ touchedActor = this->collider.base.at;
+ if ((touchedActor->update != NULL) && (touchedActor->flags & 0x600)) {
+ if (this->collider.info.atHitInfo->bumperFlags & BUMP_HOOKABLE) {
+ ArmsHook_AttachHookToActor(this, touchedActor);
+ if ((touchedActor->flags & 0x400) == 0x400) {
+ func_80865044(this);
}
}
- this->timer = 0;
- Audio_PlaySoundGeneral(NA_SE_IT_ARROW_STICK_CRE, &this->actor.projectedPos, 4, &D_801333E0, &D_801333E0,
- &D_801333E8);
- return;
}
- }
-
- if (DECR(this->timer) == 0) {
+ this->timer = 0;
+ Audio_PlaySoundGeneral(NA_SE_IT_ARROW_STICK_CRE, &this->actor.projectedPos, 4, &D_801333E0, &D_801333E0,
+ &D_801333E8);
+ } else if (DECR(this->timer) == 0) {
grabbed = this->grabbed;
if (grabbed != NULL) {
if ((grabbed->update == NULL) || (grabbed->flags & 0x2000) != 0x2000) {
grabbed = NULL;
this->grabbed = NULL;
- } else {
- if (this->actor.child != NULL) {
- sp94 = Actor_WorldDistXYZToActor(&this->actor, grabbed);
- sp90 =
- sqrtf(SQ(this->grabbedDistDiff.x) + SQ(this->grabbedDistDiff.y) + SQ(this->grabbedDistDiff.z));
- Math_Vec3f_Diff(&grabbed->world.pos, &this->grabbedDistDiff, &this->actor.world.pos);
- if (50.0f < (sp94 - sp90)) {
- ArmsHook_DetachHookFromActor(this);
- grabbed = NULL;
- }
+ } else if (this->actor.child != NULL) {
+ sp94 = Actor_WorldDistXYZToActor(&this->actor, grabbed);
+ sp90 = sqrtf(SQ(this->grabbedDistDiff.x) + SQ(this->grabbedDistDiff.y) + SQ(this->grabbedDistDiff.z));
+ Math_Vec3f_Diff(&grabbed->world.pos, &this->grabbedDistDiff, &this->actor.world.pos);
+ if (50.0f < (sp94 - sp90)) {
+ ArmsHook_DetachHookFromActor(this);
+ grabbed = NULL;
}
}
}
@@ -219,12 +210,10 @@ void ArmsHook_Shoot(ArmsHook* this, GlobalContext* globalCtx) {
} else {
if (this->actor.child != NULL) {
velocity = 30.0f;
+ } else if (grabbed != NULL) {
+ velocity = 50.0f;
} else {
- if (grabbed != NULL) {
- velocity = 50.0f;
- } else {
- velocity = 200.0f;
- }
+ velocity = 200.0f;
}
phi_f16 = bodyDistDiff - velocity;
if (bodyDistDiff <= velocity) {
@@ -260,7 +249,6 @@ void ArmsHook_Shoot(ArmsHook* this, GlobalContext* globalCtx) {
if (ArmsHook_AttachToPlayer(this, player)) {
Math_Vec3f_Diff(&this->actor.world.pos, &player->actor.world.pos, &player->actor.velocity);
player->actor.velocity.y -= 20.0f;
- return;
}
}
}
@@ -272,34 +260,32 @@ void ArmsHook_Shoot(ArmsHook* this, GlobalContext* globalCtx) {
sp60.x = this->unk_1F4.x - (this->unk_1E8.x - this->unk_1F4.x);
sp60.y = this->unk_1F4.y - (this->unk_1E8.y - this->unk_1F4.y);
sp60.z = this->unk_1F4.z - (this->unk_1E8.z - this->unk_1F4.z);
- if (BgCheck_EntityLineTest1(&globalCtx->colCtx, &sp60, &this->unk_1E8, &sp78, &poly, 1, 1, 1, 1, &bgId) != 0) {
- if (func_8002F9EC(globalCtx, &this->actor, poly, bgId, &sp78) == false) {
- sp5C = COLPOLY_GET_NORMAL(poly->normal.x);
- sp58 = COLPOLY_GET_NORMAL(poly->normal.z);
- Math_Vec3f_Copy(&this->actor.world.pos, &sp78);
- this->actor.world.pos.x += 10.0f * sp5C;
- this->actor.world.pos.z += 10.0f * sp58;
- this->timer = 0;
- if (SurfaceType_IsHookshotSurface(&globalCtx->colCtx, poly, bgId) != 0) {
- if (bgId != BGCHECK_SCENE) {
- dynaPolyActor = DynaPoly_GetActor(&globalCtx->colCtx, bgId);
- if (dynaPolyActor != NULL) {
- ArmsHook_AttachHookToActor(this, &dynaPolyActor->actor);
- }
+ if (BgCheck_EntityLineTest1(&globalCtx->colCtx, &sp60, &this->unk_1E8, &sp78, &poly, true, true, true, true,
+ &bgId) &&
+ !func_8002F9EC(globalCtx, &this->actor, poly, bgId, &sp78)) {
+ sp5C = COLPOLY_GET_NORMAL(poly->normal.x);
+ sp58 = COLPOLY_GET_NORMAL(poly->normal.z);
+ Math_Vec3f_Copy(&this->actor.world.pos, &sp78);
+ this->actor.world.pos.x += 10.0f * sp5C;
+ this->actor.world.pos.z += 10.0f * sp58;
+ this->timer = 0;
+ if (SurfaceType_IsHookshotSurface(&globalCtx->colCtx, poly, bgId)) {
+ if (bgId != BGCHECK_SCENE) {
+ dynaPolyActor = DynaPoly_GetActor(&globalCtx->colCtx, bgId);
+ if (dynaPolyActor != NULL) {
+ ArmsHook_AttachHookToActor(this, &dynaPolyActor->actor);
}
- func_80865044(this);
- Audio_PlaySoundGeneral(NA_SE_IT_HOOKSHOT_STICK_OBJ, &this->actor.projectedPos, 4, &D_801333E0,
- &D_801333E0, &D_801333E8);
- return;
}
+ func_80865044(this);
+ Audio_PlaySoundGeneral(NA_SE_IT_HOOKSHOT_STICK_OBJ, &this->actor.projectedPos, 4, &D_801333E0,
+ &D_801333E0, &D_801333E8);
+ } else {
CollisionCheck_SpawnShieldParticlesMetal(globalCtx, &this->actor.world.pos);
Audio_PlaySoundGeneral(NA_SE_IT_HOOKSHOT_REFLECT, &this->actor.projectedPos, 4, &D_801333E0,
&D_801333E0, &D_801333E8);
- return;
}
- }
- if ((CHECK_BTN_ANY(globalCtx->state.input[0].press.button,
- (BTN_A | BTN_B | BTN_R | BTN_CUP | BTN_CLEFT | BTN_CRIGHT | BTN_CDOWN)))) {
+ } else if ((CHECK_BTN_ANY(globalCtx->state.input[0].press.button,
+ (BTN_A | BTN_B | BTN_R | BTN_CUP | BTN_CLEFT | BTN_CRIGHT | BTN_CDOWN)))) {
this->timer = 0;
}
}
@@ -313,8 +299,8 @@ void ArmsHook_Update(Actor* thisx, GlobalContext* globalCtx) {
}
void ArmsHook_Draw(Actor* thisx, GlobalContext* globalCtx) {
+ s32 pad;
ArmsHook* this = THIS;
- u32 pad3;
Player* player = PLAYER;
Vec3f sp78;
Vec3f sp6C;
@@ -322,38 +308,36 @@ void ArmsHook_Draw(Actor* thisx, GlobalContext* globalCtx) {
f32 sp5C;
f32 sp58;
- if (player->actor.draw != NULL) {
- if (player->rightHandType == 15) {
- OPEN_DISPS(globalCtx->state.gfxCtx, "../z_arms_hook.c", 850);
+ if ((player->actor.draw != NULL) && (player->rightHandType == 15)) {
+ OPEN_DISPS(globalCtx->state.gfxCtx, "../z_arms_hook.c", 850);
- if ((ArmsHook_Shoot != this->actionFunc) || (this->timer <= 0)) {
- Matrix_MultVec3f(&D_80865B70, &this->unk_1E8);
- Matrix_MultVec3f(&D_80865B88, &sp6C);
- Matrix_MultVec3f(&D_80865B94, &sp60);
- this->hookInfo.active = 0;
- } else {
- Matrix_MultVec3f(&D_80865B7C, &this->unk_1E8);
- Matrix_MultVec3f(&D_80865BA0, &sp6C);
- Matrix_MultVec3f(&D_80865BAC, &sp60);
- }
-
- func_80090480(globalCtx, &this->collider, &this->hookInfo, &sp6C, &sp60);
- func_80093D18(globalCtx->state.gfxCtx);
- gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_arms_hook.c", 895),
- G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
- gSPDisplayList(POLY_OPA_DISP++, D_0602B288);
- Matrix_Translate(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, MTXMODE_NEW);
- Math_Vec3f_Diff(&player->unk_3C8, &this->actor.world.pos, &sp78);
- sp58 = SQ(sp78.x) + SQ(sp78.z);
- sp5C = sqrtf(sp58);
- Matrix_RotateY(Math_FAtan2F(sp78.x, sp78.z), MTXMODE_APPLY);
- Matrix_RotateX(Math_FAtan2F(-sp78.y, sp5C), MTXMODE_APPLY);
- Matrix_Scale(0.015f, 0.015f, sqrtf(SQ(sp78.y) + sp58) * 0.01f, MTXMODE_APPLY);
- gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_arms_hook.c", 910),
- G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
- gSPDisplayList(POLY_OPA_DISP++, D_0602AFF0);
-
- CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_arms_hook.c", 913);
+ if ((ArmsHook_Shoot != this->actionFunc) || (this->timer <= 0)) {
+ Matrix_MultVec3f(&D_80865B70, &this->unk_1E8);
+ Matrix_MultVec3f(&D_80865B88, &sp6C);
+ Matrix_MultVec3f(&D_80865B94, &sp60);
+ this->hookInfo.active = 0;
+ } else {
+ Matrix_MultVec3f(&D_80865B7C, &this->unk_1E8);
+ Matrix_MultVec3f(&D_80865BA0, &sp6C);
+ Matrix_MultVec3f(&D_80865BAC, &sp60);
}
+
+ func_80090480(globalCtx, &this->collider, &this->hookInfo, &sp6C, &sp60);
+ func_80093D18(globalCtx->state.gfxCtx);
+ gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_arms_hook.c", 895),
+ G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
+ gSPDisplayList(POLY_OPA_DISP++, D_0602B288);
+ Matrix_Translate(this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, MTXMODE_NEW);
+ Math_Vec3f_Diff(&player->unk_3C8, &this->actor.world.pos, &sp78);
+ sp58 = SQ(sp78.x) + SQ(sp78.z);
+ sp5C = sqrtf(sp58);
+ Matrix_RotateY(Math_FAtan2F(sp78.x, sp78.z), MTXMODE_APPLY);
+ Matrix_RotateX(Math_FAtan2F(-sp78.y, sp5C), MTXMODE_APPLY);
+ Matrix_Scale(0.015f, 0.015f, sqrtf(SQ(sp78.y) + sp58) * 0.01f, MTXMODE_APPLY);
+ gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_arms_hook.c", 910),
+ G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
+ gSPDisplayList(POLY_OPA_DISP++, D_0602AFF0);
+
+ CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_arms_hook.c", 913);
}
}
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 37ce94048..aac6c00ab 100644
--- a/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.c
+++ b/src/overlays/actors/ovl_Arrow_Fire/z_arrow_fire.c
@@ -208,9 +208,9 @@ void ArrowFire_Draw(Actor* thisx, GlobalContext* globalCtx) {
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_arrow_fire.c", 618);
Matrix_Translate(tranform->world.pos.x, tranform->world.pos.y, tranform->world.pos.z, MTXMODE_NEW);
- Matrix_RotateY(tranform->shape.rot.y * (M_PI / 32768), MTXMODE_APPLY);
- Matrix_RotateX(tranform->shape.rot.x * (M_PI / 32768), MTXMODE_APPLY);
- Matrix_RotateZ(tranform->shape.rot.z * (M_PI / 32768), MTXMODE_APPLY);
+ Matrix_RotateY(tranform->shape.rot.y * (M_PI / 0x8000), MTXMODE_APPLY);
+ Matrix_RotateX(tranform->shape.rot.x * (M_PI / 0x8000), MTXMODE_APPLY);
+ Matrix_RotateZ(tranform->shape.rot.z * (M_PI / 0x8000), MTXMODE_APPLY);
Matrix_Scale(0.01f, 0.01f, 0.01f, MTXMODE_APPLY);
// Draw red effect over the screen when arrow hits
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 6b07d5c93..d2c363b0a 100644
--- a/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.c
+++ b/src/overlays/actors/ovl_Arrow_Ice/z_arrow_ice.c
@@ -209,9 +209,9 @@ void ArrowIce_Draw(Actor* thisx, GlobalContext* globalCtx) {
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_arrow_ice.c", 610);
Matrix_Translate(tranform->world.pos.x, tranform->world.pos.y, tranform->world.pos.z, MTXMODE_NEW);
- Matrix_RotateY(tranform->shape.rot.y * (M_PI / 32768), MTXMODE_APPLY);
- Matrix_RotateX(tranform->shape.rot.x * (M_PI / 32768), MTXMODE_APPLY);
- Matrix_RotateZ(tranform->shape.rot.z * (M_PI / 32768), MTXMODE_APPLY);
+ Matrix_RotateY(tranform->shape.rot.y * (M_PI / 0x8000), MTXMODE_APPLY);
+ Matrix_RotateX(tranform->shape.rot.x * (M_PI / 0x8000), MTXMODE_APPLY);
+ Matrix_RotateZ(tranform->shape.rot.z * (M_PI / 0x8000), MTXMODE_APPLY);
Matrix_Scale(0.01f, 0.01f, 0.01f, MTXMODE_APPLY);
// Draw blue effect over the screen when arrow hits
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 e67c5eaf0..8dbf3f8dd 100644
--- a/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.c
+++ b/src/overlays/actors/ovl_Arrow_Light/z_arrow_light.c
@@ -209,9 +209,9 @@ void ArrowLight_Draw(Actor* thisx, GlobalContext* globalCtx) {
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_arrow_light.c", 598);
Matrix_Translate(tranform->world.pos.x, tranform->world.pos.y, tranform->world.pos.z, MTXMODE_NEW);
- Matrix_RotateY(tranform->shape.rot.y * (M_PI / 32768), MTXMODE_APPLY);
- Matrix_RotateX(tranform->shape.rot.x * (M_PI / 32768), MTXMODE_APPLY);
- Matrix_RotateZ(tranform->shape.rot.z * (M_PI / 32768), MTXMODE_APPLY);
+ Matrix_RotateY(tranform->shape.rot.y * (M_PI / 0x8000), MTXMODE_APPLY);
+ Matrix_RotateX(tranform->shape.rot.x * (M_PI / 0x8000), MTXMODE_APPLY);
+ Matrix_RotateZ(tranform->shape.rot.z * (M_PI / 0x8000), MTXMODE_APPLY);
Matrix_Scale(0.01f, 0.01f, 0.01f, MTXMODE_APPLY);
// Draw yellow effect over the screen when arrow hits
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 370b03b80..145216a9a 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
@@ -184,7 +184,7 @@ void func_8086C054(BgBdanObjects* this, GlobalContext* globalCtx) {
if (this->dyna.actor.xzDistToPlayer < 250.0f) {
BgBdanObjects_SetContactRu1(this, 1);
this->timer = 20;
- func_800800F8(globalCtx, 0xBFE, -0x63, &this->dyna.actor, 0);
+ OnePointCutscene_Init(globalCtx, 3070, -99, &this->dyna.actor, MAIN_CAM);
player->actor.world.pos.x = -1130.0f;
player->actor.world.pos.y = -1025.0f;
player->actor.world.pos.z = -3300.0f;
@@ -261,7 +261,7 @@ void func_8086C3D8(BgBdanObjects* this, GlobalContext* globalCtx) {
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_BUYOSTAND_STOP_U);
this->dyna.actor.child->world.pos.y = this->dyna.actor.world.pos.y + 140.0f;
this->actionFunc = func_8086C5BC;
- func_800800F8(globalCtx, 0xC08, -0x63, this->dyna.actor.child, 0);
+ OnePointCutscene_Init(globalCtx, 3080, -99, this->dyna.actor.child, MAIN_CAM);
player->actor.world.pos.x = -1130.0f;
player->actor.world.pos.y = -1025.0f;
player->actor.world.pos.z = -3500.0f;
@@ -334,7 +334,7 @@ void func_8086C76C(BgBdanObjects* this, GlobalContext* globalCtx) {
if (func_8004356C(&this->dyna)) {
if (this->dyna.actor.xzDistToPlayer < 120.0f) {
this->actionFunc = func_8086C7D0;
- func_800800F8(globalCtx, 0xC12, -0x63, &this->dyna.actor, 0);
+ OnePointCutscene_Init(globalCtx, 3090, -99, &this->dyna.actor, MAIN_CAM);
}
}
}
@@ -358,13 +358,13 @@ void func_8086C874(BgBdanObjects* this, GlobalContext* globalCtx) {
}
if (this->unk_168 == 0) {
if (func_8004356C(&this->dyna)) {
- this->cameraSetting = globalCtx->cameraPtrs[0]->setting;
- Camera_ChangeSetting(globalCtx->cameraPtrs[0], CAM_SET_NORMAL2);
- func_8005AD1C(globalCtx->cameraPtrs[0], 4);
- this->unk_168 = 0xAU;
+ this->cameraSetting = globalCtx->cameraPtrs[MAIN_CAM]->setting;
+ Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], CAM_SET_NORMAL2);
+ func_8005AD1C(globalCtx->cameraPtrs[MAIN_CAM], 4);
+ this->unk_168 = 10;
}
} else {
- Camera_ChangeSetting(globalCtx->cameraPtrs[0], CAM_SET_NORMAL2);
+ Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], CAM_SET_NORMAL2);
if (!func_8004356C(&this->dyna)) {
if (this->unk_168 != 0) {
this->unk_168--;
@@ -373,12 +373,12 @@ void func_8086C874(BgBdanObjects* this, GlobalContext* globalCtx) {
if (this->unk_168 == 0) {
do {
} while (0);
- Camera_ChangeSetting(globalCtx->cameraPtrs[0], this->cameraSetting);
- func_8005ACFC(globalCtx->cameraPtrs[0], 4);
+ Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], this->cameraSetting);
+ func_8005ACFC(globalCtx->cameraPtrs[MAIN_CAM], 4);
}
}
this->dyna.actor.world.pos.y =
- this->dyna.actor.home.pos.y - (sinf(this->timer * (M_PI / 256.0f)) * 471.239990234375f); // pi * 150
+ this->dyna.actor.home.pos.y - (sinf(this->timer * (M_PI / 256.0f)) * 471.24f); // pi * 150
if (this->timer == 0) {
this->timer = 512;
}
@@ -423,7 +423,7 @@ void func_8086CB10(BgBdanObjects* this, GlobalContext* globalCtx) {
this->timer = 50;
this->actionFunc = func_8086CB8C;
this->dyna.actor.home.pos.y -= 200.0f;
- func_800800F8(globalCtx, 0xC1C, 0x33, &this->dyna.actor, 0);
+ OnePointCutscene_Init(globalCtx, 3100, 51, &this->dyna.actor, MAIN_CAM);
}
}
@@ -437,7 +437,7 @@ void func_8086CB8C(BgBdanObjects* this, GlobalContext* globalCtx) {
if (this->timer == 0) {
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_BUYOSTAND_STOP_U);
this->actionFunc = BgBdanObjects_DoNothing;
- Gameplay_CopyCamera(globalCtx, 0, -1);
+ Gameplay_CopyCamera(globalCtx, MAIN_CAM, SUBCAM_ACTIVE);
} else {
func_8002F974(&this->dyna.actor, NA_SE_EV_BUYOSTAND_FALL - SFX_FLAG);
}
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 15868b500..07f81903d 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
@@ -92,7 +92,7 @@ static InitChainEntry sInitChain[] = {
ICHAIN_F32(uncullZoneDownward, 1200, ICHAIN_STOP),
};
-static Vec3f D_8086E0E0 = { 0, 140.0f, 0 };
+static Vec3f D_8086E0E0 = { 0.0f, 140.0f, 0.0f };
void func_8086D010(BgBdanSwitch* this, GlobalContext* globalCtx, CollisionHeader* collision, DynaPolyMoveFlag flag) {
s16 pad1;
@@ -125,7 +125,7 @@ void func_8086D0EC(BgBdanSwitch* this) {
case BLUE:
case YELLOW_HEAVY:
case YELLOW:
- this->unk_1D4 = ((Math_CosS(this->unk_1CC) * 0.5f) + 8.833334f) * 0.012f;
+ this->unk_1D4 = ((Math_CosS(this->unk_1CC) * 0.5f) + (53.000004f / 6.0f)) * 0.012f;
this->unk_1D0 = ((Math_CosS(this->unk_1CC) * 0.5f) + 20.5f) * (this->unk_1C8 * 0.0050000004f);
this->dyna.actor.scale.y = this->unk_1C8 * 0.1f;
break;
@@ -227,9 +227,9 @@ void func_8086D4B4(BgBdanSwitch* this, GlobalContext* globalCtx) {
type = this->dyna.actor.params & 0xFF;
Flags_SetSwitch(globalCtx, (this->dyna.actor.params >> 8) & 0x3F);
if (type == BLUE || type == YELLOW_TALL_2) {
- func_800806BC(globalCtx, &this->dyna.actor, NA_SE_SY_TRE_BOX_APPEAR);
+ OnePointCutscene_AttentionSetSfx(globalCtx, &this->dyna.actor, NA_SE_SY_TRE_BOX_APPEAR);
} else {
- func_800806BC(globalCtx, &this->dyna.actor, NA_SE_SY_CORRECT_CHIME);
+ OnePointCutscene_AttentionSetSfx(globalCtx, &this->dyna.actor, NA_SE_SY_CORRECT_CHIME);
}
}
}
@@ -238,7 +238,7 @@ void func_8086D548(BgBdanSwitch* this, GlobalContext* globalCtx) {
if (Flags_GetSwitch(globalCtx, (this->dyna.actor.params >> 8) & 0x3F)) {
Flags_UnsetSwitch(globalCtx, (this->dyna.actor.params >> 8) & 0x3F);
if ((this->dyna.actor.params & 0xFF) == YELLOW_TALL_2) {
- func_800806BC(globalCtx, &this->dyna.actor, NA_SE_SY_TRE_BOX_APPEAR);
+ OnePointCutscene_AttentionSetSfx(globalCtx, &this->dyna.actor, NA_SE_SY_TRE_BOX_APPEAR);
}
}
}
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 43a4ece96..606c107e6 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
@@ -95,7 +95,7 @@ void BgDdanJd_Idle(BgDdanJd* this, GlobalContext* globalCtx) {
this->state = STATE_GO_MIDDLE_FROM_BOTTOM;
this->idleTimer = 0;
this->dyna.actor.world.pos.y = this->dyna.actor.home.pos.y + MOVE_HEIGHT_MIDDLE;
- func_800800F8(globalCtx, 0xBF4, -0x63, &this->dyna.actor, 0);
+ OnePointCutscene_Init(globalCtx, 3060, -99, &this->dyna.actor, MAIN_CAM);
}
if (this->idleTimer == 0) {
this->idleTimer = IDLE_FRAMES;
@@ -164,7 +164,7 @@ void BgDdanJd_Move(BgDdanJd* this, GlobalContext* globalCtx) {
this->dyna.actor.world.pos.y = this->dyna.actor.home.pos.y + MOVE_HEIGHT_MIDDLE;
this->idleTimer = 0;
this->actionFunc = BgDdanJd_Idle;
- func_800800F8(globalCtx, 0xBF4, -0x63, &this->dyna.actor, 0);
+ OnePointCutscene_Init(globalCtx, 3060, -99, &this->dyna.actor, MAIN_CAM);
} else if (Math_StepToF(&this->dyna.actor.world.pos.y, this->targetY, this->ySpeed)) {
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_PILLAR_MOVE_STOP);
this->actionFunc = BgDdanJd_Idle;
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 e20895670..95915c4e1 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
@@ -106,7 +106,7 @@ void BgDdanKd_CheckForExplosions(BgDdanKd* this, GlobalContext* globalCtx) {
if ((explosive != NULL) && (this->prevExplosive != NULL) && (explosive != this->prevExplosive) &&
(Math_Vec3f_DistXZ(&this->prevExplosivePos, &explosive->world.pos) > 80.0f)) {
BgDdanKd_SetupAction(this, BgDdanKd_LowerStairs);
- func_800800F8(globalCtx, 0xBEA, 0x3E7, &this->dyna.actor, 0);
+ OnePointCutscene_Init(globalCtx, 3050, 999, &this->dyna.actor, MAIN_CAM);
} else {
if (this->timer != 0) {
this->timer -= 1;
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 96b5e1954..2edeb585d 100644
--- a/src/overlays/actors/ovl_Bg_Dodoago/z_bg_dodoago.c
+++ b/src/overlays/actors/ovl_Bg_Dodoago/z_bg_dodoago.c
@@ -160,13 +160,13 @@ void func_80871CF4(BgDodoago* this, GlobalContext* globalCtx) {
this->unk_164 = 0;
Audio_PlaySoundGeneral(NA_SE_SY_CORRECT_CHIME, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
BgDodoago_SetupAction(this, func_80871FB8);
- func_800800F8(globalCtx, 0xD34, 0xA0, &this->dyna.actor, 0);
+ OnePointCutscene_Init(globalCtx, 3380, 160, &this->dyna.actor, MAIN_CAM);
} else if (globalCtx->unk_11D30[this->unk_164] == 0) {
- func_800800F8(globalCtx, 0xBF9, 0x28, &this->dyna.actor, 0);
+ OnePointCutscene_Init(globalCtx, 3065, 40, &this->dyna.actor, MAIN_CAM);
BgDodoago_SetupAction(this, func_80872288);
Audio_PlaySoundGeneral(NA_SE_SY_CORRECT_CHIME, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
} else {
- func_800800F8(globalCtx, 0xBF9, 0x14, &this->dyna.actor, 0);
+ OnePointCutscene_Init(globalCtx, 3065, 20, &this->dyna.actor, MAIN_CAM);
Audio_PlaySoundGeneral(NA_SE_SY_ERROR, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
D_80872824 += 0x1E;
return;
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 7d6750bce..a7aab1986 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
@@ -191,7 +191,7 @@ void BgDyYoseizo_Bob(BgDyYoseizo* this, GlobalContext* globalCtx) {
Math_ApproachF(&this->actor.world.pos.y, this->targetHeight, 0.1f, 10.0f);
Math_ApproachF(&this->bobOffset, 10.0f, 0.1f, 0.5f);
- if (globalCtx->csCtx.state == 0) {
+ if (globalCtx->csCtx.state == CS_STATE_IDLE) {
this->actor.velocity.y = Math_SinS(this->bobTimer);
} else {
this->actor.velocity.y = Math_SinS(this->bobTimer) * 0.4f;
@@ -313,9 +313,9 @@ void BgDyYoseizo_ChooseType(BgDyYoseizo* this, GlobalContext* globalCtx) {
globalCtx->envCtx.unk_BF = 2;
if (globalCtx->sceneNum == SCENE_DAIYOUSEI_IZUMI) {
- func_800800F8(globalCtx, 0x219B, -99, NULL, 0);
+ OnePointCutscene_Init(globalCtx, 8603, -99, NULL, MAIN_CAM);
} else {
- func_800800F8(globalCtx, 0x219C, -99, NULL, 0);
+ OnePointCutscene_Init(globalCtx, 8604, -99, NULL, MAIN_CAM);
};
Audio_PlayActorSound2(&this->actor, NA_SE_EV_GREAT_FAIRY_APPEAR);
@@ -578,7 +578,7 @@ void BgDyYoseizo_Vanish(BgDyYoseizo* this, GlobalContext* globalCtx) {
}
void BgDyYoseizo_SetupSpinGrow_Reward(BgDyYoseizo* this, GlobalContext* globalCtx) {
- if (globalCtx->csCtx.state != 0) {
+ if (globalCtx->csCtx.state != CS_STATE_IDLE) {
if ((globalCtx->csCtx.npcActions[0] != NULL) && (globalCtx->csCtx.npcActions[0]->action == 2)) {
this->actor.draw = BgDyYoseizo_Draw;
func_8002DF54(globalCtx, &this->actor, 1);
@@ -635,7 +635,7 @@ void BgDyYoseizo_SpinGrowSetupGive_Reward(BgDyYoseizo* this, GlobalContext* glob
this->animationChanged = true;
}
- if ((globalCtx->csCtx.state != 0) &&
+ if ((globalCtx->csCtx.state != CS_STATE_IDLE) &&
((globalCtx->csCtx.npcActions[0] != NULL) && (globalCtx->csCtx.npcActions[0]->action == 3))) {
this->finishedSpinGrow = this->animationChanged = false;
if (globalCtx->sceneNum == SCENE_DAIYOUSEI_IZUMI) {
@@ -821,7 +821,7 @@ void BgDyYoseizo_Update(Actor* thisx, GlobalContext* globalCtx2) {
this->actionFunc(this, globalCtx);
- if (globalCtx->csCtx.state != 0) {
+ if (globalCtx->csCtx.state != CS_STATE_IDLE) {
phi_v1 = 0;
if (globalCtx->sceneNum == SCENE_DAIYOUSEI_IZUMI) {
if ((globalCtx->csCtx.frames == 32) || (globalCtx->csCtx.frames == 291) ||
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 f3e2e75c6..b0ab9c6df 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
@@ -86,7 +86,7 @@ void BgGjyoBridge_TriggerCutscene(BgGjyoBridge* this, GlobalContext* globalCtx)
}
void BgGjyoBridge_SpawnBridge(BgGjyoBridge* this, GlobalContext* globalCtx) {
- if ((globalCtx->csCtx.state != 0) && (globalCtx->csCtx.npcActions[2] != NULL) &&
+ if ((globalCtx->csCtx.state != CS_STATE_IDLE) && (globalCtx->csCtx.npcActions[2] != NULL) &&
(globalCtx->csCtx.npcActions[2]->action == 2)) {
this->dyna.actor.draw = BgGjyoBridge_Draw;
func_8003EC50(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
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 dc2208cee..3c41f6d7f 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
@@ -274,7 +274,7 @@ void BgHakaGate_FloorOpen(BgHakaGate* this, GlobalContext* globalCtx) {
void BgHakaGate_GateWait(BgHakaGate* this, GlobalContext* globalCtx) {
if (Flags_GetSwitch(globalCtx, this->switchFlag)) {
- func_80080480(globalCtx, &this->dyna.actor);
+ OnePointCutscene_Attention(globalCtx, &this->dyna.actor);
this->actionFunc = BgHakaGate_GateOpen;
}
}
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 e1f1ee030..13e9c477d 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
@@ -112,7 +112,7 @@ void BgHakaHuta_SpawnEnemies(BgHakaHuta* this, GlobalContext* globalCtx) {
if (Flags_GetSwitch(globalCtx, this->dyna.actor.params) && !Player_InCsMode(globalCtx)) {
this->counter = 25;
this->actionFunc = BgHakaHuta_Open;
- func_800800F8(globalCtx, 0x1771, 0x3E7, &this->dyna.actor, 0);
+ OnePointCutscene_Init(globalCtx, 6001, 999, &this->dyna.actor, MAIN_CAM);
if (this->unk_16A == 2) {
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_FIREFLY,
(this->dyna.actor.world.pos.x + (-25.0f) * Math_CosS(this->dyna.actor.shape.rot.y) +
@@ -175,7 +175,7 @@ void BgHakaHuta_SlideOpen(BgHakaHuta* this, GlobalContext* globalCtx) {
void func_8087D720(BgHakaHuta* this, GlobalContext* globalCtx) {
static Vec3f D_8087D958 = { 30.0f, 0.0f, 0.0f };
- static Vec3f D_8087D964 = { 0.032579999f, 0.325800001f, -0.944899976f };
+ static Vec3f D_8087D964 = { 0.03258f, 0.3258f, -0.9449f };
MtxF mtx;
Vec3f vec;
s32 quakeIndex;
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 74e9bec15..2d72de4ab 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
@@ -190,7 +190,7 @@ void func_8087E258(BgHakaMeganeBG* this, GlobalContext* globalCtx) {
void func_8087E288(BgHakaMeganeBG* this, GlobalContext* globalCtx) {
if (Flags_GetSwitch(globalCtx, this->unk_168)) {
- func_80080480(globalCtx, &this->dyna.actor);
+ OnePointCutscene_Attention(globalCtx, &this->dyna.actor);
this->actionFunc = func_8087E2D8;
}
}
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 785323d3a..8b96f4cc8 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
@@ -101,7 +101,7 @@ void BgHakaShip_WaitForSong(BgHakaShip* this, GlobalContext* globalCtx) {
this->counter = 130;
this->actionFunc = BgHakaShip_CutsceneStationary;
osSyncPrintf("シーン 外輪船 ... アァクション!!\n");
- func_800800F8(globalCtx, 0xD3E, 999, &this->dyna.actor, 0);
+ OnePointCutscene_Init(globalCtx, 3390, 999, &this->dyna.actor, MAIN_CAM);
}
}
}
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 b778e96f1..e715c7cd8 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
@@ -441,7 +441,7 @@ void func_808809E4(BgHakaTrap* this, GlobalContext* globalCtx, s16 arg2) {
if ((fabsf(sp18.x) < 70.0f) && (fabsf(sp18.y) < 100.0f) && (sp18.z < 500.0f) &&
(PLAYER->currentBoots != PLAYER_BOOTS_IRON)) {
- player->windSpeed = ((500.0f - sp18.z) * 0.06f + 5.0f) * arg2 * (1.0f / 14848.0f) * (2.0f / 3.0f);
+ player->windSpeed = ((500.0f - sp18.z) * 0.06f + 5.0f) * arg2 * (1.0f / 0x3A00) * (2.0f / 3.0f);
player->windDirection = this->dyna.actor.shape.rot.y;
}
}
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 bb4b607e0..e72ebe89c 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
@@ -230,7 +230,7 @@ void BgHakaTubo_DrawFlameCircle(BgHakaTubo* this, GlobalContext* globalCtx) {
func_80093D84(globalCtx->state.gfxCtx);
Matrix_Translate(this->dyna.actor.world.pos.x, this->dyna.actor.world.pos.y + 235.0f, this->dyna.actor.world.pos.z,
MTXMODE_NEW);
- Matrix_RotateY(this->dyna.actor.shape.rot.y * 0.0000958738f, MTXMODE_APPLY);
+ Matrix_RotateY(this->dyna.actor.shape.rot.y * (M_PI / 0x8000), MTXMODE_APPLY);
Matrix_Scale(0.07f, 0.04f, 0.07f, MTXMODE_APPLY);
if (1) {}
gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 0, 170, 255, 255);
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 7cd25540e..0578cbefd 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
@@ -77,8 +77,8 @@ extern CollisionHeader D_06006F70;
extern CollisionHeader D_06000C2C;
void BgHakaZou_Init(Actor* thisx, GlobalContext* globalCtx) {
- BgHakaZou* this = THIS;
s32 pad;
+ BgHakaZou* this = THIS;
Actor_ProcessInitChain(thisx, sInitChain);
@@ -89,7 +89,7 @@ void BgHakaZou_Init(Actor* thisx, GlobalContext* globalCtx) {
Actor_SetScale(thisx, (Rand_ZeroOne() * 0.005f) + 0.025f);
thisx->speedXZ = Rand_ZeroOne();
- thisx->world.rot.y = thisx->shape.rot.y * ((Rand_ZeroOne() < 0.5f) ? -1 : 1) + Rand_CenteredFloat(4096.0f);
+ thisx->world.rot.y = thisx->shape.rot.y * ((Rand_ZeroOne() < 0.5f) ? -1 : 1) + Rand_CenteredFloat(0x1000);
this->timer = 20;
thisx->world.rot.x = Rand_S16Offset(0x100, 0x300) * ((Rand_ZeroOne() < 0.5f) ? -1 : 1);
thisx->world.rot.z = Rand_S16Offset(0x400, 0x800) * ((Rand_ZeroOne() < 0.5f) ? -1 : 1);
@@ -169,38 +169,36 @@ void BgHakaZou_Wait(BgHakaZou* this, GlobalContext* globalCtx) {
if (this->dyna.actor.params == STA_UNKNOWN) {
this->actionFunc = func_80882BDC;
- return;
- }
-
- Actor_SetObjectDependency(globalCtx, &this->dyna.actor);
-
- colHeader = NULL;
-
- if (this->dyna.actor.params == STA_GIANT_BIRD_STATUE) {
- CollisionHeader_GetVirtual(&D_06006F70, &colHeader);
- this->collider.dim.radius = 80;
- this->collider.dim.height = 100;
- this->collider.dim.yShift = -30;
- this->collider.dim.pos.x -= 56;
- this->collider.dim.pos.z += 56;
- this->dyna.actor.uncullZoneScale = 1500.0f;
- } else if (this->dyna.actor.params == STA_BOMBABLE_SKULL_WALL) {
- CollisionHeader_GetVirtual(&D_06005E30, &colHeader);
- this->collider.dim.yShift = -50;
} else {
- CollisionHeader_GetVirtual(&D_06000C2C, &colHeader);
- this->collider.dim.radius = 55;
- this->collider.dim.height = 20;
- }
+ Actor_SetObjectDependency(globalCtx, &this->dyna.actor);
+
+ colHeader = NULL;
+
+ if (this->dyna.actor.params == STA_GIANT_BIRD_STATUE) {
+ CollisionHeader_GetVirtual(&D_06006F70, &colHeader);
+ this->collider.dim.radius = 80;
+ this->collider.dim.height = 100;
+ this->collider.dim.yShift = -30;
+ this->collider.dim.pos.x -= 56;
+ this->collider.dim.pos.z += 56;
+ this->dyna.actor.uncullZoneScale = 1500.0f;
+ } else if (this->dyna.actor.params == STA_BOMBABLE_SKULL_WALL) {
+ CollisionHeader_GetVirtual(&D_06005E30, &colHeader);
+ this->collider.dim.yShift = -50;
+ } else {
+ CollisionHeader_GetVirtual(&D_06000C2C, &colHeader);
+ this->collider.dim.radius = 55;
+ this->collider.dim.height = 20;
+ }
- this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
+ this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
- if ((this->dyna.actor.params == STA_GIANT_BIRD_STATUE) && Flags_GetSwitch(globalCtx, this->switchFlag)) {
- this->actionFunc = BgHakaZou_DoNothing;
- return;
+ if ((this->dyna.actor.params == STA_GIANT_BIRD_STATUE) && Flags_GetSwitch(globalCtx, this->switchFlag)) {
+ this->actionFunc = BgHakaZou_DoNothing;
+ } else {
+ this->actionFunc = func_80883000;
+ }
}
-
- this->actionFunc = func_80883000;
}
}
void func_80882BDC(BgHakaZou* this, GlobalContext* globalCtx) {
@@ -214,7 +212,7 @@ void func_80882BDC(BgHakaZou* this, GlobalContext* globalCtx) {
if (this->dyna.actor.bgCheckFlags & 2) {
if (this->dyna.actor.velocity.y < -8.0f) {
this->dyna.actor.velocity.y *= -0.6f;
- this->dyna.actor.velocity.y = (this->dyna.actor.velocity.y > 10.0f) ? 10.0f : this->dyna.actor.velocity.y;
+ this->dyna.actor.velocity.y = CLAMP_MAX(this->dyna.actor.velocity.y, 10.0f);
this->dyna.actor.bgCheckFlags &= ~3;
this->dyna.actor.speedXZ = 2.0f;
} else {
@@ -274,13 +272,13 @@ void func_80882E54(BgHakaZou* this, GlobalContext* globalCtx) {
}
void func_80883000(BgHakaZou* this, GlobalContext* globalCtx) {
- if (this->collider.base.acFlags & 2) {
+ if (this->collider.base.acFlags & AC_HIT) {
Flags_SetSwitch(globalCtx, this->switchFlag);
if (this->dyna.actor.params == STA_GIANT_BIRD_STATUE) {
this->timer = 20;
this->actionFunc = func_80883144;
- func_800800F8(globalCtx, 3400, 999, &this->dyna.actor, 0);
+ OnePointCutscene_Init(globalCtx, 3400, 999, &this->dyna.actor, MAIN_CAM);
} else if (this->dyna.actor.params == 2) {
func_80882E54(this, globalCtx);
this->dyna.actor.draw = NULL;
@@ -342,7 +340,7 @@ void func_80883254(BgHakaZou* this, GlobalContext* globalCtx) {
if (this->timer == 0) {
this->timer = 60;
- this->dyna.actor.world.rot.x = 0x0008;
+ this->dyna.actor.world.rot.x = 8;
this->actionFunc = func_80883328;
}
} else {
@@ -355,9 +353,9 @@ void func_80883328(BgHakaZou* this, GlobalContext* globalCtx) {
s32 i;
s32 j;
- this->dyna.actor.world.rot.x += this->dyna.actor.world.rot.x * 0.125f;
+ this->dyna.actor.world.rot.x += this->dyna.actor.world.rot.x / 8.0f;
- if (Math_ScaledStepToS(&this->dyna.actor.shape.rot.x, -0x4000, this->dyna.actor.world.rot.x) != 0) {
+ if (Math_ScaledStepToS(&this->dyna.actor.shape.rot.x, -0x4000, this->dyna.actor.world.rot.x)) {
effectPos.x = this->dyna.actor.world.pos.x;
effectPos.y = this->dyna.actor.world.pos.y;
@@ -385,7 +383,7 @@ void func_808834D8(BgHakaZou* this, GlobalContext* globalCtx) {
this->timer--;
}
- moveDist = ((this->timer % 2) ? 15.0f : -15.0f);
+ moveDist = (this->timer % 2) ? 15.0f : -15.0f;
this->dyna.actor.world.pos.y += ((this->timer & 0xFE) * 0.04f * moveDist);
if (this->timer == 0) {
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 e95a2ab0e..f5b58f020 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
@@ -321,19 +321,19 @@ void BgHeavyBlock_SpawnPieces(BgHeavyBlock* this, GlobalContext* globalCtx) {
void BgHeavyBlock_Wait(BgHeavyBlock* this, GlobalContext* globalCtx) {
s32 quakeIndex;
- // if block has a parent link has lifted it, start onepointdemo (cutscene) and quake
+ // if block has a parent link has lifted it, start one point cutscene and quake
if (Actor_HasParent(&this->dyna.actor, globalCtx)) {
this->timer = 0;
switch (this->dyna.actor.params & 0xFF) {
case HEAVYBLOCK_BREAKABLE:
- func_800800F8(globalCtx, 0xFB4, 0x10E, &this->dyna.actor, 0);
+ OnePointCutscene_Init(globalCtx, 4020, 270, &this->dyna.actor, MAIN_CAM);
break;
case HEAVYBLOCK_UNBREAKABLE:
- func_800800F8(globalCtx, 0xFB5, 0xDC, &this->dyna.actor, 0);
+ OnePointCutscene_Init(globalCtx, 4021, 220, &this->dyna.actor, MAIN_CAM);
break;
case HEAVYBLOCK_UNBREAKABLE_OUTSIDE_CASTLE:
- func_800800F8(globalCtx, 0xFB6, 0xD2, &this->dyna.actor, 0);
+ OnePointCutscene_Init(globalCtx, 4022, 210, &this->dyna.actor, MAIN_CAM);
break;
}
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 cf9550fd0..21d90193e 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
@@ -129,11 +129,11 @@ void BgHidanCurtain_WaitForSwitchOn(BgHidanCurtain* this, GlobalContext* globalC
if (Flags_GetSwitch(globalCtx, this->actor.params)) {
if (this->type == 1) {
this->actionFunc = BgHidanCurtain_WaitForCutscene;
- func_800800F8(globalCtx, 3350, -99, &this->actor, 0);
+ OnePointCutscene_Init(globalCtx, 3350, -99, &this->actor, MAIN_CAM);
this->timer = 50;
} else if (this->type == 3) {
this->actionFunc = BgHidanCurtain_WaitForCutscene;
- func_800800F8(globalCtx, 3360, 60, &this->actor, 0);
+ OnePointCutscene_Init(globalCtx, 3360, 60, &this->actor, MAIN_CAM);
this->timer = 30;
} else {
this->actionFunc = BgHidanCurtain_TurnOff;
@@ -207,7 +207,8 @@ void BgHidanCurtain_Update(Actor* thisx, GlobalContext* globalCtx2) {
BgHidanCurtainParams* hcParams = &sHCParams[this->size];
f32 riseProgress;
- if ((globalCtx->cameraPtrs[0]->setting == 0x28) || (globalCtx->cameraPtrs[0]->setting == 0x38)) {
+ if ((globalCtx->cameraPtrs[MAIN_CAM]->setting == CAM_SET_ITEM0) ||
+ (globalCtx->cameraPtrs[MAIN_CAM]->setting == CAM_SET_ITEM2)) {
this->collider.base.atFlags &= ~AT_HIT;
} else {
if (this->collider.base.atFlags & AT_HIT) {
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 313137a27..ad9ed7b54 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
@@ -131,10 +131,10 @@ void BgHidanFslift_Update(Actor* thisx, GlobalContext* globalCtx) {
if (this->unk_16A == 0) {
this->unk_16A = 3;
}
- Camera_ChangeSetting(globalCtx->cameraPtrs[0], CAM_SET_HIDAN1);
+ Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], CAM_SET_HIDAN1);
} else if (!func_8004356C(&this->dyna)) {
if (this->unk_16A != 0) {
- Camera_ChangeSetting(globalCtx->cameraPtrs[0], CAM_SET_DUNGEON0);
+ Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], CAM_SET_DUNGEON0);
}
this->unk_16A = 0;
}
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 61ba45610..e666dd007 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
@@ -123,7 +123,7 @@ void BgHidanFwbig_UpdatePosition(BgHidanFwbig* this) {
void BgHidanFwbig_WaitForSwitch(BgHidanFwbig* this, GlobalContext* globalCtx) {
if (Flags_GetSwitch(globalCtx, this->actor.params)) {
this->actionFunc = BgHidanFwbig_WaitForCs;
- func_800800F8(globalCtx, 0xD0C, -0x63, &this->actor, 0);
+ OnePointCutscene_Init(globalCtx, 3340, -99, &this->actor, MAIN_CAM);
this->timer = 35;
}
}
@@ -180,7 +180,7 @@ void BgHidanFwbig_WaitForPlayer(BgHidanFwbig* this, GlobalContext* globalCtx) {
if (player->actor.world.pos.x < 1150.0f) {
this->actionFunc = BgHidanFwbig_Rise;
- func_800800F8(globalCtx, 0xCDA, -0x63, &this->actor, 0);
+ OnePointCutscene_Init(globalCtx, 3290, -99, &this->actor, MAIN_CAM);
}
}
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 e5408c015..7d4c23149 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
@@ -280,7 +280,7 @@ void func_80888734(BgHidanHamstep* this) {
void func_808887C4(BgHidanHamstep* this, GlobalContext* globalCtx) {
if (this->collider.base.acFlags & AC_HIT) {
- func_800800F8(globalCtx, 3310, 100, &this->dyna.actor, 0);
+ OnePointCutscene_Init(globalCtx, 3310, 100, &this->dyna.actor, MAIN_CAM);
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_HAMMER_SWITCH);
this->collider.base.acFlags = AC_NONE;
BgHidanHamstep_SetupAction(this, 1);
diff --git a/src/overlays/actors/ovl_Bg_Hidan_Kousi/z_bg_hidan_kousi.c b/src/overlays/actors/ovl_Bg_Hidan_Kousi/z_bg_hidan_kousi.c
index 1ed544dd4..70829c6c7 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
@@ -108,7 +108,7 @@ void func_80889ACC(BgHidanKousi* this) {
void func_80889B5C(BgHidanKousi* this, GlobalContext* globalCtx) {
if (Flags_GetSwitch(globalCtx, (this->dyna.actor.params >> 8) & 0xFF)) {
BgHidanKousi_SetupAction(this, func_80889BC0);
- func_80080480(globalCtx, &this->dyna.actor);
+ OnePointCutscene_Attention(globalCtx, &this->dyna.actor);
this->unk_168 = 0xC8;
}
}
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 6966a6c41..92cb10146 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
@@ -266,10 +266,10 @@ void func_8088B79C(BgHidanRock* this, GlobalContext* globalCtx) {
if (this->unk_169 == 0) {
this->unk_169 = 3;
}
- Camera_ChangeSetting(globalCtx->cameraPtrs[0], 0x30);
+ Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], CAM_SET_HIDAN1);
} else if (!func_8004356C(&this->dyna)) {
if (this->unk_169 != 0) {
- Camera_ChangeSetting(globalCtx->cameraPtrs[0], 3);
+ Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], CAM_SET_DUNGEON0);
}
this->unk_169 = 0;
}
@@ -277,7 +277,7 @@ void func_8088B79C(BgHidanRock* this, GlobalContext* globalCtx) {
}
void func_8088B90C(BgHidanRock* this, GlobalContext* globalCtx) {
- if (Math_StepToF(&this->dyna.actor.world.pos.y, this->dyna.actor.home.pos.y, 1.0f) != 0) {
+ if (Math_StepToF(&this->dyna.actor.world.pos.y, this->dyna.actor.home.pos.y, 1.0f)) {
this->actionFunc = func_8088B634;
}
}
@@ -319,10 +319,10 @@ void func_8088B990(BgHidanRock* this, GlobalContext* globalCtx) {
if (this->unk_169 == 0) {
this->unk_169 = 3;
}
- Camera_ChangeSetting(globalCtx->cameraPtrs[0], 0x30);
+ Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], CAM_SET_HIDAN1);
} else if (!func_8004356C(&this->dyna)) {
if (this->unk_169 != 0) {
- Camera_ChangeSetting(globalCtx->cameraPtrs[0], 3);
+ Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], CAM_SET_DUNGEON0);
}
this->unk_169 = 0;
}
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 fcfef6bf1..021f1e34e 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
@@ -121,7 +121,7 @@ void func_8088E518(BgHidanSima* this, GlobalContext* globalCtx) {
Math_StepToF(&this->dyna.actor.world.pos.y, this->dyna.actor.home.pos.y, 3.4f);
if (func_8004356C(&this->dyna) && !(player->stateFlags1 & 0x6000)) {
this->timer = 20;
- this->dyna.actor.world.rot.y = Camera_GetCamDirYaw(globalCtx->cameraPtrs[globalCtx->activeCamera]) + 0x4000;
+ this->dyna.actor.world.rot.y = Camera_GetCamDirYaw(ACTIVE_CAM) + 0x4000;
if (this->dyna.actor.home.pos.y <= this->dyna.actor.world.pos.y) {
this->actionFunc = func_8088E5D0;
} else {
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 4fa9ad10e..d03b1c3d4 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
@@ -114,10 +114,10 @@ void BgHidanSyoku_Update(Actor* thisx, GlobalContext* globalCtx) {
if (this->unk_168 == 0) {
this->unk_168 = 3;
}
- Camera_ChangeSetting(globalCtx->cameraPtrs[0], CAM_SET_HIDAN1);
+ Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], CAM_SET_HIDAN1);
} else if (!func_8004356C(&this->dyna)) {
if (this->unk_168 != 0) {
- Camera_ChangeSetting(globalCtx->cameraPtrs[0], CAM_SET_DUNGEON0);
+ Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], CAM_SET_DUNGEON0);
}
this->unk_168 = 0;
}
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 a0cd13ea8..7312c5d0a 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
@@ -104,7 +104,7 @@ void func_80891CF4(BgIceShutter* this, GlobalContext* globalCtx) {
Audio_PlaySoundAtPosition(globalCtx, &this->dyna.actor.world.pos, 30, NA_SE_EV_SLIDE_DOOR_OPEN);
this->actionFunc = func_80891DD4;
if (this->dyna.actor.shape.rot.x == 0) {
- func_80080480(globalCtx, &this->dyna.actor);
+ OnePointCutscene_Attention(globalCtx, &this->dyna.actor);
}
}
}
@@ -113,7 +113,7 @@ void func_80891D6C(BgIceShutter* this, GlobalContext* globalCtx) {
if (Flags_GetSwitch(globalCtx, this->dyna.actor.params)) {
Audio_PlaySoundAtPosition(globalCtx, &this->dyna.actor.world.pos, 30, NA_SE_EV_SLIDE_DOOR_OPEN);
this->actionFunc = func_80891DD4;
- func_80080480(globalCtx, &this->dyna.actor);
+ OnePointCutscene_Attention(globalCtx, &this->dyna.actor);
}
}
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 4c0ef12c0..f68dc3cd7 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
@@ -194,9 +194,9 @@ void BgJya1flift_Update(Actor* thisx, GlobalContext* globalCtx) {
tempIsRiding = func_8004356C(&this->dyna) ? true : false;
if ((this->actionFunc == BgJya1flift_Move) || (this->actionFunc == BgJya1flift_DelayMove)) {
if (tempIsRiding) {
- Camera_ChangeSetting(globalCtx->cameraPtrs[0], CAM_SET_HIDAN1);
+ Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], CAM_SET_HIDAN1);
} else if (!tempIsRiding && this->isLinkRiding) {
- Camera_ChangeSetting(globalCtx->cameraPtrs[0], CAM_SET_DUNGEON0);
+ Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], CAM_SET_DUNGEON0);
}
}
this->isLinkRiding = tempIsRiding;
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 6adb5d541..5a632075b 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
@@ -228,9 +228,7 @@ void BgJyaBigmirror_DrawLightBeam(Actor* thisx, GlobalContext* globalCtx) {
}
func_800D1694(this->actor.world.pos.x, this->actor.world.pos.y + 40.0f, this->actor.world.pos.z,
&this->actor.shape.rot);
- // Second float seems to be either this or 1613/1280 + 0.13: both numerators relate to the lift height
- Matrix_Scale(0.1f, (this->liftHeight * -(1.0f / 1280.0f)) + (973.0f / 1280.0f + 0.63f) /* 1.3901563f */, 0.1f,
- MTXMODE_APPLY);
+ Matrix_Scale(0.1f, (this->liftHeight * -(1.0f / 1280.0f)) + (1779.4f / 1280.0f), 0.1f, MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_jya_bigmirror.c", 457),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_XLU_DISP++, D_0600BC70);
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 baf6ee7d9..2b474bdc9 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
@@ -151,7 +151,7 @@ void BgJyaBombchuiwa_SetupWaitForExplosion(BgJyaBombchuiwa* this, GlobalContext*
void BgJyaBombchuiwa_WaitForExplosion(BgJyaBombchuiwa* this, GlobalContext* globalCtx) {
if ((this->collider.base.acFlags & AC_HIT) || (this->timer > 0)) {
if (this->timer == 0) {
- func_800800F8(globalCtx, 3410, -99, &this->actor, 0);
+ OnePointCutscene_Init(globalCtx, 3410, -99, &this->actor, MAIN_CAM);
}
this->timer++;
if (this->timer > 10) {
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 c6f114f91..b740369ae 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
@@ -99,7 +99,7 @@ Vec3f D_808973A4[] = {
{ 17.2f, 70.0f, 0.6f },
{ 8.0f, 100.0f, 7.6f },
{ 0.0f, 70.0f, -11.3f },
- { 0.0f, 44.6000023f, -2.0f },
+ { 0.0f, 44.600002f, -2.0f },
{ 0.0f, 15.0f, 10.6f },
{ 0.0f, 15.0f, 0.3f },
{ 0.0f, 26.0f, 11.6f },
@@ -109,8 +109,8 @@ Vec3f D_808973A4[] = {
};
Vec3f D_808974DC[] = {
- { 12.0f, 21.3000011f, -2.5f }, { 30.0f, 21.3000011f, -2.5f }, { -15.0f, 21.3000011f, -2.5f },
- { -30.0f, 21.3000011f, -2.5f }, { 12.0f, 21.3000011f, -2.5f },
+ { 12.0f, 21.300001f, -2.5f }, { 30.0f, 21.300001f, -2.5f }, { -15.0f, 21.300001f, -2.5f },
+ { -30.0f, 21.300001f, -2.5f }, { 12.0f, 21.300001f, -2.5f },
};
s32 D_80897518[] = { 0x80, 0xA0, 0xA0, 0x80 };
@@ -250,7 +250,7 @@ void func_80895C74(BgJyaCobra* this, GlobalContext* globalCtx) {
phi_v0 = this->dyna.actor.shape.rot.y - D_80897314[(params & 3)];
phi_v0 = ABS(phi_v0);
if (phi_v0 < 0x2000 && phi_v0 != -0x8000) {
- this->unk_18C += ((phi_v0 - 0x2000) * 0.00018310547f);
+ this->unk_18C += (phi_v0 - 0x2000) * (3.0f / 0x4000);
if (this->unk_18C < 0.0f) {
this->unk_18C = 0.0f;
}
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 a5410b1de..a0228273a 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
@@ -144,7 +144,7 @@ void func_80897B48(BgJyaGoroiwa* this, GlobalContext* globalCtx) {
} else {
tmpf2 = 1569.0f - thisx->world.pos.x;
tmpf1 = fabsf(tmpf2) - 103.0f;
- thisx->world.pos.y = (0.38043478f * tmpf1) - 129.5f;
+ thisx->world.pos.y = ((35.0f / 92.0f) * tmpf1) - 129.5f;
}
if (this->collider.base.atFlags & AT_HIT) {
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 6485e311a..288d4dfe4 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
@@ -84,7 +84,7 @@ void func_80899880(BgJyaKanaami* this) {
void func_80899894(BgJyaKanaami* this, GlobalContext* globalCtx) {
if (Flags_GetSwitch(globalCtx, this->dyna.actor.params & 0x3F) || this->unk_16A > 0) {
if (this->dyna.actor.world.pos.x > -1000.0f && this->unk_16A == 0) {
- func_800800F8(globalCtx, 0xD7A, -0x63, &this->dyna.actor, 0);
+ OnePointCutscene_Init(globalCtx, 3450, -99, &this->dyna.actor, MAIN_CAM);
}
this->unk_16A += 1;
if (this->unk_16A >= 0xA) {
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 db6549f6d..2d111ebb3 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
@@ -102,7 +102,7 @@ void BgJyaLift_DelayMove(BgJyaLift* this, GlobalContext* globalCtx) {
if (Flags_GetSwitch(globalCtx, this->dyna.actor.params & 0x3F) || (this->moveDelay > 0)) {
this->moveDelay++;
if (this->moveDelay >= 20) {
- func_800800F8(globalCtx, 0xD66, -0x63, &this->dyna.actor, 0);
+ OnePointCutscene_Init(globalCtx, 3430, -99, &this->dyna.actor, MAIN_CAM);
BgJyaLift_SetupMove(this);
}
}
@@ -143,10 +143,10 @@ void BgJyaLift_Update(Actor* thisx, GlobalContext* globalCtx) {
this->actionFunc(this, globalCtx);
}
if ((this->dyna.unk_160 & 4) && ((this->unk_16B & 4) == 0)) {
- Camera_ChangeSetting(globalCtx2->cameraPtrs[0], CAM_SET_TEPPEN);
+ Camera_ChangeSetting(globalCtx2->cameraPtrs[MAIN_CAM], CAM_SET_TEPPEN);
} else if (((this->dyna.unk_160) & 4) == 0 && ((this->unk_16B & 4)) &&
- (globalCtx2->cameraPtrs[0]->setting == 0x3F)) {
- Camera_ChangeSetting(globalCtx2->cameraPtrs[0], CAM_SET_DUNGEON0);
+ (globalCtx2->cameraPtrs[MAIN_CAM]->setting == CAM_SET_TEPPEN)) {
+ Camera_ChangeSetting(globalCtx2->cameraPtrs[MAIN_CAM], CAM_SET_DUNGEON0);
}
this->unk_16B = this->dyna.unk_160;
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 f7bb8ff55..9374eb14f 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
@@ -213,7 +213,7 @@ void BgJyaMegami_DetectLight(BgJyaMegami* this, GlobalContext* globalCtx) {
Flags_SetSwitch(globalCtx, this->dyna.actor.params & 0x3F);
BgJyaMegami_SetupExplode(this);
Audio_PlaySoundAtPosition(globalCtx, &this->dyna.actor.world.pos, 100, NA_SE_EV_FACE_EXPLOSION);
- func_800800F8(globalCtx, 0xD70, -0x63, &this->dyna.actor, 0);
+ OnePointCutscene_Init(globalCtx, 3440, -99, &this->dyna.actor, MAIN_CAM);
} else {
if (this->lightTimer < 8) {
this->crumbleIndex = 0;
@@ -331,8 +331,8 @@ void BgJyaMegami_DrawExplode(BgJyaMegami* this, GlobalContext* globalCtx) {
piece = &this->pieces[i];
Matrix_Translate(piece->pos.x + sPiecesInit[i].unk_00.x, piece->pos.y + sPiecesInit[i].unk_00.y,
piece->pos.z + sPiecesInit[i].unk_00.z, MTXMODE_NEW);
- Matrix_RotateY(piece->rotVelY * 0.0000958738f, MTXMODE_APPLY);
- Matrix_RotateX(piece->rotVelX * 0.0000958738f, MTXMODE_APPLY);
+ Matrix_RotateY(piece->rotVelY * (M_PI / 0x8000), MTXMODE_APPLY);
+ Matrix_RotateX(piece->rotVelX * (M_PI / 0x8000), MTXMODE_APPLY);
Matrix_Scale(0.1f, 0.1f, 0.1f, MTXMODE_APPLY);
Matrix_Translate(sPiecesInit[i].unk_00.x * -10.0f, sPiecesInit[i].unk_00.y * -10.0f,
sPiecesInit[i].unk_00.z * -10.0f, MTXMODE_APPLY);
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 2150cacc0..13b73eb51 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
@@ -88,9 +88,9 @@ void BgMizuShutter_Destroy(BgMizuShutter* thisx, GlobalContext* globalCtx) {
void BgMizuShutter_WaitForSwitch(BgMizuShutter* this, GlobalContext* globalCtx) {
if (Flags_GetSwitch(globalCtx, (u16)this->dyna.actor.params & 0x3F)) {
if (ABS(this->dyna.actor.world.rot.x) > 0x2C60) {
- func_800800F8(globalCtx, 0x119E, -0x63, &this->dyna.actor, 0);
+ OnePointCutscene_Init(globalCtx, 4510, -99, &this->dyna.actor, MAIN_CAM);
} else {
- func_80080480(globalCtx, &this->dyna.actor);
+ OnePointCutscene_Attention(globalCtx, &this->dyna.actor);
}
this->actionFunc = BgMizuShutter_WaitForCutscene;
this->timer = 30;
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 760c5acef..367ddfd28 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
@@ -176,7 +176,7 @@ void BgMizuWater_WaitForAction(BgMizuWater* this, GlobalContext* globalCtx) {
waterLevelActionIndex = BgMizuWater_GetWaterLevelActionIndex(this->actor.params, globalCtx);
if (waterLevelActionIndex != 0) {
if (prevSwitchFlag != sWaterLevels[waterLevelActionIndex].switchFlag) {
- func_800800F8(globalCtx, 0xC30, -0x64 - waterLevelActionIndex, 0, 0);
+ OnePointCutscene_Init(globalCtx, 3120, -100 - waterLevelActionIndex, NULL, MAIN_CAM);
this->actor.params = sWaterLevels[waterLevelActionIndex].switchFlag;
this->targetY = sWaterLevels[waterLevelActionIndex].yDiff + this->baseY;
}
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 9a853a822..f51726dc6 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
@@ -151,7 +151,7 @@ void BgMoriBigst_StalfosFight(BgMoriBigst* this, GlobalContext* globalCtx) {
if ((this->dyna.actor.home.rot.z == 0) && ((this->dyna.actor.home.pos.y - 5.0f) <= PLAYER->actor.world.pos.y)) {
BgMoriBigst_SetupFall(this, globalCtx);
- func_800800F8(globalCtx, 0xC94, 0x48, &this->dyna.actor, 0);
+ OnePointCutscene_Init(globalCtx, 3220, 72, &this->dyna.actor, MAIN_CAM);
}
}
@@ -165,7 +165,7 @@ void BgMoriBigst_Fall(BgMoriBigst* this, GlobalContext* globalCtx) {
this->dyna.actor.world.pos.y = this->dyna.actor.home.pos.y;
BgMoriBigst_SetupLanding(this, globalCtx);
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_STONE_BOUND);
- func_800800F8(globalCtx, 0x3FC, 8, &this->dyna.actor, 0);
+ OnePointCutscene_Init(globalCtx, 1020, 8, &this->dyna.actor, MAIN_CAM);
func_8002DF38(globalCtx, NULL, 0x3C);
}
}
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 425651359..6f6386af8 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
@@ -172,8 +172,8 @@ void BgMoriElevator_MoveIntoGround(BgMoriElevator* this, GlobalContext* globalCt
void func_808A1CF4(BgMoriElevator* this, GlobalContext* globalCtx) {
this->actionFunc = BgMoriElevator_MoveAboveGround;
- func_800800F8(globalCtx, 0xC9E, 0x46, &this->dyna.actor, 0);
- func_800800F8(globalCtx, 0x3FC, 0xF, &this->dyna.actor, 0);
+ OnePointCutscene_Init(globalCtx, 3230, 70, &this->dyna.actor, MAIN_CAM);
+ OnePointCutscene_Init(globalCtx, 1020, 15, &this->dyna.actor, MAIN_CAM);
}
void BgMoriElevator_MoveAboveGround(BgMoriElevator* this, GlobalContext* globalCtx) {
diff --git a/src/overlays/actors/ovl_Bg_Mori_Hashira4/z_bg_mori_hashira4.c b/src/overlays/actors/ovl_Bg_Mori_Hashira4/z_bg_mori_hashira4.c
index 29c4555ad..de7701396 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
@@ -140,7 +140,7 @@ void BgMoriHashira4_GateWait(BgMoriHashira4* this, GlobalContext* globalCtx) {
if (this->gateTimer > 30) {
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_METALDOOR_OPEN);
BgMoriHashira4_SetupAction(this, BgMoriHashira4_GateOpen);
- func_800800F8(globalCtx, 0x177A, 0x14, &this->dyna.actor, 0);
+ OnePointCutscene_Init(globalCtx, 6010, 20, &this->dyna.actor, MAIN_CAM);
sUnkTimer++;
}
}
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 0eff3b9dd..9e9d0eb78 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
@@ -23,7 +23,7 @@ void BgMoriHineri_SpawnBossKeyChest(BgMoriHineri* this, GlobalContext* globalCtx
void BgMoriHineri_DoNothing(BgMoriHineri* this, GlobalContext* globalCtx);
void func_808A3D58(BgMoriHineri* this, GlobalContext* globalCtx);
-static s16 D_808A43E0 = -1;
+static s16 sNextCamIdx = SUBCAM_NONE;
const ActorInit Bg_Mori_Hineri_InitVars = {
ACTOR_BG_MORI_HINERI,
@@ -173,14 +173,14 @@ void func_808A3C8C(BgMoriHineri* this, GlobalContext* globalCtx) {
f0 = 1100.0f - (player->actor.world.pos.z - this->dyna.actor.world.pos.z);
this->dyna.actor.shape.rot.z = CLAMP(f0, 0.0f, 1000.0f) * 16.384f;
- Camera_ChangeSetting(globalCtx->cameraPtrs[0], CAM_SET_DUNGEON1);
+ Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], CAM_SET_DUNGEON1);
if (this->dyna.actor.params != 0) {
this->dyna.actor.shape.rot.z = -this->dyna.actor.shape.rot.z;
}
}
void func_808A3D58(BgMoriHineri* this, GlobalContext* globalCtx) {
- s16 defaultCamChildIdx;
+ s16 mainCamChildIdx;
if ((Flags_GetSwitch(globalCtx, this->switchFlag) &&
(this->dyna.actor.params == 0 || this->dyna.actor.params == 2)) ||
@@ -189,33 +189,33 @@ void func_808A3D58(BgMoriHineri* this, GlobalContext* globalCtx) {
this->dyna.actor.draw = BgMoriHineri_DrawHallAndRoom;
this->actionFunc = func_808A3E54;
- defaultCamChildIdx = globalCtx->cameraPtrs[0]->childCamIdx;
- if ((defaultCamChildIdx != 0) && (globalCtx->cameraPtrs[defaultCamChildIdx]->setting == CAM_SET_DEMO1)) {
- func_800803F0(globalCtx, defaultCamChildIdx);
+ mainCamChildIdx = globalCtx->cameraPtrs[MAIN_CAM]->childCamIdx;
+ if ((mainCamChildIdx != SUBCAM_FREE) && (globalCtx->cameraPtrs[mainCamChildIdx]->setting == CAM_SET_DEMO1)) {
+ OnePointCutscene_EndCutscene(globalCtx, mainCamChildIdx);
}
- func_800800F8(globalCtx, 0xCBC, 0x28, &this->dyna.actor, 0);
- D_808A43E0 = func_800800F8(globalCtx, 0xCBD, 0x28, &this->dyna.actor, 0);
+ OnePointCutscene_Init(globalCtx, 3260, 40, &this->dyna.actor, MAIN_CAM);
+ sNextCamIdx = OnePointCutscene_Init(globalCtx, 3261, 40, &this->dyna.actor, MAIN_CAM);
}
}
void func_808A3E54(BgMoriHineri* this, GlobalContext* globalCtx) {
s8 objBankIndex;
- if (globalCtx->activeCamera == D_808A43E0) {
- if (D_808A43E0 != 0) {
+ if (globalCtx->activeCamera == sNextCamIdx) {
+ if (sNextCamIdx != MAIN_CAM) {
objBankIndex = this->dyna.actor.objBankIndex;
this->dyna.actor.objBankIndex = this->moriHineriObjIdx;
this->moriHineriObjIdx = objBankIndex;
this->dyna.actor.params ^= 1;
- D_808A43E0 = 0;
+ sNextCamIdx = MAIN_CAM;
func_80078884(NA_SE_SY_TRE_BOX_APPEAR);
} else {
this->dyna.actor.draw = NULL;
this->actionFunc = func_808A3D58;
- D_808A43E0 = -1;
+ sNextCamIdx = SUBCAM_NONE;
}
}
- if ((D_808A43E0 > 0) && ((ACTIVE_CAM->eye.z - this->dyna.actor.world.pos.z) < 1100.0f)) {
+ if ((sNextCamIdx >= SUBCAM_FIRST) && ((ACTIVE_CAM->eye.z - this->dyna.actor.world.pos.z) < 1100.0f)) {
func_8002F948(&this->dyna.actor, NA_SE_EV_FLOOR_ROLLING - SFX_FLAG);
}
}
@@ -260,7 +260,7 @@ void BgMoriHineri_DrawHallAndRoom(Actor* thisx, GlobalContext* globalCtx) {
gSPSegment(POLY_OPA_DISP++, 0x08, &D_80116280[2]);
Matrix_Put(&mtx);
Matrix_Translate(147.0f, -245.0f, -453.0f, MTXMODE_APPLY);
- Matrix_RotateY(1.5707964f, MTXMODE_APPLY);
+ Matrix_RotateY(M_PI / 2, MTXMODE_APPLY);
Matrix_Scale(0.01f, 0.01f, 0.01f, MTXMODE_APPLY);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_mori_hineri.c", 689),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
@@ -268,7 +268,7 @@ void BgMoriHineri_DrawHallAndRoom(Actor* thisx, GlobalContext* globalCtx) {
Matrix_Put(&mtx);
Matrix_Translate(167.0f, -218.0f, -453.0f, MTXMODE_APPLY);
if (Flags_GetTreasure(globalCtx, 0xE)) {
- Matrix_RotateZ(1.3008157f, MTXMODE_APPLY);
+ Matrix_RotateZ(0x3500 * (M_PI / 0x8000), MTXMODE_APPLY);
} else {
Matrix_RotateZ(M_PI, MTXMODE_APPLY);
}
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 d43f5c1a8..fa52f8550 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
@@ -122,10 +122,10 @@ void BgMoriIdomizu_Main(BgMoriIdomizu* this, GlobalContext* globalCtx) {
this->targetWaterLevel = 184.0f;
}
if (switchFlagSet && !this->prevSwitchFlagSet) {
- func_800800F8(globalCtx, 0xCA8, 0x46, thisx, 0);
+ OnePointCutscene_Init(globalCtx, 3240, 70, thisx, MAIN_CAM);
this->drainTimer = 90;
} else if (!switchFlagSet && this->prevSwitchFlagSet) {
- func_800800F8(globalCtx, 0xCA8, 0x46, thisx, 0);
+ OnePointCutscene_Init(globalCtx, 3240, 70, thisx, MAIN_CAM);
this->drainTimer = 90;
thisx->world.pos.y = 0.0f;
}
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 9fc70adb6..f285d149e 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
@@ -208,15 +208,15 @@ void BgMoriRakkatenjo_Update(Actor* thisx, GlobalContext* globalCtx) {
}
this->actionFunc(this, globalCtx);
if (BgMoriRakkatenjo_IsLinkUnder(this, globalCtx)) {
- if (sCamSetting == 0) {
+ if (sCamSetting == CAM_SET_NONE) {
osSyncPrintf("camera changed (mori rakka tenjyo) ... \n");
- sCamSetting = globalCtx->cameraPtrs[0]->setting;
- Camera_SetCameraData(globalCtx->cameraPtrs[0], 1, &this->dyna.actor, NULL, 0, 0, 0);
- Camera_ChangeSetting(globalCtx->cameraPtrs[0], CAM_SET_MORI1);
+ sCamSetting = globalCtx->cameraPtrs[MAIN_CAM]->setting;
+ Camera_SetCameraData(globalCtx->cameraPtrs[MAIN_CAM], 1, &this->dyna.actor, NULL, 0, 0, 0);
+ Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], CAM_SET_MORI1);
}
- } else if (sCamSetting != 0) {
+ } else if (sCamSetting != CAM_SET_NONE) {
osSyncPrintf("camera changed (previous) ... \n");
- Camera_ChangeSetting(globalCtx->cameraPtrs[0], CAM_SET_DUNGEON1);
+ Camera_ChangeSetting(globalCtx->cameraPtrs[MAIN_CAM], CAM_SET_DUNGEON1);
sCamSetting = 0;
}
}
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 df2714de3..c8a107893 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
@@ -244,7 +244,7 @@ void BgPoEvent_BlockWait(BgPoEvent* this, GlobalContext* globalCtx) {
this->dyna.actor.world.pos.y = 833.0f;
if (sPuzzleState == 0x3F) {
if (this->type == 1) {
- func_800800F8(globalCtx, 0xC4E, 0x41, NULL, 0);
+ OnePointCutscene_Init(globalCtx, 3150, 65, NULL, MAIN_CAM);
}
this->timer = 45;
this->actionFunc = BgPoEvent_BlockShake;
@@ -348,7 +348,7 @@ void BgPoEvent_BlockIdle(BgPoEvent* this, GlobalContext* globalCtx) {
this->dyna.actor.world.pos.y - 30.0f, this->dyna.actor.world.pos.z + 30.0f, 0,
this->dyna.actor.shape.rot.y, 0, this->dyna.actor.params + 0x300);
if (amy != NULL) {
- func_800800F8(globalCtx, 0xC62, 0x1E, amy, 0);
+ OnePointCutscene_Init(globalCtx, 3170, 30, amy, MAIN_CAM);
}
func_80078884(NA_SE_SY_CORRECT_CHIME);
gSaveContext.timer1State = 0xA;
@@ -544,12 +544,12 @@ void BgPoEvent_PaintingPresent(BgPoEvent* this, GlobalContext* globalCtx) {
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_PO_SISTERS, thisx->world.pos.x,
thisx->world.pos.y - 40.0f, thisx->world.pos.z, 0, thisx->shape.rot.y, 0,
thisx->params + ((this->type - 1) << 8));
- func_800800F8(globalCtx, 0xC58, 0x50, thisx, 0);
+ OnePointCutscene_Init(globalCtx, 3160, 80, thisx, MAIN_CAM);
func_80078884(NA_SE_SY_CORRECT_CHIME);
} else {
Audio_PlayActorSound2(thisx, NA_SE_EN_PO_LAUGH2);
- func_800800F8(globalCtx, 0xC58, 0x23, thisx, 0);
+ OnePointCutscene_Init(globalCtx, 3160, 35, thisx, MAIN_CAM);
}
if (thisx->parent != NULL) {
thisx->parent->child = NULL;
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 7fa6fed6a..9a1f96a0f 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
@@ -150,7 +150,7 @@ void BgSpot01Idohashira_Destroy(Actor* thisx, GlobalContext* globalCtx) {
}
s32 BgSpot01Idohashira_NotInCsMode(GlobalContext* globalCtx) {
- if (globalCtx->csCtx.state == 0) {
+ if (globalCtx->csCtx.state == CS_STATE_IDLE) {
return true;
}
return false;
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 46cf0846b..2e22f965f 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
@@ -80,7 +80,7 @@ void func_808ADEF0(BgSpot03Taki* this, GlobalContext* globalCtx) {
if (Flags_GetSwitch(globalCtx, this->switchFlag)) {
this->state = WATERFALL_OPENING_ANIMATED;
this->timer = 40;
- func_800800F8(globalCtx, 0x1004, -0x63, NULL, 0);
+ OnePointCutscene_Init(globalCtx, 4100, -99, NULL, MAIN_CAM);
}
} else if (this->state == WATERFALL_OPENING_IDLE) {
this->timer--;
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 d2b342bb9..ffe066cbc 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
@@ -84,7 +84,7 @@ void func_808AE5B4(BgSpot05Soko* this, GlobalContext* globalCtx) {
if (Flags_GetSwitch(globalCtx, this->switchFlag)) {
Audio_PlaySoundAtPosition(globalCtx, &this->dyna.actor.world.pos, 30, NA_SE_EV_METALDOOR_CLOSE);
Actor_SetFocus(&this->dyna.actor, 50.0f);
- func_80080480(globalCtx, &this->dyna.actor);
+ OnePointCutscene_Attention(globalCtx, &this->dyna.actor);
this->actionFunc = func_808AE630;
this->dyna.actor.speedXZ = 0.5f;
}
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 04582721e..7b712be45 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
@@ -323,7 +323,7 @@ void BgSpot06Objects_LockWait(BgSpot06Objects* this, GlobalContext* globalCtx) {
this->actionFunc = BgSpot06Objects_LockPullOutward;
Audio_PlaySoundGeneral(NA_SE_SY_CORRECT_CHIME, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Flags_SetSwitch(globalCtx, this->switchFlag);
- func_800800F8(globalCtx, 0x1018, 170, &this->dyna.actor, 0);
+ OnePointCutscene_Init(globalCtx, 4120, 170, &this->dyna.actor, MAIN_CAM);
} else {
CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
}
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 683a78a1d..c74daa512 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
@@ -128,7 +128,7 @@ void func_808B0324(BgSpot08Bakudankabe* this, GlobalContext* globalCtx) {
temp1 = (Rand_ZeroOne() - 0.5f) * 440.0f;
temp2 = (Rand_ZeroOne() - 0.5f) * 20.0f;
burstDepthY.x = this->dyna.actor.world.pos.x + temp2 * sinY + (temp1 * cosY);
- burstDepthY.y = (this->dyna.actor.world.pos.y + 20.0f) + (i * 5.4166665f);
+ burstDepthY.y = (this->dyna.actor.world.pos.y + 20.0f) + (i * (65.0f / 12.0f));
burstDepthY.z = this->dyna.actor.world.pos.z + temp2 * cosY - (temp1 * sinY);
burstDepthX.y = (Rand_ZeroOne() - 0.2f) * 12.0f;
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 5395be18b..83bfd268b 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
@@ -251,7 +251,7 @@ void BgSpot08Iceblock_Roll(BgSpot08Iceblock* this, GlobalContext* globalCtx) {
// Rotation by the angle between surfaceNormal and the vertical about rotationAxis
func_800D23FC(Math_FAcosF(Math3D_Cos(&sVerticalVector, &this->surfaceNormal)), &this->rotationAxis, MTXMODE_NEW);
- Matrix_RotateY(this->dyna.actor.shape.rot.y * (M_PI / 32768), MTXMODE_APPLY);
+ Matrix_RotateY(this->dyna.actor.shape.rot.y * (M_PI / 0x8000), MTXMODE_APPLY);
Matrix_Get(&mtx);
func_800D20CC(&mtx, &this->dyna.actor.shape.rot, MTXMODE_NEW);
}
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 cabec315d..1ea9234db 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
@@ -97,7 +97,7 @@ void func_808B2970(BgSpot11Oasis* this) {
void func_808B2980(BgSpot11Oasis* this, GlobalContext* globalCtx) {
if (Flags_GetEnv(globalCtx, 5) && func_808B280C(globalCtx)) {
- func_800800F8(globalCtx, 0x1036, -99, &this->actor, 0);
+ OnePointCutscene_Init(globalCtx, 4150, -99, &this->actor, MAIN_CAM);
func_808B29E0(this);
}
}
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 ebfb01f27..c2c755ab8 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
@@ -88,7 +88,7 @@ void func_808B30C0(BgSpot12Gate* this) {
void func_808B30D8(BgSpot12Gate* this, GlobalContext* globalCtx) {
if (Flags_GetSwitch(globalCtx, this->dyna.actor.params & 0x3F)) {
func_808B3134(this);
- func_800800F8(globalCtx, 0x1040, -0x63, &this->dyna.actor, 0);
+ OnePointCutscene_Init(globalCtx, 4160, -99, &this->dyna.actor, MAIN_CAM);
}
}
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 d9f0d1d51..70cc743fb 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
@@ -87,7 +87,7 @@ void func_808B357C(BgSpot12Saku* this, GlobalContext* globalCtx) {
if (Flags_GetSwitch(globalCtx, this->dyna.actor.params & 0x3F)) {
func_808B35E4(this);
this->timer = 20;
- func_800800F8(globalCtx, 0x104A, -0x63, &this->dyna.actor, 0);
+ OnePointCutscene_Init(globalCtx, 4170, -99, &this->dyna.actor, MAIN_CAM);
}
}
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 42163ae6a..ef4a2ca3f 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
@@ -415,7 +415,7 @@ void func_808B57E0(BgSpot16Bombstone* this, GlobalContext* globalCtx) {
currentBomb = sPlayerBomb;
if (currentBomb->timer > 0) {
sTimer = currentBomb->timer + 20;
- func_800800F8(globalCtx, 0x1054, sTimer, NULL, 0);
+ OnePointCutscene_Init(globalCtx, 4180, sTimer, NULL, MAIN_CAM);
}
}
} else if (player->stateFlags1 & 0x800) {
@@ -445,7 +445,7 @@ void func_808B5950(BgSpot16Bombstone* this, GlobalContext* globalCtx) {
func_808B561C(this, globalCtx);
- func_800800F8(globalCtx, 0x1054, 0x32, NULL, 0);
+ OnePointCutscene_Init(globalCtx, 4180, 50, NULL, MAIN_CAM);
Flags_SetSwitch(globalCtx, this->switchFlag);
gSaveContext.eventChkInf[2] |= 8;
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 00fc83081..cebf006b0 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
@@ -96,7 +96,7 @@ void BgSpot16Doughnut_Update(Actor* thisx, GlobalContext* globalCtx) {
} else {
this->envColorAlpha = 255;
}
- } else if (globalCtx->csCtx.state != 0 && globalCtx->csCtx.npcActions[2] != NULL &&
+ } else if (globalCtx->csCtx.state != CS_STATE_IDLE && globalCtx->csCtx.npcActions[2] != NULL &&
globalCtx->csCtx.npcActions[2]->action == 2) {
if (this->envColorAlpha >= 6) {
this->envColorAlpha -= 5;
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 cbf64c9f9..6c092bc9f 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
@@ -180,7 +180,7 @@ void func_808B7AEC(BgSpot18Basket* this) {
void func_808B7AFC(BgSpot18Basket* this, GlobalContext* globalCtx) {
if (Flags_GetSwitch(globalCtx, (this->dyna.actor.params >> 8) & 0x3F)) {
- func_800800F8(globalCtx, 4220, 80, &this->dyna.actor, 0);
+ OnePointCutscene_Init(globalCtx, 4220, 80, &this->dyna.actor, MAIN_CAM);
func_808B7B58(this);
}
}
@@ -228,7 +228,7 @@ void func_808B7BCC(BgSpot18Basket* this, GlobalContext* globalCtx) {
if (positionDiff > 120.0f && positionDiff < 200.0f) {
if (Math3D_Dist2DSq(colliderBaseAc->world.pos.z, this->colliderJntSph.base.ac->world.pos.x,
this->dyna.actor.world.pos.z, this->dyna.actor.world.pos.x) < SQ(32.0f)) {
- func_800800F8(globalCtx, 4210, 240, &this->dyna.actor, 0);
+ OnePointCutscene_Init(globalCtx, 4210, 240, &this->dyna.actor, MAIN_CAM);
func_808B7D38(this);
func_8003EBF8(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
}
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 cfeb853a3..4d4249b63 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
@@ -91,7 +91,7 @@ void func_808B95AC(BgSpot18Shutter* this, GlobalContext* globalCtx) {
void func_808B95B8(BgSpot18Shutter* this, GlobalContext* globalCtx) {
if (Flags_GetSwitch(globalCtx, this->dyna.actor.params & 0x3F)) {
Actor_SetFocus(&this->dyna.actor, 70.0f);
- func_80080480(globalCtx, &this->dyna.actor);
+ OnePointCutscene_Attention(globalCtx, &this->dyna.actor);
this->actionFunc = func_808B9698;
}
}
@@ -103,7 +103,7 @@ void func_808B9618(BgSpot18Shutter* this, GlobalContext* globalCtx) {
this->actionFunc = func_808B9698;
} else {
this->actionFunc = func_808B971C;
- func_800800F8(globalCtx, 0x107D, 0x8C, &this->dyna.actor, 0);
+ OnePointCutscene_Init(globalCtx, 4221, 140, &this->dyna.actor, MAIN_CAM);
}
}
}
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 48a52c1a9..71d972450 100644
--- a/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth.c
+++ b/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth.c
@@ -93,7 +93,7 @@ void BgTreemouth_Destroy(Actor* thisx, GlobalContext* globalCtx) {
void func_808BC65C(BgTreemouth* this, GlobalContext* globalCtx) {
CsCmdActorAction* npcAction;
- if ((globalCtx->csCtx.state != 0)) {
+ if ((globalCtx->csCtx.state != CS_STATE_IDLE)) {
npcAction = globalCtx->csCtx.npcActions[0];
if (npcAction != NULL) {
if (npcAction->action == 2) {
@@ -166,7 +166,7 @@ void func_808BC8B8(BgTreemouth* this, GlobalContext* globalCtx) {
void func_808BC9EC(BgTreemouth* this, GlobalContext* globalCtx) {
Player* player = PLAYER;
- if (globalCtx->csCtx.state == 3) {
+ if (globalCtx->csCtx.state == CS_STATE_UNSKIPPABLE_INIT) {
if (func_8002E12C(&this->dyna.actor, 350.0f, 0x7530)) {
player->actor.world.pos.x = 3827.0f;
player->actor.world.pos.y = -161.0f;
@@ -180,7 +180,7 @@ void func_808BC9EC(BgTreemouth* this, GlobalContext* globalCtx) {
D_8015FCC4 = 0xFFFF;
globalCtx->csCtx.unk_1A = 0;
globalCtx->csCtx.unk_1B = 0;
- globalCtx->csCtx.state = 2;
+ globalCtx->csCtx.state = CS_STATE_SKIPPABLE_EXEC;
if (globalCtx->msgCtx.choiceIndex == 0) {
globalCtx->csCtx.segment = D_808BD520;
@@ -197,7 +197,7 @@ void func_808BC9EC(BgTreemouth* this, GlobalContext* globalCtx) {
void func_808BCAF0(BgTreemouth* this, GlobalContext* globalCtx) {
CsCmdActorAction* npcAction;
- if (globalCtx->csCtx.state != 0) {
+ if (globalCtx->csCtx.state != CS_STATE_IDLE) {
npcAction = globalCtx->csCtx.npcActions[0];
if (npcAction != NULL) {
if (npcAction->action == 2) {
diff --git a/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth_cutscene_data.c b/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth_cutscene_data.c
index e6aba7a0b..a4c16b94c 100644
--- a/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth_cutscene_data.c
+++ b/src/overlays/actors/ovl_Bg_Treemouth/z_bg_treemouth_cutscene_data.c
@@ -7,40 +7,40 @@ CutsceneData D_808BCE20[] = {
CS_UNK_DATA_LIST(0x00000015, 1),
CS_UNK_DATA(0x00010000, 0x0BB80000, 0x00000000, 0x00000000, 0x0000000F, 0xFFFFFFDE, 0x00000000, 0x0000000F, 0xFFFFFFDE, 0x00000000, 0x00000000, 0x00000000),
CS_PLAYER_ACTION_LIST(2),
- CS_PLAYER_ACTION(0x0002, 0, 33, 0x54B2, 0x0000, 0x0000, 2614, 0, -451, 2808, 0, -559, 5.878787994384766f, 0.0f, -5.878787994384766f),
- CS_PLAYER_ACTION(0x0004, 33, 42, 0x5945, 0x0000, 0x0000, 2808, 0, -559, 2857, 0, -594, 5.44444465637207f, 0.0f, -5.44444465637207f),
+ CS_PLAYER_ACTION(0x0002, 0, 33, 0x54B2, 0x0000, 0x0000, 2614, 0, -451, 2808, 0, -559, 5.878788f, 0.0f, -5.878788f),
+ CS_PLAYER_ACTION(0x0004, 33, 42, 0x5945, 0x0000, 0x0000, 2808, 0, -559, 2857, 0, -594, 5.4444447f, 0.0f, -5.4444447f),
CS_CAM_POS_LIST(0, 1091),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 47.199954986572266f, 2753, 46, -354, 0x59A8),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 47.199954986572266f, 2753, 46, -354, 0x20B8),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 47.199954986572266f, 2753, 46, -354, 0x0000),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 47.199954986572266f, 2753, 46, -354, 0x6430),
- CS_CAM_POS(CS_CMD_STOP, 0x00, 0, 47.199954986572266f, 2753, 46, -354, 0x0000),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 47.199955f, 2753, 46, -354, 0x59A8),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 47.199955f, 2753, 46, -354, 0x20B8),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 47.199955f, 2753, 46, -354, 0x0000),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 47.199955f, 2753, 46, -354, 0x6430),
+ CS_CAM_POS(CS_CMD_STOP, 0x00, 0, 47.199955f, 2753, 46, -354, 0x0000),
CS_CAM_POS_LIST(60, 1271),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 47.199954986572266f, 2753, 46, -354, 0x20BA),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 47.199954986572266f, 2753, 46, -354, 0x44B8),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 47.199954986572266f, 2753, 46, -354, 0x8080),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 47.199954986572266f, 2705, 67, -302, 0x2D9A),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 47.199954986572266f, 2596, 127, -195, 0x005E),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 47.199954986572266f, 2596, 127, -195, 0xFFFF),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 47.199954986572266f, 2596, 127, -195, 0x0000),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 47.199954986572266f, 2596, 127, -195, 0x5B80),
- CS_CAM_POS(CS_CMD_STOP, 0x00, 0, 47.199954986572266f, 2596, 127, -195, 0x7805),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 47.199955f, 2753, 46, -354, 0x20BA),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 47.199955f, 2753, 46, -354, 0x44B8),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 47.199955f, 2753, 46, -354, 0x8080),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 47.199955f, 2705, 67, -302, 0x2D9A),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 47.199955f, 2596, 127, -195, 0x005E),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 47.199955f, 2596, 127, -195, 0xFFFF),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 47.199955f, 2596, 127, -195, 0x0000),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 47.199955f, 2596, 127, -195, 0x5B80),
+ CS_CAM_POS(CS_CMD_STOP, 0x00, 0, 47.199955f, 2596, 127, -195, 0x7805),
CS_CAM_FOCUS_POINT_LIST(0, 1120),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 47.199954986572266f, 2788, 23, -453, 0x20BA),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 47.199954986572266f, 2787, 23, -453, 0x44B8),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 1000, 47.199954986572266f, 2787, 23, -453, 0x8080),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 47.199954986572266f, 2787, 23, -453, 0x2D9A),
- CS_CAM_FOCUS_POINT(CS_CMD_STOP, 0x00, 30, 47.199954986572266f, 2787, 23, -453, 0x005E),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 47.199955f, 2788, 23, -453, 0x20BA),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 47.199955f, 2787, 23, -453, 0x44B8),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 1000, 47.199955f, 2787, 23, -453, 0x8080),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 47.199955f, 2787, 23, -453, 0x2D9A),
+ CS_CAM_FOCUS_POINT(CS_CMD_STOP, 0x00, 30, 47.199955f, 2787, 23, -453, 0x005E),
CS_CAM_FOCUS_POINT_LIST(60, 1300),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 47.199954986572266f, 2788, 23, -453, 0x20BA),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 47.199954986572266f, 2787, 23, -453, 0x44B8),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 47.199954986572266f, 2787, 23, -453, 0x8080),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 47.199954986572266f, 2777, 72, -378, 0x2D9A),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 47.199954986572266f, 2673, 127, -267, 0x005E),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 47.199954986572266f, 2673, 127, -267, 0xFFFF),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 1000, 47.199954986572266f, 2673, 127, -267, 0x0000),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 47.199954986572266f, 2673, 127, -267, 0x5B80),
- CS_CAM_FOCUS_POINT(CS_CMD_STOP, 0x00, 30, 47.199954986572266f, 2673, 127, -267, 0x7805),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 47.199955f, 2788, 23, -453, 0x20BA),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 47.199955f, 2787, 23, -453, 0x44B8),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 47.199955f, 2787, 23, -453, 0x8080),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 47.199955f, 2777, 72, -378, 0x2D9A),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 47.199955f, 2673, 127, -267, 0x005E),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 47.199955f, 2673, 127, -267, 0xFFFF),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 1000, 47.199955f, 2673, 127, -267, 0x0000),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 47.199955f, 2673, 127, -267, 0x5B80),
+ CS_CAM_FOCUS_POINT(CS_CMD_STOP, 0x00, 30, 47.199955f, 2673, 127, -267, 0x7805),
CS_TEXT_LIST(4),
CS_TEXT_NONE(0, 40),
CS_TEXT_DISPLAY_TEXTBOX(0x107D, 40, 60, 0x0000, 0xFFFF, 0xFFFF),
@@ -52,8 +52,8 @@ CutsceneData D_808BCE20[] = {
CS_NPC_ACTION(0x0001, 0, 3000, 0x0000, 0x0000, 0x0000, 0, -41, -28, 0, -41, -28, 0.0f, 0.0f, 0.0f),
CS_NPC_ACTION_LIST(62, 4),
CS_NPC_ACTION(0x0001, 0, 1, 0x0000, 0x0000, 0x0000, 2668, 46, -490, 2668, 46, -490, 0.0f, 0.0f, 0.0f),
- CS_NPC_ACTION(0x0004, 1, 50, 0x5479, 0x0000, 0x0000, 2668, 46, -490, 2890, 43, -612, 4.530612468719482f, -0.06122449040412903f, -4.530612468719482f),
- CS_NPC_ACTION(0x0004, 50, 100, 0x505C, 0x0000, 0x0000, 2890, 43, -612, 3109, 121, -705, 4.380000114440918f, 1.559999942779541f, -4.380000114440918f),
+ CS_NPC_ACTION(0x0004, 1, 50, 0x5479, 0x0000, 0x0000, 2668, 46, -490, 2890, 43, -612, 4.5306125f, -0.06122449f, -4.5306125f),
+ CS_NPC_ACTION(0x0004, 50, 100, 0x505C, 0x0000, 0x0000, 2890, 43, -612, 3109, 121, -705, 4.38f, 1.56f, -4.38f),
CS_NPC_ACTION(0x0001, 100, 2084, 0x0000, 0x0000, 0x0000, 3109, 121, -705, 3109, 121, -705, 0.0f, 0.0f, 0.0f),
CS_PLAY_BGM_LIST(1),
CS_PLAY_BGM(0x004C, 140, 141, 0x0000, 0x00000000, 0x00000000, 0xFFFFFFBA, 0x00000094, 0x00000000, 0xFFFFFFBA, 0x00000094),
@@ -72,10 +72,10 @@ CutsceneData D_808BD2A0[] = {
CS_NPC_ACTION(0x0001, 0, 3000, 0x0000, 0x0000, 0x0000, 0, -27, 26, 0, -27, 26, 0.0f, 0.0f, 0.0f),
CS_CAM_POS_LIST(0, 1091),
CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.0f, 3740, -141, -530, 0x7065),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 40.99992752075195f, 3740, -141, -530, 0x6167),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 40.99992752075195f, 3740, -141, -530, 0x6D5D),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 40.99992752075195f, 3740, -141, -530, 0xF348),
- CS_CAM_POS(CS_CMD_STOP, 0x00, 0, 40.99992752075195f, 3740, -141, -530, 0x9D94),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 40.999928f, 3740, -141, -530, 0x6167),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 40.999928f, 3740, -141, -530, 0x6D5D),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 40.999928f, 3740, -141, -530, 0xF348),
+ CS_CAM_POS(CS_CMD_STOP, 0x00, 0, 40.999928f, 3740, -141, -530, 0x9D94),
CS_CAM_POS_PLAYER_LIST(60, 1151),
CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 60.0f, -4, 5, 49, 0x7065),
CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 60.0f, -4, 5, 49, 0x6167),
@@ -83,11 +83,11 @@ CutsceneData D_808BD2A0[] = {
CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 60.0f, -4, 5, 49, 0xF348),
CS_CAM_POS_PLAYER(CS_CMD_STOP, 0x00, 0, 60.0f, -4, 5, 49, 0x9D94),
CS_CAM_FOCUS_POINT_LIST(0, 1120),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 40.99992752075195f, 3777, -89, -605, 0x7065),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 40.99992752075195f, 3777, -89, -605, 0x6167),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 1000, 40.99992752075195f, 3776, -89, -605, 0x6D5D),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 40.99992752075195f, 3776, -89, -605, 0xF348),
- CS_CAM_FOCUS_POINT(CS_CMD_STOP, 0x00, 30, 40.99992752075195f, 3776, -89, -604, 0x9D94),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 40.999928f, 3777, -89, -605, 0x7065),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 40.999928f, 3777, -89, -605, 0x6167),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 1000, 40.999928f, 3776, -89, -605, 0x6D5D),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 40.999928f, 3776, -89, -605, 0xF348),
+ CS_CAM_FOCUS_POINT(CS_CMD_STOP, 0x00, 30, 40.999928f, 3776, -89, -604, 0x9D94),
CS_CAM_FOCUS_POINT_PLAYER_LIST(60, 1180),
CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 60.0f, 1, 35, -36, 0x7065),
CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 60.0f, 1, 35, -36, 0x6167),
@@ -111,20 +111,20 @@ CutsceneData D_808BD520[] = {
CS_NPC_ACTION(0x0003, 20, 357, 0x0000, 0x0000, 0x0000, 42, 0, 77, 42, 0, 77, 0.0f, 0.0f, 0.0f),
CS_CAM_POS_LIST(0, 1151),
CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.0f, 3740, -141, -530, 0x00EA),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 40.99992752075195f, 3740, -141, -530, 0x00FB),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 40.99992752075195f, 3740, -141, -530, 0x010C),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 40.99992752075195f, 3740, -141, -530, 0x0198),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 40.99992752075195f, 3740, -141, -530, 0x019A),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 40.99992752075195f, 3740, -141, -530, 0x01AB),
- CS_CAM_POS(CS_CMD_STOP, 0x00, 0, 40.99992752075195f, 3739, -141, -530, 0x01BC),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 40.999928f, 3740, -141, -530, 0x00FB),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 40.999928f, 3740, -141, -530, 0x010C),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 40.999928f, 3740, -141, -530, 0x0198),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 40.999928f, 3740, -141, -530, 0x019A),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 40.999928f, 3740, -141, -530, 0x01AB),
+ CS_CAM_POS(CS_CMD_STOP, 0x00, 0, 40.999928f, 3739, -141, -530, 0x01BC),
CS_CAM_FOCUS_POINT_LIST(0, 1180),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 40.99992752075195f, 3777, -89, -605, 0x00EA),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 40.99992752075195f, 3777, -89, -605, 0x00FB),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 40.99992752075195f, 3777, -89, -605, 0x010C),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 40.99992752075195f, 3763, -126, -621, 0x0198),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 1000, 40.99992752075195f, 3763, -126, -621, 0x019A),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 40.99992752075195f, 3763, -126, -621, 0x01AB),
- CS_CAM_FOCUS_POINT(CS_CMD_STOP, 0x00, 30, 40.99992752075195f, 3765, -118, -617, 0x01BC),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 40.999928f, 3777, -89, -605, 0x00EA),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 40.999928f, 3777, -89, -605, 0x00FB),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 40.999928f, 3777, -89, -605, 0x010C),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 40.999928f, 3763, -126, -621, 0x0198),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 1000, 40.999928f, 3763, -126, -621, 0x019A),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 40.999928f, 3763, -126, -621, 0x01AB),
+ CS_CAM_FOCUS_POINT(CS_CMD_STOP, 0x00, 30, 40.999928f, 3765, -118, -617, 0x01BC),
CS_TEXT_LIST(2),
CS_TEXT_NONE(0, 20),
CS_TEXT_DISPLAY_TEXTBOX(0x1017, 20, 60, 0x0000, 0xFFFF, 0xFFFF),
@@ -144,17 +144,17 @@ CutsceneData D_808BD790[] = {
CS_NPC_ACTION_LIST(46, 1),
CS_NPC_ACTION(0x0001, 0, 119, 0x0000, 0x0000, 0x0000, 42, 0, 77, 42, 0, 77, 0.0f, 0.0f, 0.0f),
CS_CAM_POS_LIST(0, 1091),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 75.59983825683594f, 3716, 790, -1171, 0x54EC),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 75.59983825683594f, 3716, 790, -1171, 0x555C),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 75.59983825683594f, 3716, 790, -1171, 0x55CC),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 75.59983825683594f, 3716, 790, -1171, 0x563C),
- CS_CAM_POS(CS_CMD_STOP, 0x00, 0, 75.59983825683594f, 3716, 790, -1171, 0x56AC),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 75.59984f, 3716, 790, -1171, 0x54EC),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 75.59984f, 3716, 790, -1171, 0x555C),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 75.59984f, 3716, 790, -1171, 0x55CC),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 75.59984f, 3716, 790, -1171, 0x563C),
+ CS_CAM_POS(CS_CMD_STOP, 0x00, 0, 75.59984f, 3716, 790, -1171, 0x56AC),
CS_CAM_FOCUS_POINT_LIST(0, 1120),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 75.59983825683594f, 3769, 718, -1186, 0x54EC),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 75.59983825683594f, 3769, 718, -1186, 0x555C),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 1000, 75.59983825683594f, 3769, 718, -1186, 0x55CC),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 75.59983825683594f, 3769, 718, -1186, 0x563C),
- CS_CAM_FOCUS_POINT(CS_CMD_STOP, 0x00, 30, 75.59983825683594f, 3769, 718, -1186, 0x56AC),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 75.59984f, 3769, 718, -1186, 0x54EC),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 75.59984f, 3769, 718, -1186, 0x555C),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 1000, 75.59984f, 3769, 718, -1186, 0x55CC),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 75.59984f, 3769, 718, -1186, 0x563C),
+ CS_CAM_FOCUS_POINT(CS_CMD_STOP, 0x00, 30, 75.59984f, 3769, 718, -1186, 0x56AC),
CS_TEXT_LIST(2),
CS_TEXT_NONE(0, 20),
CS_TEXT_DISPLAY_TEXTBOX(0x1018, 20, 60, 0x0000, 0xFFFF, 0xFFFF),
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 6a668808b..c800465ea 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
@@ -19,7 +19,7 @@ void BgYdanHasi_Draw(Actor* thisx, GlobalContext* globalCtx);
void BgYdanHasi_InitWater(BgYdanHasi* this, GlobalContext* globalCtx);
void BgYdanHasi_UpdateFloatingBlock(BgYdanHasi* this, GlobalContext* globalCtx);
void BgYdanHasi_SetupThreeBlocks(BgYdanHasi* this, GlobalContext* globalCtx);
-WaterBox* BgYdanHasi_MoveWater(BgYdanHasi* this, GlobalContext* globalCtx);
+void BgYdanHasi_MoveWater(BgYdanHasi* this, GlobalContext* globalCtx);
void BgYdanHasi_DecWaterTimer(BgYdanHasi* this, GlobalContext* globalCtx);
void BgYdanHasi_UpdateThreeBlocks(BgYdanHasi* this, GlobalContext* globalCtx);
@@ -40,23 +40,19 @@ static InitChainEntry sInitChain[] = {
};
void BgYdanHasi_Init(Actor* thisx, GlobalContext* globalCtx) {
- s32 pad1;
+ s32 pad;
BgYdanHasi* this = THIS;
- CollisionHeader* colHeader;
+ CollisionHeader* colHeader = NULL;
WaterBox* waterBox;
- s32 pad2;
- colHeader = NULL;
Actor_ProcessInitChain(thisx, sInitChain);
this->unk_168 = ((thisx->params >> 8) & 0x3F);
thisx->params = thisx->params & 0xFF;
- waterBox = globalCtx->colCtx.colHeader->waterBoxes + 0x1;
+ waterBox = &globalCtx->colCtx.colHeader->waterBoxes[1];
DynaPolyActor_Init(&this->dyna, DPM_PLAYER);
if (thisx->params == 1) {
// Water the moving platform floats on in B1. Never runs in Master Quest
- thisx->home.pos.y = (thisx->home.pos.y + -5.0f);
- thisx->world.pos.y = thisx->home.pos.y;
- waterBox->ySurface = thisx->home.pos.y;
+ waterBox->ySurface = thisx->world.pos.y = thisx->home.pos.y += -5.0f;
this->actionFunc = BgYdanHasi_InitWater;
} else {
if (thisx->params == 0) {
@@ -85,12 +81,10 @@ void BgYdanHasi_Destroy(Actor* thisx, GlobalContext* globalCtx) {
}
void BgYdanHasi_UpdateFloatingBlock(BgYdanHasi* this, GlobalContext* globalCtx) {
- s32 pad;
- f32 framesAfterMath;
- f32 posOffset;
WaterBox* waterBox;
+ f32 framesAfterMath;
- framesAfterMath = sinf((globalCtx->gameplayFrames & 0xFF) * 0.024543693f) * 165.0f;
+ framesAfterMath = sinf((globalCtx->gameplayFrames & 0xFF) * (M_PI / 128)) * 165.0f;
this->dyna.actor.world.pos.x =
((Math_SinS(this->dyna.actor.world.rot.y) * framesAfterMath) + this->dyna.actor.home.pos.x);
this->dyna.actor.world.pos.z =
@@ -103,8 +97,7 @@ void BgYdanHasi_UpdateFloatingBlock(BgYdanHasi* this, GlobalContext* globalCtx)
if (this->timer == 0) {
this->timer = 50;
}
- posOffset = sinf(this->timer * 0.12566371f);
- this->dyna.actor.world.pos.y = (this->dyna.actor.world.pos.y + (posOffset + posOffset));
+ this->dyna.actor.world.pos.y += 2.0f * sinf(this->timer * (M_PI / 25));
}
void BgYdanHasi_InitWater(BgYdanHasi* this, GlobalContext* globalCtx) {
@@ -114,11 +107,11 @@ void BgYdanHasi_InitWater(BgYdanHasi* this, GlobalContext* globalCtx) {
}
}
-WaterBox* BgYdanHasi_MoveWater(BgYdanHasi* this, GlobalContext* globalCtx) {
+void BgYdanHasi_MoveWater(BgYdanHasi* this, GlobalContext* globalCtx) {
WaterBox* waterBox;
if (this->timer == 0) {
- if (Math_StepToF(&this->dyna.actor.world.pos.y, this->dyna.actor.home.pos.y, 1.0f) != 0) {
+ if (Math_StepToF(&this->dyna.actor.world.pos.y, this->dyna.actor.home.pos.y, 1.0f)) {
Flags_UnsetSwitch(globalCtx, this->unk_168);
this->actionFunc = BgYdanHasi_InitWater;
}
@@ -129,10 +122,8 @@ WaterBox* BgYdanHasi_MoveWater(BgYdanHasi* this, GlobalContext* globalCtx) {
}
func_8002F948(&this->dyna.actor, NA_SE_EV_WATER_LEVEL_DOWN - SFX_FLAG);
}
- waterBox = globalCtx->colCtx.colHeader->waterBoxes;
- globalCtx->colCtx.colHeader->waterBoxes[1].ySurface = this->dyna.actor.world.pos.y;
- if (1) {}
- return waterBox + 0x1;
+ waterBox = &globalCtx->colCtx.colHeader->waterBoxes[1];
+ waterBox->ySurface = this->dyna.actor.world.pos.y;
}
void BgYdanHasi_DecWaterTimer(BgYdanHasi* this, GlobalContext* globalCtx) {
@@ -146,17 +137,15 @@ void BgYdanHasi_DecWaterTimer(BgYdanHasi* this, GlobalContext* globalCtx) {
}
void BgYdanHasi_SetupThreeBlocks(BgYdanHasi* this, GlobalContext* globalCtx) {
- if (Flags_GetSwitch(globalCtx, this->unk_168) != 0) {
+ if (Flags_GetSwitch(globalCtx, this->unk_168)) {
this->timer = 260;
this->dyna.actor.draw = BgYdanHasi_Draw;
this->actionFunc = BgYdanHasi_UpdateThreeBlocks;
- func_800800F8(globalCtx, 0xBE0, 0x1E, &this->dyna.actor, 0);
+ OnePointCutscene_Init(globalCtx, 3040, 30, &this->dyna.actor, MAIN_CAM);
}
}
void BgYdanHasi_UpdateThreeBlocks(BgYdanHasi* this, GlobalContext* globalCtx) {
- s32 pad;
-
if (this->timer != 0) {
this->timer--;
}
@@ -165,16 +154,16 @@ void BgYdanHasi_UpdateThreeBlocks(BgYdanHasi* this, GlobalContext* globalCtx) {
Flags_UnsetSwitch(globalCtx, this->unk_168);
this->dyna.actor.draw = NULL;
this->actionFunc = BgYdanHasi_SetupThreeBlocks;
- return;
+ } else {
+ func_8002F948(&this->dyna.actor, NA_SE_EV_ELEVATOR_MOVE - SFX_FLAG);
+ }
+ } else {
+ if (!Math_StepToF(&this->dyna.actor.world.pos.y, this->dyna.actor.home.pos.y + 120.0f, 3.0f)) {
+ func_8002F948(&this->dyna.actor, NA_SE_EV_ELEVATOR_MOVE - SFX_FLAG);
+ } else {
+ func_8002F994(&this->dyna.actor, this->timer);
}
- func_8002F948(&this->dyna.actor, NA_SE_EV_ELEVATOR_MOVE - SFX_FLAG);
- return;
- }
- if (Math_StepToF(&this->dyna.actor.world.pos.y, this->dyna.actor.home.pos.y + 120.0f, 3.0f) == 0) {
- func_8002F948(&this->dyna.actor, NA_SE_EV_ELEVATOR_MOVE - SFX_FLAG);
- return;
}
- func_8002F994(&this->dyna.actor, this->timer);
}
void BgYdanHasi_Update(Actor* thisx, GlobalContext* globalCtx) {
@@ -189,19 +178,18 @@ void BgYdanHasi_Draw(Actor* thisx, GlobalContext* globalCtx) {
if (this->dyna.actor.params == 0 || this->dyna.actor.params == 2) {
Gfx_DrawDListOpa(globalCtx, dLists[this->dyna.actor.params]);
- return;
+ } else {
+ OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_ydan_hasi.c", 577);
+
+ func_80093D84(globalCtx->state.gfxCtx);
+ gSPSegment(POLY_XLU_DISP++, 0x08,
+ Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, -globalCtx->gameplayFrames % 128,
+ globalCtx->gameplayFrames % 128, 0x20, 0x20, 1, globalCtx->gameplayFrames % 128,
+ globalCtx->gameplayFrames % 128, 0x20, 0x20));
+ gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_ydan_hasi.c", 592),
+ G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
+ gSPDisplayList(POLY_XLU_DISP++, gDTWaterPlaneDL);
+
+ CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_ydan_hasi.c", 597);
}
-
- OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_ydan_hasi.c", 577);
-
- func_80093D84(globalCtx->state.gfxCtx);
- gSPSegment(POLY_XLU_DISP++, 0x08,
- Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, -globalCtx->gameplayFrames & 0x7F,
- globalCtx->gameplayFrames & 0x7F, 0x20, 0x20, 1, globalCtx->gameplayFrames & 0x7F,
- globalCtx->gameplayFrames & 0x7F, 0x20, 0x20));
- gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_ydan_hasi.c", 592),
- G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
- gSPDisplayList(POLY_XLU_DISP++, gDTWaterPlaneDL);
-
- CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_ydan_hasi.c", 597);
}
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 9804c3f9f..38fed82b0 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
@@ -152,7 +152,7 @@ void func_808BF078(BgYdanMaruta* this, GlobalContext* globalCtx) {
Flags_SetSwitch(globalCtx, this->unk_168);
func_80078884(NA_SE_SY_CORRECT_CHIME);
this->actionFunc = func_808BF108;
- func_800800F8(globalCtx, 0xBC2, 0x32, &this->dyna.actor, 0);
+ OnePointCutscene_Init(globalCtx, 3010, 50, &this->dyna.actor, MAIN_CAM);
} else {
CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
}
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 c6d54d6c0..94cd82439 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
@@ -406,7 +406,7 @@ void BgYdanSp_WallWebIdle(BgYdanSp* this, GlobalContext* globalCtx) {
} else if (player->heldItemActionParam == PLAYER_AP_STICK && player->unk_860 != 0) {
func_8002DBD0(&this->dyna.actor, &sp30, &player->swordInfo[0].tip);
if (fabsf(sp30.x) < 100.0f && sp30.z < 1.0f && sp30.y < 200.0f) {
- func_800800F8(globalCtx, 0xBCC, 0x28, &this->dyna.actor, 0);
+ OnePointCutscene_Init(globalCtx, 3020, 40, &this->dyna.actor, MAIN_CAM);
Math_Vec3f_Copy(&this->dyna.actor.home.pos, &player->swordInfo[0].tip);
BgYdanSp_BurnWeb(this, globalCtx);
}
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 1f3660651..f5b786342 100644
--- a/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c
+++ b/src/overlays/actors/ovl_Boss_Ganondrof/z_boss_ganondrof.c
@@ -959,9 +959,9 @@ void BossGanondrof_Death(BossGanondrof* this, GlobalContext* globalCtx) {
func_80064520(globalCtx, &globalCtx->csCtx);
func_8002DF54(globalCtx, &this->actor, 1);
this->deathCamera = Gameplay_CreateSubCamera(globalCtx);
- Gameplay_ChangeCameraStatus(globalCtx, 0, 1);
+ Gameplay_ChangeCameraStatus(globalCtx, MAIN_CAM, CAM_STAT_WAIT);
osSyncPrintf("7\n");
- Gameplay_ChangeCameraStatus(globalCtx, this->deathCamera, 7);
+ Gameplay_ChangeCameraStatus(globalCtx, this->deathCamera, CAM_STAT_ACTIVE);
osSyncPrintf("8\n");
this->deathState = DEATH_THROES;
player->actor.speedXZ = 0.0f;
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 43a0e12ae..4fd08dc59 100644
--- a/src/overlays/actors/ovl_Demo_Du/z_demo_du.c
+++ b/src/overlays/actors/ovl_Demo_Du/z_demo_du.c
@@ -81,7 +81,7 @@ void DemoDu_CsAfterGanon_Reset(DemoDu* this) {
void DemoDu_CsAfterGanon_CheckIfShouldReset(DemoDu* this, GlobalContext* globalCtx) {
static s32 D_8096CE94 = false;
- if (globalCtx->csCtx.state == 0) {
+ if (globalCtx->csCtx.state == CS_STATE_IDLE) {
if (D_8096CE94) {
if (this->actor.params == DEMO_DU_CS_CHAMBER_AFTER_GANON) {
DemoDu_CsAfterGanon_Reset(this);
@@ -103,7 +103,7 @@ void DemoDu_UpdateBgCheckInfo(DemoDu* this, GlobalContext* globalCtx) {
}
CsCmdActorAction* DemoDu_GetNpcAction(GlobalContext* globalCtx, s32 idx) {
- if (globalCtx->csCtx.state != 0) {
+ if (globalCtx->csCtx.state != CS_STATE_IDLE) {
return globalCtx->csCtx.npcActions[idx];
}
return NULL;
@@ -207,7 +207,7 @@ void DemoDu_CsFireMedallion_AdvanceTo01(DemoDu* this, GlobalContext* globalCtx)
}
void DemoDu_CsFireMedallion_AdvanceTo02(DemoDu* this, GlobalContext* globalCtx) {
- if (globalCtx->csCtx.state != 0) {
+ if (globalCtx->csCtx.state != CS_STATE_IDLE) {
CsCmdActorAction* npcAction = globalCtx->csCtx.npcActions[2];
if ((npcAction != NULL) && (npcAction->action != 1)) {
@@ -226,7 +226,7 @@ void DemoDu_CsFireMedallion_AdvanceTo03(DemoDu* this) {
}
void DemoDu_CsFireMedallion_AdvanceTo04(DemoDu* this, GlobalContext* globalCtx) {
- if (globalCtx->csCtx.state != 0) {
+ if (globalCtx->csCtx.state != CS_STATE_IDLE) {
CsCmdActorAction* npcAction = globalCtx->csCtx.npcActions[2];
if ((npcAction != NULL) && (npcAction->action != 2)) {
@@ -246,7 +246,7 @@ void DemoDu_CsFireMedallion_AdvanceTo05(DemoDu* this, s32 animFinished) {
}
void DemoDu_CsFireMedallion_AdvanceTo06(DemoDu* this, GlobalContext* globalCtx) {
- if (globalCtx->csCtx.state != 0) {
+ if (globalCtx->csCtx.state != CS_STATE_IDLE) {
CsCmdActorAction* npcAction = globalCtx->csCtx.npcActions[6];
if ((npcAction != NULL) && (npcAction->action == 2)) {
@@ -437,7 +437,7 @@ void DemoDu_CsGoronsRuby_DaruniaFalling(DemoDu* this, GlobalContext* globalCtx)
s32 pad;
CutsceneContext* csCtx = &globalCtx->csCtx;
- if (csCtx->state != 0) {
+ if (csCtx->state != CS_STATE_IDLE) {
CsCmdActorAction* npcAction = csCtx->npcActions[2];
Vec3f startPos;
Vec3f endPos;
@@ -466,7 +466,7 @@ void DemoDu_CsGoronsRuby_AdvanceTo01(DemoDu* this, GlobalContext* globalCtx) {
}
void DemoDu_CsGoronsRuby_AdvanceTo02(DemoDu* this, GlobalContext* globalCtx) {
- if (globalCtx->csCtx.state != 0) {
+ if (globalCtx->csCtx.state != CS_STATE_IDLE) {
CsCmdActorAction* npcAction = globalCtx->csCtx.npcActions[2];
if ((npcAction != NULL) && (npcAction->action != 1)) {
@@ -482,7 +482,7 @@ void DemoDu_CsGoronsRuby_AdvanceTo02(DemoDu* this, GlobalContext* globalCtx) {
void DemoDu_CsGoronsRuby_AdvanceTo03(DemoDu* this, GlobalContext* globalCtx) {
CutsceneContext* csCtx = &globalCtx->csCtx;
- if (csCtx->state != 0) {
+ if (csCtx->state != CS_STATE_IDLE) {
CsCmdActorAction* npcAction = csCtx->npcActions[2];
if ((npcAction != NULL) && (csCtx->frames >= npcAction->endFrame)) {
@@ -493,7 +493,7 @@ void DemoDu_CsGoronsRuby_AdvanceTo03(DemoDu* this, GlobalContext* globalCtx) {
}
void DemoDu_CsGoronsRuby_AdvanceTo04(DemoDu* this, GlobalContext* globalCtx) {
- if (globalCtx->csCtx.state != 0) {
+ if (globalCtx->csCtx.state != CS_STATE_IDLE) {
CsCmdActorAction* npcAction = globalCtx->csCtx.npcActions[2];
if ((npcAction != NULL) && (npcAction->action != 2)) {
@@ -511,7 +511,7 @@ void DemoDu_CsGoronsRuby_AdvanceTo05(DemoDu* this, s32 animFinished) {
}
void DemoDu_CsGoronsRuby_AdvanceTo06(DemoDu* this, GlobalContext* globalCtx) {
- if (globalCtx->csCtx.state != 0) {
+ if (globalCtx->csCtx.state != CS_STATE_IDLE) {
CsCmdActorAction* npcAction = globalCtx->csCtx.npcActions[2];
if ((npcAction != NULL) && (npcAction->action != 3)) {
@@ -531,7 +531,7 @@ void DemoDu_CsGoronsRuby_AdvanceTo07(DemoDu* this, s32 animFinished) {
}
void DemoDu_CsGoronsRuby_AdvanceTo08(DemoDu* this, GlobalContext* globalCtx) {
- if (globalCtx->csCtx.state != 0) {
+ if (globalCtx->csCtx.state != CS_STATE_IDLE) {
CsCmdActorAction* npcAction = globalCtx->csCtx.npcActions[2];
if ((npcAction != NULL) && (npcAction->action != 4)) {
@@ -559,7 +559,7 @@ void DemoDu_CsGoronsRuby_AdvanceTo10(DemoDu* this, s32 animFinished) {
}
void DemoDu_CsGoronsRuby_AdvanceTo11(DemoDu* this, GlobalContext* globalCtx) {
- if (globalCtx->csCtx.state != 0) {
+ if (globalCtx->csCtx.state != CS_STATE_IDLE) {
CsCmdActorAction* npcAction = globalCtx->csCtx.npcActions[2];
if ((npcAction != NULL) && (npcAction->action != 5)) {
@@ -579,7 +579,7 @@ void DemoDu_CsGoronsRuby_AdvanceTo12(DemoDu* this, s32 animFinished) {
}
void DemoDu_CsGoronsRuby_AdvanceTo13(DemoDu* this, GlobalContext* globalCtx) {
- if (globalCtx->csCtx.state != 0) {
+ if (globalCtx->csCtx.state != CS_STATE_IDLE) {
CsCmdActorAction* npcAction = globalCtx->csCtx.npcActions[2];
if ((npcAction != NULL) && (npcAction->action != 6)) {
diff --git a/src/overlays/actors/ovl_Demo_Du/z_demo_du_cutscene_data.c b/src/overlays/actors/ovl_Demo_Du/z_demo_du_cutscene_data.c
index cb0562536..58b7ac69f 100644
--- a/src/overlays/actors/ovl_Demo_Du/z_demo_du_cutscene_data.c
+++ b/src/overlays/actors/ovl_Demo_Du/z_demo_du_cutscene_data.c
@@ -10,7 +10,7 @@ static CutsceneData D_8096C1A4[] = {
CS_NPC_ACTION(0x0001, 0, 546, 0x0000, 0x0000, 0x0000, 0, 216, -10, 0, 216, -10, 0.0f, 0.0f, 0.0f),
CS_NPC_ACTION(0x0002, 546, 547, 0x0000, 0x0000, 0x0000, 0, 216, -10, 0, 216, -10, 0.0f, 0.0f, 0.0f),
CS_NPC_ACTION(0x0004, 547, 616, 0x0000, 0x0000, 0x0000, 0, 216, -10, 0, 216, -10, 0.0f, 0.0f, 0.0f),
- CS_NPC_ACTION(0x0002, 616, 667, 0x0000, 0x0000, 0x0000, 0, 216, -10, 0, 82, 0, 0.0f, -2.627450942993164f, 0.0f),
+ CS_NPC_ACTION(0x0002, 616, 667, 0x0000, 0x0000, 0x0000, 0, 216, -10, 0, 82, 0, 0.0f, -2.627451f, 0.0f),
CS_NPC_ACTION(0x0003, 667, 2834, 0x0000, 0x0000, 0x0000, 0, 82, 0, 0, 82, 0, 0.0f, 0.0f, 0.0f),
CS_PLAYER_ACTION_LIST(3),
CS_PLAYER_ACTION(0x000D, 0, 280, 0x0000, 0x6AAA, 0x0000, 0, 6, 0, 0, 6, 0, 0.0f, 0.0f, 1.401298464324817e-45f),
@@ -49,53 +49,53 @@ static CutsceneData D_8096C1A4[] = {
CS_TEXT_NONE(805, 865),
CS_TEXT_DISPLAY_TEXTBOX(0x303D, 865, 875, 0x0000, 0x0000, 0x0000),
CS_CAM_POS_LIST(0, 1361),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.400001525878906f, -85, 3211, 795, 0x00C6),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.400001525878906f, -85, 3211, 795, 0x00C8),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.400001525878906f, -85, 2925, 795, 0x00D7),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.400001525878906f, 70, 974, 497, 0x00E8),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.400001525878906f, 320, 268, 296, 0x00EA),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.400001525878906f, 312, 190, 150, 0x013D),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.400001525878906f, 261, 61, -65, 0x013F),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.400001525878906f, 261, 61, -65, 0x014E),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.400001525878906f, 261, 61, -65, 0x015F),
- CS_CAM_POS(CS_CMD_STOP, 0x00, 0, 60.400001525878906f, 261, 61, -65, 0x0161),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.4f, -85, 3211, 795, 0x00C6),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.4f, -85, 3211, 795, 0x00C8),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.4f, -85, 2925, 795, 0x00D7),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.4f, 70, 974, 497, 0x00E8),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.4f, 320, 268, 296, 0x00EA),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.4f, 312, 190, 150, 0x013D),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.4f, 261, 61, -65, 0x013F),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.4f, 261, 61, -65, 0x014E),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.4f, 261, 61, -65, 0x015F),
+ CS_CAM_POS(CS_CMD_STOP, 0x00, 0, 60.4f, 261, 61, -65, 0x0161),
CS_CAM_POS_LIST(263, 509),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 29.399885177612305f, 89, 30, -103, 0x00C6),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.20000076293945f, 89, 30, -103, 0x00C8),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.20000076293945f, 89, 30, -103, 0x00D7),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.20000076293945f, 89, 30, -103, 0x00E8),
- CS_CAM_POS(CS_CMD_STOP, 0x00, 0, 60.20000076293945f, 89, 30, -103, 0x00EA),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 29.399885f, 89, 30, -103, 0x00C6),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.2f, 89, 30, -103, 0x00C8),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.2f, 89, 30, -103, 0x00D7),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.2f, 89, 30, -103, 0x00E8),
+ CS_CAM_POS(CS_CMD_STOP, 0x00, 0, 60.2f, 89, 30, -103, 0x00EA),
CS_CAM_POS_LIST(333, 1424),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.99994659423828f, 114, 50, -116, 0x00C6),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.99994659423828f, 114, 50, -116, 0x00C8),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.99994659423828f, 114, 50, -116, 0x00D7),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.99994659423828f, 114, 50, -116, 0x00E8),
- CS_CAM_POS(CS_CMD_STOP, 0x00, 0, 45.99994659423828f, 114, 50, -116, 0x00EA),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.999947f, 114, 50, -116, 0x00C6),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.999947f, 114, 50, -116, 0x00C8),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.999947f, 114, 50, -116, 0x00D7),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.999947f, 114, 50, -116, 0x00E8),
+ CS_CAM_POS(CS_CMD_STOP, 0x00, 0, 45.999947f, 114, 50, -116, 0x00EA),
CS_CAM_POS_LIST(403, 1494),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.599945068359375f, 26, 45, -10, 0x00C6),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.599945068359375f, 26, 45, -10, 0x00C8),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.599945068359375f, 26, 45, -10, 0x00D7),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.599945068359375f, 26, 45, -10, 0x00E8),
- CS_CAM_POS(CS_CMD_STOP, 0x00, 0, 45.599945068359375f, 26, 45, -10, 0x00EA),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.599945f, 26, 45, -10, 0x00C6),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.599945f, 26, 45, -10, 0x00C8),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.599945f, 26, 45, -10, 0x00D7),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.599945f, 26, 45, -10, 0x00E8),
+ CS_CAM_POS(CS_CMD_STOP, 0x00, 0, 45.599945f, 26, 45, -10, 0x00EA),
CS_CAM_POS_LIST(443, 1624),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.39994430541992f, 11, 23, -17, 0x00C6),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.39994430541992f, 11, 23, -17, 0x00C8),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.39994430541992f, 27, 31, -45, 0x00D7),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.39994430541992f, 45, 40, -76, 0x00E8),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.39994430541992f, 45, 40, -76, 0x00EA),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.39994430541992f, 45, 40, -76, 0x013D),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.39994430541992f, 45, 40, -76, 0x013F),
- CS_CAM_POS(CS_CMD_STOP, 0x00, 0, 45.39994430541992f, 45, 40, -76, 0x002E),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.399944f, 11, 23, -17, 0x00C6),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.399944f, 11, 23, -17, 0x00C8),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.399944f, 27, 31, -45, 0x00D7),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.399944f, 45, 40, -76, 0x00E8),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.399944f, 45, 40, -76, 0x00EA),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.399944f, 45, 40, -76, 0x013D),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.399944f, 45, 40, -76, 0x013F),
+ CS_CAM_POS(CS_CMD_STOP, 0x00, 0, 45.399944f, 45, 40, -76, 0x002E),
CS_CAM_POS_LIST(473, 1604),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.19994354248047f, 192, 29, -246, 0x00C6),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.19994354248047f, 192, 29, -246, 0x00C8),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.19994354248047f, 192, 29, -246, 0x00D7),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.19994354248047f, 192, 29, -246, 0x00E8),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 70.39991760253906f, 192, 278, -246, 0x00EA),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 70.39991760253906f, 192, 278, -246, 0x013D),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 70.39991760253906f, 192, 278, -246, 0x013F),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 70.39991760253906f, 192, 278, -246, 0x002E),
- CS_CAM_POS(CS_CMD_STOP, 0x00, 0, 70.39991760253906f, 192, 278, -246, 0x0063),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.199944f, 192, 29, -246, 0x00C6),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.199944f, 192, 29, -246, 0x00C8),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.199944f, 192, 29, -246, 0x00D7),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.199944f, 192, 29, -246, 0x00E8),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 70.39992f, 192, 278, -246, 0x00EA),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 70.39992f, 192, 278, -246, 0x013D),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 70.39992f, 192, 278, -246, 0x013F),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 70.39992f, 192, 278, -246, 0x002E),
+ CS_CAM_POS(CS_CMD_STOP, 0x00, 0, 70.39992f, 192, 278, -246, 0x0063),
CS_CAM_POS_LIST(539, 881),
CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.0f, 13, 854, 2, 0x00C6),
CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.0f, 9, 853, 5, 0x00C8),
@@ -107,81 +107,81 @@ static CutsceneData D_8096C1A4[] = {
CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.0f, 9, 852, 5, 0x002E),
CS_CAM_POS(CS_CMD_STOP, 0x00, 0, 60.0f, -3, 851, 5, 0x0063),
CS_CAM_POS_PLAYER_LIST(615, 1796),
- CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 68.59994506835938f, 0, 33, -27, 0x00C6),
- CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 68.59994506835938f, 0, 33, -27, 0x00C8),
- CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 68.59994506835938f, 0, 68, -26, 0x00D7),
- CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 68.59994506835938f, 0, 103, -26, 0x00E8),
- CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 68.59994506835938f, 0, 103, -26, 0x00EA),
- CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 68.59994506835938f, 0, 103, -26, 0x013D),
- CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 68.59994506835938f, 0, 103, -26, 0x013F),
- CS_CAM_POS_PLAYER(CS_CMD_STOP, 0x00, 0, 68.59994506835938f, 0, 103, -26, 0x002E),
+ CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 68.599945f, 0, 33, -27, 0x00C6),
+ CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 68.599945f, 0, 33, -27, 0x00C8),
+ CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 68.599945f, 0, 68, -26, 0x00D7),
+ CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 68.599945f, 0, 103, -26, 0x00E8),
+ CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 68.599945f, 0, 103, -26, 0x00EA),
+ CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 68.599945f, 0, 103, -26, 0x013D),
+ CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 68.599945f, 0, 103, -26, 0x013F),
+ CS_CAM_POS_PLAYER(CS_CMD_STOP, 0x00, 0, 68.599945f, 0, 103, -26, 0x002E),
CS_CAM_FOCUS_POINT_LIST(0, 1390),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 60, 60.400001525878906f, -115, 3163, 585, 0x00C6),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 60, 60.400001525878906f, -115, 3163, 585, 0x00C8),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 60, 60.400001525878906f, -115, 2877, 585, 0x00D7),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.400001525878906f, 27, 824, 348, 0x00E8),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 40, 60.400001525878906f, 197, 143, 174, 0x00EA),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 40, 60.400001525878906f, 147, 100, 55, 0x013D),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 40, 60.400001525878906f, 55, 35, -65, 0x013F),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 1000, 60.400001525878906f, 55, 35, -65, 0x014E),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.400001525878906f, 55, 35, -65, 0x015F),
- CS_CAM_FOCUS_POINT(CS_CMD_STOP, 0x00, 30, 60.400001525878906f, 56, 35, -65, 0x0161),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 60, 60.4f, -115, 3163, 585, 0x00C6),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 60, 60.4f, -115, 3163, 585, 0x00C8),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 60, 60.4f, -115, 2877, 585, 0x00D7),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.4f, 27, 824, 348, 0x00E8),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 40, 60.4f, 197, 143, 174, 0x00EA),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 40, 60.4f, 147, 100, 55, 0x013D),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 40, 60.4f, 55, 35, -65, 0x013F),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 1000, 60.4f, 55, 35, -65, 0x014E),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.4f, 55, 35, -65, 0x015F),
+ CS_CAM_FOCUS_POINT(CS_CMD_STOP, 0x00, 30, 60.4f, 56, 35, -65, 0x0161),
CS_CAM_FOCUS_POINT_LIST(263, 538),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 78.99978637695312f, 87, 157, -391, 0x00C6),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 82, 78.79978942871094f, 87, 157, -391, 0x00C8),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 103, 70.79991149902344f, 87, 157, -391, 0x00D7),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.20000076293945f, 87, 157, -391, 0x00E8),
- CS_CAM_FOCUS_POINT(CS_CMD_STOP, 0x00, 30, 60.20000076293945f, 87, 157, -391, 0x00EA),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 78.99979f, 87, 157, -391, 0x00C6),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 82, 78.79979f, 87, 157, -391, 0x00C8),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 103, 70.79991f, 87, 157, -391, 0x00D7),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.2f, 87, 157, -391, 0x00E8),
+ CS_CAM_FOCUS_POINT(CS_CMD_STOP, 0x00, 30, 60.2f, 87, 157, -391, 0x00EA),
CS_CAM_FOCUS_POINT_LIST(333, 1453),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 45.99994659423828f, -52, 127, -309, 0x00C6),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 45.99994659423828f, -52, 127, -309, 0x00C8),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 1000, 45.99994659423828f, -52, 127, -309, 0x00D7),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 45.99994659423828f, -52, 127, -309, 0x00E8),
- CS_CAM_FOCUS_POINT(CS_CMD_STOP, 0x00, 30, 45.99994659423828f, -52, 127, -309, 0x00EA),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 45.999947f, -52, 127, -309, 0x00C6),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 45.999947f, -52, 127, -309, 0x00C8),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 1000, 45.999947f, -52, 127, -309, 0x00D7),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 45.999947f, -52, 127, -309, 0x00E8),
+ CS_CAM_FOCUS_POINT(CS_CMD_STOP, 0x00, 30, 45.999947f, -52, 127, -309, 0x00EA),
CS_CAM_FOCUS_POINT_LIST(403, 1523),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 45.599945068359375f, -269, 186, 13, 0x00C6),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 45.599945068359375f, -269, 186, 13, 0x00C8),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 1000, 45.599945068359375f, -269, 186, 13, 0x00D7),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 45.599945068359375f, -269, 186, 13, 0x00E8),
- CS_CAM_FOCUS_POINT(CS_CMD_STOP, 0x00, 30, 45.599945068359375f, -269, 186, 13, 0x00EA),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 45.599945f, -269, 186, 13, 0x00C6),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 45.599945f, -269, 186, 13, 0x00C8),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 1000, 45.599945f, -269, 186, 13, 0x00D7),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 45.599945f, -269, 186, 13, 0x00E8),
+ CS_CAM_FOCUS_POINT(CS_CMD_STOP, 0x00, 30, 45.599945f, -269, 186, 13, 0x00EA),
CS_CAM_FOCUS_POINT_LIST(443, 1653),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 45.39994430541992f, 163, 70, -283, 0x00C6),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 45.39994430541992f, 163, 70, -283, 0x00C8),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 45.39994430541992f, 177, 74, -309, 0x00D7),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 45.39994430541992f, 193, 92, -337, 0x00E8),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 45.39994430541992f, 193, 92, -337, 0x00EA),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 1000, 45.39994430541992f, 192, 91, -336, 0x013D),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 45.39994430541992f, 192, 91, -336, 0x013F),
- CS_CAM_FOCUS_POINT(CS_CMD_STOP, 0x00, 30, 45.39994430541992f, 192, 91, -336, 0x002E),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 45.399944f, 163, 70, -283, 0x00C6),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 45.399944f, 163, 70, -283, 0x00C8),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 45.399944f, 177, 74, -309, 0x00D7),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 45.399944f, 193, 92, -337, 0x00E8),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 45.399944f, 193, 92, -337, 0x00EA),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 1000, 45.399944f, 192, 91, -336, 0x013D),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 45.399944f, 192, 91, -336, 0x013F),
+ CS_CAM_FOCUS_POINT(CS_CMD_STOP, 0x00, 30, 45.399944f, 192, 91, -336, 0x002E),
CS_CAM_FOCUS_POINT_LIST(473, 1633),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 20, 45.19994354248047f, -9, 57, -53, 0x00C6),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 20, 45.19994354248047f, -9, 57, -53, 0x00C8),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 20, 45.19994354248047f, -9, 57, -54, 0x00D7),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 20, 45.99994659423828f, -8, 57, -54, 0x00E8),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 10, 70.39991760253906f, 149, 547, -205, 0x00EA),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 10, 70.39991760253906f, 149, 547, -205, 0x013D),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 1000, 70.39991760253906f, 149, 547, -205, 0x013F),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 70.39991760253906f, 149, 547, -205, 0x002E),
- CS_CAM_FOCUS_POINT(CS_CMD_STOP, 0x00, 30, 70.39991760253906f, 149, 547, -205, 0x0063),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 20, 45.199944f, -9, 57, -53, 0x00C6),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 20, 45.199944f, -9, 57, -53, 0x00C8),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 20, 45.199944f, -9, 57, -54, 0x00D7),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 20, 45.999947f, -8, 57, -54, 0x00E8),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 10, 70.39992f, 149, 547, -205, 0x00EA),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 10, 70.39992f, 149, 547, -205, 0x013D),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 1000, 70.39992f, 149, 547, -205, 0x013F),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 70.39992f, 149, 547, -205, 0x002E),
+ CS_CAM_FOCUS_POINT(CS_CMD_STOP, 0x00, 30, 70.39992f, 149, 547, -205, 0x0063),
CS_CAM_FOCUS_POINT_LIST(539, 930),
CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 50, 60.0f, 3, 6, -6, 0x00C6),
CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 40, 60.0f, 3, 6, -6, 0x00C8),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 50.99996566772461f, 3, 6, -6, 0x00D7),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 20, 20.599849700927734f, 3, 6, -6, 0x00E8),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 51, 10.799838066101074f, 3, 6, -6, 0x00EA),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 50, 10.3998384475708f, 3, 6, -6, 0x013D),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 50, 10.3998384475708f, 3, 6, -6, 0x013F),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 50, 10.199838638305664f, 3, 6, -6, 0x002E),
- CS_CAM_FOCUS_POINT(CS_CMD_STOP, 0x00, 50, 10.999837875366211f, 3, 6, -6, 0x0063),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 50.999966f, 3, 6, -6, 0x00D7),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 20, 20.59985f, 3, 6, -6, 0x00E8),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 51, 10.799838f, 3, 6, -6, 0x00EA),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 50, 10.399838f, 3, 6, -6, 0x013D),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 50, 10.399838f, 3, 6, -6, 0x013F),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 50, 10.199839f, 3, 6, -6, 0x002E),
+ CS_CAM_FOCUS_POINT(CS_CMD_STOP, 0x00, 50, 10.999838f, 3, 6, -6, 0x0063),
CS_CAM_FOCUS_POINT_PLAYER_LIST(615, 1825),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 68.59994506835938f, 0, 100, 5, 0x00C6),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 68.59994506835938f, 0, 101, 6, 0x00C8),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 68.59994506835938f, 1, 99, 41, 0x00D7),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 68.59994506835938f, 0, 42, 16, 0x00E8),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 68.59994506835938f, 0, 42, 16, 0x00EA),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 1000, 68.59994506835938f, 0, 42, 16, 0x013D),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 68.59994506835938f, 0, 42, 16, 0x013F),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_STOP, 0x00, 30, 68.59994506835938f, 0, 42, 16, 0x002E),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 68.599945f, 0, 100, 5, 0x00C6),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 68.599945f, 0, 101, 6, 0x00C8),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 68.599945f, 1, 99, 41, 0x00D7),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 68.599945f, 0, 42, 16, 0x00E8),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 68.599945f, 0, 42, 16, 0x00EA),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 1000, 68.599945f, 0, 42, 16, 0x013D),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 68.599945f, 0, 42, 16, 0x013F),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_STOP, 0x00, 30, 68.599945f, 0, 42, 16, 0x002E),
CS_END(),
};
// clang-format on
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 30ceec946..bd3891eca 100644
--- a/src/overlays/actors/ovl_Demo_Ec/z_demo_ec.c
+++ b/src/overlays/actors/ovl_Demo_Ec/z_demo_ec.c
@@ -338,7 +338,7 @@ void DemoEc_UseAnimationObject(DemoEc* this, GlobalContext* globalCtx) {
}
CsCmdActorAction* DemoEc_GetNpcAction(GlobalContext* globalCtx, s32 actionIndex) {
- if (globalCtx->csCtx.state != 0) {
+ if (globalCtx->csCtx.state != CS_STATE_IDLE) {
return globalCtx->csCtx.npcActions[actionIndex];
} else {
return 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 a6a6fe869..3547a5a7f 100644
--- a/src/overlays/actors/ovl_Demo_Effect/z_demo_effect.c
+++ b/src/overlays/actors/ovl_Demo_Effect/z_demo_effect.c
@@ -615,7 +615,7 @@ void DemoEffect_MedalSparkle(DemoEffect* this, GlobalContext* globalCtx, s32 isS
void DemoEffect_UpdateGetItem(DemoEffect* this, GlobalContext* globalCtx) {
Actor* thisx = &this->actor;
- if (globalCtx->csCtx.state != 0 && globalCtx->csCtx.npcActions[this->csActionId] != NULL) {
+ if (globalCtx->csCtx.state != CS_STATE_IDLE && globalCtx->csCtx.npcActions[this->csActionId] != NULL) {
if (this->getItem.isPositionInit) {
DemoEffect_MoveGetItem(this, globalCtx, this->csActionId, 0.1f);
} else {
@@ -828,7 +828,7 @@ void DemoEffect_InitTimeWarpTimeblock(DemoEffect* this, GlobalContext* globalCtx
void DemoEffect_UpdateTriforceSpot(DemoEffect* this, GlobalContext* globalCtx) {
this->triforceSpot.rotation += 0x03E8;
- if (globalCtx->csCtx.state != 0 && globalCtx->csCtx.npcActions[this->csActionId] != NULL) {
+ if (globalCtx->csCtx.state != CS_STATE_IDLE && globalCtx->csCtx.npcActions[this->csActionId] != NULL) {
DemoEffect_MoveToCsEndpoint(this, globalCtx, this->csActionId, 0);
if (globalCtx->csCtx.npcActions[this->csActionId]->action == 2) {
@@ -913,7 +913,7 @@ void DemoEffect_UpdateLightRingTriforce(DemoEffect* this, GlobalContext* globalC
DemoEffect_UpdatePositionToParent(this, globalCtx);
- if (globalCtx->csCtx.state != 0) {
+ if (globalCtx->csCtx.state != CS_STATE_IDLE) {
if (globalCtx->csCtx.npcActions[this->csActionId] != NULL &&
globalCtx->csCtx.npcActions[this->csActionId]->action == 2) {
blueOrb = (DemoEffect*)Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_DEMO_EFFECT,
@@ -1039,7 +1039,7 @@ void DemoEffect_UpdateLightEffect(DemoEffect* this, GlobalContext* globalCtx) {
isLargeSize = ((this->actor.params & 0x0F00) >> 8);
- if (globalCtx->csCtx.state != 0 && globalCtx->csCtx.npcActions[this->csActionId] != NULL) {
+ if (globalCtx->csCtx.state != CS_STATE_IDLE && globalCtx->csCtx.npcActions[this->csActionId] != NULL) {
DemoEffect_MoveToCsEndpoint(this, globalCtx, this->csActionId, 0);
switch (globalCtx->csCtx.npcActions[this->csActionId]->action) {
case 2:
@@ -1140,7 +1140,7 @@ void DemoEffect_UpdateLgtShower(DemoEffect* this, GlobalContext* globalCtx) {
void DemoEffect_UpdateGodLgtDin(DemoEffect* this, GlobalContext* globalCtx) {
DemoEffect* fireBall;
- if (globalCtx->csCtx.state != 0 && globalCtx->csCtx.npcActions[this->csActionId] != NULL) {
+ if (globalCtx->csCtx.state != CS_STATE_IDLE && globalCtx->csCtx.npcActions[this->csActionId] != NULL) {
DemoEffect_MoveToCsEndpoint(this, globalCtx, this->csActionId, 1);
if (globalCtx->csCtx.npcActions[this->csActionId]->action == 3) {
@@ -1190,7 +1190,7 @@ void DemoEffect_UpdateGodLgtDin(DemoEffect* this, GlobalContext* globalCtx) {
void DemoEffect_UpdateGodLgtNayru(DemoEffect* this, GlobalContext* globalCtx) {
DemoEffect* lightRing;
- if (globalCtx->csCtx.state != 0 && globalCtx->csCtx.npcActions[this->csActionId] != NULL) {
+ if (globalCtx->csCtx.state != CS_STATE_IDLE && globalCtx->csCtx.npcActions[this->csActionId] != NULL) {
DemoEffect_MoveToCsEndpoint(this, globalCtx, this->csActionId, 1);
if (globalCtx->csCtx.npcActions[this->csActionId]->action == 3) {
@@ -1251,7 +1251,7 @@ void DemoEffect_UpdateGodLgtNayru(DemoEffect* this, GlobalContext* globalCtx) {
void DemoEffect_UpdateGodLgtFarore(DemoEffect* this, GlobalContext* globalCtx) {
DemoEffect* lgtShower;
- if (globalCtx->csCtx.state != 0 && globalCtx->csCtx.npcActions[this->csActionId] != NULL) {
+ if (globalCtx->csCtx.state != CS_STATE_IDLE && globalCtx->csCtx.npcActions[this->csActionId] != NULL) {
DemoEffect_MoveToCsEndpoint(this, globalCtx, this->csActionId, 1);
if (globalCtx->csCtx.npcActions[this->csActionId]->action == 3) {
@@ -1620,7 +1620,7 @@ void DemoEffect_UpdateDust(DemoEffect* this, GlobalContext* globalCtx) {
Vec3f velocity;
Vec3f accel;
- if (globalCtx->csCtx.state != 0 && globalCtx->csCtx.npcActions[this->csActionId] != NULL &&
+ if (globalCtx->csCtx.state != CS_STATE_IDLE && globalCtx->csCtx.npcActions[this->csActionId] != NULL &&
globalCtx->csCtx.npcActions[this->csActionId]->action == 2) {
pos = this->actor.world.pos;
@@ -1654,7 +1654,7 @@ void DemoEffect_Update(Actor* thisx, GlobalContext* globalCtx) {
* Check if the current cutscene action matches the passed in cutscene action ID.
*/
s32 DemoEffect_CheckCsAction(DemoEffect* this, GlobalContext* globalCtx, s32 csActionCompareId) {
- if (globalCtx->csCtx.state != 0 && globalCtx->csCtx.npcActions[this->csActionId] != NULL &&
+ if (globalCtx->csCtx.state != CS_STATE_IDLE && globalCtx->csCtx.npcActions[this->csActionId] != NULL &&
globalCtx->csCtx.npcActions[this->csActionId]->action == csActionCompareId) {
return 1;
}
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 41e6aa39d..0d339ee27 100644
--- a/src/overlays/actors/ovl_Demo_Ext/z_demo_ext.c
+++ b/src/overlays/actors/ovl_Demo_Ext/z_demo_ext.c
@@ -54,7 +54,7 @@ void DemoExt_PlayVortexSFX(DemoExt* this) {
}
CsCmdActorAction* DemoExt_GetNpcAction(GlobalContext* globalCtx, s32 npcActionIndex) {
- if (globalCtx->csCtx.state != 0) {
+ if (globalCtx->csCtx.state != CS_STATE_IDLE) {
return globalCtx->csCtx.npcActions[npcActionIndex];
}
return NULL;
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 9a5d6a52a..07a7515af 100644
--- a/src/overlays/actors/ovl_Demo_Go/z_demo_go.c
+++ b/src/overlays/actors/ovl_Demo_Go/z_demo_go.c
@@ -137,7 +137,7 @@ void func_8097CB0C(DemoGo* this, GlobalContext* globalCtx) {
Vec3f startPos;
Vec3f endPos;
- if (globalCtx->csCtx.state != 0) {
+ if (globalCtx->csCtx.state != CS_STATE_IDLE) {
npcAction = csCtx->npcActions[func_8097C870(this)];
if (npcAction != NULL) {
temp_ret = func_8006F93C(npcAction->endFrame, npcAction->startFrame, csCtx->frames);
@@ -157,8 +157,9 @@ void func_8097CB0C(DemoGo* this, GlobalContext* globalCtx) {
void func_8097CC08(DemoGo* this) {
f32 something = this->unk_19C;
+
if (something < 8.0f) {
- this->actor.speedXZ = (((kREG(15) * 0.01f) + 1.2f) * 0.125f) * something;
+ this->actor.speedXZ = (((kREG(15) * 0.01f) + 1.2f) / 8.0f) * something;
} else {
this->actor.speedXZ = (kREG(15) * 0.01f) + 1.2f;
}
@@ -176,7 +177,7 @@ void func_8097CCE0(DemoGo* this, GlobalContext* globalCtx) {
s32 newRotY;
s32 thisRotY;
- if (globalCtx->csCtx.state != 0) {
+ if (globalCtx->csCtx.state != CS_STATE_IDLE) {
npcAction = globalCtx->csCtx.npcActions[func_8097C870(this)];
if (npcAction != NULL) {
thisRotY = thisx->world.rot.y;
@@ -202,7 +203,7 @@ s32 func_8097CDB0(DemoGo* this, GlobalContext* globalCtx, u16 npcAction) {
CutsceneContext* csCtx = &globalCtx->csCtx;
s32 actionIdx = func_8097C870(this);
- if ((csCtx->state != 0) && (csCtx->npcActions[actionIdx] != NULL) &&
+ if ((csCtx->state != CS_STATE_IDLE) && (csCtx->npcActions[actionIdx] != NULL) &&
(csCtx->npcActions[actionIdx]->action == npcAction)) {
return 1;
}
@@ -226,7 +227,7 @@ void func_8097CE78(DemoGo* this, GlobalContext* globalCtx) {
CutsceneContext* csCtx = &globalCtx->csCtx;
CsCmdActorAction* npcAction;
- if (globalCtx->csCtx.state != 0) {
+ if (globalCtx->csCtx.state != CS_STATE_IDLE) {
npcAction = csCtx->npcActions[func_8097C870(this)];
if (npcAction != NULL && csCtx->frames >= npcAction->endFrame) {
func_8097CA78(this, globalCtx);
diff --git a/src/overlays/actors/ovl_Demo_Gt/z_demo_gt.c b/src/overlays/actors/ovl_Demo_Gt/z_demo_gt.c
index 0561fc33a..e6e14d867 100644
--- a/src/overlays/actors/ovl_Demo_Gt/z_demo_gt.c
+++ b/src/overlays/actors/ovl_Demo_Gt/z_demo_gt.c
@@ -304,7 +304,7 @@ void func_8097E454(GlobalContext* globalCtx, Vec3f* spawnerPos, Vec3f* velocity,
}
u8 func_8097E69C(GlobalContext* globalCtx) {
- if (globalCtx->csCtx.state == 0) {
+ if (globalCtx->csCtx.state == CS_STATE_IDLE) {
return true;
} else {
return false;
@@ -512,7 +512,7 @@ void func_8097EF40(DemoGt* this, GlobalContext* globalCtx) {
s32 pad1[3];
Vec3f dustPos;
Vec3f velocity = { 0.0f, -16.0f, 0.0f };
- Vec3f accel = { 0.0f, 1.20000004768f, 0.0f };
+ Vec3f accel = { 0.0f, 1.2f, 0.0f };
Vec3f* pos = &this->dyna.actor.world.pos;
s32 pad;
@@ -1064,7 +1064,7 @@ void func_8098085C(DemoGt* this, GlobalContext* globalCtx) {
sp28.x = pos->x + 810.0f;
sp28.y = pos->y + 200.0f;
sp28.z = pos->z - 37.0f;
- DemoGt_SpawnExplosionWithSound(globalCtx, &sp28, 0.899999976158f);
+ DemoGt_SpawnExplosionWithSound(globalCtx, &sp28, 0.9f);
} else if (frames == 90) {
sp28.x = pos->x - 220.0f;
sp28.y = pos->y + 1350.0f;
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 29ffe38ed..7ee3501b8 100644
--- a/src/overlays/actors/ovl_Demo_Ik/z_demo_ik.c
+++ b/src/overlays/actors/ovl_Demo_Ik/z_demo_ik.c
@@ -56,7 +56,7 @@ s32 DemoIk_UpdateSkelAnime(DemoIk* this) {
}
CsCmdActorAction* DemoIk_GetCue(GlobalContext* globalCtx, s32 index) {
- if (globalCtx->csCtx.state != 0) {
+ if (globalCtx->csCtx.state != CS_STATE_IDLE) {
return globalCtx->csCtx.npcActions[index];
}
return NULL;
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 bf915e338..8d2454fe8 100644
--- a/src/overlays/actors/ovl_Demo_Im/z_demo_im.c
+++ b/src/overlays/actors/ovl_Demo_Im/z_demo_im.c
@@ -142,7 +142,7 @@ void func_80984C68(DemoIm* this) {
void func_80984C8C(DemoIm* this, GlobalContext* globalCtx) {
u32* something = &D_8098783C;
- if (globalCtx->csCtx.state == 0) {
+ if (globalCtx->csCtx.state == CS_STATE_IDLE) {
if (*something != 0) {
if (this->actor.params == 2) {
func_80984C68(this);
@@ -227,7 +227,7 @@ s32 func_80985060(DemoIm* this) {
}
s32 func_80985080(GlobalContext* globalCtx) {
- if (globalCtx->csCtx.state == 0) {
+ if (globalCtx->csCtx.state == CS_STATE_IDLE) {
return 1;
}
return 0;
@@ -349,7 +349,7 @@ void func_8098544C(DemoIm* this, GlobalContext* globalCtx) {
}
void func_809854DC(DemoIm* this, GlobalContext* globalCtx) {
- if ((globalCtx->csCtx.state != 0) && (globalCtx->csCtx.npcActions[5] != NULL) &&
+ if ((globalCtx->csCtx.state != CS_STATE_IDLE) && (globalCtx->csCtx.npcActions[5] != NULL) &&
(globalCtx->csCtx.npcActions[5]->action == 2)) {
Animation_Change(&this->skelAnime, &D_06001868, 1.0f, 0.0f, Animation_GetLastFrame(&D_06001868), ANIMMODE_LOOP,
0.0f);
@@ -367,7 +367,7 @@ void func_8098557C(DemoIm* this) {
}
void func_809855A8(DemoIm* this, GlobalContext* globalCtx) {
- if ((globalCtx->csCtx.state != 0) && (globalCtx->csCtx.npcActions[5] != NULL) &&
+ if ((globalCtx->csCtx.state != CS_STATE_IDLE) && (globalCtx->csCtx.npcActions[5] != NULL) &&
(globalCtx->csCtx.npcActions[5]->action == 3)) {
Animation_Change(&this->skelAnime, &D_06000710, 1.0f, 0.0f, Animation_GetLastFrame(&D_06000710), ANIMMODE_ONCE,
4.0f);
@@ -384,7 +384,7 @@ void func_80985640(DemoIm* this, s32 arg1) {
}
void func_809856AC(DemoIm* this, GlobalContext* globalCtx) {
- if ((globalCtx->csCtx.state != 0) && (globalCtx->csCtx.npcActions[6] != NULL) &&
+ if ((globalCtx->csCtx.state != CS_STATE_IDLE) && (globalCtx->csCtx.npcActions[6] != NULL) &&
(globalCtx->csCtx.npcActions[6]->action == 2)) {
this->action = 6;
func_809853B4(this, globalCtx);
diff --git a/src/overlays/actors/ovl_Demo_Im/z_demo_im_cutscene_data.c b/src/overlays/actors/ovl_Demo_Im/z_demo_im_cutscene_data.c
index b2d23f755..bf026a844 100644
--- a/src/overlays/actors/ovl_Demo_Im/z_demo_im_cutscene_data.c
+++ b/src/overlays/actors/ovl_Demo_Im/z_demo_im_cutscene_data.c
@@ -52,69 +52,69 @@ CutsceneData D_8098786C[] = {
CS_FADE_BGM_LIST(1),
CS_FADE_BGM(0x0004, 673, 723, 0x0000, 0x00000000, 0x00000000, 0xFFFFFFC1, 0x00000058, 0x00000000, 0xFFFFFFC1, 0x00000058),
CS_CAM_POS_LIST(0, 341),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.60000228881836f, 33, 225, -58, 0x20BA),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.60000228881836f, 33, 225, -58, 0xD5E0),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.60000228881836f, 33, 225, -58, 0x0950),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.60000228881836f, 33, 106, -58, 0x7C50),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.60000228881836f, 33, 23, -58, 0x0000),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.60000228881836f, 11, 10, -18, 0xFFFF),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.60000228881836f, 11, 10, -18, 0x0000),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.60000228881836f, 11, 10, -18, 0xE6A0),
- CS_CAM_POS(CS_CMD_STOP, 0x00, 0, 60.60000228881836f, 11, 10, -18, 0x7C53),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.600002f, 33, 225, -58, 0x20BA),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.600002f, 33, 225, -58, 0xD5E0),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.600002f, 33, 225, -58, 0x0950),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.600002f, 33, 106, -58, 0x7C50),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.600002f, 33, 23, -58, 0x0000),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.600002f, 11, 10, -18, 0xFFFF),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.600002f, 11, 10, -18, 0x0000),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.600002f, 11, 10, -18, 0xE6A0),
+ CS_CAM_POS(CS_CMD_STOP, 0x00, 0, 60.600002f, 11, 10, -18, 0x7C53),
CS_CAM_POS_LIST(263, 504),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 22.626956939697266f, -49, 13, 158, 0x20BA),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 22.626956939697266f, -49, 13, 158, 0xD5E0),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 22.626956939697266f, -49, 13, 158, 0x0950),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 22.626956939697266f, -21, 22, 150, 0x7C50),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 33.22699737548828f, -21, 22, 150, 0x0000),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 33.22699737548828f, -21, 22, 150, 0xFFFF),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 33.22699737548828f, -21, 22, 150, 0x0000),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 33.22699737548828f, -21, 22, 150, 0xE6A0),
- CS_CAM_POS(CS_CMD_STOP, 0x00, 0, 33.22699737548828f, -21, 22, 150, 0x7C53),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 22.626957f, -49, 13, 158, 0x20BA),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 22.626957f, -49, 13, 158, 0xD5E0),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 22.626957f, -49, 13, 158, 0x0950),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 22.626957f, -21, 22, 150, 0x7C50),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 33.226997f, -21, 22, 150, 0x0000),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 33.226997f, -21, 22, 150, 0xFFFF),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 33.226997f, -21, 22, 150, 0x0000),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 33.226997f, -21, 22, 150, 0xE6A0),
+ CS_CAM_POS(CS_CMD_STOP, 0x00, 0, 33.226997f, -21, 22, 150, 0x7C53),
CS_CAM_POS_LIST(363, 824),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.60000228881836f, -67, 8, 117, 0x20BA),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.60000228881836f, -67, 8, 117, 0xD5E0),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.60000228881836f, -67, 8, 117, 0x0950),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.60000228881836f, -67, 8, 117, 0x7C50),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.60000228881836f, -67, 8, 117, 0x0000),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.60000228881836f, -67, 8, 117, 0xFFFF),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 70.79991149902344f, -67, 8, 117, 0x0000),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 70.79991149902344f, -67, 8, 117, 0xE6A0),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 70.79991149902344f, -67, 8, 117, 0x7C53),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 70.79991149902344f, -67, 8, 117, 0x0000),
- CS_CAM_POS(CS_CMD_STOP, 0x00, 0, 70.79991149902344f, -67, 8, 117, 0x0000),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.600002f, -67, 8, 117, 0x20BA),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.600002f, -67, 8, 117, 0xD5E0),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.600002f, -67, 8, 117, 0x0950),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.600002f, -67, 8, 117, 0x7C50),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.600002f, -67, 8, 117, 0x0000),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.600002f, -67, 8, 117, 0xFFFF),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 70.79991f, -67, 8, 117, 0x0000),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 70.79991f, -67, 8, 117, 0xE6A0),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 70.79991f, -67, 8, 117, 0x7C53),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 70.79991f, -67, 8, 117, 0x0000),
+ CS_CAM_POS(CS_CMD_STOP, 0x00, 0, 70.79991f, -67, 8, 117, 0x0000),
CS_CAM_POS_PLAYER_LIST(413, 1504),
- CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 19.999849319458008f, -53, 28, 45, 0x20BA),
- CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 19.999849319458008f, -53, 28, 45, 0xD5E0),
- CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 19.999849319458008f, -53, 28, 45, 0x0950),
- CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 19.999849319458008f, -53, 28, 45, 0x7C50),
- CS_CAM_POS_PLAYER(CS_CMD_STOP, 0x00, 0, 19.999849319458008f, -53, 28, 45, 0x0000),
+ CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 19.99985f, -53, 28, 45, 0x20BA),
+ CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 19.99985f, -53, 28, 45, 0xD5E0),
+ CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 19.99985f, -53, 28, 45, 0x0950),
+ CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 19.99985f, -53, 28, 45, 0x7C50),
+ CS_CAM_POS_PLAYER(CS_CMD_STOP, 0x00, 0, 19.99985f, -53, 28, 45, 0x0000),
CS_CAM_POS_LIST(483, 1684),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 68.91905975341797f, -67, 8, 117, 0x20BA),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 68.91905975341797f, -67, 8, 117, 0xD5E0),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 68.91905975341797f, -67, 8, 117, 0x0950),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 68.91905975341797f, -71, 15, 124, 0x7C50),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 68.91905975341797f, -73, 29, 131, 0x0000),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 68.91905975341797f, -78, 40, 140, 0xFFFF),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 68.91905975341797f, -78, 40, 140, 0x0000),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 68.91905975341797f, -78, 40, 140, 0xE6A0),
- CS_CAM_POS(CS_CMD_STOP, 0x00, 0, 68.91905975341797f, -78, 40, 140, 0x7C53),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 68.91906f, -67, 8, 117, 0x20BA),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 68.91906f, -67, 8, 117, 0xD5E0),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 68.91906f, -67, 8, 117, 0x0950),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 68.91906f, -71, 15, 124, 0x7C50),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 68.91906f, -73, 29, 131, 0x0000),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 68.91906f, -78, 40, 140, 0xFFFF),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 68.91906f, -78, 40, 140, 0x0000),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 68.91906f, -78, 40, 140, 0xE6A0),
+ CS_CAM_POS(CS_CMD_STOP, 0x00, 0, 68.91906f, -78, 40, 140, 0x7C53),
CS_CAM_POS_LIST(553, 1644),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.599945068359375f, -39, 34, 201, 0x20BA),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.599945068359375f, -39, 34, 201, 0xD5E0),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.599945068359375f, -39, 34, 201, 0x0950),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.599945068359375f, -39, 34, 201, 0x7C50),
- CS_CAM_POS(CS_CMD_STOP, 0x00, 0, 45.599945068359375f, -39, 34, 201, 0x0000),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.599945f, -39, 34, 201, 0x20BA),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.599945f, -39, 34, 201, 0xD5E0),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.599945f, -39, 34, 201, 0x0950),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.599945f, -39, 34, 201, 0x7C50),
+ CS_CAM_POS(CS_CMD_STOP, 0x00, 0, 45.599945f, -39, 34, 201, 0x0000),
CS_CAM_POS_LIST(623, 819),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 70.59991455078125f, 9, 13, -17, 0x20BA),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 70.59991455078125f, 9, 13, -17, 0xD5E0),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 70.59991455078125f, 9, 13, -17, 0x0950),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 70.59991455078125f, 9, 71, -17, 0x7C50),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 126.99905395507812f, 9, 385, -17, 0x0000),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 126.99905395507812f, 9, 385, -17, 0xFFFF),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 126.99905395507812f, 9, 385, -17, 0x0000),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 126.99905395507812f, 9, 385, -17, 0xE6A0),
- CS_CAM_POS(CS_CMD_STOP, 0x00, 0, 126.99905395507812f, 9, 385, -17, 0x7C53),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 70.599915f, 9, 13, -17, 0x20BA),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 70.599915f, 9, 13, -17, 0xD5E0),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 70.599915f, 9, 13, -17, 0x0950),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 70.599915f, 9, 71, -17, 0x7C50),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 126.999054f, 9, 385, -17, 0x0000),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 126.999054f, 9, 385, -17, 0xFFFF),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 126.999054f, 9, 385, -17, 0x0000),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 126.999054f, 9, 385, -17, 0xE6A0),
+ CS_CAM_POS(CS_CMD_STOP, 0x00, 0, 126.999054f, 9, 385, -17, 0x7C53),
CS_CAM_POS_LIST(693, 1035),
CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.0f, 13, 854, 2, 0x20BA),
CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.0f, 9, 853, 5, 0xD5E0),
@@ -126,97 +126,97 @@ CutsceneData D_8098786C[] = {
CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.0f, 9, 852, 5, 0xE6A0),
CS_CAM_POS(CS_CMD_STOP, 0x00, 0, 60.0f, -3, 851, 5, 0x7C53),
CS_CAM_POS_PLAYER_LIST(769, 1950),
- CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 68.59994506835938f, 0, 33, -27, 0x20BA),
- CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 68.59994506835938f, 0, 33, -27, 0xD5E0),
- CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 68.59994506835938f, 0, 68, -26, 0x0950),
- CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 68.59994506835938f, 0, 103, -26, 0x7C50),
- CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 68.59994506835938f, 0, 103, -26, 0x0000),
- CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 68.59994506835938f, 0, 103, -26, 0xFFFF),
- CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 68.59994506835938f, 0, 103, -26, 0x0000),
- CS_CAM_POS_PLAYER(CS_CMD_STOP, 0x00, 0, 68.59994506835938f, 0, 103, -26, 0xE6A0),
+ CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 68.599945f, 0, 33, -27, 0x20BA),
+ CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 68.599945f, 0, 33, -27, 0xD5E0),
+ CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 68.599945f, 0, 68, -26, 0x0950),
+ CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 68.599945f, 0, 103, -26, 0x7C50),
+ CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 68.599945f, 0, 103, -26, 0x0000),
+ CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 68.599945f, 0, 103, -26, 0xFFFF),
+ CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 68.599945f, 0, 103, -26, 0x0000),
+ CS_CAM_POS_PLAYER(CS_CMD_STOP, 0x00, 0, 68.599945f, 0, 103, -26, 0xE6A0),
CS_CAM_FOCUS_POINT_LIST(0, 370),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.60000228881836f, -21, 21, 42, 0x20BA),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 50, 60.60000228881836f, -21, 21, 42, 0xD5E0),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 50, 60.60000228881836f, -21, 21, 42, 0x0950),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 50, 60.60000228881836f, -78, 86, 144, 0x7C50),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 50, 60.60000228881836f, -80, 21, 142, 0x0000),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 50, 60.60000228881836f, -99, 31, 177, 0xFFFF),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.60000228881836f, -99, 31, 177, 0x0000),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.60000228881836f, -99, 31, 177, 0xE6A0),
- CS_CAM_FOCUS_POINT(CS_CMD_STOP, 0x00, 30, 60.60000228881836f, -99, 31, 177, 0x7C53),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.600002f, -21, 21, 42, 0x20BA),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 50, 60.600002f, -21, 21, 42, 0xD5E0),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 50, 60.600002f, -21, 21, 42, 0x0950),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 50, 60.600002f, -78, 86, 144, 0x7C50),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 50, 60.600002f, -80, 21, 142, 0x0000),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 50, 60.600002f, -99, 31, 177, 0xFFFF),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.600002f, -99, 31, 177, 0x0000),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.600002f, -99, 31, 177, 0xE6A0),
+ CS_CAM_FOCUS_POINT(CS_CMD_STOP, 0x00, 30, 60.600002f, -99, 31, 177, 0x7C53),
CS_CAM_FOCUS_POINT_LIST(263, 533),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 22.626956939697266f, -309, 11, 229, 0x20BA),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 22.626956939697266f, -309, 11, 229, 0xD5E0),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 22.626956939697266f, -309, 11, 229, 0x0950),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 33.22699737548828f, -258, 133, 191, 0x7C50),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 33.22699737548828f, -258, 133, 191, 0x0000),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 33.22699737548828f, -258, 133, 191, 0xFFFF),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 33.22699737548828f, -258, 133, 191, 0x0000),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 33.22699737548828f, -258, 133, 191, 0xE6A0),
- CS_CAM_FOCUS_POINT(CS_CMD_STOP, 0x00, 30, 33.22699737548828f, -258, 133, 191, 0x7C53),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 22.626957f, -309, 11, 229, 0x20BA),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 22.626957f, -309, 11, 229, 0xD5E0),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 22.626957f, -309, 11, 229, 0x0950),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 33.226997f, -258, 133, 191, 0x7C50),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 33.226997f, -258, 133, 191, 0x0000),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 33.226997f, -258, 133, 191, 0xFFFF),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 33.226997f, -258, 133, 191, 0x0000),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 33.226997f, -258, 133, 191, 0xE6A0),
+ CS_CAM_FOCUS_POINT(CS_CMD_STOP, 0x00, 30, 33.226997f, -258, 133, 191, 0x7C53),
CS_CAM_FOCUS_POINT_LIST(363, 853),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 50, 68.79994201660156f, 68, 109, -103, 0x20BA),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 50, 68.99993896484375f, 68, 109, -103, 0xD5E0),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 50, 68.79994201660156f, 67, 109, -103, 0x0950),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 50, 68.59994506835938f, 189, 109, 92, 0x7C50),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 50, 68.59994506835938f, 57, 108, 341, 0x0000),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 50, 70.79991149902344f, -186, 107, 341, 0xFFFF),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 50, 70.79991149902344f, -186, 107, 341, 0x0000),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 50, 70.79991149902344f, -186, 107, 341, 0xE6A0),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 70.79991149902344f, -186, 107, 341, 0x7C53),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 70.79991149902344f, -186, 107, 341, 0x0000),
- CS_CAM_FOCUS_POINT(CS_CMD_STOP, 0x00, 30, 70.79991149902344f, -186, 107, 341, 0x0000),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 50, 68.79994f, 68, 109, -103, 0x20BA),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 50, 68.99994f, 68, 109, -103, 0xD5E0),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 50, 68.79994f, 67, 109, -103, 0x0950),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 50, 68.599945f, 189, 109, 92, 0x7C50),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 50, 68.599945f, 57, 108, 341, 0x0000),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 50, 70.79991f, -186, 107, 341, 0xFFFF),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 50, 70.79991f, -186, 107, 341, 0x0000),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 50, 70.79991f, -186, 107, 341, 0xE6A0),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 70.79991f, -186, 107, 341, 0x7C53),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 70.79991f, -186, 107, 341, 0x0000),
+ CS_CAM_FOCUS_POINT(CS_CMD_STOP, 0x00, 30, 70.79991f, -186, 107, 341, 0x0000),
CS_CAM_FOCUS_POINT_PLAYER_LIST(413, 1533),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 19.999849319458008f, 171, 122, -106, 0x20BA),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 19.999849319458008f, 171, 122, -106, 0xD5E0),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 1000, 19.999849319458008f, 171, 122, -106, 0x0950),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 19.999849319458008f, 170, 122, -106, 0x7C50),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_STOP, 0x00, 30, 19.999849319458008f, 170, 122, -106, 0x0000),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 19.99985f, 171, 122, -106, 0x20BA),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 19.99985f, 171, 122, -106, 0xD5E0),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 1000, 19.99985f, 171, 122, -106, 0x0950),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 19.99985f, 170, 122, -106, 0x7C50),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_STOP, 0x00, 30, 19.99985f, 170, 122, -106, 0x0000),
CS_CAM_FOCUS_POINT_LIST(483, 1713),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x01, 20, 68.91905975341797f, -191, 132, 327, 0x20BA),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 20, 68.91905975341797f, -191, 132, 327, 0xD5E0),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0xFF, 30, 68.91905975341797f, -190, 131, 326, 0x0950),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 40, 68.91905975341797f, -189, 154, 324, 0x7C50),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x01, 30, 68.91905975341797f, -194, 162, 331, 0x0000),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 68.91905975341797f, -199, 172, 339, 0xFFFF),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 1000, 68.91905975341797f, -199, 172, 339, 0x0000),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 68.91905975341797f, -199, 172, 339, 0xE6A0),
- CS_CAM_FOCUS_POINT(CS_CMD_STOP, 0x00, 30, 68.91905975341797f, -199, 172, 339, 0x7C53),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x01, 20, 68.91906f, -191, 132, 327, 0x20BA),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 20, 68.91906f, -191, 132, 327, 0xD5E0),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0xFF, 30, 68.91906f, -190, 131, 326, 0x0950),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 40, 68.91906f, -189, 154, 324, 0x7C50),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x01, 30, 68.91906f, -194, 162, 331, 0x0000),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 68.91906f, -199, 172, 339, 0xFFFF),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 1000, 68.91906f, -199, 172, 339, 0x0000),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 68.91906f, -199, 172, 339, 0xE6A0),
+ CS_CAM_FOCUS_POINT(CS_CMD_STOP, 0x00, 30, 68.91906f, -199, 172, 339, 0x7C53),
CS_CAM_FOCUS_POINT_LIST(553, 1673),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 45.599945068359375f, -234, 123, 37, 0x20BA),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 45.599945068359375f, -234, 123, 37, 0xD5E0),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 1000, 45.599945068359375f, -234, 123, 37, 0x0950),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 45.599945068359375f, -234, 123, 37, 0x7C50),
- CS_CAM_FOCUS_POINT(CS_CMD_STOP, 0x00, 30, 45.599945068359375f, -233, 123, 37, 0x0000),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 45.599945f, -234, 123, 37, 0x20BA),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 45.599945f, -234, 123, 37, 0xD5E0),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 1000, 45.599945f, -234, 123, 37, 0x0950),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 45.599945f, -234, 123, 37, 0x7C50),
+ CS_CAM_FOCUS_POINT(CS_CMD_STOP, 0x00, 30, 45.599945f, -233, 123, 37, 0x0000),
CS_CAM_FOCUS_POINT_LIST(623, 848),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 70.59991455078125f, -52, 17, 91, 0x20BA),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 70.59991455078125f, -52, 17, 91, 0xD5E0),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 20, 70.59991455078125f, -52, 17, 91, 0x0950),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 15, 70.59991455078125f, -52, 75, 91, 0x7C50),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 10, 126.99905395507812f, -5, 503, 9, 0x0000),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 126.99905395507812f, -5, 503, 9, 0xFFFF),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 126.99905395507812f, -5, 503, 9, 0x0000),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 126.99905395507812f, -5, 503, 9, 0xE6A0),
- CS_CAM_FOCUS_POINT(CS_CMD_STOP, 0x00, 30, 126.99905395507812f, -5, 503, 9, 0x7C53),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 70.599915f, -52, 17, 91, 0x20BA),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 70.599915f, -52, 17, 91, 0xD5E0),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 20, 70.599915f, -52, 17, 91, 0x0950),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 15, 70.599915f, -52, 75, 91, 0x7C50),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 10, 126.999054f, -5, 503, 9, 0x0000),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 126.999054f, -5, 503, 9, 0xFFFF),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 126.999054f, -5, 503, 9, 0x0000),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 126.999054f, -5, 503, 9, 0xE6A0),
+ CS_CAM_FOCUS_POINT(CS_CMD_STOP, 0x00, 30, 126.999054f, -5, 503, 9, 0x7C53),
CS_CAM_FOCUS_POINT_LIST(693, 1084),
CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 50, 60.0f, 3, 6, -6, 0x20BA),
CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 40, 60.0f, 3, 6, -6, 0xD5E0),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 50.99996566772461f, 3, 6, -6, 0x0950),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 20, 20.599849700927734f, 3, 6, -6, 0x7C50),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 51, 10.799838066101074f, 3, 6, -6, 0x0000),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 50, 10.3998384475708f, 3, 6, -6, 0xFFFF),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 50, 10.3998384475708f, 3, 6, -6, 0x0000),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 50, 10.199838638305664f, 3, 6, -6, 0xE6A0),
- CS_CAM_FOCUS_POINT(CS_CMD_STOP, 0x00, 50, 10.999837875366211f, 3, 6, -6, 0x7C53),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 50.999966f, 3, 6, -6, 0x0950),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 20, 20.59985f, 3, 6, -6, 0x7C50),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 51, 10.799838f, 3, 6, -6, 0x0000),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 50, 10.399838f, 3, 6, -6, 0xFFFF),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 50, 10.399838f, 3, 6, -6, 0x0000),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 50, 10.199839f, 3, 6, -6, 0xE6A0),
+ CS_CAM_FOCUS_POINT(CS_CMD_STOP, 0x00, 50, 10.999838f, 3, 6, -6, 0x7C53),
CS_CAM_FOCUS_POINT_PLAYER_LIST(769, 1979),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 68.59994506835938f, 0, 100, 5, 0x20BA),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 68.59994506835938f, 0, 101, 6, 0xD5E0),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 68.59994506835938f, 1, 99, 41, 0x0950),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 68.59994506835938f, 0, 42, 16, 0x7C50),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 68.59994506835938f, 0, 42, 16, 0x0000),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 1000, 68.59994506835938f, 0, 42, 16, 0xFFFF),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 68.59994506835938f, 0, 42, 16, 0x0000),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_STOP, 0x00, 30, 68.59994506835938f, 0, 42, 16, 0xE6A0),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 68.599945f, 0, 100, 5, 0x20BA),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 68.599945f, 0, 101, 6, 0xD5E0),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 68.599945f, 1, 99, 41, 0x0950),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 68.599945f, 0, 42, 16, 0x7C50),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 68.599945f, 0, 42, 16, 0x0000),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 1000, 68.599945f, 0, 42, 16, 0xFFFF),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 68.599945f, 0, 42, 16, 0x0000),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_STOP, 0x00, 30, 68.599945f, 0, 42, 16, 0xE6A0),
CS_END(),
};
// clang-format on
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 703f0bff7..5c256debc 100644
--- a/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.c
+++ b/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo.c
@@ -397,7 +397,7 @@ void DemoKankyo_SetRockPos(DemoKankyo* this, GlobalContext* globalCtx, s32 param
}
void DemoKankyo_UpdateRock(DemoKankyo* this, GlobalContext* globalCtx) {
- if (globalCtx->csCtx.state != 0 && globalCtx->csCtx.npcActions[this->actor.params - 2] != NULL) {
+ if (globalCtx->csCtx.state != CS_STATE_IDLE && globalCtx->csCtx.npcActions[this->actor.params - 2] != NULL) {
DemoKankyo_SetRockPos(this, globalCtx, this->actor.params - 2);
}
this->unk_150[0].unk_C.x += this->unk_150[0].unk_0.x;
@@ -447,11 +447,11 @@ void DemoKankyo_Draw(Actor* thisx, GlobalContext* globalCtx) {
break;
} else {
if (LINK_IS_CHILD) {
- if (globalCtx->csCtx.frames < 170 || globalCtx->csCtx.state == 0) {
+ if (globalCtx->csCtx.frames < 170 || globalCtx->csCtx.state == CS_STATE_IDLE) {
break;
}
} else {
- if (globalCtx->csCtx.frames < 120 || globalCtx->csCtx.state == 0) {
+ if (globalCtx->csCtx.frames < 120 || globalCtx->csCtx.state == CS_STATE_IDLE) {
break;
}
}
@@ -718,7 +718,7 @@ void DemoKankyo_DrawLightPlane(Actor* thisx, GlobalContext* globalCtx) {
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_demo_kankyo.c", 1514);
- if (globalCtx->csCtx.state == 0 || gSaveContext.sceneSetupIndex >= 4) {
+ if (globalCtx->csCtx.state == CS_STATE_IDLE || gSaveContext.sceneSetupIndex >= 4) {
func_80093D84(globalCtx->state.gfxCtx);
gSPSegment(POLY_XLU_DISP++, 0x08,
@@ -825,7 +825,7 @@ void DemoKankyo_DrawWarpSparkles(Actor* thisx, GlobalContext* globalCtx) {
func_800776E4(globalCtx);
this->unk_150[i].unk_22++;
}
- } else if (i + 1 == this->sparkleCounter && globalCtx->csCtx.state == 0) {
+ } else if (i + 1 == this->sparkleCounter && globalCtx->csCtx.state == CS_STATE_IDLE) {
func_80088AF0(globalCtx);
Actor_Kill(&this->actor);
}
@@ -941,7 +941,7 @@ void DemoKankyo_DrawSparkles(Actor* thisx, GlobalContext* globalCtx) {
DemoKankyo_Vec3fAddPosRot(&posRot, &camPos, &D_8098CFB8);
break;
case 2:
- if (i + 1 == this->sparkleCounter && globalCtx->csCtx.state == 0) {
+ if (i + 1 == this->sparkleCounter && globalCtx->csCtx.state == CS_STATE_IDLE) {
Actor_Kill(&this->actor);
}
break;
diff --git a/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data1.c b/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data1.c
index 88660dec8..aa97ff349 100644
--- a/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data1.c
+++ b/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data1.c
@@ -5,21 +5,21 @@
CutsceneData gAdultWarpInCS[] = {
CS_BEGIN_CUTSCENE(2, 164),
CS_CAM_POS_PLAYER_LIST(0, 135),
- CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 60.32485580444336f, 31, 79, 59, 0x010F),
- CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 60.32485580444336f, 31, 78, 60, 0x0120),
- CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 60.32485580444336f, 32, 78, 60, 0x0131),
- CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 60.32485580444336f, 30, 79, 59, 0x01F4),
- CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 60.32485580444336f, 30, 78, 60, 0x01F6),
- CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 60.32485580444336f, 30, 78, 60, 0x0207),
- CS_CAM_POS_PLAYER(CS_CMD_STOP, 0x00, 0, 60.32485580444336f, 30, 78, 60, 0x0000),
+ CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 60.324856f, 31, 79, 59, 0x010F),
+ CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 60.324856f, 31, 78, 60, 0x0120),
+ CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 60.324856f, 32, 78, 60, 0x0131),
+ CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 60.324856f, 30, 79, 59, 0x01F4),
+ CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 60.324856f, 30, 78, 60, 0x01F6),
+ CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 60.324856f, 30, 78, 60, 0x0207),
+ CS_CAM_POS_PLAYER(CS_CMD_STOP, 0x00, 0, 60.324856f, 30, 78, 60, 0x0000),
CS_CAM_FOCUS_POINT_PLAYER_LIST(0, 164),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 60.32485580444336f, 11, 50, 23, 0x010F),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 60.32485580444336f, 11, 48, 22, 0x0120),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 7, 60.32485580444336f, 11, 48, 22, 0x0131),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 7, 60.32485580444336f, 57, 101, 21, 0x01F4),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 60.32485580444336f, 57, 101, 21, 0x01F6),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 60.32485580444336f, 57, 101, 21, 0x0207),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_STOP, 0x00, 30, 60.32485580444336f, 57, 101, 21, 0x0000),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 60.324856f, 11, 50, 23, 0x010F),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 60.324856f, 11, 48, 22, 0x0120),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 7, 60.324856f, 11, 48, 22, 0x0131),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 7, 60.324856f, 57, 101, 21, 0x01F4),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 60.324856f, 57, 101, 21, 0x01F6),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 60.324856f, 57, 101, 21, 0x0207),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_STOP, 0x00, 30, 60.324856f, 57, 101, 21, 0x0000),
CS_END(),
};
// clang-format on
diff --git a/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data2.c b/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data2.c
index 08915b5c8..2886929a9 100644
--- a/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data2.c
+++ b/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data2.c
@@ -5,23 +5,23 @@
CutsceneData gAdultWarpOutCS[] = {
CS_BEGIN_CUTSCENE(5, 1167),
CS_CAM_POS_PLAYER_LIST(0, 1138),
- CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 60.324859619140625f, 31, 82, 61, 0x20BA),
- CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 60.324859619140625f, 31, 82, 61, 0xA1BC),
- CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 60.324859619140625f, 31, 82, 61, 0xA5E1),
- CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 60.324859619140625f, 31, 82, 61, 0xA5CB),
- CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 60.324859619140625f, 31, 82, 61, 0xA5EB),
- CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 60.324859619140625f, 31, 82, 61, 0x20BA),
- CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 60.324859619140625f, 31, 82, 61, 0xA1BC),
- CS_CAM_POS_PLAYER(CS_CMD_STOP, 0x00, 0, 60.324859619140625f, 31, 82, 61, 0xA5E1),
+ CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 60.32486f, 31, 82, 61, 0x20BA),
+ CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 60.32486f, 31, 82, 61, 0xA1BC),
+ CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 60.32486f, 31, 82, 61, 0xA5E1),
+ CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 60.32486f, 31, 82, 61, 0xA5CB),
+ CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 60.32486f, 31, 82, 61, 0xA5EB),
+ CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 60.32486f, 31, 82, 61, 0x20BA),
+ CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 60.32486f, 31, 82, 61, 0xA1BC),
+ CS_CAM_POS_PLAYER(CS_CMD_STOP, 0x00, 0, 60.32486f, 31, 82, 61, 0xA5E1),
CS_CAM_FOCUS_POINT_PLAYER_LIST(0, 1167),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 60.324859619140625f, 55, 99, 31, 0x20BA),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 60.324859619140625f, 55, 99, 31, 0xA1BC),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 10, 60.324859619140625f, 55, 99, 31, 0xA5E1),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 7, 60.324859619140625f, 17, 59, 31, 0xA5CB),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 60.324859619140625f, 17, 59, 31, 0xA5EB),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 1000, 60.324859619140625f, 17, 59, 31, 0x20BA),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 60.324859619140625f, 17, 59, 31, 0xA1BC),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_STOP, 0x00, 30, 60.324859619140625f, 17, 59, 31, 0xA5E1),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 60.32486f, 55, 99, 31, 0x20BA),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 60.32486f, 55, 99, 31, 0xA1BC),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 10, 60.32486f, 55, 99, 31, 0xA5E1),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 7, 60.32486f, 17, 59, 31, 0xA5CB),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 60.32486f, 17, 59, 31, 0xA5EB),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 1000, 60.32486f, 17, 59, 31, 0x20BA),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 60.32486f, 17, 59, 31, 0xA1BC),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_STOP, 0x00, 30, 60.32486f, 17, 59, 31, 0xA5E1),
CS_SCENE_TRANS_FX(0x0005, 36, 46),
CS_SCENE_TRANS_FX(0x0001, 30, 35),
CS_MISC_LIST(1),
diff --git a/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data3.c b/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data3.c
index c3f73c91d..d1bda4595 100644
--- a/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data3.c
+++ b/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data3.c
@@ -5,21 +5,21 @@
CutsceneData gAdultWarpInToTCS[] = {
CS_BEGIN_CUTSCENE(2, 118),
CS_CAM_POS_PLAYER_LIST(0, 89),
- CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 71.32476043701172f, 53, 53, 40, 0x010F),
+ CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 71.32476f, 53, 53, 40, 0x010F),
CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 60.0f, 53, 53, 40, 0x0120),
CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 60.0f, 53, 53, 40, 0x0131),
- CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 70.59991455078125f, 58, 102, 48, 0x01F4),
- CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 70.59991455078125f, 58, 102, 48, 0x01F6),
- CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 70.59991455078125f, 58, 102, 48, 0x0207),
- CS_CAM_POS_PLAYER(CS_CMD_STOP, 0x00, 0, 70.59991455078125f, 58, 102, 48, 0x0047),
+ CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 70.599915f, 58, 102, 48, 0x01F4),
+ CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 70.599915f, 58, 102, 48, 0x01F6),
+ CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 70.599915f, 58, 102, 48, 0x0207),
+ CS_CAM_POS_PLAYER(CS_CMD_STOP, 0x00, 0, 70.599915f, 58, 102, 48, 0x0047),
CS_CAM_FOCUS_POINT_PLAYER_LIST(0, 118),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 7, 70.52477264404297f, 11, 29, 10, 0x010F),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 7, 70.39991760253906f, 11, 29, 10, 0x0120),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 7, 70.59991455078125f, 11, 29, 10, 0x0131),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 7, 70.59991455078125f, 29, 71, 25, 0x01F4),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 70.59991455078125f, 29, 71, 25, 0x01F6),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 70.59991455078125f, 29, 71, 25, 0x0207),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_STOP, 0x00, 30, 70.59991455078125f, 29, 71, 25, 0x0047),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 7, 70.52477f, 11, 29, 10, 0x010F),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 7, 70.39992f, 11, 29, 10, 0x0120),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 7, 70.599915f, 11, 29, 10, 0x0131),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 7, 70.599915f, 29, 71, 25, 0x01F4),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 70.599915f, 29, 71, 25, 0x01F6),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 70.599915f, 29, 71, 25, 0x0207),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_STOP, 0x00, 30, 70.599915f, 29, 71, 25, 0x0047),
CS_END(),
};
// clang-format on
diff --git a/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data4.c b/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data4.c
index ad72e76d8..04bd3ac68 100644
--- a/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data4.c
+++ b/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data4.c
@@ -7,17 +7,17 @@ CutsceneData gAdultWarpOutToTCS[] = {
CS_SCENE_TRANS_FX(0x0005, 36, 46),
CS_SCENE_TRANS_FX(0x0001, 30, 35),
CS_CAM_POS_PLAYER_LIST(0, 1091),
- CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 60.324859619140625f, 42, 89, 50, 0x0000),
- CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 60.324859619140625f, 42, 89, 50, 0x0000),
- CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 60.324859619140625f, 42, 89, 50, 0x0000),
- CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 60.324859619140625f, 42, 89, 50, 0x0000),
- CS_CAM_POS_PLAYER(CS_CMD_STOP, 0x00, 0, 60.324859619140625f, 42, 89, 50, 0x29D0),
+ CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 60.32486f, 42, 89, 50, 0x0000),
+ CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 60.32486f, 42, 89, 50, 0x0000),
+ CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 60.32486f, 42, 89, 50, 0x0000),
+ CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 60.32486f, 42, 89, 50, 0x0000),
+ CS_CAM_POS_PLAYER(CS_CMD_STOP, 0x00, 0, 60.32486f, 42, 89, 50, 0x29D0),
CS_CAM_FOCUS_POINT_PLAYER_LIST(0, 1120),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 60.324859619140625f, 24, 66, 29, 0x0000),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 60.324859619140625f, 24, 66, 29, 0x0000),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 1000, 60.324859619140625f, 24, 66, 29, 0x0000),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 60.324859619140625f, 24, 66, 29, 0x0000),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_STOP, 0x00, 30, 60.324859619140625f, 24, 66, 29, 0x29D0),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 60.32486f, 24, 66, 29, 0x0000),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 60.32486f, 24, 66, 29, 0x0000),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 1000, 60.32486f, 24, 66, 29, 0x0000),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 60.32486f, 24, 66, 29, 0x0000),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_STOP, 0x00, 30, 60.32486f, 24, 66, 29, 0x29D0),
CS_MISC_LIST(1),
CS_MISC(0x000C, 95, 96, 0x0000, 0x00000000, 0x00000000, 0xFFFFFFEE, 0xFFFFFFF3, 0x00000000, 0xFFFFFFEE, 0xFFFFFFF3, 0x00000000, 0x00000000, 0x00000000),
CS_END(),
diff --git a/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data5.c b/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data5.c
index a86b93dd2..9b4df2cd3 100644
--- a/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data5.c
+++ b/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data5.c
@@ -5,23 +5,23 @@
CutsceneData gChildWarpInCS[] = {
CS_BEGIN_CUTSCENE(2, 1164),
CS_CAM_POS_PLAYER_LIST(0, 1135),
- CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 60.32485580444336f, 31, 68, 59, 0x010F),
- CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 60.32485580444336f, 32, 68, 60, 0x0120),
- CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 60.32485580444336f, 31, 69, 59, 0x0131),
- CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 60.32485580444336f, 31, 64, 59, 0x01F4),
- CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 60.32485580444336f, 31, 64, 59, 0x01F6),
- CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 60.32485580444336f, 31, 64, 59, 0x0207),
- CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 60.32485580444336f, 31, 64, 59, 0xB46C),
- CS_CAM_POS_PLAYER(CS_CMD_STOP, 0x00, 0, 60.32485580444336f, 31, 64, 59, 0x05BC),
+ CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 60.324856f, 31, 68, 59, 0x010F),
+ CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 60.324856f, 32, 68, 60, 0x0120),
+ CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 60.324856f, 31, 69, 59, 0x0131),
+ CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 60.324856f, 31, 64, 59, 0x01F4),
+ CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 60.324856f, 31, 64, 59, 0x01F6),
+ CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 60.324856f, 31, 64, 59, 0x0207),
+ CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 60.324856f, 31, 64, 59, 0xB46C),
+ CS_CAM_POS_PLAYER(CS_CMD_STOP, 0x00, 0, 60.324856f, 31, 64, 59, 0x05BC),
CS_CAM_FOCUS_POINT_PLAYER_LIST(0, 1164),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 60.32485580444336f, 12, 40, 22, 0x010F),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 60.32485580444336f, 11, 38, 22, 0x0120),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 7, 60.32485580444336f, 11, 39, 22, 0x0131),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 7, 60.32485580444336f, 57, 86, 21, 0x01F4),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 60.32485580444336f, 57, 86, 21, 0x01F6),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 1000, 60.32485580444336f, 57, 86, 21, 0x0207),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 60.32485580444336f, 57, 86, 21, 0xB46C),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_STOP, 0x00, 30, 60.32485580444336f, 57, 86, 21, 0x05BC),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 60.324856f, 12, 40, 22, 0x010F),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 60.324856f, 11, 38, 22, 0x0120),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 7, 60.324856f, 11, 39, 22, 0x0131),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 7, 60.324856f, 57, 86, 21, 0x01F4),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 60.324856f, 57, 86, 21, 0x01F6),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 1000, 60.324856f, 57, 86, 21, 0x0207),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 60.324856f, 57, 86, 21, 0xB46C),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_STOP, 0x00, 30, 60.324856f, 57, 86, 21, 0x05BC),
CS_END(),
};
// clang-format on
diff --git a/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data6.c b/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data6.c
index e0d467d43..f31c9204a 100644
--- a/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data6.c
+++ b/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data6.c
@@ -7,23 +7,23 @@ CutsceneData gChildWarpOutCS[] = {
CS_SCENE_TRANS_FX(0x0005, 36, 46),
CS_SCENE_TRANS_FX(0x0001, 30, 35),
CS_CAM_POS_PLAYER_LIST(0, 1138),
- CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 60.324859619140625f, 30, 63, 61, 0xA8A5),
- CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 60.324859619140625f, 30, 63, 61, 0xA3D9),
- CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 60.324859619140625f, 30, 63, 61, 0xF3A5),
- CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 60.32486343383789f, 29, 61, 59, 0xA5D5),
- CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 60.32486343383789f, 29, 61, 59, 0xA5E7),
- CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 60.32486343383789f, 29, 61, 59, 0xA5EC),
- CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 60.32486343383789f, 29, 61, 59, 0xBCA5),
- CS_CAM_POS_PLAYER(CS_CMD_STOP, 0x00, 0, 60.32486343383789f, 29, 61, 59, 0xEEC0),
+ CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 60.32486f, 30, 63, 61, 0xA8A5),
+ CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 60.32486f, 30, 63, 61, 0xA3D9),
+ CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 60.32486f, 30, 63, 61, 0xF3A5),
+ CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 60.324863f, 29, 61, 59, 0xA5D5),
+ CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 60.324863f, 29, 61, 59, 0xA5E7),
+ CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 60.324863f, 29, 61, 59, 0xA5EC),
+ CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 60.324863f, 29, 61, 59, 0xBCA5),
+ CS_CAM_POS_PLAYER(CS_CMD_STOP, 0x00, 0, 60.324863f, 29, 61, 59, 0xEEC0),
CS_CAM_FOCUS_POINT_PLAYER_LIST(0, 1167),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 60.324859619140625f, 54, 79, 31, 0xA8A5),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 60.324859619140625f, 54, 80, 31, 0xA3D9),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 10, 60.324859619140625f, 54, 79, 31, 0xF3A5),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 7, 60.32486343383789f, 15, 42, 30, 0xA5D5),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 60.32486343383789f, 15, 42, 30, 0xA5E7),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 1000, 60.32486343383789f, 15, 42, 30, 0xA5EC),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 60.32486343383789f, 15, 42, 30, 0xBCA5),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_STOP, 0x00, 30, 60.32486343383789f, 15, 42, 30, 0xEEC0),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 60.32486f, 54, 79, 31, 0xA8A5),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 60.32486f, 54, 80, 31, 0xA3D9),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 10, 60.32486f, 54, 79, 31, 0xF3A5),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 7, 60.324863f, 15, 42, 30, 0xA5D5),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 60.324863f, 15, 42, 30, 0xA5E7),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 1000, 60.324863f, 15, 42, 30, 0xA5EC),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 60.324863f, 15, 42, 30, 0xBCA5),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_STOP, 0x00, 30, 60.324863f, 15, 42, 30, 0xEEC0),
CS_MISC_LIST(1),
CS_MISC(0x000C, 95, 96, 0x0000, 0x00000000, 0x00000000, 0xFFFFFFEF, 0xFFFFFFCD, 0x00000000, 0xFFFFFFEF, 0xFFFFFFCD, 0x00000000, 0x00000000, 0x00000000),
CS_END(),
diff --git a/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data7.c b/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data7.c
index 549d8a77a..08727cc15 100644
--- a/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data7.c
+++ b/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data7.c
@@ -5,23 +5,23 @@
CutsceneData gChildWarpInToTCS[] = {
CS_BEGIN_CUTSCENE(2, 1118),
CS_CAM_POS_PLAYER_LIST(0, 1089),
- CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 71.32476043701172f, 53, 53, 40, 0x010F),
+ CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 71.32476f, 53, 53, 40, 0x010F),
CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 60.0f, 53, 53, 40, 0x0120),
CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 60.0f, 53, 53, 40, 0x0131),
- CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 70.59991455078125f, 58, 89, 47, 0x01F4),
- CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 70.59991455078125f, 58, 89, 47, 0x01F6),
- CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 70.59991455078125f, 58, 89, 47, 0x0207),
- CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 70.59991455078125f, 58, 89, 47, 0x0000),
- CS_CAM_POS_PLAYER(CS_CMD_STOP, 0x00, 0, 70.59991455078125f, 58, 89, 47, 0x0000),
+ CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 70.599915f, 58, 89, 47, 0x01F4),
+ CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 70.599915f, 58, 89, 47, 0x01F6),
+ CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 70.599915f, 58, 89, 47, 0x0207),
+ CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 70.599915f, 58, 89, 47, 0x0000),
+ CS_CAM_POS_PLAYER(CS_CMD_STOP, 0x00, 0, 70.599915f, 58, 89, 47, 0x0000),
CS_CAM_FOCUS_POINT_PLAYER_LIST(0, 1118),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 7, 70.52477264404297f, 11, 29, 10, 0x010F),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 7, 70.39991760253906f, 11, 29, 10, 0x0120),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 7, 70.59991455078125f, 11, 29, 10, 0x0131),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 7, 70.59991455078125f, 29, 58, 25, 0x01F4),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 70.59991455078125f, 29, 58, 25, 0x01F6),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 1000, 70.59991455078125f, 29, 58, 25, 0x0207),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 70.59991455078125f, 29, 58, 25, 0x0000),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_STOP, 0x00, 30, 70.59991455078125f, 29, 58, 25, 0x0000),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 7, 70.52477f, 11, 29, 10, 0x010F),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 7, 70.39992f, 11, 29, 10, 0x0120),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 7, 70.599915f, 11, 29, 10, 0x0131),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 7, 70.599915f, 29, 58, 25, 0x01F4),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 70.599915f, 29, 58, 25, 0x01F6),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 1000, 70.599915f, 29, 58, 25, 0x0207),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 70.599915f, 29, 58, 25, 0x0000),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_STOP, 0x00, 30, 70.599915f, 29, 58, 25, 0x0000),
CS_END(),
};
// clang-format on
diff --git a/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data8.c b/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data8.c
index d68e8139d..5ecb679c0 100644
--- a/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data8.c
+++ b/src/overlays/actors/ovl_Demo_Kankyo/z_demo_kankyo_cutscene_data8.c
@@ -7,17 +7,17 @@ CutsceneData gChildWarpOutToTCS[] = {
CS_SCENE_TRANS_FX(0x0005, 36, 46),
CS_SCENE_TRANS_FX(0x0001, 30, 35),
CS_CAM_POS_PLAYER_LIST(0, 1091),
- CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 60.324867248535156f, 41, 75, 49, 0x1F1C),
- CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 60.324867248535156f, 41, 75, 49, 0x1F8C),
- CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 60.324867248535156f, 41, 75, 49, 0x1FFC),
- CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 60.324867248535156f, 41, 75, 49, 0x206C),
- CS_CAM_POS_PLAYER(CS_CMD_STOP, 0x00, 0, 60.324867248535156f, 41, 75, 49, 0x20DC),
+ CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 60.324867f, 41, 75, 49, 0x1F1C),
+ CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 60.324867f, 41, 75, 49, 0x1F8C),
+ CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 60.324867f, 41, 75, 49, 0x1FFC),
+ CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 60.324867f, 41, 75, 49, 0x206C),
+ CS_CAM_POS_PLAYER(CS_CMD_STOP, 0x00, 0, 60.324867f, 41, 75, 49, 0x20DC),
CS_CAM_FOCUS_POINT_PLAYER_LIST(0, 1120),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 60.324867248535156f, 24, 52, 29, 0x1F1C),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 60.324867248535156f, 24, 52, 29, 0x1F8C),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 1000, 60.324867248535156f, 24, 52, 29, 0x1FFC),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 60.324867248535156f, 24, 52, 29, 0x206C),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_STOP, 0x00, 30, 60.324867248535156f, 24, 52, 29, 0x20DC),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 60.324867f, 24, 52, 29, 0x1F1C),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 60.324867f, 24, 52, 29, 0x1F8C),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 1000, 60.324867f, 24, 52, 29, 0x1FFC),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 60.324867f, 24, 52, 29, 0x206C),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_STOP, 0x00, 30, 60.324867f, 24, 52, 29, 0x20DC),
CS_MISC_LIST(1),
CS_MISC(0x000C, 95, 96, 0x0000, 0x00000000, 0x00000000, 0xFFFFFFDF, 0x00000019, 0x00000000, 0xFFFFFFDF, 0x00000019, 0x00000000, 0x00000000, 0x00000000),
CS_END(),
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 1b4af53ef..d3f6402c1 100644
--- a/src/overlays/actors/ovl_Demo_Kekkai/z_demo_kekkai.c
+++ b/src/overlays/actors/ovl_Demo_Kekkai/z_demo_kekkai.c
@@ -158,7 +158,7 @@ void DemoKekkai_SpawnParticles(DemoKekkai* this, GlobalContext* globalCtx) {
}
void DemoKekkai_TowerBarrier(DemoKekkai* this, GlobalContext* globalCtx) {
- if ((globalCtx->csCtx.state != 0) && (globalCtx->csCtx.npcActions[0] != NULL) &&
+ if ((globalCtx->csCtx.state != CS_STATE_IDLE) && (globalCtx->csCtx.npcActions[0] != NULL) &&
(globalCtx->csCtx.npcActions[0]->action != 1) && (globalCtx->csCtx.npcActions[0]->action == 2)) {
if (!(this->sfxFlag & 1)) {
func_800F3F3C(0xC);
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 82a34f8eb..77b596779 100644
--- a/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.c
+++ b/src/overlays/actors/ovl_Demo_Sa/z_demo_sa.c
@@ -135,7 +135,7 @@ void func_8098E530(DemoSa* this) {
void func_8098E554(DemoSa* this, GlobalContext* globalCtx) {
u32* something = &D_80990108;
- if (globalCtx->csCtx.state == 0) {
+ if (globalCtx->csCtx.state == CS_STATE_IDLE) {
if (*something != 0) {
if (this->actor.params == 2) {
func_8098E530(this);
@@ -156,7 +156,7 @@ s32 DemoSa_FrameUpdateMatrix(DemoSa* this) {
}
CsCmdActorAction* DemoSa_GetNpcAction(GlobalContext* globalCtx, s32 idx) {
- if (globalCtx->csCtx.state != 0) {
+ if (globalCtx->csCtx.state != CS_STATE_IDLE) {
return globalCtx->csCtx.npcActions[idx];
}
return NULL;
@@ -259,7 +259,7 @@ void func_8098E960(DemoSa* this, GlobalContext* globalCtx) {
void func_8098E9EC(DemoSa* this, GlobalContext* globalCtx) {
CsCmdActorAction* npcAction;
- if (globalCtx->csCtx.state != 0) {
+ if (globalCtx->csCtx.state != CS_STATE_IDLE) {
npcAction = globalCtx->csCtx.npcActions[4];
if ((npcAction != NULL) && (npcAction->action == 2)) {
this->action = 2;
@@ -279,7 +279,7 @@ void func_8098EA3C(DemoSa* this) {
void func_8098EA68(DemoSa* this, GlobalContext* globalCtx) {
CsCmdActorAction* npcAction;
- if (globalCtx->csCtx.state != 0) {
+ if (globalCtx->csCtx.state != CS_STATE_IDLE) {
npcAction = globalCtx->csCtx.npcActions[4];
if ((npcAction != NULL) && (npcAction->action == 3)) {
Animation_Change(&this->skelAnime, &D_0600DF80, 1.0f, 0.0f, Animation_GetLastFrame(&D_0600DF80),
@@ -300,7 +300,7 @@ void func_8098EB00(DemoSa* this, s32 arg1) {
void func_8098EB6C(DemoSa* this, GlobalContext* globalCtx) {
CsCmdActorAction* npcAction;
- if (globalCtx->csCtx.state != 0) {
+ if (globalCtx->csCtx.state != CS_STATE_IDLE) {
npcAction = globalCtx->csCtx.npcActions[6];
if ((npcAction != NULL) && (npcAction->action == 2)) {
this->action = 6;
diff --git a/src/overlays/actors/ovl_Demo_Sa/z_demo_sa_cutscene_data.c b/src/overlays/actors/ovl_Demo_Sa/z_demo_sa_cutscene_data.c
index d482cf53d..97f0f03ac 100644
--- a/src/overlays/actors/ovl_Demo_Sa/z_demo_sa_cutscene_data.c
+++ b/src/overlays/actors/ovl_Demo_Sa/z_demo_sa_cutscene_data.c
@@ -10,7 +10,7 @@ static CutsceneData D_8099010C[] = {
CS_NPC_ACTION(0x0001, 0, 612, 0x0000, 0x0000, 0x0000, 0, 216, 0, 0, 216, 0, 0.0f, 0.0f, 0.0f),
CS_NPC_ACTION(0x0002, 612, 613, 0x0000, 0x0000, 0x0000, 0, 216, 0, 0, 216, 0, 0.0f, 0.0f, 0.0f),
CS_NPC_ACTION(0x0004, 613, 684, 0x0000, 0x0000, 0x0000, 0, 216, 0, 0, 216, 0, 0.0f, 0.0f, 0.0f),
- CS_NPC_ACTION(0x0002, 684, 732, 0x0000, 0x0000, 0x0000, 0, 216, 0, 0, 82, 0, 0.0f, -2.7916667461395264f, 0.0f),
+ CS_NPC_ACTION(0x0002, 684, 732, 0x0000, 0x0000, 0x0000, 0, 216, 0, 0, 82, 0, 0.0f, -2.7916667f, 0.0f),
CS_NPC_ACTION(0x0003, 732, 2912, 0x0000, 0x0000, 0x0000, 0, 82, 0, 0, 82, 0, 0.0f, 0.0f, 0.0f),
CS_PLAYER_ACTION_LIST(3),
CS_PLAYER_ACTION(0x000D, 0, 261, 0x0000, 0x0000, 0x0000, 0, 6, 0, 0, 6, 0, 0.0f, 0.0f, 0.0f),
@@ -44,54 +44,54 @@ static CutsceneData D_8099010C[] = {
CS_FADE_BGM_LIST(1),
CS_FADE_BGM(0x0004, 550, 600, 0x0000, 0x00000000, 0x00000000, 0xFFFFFFC4, 0x00000066, 0x00000000, 0xFFFFFFC4, 0x00000066),
CS_CAM_POS_LIST(0, 1241),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 170.19839477539062f, 159, 2758, 43, 0x0072),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 170.19839477539062f, 159, 2758, 43, 0x006F),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 170.19839477539062f, 159, 2409, 43, 0x002F),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 170.19839477539062f, 159, 202, 43, 0x0073),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.39994430541992f, 158, 222, 42, 0x0061),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.39994430541992f, 158, 149, 42, 0x006F),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.39994430541992f, 158, 111, 42, 0x006D),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.39994430541992f, 158, 111, 42, 0x0065),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.39994430541992f, 158, 111, 42, 0x0061),
- CS_CAM_POS(CS_CMD_STOP, 0x00, 0, 45.39994430541992f, 158, 111, 42, 0x0061),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 170.1984f, 159, 2758, 43, 0x0072),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 170.1984f, 159, 2758, 43, 0x006F),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 170.1984f, 159, 2409, 43, 0x002F),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 170.1984f, 159, 202, 43, 0x0073),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.399944f, 158, 222, 42, 0x0061),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.399944f, 158, 149, 42, 0x006F),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.399944f, 158, 111, 42, 0x006D),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.399944f, 158, 111, 42, 0x0065),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.399944f, 158, 111, 42, 0x0061),
+ CS_CAM_POS(CS_CMD_STOP, 0x00, 0, 45.399944f, 158, 111, 42, 0x0061),
CS_CAM_POS_LIST(190, 391),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 40.99993133544922f, -91, 18, -158, 0x0072),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 40.99993133544922f, -90, 17, -157, 0x006F),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 40.99993133544922f, -90, 31, -157, 0x002F),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 40.99993133544922f, -90, 37, -157, 0x0073),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 40.99993133544922f, -90, 37, -157, 0x0061),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 40.99993133544922f, -90, 37, -157, 0x006F),
- CS_CAM_POS(CS_CMD_STOP, 0x00, 0, 40.99993133544922f, -90, 37, -157, 0x006D),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 40.99993f, -91, 18, -158, 0x0072),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 40.99993f, -90, 17, -157, 0x006F),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 40.99993f, -90, 31, -157, 0x002F),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 40.99993f, -90, 37, -157, 0x0073),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 40.99993f, -90, 37, -157, 0x0061),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 40.99993f, -90, 37, -157, 0x006F),
+ CS_CAM_POS(CS_CMD_STOP, 0x00, 0, 40.99993f, -90, 37, -157, 0x006D),
CS_CAM_POS_LIST(263, 1354),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 24.399864196777344f, 7, 97, 127, 0x0072),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 24.399864196777344f, 7, 97, 127, 0x006F),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 24.399864196777344f, 7, 97, 127, 0x002F),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 24.399864196777344f, 7, 97, 127, 0x0073),
- CS_CAM_POS(CS_CMD_STOP, 0x00, 0, 24.399864196777344f, 7, 97, 127, 0x0061),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 24.399864f, 7, 97, 127, 0x0072),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 24.399864f, 7, 97, 127, 0x006F),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 24.399864f, 7, 97, 127, 0x002F),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 24.399864f, 7, 97, 127, 0x0073),
+ CS_CAM_POS(CS_CMD_STOP, 0x00, 0, 24.399864f, 7, 97, 127, 0x0061),
CS_CAM_POS_LIST(333, 1424),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.39994430541992f, -279, 103, 68, 0x0072),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.39994430541992f, -279, 103, 68, 0x006F),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.39994430541992f, -279, 103, 68, 0x002F),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.39994430541992f, -279, 103, 68, 0x0073),
- CS_CAM_POS(CS_CMD_STOP, 0x00, 0, 45.39994430541992f, -279, 103, 68, 0x0061),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.399944f, -279, 103, 68, 0x0072),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.399944f, -279, 103, 68, 0x006F),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.399944f, -279, 103, 68, 0x002F),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.399944f, -279, 103, 68, 0x0073),
+ CS_CAM_POS(CS_CMD_STOP, 0x00, 0, 45.399944f, -279, 103, 68, 0x0061),
CS_CAM_POS_LIST(403, 1494),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.39994812011719f, -52, 35, -83, 0x0072),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.39994812011719f, -52, 35, -83, 0x006F),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.39994812011719f, -52, 35, -83, 0x002F),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.39994812011719f, -52, 35, -83, 0x0073),
- CS_CAM_POS(CS_CMD_STOP, 0x00, 0, 45.39994812011719f, -52, 35, -83, 0x0061),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.39995f, -52, 35, -83, 0x0072),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.39995f, -52, 35, -83, 0x006F),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.39995f, -52, 35, -83, 0x002F),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.39995f, -52, 35, -83, 0x0073),
+ CS_CAM_POS(CS_CMD_STOP, 0x00, 0, 45.39995f, -52, 35, -83, 0x0061),
CS_CAM_POS_LIST(473, 1716),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.39994812011719f, -65, 61, -111, 0x0072),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.39994812011719f, -65, 61, -111, 0x006F),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.39994812011719f, -51, 74, -86, 0x002F),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.600006103515625f, 0, 136, 11, 0x0073),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.600006103515625f, 386, 514, 736, 0x0061),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 80.39976501464844f, 579, 156, 1099, 0x006F),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 80.39976501464844f, 579, 156, 1099, 0x006D),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 50.5999641418457f, 579, 156, 1099, 0x0065),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 50.5999641418457f, 579, 156, 1099, 0x0061),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 50.5999641418457f, 579, 156, 1099, 0x0061),
- CS_CAM_POS(CS_CMD_STOP, 0x00, 0, 50.5999641418457f, 579, 156, 1099, 0x0072),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.39995f, -65, 61, -111, 0x0072),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.39995f, -65, 61, -111, 0x006F),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.39995f, -51, 74, -86, 0x002F),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.600006f, 0, 136, 11, 0x0073),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.600006f, 386, 514, 736, 0x0061),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 80.399765f, 579, 156, 1099, 0x006F),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 80.399765f, 579, 156, 1099, 0x006D),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 50.599964f, 579, 156, 1099, 0x0065),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 50.599964f, 579, 156, 1099, 0x0061),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 50.599964f, 579, 156, 1099, 0x0061),
+ CS_CAM_POS(CS_CMD_STOP, 0x00, 0, 50.599964f, 579, 156, 1099, 0x0072),
CS_CAM_POS_LIST(609, 951),
CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.0f, 13, 854, 2, 0x0072),
CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.0f, 9, 853, 5, 0x006F),
@@ -103,82 +103,82 @@ static CutsceneData D_8099010C[] = {
CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.0f, 9, 852, 5, 0x0065),
CS_CAM_POS(CS_CMD_STOP, 0x00, 0, 60.0f, -3, 851, 5, 0x0061),
CS_CAM_POS_PLAYER_LIST(685, 1866),
- CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 68.59994506835938f, 0, 33, -27, 0x0072),
- CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 68.59994506835938f, 0, 33, -27, 0x006F),
- CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 68.59994506835938f, 0, 68, -26, 0x002F),
- CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 68.59994506835938f, 0, 103, -26, 0x0073),
- CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 68.59994506835938f, 0, 103, -26, 0x0061),
- CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 68.59994506835938f, 0, 103, -26, 0x006F),
- CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 68.59994506835938f, 0, 103, -26, 0x006D),
- CS_CAM_POS_PLAYER(CS_CMD_STOP, 0x00, 0, 68.59994506835938f, 0, 103, -26, 0x0065),
+ CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 68.599945f, 0, 33, -27, 0x0072),
+ CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 68.599945f, 0, 33, -27, 0x006F),
+ CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 68.599945f, 0, 68, -26, 0x002F),
+ CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 68.599945f, 0, 103, -26, 0x0073),
+ CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 68.599945f, 0, 103, -26, 0x0061),
+ CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 68.599945f, 0, 103, -26, 0x006F),
+ CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 68.599945f, 0, 103, -26, 0x006D),
+ CS_CAM_POS_PLAYER(CS_CMD_STOP, 0x00, 0, 68.599945f, 0, 103, -26, 0x0065),
CS_CAM_FOCUS_POINT_LIST(0, 1270),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 170.19839477539062f, 154, 2596, 41, 0x0072),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 170.19839477539062f, 154, 2596, 41, 0x006F),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 170.19839477539062f, 154, 2248, 41, 0x002F),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 170.19839477539062f, 154, 42, 41, 0x0073),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.20000076293945f, 82, 94, 23, 0x0061),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 50.99996566772461f, 33, 79, 0, 0x006F),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 45.39994430541992f, 30, 62, -14, 0x006D),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 1000, 45.39994430541992f, 30, 62, -14, 0x0065),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 45.39994430541992f, 30, 62, -14, 0x0061),
- CS_CAM_FOCUS_POINT(CS_CMD_STOP, 0x00, 30, 45.39994430541992f, 31, 62, -14, 0x0061),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 170.1984f, 154, 2596, 41, 0x0072),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 170.1984f, 154, 2596, 41, 0x006F),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 170.1984f, 154, 2248, 41, 0x002F),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 170.1984f, 154, 42, 41, 0x0073),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.2f, 82, 94, 23, 0x0061),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 50.999966f, 33, 79, 0, 0x006F),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 45.399944f, 30, 62, -14, 0x006D),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 1000, 45.399944f, 30, 62, -14, 0x0065),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 45.399944f, 30, 62, -14, 0x0061),
+ CS_CAM_FOCUS_POINT(CS_CMD_STOP, 0x00, 30, 45.399944f, 31, 62, -14, 0x0061),
CS_CAM_FOCUS_POINT_LIST(190, 420),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 50, 40.99993133544922f, 13, 42, 20, 0x0072),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 40.99993133544922f, 12, 47, 18, 0x006F),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 40.99993133544922f, 11, 50, 20, 0x002F),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 40.99993133544922f, 11, 53, 20, 0x0073),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 40.99993133544922f, 11, 53, 20, 0x0061),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 40.99993133544922f, 11, 53, 20, 0x006F),
- CS_CAM_FOCUS_POINT(CS_CMD_STOP, 0x00, 30, 40.99993133544922f, 11, 53, 20, 0x006D),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 50, 40.99993f, 13, 42, 20, 0x0072),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 40.99993f, 12, 47, 18, 0x006F),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 40.99993f, 11, 50, 20, 0x002F),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 40.99993f, 11, 53, 20, 0x0073),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 40.99993f, 11, 53, 20, 0x0061),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 40.99993f, 11, 53, 20, 0x006F),
+ CS_CAM_FOCUS_POINT(CS_CMD_STOP, 0x00, 30, 40.99993f, 11, 53, 20, 0x006D),
CS_CAM_FOCUS_POINT_LIST(263, 1383),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 24.399864196777344f, -42, 17, -150, 0x0072),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 24.399864196777344f, -42, 17, -150, 0x006F),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 1000, 24.399864196777344f, -42, 17, -150, 0x002F),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 24.399864196777344f, -42, 17, -150, 0x0073),
- CS_CAM_FOCUS_POINT(CS_CMD_STOP, 0x00, 30, 24.399864196777344f, -42, 17, -150, 0x0061),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 24.399864f, -42, 17, -150, 0x0072),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 24.399864f, -42, 17, -150, 0x006F),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 1000, 24.399864f, -42, 17, -150, 0x002F),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 24.399864f, -42, 17, -150, 0x0073),
+ CS_CAM_FOCUS_POINT(CS_CMD_STOP, 0x00, 30, 24.399864f, -42, 17, -150, 0x0061),
CS_CAM_FOCUS_POINT_LIST(333, 1453),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x01, 30, 45.19994354248047f, -26, 13, -85, 0x0072),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 45.39994430541992f, -26, 13, -85, 0x006F),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 1000, 45.39994430541992f, -26, 13, -85, 0x002F),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 45.39994430541992f, -26, 13, -85, 0x0073),
- CS_CAM_FOCUS_POINT(CS_CMD_STOP, 0x00, 30, 45.39994430541992f, -26, 13, -85, 0x0061),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x01, 30, 45.199944f, -26, 13, -85, 0x0072),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 45.399944f, -26, 13, -85, 0x006F),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 1000, 45.399944f, -26, 13, -85, 0x002F),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 45.399944f, -26, 13, -85, 0x0073),
+ CS_CAM_FOCUS_POINT(CS_CMD_STOP, 0x00, 30, 45.399944f, -26, 13, -85, 0x0061),
CS_CAM_FOCUS_POINT_LIST(403, 1523),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 30.79989242553711f, -226, 10, -419, 0x0072),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 30.999893188476562f, -226, 10, -419, 0x006F),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 1000, 35.599910736083984f, -226, 10, -419, 0x002F),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 40.39992904663086f, -226, 10, -418, 0x0073),
- CS_CAM_FOCUS_POINT(CS_CMD_STOP, 0x00, 30, 45.39994812011719f, -226, 10, -418, 0x0061),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 30.799892f, -226, 10, -419, 0x0072),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 30.999893f, -226, 10, -419, 0x006F),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 1000, 35.59991f, -226, 10, -419, 0x002F),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 40.39993f, -226, 10, -418, 0x0073),
+ CS_CAM_FOCUS_POINT(CS_CMD_STOP, 0x00, 30, 45.39995f, -226, 10, -418, 0x0061),
CS_CAM_FOCUS_POINT_LIST(473, 1745),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 45.39994812011719f, -218, -88, -396, 0x0072),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 45.39994812011719f, -218, -88, -396, 0x006F),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 45.39994812011719f, -204, -75, -370, 0x002F),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 65.39999389648438f, -149, -10, -269, 0x0073),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 25, 70.79991149902344f, 287, 239, 551, 0x0061),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 80.39976501464844f, 570, 493, 1083, 0x006F),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 10, 50.39996337890625f, 578, 492, 1097, 0x006D),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 50.5999641418457f, 578, 492, 1097, 0x0065),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 1000, 50.5999641418457f, 578, 491, 1097, 0x0061),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 27, 50.5999641418457f, 578, 491, 1097, 0x0061),
- CS_CAM_FOCUS_POINT(CS_CMD_STOP, 0x00, 30, 50.5999641418457f, 578, 491, 1097, 0x0072),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 45.39995f, -218, -88, -396, 0x0072),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 45.39995f, -218, -88, -396, 0x006F),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 45.39995f, -204, -75, -370, 0x002F),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 65.399994f, -149, -10, -269, 0x0073),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 25, 70.79991f, 287, 239, 551, 0x0061),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 80.399765f, 570, 493, 1083, 0x006F),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 10, 50.399963f, 578, 492, 1097, 0x006D),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 50.599964f, 578, 492, 1097, 0x0065),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 1000, 50.599964f, 578, 491, 1097, 0x0061),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 27, 50.599964f, 578, 491, 1097, 0x0061),
+ CS_CAM_FOCUS_POINT(CS_CMD_STOP, 0x00, 30, 50.599964f, 578, 491, 1097, 0x0072),
CS_CAM_FOCUS_POINT_LIST(609, 1000),
CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 50, 60.0f, 3, 6, -6, 0x0072),
CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 40, 60.0f, 3, 6, -6, 0x006F),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 50.99996566772461f, 3, 6, -6, 0x002F),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 20, 20.599849700927734f, 3, 6, -6, 0x0073),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 51, 10.799838066101074f, 3, 6, -6, 0x0061),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 50, 10.3998384475708f, 3, 6, -6, 0x006F),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 50, 10.3998384475708f, 3, 6, -6, 0x006D),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 50, 10.199838638305664f, 3, 6, -6, 0x0065),
- CS_CAM_FOCUS_POINT(CS_CMD_STOP, 0x00, 50, 10.999837875366211f, 3, 6, -6, 0x0061),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 50.999966f, 3, 6, -6, 0x002F),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 20, 20.59985f, 3, 6, -6, 0x0073),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 51, 10.799838f, 3, 6, -6, 0x0061),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 50, 10.399838f, 3, 6, -6, 0x006F),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 50, 10.399838f, 3, 6, -6, 0x006D),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 50, 10.199839f, 3, 6, -6, 0x0065),
+ CS_CAM_FOCUS_POINT(CS_CMD_STOP, 0x00, 50, 10.999838f, 3, 6, -6, 0x0061),
CS_CAM_FOCUS_POINT_PLAYER_LIST(685, 1895),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 68.59994506835938f, 0, 100, 5, 0x0072),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 68.59994506835938f, 0, 101, 6, 0x006F),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 68.59994506835938f, 1, 99, 41, 0x002F),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 68.59994506835938f, 0, 42, 16, 0x0073),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 68.59994506835938f, 0, 42, 16, 0x0061),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 1000, 68.59994506835938f, 0, 42, 16, 0x006F),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 68.59994506835938f, 0, 42, 16, 0x006D),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_STOP, 0x00, 30, 68.59994506835938f, 0, 42, 16, 0x0065),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 68.599945f, 0, 100, 5, 0x0072),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 68.599945f, 0, 101, 6, 0x006F),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 68.599945f, 1, 99, 41, 0x002F),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 68.599945f, 0, 42, 16, 0x0073),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 68.599945f, 0, 42, 16, 0x0061),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 1000, 68.599945f, 0, 42, 16, 0x006F),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 68.599945f, 0, 42, 16, 0x006D),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_STOP, 0x00, 30, 68.599945f, 0, 42, 16, 0x0065),
CS_END(),
};
// clang-format on
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 396f0d03d..88208e542 100644
--- a/src/overlays/actors/ovl_Demo_Shd/z_demo_shd.c
+++ b/src/overlays/actors/ovl_Demo_Shd/z_demo_shd.c
@@ -49,8 +49,8 @@ void DemoShd_Destroy(Actor* thisx, GlobalContext* globalCtx) {
}
void func_80991298(DemoShd* this, GlobalContext* globalCtx) {
- if ((globalCtx->csCtx.state != 0 && globalCtx->csCtx.npcActions[0] != NULL) ||
- (globalCtx->csCtx.state != 0 && globalCtx->csCtx.npcActions[1] != NULL)) {
+ if ((globalCtx->csCtx.state != CS_STATE_IDLE && globalCtx->csCtx.npcActions[0] != NULL) ||
+ (globalCtx->csCtx.state != CS_STATE_IDLE && globalCtx->csCtx.npcActions[1] != NULL)) {
if (globalCtx->csCtx.frames == 800) {
func_800F3F3C(9);
}
@@ -59,7 +59,7 @@ void func_80991298(DemoShd* this, GlobalContext* globalCtx) {
}
}
- if (globalCtx->csCtx.state != 0) {
+ if (globalCtx->csCtx.state != CS_STATE_IDLE) {
CsCmdActorAction* npcAction0 = globalCtx->csCtx.npcActions[0];
if (npcAction0 != NULL) {
@@ -74,7 +74,7 @@ void func_80991298(DemoShd* this, GlobalContext* globalCtx) {
}
}
- if (globalCtx->csCtx.state != 0) {
+ if (globalCtx->csCtx.state != CS_STATE_IDLE) {
CsCmdActorAction* npcAction1 = globalCtx->csCtx.npcActions[1];
if (npcAction1 != NULL) {
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 56b710b0f..7d7bc767b 100644
--- a/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c
+++ b/src/overlays/actors/ovl_Door_Shutter/z_door_shutter.c
@@ -343,8 +343,8 @@ void func_80996A54(DoorShutter* this, GlobalContext* globalCtx) {
if (Flags_GetClear(globalCtx, this->dyna.actor.room) || Flags_GetTempClear(globalCtx, this->dyna.actor.room)) {
Flags_SetClear(globalCtx, this->dyna.actor.room);
DoorShutter_SetupAction(this, func_80997150);
- func_80080480(globalCtx, &this->dyna.actor);
- func_80080480(globalCtx, &PLAYER->actor);
+ OnePointCutscene_Attention(globalCtx, &this->dyna.actor);
+ OnePointCutscene_Attention(globalCtx, &PLAYER->actor);
this->unk_16F = -100;
} else if (func_809968D4(this, globalCtx) != 0) {
Player* player = PLAYER;
@@ -406,7 +406,7 @@ void func_80996C60(DoorShutter* this, GlobalContext* globalCtx) {
DoorShutter_SetupAction(this, func_80997004);
this->unk_16C = sp38;
this->unk_170 = 0.0f;
- Camera_ChangeDoorCam(globalCtx->cameraPtrs[0], &this->dyna.actor, player->unk_46A, 0.0f, 12, sp34, 10);
+ Camera_ChangeDoorCam(globalCtx->cameraPtrs[MAIN_CAM], &this->dyna.actor, player->unk_46A, 0.0f, 12, sp34, 10);
}
}
@@ -459,7 +459,7 @@ void func_80996EE8(DoorShutter* this, GlobalContext* globalCtx) {
if (func_80996E08(this, globalCtx, 1.0f)) {
if (Flags_GetSwitch(globalCtx, this->dyna.actor.params & 0x3F)) {
DoorShutter_SetupAction(this, func_80997150);
- func_80080480(globalCtx, &this->dyna.actor);
+ OnePointCutscene_Attention(globalCtx, &this->dyna.actor);
this->unk_16F = -100;
} else if (func_809968D4(this, globalCtx)) {
Player* player = PLAYER;
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 a6b40cb16..c485c8e4f 100644
--- a/src/overlays/actors/ovl_En_Ani/z_en_ani.c
+++ b/src/overlays/actors/ovl_En_Ani/z_en_ani.c
@@ -247,7 +247,7 @@ void EnAni_Update(Actor* thisx, GlobalContext* globalCtx) {
CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
Actor_MoveForward(&this->actor);
Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 0.0f, 0.0f, 0.0f, 4);
- if ((globalCtx->csCtx.state != 0) && (globalCtx->csCtx.npcActions[0] != NULL)) {
+ if ((globalCtx->csCtx.state != CS_STATE_IDLE) && (globalCtx->csCtx.npcActions[0] != NULL)) {
switch (this->unk_2AA) {
case 0:
func_809B0A6C(this, globalCtx);
diff --git a/src/overlays/actors/ovl_En_Arrow/z_en_arrow.c b/src/overlays/actors/ovl_En_Arrow/z_en_arrow.c
index 66f248830..c4db98113 100644
--- a/src/overlays/actors/ovl_En_Arrow/z_en_arrow.c
+++ b/src/overlays/actors/ovl_En_Arrow/z_en_arrow.c
@@ -481,14 +481,14 @@ void EnArrow_Draw(Actor* thisx, GlobalContext* globalCtx) {
Matrix_Mult(&globalCtx->mf_11DA0, MTXMODE_APPLY);
// redundant check because this is contained in an if block for non-zero speed
Matrix_RotateZ((this->actor.speedXZ == 0.0f) ? 0.0f
- : ((globalCtx->gameplayFrames & 0xFF) * 4000) * (M_PI / 32768),
+ : ((globalCtx->gameplayFrames & 0xFF) * 4000) * (M_PI / 0x8000),
MTXMODE_APPLY);
Matrix_Scale(scale, scale, scale, MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_arrow.c", 1374),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_XLU_DISP++, gEffSparklesDL);
Matrix_Pop();
- Matrix_RotateY(this->actor.world.rot.y * (M_PI / 32768), MTXMODE_APPLY);
+ Matrix_RotateY(this->actor.world.rot.y * (M_PI / 0x8000), MTXMODE_APPLY);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_arrow.c", 1381);
}
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 35d7e0634..229b2b6d3 100644
--- a/src/overlays/actors/ovl_En_Bili/z_en_bili.c
+++ b/src/overlays/actors/ovl_En_Bili/z_en_bili.c
@@ -318,7 +318,7 @@ void EnBili_UpdateFloating(EnBili* this) {
f32 baseHeight = CLAMP_MIN(this->actor.floorHeight, playerHeight);
Math_StepToF(&this->actor.home.pos.y, baseHeight + heightOffset, 1.0f);
- this->actor.world.pos.y = this->actor.home.pos.y + (sinf(this->timer * (M_PI * 0.0625f)) * 3.0f);
+ this->actor.world.pos.y = this->actor.home.pos.y + (sinf(this->timer * (M_PI / 16)) * 3.0f);
// Turn around if touching wall
if (this->actor.bgCheckFlags & 8) {
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 c570da5e0..1eec5e7e0 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
@@ -309,7 +309,7 @@ void EnBomBowlMan_HandlePlayChoice(EnBomBowlMan* this, GlobalContext* globalCtx)
this->actor.textId = 0x1B;
func_8010B720(globalCtx, this->actor.textId);
this->dialogState = 5;
- func_800800F8(globalCtx, 0x1F4A, -0x63, NULL, 0);
+ OnePointCutscene_Init(globalCtx, 8010, -99, NULL, MAIN_CAM);
func_8002DF54(globalCtx, NULL, 8);
this->actionFunc = EnBomBowMan_SetupChooseShowPrize;
}
@@ -345,7 +345,7 @@ void func_809C41FC(EnBomBowlMan* this, GlobalContext* globalCtx) {
this->actor.textId = 0x1B;
func_8010B720(globalCtx, this->actor.textId);
this->dialogState = 5;
- func_800800F8(globalCtx, 8010, -99, NULL, 0);
+ OnePointCutscene_Init(globalCtx, 8010, -99, NULL, MAIN_CAM);
func_8002DF54(globalCtx, NULL, 8);
this->actionFunc = EnBomBowMan_SetupChooseShowPrize;
} else {
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 35bb0152d..ff5d514f2 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
@@ -54,7 +54,7 @@ void EnBomBowlPit_DetectHit(EnBomBowlPit* this, GlobalContext* globalCtx) {
EnBomChu* chu;
Vec3f chuPosDiff;
- if (globalCtx->cameraPtrs[0]->setting == 0x15) {
+ if (globalCtx->cameraPtrs[MAIN_CAM]->setting == CAM_SET_FIXED1) {
chu = (EnBomChu*)globalCtx->actorCtx.actorLists[ACTORCAT_EXPLOSIVE].head;
while (chu != NULL) {
@@ -73,8 +73,8 @@ void EnBomBowlPit_DetectHit(EnBomBowlPit* this, GlobalContext* globalCtx) {
chu->timer = 1;
this->camId = Gameplay_CreateSubCamera(globalCtx);
- Gameplay_ChangeCameraStatus(globalCtx, 0, 1);
- Gameplay_ChangeCameraStatus(globalCtx, this->camId, 7);
+ Gameplay_ChangeCameraStatus(globalCtx, MAIN_CAM, CAM_STAT_WAIT);
+ Gameplay_ChangeCameraStatus(globalCtx, this->camId, CAM_STAT_ACTIVE);
this->unk_1C8.x = this->unk_1C8.y = this->unk_1C8.z = 0.1f;
this->unk_1A4.x = this->unk_1A4.y = this->unk_1A4.z = 0.1f;
@@ -120,7 +120,7 @@ void EnBomBowlPit_DetectHit(EnBomBowlPit* this, GlobalContext* globalCtx) {
}
void EnBomBowlPit_CameraDollyIn(EnBomBowlPit* this, GlobalContext* globalCtx) {
- if (this->camId != 0) {
+ if (this->camId != SUBCAM_FREE) {
Math_ApproachF(&this->unk_180.x, this->unk_1BC.x, this->unk_1C8.x, this->unk_1D4.x);
Math_ApproachF(&this->unk_180.y, this->unk_1BC.y, this->unk_1C8.y, this->unk_1D4.y);
Math_ApproachF(&this->unk_180.z, this->unk_1BC.z, this->unk_1C8.z, this->unk_1D4.z);
@@ -167,7 +167,7 @@ void EnBomBowlPit_SetupGivePrize(EnBomBowlPit* this, GlobalContext* globalCtx) {
}
Gameplay_ClearCamera(globalCtx, this->camId);
- Gameplay_ChangeCameraStatus(globalCtx, 0, 7);
+ Gameplay_ChangeCameraStatus(globalCtx, MAIN_CAM, CAM_STAT_ACTIVE);
func_8002DF54(globalCtx, NULL, 8);
this->actionFunc = EnBomBowlPit_GivePrize;
}
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 ad69b5086..867f2adb2 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
@@ -139,9 +139,9 @@ void func_809C5BA8(EnBomChu* this, CollisionPoly* floorPoly, GlobalContext* glob
this->actor.floorPoly = floorPoly;
- sp84.x = floorPoly->normal.x * 0.00003051851f;
- sp84.y = floorPoly->normal.y * 0.00003051851f;
- sp84.z = floorPoly->normal.z * 0.00003051851f;
+ sp84.x = COLPOLY_GET_NORMAL(floorPoly->normal.x);
+ sp84.y = COLPOLY_GET_NORMAL(floorPoly->normal.y);
+ sp84.z = COLPOLY_GET_NORMAL(floorPoly->normal.z);
temp_f12 = (sp84.x * this->unk_160.x) + (sp84.y * this->unk_160.y) + (sp84.z * this->unk_160.z);
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 9f80d727c..b96d6201a 100644
--- a/src/overlays/actors/ovl_En_Boom/z_en_boom.c
+++ b/src/overlays/actors/ovl_En_Boom/z_en_boom.c
@@ -199,7 +199,7 @@ void EnBoom_Fly(EnBoom* this, GlobalContext* globalCtx) {
Math_Vec3f_Copy(&this->actor.world.pos, &this->actor.prevPos);
} else {
collided = BgCheck_EntityLineTest1(&globalCtx->colCtx, &this->actor.prevPos, &this->actor.world.pos,
- &hitPoint, &this->actor.wallPoly, 1, 1, 1, 1, &hitDynaID);
+ &hitPoint, &this->actor.wallPoly, true, true, true, true, &hitDynaID);
if (collided) {
// If the boomerang collides with something and its is a Jabu Object actor with params equal to 0, then
@@ -258,9 +258,9 @@ void EnBoom_Draw(Actor* thisx, GlobalContext* globalCtx) {
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_boom.c", 567);
- Matrix_RotateY(this->actor.world.rot.y * 0.0000958738f, MTXMODE_APPLY);
- Matrix_RotateZ(0.7669904f, MTXMODE_APPLY);
- Matrix_RotateX(this->actor.world.rot.x * 0.0000958738f, MTXMODE_APPLY);
+ Matrix_RotateY(this->actor.world.rot.y * (M_PI / 0x8000), MTXMODE_APPLY);
+ Matrix_RotateZ(0x1F40 * (M_PI / 0x8000), MTXMODE_APPLY);
+ Matrix_RotateX(this->actor.world.rot.x * (M_PI / 0x8000), MTXMODE_APPLY);
Matrix_MultVec3f(&sMultVec1, &vec1);
Matrix_MultVec3f(&sMultVec2, &vec2);
@@ -269,7 +269,7 @@ void EnBoom_Draw(Actor* thisx, GlobalContext* globalCtx) {
}
func_80093D18(globalCtx->state.gfxCtx);
- Matrix_RotateY((this->activeTimer * 12000) * 0.0000958738f, MTXMODE_APPLY);
+ Matrix_RotateY((this->activeTimer * 12000) * (M_PI / 0x8000), MTXMODE_APPLY);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_boom.c", 601),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
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 7b41896c2..db9c30173 100644
--- a/src/overlays/actors/ovl_En_Box/z_en_box.c
+++ b/src/overlays/actors/ovl_En_Box/z_en_box.c
@@ -258,7 +258,7 @@ void EnBox_Fall(EnBox* this, GlobalContext* globalCtx) {
this->dyna.actor.shape.rot.z = 0;
this->dyna.actor.world.pos.y = this->dyna.actor.floorHeight;
EnBox_SetupAction(this, EnBox_WaitOpen);
- func_800803F0(globalCtx, this->unk_1AC);
+ OnePointCutscene_EndCutscene(globalCtx, this->unk_1AC);
}
Audio_PlaySoundGeneral(NA_SE_EV_COFFIN_CAP_BOUND, &this->dyna.actor.projectedPos, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
@@ -281,7 +281,7 @@ void EnBox_FallOnSwitchFlag(EnBox* this, GlobalContext* globalCtx) {
if (this->unk_1A8 >= 0) {
EnBox_SetupAction(this, EnBox_Fall);
- this->unk_1AC = func_800800F8(globalCtx, 4500, 9999, &this->dyna.actor, 0);
+ this->unk_1AC = OnePointCutscene_Init(globalCtx, 4500, 9999, &this->dyna.actor, MAIN_CAM);
func_8003EC50(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
} else if (this->unk_1A8 >= -11) {
this->unk_1A8++;
@@ -318,7 +318,7 @@ void func_809C9700(EnBox* this, GlobalContext* globalCtx) {
(globalCtx->msgCtx.unk_E3EC == 9 && this->type == ENBOX_TYPE_10)) {
this->dyna.actor.flags &= ~0x2000000;
EnBox_SetupAction(this, EnBox_AppearInit);
- func_80080480(globalCtx, &this->dyna.actor);
+ OnePointCutscene_Attention(globalCtx, &this->dyna.actor);
this->unk_1A8 = 0;
this->unk_1FB = ENBOX_STATE_0;
} else {
@@ -336,7 +336,7 @@ void EnBox_AppearOnSwitchFlag(EnBox* this, GlobalContext* globalCtx) {
}
if (Flags_GetSwitch(globalCtx, this->switchFlag)) {
- func_80080480(globalCtx, &this->dyna.actor);
+ OnePointCutscene_Attention(globalCtx, &this->dyna.actor);
EnBox_SetupAction(this, EnBox_AppearInit);
this->unk_1A8 = -30;
}
@@ -352,8 +352,8 @@ void EnBox_AppearOnRoomClear(EnBox* this, GlobalContext* globalCtx) {
if (Flags_GetTempClear(globalCtx, this->dyna.actor.room) && !Player_InCsMode(globalCtx)) {
Flags_SetClear(globalCtx, this->dyna.actor.room);
EnBox_SetupAction(this, EnBox_AppearInit);
- func_80080480(globalCtx, &this->dyna.actor);
- if (func_80080728(globalCtx, this->dyna.actor.category)) {
+ OnePointCutscene_Attention(globalCtx, &this->dyna.actor);
+ if (OnePointCutscene_CheckForCategory(globalCtx, this->dyna.actor.category)) {
this->unk_1A8 = 0;
} else {
this->unk_1A8 = -30;
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 72e2eaefa..8413a88ee 100644
--- a/src/overlays/actors/ovl_En_Bubble/z_en_bubble.c
+++ b/src/overlays/actors/ovl_En_Bubble/z_en_bubble.c
@@ -163,14 +163,14 @@ u32 func_809CBFD4(EnBubble* this) {
}
// only called in an unused actionFunc
-u32 func_809CC020(EnBubble* this) {
- this->expansionWidth += 0.083333336f;
- this->expansionHeight += 0.083333336f;
+s32 func_809CC020(EnBubble* this) {
+ this->expansionWidth += 1.0f / 12.0f;
+ this->expansionHeight += 1.0f / 12.0f;
if (DECR(this->explosionCountdown) != 0) {
- return 0;
+ return false;
}
- return 1;
+ return true;
}
void EnBubble_Vec3fNormalizedRelfect(Vec3f* vec1, Vec3f* vec2, Vec3f* ret) {
@@ -188,9 +188,8 @@ void EnBubble_Vec3fNormalizedRelfect(Vec3f* vec1, Vec3f* vec2, Vec3f* ret) {
}
void EnBubble_Vec3fNormalize(Vec3f* vec) {
- f32 norm;
+ f32 norm = sqrt((vec->x * vec->x) + (vec->y * vec->y) + (vec->z * vec->z));
- norm = sqrt((vec->x * vec->x) + (vec->y * vec->y) + (vec->z * vec->z));
if (norm != 0.0f) {
vec->x /= norm;
vec->y /= norm;
@@ -237,7 +236,7 @@ void EnBubble_Fly(EnBubble* this, GlobalContext* globalCtx) {
sp6C.x += (sp54.x * 24.0f);
sp6C.y += (sp54.y * 24.0f);
sp6C.z += (sp54.z * 24.0f);
- if (BgCheck_EntityLineTest1(&globalCtx->colCtx, &sp78, &sp6C, &sp84, &sp94, 1, 1, 1, 0, &bgId) != 0) {
+ if (BgCheck_EntityLineTest1(&globalCtx->colCtx, &sp78, &sp6C, &sp84, &sp94, true, true, true, false, &bgId)) {
sp60.x = COLPOLY_GET_NORMAL(sp94->normal.x);
sp60.y = COLPOLY_GET_NORMAL(sp94->normal.y);
sp60.z = COLPOLY_GET_NORMAL(sp94->normal.z);
@@ -421,9 +420,9 @@ void EnBubble_Draw(Actor* thisx, GlobalContext* globalCtx) {
func_800D1FD4(&globalCtx->mf_11DA0);
Matrix_Scale(this->expansionWidth + 1.0f, this->expansionHeight + 1.0f, 1.0f, MTXMODE_APPLY);
- Matrix_RotateZ(((f32)globalCtx->state.frames * 0.017453292f) * this->graphicRotSpeed, MTXMODE_APPLY);
+ Matrix_RotateZ(((f32)globalCtx->state.frames * (M_PI / 180.0f)) * this->graphicRotSpeed, MTXMODE_APPLY);
Matrix_Scale(this->graphicEccentricity + 1.0f, 1.0f, 1.0f, MTXMODE_APPLY);
- Matrix_RotateZ((-(f32)globalCtx->state.frames * 0.017453292f) * this->graphicRotSpeed, MTXMODE_APPLY);
+ Matrix_RotateZ((-(f32)globalCtx->state.frames * (M_PI / 180.0f)) * this->graphicRotSpeed, MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_bubble.c", 1220),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
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 0e5ab3e05..7155b3342 100644
--- a/src/overlays/actors/ovl_En_Cs/z_en_cs.c
+++ b/src/overlays/actors/ovl_En_Cs/z_en_cs.c
@@ -475,7 +475,7 @@ void EnCs_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec
Matrix_Translate(0.0f, -200.0f, 0.0f, MTXMODE_APPLY);
Matrix_RotateY(0.0f, MTXMODE_APPLY);
Matrix_RotateX(0.0f, MTXMODE_APPLY);
- Matrix_RotateZ(1.7453293f, MTXMODE_APPLY);
+ Matrix_RotateZ(1.7453293f, MTXMODE_APPLY); // close to 5 * M_PI / 9
Matrix_Get(&this->spookyMaskMtx);
}
}
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 1acb68dd0..f12051e69 100644
--- a/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c
+++ b/src/overlays/actors/ovl_En_Daiku/z_en_daiku.c
@@ -487,8 +487,8 @@ void EnDaiku_InitSubCamera(EnDaiku* this, GlobalContext* globalCtx) {
this->subCamAtTarget.z = this->subCamAt.z = this->actor.world.pos.z;
this->subCamId = Gameplay_CreateSubCamera(globalCtx);
- Gameplay_ChangeCameraStatus(globalCtx, 0, 1);
- Gameplay_ChangeCameraStatus(globalCtx, this->subCamId, 7);
+ Gameplay_ChangeCameraStatus(globalCtx, MAIN_CAM, CAM_STAT_WAIT);
+ Gameplay_ChangeCameraStatus(globalCtx, this->subCamId, CAM_STAT_ACTIVE);
Gameplay_CameraSetAtEye(globalCtx, this->subCamId, &this->subCamAt, &this->subCamEye);
Gameplay_CameraSetFov(globalCtx, this->subCamId, globalCtx->mainCamera.fov);
@@ -515,7 +515,7 @@ void EnDaiku_EscapeSuccess(EnDaiku* this, GlobalContext* globalCtx) {
Vec3f vec;
Gameplay_ClearCamera(globalCtx, this->subCamId);
- Gameplay_ChangeCameraStatus(globalCtx, 0, 7);
+ Gameplay_ChangeCameraStatus(globalCtx, MAIN_CAM, CAM_STAT_ACTIVE);
this->subCamActive = false;
if ((gSaveContext.eventChkInf[9] & 0xF) == 0xF) {
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 c10611560..b4f498a47 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
@@ -126,8 +126,8 @@ void EnDntDemo_Judge(EnDntDemo* this, GlobalContext* globalCtx) {
this->actionFunc = EnDntDemo_Results;
} else if ((this->actor.xzDistToPlayer > 30.0f) || (Player_GetMask(globalCtx) == 0)) {
this->debugArrowTimer++;
- if (this->subCamera != 0) {
- this->subCamera = 0;
+ if (this->subCamera != SUBCAM_FREE) {
+ this->subCamera = SUBCAM_FREE;
}
if (this->judgeTimer != 0) {
for (i = 0; i < 9; i++) {
@@ -136,8 +136,8 @@ void EnDntDemo_Judge(EnDntDemo* this, GlobalContext* globalCtx) {
this->judgeTimer = 0;
}
} else {
- if ((Player_GetMask(globalCtx) != 0) && (this->subCamera == 0)) {
- this->subCamera = func_800800F8(globalCtx, 0x8AC, -0x63, &this->scrubs[3]->actor, 0);
+ if ((Player_GetMask(globalCtx) != 0) && (this->subCamera == SUBCAM_FREE)) {
+ this->subCamera = OnePointCutscene_Init(globalCtx, 2220, -99, &this->scrubs[3]->actor, MAIN_CAM);
}
this->debugArrowTimer = 0;
if (this->judgeTimer == 40) {
@@ -171,10 +171,10 @@ void EnDntDemo_Judge(EnDntDemo* this, GlobalContext* globalCtx) {
this->prize = DNT_PRIZE_NUTS;
this->leader->stageSignal = DNT_LEADER_SIGNAL_UP;
reaction = DNT_SIGNAL_LOOK;
- if (this->subCamera != 0) {
- this->subCamera = 0;
+ if (this->subCamera != SUBCAM_FREE) {
+ this->subCamera = SUBCAM_FREE;
reaction = DNT_SIGNAL_LOOK;
- func_800800F8(globalCtx, 0x924, -0x63, &this->leader->actor, 0);
+ OnePointCutscene_Init(globalCtx, 2340, -99, &this->leader->actor, MAIN_CAM);
}
break;
}
@@ -211,9 +211,9 @@ void EnDntDemo_Judge(EnDntDemo* this, GlobalContext* globalCtx) {
Audio_SetBGM(0x2D);
break;
case DNT_ACTION_ATTACK:
- if (this->subCamera != 0) {
- this->subCamera = 0;
- func_800800F8(globalCtx, 0x92E, -0x63, &this->scrubs[3]->actor, 0);
+ if (this->subCamera != SUBCAM_FREE) {
+ this->subCamera = SUBCAM_FREE;
+ OnePointCutscene_Init(globalCtx, 2350, -99, &this->scrubs[3]->actor, MAIN_CAM);
}
Audio_SetBGM(0x81A);
break;
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 a50f2a465..a696fc501 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
@@ -120,7 +120,7 @@ void EnDntJiji_Wait(EnDntJiji* this, GlobalContext* globalCtx) {
SkelAnime_Update(&this->skelAnime);
if ((this->timer == 1) && (this->actor.xzDistToPlayer < 150.0f) && !Gameplay_InCsMode(globalCtx) &&
!(player->stateFlags1 & 0x800)) {
- func_800800F8(globalCtx, 0x8B6, -0x63, &this->actor, 0);
+ OnePointCutscene_Init(globalCtx, 2230, -99, &this->actor, MAIN_CAM);
this->timer = 0;
func_8002DF54(globalCtx, NULL, 8);
this->actionFunc = EnDntJiji_SetupUnburrow;
@@ -344,7 +344,7 @@ void EnDntJiji_Return(EnDntJiji* this, GlobalContext* globalCtx) {
SkelAnime_Update(&this->skelAnime);
dx = this->flowerPos.x - this->actor.world.pos.x;
dz = this->flowerPos.z - this->actor.world.pos.z;
- Math_SmoothStepToS(&this->actor.shape.rot.y, Math_FAtan2F(dx, dz) * 10430.378f, 1, 0xBB8, 0);
+ Math_SmoothStepToS(&this->actor.shape.rot.y, Math_FAtan2F(dx, dz) * (0x8000 / M_PI), 1, 0xBB8, 0);
this->actor.world.rot.y = this->actor.shape.rot.y;
if ((this->actor.bgCheckFlags & 8) && (this->actor.bgCheckFlags & 1)) {
this->actor.velocity.y = 9.0f;
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 239b81245..16a5a0245 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
@@ -251,7 +251,7 @@ void EnDntNomal_TargetWait(EnDntNomal* this, GlobalContext* globalCtx) {
if (LINK_IS_CHILD && !(gSaveContext.itemGetInf[1] & 0x2000)) {
this->hitCounter++;
if (this->hitCounter >= 3) {
- func_800800F8(globalCtx, 0x102C, -0x63, &this->actor, 0);
+ OnePointCutscene_Init(globalCtx, 4140, -99, &this->actor, MAIN_CAM);
func_8002DF54(globalCtx, &this->actor, 1);
this->timer4 = 50;
this->actionFunc = EnDntNomal_SetupTargetUnburrow;
@@ -340,7 +340,7 @@ void EnDntNomal_TargetTalk(EnDntNomal* this, GlobalContext* globalCtx) {
if ((func_8010BDBC(&globalCtx->msgCtx) == 5) && func_80106BC8(globalCtx)) {
func_80106CCC(globalCtx);
func_8005B1A4(ACTIVE_CAM);
- ACTIVE_CAM->unk_168 = 0;
+ ACTIVE_CAM->csId = 0;
func_8002DF54(globalCtx, NULL, 8);
this->actionFunc = EnDntNomal_SetupTargetGivePrize;
}
@@ -670,7 +670,7 @@ void EnDntNomal_StageAttack(EnDntNomal* this, GlobalContext* globalCtx) {
dx = player->actor.world.pos.x - this->mouthPos.x;
dy = player->actor.world.pos.y + 30.0f - this->mouthPos.y;
dz = player->actor.world.pos.z - this->mouthPos.z;
- Math_SmoothStepToS(&this->actor.shape.rot.x, -(s16)(Math_FAtan2F(dy, sqrtf(SQ(dx) + SQ(dz))) * 10430.378f), 3,
+ Math_SmoothStepToS(&this->actor.shape.rot.x, -(s16)(Math_FAtan2F(dy, sqrtf(SQ(dx) + SQ(dz))) * (0x8000 / M_PI)), 3,
0x1388, 0);
if ((frame >= this->endFrame) && (this->timer2 == 0)) {
this->timer2 = (s16)Rand_ZeroFloat(10.0f) + 10;
@@ -723,7 +723,7 @@ void EnDntNomal_StageReturn(EnDntNomal* this, GlobalContext* globalCtx) {
SkelAnime_Update(&this->skelAnime);
sp2C = this->flowerPos.x - this->actor.world.pos.x;
sp28 = this->flowerPos.z - this->actor.world.pos.z;
- Math_SmoothStepToS(&this->actor.shape.rot.y, Math_FAtan2F(sp2C, sp28) * 10430.378f, 1, 0xBB8, 0);
+ Math_SmoothStepToS(&this->actor.shape.rot.y, Math_FAtan2F(sp2C, sp28) * (0x8000 / M_PI), 1, 0xBB8, 0);
if (this->timer5 == 0) {
this->timer5 = 10;
} else if (!(this->timer5 & 1)) {
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 a9e07334c..acfa6b14e 100644
--- a/src/overlays/actors/ovl_En_Du/z_en_du.c
+++ b/src/overlays/actors/ovl_En_Du/z_en_du.c
@@ -341,7 +341,7 @@ void func_809FE638(EnDu* this, GlobalContext* globalCtx) {
Player* player = PLAYER;
if (!(player->stateFlags1 & 0x20000000)) {
- func_800800F8(globalCtx, 0xD02, -0x63, &this->actor, 0);
+ OnePointCutscene_Init(globalCtx, 3330, -99, &this->actor, MAIN_CAM);
player->actor.shape.rot.y = player->actor.world.rot.y = this->actor.world.rot.y + 0x7FFF;
func_800F5C64(0x51);
EnDu_SetupAction(this, func_809FE6CC);
@@ -414,7 +414,7 @@ void func_809FE890(EnDu* this, GlobalContext* globalCtx) {
Vec3f velocity = { 0.0f, 0.0f, 0.0f };
CsCmdActorAction* csAction;
- if (globalCtx->csCtx.state == 0) {
+ if (globalCtx->csCtx.state == CS_STATE_IDLE) {
func_8002DF54(globalCtx, &this->actor, 1);
EnDu_SetupAction(this, func_809FEB08);
return;
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 65fe060e6..c3ec8984d 100644
--- a/src/overlays/actors/ovl_En_Elf/z_en_elf.c
+++ b/src/overlays/actors/ovl_En_Elf/z_en_elf.c
@@ -784,7 +784,7 @@ void func_80A03990(EnElf* this, GlobalContext* globalCtx) {
}
func_80A02E30(this, &player->bodyPartsPos[0]);
- Actor_SetScale(&this->actor, (1.0f - (SQ(this->unk_2B4) * 0.012345679f)) * 0.008f);
+ Actor_SetScale(&this->actor, (1.0f - (SQ(this->unk_2B4) * SQ(1.0f / 9.0f))) * 0.008f);
this->unk_2BC = Math_Atan2S(this->actor.velocity.z, this->actor.velocity.x);
EnElf_SpawnSparkles(this, globalCtx, 32);
Audio_PlayActorSound2(&this->actor, NA_SE_EV_FIATY_HEAL - SFX_FLAG);
@@ -845,7 +845,7 @@ void func_80A03CF8(EnElf* this, GlobalContext* globalCtx) {
xScale = 0.0f;
- if ((globalCtx->csCtx.state != 0) && (globalCtx->csCtx.npcActions[8] != NULL)) {
+ if ((globalCtx->csCtx.state != CS_STATE_IDLE) && (globalCtx->csCtx.npcActions[8] != NULL)) {
EnElf_GetCutsceneNextPos(&nextPos, globalCtx, 8);
if (globalCtx->csCtx.npcActions[8]->action == 5) {
@@ -887,7 +887,7 @@ void func_80A03CF8(EnElf* this, GlobalContext* globalCtx) {
switch (this->unk_2A8) {
case 7:
- func_80A02C98(this, &player->bodyPartsPos[8], 1.0f - this->unk_2AE * 0.033333335f);
+ func_80A02C98(this, &player->bodyPartsPos[8], 1.0f - this->unk_2AE * (1.0f / 30.0f));
xScale = Math_Vec3f_DistXYZ(&player->bodyPartsPos[8], &this->actor.world.pos);
if (distFromLinksHead < 7.0f) {
@@ -1060,7 +1060,7 @@ void func_80A0461C(EnElf* this, GlobalContext* globalCtx) {
Actor* arrowPointedActor;
Player* player = PLAYER;
- if (globalCtx->csCtx.state != 0) {
+ if (globalCtx->csCtx.state != CS_STATE_IDLE) {
if (globalCtx->csCtx.npcActions[8] != NULL) {
switch (globalCtx->csCtx.npcActions[8]->action) {
case 4:
@@ -1440,7 +1440,7 @@ void func_80A053F0(Actor* thisx, GlobalContext* globalCtx) {
this->unk_2C7--;
}
- if ((this->unk_2C7 == 0) && (globalCtx->csCtx.state != 0)) {
+ if ((this->unk_2C7 == 0) && (globalCtx->csCtx.state != CS_STATE_IDLE)) {
this->unk_2C7 = 1;
}
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 fea14a75b..1c88d3c79 100644
--- a/src/overlays/actors/ovl_En_Encount1/z_en_encount1.c
+++ b/src/overlays/actors/ovl_En_Encount1/z_en_encount1.c
@@ -107,7 +107,7 @@ void EnEncount1_SpawnLeevers(EnEncount1* this, GlobalContext* globalCtx) {
this->outOfRangeTimer = 0;
spawnPos = this->actor.world.pos;
- if ((this->timer == 0) && (globalCtx->csCtx.state == 0) && (this->curNumSpawn <= this->maxCurSpawns) &&
+ if ((this->timer == 0) && (globalCtx->csCtx.state == CS_STATE_IDLE) && (this->curNumSpawn <= this->maxCurSpawns) &&
(this->curNumSpawn < 5)) {
floorType = func_80041D4C(&globalCtx->colCtx, player->actor.floorPoly, player->actor.floorBgId);
if ((floorType != 4) && (floorType != 7) && (floorType != 12)) {
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 fbc53dd57..d50724d8d 100644
--- a/src/overlays/actors/ovl_En_Encount2/z_en_encount2.c
+++ b/src/overlays/actors/ovl_En_Encount2/z_en_encount2.c
@@ -357,9 +357,9 @@ void EnEncount2_ParticleDraw(Actor* thisx, GlobalContext* globalCtx) {
for (i = 0; i < ARRAY_COUNT(this->particles); particle++, i++) {
if (particle->isAlive) {
Matrix_Translate(particle->pos.x, particle->pos.y, particle->pos.z, MTXMODE_NEW);
- Matrix_RotateX(particle->rot.x * (M_PI / 180), MTXMODE_APPLY);
- Matrix_RotateY(particle->rot.y * (M_PI / 180), MTXMODE_APPLY);
- Matrix_RotateZ(particle->rot.z * (M_PI / 180), MTXMODE_APPLY);
+ Matrix_RotateX(particle->rot.x * (M_PI / 180.0f), MTXMODE_APPLY);
+ Matrix_RotateY(particle->rot.y * (M_PI / 180.0f), MTXMODE_APPLY);
+ Matrix_RotateZ(particle->rot.z * (M_PI / 180.0f), MTXMODE_APPLY);
Matrix_Scale(particle->scale, particle->scale, particle->scale, MTXMODE_APPLY);
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 155, 55, 255);
gDPSetEnvColor(POLY_OPA_DISP++, 155, 255, 55, 255);
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 be81b3dff..c117f0eb1 100644
--- a/src/overlays/actors/ovl_En_Fd/z_en_fd.c
+++ b/src/overlays/actors/ovl_En_Fd/z_en_fd.c
@@ -335,8 +335,8 @@ s32 EnFd_CanSeeActor(EnFd* this, Actor* actor, GlobalContext* globalCtx) {
}
// check to see if the line between `this` and `actor` does not intersect a collision poly
- if (BgCheck_EntityLineTest1(&globalCtx->colCtx, &this->actor.world.pos, &actor->world.pos, &colPoint, &colPoly, 1,
- 0, 0, 1, &bgId)) {
+ if (BgCheck_EntityLineTest1(&globalCtx->colCtx, &this->actor.world.pos, &actor->world.pos, &colPoint, &colPoly,
+ true, false, false, true, &bgId)) {
return false;
}
@@ -418,8 +418,8 @@ s32 EnFd_ShouldStopRunning(EnFd* this, GlobalContext* globalCtx, f32 radius, s16
pos.y = this->actor.world.pos.y;
pos.z += this->actor.world.pos.z;
- if (BgCheck_EntityLineTest1(&globalCtx->colCtx, &this->actor.world.pos, &pos, &colPoint, &poly, 1, 0, 0, 1,
- &bgId)) {
+ if (BgCheck_EntityLineTest1(&globalCtx->colCtx, &this->actor.world.pos, &pos, &colPoint, &poly, true, false, false,
+ true, &bgId)) {
*runDir = -*runDir;
return true;
}
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 04b411c06..65da5030d 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
@@ -358,7 +358,7 @@ void EnFhgFire_LightningBurst(EnFhgFire* this, GlobalContext* globalCtx) {
Actor_Kill(&this->actor);
globalCtx->envCtx.unk_E1 = 0;
}
-
+
if (this->lensFlareTimer != 0) {
this->lensFlareTimer--;
this->lensFlareOn = true;
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 eb8146bee..cce12fb7d 100644
--- a/src/overlays/actors/ovl_En_Fr/z_en_fr.c
+++ b/src/overlays/actors/ovl_En_Fr/z_en_fr.c
@@ -606,7 +606,7 @@ void EnFr_Idle(EnFr* this, GlobalContext* globalCtx) {
globalCtx->msgCtx.unk_E3EE = 0;
}
- func_800800F8(globalCtx, 0x100E, ~0x62, &this->actor, 0);
+ OnePointCutscene_Init(globalCtx, 4110, ~0x62, &this->actor, MAIN_CAM);
globalCtx->msgCtx.msgMode = 0x37;
player->actor.world.pos.x = this->actor.world.pos.x; // x = 990.0f
player->actor.world.pos.y = this->actor.world.pos.y; // y = 205.0f
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 294c3fee1..680281759 100644
--- a/src/overlays/actors/ovl_En_Fu/z_en_fu.c
+++ b/src/overlays/actors/ovl_En_Fu/z_en_fu.c
@@ -165,7 +165,7 @@ void EnFu_WaitChild(EnFu* this, GlobalContext* globalCtx) {
}
void func_80A1DB60(EnFu* this, GlobalContext* globalCtx) {
- if (globalCtx->csCtx.state == 0) {
+ if (globalCtx->csCtx.state == CS_STATE_IDLE) {
this->actionFunc = EnFu_WaitAdult;
gSaveContext.eventChkInf[5] |= 0x800;
globalCtx->msgCtx.unk_E3EE = 4;
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 44973601d..60cfb84e3 100644
--- a/src/overlays/actors/ovl_En_Fw/z_en_fw.c
+++ b/src/overlays/actors/ovl_En_Fw/z_en_fw.c
@@ -115,7 +115,7 @@ s32 EnFw_PlayerInRange(EnFw* this, GlobalContext* globalCtx) {
}
if (BgCheck_EntityLineTest1(&globalCtx->colCtx, &this->actor.world.pos, &player->actor.world.pos, &collisionPos,
- &poly, 1, 0, 0, 1, &bgId)) {
+ &poly, true, false, false, true, &bgId)) {
return false;
}
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 3917318f0..4557d9fac 100644
--- a/src/overlays/actors/ovl_En_GeldB/z_en_geldb.c
+++ b/src/overlays/actors/ovl_En_GeldB/z_en_geldb.c
@@ -495,7 +495,7 @@ void EnGeldB_Advance(EnGeldB* this, GlobalContext* globalCtx) {
} else {
Math_SmoothStepToF(&this->actor.speedXZ, 0.0f, 1.0f, 6.65f, 0.0f);
}
- this->skelAnime.playSpeed = this->actor.speedXZ * 0.125f;
+ this->skelAnime.playSpeed = this->actor.speedXZ / 8.0f;
facingAngletoLink = player->actor.shape.rot.y - this->actor.shape.rot.y;
facingAngletoLink = ABS(facingAngletoLink);
if ((this->actor.xzDistToPlayer < 150.0f) && (player->swordState != 0) && (facingAngletoLink >= 0x1F40)) {
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 db139d15e..cf0093284 100644
--- a/src/overlays/actors/ovl_En_GirlA/z_en_girla.c
+++ b/src/overlays/actors/ovl_En_GirlA/z_en_girla.c
@@ -1012,7 +1012,7 @@ void func_80A3C498(Actor* thisx, GlobalContext* globalCtx, s32 flags) {
void func_80A3C4D4(Actor* thisx, GlobalContext* globalCtx) {
EnGirlA* this = THIS;
- Matrix_RotateY(((this->unk_1B8 * 360.0f) / 65536.0f) * 0.017453292f, MTXMODE_APPLY);
+ Matrix_RotateY(((this->unk_1B8 * 360.0f) / 65536.0f) * (M_PI / 180.0f), MTXMODE_APPLY);
if (this->unk_1D0 != NULL) {
this->unk_1D0(thisx, globalCtx, 0);
}
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 d4d580e4c..4702cca34 100644
--- a/src/overlays/actors/ovl_En_Go/z_en_go.c
+++ b/src/overlays/actors/ovl_En_Go/z_en_go.c
@@ -431,7 +431,7 @@ void func_80A3F0E4(EnGo* this) {
s32 EnGo_IsCameraModified(EnGo* this, GlobalContext* globalCtx) {
f32 xyzDist;
s16 yawDiff = this->actor.yawTowardsPlayer - this->actor.shape.rot.y;
- Camera* camera = globalCtx->cameraPtrs[0];
+ Camera* camera = globalCtx->cameraPtrs[MAIN_CAM];
if (fabsf(yawDiff) > 10920.0f) {
return 0;
@@ -444,7 +444,7 @@ s32 EnGo_IsCameraModified(EnGo* this, GlobalContext* globalCtx) {
}
if (fabsf(this->actor.xyzDistToPlayerSq) > xyzDist) {
- if (camera->setting == 0x3F) {
+ if (camera->setting == CAM_SET_TEPPEN) {
Camera_ChangeSetting(camera, CAM_SET_NORMAL0);
}
return 0;
@@ -785,7 +785,7 @@ void EnGo_CurledUp(EnGo* this, GlobalContext* globalCtx) {
EnGo_SetupAction(this, EnGo_WakeUp);
if ((this->actor.params & 0xF0) == 0x90) {
- func_800800F8(globalCtx, 0x1068, -0x63, &this->actor, 0);
+ OnePointCutscene_Init(globalCtx, 4200, -99, &this->actor, MAIN_CAM);
}
}
}
@@ -877,7 +877,7 @@ void EnGo_BiggoronActionFunc(EnGo* this, GlobalContext* globalCtx) {
EnGo_SetupAction(this, EnGo_Eyedrops);
globalCtx->msgCtx.msgMode = 0x37;
gSaveContext.timer2State = 0;
- func_800800F8(globalCtx, 0x105E, -0x63, &this->actor, 0);
+ OnePointCutscene_Init(globalCtx, 4190, -99, &this->actor, MAIN_CAM);
} else {
this->unk_1E0.unk_00 = 0;
EnGo_SetupAction(this, EnGo_GetItem);
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 7bd081966..f4cbba440 100644
--- a/src/overlays/actors/ovl_En_Go2/z_en_go2.c
+++ b/src/overlays/actors/ovl_En_Go2/z_en_go2.c
@@ -1145,7 +1145,7 @@ f32 EnGo2_GetTargetXZSpeed(EnGo2* this) {
}
s32 EnGo2_IsCameraModified(EnGo2* this, GlobalContext* globalCtx) {
- Camera* camera = globalCtx->cameraPtrs[0];
+ Camera* camera = globalCtx->cameraPtrs[MAIN_CAM];
if ((this->actor.params & 0x1F) == GORON_DMT_BIGGORON) {
if (EnGo2_IsWakingUp(this)) {
@@ -1309,7 +1309,7 @@ void EnGo2_WakeUp(EnGo2* this, GlobalContext* globalCtx) {
}
}
if ((this->actor.params & 0x1F) == GORON_DMT_BIGGORON) {
- func_800800F8(globalCtx, 0x1068, -0x63, &this->actor, 0);
+ OnePointCutscene_Init(globalCtx, 4200, -99, &this->actor, MAIN_CAM);
func_80034EC0(&this->skelAnime, sAnimations, 10);
this->skelAnime.playSpeed = 0.5f;
} else {
@@ -1466,7 +1466,7 @@ void EnGo2_GoronFireCamera(EnGo2* this, GlobalContext* globalCtx) {
s16 yaw;
this->camId = Gameplay_CreateSubCamera(globalCtx);
- Gameplay_ChangeCameraStatus(globalCtx, 0, CAM_STAT_WAIT);
+ Gameplay_ChangeCameraStatus(globalCtx, MAIN_CAM, CAM_STAT_WAIT);
Gameplay_ChangeCameraStatus(globalCtx, this->camId, CAM_STAT_ACTIVE);
Path_CopyLastPoint(this->path, &this->at);
yaw = Math_Vec3f_Yaw(&this->actor.world.pos, &this->at) + 0xE38;
@@ -1480,7 +1480,7 @@ void EnGo2_GoronFireCamera(EnGo2* this, GlobalContext* globalCtx) {
}
void EnGo2_GoronFireClearCamera(EnGo2* this, GlobalContext* globalCtx) {
- Gameplay_ChangeCameraStatus(globalCtx, 0, CAM_STAT_ACTIVE);
+ Gameplay_ChangeCameraStatus(globalCtx, MAIN_CAM, CAM_STAT_ACTIVE);
Gameplay_ClearCamera(globalCtx, this->camId);
}
@@ -1814,7 +1814,7 @@ void EnGo2_BiggoronEyedrops(EnGo2* this, GlobalContext* globalCtx) {
this->unk_20C = 0;
this->goronState++;
func_800F483C(0x28, 5);
- func_800800F8(globalCtx, 0x105E, -0x63, &this->actor, 0);
+ OnePointCutscene_Init(globalCtx, 4190, -99, &this->actor, MAIN_CAM);
break;
case 1:
if (DECR(this->animTimer)) {
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 285c287c7..ff831fb93 100644
--- a/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.c
+++ b/src/overlays/actors/ovl_En_Goroiwa/z_en_goroiwa.c
@@ -431,7 +431,7 @@ void func_80A4CED8(EnGoroiwa* this, GlobalContext* globalCtx) {
if (this->unk_1D3 & 8) {
sp8C = this->unk_1BC;
} else {
- this->unk_1BC = Math3D_Vec3f_DistXYZ(&this->actor.world.pos, &this->actor.prevPos) * 0.016806724f;
+ this->unk_1BC = Math3D_Vec3f_DistXYZ(&this->actor.world.pos, &this->actor.prevPos) * (1.0f / 59.5f);
sp8C = this->unk_1BC;
}
sp8C *= this->unk_1C0;
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 80c994c68..c78191275 100644
--- a/src/overlays/actors/ovl_En_Gs/z_en_gs.c
+++ b/src/overlays/actors/ovl_En_Gs/z_en_gs.c
@@ -207,8 +207,8 @@ f32 func_80A4E754(EnGs* this, GlobalContext* globalCtx, f32* arg2, f32* arg3, u1
if (arg9 == 0) {
sp2C = Math_SmoothStepToF(arg2, *arg3, arg5, arg6, arg7);
- this->unk_1B4[0].x = 1.0f + (sinf((((*arg4 % arg8) * (1.0f / arg8)) * 360.0f) * 0.017453292f) * *arg2);
- this->unk_1B4[0].y = 1.0f - (sinf((((*arg4 % arg8) * (1.0f / arg8)) * 360.0f) * 0.017453292f) * *arg2);
+ this->unk_1B4[0].x = 1.0f + (sinf((((*arg4 % arg8) * (1.0f / arg8)) * 360.0f) * (M_PI / 180.0f)) * *arg2);
+ this->unk_1B4[0].y = 1.0f - (sinf((((*arg4 % arg8) * (1.0f / arg8)) * 360.0f) * (M_PI / 180.0f)) * *arg2);
*arg4 += 1;
}
return sp2C;
@@ -232,8 +232,6 @@ void func_80A4E910(EnGs* this, GlobalContext* globalCtx) {
}
void func_80A4EA08(EnGs* this, GlobalContext* globalCtx) {
- s32 temp_t8;
-
if (this->unk_19F == 0) {
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STALKID_ATTACK);
this->unk_1E8 = 0.3f;
@@ -241,7 +239,7 @@ void func_80A4EA08(EnGs* this, GlobalContext* globalCtx) {
this->unk_200 = 0;
this->unk_19F = 1;
} else if (this->unk_19F == 1) {
- this->unk_1A0[0].z = (((this->unk_200 % 8) * 0.125f) * 360.0f) * 182.04445f;
+ this->unk_1A0[0].z = (((this->unk_200 % 8) / 8.0f) * 360.0f) * (0x10000 / 360.0f);
this->unk_1A0[1].z = -this->unk_1A0[0].z;
if (func_80A4E754(this, globalCtx, &this->unk_1E8, &this->unk_1EC, &this->unk_200, 0.8f, 0.005f, 0.001f, 7,
0) == 0.0f) {
@@ -306,13 +304,13 @@ void func_80A4ED34(EnGs* this, GlobalContext* globalCtx) {
Vec3f bomb2Pos;
if (this->unk_19F == 0) {
- this->unk_200 = 0x28;
+ this->unk_200 = 40;
this->unk_19F++;
}
if (this->unk_19F == 1) {
if ((u32)this->unk_200-- <= 0) {
- this->unk_200 = 0x50;
+ this->unk_200 = 80;
this->unk_19E |= 4;
this->unk_19F++;
}
@@ -321,16 +319,16 @@ void func_80A4ED34(EnGs* this, GlobalContext* globalCtx) {
if (this->unk_19F == 2) {
this->unk_200--;
Color_RGBA8_Copy(&this->flashColor, &baseWhite);
- if ((this->unk_200 < 0x50) && ((this->unk_200 % 0x14) < 8)) {
- if (this->unk_200 < 0x14) {
+ if ((this->unk_200 < 80) && ((this->unk_200 % 20) < 8)) {
+ if (this->unk_200 < 20) {
Color_RGBA8_Copy(&this->flashColor, &flashRed);
- if ((this->unk_200 % 0x14) == 7) {
+ if ((this->unk_200 % 20) == 7) {
Audio_PlaySoundGeneral(NA_SE_SY_WARNING_COUNT_E, &D_801333D4, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
}
} else {
Color_RGBA8_Copy(&this->flashColor, &flashBlue);
- if ((this->unk_200 % 0x14) == 7) {
+ if ((this->unk_200 % 20) == 7) {
Audio_PlaySoundGeneral(NA_SE_SY_WARNING_COUNT_N, &D_801333D4, 4, &D_801333E0, &D_801333E0,
&D_801333E8);
}
@@ -406,15 +404,15 @@ void func_80A4F13C(EnGs* this, GlobalContext* globalCtx) {
if (this->unk_19F == 1) {
Math_SmoothStepToF(&this->unk_1F0, this->unk_1F4, 1.0f, 0.1f, 0.001f);
tmpf1 = Math_SmoothStepToF(&this->unk_1E8, this->unk_1EC, 1.0f, this->unk_1F0, 0.001f);
- this->unk_1A0[0].y += (s32)(this->unk_1E8 * 182.04445f);
+ this->unk_1A0[0].y += (s32)(this->unk_1E8 * (0x10000 / 360.0f));
if (tmpf1 == 0.0f) {
this->unk_200 = 0;
this->unk_19F = 2;
}
}
if (this->unk_19F == 2) {
- this->unk_1A0[0].y += (s32)(this->unk_1E8 * 182.04445f);
- if (this->unk_200++ > 0x28) {
+ this->unk_1A0[0].y += (s32)(this->unk_1E8 * (0x10000 / 360.0f));
+ if (this->unk_200++ > 40) {
this->unk_1E8 = this->unk_1B4[0].y - 1.0f;
this->unk_1EC = 1.5f;
this->unk_1F0 = this->unk_1B4[1].y - 1.0f;
@@ -430,8 +428,8 @@ void func_80A4F13C(EnGs* this, GlobalContext* globalCtx) {
this->unk_1B4[0].x = this->unk_1F0 + 1.0f;
this->unk_1B4[0].y = this->unk_1E8 + 1.0f;
if (tmpf1 == 0.0f) {
- this->unk_1E8 = 0.6981317f;
- this->unk_1EC = 0.34906584f;
+ this->unk_1E8 = 0.34906584f * 2.0f;
+ this->unk_1EC = 0.34906584f; // M_PI / 9
this->unk_19F = 4;
}
}
@@ -477,8 +475,8 @@ void func_80A4F13C(EnGs* this, GlobalContext* globalCtx) {
tmpf3 = Math_SmoothStepToF(&this->unk_1F8, this->unk_1FC, 0.8f, 0.02f, 0.001f);
this->unk_1B4[0].x = this->unk_1F0 + 1.0f;
this->unk_1B4[0].y = this->unk_1E8 + 1.0f;
- this->unk_1B4[0].x += sinf((((this->unk_200 % 0xA) * 0.1f) * 360.0f) * 0.017453292f) * this->unk_1F8;
- this->unk_1B4[0].y += (sinf((((this->unk_200 % 0xA) * 0.1f) * 360.0f) * 0.017453292f) * this->unk_1F8);
+ this->unk_1B4[0].x += sinf((((this->unk_200 % 10) * 0.1f) * 360.0f) * (M_PI / 180.0f)) * this->unk_1F8;
+ this->unk_1B4[0].y += sinf((((this->unk_200 % 10) * 0.1f) * 360.0f) * (M_PI / 180.0f)) * this->unk_1F8;
this->unk_200++;
if ((tmpf1 == 0.0f) && (tmpf2 == 0.0f) && (tmpf3 == 0.0f)) {
this->unk_19C = 0;
@@ -578,13 +576,13 @@ void EnGs_Draw(Actor* thisx, GlobalContext* globalCtx) {
func_80093D18(globalCtx->state.gfxCtx);
Matrix_Push();
if (this->unk_19E & 1) {
- Matrix_RotateY(this->unk_1A0[0].y * 0.0000958738f, MTXMODE_APPLY);
- Matrix_RotateX(this->unk_1A0[0].x * 0.0000958738f, MTXMODE_APPLY);
- Matrix_RotateZ(this->unk_1A0[0].z * 0.0000958738f, MTXMODE_APPLY);
+ Matrix_RotateY(this->unk_1A0[0].y * (M_PI / 0x8000), MTXMODE_APPLY);
+ Matrix_RotateX(this->unk_1A0[0].x * (M_PI / 0x8000), MTXMODE_APPLY);
+ Matrix_RotateZ(this->unk_1A0[0].z * (M_PI / 0x8000), MTXMODE_APPLY);
Matrix_Scale(this->unk_1B4[0].x, this->unk_1B4[0].y, this->unk_1B4[0].z, MTXMODE_APPLY);
- Matrix_RotateY(this->unk_1A0[1].y * 0.0000958738f, MTXMODE_APPLY);
- Matrix_RotateX(this->unk_1A0[1].x * 0.0000958738f, MTXMODE_APPLY);
- Matrix_RotateZ(this->unk_1A0[1].z * 0.0000958738f, MTXMODE_APPLY);
+ Matrix_RotateY(this->unk_1A0[1].y * (M_PI / 0x8000), MTXMODE_APPLY);
+ Matrix_RotateX(this->unk_1A0[1].x * (M_PI / 0x8000), MTXMODE_APPLY);
+ Matrix_RotateZ(this->unk_1A0[1].z * (M_PI / 0x8000), MTXMODE_APPLY);
}
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_gs.c", 1064),
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 769408523..d38f1ef5f 100644
--- a/src/overlays/actors/ovl_En_Heishi1/z_en_heishi1.c
+++ b/src/overlays/actors/ovl_En_Heishi1/z_en_heishi1.c
@@ -174,7 +174,7 @@ void EnHeishi1_Walk(EnHeishi1* this, GlobalContext* globalCtx) {
pathDiffX = pointPos->x - this->actor.world.pos.x;
pathDiffZ = pointPos->z - this->actor.world.pos.z;
- Math_SmoothStepToS(&this->actor.shape.rot.y, (Math_FAtan2F(pathDiffX, pathDiffZ) * 10430.378f), 3,
+ Math_SmoothStepToS(&this->actor.shape.rot.y, (Math_FAtan2F(pathDiffX, pathDiffZ) * (0x8000 / M_PI)), 3,
this->bodyTurnSpeed, 0);
Math_ApproachF(&this->bodyTurnSpeed, this->bodyTurnSpeedTarget, 1.0f, this->bodyTurnSpeedMax);
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 5f51869b1..c917bfa15 100644
--- a/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c
+++ b/src/overlays/actors/ovl_En_Heishi2/z_en_heishi2.c
@@ -317,8 +317,8 @@ void func_80A5372C(EnHeishi2* this, GlobalContext* globalCtx) {
Animation_Change(&this->skelAnime, &D_06005C30, 1.0f, 0.0f, (s16)frameCount, ANIMMODE_LOOP, -10.0f);
this->unk_2F2[0] = 200;
this->cameraId = Gameplay_CreateSubCamera(globalCtx);
- Gameplay_ChangeCameraStatus(globalCtx, 0, 1);
- Gameplay_ChangeCameraStatus(globalCtx, this->cameraId, 7);
+ Gameplay_ChangeCameraStatus(globalCtx, MAIN_CAM, CAM_STAT_WAIT);
+ Gameplay_ChangeCameraStatus(globalCtx, this->cameraId, CAM_STAT_ACTIVE);
this->unk_280.x = 947.0f;
this->unk_280.y = 1195.0f;
this->unk_280.z = 2682.0f;
@@ -339,7 +339,7 @@ void func_80A53850(EnHeishi2* this, GlobalContext* globalCtx) {
gate = (BgSpot15Saku*)this->gate;
if ((this->unk_2F2[0] == 0) || (gate->unk_168 == 0)) {
Gameplay_ClearCamera(globalCtx, this->cameraId);
- Gameplay_ChangeCameraStatus(globalCtx, 0, 7);
+ Gameplay_ChangeCameraStatus(globalCtx, MAIN_CAM, CAM_STAT_ACTIVE);
func_80106CCC(globalCtx);
this->unk_30C = 1;
func_8002DF54(globalCtx, NULL, 7);
@@ -484,8 +484,8 @@ void func_80A53DF8(EnHeishi2* this, GlobalContext* globalCtx) {
Animation_Change(&this->skelAnime, &D_06005C30, 1.0f, 0.0f, (s16)frameCount, ANIMMODE_LOOP, -10.0f);
this->unk_2F2[0] = 200;
this->cameraId = Gameplay_CreateSubCamera(globalCtx);
- Gameplay_ChangeCameraStatus(globalCtx, 0, 1);
- Gameplay_ChangeCameraStatus(globalCtx, this->cameraId, 7);
+ Gameplay_ChangeCameraStatus(globalCtx, MAIN_CAM, CAM_STAT_WAIT);
+ Gameplay_ChangeCameraStatus(globalCtx, this->cameraId, CAM_STAT_ACTIVE);
this->unk_2BC.x = -71.0f;
this->unk_280.x = -71.0f;
this->unk_2BC.y = 571.0f;
@@ -510,7 +510,7 @@ void func_80A53F30(EnHeishi2* this, GlobalContext* globalCtx) {
gate = (BgGateShutter*)this->gate;
if ((this->unk_2F2[0] == 0) || (gate->openingState == 0)) {
Gameplay_ClearCamera(globalCtx, this->cameraId);
- Gameplay_ChangeCameraStatus(globalCtx, 0, 7);
+ Gameplay_ChangeCameraStatus(globalCtx, MAIN_CAM, CAM_STAT_ACTIVE);
if ((this->unk_30A != 2)) {
if (this->unk_30A == 0) {
this->actor.textId = 0x2015; // "By the way Mr. Hero..If you're going to climb Death Mountain..."
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 069360fb0..2c5e1a0b2 100644
--- a/src/overlays/actors/ovl_En_Hintnuts/z_en_hintnuts.c
+++ b/src/overlays/actors/ovl_En_Hintnuts/z_en_hintnuts.c
@@ -409,12 +409,11 @@ void EnHintnuts_Leave(EnHintnuts* this, GlobalContext* globalCtx) {
if (this->actor.bgCheckFlags & 8) {
temp_a1 = this->actor.wallYaw;
} else {
- temp_a1 =
- this->actor.yawTowardsPlayer - Camera_GetCamDirYaw(globalCtx->cameraPtrs[globalCtx->activeCamera]) - 0x8000;
+ temp_a1 = this->actor.yawTowardsPlayer - Camera_GetCamDirYaw(ACTIVE_CAM) - 0x8000;
if (ABS(temp_a1) >= 0x4001) {
- temp_a1 = Camera_GetCamDirYaw(globalCtx->cameraPtrs[globalCtx->activeCamera]) + 0x8000;
+ temp_a1 = Camera_GetCamDirYaw(ACTIVE_CAM) + 0x8000;
} else {
- temp_a1 = Camera_GetCamDirYaw(globalCtx->cameraPtrs[globalCtx->activeCamera]) - (temp_a1 >> 1) + 0x8000;
+ temp_a1 = Camera_GetCamDirYaw(ACTIVE_CAM) - (temp_a1 >> 1) + 0x8000;
}
}
Math_ScaledStepToS(&this->actor.shape.rot.y, temp_a1, 0x800);
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 f4889ff8f..b9b96cc15 100644
--- a/src/overlays/actors/ovl_En_Holl/z_en_holl.c
+++ b/src/overlays/actors/ovl_En_Holl/z_en_holl.c
@@ -180,7 +180,7 @@ void func_80A59014(EnHoll* this, GlobalContext* globalCtx) {
f32 planeHalfWidth;
s32 pad2;
Player* player = PLAYER;
- s32 useViewEye = gDbgCamEnabled != 0 || globalCtx->csCtx.state != 0;
+ s32 useViewEye = gDbgCamEnabled || globalCtx->csCtx.state != CS_STATE_IDLE;
s32 transitionActorIdx;
f32 absZ;
s32 side;
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 28289d3a7..39783d28d 100644
--- a/src/overlays/actors/ovl_En_Honotrap/z_en_honotrap.c
+++ b/src/overlays/actors/ovl_En_Honotrap/z_en_honotrap.c
@@ -519,7 +519,7 @@ void EnHonotrap_DrawFlame(Actor* thisx, GlobalContext* globalCtx) {
Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, 0, 0x20, 0x40, 1, 0, this->flameScroll, 0x20, 0x80));
gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 255, 200, 0, 255);
gDPSetEnvColor(POLY_XLU_DISP++, 255, 0, 0, 0);
- Matrix_RotateY((s16)(Camera_GetCamDirYaw(ACTIVE_CAM) - this->actor.shape.rot.y + 0x8000) * 0.0000958738f,
+ Matrix_RotateY((s16)(Camera_GetCamDirYaw(ACTIVE_CAM) - this->actor.shape.rot.y + 0x8000) * (M_PI / 0x8000),
MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_honotrap.c", 1024),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
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 d4bc1b783..d85c38be3 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
@@ -42,7 +42,7 @@ static AnimationHeader* sAnimations[] = {
&gHorseGanonTrottingAnim, &gHorseGanonGallopingAnim, &gHorseGanonRearingAnim,
};
-static f32 splaySpeeds[] = { 0.66666666f, 0.66666666f, 1.0f, 1.0f, 1.0f, 0.66666666f };
+static f32 splaySpeeds[] = { 2.0f / 3.0f, 2.0f / 3.0f, 1.0f, 1.0f, 1.0f, 2.0f / 3.0f };
static ColliderCylinderInit sCylinderInit = {
{
@@ -282,7 +282,7 @@ void func_80A68E14(EnHorseGanon* this, GlobalContext* globalCtx) {
temp_ret = BgCheck_EntityRaycastFloor3(&globalCtx->colCtx, &col, &temp1, &v);
this->unk_1F4 = temp_ret;
- this->actor.shape.rot.x = 10430.3779f * Math_FAtan2F(this->actor.world.pos.y - temp_ret, 30.0f);
+ this->actor.shape.rot.x = (0x8000 / M_PI) * Math_FAtan2F(this->actor.world.pos.y - temp_ret, 30.0f);
}
void EnHorseGanon_Update(Actor* thisx, GlobalContext* globalCtx) {
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 7e869c656..0d99e45f6 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
@@ -34,7 +34,7 @@ const ActorInit En_Horse_Zelda_InitVars = {
static AnimationHeader* sAnimationHeaders[] = { &gHorseZeldaGallopingAnim };
-static f32 splaySpeeds[] = { 0.66666666f };
+static f32 splaySpeeds[] = { 2.0f / 3.0f };
static ColliderCylinderInitType1 sCylinderInit = {
{
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 846a5e956..85c10b2b3 100644
--- a/src/overlays/actors/ovl_En_Ik/z_en_ik.c
+++ b/src/overlays/actors/ovl_En_Ik/z_en_ik.c
@@ -1065,7 +1065,7 @@ s32 func_80A7707C(EnIk* this) {
}
CsCmdActorAction* EnIk_GetNpcAction(GlobalContext* globalCtx, s32 actionIdx) {
- if (globalCtx->csCtx.state != 0) {
+ if (globalCtx->csCtx.state != CS_STATE_IDLE) {
return globalCtx->csCtx.npcActions[actionIdx];
} else {
return NULL;
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 a24a6668f..9c0e3eda9 100644
--- a/src/overlays/actors/ovl_En_In/z_en_in.c
+++ b/src/overlays/actors/ovl_En_In/z_en_in.c
@@ -434,8 +434,8 @@ void func_80A79C78(EnIn* this, GlobalContext* globalCtx) {
Vec3s zeroVec = { 0, 0, 0 };
this->camId = Gameplay_CreateSubCamera(globalCtx);
- Gameplay_ChangeCameraStatus(globalCtx, 0, 1);
- Gameplay_ChangeCameraStatus(globalCtx, this->camId, 7);
+ Gameplay_ChangeCameraStatus(globalCtx, MAIN_CAM, CAM_STAT_WAIT);
+ Gameplay_ChangeCameraStatus(globalCtx, this->camId, CAM_STAT_ACTIVE);
sp48.x = this->actor.world.pos.x;
sp48.y = this->actor.world.pos.y + 60.0f;
sp48.z = this->actor.world.pos.z;
@@ -746,8 +746,8 @@ void func_80A7AA40(EnIn* this, GlobalContext* globalCtx) {
this->camId = Gameplay_CreateSubCamera(globalCtx);
this->activeCamId = globalCtx->activeCamera;
- Gameplay_ChangeCameraStatus(globalCtx, this->activeCamId, 1);
- Gameplay_ChangeCameraStatus(globalCtx, this->camId, 7);
+ Gameplay_ChangeCameraStatus(globalCtx, this->activeCamId, CAM_STAT_WAIT);
+ Gameplay_ChangeCameraStatus(globalCtx, this->camId, CAM_STAT_ACTIVE);
this->unk_2F0 = 0.0f;
this->unk_2F4 = 50.0f;
@@ -836,7 +836,7 @@ void func_80A7ABD4(EnIn* this, GlobalContext* globalCtx) {
}
void func_80A7AE84(EnIn* this, GlobalContext* globalCtx) {
- Gameplay_ChangeCameraStatus(globalCtx, this->activeCamId, 7);
+ Gameplay_ChangeCameraStatus(globalCtx, this->activeCamId, CAM_STAT_ACTIVE);
Gameplay_ClearCamera(globalCtx, this->camId);
func_8002DF54(globalCtx, &this->actor, 7);
Interface_ChangeAlpha(0x32);
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 cd2028a3b..1fa5fccac 100644
--- a/src/overlays/actors/ovl_En_Insect/z_en_insect.c
+++ b/src/overlays/actors/ovl_En_Insect/z_en_insect.c
@@ -583,7 +583,7 @@ void func_80A7D460(EnInsect* this, GlobalContext* globalCtx) {
if (!this->soilActor->actor.params) {}
- D_80A7DEB0 += 0.0033333332f;
+ D_80A7DEB0 += 0.99999994f / 300.0f;
if (D_80A7DEB0 > 1.0f) {
D_80A7DEB0 = 1.0f;
}
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 ab23da9c3..23a30e9c6 100644
--- a/src/overlays/actors/ovl_En_Ishi/z_en_ishi.c
+++ b/src/overlays/actors/ovl_En_Ishi/z_en_ishi.c
@@ -310,7 +310,7 @@ void EnIshi_Init(Actor* thisx, GlobalContext* globalCtx) {
s16 type = this->actor.params & 1;
Actor_ProcessInitChain(&this->actor, sInitChains[type]);
- if (globalCtx->csCtx.state != 0) {
+ if (globalCtx->csCtx.state != CS_STATE_IDLE) {
this->actor.uncullZoneForward += 1000.0f;
}
if (this->actor.shape.rot.y == 0) {
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 7aa0e32eb..7f62f9352 100644
--- a/src/overlays/actors/ovl_En_Jj/z_en_jj.c
+++ b/src/overlays/actors/ovl_En_Jj/z_en_jj.c
@@ -288,7 +288,7 @@ void EnJj_UpdateStaticCollision(Actor* thisx, GlobalContext* globalCtx) {
void EnJj_Update(Actor* thisx, GlobalContext* globalCtx) {
EnJj* this = THIS;
- if ((globalCtx->csCtx.state != 0) && (globalCtx->csCtx.npcActions[2] != NULL)) {
+ if ((globalCtx->csCtx.state != CS_STATE_IDLE) && (globalCtx->csCtx.npcActions[2] != NULL)) {
EnJj_CutsceneUpdate(this, globalCtx);
} else {
this->actionFunc(this, globalCtx);
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 ceb9cb4c6..ca2782682 100644
--- a/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.c
+++ b/src/overlays/actors/ovl_En_Kakasi/z_en_kakasi.c
@@ -199,42 +199,40 @@ void func_80A8F660(EnKakasi* this, GlobalContext* globalCtx) {
void func_80A8F75C(EnKakasi* this, GlobalContext* globalCtx) {
Player* player = PLAYER;
- s16 yawTowardsPlayer;
- s16 absyawTowardsPlayer;
func_80A8F28C(this);
SkelAnime_Update(&this->skelanime);
- this->camId = -1;
+ this->camId = SUBCAM_NONE;
if (func_8002F194(&this->actor, globalCtx)) {
if (this->unk_196 == 5) {
this->actionFunc = func_80A8F9C8;
} else {
this->actionFunc = func_80A8F660;
}
- return;
- }
-
- yawTowardsPlayer = this->actor.yawTowardsPlayer - this->actor.shape.rot.y;
- if (!(this->actor.xzDistToPlayer > 120.0f)) {
- absyawTowardsPlayer = ABS(yawTowardsPlayer);
-
- if (absyawTowardsPlayer < 0x4300) {
- if (!this->unk_194) {
- if (player->stateFlags2 & 0x1000000) {
- this->camId = func_800800F8(globalCtx, 0x8D4, -0x63, &this->actor, 0);
-
- func_8010BD58(globalCtx, 0x2A);
- this->unk_19A = 0;
- this->unk_1B8 = 0.0;
- player->stateFlags2 |= 0x800000;
- this->actionFunc = func_80A8F8D0;
- return;
- }
- if (this->actor.xzDistToPlayer < 80.0f) {
- player->stateFlags2 |= 0x800000;
+ } else {
+ s16 yawTowardsPlayer = this->actor.yawTowardsPlayer - this->actor.shape.rot.y;
+
+ if (!(this->actor.xzDistToPlayer > 120.0f)) {
+ s16 absyawTowardsPlayer = ABS(yawTowardsPlayer);
+
+ if (absyawTowardsPlayer < 0x4300) {
+ if (!this->unk_194) {
+ if (player->stateFlags2 & 0x1000000) {
+ this->camId = OnePointCutscene_Init(globalCtx, 2260, -99, &this->actor, MAIN_CAM);
+
+ func_8010BD58(globalCtx, 0x2A);
+ this->unk_19A = 0;
+ this->unk_1B8 = 0.0;
+ player->stateFlags2 |= 0x800000;
+ this->actionFunc = func_80A8F8D0;
+ return;
+ }
+ if (this->actor.xzDistToPlayer < 80.0f) {
+ player->stateFlags2 |= 0x800000;
+ }
}
+ func_8002F2CC(&this->actor, globalCtx, 100.0f);
}
- func_8002F2CC(&this->actor, globalCtx, 100.0f);
}
}
}
@@ -253,8 +251,8 @@ void func_80A8F8D0(EnKakasi* this, GlobalContext* globalCtx) {
func_8010B680(globalCtx, this->actor.textId, NULL);
this->actionFunc = func_80A8F9C8;
} else {
- func_800803F0(globalCtx, this->camId);
- this->camId = -1;
+ OnePointCutscene_EndCutscene(globalCtx, this->camId);
+ this->camId = SUBCAM_NONE;
this->actionFunc = func_80A8F660;
}
} else if (globalCtx->msgCtx.unk_E3EE == 1) {
@@ -270,10 +268,10 @@ void func_80A8F9C8(EnKakasi* this, GlobalContext* globalCtx) {
if (this->unk_196 == func_8010BDBC(&globalCtx->msgCtx) && (func_80106BC8(globalCtx) != 0)) {
- if (this->camId != -1) {
+ if (this->camId != SUBCAM_NONE) {
func_8005B1A4(globalCtx->cameraPtrs[this->camId]);
}
- this->camId = func_800800F8(globalCtx, 0x8DE, -0x63, &this->actor, 0);
+ this->camId = OnePointCutscene_Init(globalCtx, 2270, -99, &this->actor, MAIN_CAM);
globalCtx->msgCtx.msgMode = 0x37;
func_8002DF54(globalCtx, NULL, 8);
func_8010BD58(globalCtx, 0x2B);
@@ -300,9 +298,9 @@ void func_80A8FAA4(EnKakasi* this, GlobalContext* globalCtx) {
func_8010B680(globalCtx, this->actor.textId, NULL);
}
this->actionFunc = func_80A8FBB8;
- func_800803F0(globalCtx, this->camId);
- this->camId = -1;
- this->camId = func_800800F8(globalCtx, 0x8D4, -0x63, &this->actor, 0);
+ OnePointCutscene_EndCutscene(globalCtx, this->camId);
+ this->camId = SUBCAM_NONE;
+ this->camId = OnePointCutscene_Init(globalCtx, 2260, -99, &this->actor, MAIN_CAM);
func_8005B1A4(globalCtx->cameraPtrs[this->camId]);
}
}
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 93105f8d9..f93a654e1 100644
--- a/src/overlays/actors/ovl_En_Kakasi2/z_en_kakasi2.c
+++ b/src/overlays/actors/ovl_En_Kakasi2/z_en_kakasi2.c
@@ -127,7 +127,7 @@ void func_80A90264(EnKakasi2* this, GlobalContext* globalCtx) {
Collider_InitCylinder(globalCtx, &this->collider);
Collider_SetCylinder(globalCtx, &this->collider, &this->actor, &sCylinderInit);
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_060065B0, &D_06000214, NULL, NULL, 0);
- func_80080480(globalCtx, &this->actor);
+ OnePointCutscene_Attention(globalCtx, &this->actor);
this->actor.flags |= 0x8000001;
func_80078884(NA_SE_SY_CORRECT_CHIME);
@@ -152,7 +152,7 @@ void func_80A90264(EnKakasi2* this, GlobalContext* globalCtx) {
Collider_InitCylinder(globalCtx, &this->collider);
Collider_SetCylinder(globalCtx, &this->collider, &this->actor, &sCylinderInit);
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_060065B0, &D_06000214, NULL, NULL, 0);
- func_80080480(globalCtx, &this->actor);
+ OnePointCutscene_Attention(globalCtx, &this->actor);
func_80078884(NA_SE_SY_CORRECT_CHIME);
this->actor.flags |= 0x8000001;
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 0c93f4b66..d72058284 100644
--- a/src/overlays/actors/ovl_En_Kakasi3/z_en_kakasi3.c
+++ b/src/overlays/actors/ovl_En_Kakasi3/z_en_kakasi3.c
@@ -213,12 +213,10 @@ void func_80A91284(EnKakasi3* this, GlobalContext* globalCtx) {
void func_80A91348(EnKakasi3* this, GlobalContext* globalCtx) {
Player* player = PLAYER;
- s16 angleTowardsLink;
- s16 absAngleTowardsLink;
func_80A90E28(this);
SkelAnime_Update(&this->skelAnime);
- this->camId = -1;
+ this->camId = SUBCAM_NONE;
if (func_8002F194(&this->actor, globalCtx)) {
if (!this->unk_194) {
if (this->unk_1A8 == 0) {
@@ -229,46 +227,46 @@ void func_80A91348(EnKakasi3* this, GlobalContext* globalCtx) {
} else {
this->actionFunc = func_80A91284;
}
- return;
- }
-
- angleTowardsLink = this->actor.yawTowardsPlayer - this->actor.shape.rot.y;
- if (!(this->actor.xzDistToPlayer > 120.0f)) {
- absAngleTowardsLink = ABS(angleTowardsLink);
-
- if (absAngleTowardsLink < 0x4300) {
- if (!this->unk_194) {
-
- if (player->stateFlags2 & 0x1000000) {
- this->camId = func_800800F8(globalCtx, 0x8D4, -0x63, &this->actor, 0);
- globalCtx->msgCtx.msgMode = 0x37;
- this->dialogState = 5;
- this->unk_1B8 = 0.0f;
- func_8010B680(globalCtx, 0x40A4, NULL);
- player->stateFlags2 |= 0x800000;
- this->actionFunc = func_80A915B8;
- return;
- }
- if (this->actor.xzDistToPlayer < 80.0f) {
- player->stateFlags2 |= 0x800000;
- }
- } else if (gSaveContext.scarecrowSpawnSongSet && !this->unk_195) {
-
- if (player->stateFlags2 & 0x1000000) {
- this->camId = func_800800F8(globalCtx, 0x8D4, -0x63, &this->actor, 0);
- globalCtx->msgCtx.msgMode = 0x37;
- this->dialogState = 5;
- this->unk_1B8 = 0.0f;
- func_8010B680(globalCtx, 0x40A8, NULL);
- player->stateFlags2 |= 0x800000;
- this->actionFunc = func_80A9187C;
- return;
- }
- if (this->actor.xzDistToPlayer < 80.0f) {
- player->stateFlags2 |= 0x800000;
+ } else {
+ s16 angleTowardsLink = this->actor.yawTowardsPlayer - this->actor.shape.rot.y;
+
+ if (!(this->actor.xzDistToPlayer > 120.0f)) {
+ s16 absAngleTowardsLink = ABS(angleTowardsLink);
+
+ if (absAngleTowardsLink < 0x4300) {
+ if (!this->unk_194) {
+
+ if (player->stateFlags2 & 0x1000000) {
+ this->camId = OnePointCutscene_Init(globalCtx, 2260, -99, &this->actor, MAIN_CAM);
+ globalCtx->msgCtx.msgMode = 0x37;
+ this->dialogState = 5;
+ this->unk_1B8 = 0.0f;
+ func_8010B680(globalCtx, 0x40A4, NULL);
+ player->stateFlags2 |= 0x800000;
+ this->actionFunc = func_80A915B8;
+ return;
+ }
+ if (this->actor.xzDistToPlayer < 80.0f) {
+ player->stateFlags2 |= 0x800000;
+ }
+ } else if (gSaveContext.scarecrowSpawnSongSet && !this->unk_195) {
+
+ if (player->stateFlags2 & 0x1000000) {
+ this->camId = OnePointCutscene_Init(globalCtx, 2260, -99, &this->actor, MAIN_CAM);
+ globalCtx->msgCtx.msgMode = 0x37;
+ this->dialogState = 5;
+ this->unk_1B8 = 0.0f;
+ func_8010B680(globalCtx, 0x40A8, NULL);
+ player->stateFlags2 |= 0x800000;
+ this->actionFunc = func_80A9187C;
+ return;
+ }
+ if (this->actor.xzDistToPlayer < 80.0f) {
+ player->stateFlags2 |= 0x800000;
+ }
}
+ func_8002F2CC(&this->actor, globalCtx, 100.0f);
}
- func_8002F2CC(&this->actor, globalCtx, 100.0f);
}
}
}
@@ -288,11 +286,11 @@ void func_80A91620(EnKakasi3* this, GlobalContext* globalCtx) {
if ((globalCtx->msgCtx.unk_E3EE == 4 || (globalCtx->msgCtx.unk_E3EE >= 5 && globalCtx->msgCtx.unk_E3EE < 11)) &&
(globalCtx->msgCtx.msgMode == 0)) {
- func_800803F0(globalCtx, this->camId);
+ OnePointCutscene_EndCutscene(globalCtx, this->camId);
if (globalCtx->cameraPtrs[this->camId] == NULL) {
- this->camId = -1;
+ this->camId = SUBCAM_NONE;
}
- if (this->camId != -1) {
+ if (this->camId != SUBCAM_NONE) {
func_8005B1A4(globalCtx->cameraPtrs[this->camId]);
}
this->actionFunc = func_80A911F0;
@@ -321,7 +319,7 @@ void func_80A91760(EnKakasi3* this, GlobalContext* globalCtx) {
globalCtx->msgCtx.msgMode = 0x37;
func_8010BD58(globalCtx, 0x2D);
this->actionFunc = func_80A917FC;
- this->camId = func_800800F8(globalCtx, 0x8E8, -0x63, &this->actor, 0);
+ this->camId = OnePointCutscene_Init(globalCtx, 2280, -99, &this->actor, MAIN_CAM);
}
}
@@ -332,7 +330,7 @@ void func_80A917FC(EnKakasi3* this, GlobalContext* globalCtx) {
} else {
globalCtx->msgCtx.unk_E3EE = 4;
func_80106CCC(globalCtx);
- func_800803F0(globalCtx, this->camId);
+ OnePointCutscene_EndCutscene(globalCtx, this->camId);
this->actionFunc = func_80A911F0;
}
}
@@ -358,8 +356,8 @@ void func_80A918E4(EnKakasi3* this, GlobalContext* globalCtx) {
func_8010B680(globalCtx, 0x40A6, NULL);
this->dialogState = 5;
- func_800803F0(globalCtx, this->camId);
- this->camId = -1;
+ OnePointCutscene_EndCutscene(globalCtx, this->camId);
+ this->camId = SUBCAM_NONE;
func_8002DF54(globalCtx, NULL, 8);
this->actionFunc = func_80A91A90;
return;
@@ -399,9 +397,9 @@ void func_80A91A90(EnKakasi3* this, GlobalContext* globalCtx) {
}
}
if (globalCtx->cameraPtrs[this->camId] == NULL) {
- this->camId = -1;
+ this->camId = SUBCAM_NONE;
}
- if (this->camId != -1) {
+ if (this->camId != SUBCAM_NONE) {
func_8005B1A4(globalCtx->cameraPtrs[this->camId]);
}
func_80106CCC(globalCtx);
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 b75559a81..4bf0bd088 100644
--- a/src/overlays/actors/ovl_En_Kanban/z_en_kanban.c
+++ b/src/overlays/actors/ovl_En_Kanban/z_en_kanban.c
@@ -737,7 +737,7 @@ void EnKanban_Update(Actor* thisx, GlobalContext* globalCtx2) {
Actor_Kill(&this->actor);
}
- Matrix_RotateY((signpost->actor.shape.rot.y / 32768.0f) * 3.1415927f, MTXMODE_NEW);
+ Matrix_RotateY((signpost->actor.shape.rot.y / (f32)0x8000) * M_PI, MTXMODE_NEW);
Matrix_MultVec3f(&sPieceOffsets[this->pieceType], &offset);
distX =
Math_SmoothStepToF(&this->actor.world.pos.x, signpost->actor.world.pos.x + offset.x, 1.0f, 3.0f, 0.0f);
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 de7292ee9..15f88c57d 100644
--- a/src/overlays/actors/ovl_En_Kusa/z_en_kusa.c
+++ b/src/overlays/actors/ovl_En_Kusa/z_en_kusa.c
@@ -233,7 +233,7 @@ void EnKusa_Init(Actor* thisx, GlobalContext* globalCtx) {
Actor_ProcessInitChain(&this->actor, sInitChain);
- if (globalCtx->csCtx.state != 0) {
+ if (globalCtx->csCtx.state != CS_STATE_IDLE) {
this->actor.uncullZoneForward += 1000.0f;
}
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 23cad1703..7e44eb19e 100644
--- a/src/overlays/actors/ovl_En_Kz/z_en_kz.c
+++ b/src/overlays/actors/ovl_En_Kz/z_en_kz.c
@@ -281,8 +281,7 @@ s32 EnKz_FollowPath(EnKz* this, GlobalContext* globalCtx) {
pathDiffX = pointPos->x - this->actor.world.pos.x;
pathDiffZ = pointPos->z - this->actor.world.pos.z;
- Math_SmoothStepToS(&this->actor.world.rot.y, (Math_FAtan2F(pathDiffX, pathDiffZ) * 10430.3779296875f), 0xA, 0x3E8,
- 1);
+ Math_SmoothStepToS(&this->actor.world.rot.y, (Math_FAtan2F(pathDiffX, pathDiffZ) * (0x8000 / M_PI)), 0xA, 0x3E8, 1);
if ((SQ(pathDiffX) + SQ(pathDiffZ)) < 10.0f) {
this->waypoint++;
@@ -366,8 +365,8 @@ void EnKz_SetupMweep(EnKz* this, GlobalContext* globalCtx) {
this->cutsceneCamera = Gameplay_CreateSubCamera(globalCtx);
this->gameplayCamera = globalCtx->activeCamera;
- Gameplay_ChangeCameraStatus(globalCtx, this->gameplayCamera, 1);
- Gameplay_ChangeCameraStatus(globalCtx, this->cutsceneCamera, 7);
+ Gameplay_ChangeCameraStatus(globalCtx, this->gameplayCamera, CAM_STAT_WAIT);
+ Gameplay_ChangeCameraStatus(globalCtx, this->cutsceneCamera, CAM_STAT_ACTIVE);
pos = this->actor.world.pos;
initPos = this->actor.home.pos;
pos.y += 60.0f;
@@ -404,7 +403,7 @@ void EnKz_Mweep(EnKz* this, GlobalContext* globalCtx) {
}
void EnKz_StopMweep(EnKz* this, GlobalContext* globalCtx) {
- Gameplay_ChangeCameraStatus(globalCtx, this->gameplayCamera, 7);
+ Gameplay_ChangeCameraStatus(globalCtx, this->gameplayCamera, CAM_STAT_ACTIVE);
Gameplay_ClearCamera(globalCtx, this->cutsceneCamera);
func_8002DF54(globalCtx, &this->actor, 7);
this->actionFunc = EnKz_Wait;
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 38438ed26..7b25b405f 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
@@ -279,7 +279,7 @@ void func_80A9F938(EnMThunder* this, GlobalContext* globalCtx) {
void func_80A9F9B4(EnMThunder* this, GlobalContext* globalCtx) {
Player* player = PLAYER;
- if (Math_StepToF(&this->unk_1AC, 0.0f, 0.0625f)) {
+ if (Math_StepToF(&this->unk_1AC, 0.0f, 1 / 16.0f)) {
Actor_Kill(&this->actor);
} else {
Math_SmoothStepToF(&this->actor.scale.x, (s32)this->unk_1C9, 0.6f, 0.8f, 0.0f);
@@ -298,7 +298,7 @@ void func_80A9F9B4(EnMThunder* this, GlobalContext* globalCtx) {
if (this->unk_1AC > 0.6f) {
this->unk_1B0 = 1.0f;
} else {
- this->unk_1B0 = this->unk_1AC * 1.6666666f;
+ this->unk_1B0 = this->unk_1AC * (5.0f / 3.0f);
}
func_80A9F938(this, globalCtx);
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 fd15eac41..7e22b5fc2 100644
--- a/src/overlays/actors/ovl_En_Ma3/z_en_ma3.c
+++ b/src/overlays/actors/ovl_En_Ma3/z_en_ma3.c
@@ -367,7 +367,7 @@ void EnMa3_Draw(Actor* thisx, GlobalContext* globalCtx) {
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_ma3.c", 978);
- camera = globalCtx->cameraPtrs[globalCtx->activeCamera];
+ camera = ACTIVE_CAM;
someFloat = Math_Vec3f_DistXZ(&this->actor.world.pos, &camera->eye);
func_800F6268(someFloat, 0x2F);
func_80093D18(globalCtx->state.gfxCtx);
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 ea87d669c..0ec9e0367 100644
--- a/src/overlays/actors/ovl_En_Md/z_en_md.c
+++ b/src/overlays/actors/ovl_En_Md/z_en_md.c
@@ -521,7 +521,7 @@ void func_80AAB158(EnMd* this, GlobalContext* globalCtx) {
temp2 = 1;
}
- if ((globalCtx->csCtx.state != 0) || gDbgCamEnabled) {
+ if ((globalCtx->csCtx.state != CS_STATE_IDLE) || gDbgCamEnabled) {
this->unk_1E0.unk_18 = globalCtx->view.eye;
this->unk_1E0.unk_14 = 40.0f;
temp = 2;
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 d6ccc50ce..430007e15 100644
--- a/src/overlays/actors/ovl_En_Nb/z_en_nb.c
+++ b/src/overlays/actors/ovl_En_Nb/z_en_nb.c
@@ -137,8 +137,8 @@ void EnNb_UpdatePath(EnNb* this, GlobalContext* globalCtx) {
this->finalPos.x = pointPos[1].x;
this->finalPos.y = pointPos[1].y;
this->finalPos.z = pointPos[1].z;
- this->pathYaw =
- (Math_FAtan2F(this->finalPos.x - this->initialPos.x, this->finalPos.z - this->initialPos.z) * 10430.378f);
+ this->pathYaw = (Math_FAtan2F(this->finalPos.x - this->initialPos.x, this->finalPos.z - this->initialPos.z) *
+ (0x8000 / M_PI));
// "En_Nb_Get_path_info Rail Data Get! = %d!!!!!!!!!!!!!!"
osSyncPrintf("En_Nb_Get_path_info レールデータをゲットだぜ = %d!!!!!!!!!!!!!!\n", path);
} else {
@@ -224,7 +224,7 @@ void func_80AB11EC(EnNb* this) {
void func_80AB1210(EnNb* this, GlobalContext* globalCtx) {
s32 one; // required to match
- if (globalCtx->csCtx.state == 0) {
+ if (globalCtx->csCtx.state == CS_STATE_IDLE) {
if (D_80AB4318) {
if (this->actor.params == NB_TYPE_DEMO02) {
func_80AB11EC(this);
@@ -249,7 +249,7 @@ s32 EnNb_FrameUpdateMatrix(EnNb* this) {
}
CsCmdActorAction* EnNb_GetNpcCsAction(GlobalContext* globalCtx, s32 npcActionIdx) {
- if (globalCtx->csCtx.state != 0) {
+ if (globalCtx->csCtx.state != CS_STATE_IDLE) {
return globalCtx->csCtx.npcActions[npcActionIdx];
}
return NULL;
@@ -271,7 +271,7 @@ void EnNb_SetupCsPosRot(EnNb* this, GlobalContext* globalCtx, s32 npcActionIdx)
s32 func_80AB1390(EnNb* this, GlobalContext* globalCtx, u16 arg2, s32 npcActionIdx) {
CsCmdActorAction* csCmdNPCAction;
- if ((globalCtx->csCtx.state != 0) &&
+ if ((globalCtx->csCtx.state != CS_STATE_IDLE) &&
(csCmdNPCAction = globalCtx->csCtx.npcActions[npcActionIdx], csCmdNPCAction != NULL) &&
(csCmdNPCAction->action == arg2)) {
return true;
@@ -282,7 +282,7 @@ s32 func_80AB1390(EnNb* this, GlobalContext* globalCtx, u16 arg2, s32 npcActionI
s32 func_80AB13D8(EnNb* this, GlobalContext* globalCtx, u16 arg2, s32 npcActionIdx) {
CsCmdActorAction* csCmdNPCAction;
- if ((globalCtx->csCtx.state != 0) &&
+ if ((globalCtx->csCtx.state != CS_STATE_IDLE) &&
(csCmdNPCAction = globalCtx->csCtx.npcActions[npcActionIdx], csCmdNPCAction != NULL) &&
(csCmdNPCAction->action != arg2)) {
return true;
@@ -346,7 +346,7 @@ void EnNb_GiveMedallion(EnNb* this, GlobalContext* globalCtx) {
}
void EnNb_ComeUpImpl(EnNb* this, GlobalContext* globalCtx) {
- this->actor.shape.yOffset += 83.333336f;
+ this->actor.shape.yOffset += 250.0f / 3.0f;
}
void EnNb_SetupChamberCsImpl(EnNb* this, GlobalContext* globalCtx) {
@@ -367,7 +367,7 @@ void EnNb_SetupChamberWarpImpl(EnNb* this, GlobalContext* globalCtx) {
CutsceneContext* csCtx = &globalCtx->csCtx;
CsCmdActorAction* csCmdNPCAction;
- if (csCtx->state != 0) {
+ if (csCtx->state != CS_STATE_IDLE) {
csCmdNPCAction = csCtx->npcActions[1];
if (csCmdNPCAction != NULL && csCmdNPCAction->action == 2) {
this->action = NB_CHAMBER_APPEAR;
@@ -388,7 +388,7 @@ void EnNb_SetupArmRaise(EnNb* this, GlobalContext* globalCtx) {
AnimationHeader* animation = &D_0600274C;
CsCmdActorAction* csCmdNPCAction;
- if (globalCtx->csCtx.state != 0) {
+ if (globalCtx->csCtx.state != CS_STATE_IDLE) {
csCmdNPCAction = globalCtx->csCtx.npcActions[1];
if (csCmdNPCAction != NULL && csCmdNPCAction->action == 3) {
Animation_Change(&this->skelAnime, animation, 1.0f, 0.0f, Animation_GetLastFrame(animation), ANIMMODE_ONCE,
@@ -411,7 +411,7 @@ void EnNb_SetupRaisedArmTransition(EnNb* this, s32 animFinished) {
void EnNb_SetupMedallion(EnNb* this, GlobalContext* globalCtx) {
CsCmdActorAction* csCmdNPCAction;
- if (globalCtx->csCtx.state != 0) {
+ if (globalCtx->csCtx.state != CS_STATE_IDLE) {
csCmdNPCAction = globalCtx->csCtx.npcActions[6];
if (csCmdNPCAction != NULL && csCmdNPCAction->action == 2) {
this->action = NB_GIVE_MEDALLION;
diff --git a/src/overlays/actors/ovl_En_Nb/z_en_nb_cutscene_data.c b/src/overlays/actors/ovl_En_Nb/z_en_nb_cutscene_data.c
index a3dfd5270..b102be7f6 100644
--- a/src/overlays/actors/ovl_En_Nb/z_en_nb_cutscene_data.c
+++ b/src/overlays/actors/ovl_En_Nb/z_en_nb_cutscene_data.c
@@ -10,7 +10,7 @@ static CutsceneData D_80AB431C[] = {
CS_NPC_ACTION(0x0001, 0, 501, 0x0000, 0x0000, 0x0000, 0, 216, 0, 0, 216, 0, 0.0f, 0.0f, 0.0f),
CS_NPC_ACTION(0x0002, 501, 502, 0x0000, 0x0000, 0x0000, 0, 216, 0, 0, 216, 0, 0.0f, 0.0f, 0.0f),
CS_NPC_ACTION(0x0004, 502, 573, 0x0000, 0x0000, 0x0000, 0, 216, 0, 0, 216, 0, 0.0f, 0.0f, 0.0f),
- CS_NPC_ACTION(0x0002, 573, 621, 0x0000, 0x0000, 0x0000, 0, 216, 0, 0, 82, 0, 0.0f, -2.7916667461395264f, 0.0f),
+ CS_NPC_ACTION(0x0002, 573, 621, 0x0000, 0x0000, 0x0000, 0, 216, 0, 0, 82, 0, 0.0f, -2.7916667f, 0.0f),
CS_NPC_ACTION(0x0003, 621, 3011, 0x0000, 0x0000, 0x0000, 0, 82, 0, 0, 82, 0, 0.0f, 0.0f, 0.0f),
CS_PLAYER_ACTION_LIST(3),
CS_PLAYER_ACTION(0x000D, 0, 240, 0x0000, 0x1555, 0x0000, 0, 6, 0, 0, 6, 0, 0.0f, 0.0f, 1.401298464324817e-45f),
@@ -48,45 +48,45 @@ static CutsceneData D_80AB431C[] = {
CS_FADE_BGM_LIST(1),
CS_FADE_BGM(0x0004, 479, 529, 0x0000, 0x00000000, 0x00000000, 0xFFFFFFC7, 0x0000005C, 0x00000000, 0xFFFFFFC7, 0x0000005C),
CS_CAM_POS_LIST(0, 366),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.80000305175781f, -269, 89, -454, 0x00C6),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.80000305175781f, -269, 89, -454, 0x00C8),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.80000305175781f, -269, 89, -454, 0x00D7),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.80000305175781f, -223, 75, -377, 0x00E8),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.80000305175781f, -92, 31, -157, 0x00EA),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.80000305175781f, 13, 15, 19, 0x013D),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.80000305175781f, 49, 28, 77, 0x013F),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.80000305175781f, 74, 20, 122, 0x014E),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 50.5999641418457f, 74, 20, 122, 0x015F),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.39994430541992f, 74, 20, 122, 0x0161),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.39994430541992f, 74, 20, 122, 0x300A),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.39994430541992f, 74, 20, 122, 0x656F),
- CS_CAM_POS(CS_CMD_STOP, 0x00, 0, 45.39994430541992f, 74, 20, 122, 0x676F),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.800003f, -269, 89, -454, 0x00C6),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.800003f, -269, 89, -454, 0x00C8),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.800003f, -269, 89, -454, 0x00D7),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.800003f, -223, 75, -377, 0x00E8),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.800003f, -92, 31, -157, 0x00EA),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.800003f, 13, 15, 19, 0x013D),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.800003f, 49, 28, 77, 0x013F),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.800003f, 74, 20, 122, 0x014E),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 50.599964f, 74, 20, 122, 0x015F),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.399944f, 74, 20, 122, 0x0161),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.399944f, 74, 20, 122, 0x300A),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.399944f, 74, 20, 122, 0x656F),
+ CS_CAM_POS(CS_CMD_STOP, 0x00, 0, 45.399944f, 74, 20, 122, 0x676F),
CS_CAM_POS_LIST(263, 2484),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 62.00456619262695f, 134, 19, 198, 0x00C6),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 62.00456619262695f, 134, 19, 198, 0x00C8),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 62.00456619262695f, 134, 43, 198, 0x00D7),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 62.00456619262695f, 133, 60, 197, 0x00E8),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 62.00456619262695f, 133, 60, 197, 0x00EA),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 62.00456619262695f, 133, 60, 197, 0x013D),
- CS_CAM_POS(CS_CMD_STOP, 0x00, 0, 62.00456619262695f, 133, 60, 197, 0x013F),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 62.004566f, 134, 19, 198, 0x00C6),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 62.004566f, 134, 19, 198, 0x00C8),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 62.004566f, 134, 43, 198, 0x00D7),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 62.004566f, 133, 60, 197, 0x00E8),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 62.004566f, 133, 60, 197, 0x00EA),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 62.004566f, 133, 60, 197, 0x013D),
+ CS_CAM_POS(CS_CMD_STOP, 0x00, 0, 62.004566f, 133, 60, 197, 0x013F),
CS_CAM_POS_LIST(363, 1595),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 40.399925231933594f, 116, 21, 45, 0x00C6),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 40.399925231933594f, 116, 21, 45, 0x00C8),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 40.399925231933594f, 116, 21, 45, 0x00D7),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 40.399925231933594f, 117, 24, 69, 0x00E8),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 40.399925231933594f, 105, 46, 117, 0x00EA),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 40.399925231933594f, 105, 46, 117, 0x013D),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 40.399925231933594f, 105, 46, 117, 0x013F),
- CS_CAM_POS(CS_CMD_STOP, 0x00, 0, 40.399925231933594f, 105, 46, 117, 0x002E),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 40.399925f, 116, 21, 45, 0x00C6),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 40.399925f, 116, 21, 45, 0x00C8),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 40.399925f, 116, 21, 45, 0x00D7),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 40.399925f, 117, 24, 69, 0x00E8),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 40.399925f, 105, 46, 117, 0x00EA),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 40.399925f, 105, 46, 117, 0x013D),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 40.399925f, 105, 46, 117, 0x013F),
+ CS_CAM_POS(CS_CMD_STOP, 0x00, 0, 40.399925f, 105, 46, 117, 0x002E),
CS_CAM_POS_LIST(433, 1594),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.599945068359375f, 139, 33, -108, 0x00C6),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.599945068359375f, 139, 33, -108, 0x00C8),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.599945068359375f, 140, 81, -109, 0x00D7),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.599945068359375f, 140, 252, -109, 0x00E8),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.60000228881836f, 140, 252, -109, 0x00EA),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.60000228881836f, 140, 252, -109, 0x013D),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.60000228881836f, 140, 252, -109, 0x013F),
- CS_CAM_POS(CS_CMD_STOP, 0x00, 0, 60.60000228881836f, 140, 252, -109, 0x002E),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.599945f, 139, 33, -108, 0x00C6),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.599945f, 139, 33, -108, 0x00C8),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.599945f, 140, 81, -109, 0x00D7),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.599945f, 140, 252, -109, 0x00E8),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.600002f, 140, 252, -109, 0x00EA),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.600002f, 140, 252, -109, 0x013D),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.600002f, 140, 252, -109, 0x013F),
+ CS_CAM_POS(CS_CMD_STOP, 0x00, 0, 60.600002f, 140, 252, -109, 0x002E),
CS_CAM_POS_LIST(498, 840),
CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.0f, 13, 854, 2, 0x00C6),
CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.0f, 9, 853, 5, 0x00C8),
@@ -98,73 +98,73 @@ static CutsceneData D_80AB431C[] = {
CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.0f, 9, 852, 5, 0x002E),
CS_CAM_POS(CS_CMD_STOP, 0x00, 0, 60.0f, -3, 851, 5, 0x0063),
CS_CAM_POS_PLAYER_LIST(574, 1755),
- CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 68.59994506835938f, 0, 33, -27, 0x00C6),
- CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 68.59994506835938f, 0, 33, -27, 0x00C8),
- CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 68.59994506835938f, 0, 68, -26, 0x00D7),
- CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 68.59994506835938f, 0, 103, -26, 0x00E8),
- CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 68.59994506835938f, 0, 103, -26, 0x00EA),
- CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 68.59994506835938f, 0, 103, -26, 0x013D),
- CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 68.59994506835938f, 0, 103, -26, 0x013F),
- CS_CAM_POS_PLAYER(CS_CMD_STOP, 0x00, 0, 68.59994506835938f, 0, 103, -26, 0x002E),
+ CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 68.599945f, 0, 33, -27, 0x00C6),
+ CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 68.599945f, 0, 33, -27, 0x00C8),
+ CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 68.599945f, 0, 68, -26, 0x00D7),
+ CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 68.599945f, 0, 103, -26, 0x00E8),
+ CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 68.599945f, 0, 103, -26, 0x00EA),
+ CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 68.599945f, 0, 103, -26, 0x013D),
+ CS_CAM_POS_PLAYER(CS_CMD_CONTINUE, 0x00, 0, 68.599945f, 0, 103, -26, 0x013F),
+ CS_CAM_POS_PLAYER(CS_CMD_STOP, 0x00, 0, 68.599945f, 0, 103, -26, 0x002E),
CS_CAM_FOCUS_POINT_LIST(0, 395),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.80000305175781f, -141, 51, -239, 0x00C6),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.80000305175781f, -141, 51, -239, 0x00C8),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.80000305175781f, -141, 52, -239, 0x00D7),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.80000305175781f, -96, 32, -164, 0x00E8),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.80000305175781f, 34, 19, 56, 0x00EA),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.80000305175781f, 138, 2, 230, 0x013D),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.80000305175781f, 165, 22, 286, 0x013F),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 35, 55.799983978271484f, 181, 116, 315, 0x014E),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 50.5999641418457f, 175, 134, 305, 0x015F),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 45.39994430541992f, 172, 142, 300, 0x0161),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 45.39994430541992f, 171, 142, 300, 0x300A),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 45.39994430541992f, 171, 141, 299, 0x656F),
- CS_CAM_FOCUS_POINT(CS_CMD_STOP, 0x00, 30, 45.39994430541992f, 171, 141, 299, 0x676F),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.800003f, -141, 51, -239, 0x00C6),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.800003f, -141, 51, -239, 0x00C8),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.800003f, -141, 52, -239, 0x00D7),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.800003f, -96, 32, -164, 0x00E8),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.800003f, 34, 19, 56, 0x00EA),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.800003f, 138, 2, 230, 0x013D),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.800003f, 165, 22, 286, 0x013F),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 35, 55.799984f, 181, 116, 315, 0x014E),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 50.599964f, 175, 134, 305, 0x015F),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 45.399944f, 172, 142, 300, 0x0161),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 45.399944f, 171, 142, 300, 0x300A),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 45.399944f, 171, 141, 299, 0x656F),
+ CS_CAM_FOCUS_POINT(CS_CMD_STOP, 0x00, 30, 45.399944f, 171, 141, 299, 0x676F),
CS_CAM_FOCUS_POINT_LIST(263, 2513),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 70, 62.00456619262695f, -67, 36, 17, 0x00C6),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 70, 62.00456619262695f, -67, 32, 17, 0x00C8),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 50, 62.00456619262695f, -66, 34, 18, 0x00D7),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 1000, 62.00456619262695f, -60, 24, 23, 0x00E8),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 1000, 62.00456619262695f, -60, 22, 23, 0x00EA),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 62.00456619262695f, -60, 19, 23, 0x013D),
- CS_CAM_FOCUS_POINT(CS_CMD_STOP, 0x00, 30, 62.00456619262695f, -60, 18, 23, 0x013F),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 70, 62.004566f, -67, 36, 17, 0x00C6),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 70, 62.004566f, -67, 32, 17, 0x00C8),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 50, 62.004566f, -66, 34, 18, 0x00D7),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 1000, 62.004566f, -60, 24, 23, 0x00E8),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 1000, 62.004566f, -60, 22, 23, 0x00EA),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 62.004566f, -60, 19, 23, 0x013D),
+ CS_CAM_FOCUS_POINT(CS_CMD_STOP, 0x00, 30, 62.004566f, -60, 18, 23, 0x013F),
CS_CAM_FOCUS_POINT_LIST(363, 1624),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 40.399925231933594f, 34, 58, 269, 0x00C6),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 40.399925231933594f, 34, 58, 269, 0x00C8),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 50, 40.399925231933594f, 34, 58, 269, 0x00D7),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 50, 40.399925231933594f, 42, 74, 293, 0x00E8),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 41, 40.399925231933594f, 22, 93, 336, 0x00EA),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 1000, 40.399925231933594f, 22, 93, 336, 0x013D),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 40.399925231933594f, 22, 93, 336, 0x013F),
- CS_CAM_FOCUS_POINT(CS_CMD_STOP, 0x00, 30, 40.399925231933594f, 22, 93, 336, 0x002E),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 40.399925f, 34, 58, 269, 0x00C6),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 40.399925f, 34, 58, 269, 0x00C8),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 50, 40.399925f, 34, 58, 269, 0x00D7),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 50, 40.399925f, 42, 74, 293, 0x00E8),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 41, 40.399925f, 22, 93, 336, 0x00EA),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 1000, 40.399925f, 22, 93, 336, 0x013D),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 40.399925f, 22, 93, 336, 0x013F),
+ CS_CAM_FOCUS_POINT(CS_CMD_STOP, 0x00, 30, 40.399925f, 22, 93, 336, 0x002E),
CS_CAM_FOCUS_POINT_LIST(433, 1623),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 45.599945068359375f, 4, 14, 108, 0x00C6),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 45.599945068359375f, 4, 14, 108, 0x00C8),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 20, 50.99996566772461f, 4, 76, 108, 0x00D7),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 20, 70.59991455078125f, 111, 501, -62, 0x00E8),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 70.59991455078125f, 111, 500, -62, 0x00EA),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 1000, 70.59991455078125f, 111, 500, -62, 0x013D),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 70.39991760253906f, 111, 500, -62, 0x013F),
- CS_CAM_FOCUS_POINT(CS_CMD_STOP, 0x00, 30, 70.39991760253906f, 111, 500, -62, 0x002E),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 45.599945f, 4, 14, 108, 0x00C6),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 45.599945f, 4, 14, 108, 0x00C8),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 20, 50.999966f, 4, 76, 108, 0x00D7),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 20, 70.599915f, 111, 501, -62, 0x00E8),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 70.599915f, 111, 500, -62, 0x00EA),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 1000, 70.599915f, 111, 500, -62, 0x013D),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 70.39992f, 111, 500, -62, 0x013F),
+ CS_CAM_FOCUS_POINT(CS_CMD_STOP, 0x00, 30, 70.39992f, 111, 500, -62, 0x002E),
CS_CAM_FOCUS_POINT_LIST(498, 889),
CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 50, 60.0f, 3, 6, -6, 0x00C6),
CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 40, 60.0f, 3, 6, -6, 0x00C8),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 50.99996566772461f, 3, 6, -6, 0x00D7),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 20, 20.599849700927734f, 3, 6, -6, 0x00E8),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 51, 10.799838066101074f, 3, 6, -6, 0x00EA),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 50, 10.3998384475708f, 3, 6, -6, 0x013D),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 50, 10.3998384475708f, 3, 6, -6, 0x013F),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 50, 10.199838638305664f, 3, 6, -6, 0x002E),
- CS_CAM_FOCUS_POINT(CS_CMD_STOP, 0x00, 50, 10.999837875366211f, 3, 6, -6, 0x0063),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 50.999966f, 3, 6, -6, 0x00D7),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 20, 20.59985f, 3, 6, -6, 0x00E8),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 51, 10.799838f, 3, 6, -6, 0x00EA),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 50, 10.399838f, 3, 6, -6, 0x013D),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 50, 10.399838f, 3, 6, -6, 0x013F),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 50, 10.199839f, 3, 6, -6, 0x002E),
+ CS_CAM_FOCUS_POINT(CS_CMD_STOP, 0x00, 50, 10.999838f, 3, 6, -6, 0x0063),
CS_CAM_FOCUS_POINT_PLAYER_LIST(574, 1784),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 68.59994506835938f, 0, 100, 5, 0x00C6),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 68.59994506835938f, 0, 101, 6, 0x00C8),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 68.59994506835938f, 1, 99, 41, 0x00D7),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 68.59994506835938f, 0, 42, 16, 0x00E8),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 68.59994506835938f, 0, 42, 16, 0x00EA),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 1000, 68.59994506835938f, 0, 42, 16, 0x013D),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 68.59994506835938f, 0, 42, 16, 0x013F),
- CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_STOP, 0x00, 30, 68.59994506835938f, 0, 42, 16, 0x002E),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 68.599945f, 0, 100, 5, 0x00C6),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 68.599945f, 0, 101, 6, 0x00C8),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 68.599945f, 1, 99, 41, 0x00D7),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 68.599945f, 0, 42, 16, 0x00E8),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 68.599945f, 0, 42, 16, 0x00EA),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 1000, 68.599945f, 0, 42, 16, 0x013D),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_CONTINUE, 0x00, 30, 68.599945f, 0, 42, 16, 0x013F),
+ CS_CAM_FOCUS_POINT_PLAYER(CS_CMD_STOP, 0x00, 30, 68.599945f, 0, 42, 16, 0x002E),
CS_END(),
};
// clang-format on
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 76432fb5a..2e5f793c1 100644
--- a/src/overlays/actors/ovl_En_Niw/z_en_niw.c
+++ b/src/overlays/actors/ovl_En_Niw/z_en_niw.c
@@ -764,7 +764,7 @@ void func_80AB6F04(EnNiw* this, GlobalContext* globalCtx) {
}
void func_80AB70A0(EnNiw* this, GlobalContext* globalCtx) {
- func_800800F8(globalCtx, 0x8F2, -0x63, &this->actor, 0);
+ OnePointCutscene_Init(globalCtx, 2290, -99, &this->actor, MAIN_CAM);
this->timer5 = 100;
this->unk_2A2 = 1;
this->actionFunc = func_80AB70F8;
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 5a8140274..0e2d0ca37 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
@@ -131,7 +131,7 @@ void func_80AB9210(EnNiwGirl* this, GlobalContext* globalCtx) {
}
// Change her angle so that she is always facing the cuckoo
- Math_SmoothStepToS(&this->actor.shape.rot.y, Math_FAtan2F(xDistBetween, zDistBetween) * 10430.378f, 3,
+ Math_SmoothStepToS(&this->actor.shape.rot.y, Math_FAtan2F(xDistBetween, zDistBetween) * (0x8000 / M_PI), 3,
this->unk_27C, 0);
Math_ApproachF(&this->unk_27C, 5000.0f, 30.0f, 150.0f);
this->actor.world.rot.y = this->actor.shape.rot.y;
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 0aaefe849..b1c425ac3 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
@@ -93,7 +93,7 @@ void EnOkarinaEffect_ManageStorm(EnOkarinaEffect* this, GlobalContext* globalCtx
if (this->timer == 0) {
globalCtx->envCtx.unk_F2[0] = 0;
- if (globalCtx->csCtx.state == 0) {
+ if (globalCtx->csCtx.state == CS_STATE_IDLE) {
func_80077684(globalCtx);
} else if (func_800FA0B4(0) == 1) {
func_800F6D58(0xF, 1, 0);
diff --git a/src/overlays/actors/ovl_En_Okarina_Tag/z_en_okarina_tag_cutscene_data.c b/src/overlays/actors/ovl_En_Okarina_Tag/z_en_okarina_tag_cutscene_data.c
index e4471236e..52e0098ed 100644
--- a/src/overlays/actors/ovl_En_Okarina_Tag/z_en_okarina_tag_cutscene_data.c
+++ b/src/overlays/actors/ovl_En_Okarina_Tag/z_en_okarina_tag_cutscene_data.c
@@ -39,10 +39,10 @@ CutsceneData D_80ABFB40[] = {
CS_MISC_LIST(1),
CS_MISC(0x000D, 510, 611, 0x0000, 0x00000000, 0xFFFFFFFF, 0x00000000, 0x00000000, 0xFFFFFFFF, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000),
CS_NPC_ACTION_LIST(48, 1),
- CS_NPC_ACTION(0x0003, 160, 289, 0x0000, 0x0000, 0x0000, 0, 20, 1400, 0, 60, 1400, 0.0f, 0.3100775182247162f, 0.0f),
+ CS_NPC_ACTION(0x0003, 160, 289, 0x0000, 0x0000, 0x0000, 0, 20, 1400, 0, 60, 1400, 0.0f, 0.31007752f, 0.0f),
CS_NPC_ACTION_LIST(48, 3),
CS_NPC_ACTION(0x0004, 340, 420, 0x0000, 0x0000, 0x0000, 0, 120, 1335, 0, 40, 1335, 0.0f, -1.0f, 0.0f),
- CS_NPC_ACTION(0x0004, 420, 465, 0x0000, 0x0000, 0x0000, 0, 40, 1335, 0, 16, 1335, 0.0f, -0.5333333611488342f, 0.0f),
+ CS_NPC_ACTION(0x0004, 420, 465, 0x0000, 0x0000, 0x0000, 0, 40, 1335, 0, 16, 1335, 0.0f, -0.53333336f, 0.0f),
CS_NPC_ACTION(0x0002, 465, 519, 0x0000, 0x0000, 0x0000, 0, 16, 1335, 0, 16, 1335, 0.0f, 0.0f, 0.0f),
CS_MISC_LIST(1),
CS_MISC(0x0003, 620, 621, 0x0000, 0x00000000, 0x00000001, 0x00000000, 0xFFFFFFFF, 0x00000001, 0x00000000, 0xFFFFFFFF, 0x00000000, 0x00000000, 0x00000000),
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 b841a94af..27ecc3071 100644
--- a/src/overlays/actors/ovl_En_Owl/z_en_owl.c
+++ b/src/overlays/actors/ovl_En_Owl/z_en_owl.c
@@ -281,7 +281,7 @@ s32 EnOwl_CheckInitTalk(EnOwl* this, GlobalContext* globalCtx, u16 textId, f32 t
this->actionFlags &= ~0x40;
}
}
- this->cameraIdx = func_800800F8(globalCtx, 0x21FC, timer, &this->actor, 0);
+ this->cameraIdx = OnePointCutscene_Init(globalCtx, 8700, timer, &this->actor, MAIN_CAM);
return true;
} else {
this->actor.textId = textId;
@@ -1412,7 +1412,7 @@ void func_80ACD2CC(EnOwl* this, GlobalContext* globalCtx) {
angle = (u16)angle;
if (this->actionFlags & 4) {
phi_f2 = globalCtx->csCtx.npcActions[7]->urot.x;
- phi_f2 *= 0.054931640625f;
+ phi_f2 *= 10.0f * (360.0f / 0x10000);
if (phi_f2 < 0.0f) {
phi_f2 += 360.0f;
}
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 7603bf80d..591962a26 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
@@ -219,7 +219,7 @@ s32 EnPoDesert_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** d
f32 mtxScale;
if (this->actionFunc == EnPoDesert_Disappear && limbIndex == 7) {
- mtxScale = this->actionTimer * 0.0625f;
+ mtxScale = this->actionTimer / 16.0f;
Matrix_Scale(mtxScale, mtxScale, mtxScale, MTXMODE_APPLY);
}
if ((this->actor.flags & 0x80) != 0x80) {
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 707c82073..5524ebe71 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
@@ -631,23 +631,20 @@ void EnPoField_SoulUpdateProperties(EnPoField* this, s32 arg1) {
this->lightColor.a = CLAMP(this->lightColor.a + arg1, 0, 255);
if (arg1 < 0) {
- multiplier = this->lightColor.a * 0.003921569f;
- this->actor.scale.z = 0.0056000003f * multiplier + 0.00140000007f;
- this->actor.scale.x = 0.0056000003f * multiplier + 0.00140000007f;
+ multiplier = this->lightColor.a * (1.0f / 255);
+ this->actor.scale.x = this->actor.scale.z = 0.0056000003f * multiplier + 0.0014000001f;
this->actor.scale.y = 0.007f - 0.007f * multiplier + 0.007f;
} else {
multiplier = 1.0f;
- this->actor.scale.z = this->lightColor.a * 2.7450982e-05f;
- this->actor.scale.y = this->lightColor.a * 2.7450982e-05f;
- this->actor.scale.x = this->lightColor.a * 2.7450982e-05f;
- this->actor.world.pos.y = this->actor.home.pos.y + (0.05882353f * this->lightColor.a);
+ this->actor.scale.x = this->actor.scale.y = this->actor.scale.z = this->lightColor.a * (0.007f / 255);
+ this->actor.world.pos.y = this->actor.home.pos.y + ((1.0f / 17.0f) * this->lightColor.a);
}
this->lightColor.r = info->lightColor.r * multiplier;
this->lightColor.g = info->lightColor.g * multiplier;
this->lightColor.b = info->lightColor.b * multiplier;
Lights_PointNoGlowSetInfo(&this->lightInfo, this->actor.world.pos.x, this->actor.world.pos.y,
this->actor.world.pos.z, info->lightColor.r, info->lightColor.g, info->lightColor.b,
- this->lightColor.a * 0.78431373f);
+ this->lightColor.a * (200.0f / 255));
}
void func_80AD587C(EnPoField* this, GlobalContext* globalCtx) {
@@ -691,7 +688,7 @@ void func_80AD58D4(EnPoField* this, GlobalContext* globalCtx) {
Lights_PointNoGlowSetInfo(&this->lightInfo, this->actor.world.pos.x, this->actor.world.pos.y,
this->actor.world.pos.z, this->lightInfo.params.point.color[0],
this->lightInfo.params.point.color[1], this->lightInfo.params.point.color[2],
- this->lightColor.a * 0.78431374f);
+ this->lightColor.a * (200.0f / 255));
}
void EnPoField_SoulDisappear(EnPoField* this, GlobalContext* globalCtx) {
@@ -799,7 +796,7 @@ void EnPoField_DrawFlame(EnPoField* this, GlobalContext* globalCtx) {
sp4C = this->flameScale * 85000.0f;
gDPSetPrimColor(POLY_XLU_DISP++, 0x80, 0x80, 255, 255, 0, sp4C);
Matrix_Translate(this->flamePosition.x, this->flamePosition.y, this->flamePosition.z, MTXMODE_NEW);
- Matrix_RotateY((s16)(Camera_GetCamDirYaw(ACTIVE_CAM) + 0x8000) * 0.0000958738f, MTXMODE_APPLY);
+ Matrix_RotateY((s16)(Camera_GetCamDirYaw(ACTIVE_CAM) + 0x8000) * (M_PI / 0x8000), MTXMODE_APPLY);
if (this->flameTimer >= 20) {
gDPSetEnvColor(POLY_XLU_DISP++, 255, 0, 0, 0);
Matrix_Scale(this->flameScale, this->flameScale, this->flameScale, MTXMODE_APPLY);
@@ -851,7 +848,7 @@ void func_80AD6330(EnPoField* this) {
if (this->actionFunc == EnPoField_Appear && this->skelAnime.curFrame < 12.0f) {
this->soulColor.r = this->soulColor.g = this->soulColor.b = (s16)(this->skelAnime.curFrame * 16.66f) + 55;
- this->soulColor.a = this->skelAnime.curFrame * 16.666666f;
+ this->soulColor.a = this->skelAnime.curFrame * (100.0f / 6.0f);
} else {
rand = Rand_ZeroOne();
this->soulColor.r = (s16)(rand * 30.0f) + 225;
@@ -901,7 +898,7 @@ s32 EnPoField_OverrideLimbDraw2(GlobalContext* globalCtx, s32 limbIndex, Gfx** d
}
}
if (this->actionFunc == EnPoField_Disappear && limbIndex == 7) {
- Matrix_Scale(this->actionTimer * 0.0625f, this->actionTimer * 0.0625f, this->actionTimer * 0.0625f, 1);
+ Matrix_Scale(this->actionTimer / 16.0f, this->actionTimer / 16.0f, this->actionTimer / 16.0f, 1);
}
return false;
}
@@ -928,7 +925,7 @@ void EnPoField_PostLimDraw2(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList
this->actor.world.pos.z = sLimb7Mtx.wz;
}
Lights_PointGlowSetInfo(&this->lightInfo, vec.x, vec.y, vec.z, this->soulColor.r, this->soulColor.g,
- this->soulColor.b, this->soulColor.a * 0.7843137383460999f);
+ this->soulColor.b, this->soulColor.a * (200.0f / 255));
}
}
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 adfab058c..bad2f482f 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
@@ -381,7 +381,7 @@ void func_80AD99D4(EnPoSisters* this, GlobalContext* globalCtx) {
this->actor.flags &= -2;
this->unk_199 = 0;
this->actionFunc = func_80ADAFC0;
- func_800800F8(globalCtx, 0xC76, 0x3E7, &this->actor, 0);
+ OnePointCutscene_Init(globalCtx, 3190, 999, &this->actor, MAIN_CAM);
}
void func_80AD9A54(EnPoSisters* this, GlobalContext* globalCtx) {
@@ -462,7 +462,7 @@ void func_80AD9DF0(EnPoSisters* this, GlobalContext* globalCtx) {
this->unk_198 = 1;
this->unk_199 &= ~0x80;
this->actionFunc = func_80ADB4B0;
- func_800800F8(globalCtx, 0xC6C, 0x9C, &this->actor, 0);
+ OnePointCutscene_Init(globalCtx, 3180, 156, &this->actor, MAIN_CAM);
}
void func_80AD9E60(EnPoSisters* this) {
@@ -1040,7 +1040,7 @@ void func_80ADBC88(EnPoSisters* this, GlobalContext* globalCtx) {
}
if (this->unk_19A == 30) {
if (this->unk_194 == 0) {
- func_800800F8(globalCtx, 0xC44, 0x3E7, NULL, 0);
+ OnePointCutscene_Init(globalCtx, 3140, 999, NULL, MAIN_CAM);
}
D_80ADD784 = 1;
}
diff --git a/src/overlays/actors/ovl_En_Poh/z_en_poh.c b/src/overlays/actors/ovl_En_Poh/z_en_poh.c
index aaf8a7fa6..9c6bf20db 100644
--- a/src/overlays/actors/ovl_En_Poh/z_en_poh.c
+++ b/src/overlays/actors/ovl_En_Poh/z_en_poh.c
@@ -749,23 +749,20 @@ void func_80ADFA90(EnPoh* this, s32 arg1) {
this->lightColor.a = CLAMP(this->lightColor.a + arg1, 0, 255);
if (arg1 < 0) {
- multiplier = this->lightColor.a * 0.003921569f;
- this->actor.scale.z = 0.0056000002f * multiplier + 0.00140000006f;
- this->actor.scale.x = 0.0056000002f * multiplier + 0.00140000006f;
+ multiplier = this->lightColor.a * (1.0f / 255);
+ this->actor.scale.x = this->actor.scale.z = 0.0056000002f * multiplier + 0.0014000001f;
this->actor.scale.y = (0.007f - 0.007f * multiplier) + 0.007f;
} else {
multiplier = 1.0f;
- this->actor.scale.z = this->lightColor.a * 2.7450982e-05f;
- this->actor.scale.y = this->lightColor.a * 2.7450982e-05f;
- this->actor.scale.x = this->lightColor.a * 2.7450982e-05f;
- this->actor.world.pos.y = this->actor.home.pos.y + 0.05882353f * this->lightColor.a;
+ this->actor.scale.x = this->actor.scale.y = this->actor.scale.z = this->lightColor.a * (0.007f / 0xFF);
+ this->actor.world.pos.y = this->actor.home.pos.y + (1.0f / 17.0f) * this->lightColor.a;
}
this->lightColor.r = this->info->lightColor.r * multiplier;
this->lightColor.g = this->info->lightColor.g * multiplier;
this->lightColor.b = this->info->lightColor.b * multiplier;
Lights_PointNoGlowSetInfo(&this->lightInfo, this->actor.world.pos.x, this->actor.world.pos.y,
this->actor.world.pos.z, this->info->lightColor.r, this->info->lightColor.g,
- this->info->lightColor.b, this->lightColor.a * 0.78431373f);
+ this->info->lightColor.b, this->lightColor.a * (200.0f / 255));
}
void func_80ADFE28(EnPoh* this, GlobalContext* globalCtx) {
@@ -811,7 +808,7 @@ void func_80ADFE80(EnPoh* this, GlobalContext* globalCtx) {
Actor_SetFocus(&this->actor, -10.0f);
Lights_PointNoGlowSetInfo(&this->lightInfo, this->actor.world.pos.x, this->actor.world.pos.y,
this->actor.world.pos.z, this->info->lightColor.r, this->info->lightColor.g,
- this->info->lightColor.b, this->lightColor.a * 0.78431373f);
+ this->info->lightColor.b, this->lightColor.a * (200.0f / 255));
}
void func_80AE009C(EnPoh* this, GlobalContext* globalCtx) {
@@ -989,7 +986,7 @@ void func_80AE089C(EnPoh* this) {
if ((this->actionFunc == func_80ADEF38 || this->actionFunc == EnPoh_ComposerAppear) &&
this->skelAnime.curFrame < 12.0f) {
this->envColor.r = this->envColor.g = this->envColor.b = (s16)(this->skelAnime.curFrame * 16.66f) + 55;
- this->envColor.a = this->skelAnime.curFrame * 16.666666f;
+ this->envColor.a = this->skelAnime.curFrame * (100.0f / 6.0f);
} else {
rand = Rand_ZeroOne();
this->envColor.r = (s16)(rand * 30.0f) + 225;
@@ -1080,7 +1077,7 @@ void EnPoh_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Ve
Lights_PointGlowSetInfo(&this->lightInfo, this->colliderSph.elements[0].dim.worldSphere.center.x,
this->colliderSph.elements[0].dim.worldSphere.center.y,
this->colliderSph.elements[0].dim.worldSphere.center.z, this->envColor.r,
- this->envColor.g, this->envColor.b, this->envColor.a * 0.78431374f);
+ this->envColor.g, this->envColor.b, this->envColor.a * (200.0f / 255));
}
}
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 4fb1c4b99..6c38ef97d 100644
--- a/src/overlays/actors/ovl_En_Rl/z_en_rl.c
+++ b/src/overlays/actors/ovl_En_Rl/z_en_rl.c
@@ -70,7 +70,7 @@ void func_80AE7358(EnRl* this) {
void func_80AE73D8(EnRl* this, GlobalContext* globalCtx) {
static s32 D_80AE81AC = 0;
- if (globalCtx->csCtx.state == 0) {
+ if (globalCtx->csCtx.state == CS_STATE_IDLE) {
if (D_80AE81AC) {
if (this->actor.params == 2) {
func_80AE7358(this);
@@ -93,7 +93,7 @@ s32 func_80AE7494(EnRl* this) {
s32 func_80AE74B4(EnRl* this, GlobalContext* globalCtx, u16 arg2, s32 arg3) {
CsCmdActorAction* csCmdActorAction;
- if (globalCtx->csCtx.state != 0) {
+ if (globalCtx->csCtx.state != CS_STATE_IDLE) {
csCmdActorAction = globalCtx->csCtx.npcActions[arg3];
if (csCmdActorAction != NULL && csCmdActorAction->action == arg2) {
return 1;
@@ -105,7 +105,7 @@ s32 func_80AE74B4(EnRl* this, GlobalContext* globalCtx, u16 arg2, s32 arg3) {
s32 func_80AE74FC(EnRl* this, GlobalContext* globalCtx, u16 arg2, s32 arg3) {
CsCmdActorAction* csCmdActorAction;
- if (globalCtx->csCtx.state != 0) {
+ if (globalCtx->csCtx.state != CS_STATE_IDLE) {
csCmdActorAction = globalCtx->csCtx.npcActions[arg3];
if (csCmdActorAction != NULL && csCmdActorAction->action != arg2) {
return 1;
@@ -124,7 +124,7 @@ void func_80AE7590(EnRl* this, GlobalContext* globalCtx) {
Vec3f pos;
s16 sceneNum = globalCtx->sceneNum;
- if (gSaveContext.sceneSetupIndex == 4 && sceneNum == SCENE_KENJYANOMA && globalCtx->csCtx.state != 0 &&
+ if (gSaveContext.sceneSetupIndex == 4 && sceneNum == SCENE_KENJYANOMA && globalCtx->csCtx.state != CS_STATE_IDLE &&
globalCtx->csCtx.npcActions[6] != NULL && globalCtx->csCtx.npcActions[6]->action == 2 &&
!this->lightMedallionGiven) {
player = PLAYER;
@@ -148,7 +148,7 @@ void func_80AE7668(EnRl* this, GlobalContext* globalCtx) {
void func_80AE7698(EnRl* this, GlobalContext* globalCtx) {
CsCmdActorAction* csCmdActorAction;
- if (globalCtx->csCtx.state != 0) {
+ if (globalCtx->csCtx.state != CS_STATE_IDLE) {
csCmdActorAction = globalCtx->csCtx.npcActions[0];
if (csCmdActorAction != NULL && csCmdActorAction->action == 3) {
Animation_Change(&this->skelAnime, &D_0600040C, 1.0f, 0.0f, Animation_GetLastFrame(&D_0600040C),
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 530abbc9f..225bf09e6 100644
--- a/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c
+++ b/src/overlays/actors/ovl_En_Ru1/z_en_ru1.c
@@ -262,7 +262,7 @@ void func_80AEAECC(EnRu1* this, GlobalContext* globalCtx) {
}
s32 func_80AEAF38(GlobalContext* globalCtx) {
- if (globalCtx->csCtx.state == 0) {
+ if (globalCtx->csCtx.state == CS_STATE_IDLE) {
return 1;
}
return 0;
@@ -811,7 +811,7 @@ void func_80AEC40C(EnRu1* this) {
f32 unk_26C = this->unk_26C;
if (unk_26C < 8.0f) {
- this->actor.speedXZ = (((kREG(3) * 0.01f) + 2.7f) * 0.125f) * unk_26C;
+ this->actor.speedXZ = (((kREG(3) * 0.01f) + 2.7f) / 8.0f) * unk_26C;
} else {
this->actor.speedXZ = (kREG(3) * 0.01f) + 2.7f;
}
@@ -830,8 +830,8 @@ void func_80AEC4F4(EnRu1* this) {
if (this->unk_26C < 8.0f) {
*unk_26C += 1.0f;
- *speedXZ *= (8.0f - *unk_26C) * 0.125f;
- this->actor.velocity.y = -*unk_26C * (((kREG(4) * 0.01f) + 13.0f) * 0.125f);
+ *speedXZ *= (8.0f - *unk_26C) / 8.0f;
+ this->actor.velocity.y = -*unk_26C * (((kREG(4) * 0.01f) + 13.0f) / 8.0f);
} else {
*speedXZ = 0.0f;
this->actor.velocity.y = -((kREG(4) * 0.01f) + 13.0f);
@@ -1000,7 +1000,7 @@ void func_80AECC1C(EnRu1* this, GlobalContext* globalCtx) {
}
void func_80AECC84(EnRu1* this, GlobalContext* globalCtx) {
- if (globalCtx->csCtx.state == 0) {
+ if (globalCtx->csCtx.state == CS_STATE_IDLE) {
Actor_Kill(&this->actor);
}
}
@@ -1078,7 +1078,7 @@ s32 func_80AECF6C(EnRu1* this, GlobalContext* globalCtx) {
shapeRotY = &player->actor.shape.rot.y;
temp1 = this->actor.world.pos.x - player->actor.world.pos.x;
temp2 = this->actor.world.pos.z - player->actor.world.pos.z;
- temp_f16 = Math_FAtan2F(temp1, temp2) * 10430.3779296875f;
+ temp_f16 = Math_FAtan2F(temp1, temp2) * (0x8000 / M_PI);
if (*shapeRotY != temp_f16) {
Math_SmoothStepToS(shapeRotY, temp_f16, 0x14, 0x1838, 0x64);
player->actor.world.rot.y = *shapeRotY;
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 d4b7f5e45..1a1f3e44d 100644
--- a/src/overlays/actors/ovl_En_Ru2/z_en_ru2.c
+++ b/src/overlays/actors/ovl_En_Ru2/z_en_ru2.c
@@ -157,7 +157,7 @@ void func_80AF26AC(EnRu2* this) {
void func_80AF26D0(EnRu2* this, GlobalContext* globalCtx) {
s32 one; // Needed to match
- if (globalCtx->csCtx.state == 0) {
+ if (globalCtx->csCtx.state == CS_STATE_IDLE) {
if (D_80AF4118 != 0) {
if (this->actor.params == 2) {
func_80AF26AC(this);
@@ -182,7 +182,7 @@ s32 EnRu2_FrameUpdateMatrix(EnRu2* this) {
}
CsCmdActorAction* func_80AF27AC(GlobalContext* globalCtx, s32 npcActionIdx) {
- if (globalCtx->csCtx.state != 0) {
+ if (globalCtx->csCtx.state != CS_STATE_IDLE) {
return globalCtx->csCtx.npcActions[npcActionIdx];
}
return NULL;
@@ -241,7 +241,7 @@ void func_80AF28E8(EnRu2* this, AnimationHeader* animation, u8 arg2, f32 transit
}
void func_80AF2978(EnRu2* this, GlobalContext* globalCtx) {
- this->actor.shape.yOffset += 83.333336f;
+ this->actor.shape.yOffset += 250.0f / 3.0f;
}
void func_80AF2994(EnRu2* this, GlobalContext* globalCtx) {
@@ -289,7 +289,7 @@ void func_80AF2B44(EnRu2* this, GlobalContext* globalCtx) {
CutsceneContext* csCtx = &globalCtx->csCtx;
CsCmdActorAction* csCmdNPCAction;
- if (csCtx->state != 0) {
+ if (csCtx->state != CS_STATE_IDLE) {
csCmdNPCAction = csCtx->npcActions[3];
if ((csCmdNPCAction != NULL) && (csCmdNPCAction->action == 2)) {
this->action = 2;
@@ -310,7 +310,7 @@ void func_80AF2BC0(EnRu2* this, GlobalContext* globalCtx) {
AnimationHeader* animation = &D_0600D3DC;
CsCmdActorAction* csCmdNPCAction;
- if (globalCtx->csCtx.state != 0) {
+ if (globalCtx->csCtx.state != CS_STATE_IDLE) {
csCmdNPCAction = globalCtx->csCtx.npcActions[3];
if ((csCmdNPCAction != NULL) && (csCmdNPCAction->action == 3)) {
Animation_Change(&this->skelAnime, animation, 1.0f, 0.0f, Animation_GetLastFrame(animation), ANIMMODE_ONCE,
@@ -329,7 +329,7 @@ void func_80AF2C54(EnRu2* this, UNK_TYPE arg1) {
void func_80AF2C68(EnRu2* this, GlobalContext* globalCtx) {
CsCmdActorAction* csCmdNPCAction;
- if (globalCtx->csCtx.state != 0) {
+ if (globalCtx->csCtx.state != CS_STATE_IDLE) {
csCmdNPCAction = globalCtx->csCtx.npcActions[6];
if ((csCmdNPCAction != NULL) && (csCmdNPCAction->action == 2)) {
this->action = 6;
@@ -641,13 +641,13 @@ s32 func_80AF383C(EnRu2* this, GlobalContext* globalCtx) {
void func_80AF3878(EnRu2* this, GlobalContext* globalCtx) {
if (func_80AF383C(this, globalCtx) && !Gameplay_InCsMode(globalCtx)) {
this->action = 16;
- func_800800F8(globalCtx, 0xC3A, -0x63, &this->actor, 0);
+ OnePointCutscene_Init(globalCtx, 3130, -99, &this->actor, MAIN_CAM);
}
}
void func_80AF38D0(EnRu2* this, GlobalContext* globalCtx) {
this->action = 16;
- func_800800F8(globalCtx, 0xC3A, -0x63, &this->actor, 0);
+ OnePointCutscene_Init(globalCtx, 3130, -99, &this->actor, MAIN_CAM);
}
void func_80AF390C(EnRu2* this, GlobalContext* globalCtx) {
diff --git a/src/overlays/actors/ovl_En_Sa/z_en_sa.c b/src/overlays/actors/ovl_En_Sa/z_en_sa.c
index 930a9c9b1..d21aaf202 100644
--- a/src/overlays/actors/ovl_En_Sa/z_en_sa.c
+++ b/src/overlays/actors/ovl_En_Sa/z_en_sa.c
@@ -582,7 +582,7 @@ void func_80AF68E4(EnSa* this, GlobalContext* globalCtx) {
f32 temp_f0;
f32 gravity;
- if (globalCtx->csCtx.state == 0) {
+ if (globalCtx->csCtx.state == CS_STATE_IDLE) {
this->actionFunc = func_80AF6B20;
return;
}
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 98581cb9e..6bdda7248 100644
--- a/src/overlays/actors/ovl_En_Siofuki/z_en_siofuki.c
+++ b/src/overlays/actors/ovl_En_Siofuki/z_en_siofuki.c
@@ -257,7 +257,7 @@ void func_80AFC478(EnSiofuki* this, GlobalContext* globalCtx) {
if (Flags_GetSwitch(globalCtx, ((u16)this->dyna.actor.params >> 6) & 0x3F)) {
this->timer = 20;
this->actionFunc = func_80AFC3C8;
- func_800800F8(globalCtx, 0x1392, 0x28, &this->dyna.actor, 0);
+ OnePointCutscene_Init(globalCtx, 5010, 40, &this->dyna.actor, MAIN_CAM);
}
if (Flags_GetTreasure(globalCtx, (u16)this->dyna.actor.params & 0x3F)) {
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 5ef0b3508..8fc7264db 100644
--- a/src/overlays/actors/ovl_En_St/z_en_st.c
+++ b/src/overlays/actors/ovl_En_St/z_en_st.c
@@ -224,8 +224,8 @@ s32 EnSt_CheckCeilingPos(EnSt* this, GlobalContext* globalCtx) {
checkPos.x = this->actor.world.pos.x;
checkPos.y = this->actor.world.pos.y + 1000.0f;
checkPos.z = this->actor.world.pos.z;
- if (!BgCheck_EntityLineTest1(&globalCtx->colCtx, &this->actor.world.pos, &checkPos, &this->ceilingPos, &poly, 0, 0,
- 1, 1, &bgId)) {
+ if (!BgCheck_EntityLineTest1(&globalCtx->colCtx, &this->actor.world.pos, &checkPos, &this->ceilingPos, &poly, false,
+ false, true, true, &bgId)) {
return false;
}
this->unusedPos = this->actor.world.pos;
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 5c12e729e..1b61d7d94 100644
--- a/src/overlays/actors/ovl_En_Stream/z_en_stream.c
+++ b/src/overlays/actors/ovl_En_Stream/z_en_stream.c
@@ -94,7 +94,7 @@ void EnStream_SuckPlayer(EnStream* this, GlobalContext* globalCtx) {
if (func_80B0B81C(&this->actor.world.pos, &player->actor.world.pos, &posDifference, this->actor.scale.y) != 0) {
xzDist = sqrtf(SQ(posDifference.x) + SQ(posDifference.z));
yDistWithOffset = player->actor.world.pos.y - (this->actor.world.pos.y - 90.0f);
- player->windDirection = Math_FAtan2F(-posDifference.x, -posDifference.z) * 10430.378f;
+ player->windDirection = Math_FAtan2F(-posDifference.x, -posDifference.z) * (0x8000 / M_PI);
if (xzDist > 3.0f) {
Math_SmoothStepToF(&player->windSpeed, 3.0f, 0.5f, xzDist, 0.0f);
} else {
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 342a1574d..ba3acabca 100644
--- a/src/overlays/actors/ovl_En_Sw/z_en_sw.c
+++ b/src/overlays/actors/ovl_En_Sw/z_en_sw.c
@@ -125,7 +125,7 @@ CollisionPoly* func_80B0C020(GlobalContext* globalCtx, Vec3f* arg1, Vec3f* arg2,
CollisionPoly* sp3C;
s32 pad;
- if (!BgCheck_EntityLineTest1(&globalCtx->colCtx, arg1, arg2, arg3, &sp3C, 1, 1, 1, 0, arg4)) {
+ if (!BgCheck_EntityLineTest1(&globalCtx->colCtx, arg1, arg2, arg3, &sp3C, true, true, true, false, arg4)) {
return NULL;
}
@@ -711,7 +711,7 @@ s32 func_80B0DEA8(EnSw* this, GlobalContext* globalCtx, s32 arg2) {
} else if (Math_Vec3f_DistXYZ(&this->actor.world.pos, &player->actor.world.pos) >= 130.0f) {
return false;
} else if (!BgCheck_EntityLineTest1(&globalCtx->colCtx, &this->actor.world.pos, &player->actor.world.pos, &sp48,
- &sp58, 1, 0, 0, 1, &sp54)) {
+ &sp58, true, false, false, true, &sp54)) {
return true;
} else {
return false;
@@ -723,36 +723,36 @@ s32 func_80B0DFFC(EnSw* this, GlobalContext* globalCtx) {
CollisionPoly* sp60;
s32 sp5C;
Vec3f sp50;
- s32 sp4C = 1;
+ s32 sp4C = true;
- if (this->collider.base.ocFlags1 & 2) {
- this->collider.base.acFlags &= ~2;
- sp4C = 0;
+ if (this->collider.base.ocFlags1 & OC1_HIT) {
+ this->collider.base.acFlags &= ~AC_HIT;
+ sp4C = false;
} else if (((globalCtx->state.frames % 4) == 0) &&
- (BgCheck_EntityLineTest1(&globalCtx->colCtx, &this->actor.world.pos, &this->unk_454, &sp50, &sp60, 1, 0,
- 0, 1, &sp5C) == 0)) {
- sp4C = 0;
+ !BgCheck_EntityLineTest1(&globalCtx->colCtx, &this->actor.world.pos, &this->unk_454, &sp50, &sp60, true,
+ false, false, true, &sp5C)) {
+ sp4C = false;
} else if (((globalCtx->state.frames % 4) == 1) &&
- (BgCheck_EntityLineTest1(&globalCtx->colCtx, &this->actor.world.pos, &this->unk_460, &sp50, &sp60, 1, 0,
- 0, 1, &sp5C) != 0)) {
- sp4C = 0;
+ BgCheck_EntityLineTest1(&globalCtx->colCtx, &this->actor.world.pos, &this->unk_460, &sp50, &sp60, true,
+ false, false, true, &sp5C)) {
+ sp4C = false;
} else if (((globalCtx->state.frames % 4) == 2) &&
- (BgCheck_EntityLineTest1(&globalCtx->colCtx, &this->actor.world.pos, &this->unk_46C, &sp50, &sp60, 1, 0,
- 0, 1, &sp5C) == 0)) {
+ !BgCheck_EntityLineTest1(&globalCtx->colCtx, &this->actor.world.pos, &this->unk_46C, &sp50, &sp60, true,
+ false, false, true, &sp5C)) {
if (0) {}
- sp4C = 0;
+ sp4C = false;
} else if (((globalCtx->state.frames % 4) == 3) &&
- (BgCheck_EntityLineTest1(&globalCtx->colCtx, &this->actor.world.pos, &this->unk_478, &sp50, &sp60, 1, 0,
- 0, 1, &sp5C) != 0)) {
- sp4C = 0;
+ BgCheck_EntityLineTest1(&globalCtx->colCtx, &this->actor.world.pos, &this->unk_478, &sp50, &sp60, true,
+ false, false, true, &sp5C)) {
+ sp4C = false;
}
- if (BgCheck_EntityLineTest1(&globalCtx->colCtx, &this->actor.world.pos, &this->unk_484, &sp50, &this->unk_430, 1, 0,
- 0, 1, &sp5C) != 0) {
+ if (BgCheck_EntityLineTest1(&globalCtx->colCtx, &this->actor.world.pos, &this->unk_484, &sp50, &this->unk_430, true,
+ false, false, true, &sp5C)) {
this->actor.wallYaw = Math_FAtan2F(this->unk_430->normal.x, this->unk_430->normal.z) * (0x8000 / M_PI);
this->actor.world.pos = sp50;
- this->actor.world.pos.x += (6.0f * Math_SinS(this->actor.world.rot.y));
- this->actor.world.pos.z += (6.0f * Math_CosS(this->actor.world.rot.y));
+ this->actor.world.pos.x += 6.0f * Math_SinS(this->actor.world.rot.y);
+ this->actor.world.pos.z += 6.0f * Math_CosS(this->actor.world.rot.y);
this->unk_434 = sp50;
this->unk_434.x += Math_SinS(this->actor.world.rot.y);
this->unk_434.z += Math_CosS(this->actor.world.rot.y);
@@ -855,7 +855,7 @@ void func_80B0E728(EnSw* this, GlobalContext* globalCtx) {
this->actionFunc = func_80B0E5E0;
}
} else {
- if (func_80B0DFFC(this, globalCtx) == 0) {
+ if (!func_80B0DFFC(this, globalCtx)) {
this->unk_442 = Rand_S16Offset(20, 10);
this->unk_444 = func_80B0DE34(this, &this->actor.home.pos);
this->unk_448 = this->actor.home.pos;
@@ -868,8 +868,7 @@ void func_80B0E728(EnSw* this, GlobalContext* globalCtx) {
this->unk_440 = 4;
}
- if (!(13.0f < Math_Vec3f_DistXYZ(&this->actor.world.pos, &this->unk_448)) ||
- (func_8002DDF4(globalCtx) != 0)) {
+ if (!(Math_Vec3f_DistXYZ(&this->actor.world.pos, &this->unk_448) > 13.0f) || func_8002DDF4(globalCtx)) {
this->actionFunc = func_80B0E90C;
}
}
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 ebb2ec487..ca083bb5c 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
@@ -172,8 +172,8 @@ void EnSyatekiMan_StopTalk(EnSyatekiMan* this, GlobalContext* globalCtx) {
}
if ((this->numTextBox == func_8010BDBC(&globalCtx->msgCtx)) && func_80106BC8(globalCtx)) {
if (this->cameraHold) {
- func_800803F0(globalCtx, this->onePointCam);
- this->onePointCam = -1;
+ OnePointCutscene_EndCutscene(globalCtx, this->csCam);
+ this->csCam = SUBCAM_NONE;
this->cameraHold = false;
}
func_80106CCC(globalCtx);
@@ -190,8 +190,8 @@ void EnSyatekiMan_StartGame(EnSyatekiMan* this, GlobalContext* globalCtx) {
}
if ((this->numTextBox == func_8010BDBC(&globalCtx->msgCtx)) && func_80106BC8(globalCtx)) {
if (this->cameraHold) {
- func_800803F0(globalCtx, this->onePointCam);
- this->onePointCam = -1;
+ OnePointCutscene_EndCutscene(globalCtx, this->csCam);
+ this->csCam = SUBCAM_NONE;
this->cameraHold = false;
}
func_80106CCC(globalCtx);
@@ -210,7 +210,7 @@ void EnSyatekiMan_WaitForGame(EnSyatekiMan* this, GlobalContext* globalCtx) {
if (1) {}
gallery = ((EnSyatekiItm*)this->actor.parent);
if ((gallery->actor.update != NULL) && (gallery->signal == ENSYATEKI_END)) {
- this->onePointCam = func_800800F8(globalCtx, 0x1F42, -0x63, &this->actor, 0);
+ this->csCam = OnePointCutscene_Init(globalCtx, 8002, -99, &this->actor, MAIN_CAM);
switch (gallery->hitCount) {
case 10:
this->gameResult = SYATEKI_RESULT_WINNER;
@@ -242,8 +242,8 @@ void EnSyatekiMan_EndGame(EnSyatekiMan* this, GlobalContext* globalCtx) {
SkelAnime_Update(&this->skelAnime);
if ((this->numTextBox == func_8010BDBC(&globalCtx->msgCtx)) && func_80106BC8(globalCtx)) {
if (this->gameResult != SYATEKI_RESULT_FAILURE) {
- func_800803F0(globalCtx, this->onePointCam);
- this->onePointCam = -1;
+ OnePointCutscene_EndCutscene(globalCtx, this->csCam);
+ this->csCam = SUBCAM_NONE;
}
func_80106CCC(globalCtx);
gallery = ((EnSyatekiItm*)this->actor.parent);
diff --git a/src/overlays/actors/ovl_En_Syateki_Man/z_en_syateki_man.h b/src/overlays/actors/ovl_En_Syateki_Man/z_en_syateki_man.h
index 79f57e628..5d7ee45d3 100644
--- a/src/overlays/actors/ovl_En_Syateki_Man/z_en_syateki_man.h
+++ b/src/overlays/actors/ovl_En_Syateki_Man/z_en_syateki_man.h
@@ -27,7 +27,7 @@ typedef struct EnSyatekiMan {
/* 0x021C */ u8 cameraHold;
/* 0x0220 */ Actor* tempGallery;
/* 0x0224 */ EnSyatekiManOtherFunc blinkFunc; // Seems to be part of a blink system with unk_20C and unk_20E, but it's unused.
- /* 0x0228 */ s16 onePointCam;
+ /* 0x0228 */ s16 csCam;
} EnSyatekiMan; // size = 0x022C
extern const ActorInit En_Syateki_Man_InitVars;
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 28e09b4e6..5daf1a4bd 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
@@ -334,7 +334,8 @@ void func_80B11E78(EnSyatekiNiw* this, GlobalContext* globalCtx) {
this->unk_294 = 7;
}
- Math_SmoothStepToS(&this->actor.world.rot.y, Math_FAtan2F(tmpf1, tmpf2) * 10430.378f, 3, this->unk_2C8.z, 0);
+ Math_SmoothStepToS(&this->actor.world.rot.y, Math_FAtan2F(tmpf1, tmpf2) * (0x8000 / M_PI), 3, this->unk_2C8.z,
+ 0);
Math_ApproachF(&this->unk_2C8.z, 10000.0f, 1.0f, 1000.0f);
}
@@ -482,7 +483,7 @@ void func_80B12460(EnSyatekiNiw* this, GlobalContext* globalCtx) {
Math_SmoothStepToS(&this->actor.world.rot.y,
(s16)(Math_FAtan2F(player->actor.world.pos.x - this->actor.world.pos.x,
player->actor.world.pos.z - this->actor.world.pos.z) *
- 10430.378f) +
+ (0x8000 / M_PI)) +
phi_f16,
5, this->unk_2C8.y, 0);
Math_ApproachF(&this->unk_2C8.y, 3000.0f, 1.0f, 500.0f);
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 01f6c1902..b1ad98571 100644
--- a/src/overlays/actors/ovl_En_Ta/z_en_ta.c
+++ b/src/overlays/actors/ovl_En_Ta/z_en_ta.c
@@ -481,7 +481,7 @@ void func_80B14AF4(EnTa* this, GlobalContext* globalCtx) {
void func_80B14B6C(EnTa* this, GlobalContext* globalCtx) {
if (func_8010BDBC(&globalCtx->msgCtx) == 5) {
- func_800800F8(globalCtx, 0x104F, -0x63, &this->actor, 0);
+ OnePointCutscene_Init(globalCtx, 4175, -99, &this->actor, MAIN_CAM);
func_80B13AA0(this, func_80B14AF4, func_80B167C0);
this->unk_2CC = 5;
gSaveContext.eventChkInf[1] |= 0x10;
@@ -546,8 +546,8 @@ void func_80B14E28(EnTa* this, GlobalContext* globalCtx) {
this->unk_2D0 = Gameplay_CreateSubCamera(globalCtx);
this->unk_2D2 = globalCtx->activeCamera;
- Gameplay_ChangeCameraStatus(globalCtx, this->unk_2D2, 1);
- Gameplay_ChangeCameraStatus(globalCtx, this->unk_2D0, 7);
+ Gameplay_ChangeCameraStatus(globalCtx, this->unk_2D2, CAM_STAT_WAIT);
+ Gameplay_ChangeCameraStatus(globalCtx, this->unk_2D0, CAM_STAT_ACTIVE);
b.x = 1053.0f;
b.y = 11.0f;
@@ -561,7 +561,7 @@ void func_80B14E28(EnTa* this, GlobalContext* globalCtx) {
}
void func_80B14EDC(EnTa* this, GlobalContext* globalCtx) {
- Gameplay_ChangeCameraStatus(globalCtx, this->unk_2D2, 7);
+ Gameplay_ChangeCameraStatus(globalCtx, this->unk_2D2, CAM_STAT_ACTIVE);
Gameplay_ClearCamera(globalCtx, this->unk_2D0);
}
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 a39ac4079..e7d2fd70c 100644
--- a/src/overlays/actors/ovl_En_Tr/z_en_tr.c
+++ b/src/overlays/actors/ovl_En_Tr/z_en_tr.c
@@ -151,7 +151,7 @@ void EnTr_DoNothing(EnTr* this, GlobalContext* globalCtx) {
}
void EnTr_ChooseAction2(EnTr* this, GlobalContext* globalCtx) {
- if (globalCtx->csCtx.state != 0) {
+ if (globalCtx->csCtx.state != CS_STATE_IDLE) {
if (globalCtx->csCtx.npcActions[this->actionIndex] != NULL) {
switch (globalCtx->csCtx.npcActions[this->actionIndex]->action) {
@@ -189,7 +189,7 @@ void EnTr_FlyKidnapCutscene(EnTr* this, GlobalContext* globalCtx) {
s16 actionIndex;
originalPos = this->actor.world.pos;
- if (globalCtx->csCtx.state != 0) {
+ if (globalCtx->csCtx.state != CS_STATE_IDLE) {
actionIndex = this->actionIndex;
if (globalCtx->csCtx.npcActions[actionIndex] != NULL) {
@@ -313,7 +313,7 @@ void EnTr_Reappear(EnTr* this, GlobalContext* globalCtx) {
}
void EnTr_WaitToReappear(EnTr* this, GlobalContext* globalCtx) {
- if (globalCtx->csCtx.state != 0) {
+ if (globalCtx->csCtx.state != CS_STATE_IDLE) {
if ((globalCtx->csCtx.npcActions[this->actionIndex] != NULL) &&
((globalCtx->csCtx.npcActions[this->actionIndex]->action == 3) ||
(globalCtx->csCtx.npcActions[this->actionIndex]->action == 5))) {
@@ -331,7 +331,7 @@ void EnTr_WaitToReappear(EnTr* this, GlobalContext* globalCtx) {
void EnTr_TakeOff(EnTr* this, GlobalContext* globalCtx) {
f32 lastFrame = Animation_GetLastFrame(D_80B24378[this->actor.params]);
- if (globalCtx->csCtx.state != 0) {
+ if (globalCtx->csCtx.state != CS_STATE_IDLE) {
if ((globalCtx->csCtx.npcActions[this->actionIndex] != NULL) &&
(globalCtx->csCtx.npcActions[this->actionIndex]->action == 3)) {
Animation_Change(&this->skelAnime, D_80B24378[this->actor.params], 1.0f, 0.0f, lastFrame, ANIMMODE_LOOP,
@@ -345,7 +345,7 @@ void EnTr_TakeOff(EnTr* this, GlobalContext* globalCtx) {
void EnTr_TurnLookOverShoulder(EnTr* this, GlobalContext* globalCtx) {
f32 lastFrame = Animation_GetLastFrame(D_80B24368[this->actor.params]);
- if (globalCtx->csCtx.state != 0) {
+ if (globalCtx->csCtx.state != CS_STATE_IDLE) {
if ((globalCtx->csCtx.npcActions[this->actionIndex] != NULL) &&
(globalCtx->csCtx.npcActions[this->actionIndex]->action == 2)) {
Animation_Change(&this->skelAnime, D_80B24368[this->actor.params], 1.0f, 0.0f, lastFrame, ANIMMODE_ONCE,
@@ -359,7 +359,7 @@ void EnTr_TurnLookOverShoulder(EnTr* this, GlobalContext* globalCtx) {
void EnTr_ChooseAction1(EnTr* this, GlobalContext* globalCtx) {
u32 frames = globalCtx->gameplayFrames;
- if (globalCtx->csCtx.state != 0) {
+ if (globalCtx->csCtx.state != CS_STATE_IDLE) {
if (globalCtx->csCtx.npcActions[this->actionIndex] != NULL) {
switch (globalCtx->csCtx.npcActions[this->actionIndex]->action) {
case 1:
@@ -437,8 +437,8 @@ s32 EnTr_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList,
if ((child != NULL) && (limbIndex == 19)) {
Matrix_MultVec3f(&src, &dest);
- dest.x -= (10.0f * Math_SinS(Camera_GetCamDirYaw(globalCtx->cameraPtrs[globalCtx->activeCamera])));
- dest.z -= (10.0f * Math_CosS(Camera_GetCamDirYaw(globalCtx->cameraPtrs[globalCtx->activeCamera])));
+ dest.x -= (10.0f * Math_SinS(Camera_GetCamDirYaw(ACTIVE_CAM)));
+ dest.z -= (10.0f * Math_CosS(Camera_GetCamDirYaw(ACTIVE_CAM)));
child->world.pos = dest;
}
return 0;
@@ -450,7 +450,7 @@ void EnTr_Draw(Actor* thisx, GlobalContext* globalCtx) {
if (1) {}
- if ((globalCtx->csCtx.state == 0) || (globalCtx->csCtx.npcActions[this->actionIndex] == 0)) {
+ if ((globalCtx->csCtx.state == CS_STATE_IDLE) || (globalCtx->csCtx.npcActions[this->actionIndex] == 0)) {
this->actor.shape.shadowDraw = NULL;
return;
}
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 b48f0003d..7d9da023f 100644
--- a/src/overlays/actors/ovl_En_Trap/z_en_trap.c
+++ b/src/overlays/actors/ovl_En_Trap/z_en_trap.c
@@ -191,8 +191,8 @@ void EnTrap_Update(Actor* thisx, GlobalContext* globalCtx) {
posAhead.x = (Math_SinS(thisx->world.rot.y) * 30.0f) + thisx->world.pos.x;
posAhead.z = (Math_CosS(thisx->world.rot.y) * 30.0f) + thisx->world.pos.z;
posAhead.y = thisx->world.pos.y;
- if (BgCheck_EntityLineTest1(&globalCtx->colCtx, &thisx->world.pos, &posAhead, &colPoint, &colPoly, 1, 1,
- 0, 1, &bgId) == true) {
+ if (BgCheck_EntityLineTest1(&globalCtx->colCtx, &thisx->world.pos, &posAhead, &colPoint, &colPoly, true,
+ true, false, true, &bgId) == true) {
this->vContinue = 0.0f;
}
}
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 cc6790c3b..fa93dfbcf 100644
--- a/src/overlays/actors/ovl_En_Viewer/z_en_viewer.c
+++ b/src/overlays/actors/ovl_En_Viewer/z_en_viewer.c
@@ -309,7 +309,7 @@ void func_80B2A75C(EnViewer* this, GlobalContext* globalCtx) {
Actor_MoveForward(&this->actor);
animationEnded = SkelAnime_Update(&this->skin.skelAnime);
if (params == 3 || params == 4) {
- if (globalCtx->csCtx.state != 0 && globalCtx->csCtx.npcActions[1] != NULL) {
+ if (globalCtx->csCtx.state != CS_STATE_IDLE && globalCtx->csCtx.npcActions[1] != NULL) {
if (globalCtx->csCtx.npcActions[1]->action == 2 && D_80B2CFCC == 0) {
if (params == 3) {
if (this->skin.skelAnime.animation != &D_06002928) {
@@ -395,14 +395,14 @@ void func_80B2A75C(EnViewer* this, GlobalContext* globalCtx) {
}
switch (this->unk_1E5) {
case 0:
- if (globalCtx->csCtx.state != 0 && globalCtx->csCtx.npcActions[0] != NULL &&
+ if (globalCtx->csCtx.state != CS_STATE_IDLE && globalCtx->csCtx.npcActions[0] != NULL &&
globalCtx->csCtx.npcActions[0]->action == 6 && this->skin.skelAnime.animation != &D_06002574) {
Animation_PlayLoopSetSpeed(&this->skin.skelAnime, &D_06002574, 1.5f);
this->unk_1E5++;
}
break;
case 1:
- if (globalCtx->csCtx.state != 0 && globalCtx->csCtx.npcActions[0] != NULL &&
+ if (globalCtx->csCtx.state != CS_STATE_IDLE && globalCtx->csCtx.npcActions[0] != NULL &&
globalCtx->csCtx.npcActions[0]->action == 2 && this->skin.skelAnime.animation != &D_060029CC) {
Animation_PlayLoopSetSpeed(&this->skin.skelAnime, &D_060029CC, 3.0f);
this->unk_1E5++;
@@ -413,7 +413,7 @@ void func_80B2A75C(EnViewer* this, GlobalContext* globalCtx) {
if (globalCtx->sceneNum == SCENE_SPOT00) { // Hyrule Field
switch (this->unk_1E5) {
case 0:
- if (globalCtx->csCtx.state != 0) {
+ if (globalCtx->csCtx.state != CS_STATE_IDLE) {
if (globalCtx->csCtx.npcActions[0] != NULL && globalCtx->csCtx.npcActions[0]->action == 6 &&
this->skin.skelAnime.animation != &D_06001410) {
Animation_PlayLoopSetSpeed(&this->skin.skelAnime, &D_06001410, 1.5f);
@@ -422,7 +422,7 @@ void func_80B2A75C(EnViewer* this, GlobalContext* globalCtx) {
}
break;
case 1:
- if (globalCtx->csCtx.state != 0) {
+ if (globalCtx->csCtx.state != CS_STATE_IDLE) {
if (globalCtx->csCtx.npcActions[0] != NULL && globalCtx->csCtx.npcActions[0]->action == 2 &&
this->skin.skelAnime.animation != &D_06000450) {
Animation_PlayLoopSetSpeed(&this->skin.skelAnime, &D_06000450, 3.0f);
@@ -457,7 +457,7 @@ void func_80B2A75C(EnViewer* this, GlobalContext* globalCtx) {
} else if (params == 7) {
switch (this->unk_1E5) {
case 0:
- if (globalCtx->csCtx.state != 0 && globalCtx->csCtx.npcActions[1] != NULL &&
+ if (globalCtx->csCtx.state != CS_STATE_IDLE && globalCtx->csCtx.npcActions[1] != NULL &&
globalCtx->csCtx.npcActions[1]->action == 7) {
Audio_PlaySoundGeneral(NA_SE_EN_GANON_LAUGH, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
Animation_MorphToPlayOnce(&this->skin.skelAnime, &D_06004534, -5.0f);
@@ -477,7 +477,7 @@ void func_80B2A75C(EnViewer* this, GlobalContext* globalCtx) {
this->unk_1E5 = 0;
break;
case 0:
- if (globalCtx->csCtx.state != 0) {
+ if (globalCtx->csCtx.state != CS_STATE_IDLE) {
if (globalCtx->csCtx.npcActions[1] != NULL && globalCtx->csCtx.npcActions[1]->action == 9) {
Animation_PlayLoopSetSpeed(&this->skin.skelAnime, &D_060050A8, 1.0f);
this->unk_1E5++;
@@ -582,7 +582,7 @@ void func_80B2B4A8(EnViewer* this, GlobalContext* globalCtx) {
this->skin.skelAnime.dListCount, func_80B2B2F4, func_80B2B468, this);
func_80B2CC1C(globalCtx, this);
} else if ((params == 3) || (params == 5) || (params == 7) || (params == 8)) {
- if ((globalCtx->csCtx.state != 0) && (globalCtx->csCtx.npcActions[1] != NULL)) {
+ if ((globalCtx->csCtx.state != CS_STATE_IDLE) && (globalCtx->csCtx.npcActions[1] != NULL)) {
SkelAnime_DrawFlexOpa(globalCtx, this->skin.skelAnime.skeleton, this->skin.skelAnime.jointTable,
this->skin.skelAnime.dListCount, 0, func_80B2B468, this);
func_80B2CC1C(globalCtx, this);
@@ -705,11 +705,12 @@ void EnViewer_Draw(Actor* thisx, GlobalContext* globalCtx) {
if (this->unk_1E6) {
params = this->actor.params >> 8;
if (params < 3) {
- if ((globalCtx->csCtx.state != 0) && (globalCtx->csCtx.npcActions[0] != NULL)) {
+ if ((globalCtx->csCtx.state != CS_STATE_IDLE) && (globalCtx->csCtx.npcActions[0] != NULL)) {
func_80093D18(globalCtx->state.gfxCtx);
sDrawFuncs[this->drawFuncIndex](this, globalCtx);
}
- } else if (((globalCtx->csCtx.state != 0) && (globalCtx->csCtx.npcActions[1] != NULL)) || params == 9) {
+ } else if (((globalCtx->csCtx.state != CS_STATE_IDLE) && (globalCtx->csCtx.npcActions[1] != NULL)) ||
+ params == 9) {
func_80093D18(globalCtx->state.gfxCtx);
sDrawFuncs[this->drawFuncIndex](this, globalCtx);
}
@@ -725,7 +726,7 @@ void EnViewer_GetCutsceneNextPos(EnViewer* this, GlobalContext* globalCtx) {
s16 yaw;
if (params < 3) {
- if (globalCtx->csCtx.state != 0 && globalCtx->csCtx.npcActions[0] != NULL &&
+ if (globalCtx->csCtx.state != CS_STATE_IDLE && globalCtx->csCtx.npcActions[0] != NULL &&
globalCtx->csCtx.frames < globalCtx->csCtx.npcActions[0]->endFrame) {
if (params == 0) {
if (D_80B2CEC0 == false) {
@@ -748,7 +749,7 @@ void EnViewer_GetCutsceneNextPos(EnViewer* this, GlobalContext* globalCtx) {
this->actor.world.pos.z = ((endPos.z - startPos.z) * interpolated) + startPos.z;
}
} else {
- if (globalCtx->csCtx.state != 0 && globalCtx->csCtx.npcActions[1] != NULL &&
+ if (globalCtx->csCtx.state != CS_STATE_IDLE && globalCtx->csCtx.npcActions[1] != NULL &&
globalCtx->csCtx.frames < globalCtx->csCtx.npcActions[1]->endFrame) {
startPos.x = globalCtx->csCtx.npcActions[1]->startPos.x;
startPos.y = globalCtx->csCtx.npcActions[1]->startPos.y;
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 75ce68197..ae73b5632 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
@@ -73,7 +73,7 @@ void EnWallTubo_DetectChu(EnWallTubo* this, GlobalContext* globalCtx) {
s16 quakeIndex;
if (this->chuGirl->minigamePlayStatus != 0) {
- if (globalCtx->cameraPtrs[0]->setting == 0x15) {
+ if (globalCtx->cameraPtrs[MAIN_CAM]->setting == CAM_SET_FIXED1) {
chu = (EnBomChu*)globalCtx->actorCtx.actorLists[ACTORCAT_EXPLOSIVE].head;
while (chu != NULL) {
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 879c9fa2e..66fa79e19 100644
--- a/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c
+++ b/src/overlays/actors/ovl_En_Wallmas/z_en_wallmas.c
@@ -13,8 +13,8 @@
#define THIS ((EnWallmas*)thisx)
#define TIMER_SCALE ((f32)OS_CLOCK_RATE / 10000000000)
-#define DEGREE_60_RAD 1.0471975803375244140625f
-#define DEGREE_15_RAD 0.261799395084381103515625f
+#define DEGREE_60_RAD (60.0f * M_PI / 180.0f)
+#define DEGREE_15_RAD (15.0f * M_PI / 180.0f)
#define DAMAGE_EFFECT_BURN 2
#define DAMAGE_EFFECT_STUN_WHITE 4
@@ -264,7 +264,7 @@ void EnWallmas_SetupTakePlayer(EnWallmas* this, GlobalContext* globalCtx) {
this->yTarget = this->actor.yDistToPlayer;
func_8002DF38(globalCtx, &this->actor, 0x25);
- func_800800F8(globalCtx, 0x251C, 0x270F, &this->actor, 0);
+ OnePointCutscene_Init(globalCtx, 9500, 9999, &this->actor, MAIN_CAM);
}
void EnWallmas_ProximityOrSwitchInit(EnWallmas* this) {
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 a21ac29e1..b58957044 100644
--- a/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c
+++ b/src/overlays/actors/ovl_En_Zl1/z_en_zl1.c
@@ -177,7 +177,7 @@ void func_80B4B010(EnZl1* this, GlobalContext* globalCtx) {
Animation_Change(&this->skelAnime, &D_06010B38, 1.0f, 0.0f, Animation_GetLastFrame(&D_06010B38),
ANIMMODE_ONCE_INTERP, -10.0f);
this->unk_1E8 = Gameplay_CreateSubCamera(globalCtx);
- Gameplay_ChangeCameraStatus(globalCtx, 0, CAM_STAT_WAIT);
+ Gameplay_ChangeCameraStatus(globalCtx, MAIN_CAM, CAM_STAT_WAIT);
Gameplay_ChangeCameraStatus(globalCtx, this->unk_1E8, CAM_STAT_ACTIVE);
func_800C0808(globalCtx, this->unk_1E8, player, CAM_SET_FREE0);
globalCtx->envCtx.unk_E2[0] = 0xFF;
@@ -378,7 +378,7 @@ void func_80B4B8B4(EnZl1* this, GlobalContext* globalCtx) {
SkelAnime_Update(&this->skelAnime);
func_80B4B874(this, globalCtx);
- if (globalCtx->csCtx.state == 0) {
+ if (globalCtx->csCtx.state == CS_STATE_IDLE) {
this->actionFunc = func_80B4BBC4;
return;
}
@@ -511,8 +511,8 @@ void func_80B4BF2C(EnZl1* this, GlobalContext* globalCtx) {
}
case 2:
if (Actor_HasParent(&this->actor, globalCtx)) {
- Gameplay_CopyCamera(globalCtx, 0, this->unk_1E8);
- Gameplay_ChangeCameraStatus(globalCtx, 0, CAM_STAT_ACTIVE);
+ Gameplay_CopyCamera(globalCtx, MAIN_CAM, this->unk_1E8);
+ Gameplay_ChangeCameraStatus(globalCtx, MAIN_CAM, CAM_STAT_ACTIVE);
Gameplay_ClearCamera(globalCtx, this->unk_1E8);
this->actor.parent = NULL;
this->unk_1E2++;
diff --git a/src/overlays/actors/ovl_En_Zl1/z_en_zl1_cutscene_data.c b/src/overlays/actors/ovl_En_Zl1/z_en_zl1_cutscene_data.c
index e9ce63d44..e57cfb8fe 100644
--- a/src/overlays/actors/ovl_En_Zl1/z_en_zl1_cutscene_data.c
+++ b/src/overlays/actors/ovl_En_Zl1/z_en_zl1_cutscene_data.c
@@ -9,7 +9,7 @@ CutsceneData D_80B4C5D0[] = {
CS_PLAYER_ACTION(0x0001, 1211, 1241, 0x0000, 0xC000, 0x0000, -422, 84, 1, -483, 84, 0, 1.1266861702801002e-29f, 0.0f, 1.401298464324817e-45f),
CS_PLAYER_ACTION(0x0029, 1241, 1311, 0x0000, 0xC000, 0x0000, -483, 84, 0, -483, 84, 0, 1.1266861702801002e-29f, 0.0f, 1.401298464324817e-45f),
CS_NPC_ACTION_LIST(18, 1),
- CS_NPC_ACTION(0x0007, 1170, 1316, 0x7477, 0x0000, 0x0000, -485, 84, 0, -469, 85, -55, 0.10958904027938843f, 0.006849315017461777f, -0.10958904027938843f),
+ CS_NPC_ACTION(0x0007, 1170, 1316, 0x7477, 0x0000, 0x0000, -485, 84, 0, -469, 85, -55, 0.10958904f, 0.006849315f, -0.10958904f),
CS_UNK_DATA_LIST(0x00000049, 1),
CS_UNK_DATA(0x00010000, 0x0BB80000, 0x00000000, 0x00000000, 0xFFFFFFE8, 0x00000003, 0x00000000, 0xFFFFFFE8, 0x00000003, 0x00000000, 0x00000000, 0x00000000),
CS_NPC_ACTION_LIST(16, 3),
@@ -25,21 +25,21 @@ CutsceneData D_80B4C5D0[] = {
CS_SCENE_TRANS_FX(0x0001, 860, 870),
CS_SCENE_TRANS_FX(0x0005, 875, 900),
CS_CAM_POS_LIST(0, 331),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.80000305175781f, -447, 128, 1, 0x2031),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.80000305175781f, -447, 128, 1, 0x3533),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.80000305175781f, -447, 128, 1, 0x3833),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.80000305175781f, -447, 128, 1, 0x2C20),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.80000305175781f, -392, 145, 1, 0x2032),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.80000305175781f, -318, 168, 1, 0x3533),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.80000305175781f, -222, 198, 1, 0x3639),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.80000305175781f, -146, 221, 1, 0x392C),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.80000305175781f, -132, 222, 1, 0x2032),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.80000305175781f, -66, 267, 1, 0x3632),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.80000305175781f, -66, 267, 1, 0x3639),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.80000305175781f, -66, 267, 1, 0x392C),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.80000305175781f, -66, 267, 1, 0x2031),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.80000305175781f, -66, 267, 1, 0x3533),
- CS_CAM_POS(CS_CMD_STOP, 0x00, 0, 60.80000305175781f, -66, 267, 1, 0x3336),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.800003f, -447, 128, 1, 0x2031),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.800003f, -447, 128, 1, 0x3533),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.800003f, -447, 128, 1, 0x3833),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.800003f, -447, 128, 1, 0x2C20),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.800003f, -392, 145, 1, 0x2032),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.800003f, -318, 168, 1, 0x3533),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.800003f, -222, 198, 1, 0x3639),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.800003f, -146, 221, 1, 0x392C),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.800003f, -132, 222, 1, 0x2032),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.800003f, -66, 267, 1, 0x3632),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.800003f, -66, 267, 1, 0x3639),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.800003f, -66, 267, 1, 0x392C),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.800003f, -66, 267, 1, 0x2031),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.800003f, -66, 267, 1, 0x3533),
+ CS_CAM_POS(CS_CMD_STOP, 0x00, 0, 60.800003f, -66, 267, 1, 0x3336),
CS_CAM_POS_LIST(230, 1631),
CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.0f, -1220, 445, 24, 0x2031),
CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.0f, -1220, 445, 24, 0x3533),
@@ -54,51 +54,51 @@ CutsceneData D_80B4C5D0[] = {
CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.0f, -1220, 189, 24, 0x3639),
CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.0f, -1135, 198, 81, 0x392C),
CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.0f, -1132, 119, 84, 0x2031),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.60000228881836f, -1199, 137, 36, 0x3533),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.60000228881836f, -1218, 127, 22, 0x3336),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.60000228881836f, -1218, 127, 22, 0x332C),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.60000228881836f, -1218, 127, 22, 0x2032),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.60000228881836f, -1218, 127, 22, 0x3231),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.60000228881836f, -1218, 127, 22, 0x3232),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.60000228881836f, -1218, 127, 22, 0x392C),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.60000228881836f, -1218, 127, 22, 0x2034),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.60000228881836f, -1218, 127, 22, 0x3331),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.60000228881836f, -1218, 127, 22, 0x3434),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.60000228881836f, -1218, 127, 22, 0x312C),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.60000228881836f, -1218, 127, 22, 0x2032),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.60000228881836f, -1218, 127, 22, 0x3136),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.60000228881836f, -1218, 127, 22, 0x3336),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.60000228881836f, -1218, 127, 22, 0x332C),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.60000228881836f, -1218, 127, 22, 0x200A),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.60000228881836f, -1218, 127, 22, 0x3136),
- CS_CAM_POS(CS_CMD_STOP, 0x00, 0, 60.60000228881836f, -1218, 127, 22, 0x3336),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.600002f, -1199, 137, 36, 0x3533),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.600002f, -1218, 127, 22, 0x3336),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.600002f, -1218, 127, 22, 0x332C),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.600002f, -1218, 127, 22, 0x2032),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.600002f, -1218, 127, 22, 0x3231),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.600002f, -1218, 127, 22, 0x3232),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.600002f, -1218, 127, 22, 0x392C),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.600002f, -1218, 127, 22, 0x2034),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.600002f, -1218, 127, 22, 0x3331),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.600002f, -1218, 127, 22, 0x3434),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.600002f, -1218, 127, 22, 0x312C),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.600002f, -1218, 127, 22, 0x2032),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.600002f, -1218, 127, 22, 0x3136),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.600002f, -1218, 127, 22, 0x3336),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.600002f, -1218, 127, 22, 0x332C),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.600002f, -1218, 127, 22, 0x200A),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.600002f, -1218, 127, 22, 0x3136),
+ CS_CAM_POS(CS_CMD_STOP, 0x00, 0, 60.600002f, -1218, 127, 22, 0x3336),
CS_CAM_POS_LIST(810, 1041),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.600006103515625f, -1218, 127, 22, 0x2031),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.600006103515625f, -1218, 127, 22, 0x3533),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.600006103515625f, -1218, 127, 22, 0x3833),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.600006103515625f, -1218, 88, 21, 0x2C20),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.600006103515625f, -1208, -52, 23, 0x2032),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.600006103515625f, -1201, -114, 26, 0x3533),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.600006103515625f, -1201, -114, 26, 0x3639),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.600006103515625f, -1201, -114, 26, 0x392C),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.600006103515625f, -1201, -114, 26, 0x2032),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.600006103515625f, -1201, -114, 26, 0x3632),
- CS_CAM_POS(CS_CMD_STOP, 0x00, 0, 60.600006103515625f, -1201, -114, 26, 0x3639),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.600006f, -1218, 127, 22, 0x2031),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.600006f, -1218, 127, 22, 0x3533),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.600006f, -1218, 127, 22, 0x3833),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.600006f, -1218, 88, 21, 0x2C20),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.600006f, -1208, -52, 23, 0x2032),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.600006f, -1201, -114, 26, 0x3533),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.600006f, -1201, -114, 26, 0x3639),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.600006f, -1201, -114, 26, 0x392C),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.600006f, -1201, -114, 26, 0x2032),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.600006f, -1201, -114, 26, 0x3632),
+ CS_CAM_POS(CS_CMD_STOP, 0x00, 0, 60.600006f, -1201, -114, 26, 0x3639),
CS_CAM_POS_LIST(870, 1261),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 80.27444458007812f, -59, 160, 320, 0x2031),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.074676513671875f, -59, 160, 320, 0x3533),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.074676513671875f, -59, 160, 320, 0x3833),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.074676513671875f, -59, 160, 320, 0x2C20),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.074676513671875f, -115, 148, 249, 0x2032),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.074676513671875f, -190, 126, 192, 0x3533),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.074676513671875f, -286, 105, 135, 0x3639),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.074676513671875f, -357, 108, 87, 0x392C),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.074676513671875f, -394, 104, 53, 0x2032),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.074676513671875f, -394, 104, 53, 0x3632),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.074676513671875f, -394, 104, 53, 0x3639),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.074676513671875f, -394, 104, 53, 0x392C),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.074676513671875f, -394, 104, 53, 0x2031),
- CS_CAM_POS(CS_CMD_STOP, 0x00, 0, 60.074676513671875f, -394, 104, 53, 0x3533),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 80.274445f, -59, 160, 320, 0x2031),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.074677f, -59, 160, 320, 0x3533),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.074677f, -59, 160, 320, 0x3833),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.074677f, -59, 160, 320, 0x2C20),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.074677f, -115, 148, 249, 0x2032),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.074677f, -190, 126, 192, 0x3533),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.074677f, -286, 105, 135, 0x3639),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.074677f, -357, 108, 87, 0x392C),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.074677f, -394, 104, 53, 0x2032),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.074677f, -394, 104, 53, 0x3632),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.074677f, -394, 104, 53, 0x3639),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.074677f, -394, 104, 53, 0x392C),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.074677f, -394, 104, 53, 0x2031),
+ CS_CAM_POS(CS_CMD_STOP, 0x00, 0, 60.074677f, -394, 104, 53, 0x3533),
CS_CAM_POS_LIST(1160, 1401),
CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.0f, -459, 175, 80, 0x2031),
CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.0f, -459, 175, 80, 0x3533),
@@ -110,37 +110,37 @@ CutsceneData D_80B4C5D0[] = {
CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 60.0f, -459, 175, 80, 0x392C),
CS_CAM_POS(CS_CMD_STOP, 0x00, 0, 60.0f, -459, 175, 80, 0x2032),
CS_CAM_POS_LIST(1260, 1411),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.19994354248047f, -461, 133, 0, 0x2031),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.19994354248047f, -461, 133, 0, 0x3533),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.19994354248047f, -461, 133, 0, 0x3833),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.19994354248047f, -461, 133, 0, 0x2C20),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.19994354248047f, -461, 133, 0, 0x2032),
- CS_CAM_POS(CS_CMD_STOP, 0x00, 0, 45.19994354248047f, -461, 133, 0, 0x3533),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.199944f, -461, 133, 0, 0x2031),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.199944f, -461, 133, 0, 0x3533),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.199944f, -461, 133, 0, 0x3833),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.199944f, -461, 133, 0, 0x2C20),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 45.199944f, -461, 133, 0, 0x2032),
+ CS_CAM_POS(CS_CMD_STOP, 0x00, 0, 45.199944f, -461, 133, 0, 0x3533),
CS_CAM_POS_LIST(1320, 1531),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 10.999837875366211f, -488, 124, -6, 0x2031),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 10.999837875366211f, -488, 124, -6, 0x3533),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 10.999837875366211f, -488, 124, -6, 0x3833),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 10.999837875366211f, -488, 124, -6, 0x2C20),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 10.999837875366211f, -488, 124, -6, 0x2032),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 10.999837875366211f, -488, 124, -6, 0x3533),
- CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 10.999837875366211f, -488, 124, -6, 0x3639),
- CS_CAM_POS(CS_CMD_STOP, 0x00, 0, 10.999837875366211f, -488, 124, -6, 0x392C),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 10.999838f, -488, 124, -6, 0x2031),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 10.999838f, -488, 124, -6, 0x3533),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 10.999838f, -488, 124, -6, 0x3833),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 10.999838f, -488, 124, -6, 0x2C20),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 10.999838f, -488, 124, -6, 0x2032),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 10.999838f, -488, 124, -6, 0x3533),
+ CS_CAM_POS(CS_CMD_CONTINUE, 0x00, 0, 10.999838f, -488, 124, -6, 0x3639),
+ CS_CAM_POS(CS_CMD_STOP, 0x00, 0, 10.999838f, -488, 124, -6, 0x392C),
CS_CAM_FOCUS_POINT_LIST(0, 360),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.60000228881836f, -506, 110, 1, 0x2031),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.80000305175781f, -506, 110, 1, 0x3533),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.80000305175781f, -506, 110, 1, 0x3833),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.80000305175781f, -506, 110, 1, 0x2C20),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 25, 60.80000305175781f, -451, 127, 1, 0x2032),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 25, 60.80000305175781f, -380, 149, 1, 0x3533),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 20, 60.80000305175781f, -291, 177, 1, 0x3639),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 20, 60.80000305175781f, -224, 210, 1, 0x392C),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 20, 60.80000305175781f, -213, 230, 1, 0x2032),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 20, 60.80000305175781f, -143, 291, 1, 0x3632),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 20, 60.80000305175781f, -135, 308, 1, 0x3639),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 20, 60.80000305175781f, -127, 319, 1, 0x392C),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 20, 60.80000305175781f, -120, 326, 1, 0x2031),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 20, 60.80000305175781f, -120, 326, 1, 0x3533),
- CS_CAM_FOCUS_POINT(CS_CMD_STOP, 0x00, 30, 60.80000305175781f, -120, 326, 1, 0x3336),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.600002f, -506, 110, 1, 0x2031),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.800003f, -506, 110, 1, 0x3533),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.800003f, -506, 110, 1, 0x3833),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.800003f, -506, 110, 1, 0x2C20),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 25, 60.800003f, -451, 127, 1, 0x2032),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 25, 60.800003f, -380, 149, 1, 0x3533),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 20, 60.800003f, -291, 177, 1, 0x3639),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 20, 60.800003f, -224, 210, 1, 0x392C),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 20, 60.800003f, -213, 230, 1, 0x2032),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 20, 60.800003f, -143, 291, 1, 0x3632),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 20, 60.800003f, -135, 308, 1, 0x3639),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 20, 60.800003f, -127, 319, 1, 0x392C),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 20, 60.800003f, -120, 326, 1, 0x2031),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 20, 60.800003f, -120, 326, 1, 0x3533),
+ CS_CAM_FOCUS_POINT(CS_CMD_STOP, 0x00, 30, 60.800003f, -120, 326, 1, 0x3336),
CS_CAM_FOCUS_POINT_LIST(230, 1710),
CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.0f, -1246, 413, 5, 0x2031),
CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.0f, -1246, 413, 5, 0x3533),
@@ -155,51 +155,51 @@ CutsceneData D_80B4C5D0[] = {
CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.0f, -1245, 158, 5, 0x3639),
CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.0f, -1180, 178, 50, 0x392C),
CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 80, 60.0f, -1178, 131, 51, 0x2031),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 80, 60.60000228881836f, -1240, 146, 6, 0x3533),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.60000228881836f, -1253, 153, -3, 0x3336),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.60000228881836f, -1253, 153, -3, 0x332C),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.60000228881836f, -1253, 153, -3, 0x2032),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.60000228881836f, -1253, 153, -3, 0x3231),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.60000228881836f, -1253, 153, -3, 0x3232),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.60000228881836f, -1252, 152, -2, 0x392C),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.60000228881836f, -1252, 152, -2, 0x2034),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 80, 60.60000228881836f, -1252, 152, -2, 0x3331),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 80, 60.60000228881836f, -1252, 152, -2, 0x3434),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 80, 60.60000228881836f, -1252, 152, -2, 0x312C),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 80, 60.60000228881836f, -1251, 151, -1, 0x2032),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 80, 60.60000228881836f, -1251, 151, -1, 0x3136),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 80, 60.60000228881836f, -1251, 151, -1, 0x3336),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 80, 60.60000228881836f, -1251, 151, -1, 0x332C),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 80, 60.60000228881836f, -1251, 151, -1, 0x200A),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.60000228881836f, -1251, 151, -1, 0x3136),
- CS_CAM_FOCUS_POINT(CS_CMD_STOP, 0x00, 80, 60.60000228881836f, -1251, 151, -1, 0x3336),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 80, 60.600002f, -1240, 146, 6, 0x3533),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.600002f, -1253, 153, -3, 0x3336),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.600002f, -1253, 153, -3, 0x332C),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.600002f, -1253, 153, -3, 0x2032),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.600002f, -1253, 153, -3, 0x3231),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.600002f, -1253, 153, -3, 0x3232),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.600002f, -1252, 152, -2, 0x392C),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.600002f, -1252, 152, -2, 0x2034),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 80, 60.600002f, -1252, 152, -2, 0x3331),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 80, 60.600002f, -1252, 152, -2, 0x3434),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 80, 60.600002f, -1252, 152, -2, 0x312C),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 80, 60.600002f, -1251, 151, -1, 0x2032),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 80, 60.600002f, -1251, 151, -1, 0x3136),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 80, 60.600002f, -1251, 151, -1, 0x3336),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 80, 60.600002f, -1251, 151, -1, 0x332C),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 80, 60.600002f, -1251, 151, -1, 0x200A),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.600002f, -1251, 151, -1, 0x3136),
+ CS_CAM_FOCUS_POINT(CS_CMD_STOP, 0x00, 80, 60.600002f, -1251, 151, -1, 0x3336),
CS_CAM_FOCUS_POINT_LIST(810, 1070),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.600006103515625f, -1251, 151, -1, 0x2031),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.600006103515625f, -1251, 151, -1, 0x3533),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 20, 60.600006103515625f, -1250, 150, 0, 0x3833),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 10, 60.600006103515625f, -1241, 125, 5, 0x2C20),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 10, 60.600006103515625f, -1226, -13, 10, 0x2032),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 10, 60.600006103515625f, -1218, -73, 26, 0x3533),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.600006103515625f, -1218, -73, 26, 0x3639),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.600006103515625f, -1218, -73, 26, 0x392C),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.600006103515625f, -1218, -73, 26, 0x2032),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.600006103515625f, -1218, -73, 26, 0x3632),
- CS_CAM_FOCUS_POINT(CS_CMD_STOP, 0x00, 30, 60.600006103515625f, -1218, -73, 26, 0x3639),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.600006f, -1251, 151, -1, 0x2031),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.600006f, -1251, 151, -1, 0x3533),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 20, 60.600006f, -1250, 150, 0, 0x3833),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 10, 60.600006f, -1241, 125, 5, 0x2C20),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 10, 60.600006f, -1226, -13, 10, 0x2032),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 10, 60.600006f, -1218, -73, 26, 0x3533),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.600006f, -1218, -73, 26, 0x3639),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.600006f, -1218, -73, 26, 0x392C),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.600006f, -1218, -73, 26, 0x2032),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.600006f, -1218, -73, 26, 0x3632),
+ CS_CAM_FOCUS_POINT(CS_CMD_STOP, 0x00, 30, 60.600006f, -1218, -73, 26, 0x3639),
CS_CAM_FOCUS_POINT_LIST(870, 1290),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.074676513671875f, -45, 240, 241, 0x2031),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.074676513671875f, -45, 240, 241, 0x3533),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.074676513671875f, -56, 219, 224, 0x3833),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.074676513671875f, -85, 183, 212, 0x2C20),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.074676513671875f, -204, 134, 183, 0x2032),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.074676513671875f, -280, 116, 125, 0x3533),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.074676513671875f, -376, 104, 69, 0x3639),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.074676513671875f, -440, 107, 13, 0x392C),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.074676513671875f, -467, 110, -25, 0x2032),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.074676513671875f, -467, 110, -25, 0x3632),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.074676513671875f, -467, 110, -25, 0x3639),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.074676513671875f, -467, 110, -25, 0x392C),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.074676513671875f, -467, 110, -25, 0x2031),
- CS_CAM_FOCUS_POINT(CS_CMD_STOP, 0x00, 30, 60.074676513671875f, -467, 110, -25, 0x3533),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.074677f, -45, 240, 241, 0x2031),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.074677f, -45, 240, 241, 0x3533),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.074677f, -56, 219, 224, 0x3833),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.074677f, -85, 183, 212, 0x2C20),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.074677f, -204, 134, 183, 0x2032),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.074677f, -280, 116, 125, 0x3533),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.074677f, -376, 104, 69, 0x3639),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.074677f, -440, 107, 13, 0x392C),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.074677f, -467, 110, -25, 0x2032),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.074677f, -467, 110, -25, 0x3632),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.074677f, -467, 110, -25, 0x3639),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.074677f, -467, 110, -25, 0x392C),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.074677f, -467, 110, -25, 0x2031),
+ CS_CAM_FOCUS_POINT(CS_CMD_STOP, 0x00, 30, 60.074677f, -467, 110, -25, 0x3533),
CS_CAM_FOCUS_POINT_LIST(1160, 1430),
CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.0f, -456, 138, 16, 0x2031),
CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.0f, -456, 138, 16, 0x3533),
@@ -211,21 +211,21 @@ CutsceneData D_80B4C5D0[] = {
CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 60.0f, -456, 138, 16, 0x392C),
CS_CAM_FOCUS_POINT(CS_CMD_STOP, 0x00, 30, 60.0f, -456, 138, 16, 0x2032),
CS_CAM_FOCUS_POINT_LIST(1260, 1440),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 45.19994354248047f, -535, 133, 0, 0x2031),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 45.19994354248047f, -535, 133, 0, 0x3533),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 45.19994354248047f, -535, 133, 0, 0x3833),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 45.19994354248047f, -535, 133, 0, 0x2C20),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 45.19994354248047f, -535, 133, 0, 0x2032),
- CS_CAM_FOCUS_POINT(CS_CMD_STOP, 0x00, 30, 45.19994354248047f, -535, 133, 0, 0x3533),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 45.199944f, -535, 133, 0, 0x2031),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 45.199944f, -535, 133, 0, 0x3533),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 45.199944f, -535, 133, 0, 0x3833),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 45.199944f, -535, 133, 0, 0x2C20),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 45.199944f, -535, 133, 0, 0x2032),
+ CS_CAM_FOCUS_POINT(CS_CMD_STOP, 0x00, 30, 45.199944f, -535, 133, 0, 0x3533),
CS_CAM_FOCUS_POINT_LIST(1320, 1560),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 10.999837875366211f, -1349, 124, -6, 0x2031),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 10.999837875366211f, -1349, 124, -6, 0x3533),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 10.999837875366211f, -1349, 124, -6, 0x3833),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 10.999837875366211f, -1349, 124, -6, 0x2C20),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 10.999837875366211f, -1349, 124, -6, 0x2032),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 10.999837875366211f, -1349, 124, -6, 0x3533),
- CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 10.999837875366211f, -1349, 124, -6, 0x3639),
- CS_CAM_FOCUS_POINT(CS_CMD_STOP, 0x00, 30, 10.999837875366211f, -1349, 124, -6, 0x392C),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 10.999838f, -1349, 124, -6, 0x2031),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 10.999838f, -1349, 124, -6, 0x3533),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 10.999838f, -1349, 124, -6, 0x3833),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 10.999838f, -1349, 124, -6, 0x2C20),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 10.999838f, -1349, 124, -6, 0x2032),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 10.999838f, -1349, 124, -6, 0x3533),
+ CS_CAM_FOCUS_POINT(CS_CMD_CONTINUE, 0x00, 30, 10.999838f, -1349, 124, -6, 0x3639),
+ CS_CAM_FOCUS_POINT(CS_CMD_STOP, 0x00, 30, 10.999838f, -1349, 124, -6, 0x392C),
CS_TEXT_LIST(10),
CS_TEXT_NONE(0, 50),
CS_TEXT_DISPLAY_TEXTBOX(0x7035, 50, 190, 0x0000, 0xFFFF, 0xFFFF),
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 66d641445..5941fc342 100644
--- a/src/overlays/actors/ovl_En_Zl2/z_en_zl2.c
+++ b/src/overlays/actors/ovl_En_Zl2/z_en_zl2.c
@@ -213,7 +213,7 @@ s32 EnZl2_FrameUpdateMatrix(EnZl2* this) {
}
CsCmdActorAction* EnZl2_GetNpcAction(GlobalContext* globalCtx, s32 idx) {
- if (globalCtx->csCtx.state != 0) {
+ if (globalCtx->csCtx.state != CS_STATE_IDLE) {
return globalCtx->csCtx.npcActions[idx];
}
return NULL;
@@ -753,7 +753,7 @@ void func_80B50304(EnZl2* this, GlobalContext* globalCtx) {
this->drawConfig = 1;
this->unk_23C = 0.0f;
shape->shadowAlpha = 255;
- this->actor.world.rot.y = shape->rot.y = Math_FAtan2F(actionXDelta, actionZDelta) * 10430.3779296875f;
+ this->actor.world.rot.y = shape->rot.y = Math_FAtan2F(actionXDelta, actionZDelta) * (0x8000 / M_PI);
}
void func_80B503DC(EnZl2* this, GlobalContext* globalCtx) {
diff --git a/src/overlays/actors/ovl_En_Zl3/z_en_zl3.c b/src/overlays/actors/ovl_En_Zl3/z_en_zl3.c
index e4481a4bb..4edee2c97 100644
--- a/src/overlays/actors/ovl_En_Zl3/z_en_zl3.c
+++ b/src/overlays/actors/ovl_En_Zl3/z_en_zl3.c
@@ -1033,14 +1033,12 @@ void func_80B558A8(EnZl3* this) {
s32 pad[4];
s16 thisRotY = this->actor.world.rot.y;
Vec3f* unk_338 = &this->unk_338;
- Vec3f thisPos = this->actor.world.pos;
- this->unk_32C = thisPos;
- *unk_338 = thisPos;
+ *unk_338 = this->unk_32C = this->actor.world.pos;
- unk_338->z += ((-1.6073999404907227f) * Math_CosS(thisRotY)) - (3.1620006561279297f * Math_SinS(thisRotY));
- unk_338->x += ((-1.6073999404907227f) * Math_SinS(thisRotY)) + (3.1620006561279297f * Math_CosS(thisRotY));
- unk_338->y += -0.01219940185546875f;
+ unk_338->z += (-1.6074f * Math_CosS(thisRotY)) - (3.1620007f * Math_SinS(thisRotY));
+ unk_338->x += (-1.6074f * Math_SinS(thisRotY)) + (3.1620007f * Math_CosS(thisRotY));
+ unk_338->y += -0.012199402f;
}
void func_80B559C4(EnZl3* this) {
@@ -1055,7 +1053,7 @@ void func_80B559C4(EnZl3* this) {
}
void func_80B55A58(EnZl3* this, GlobalContext* globalCtx) {
- if (globalCtx->activeCamera == 0) {
+ if (globalCtx->activeCamera == MAIN_CAM) {
func_80B537E8(this);
}
}
@@ -1181,7 +1179,7 @@ void func_80B55F6C(EnZl3* this, GlobalContext* globalCtx) {
} else if (ABS((s16)(this->actor.yawTowardsPlayer - this->actor.shape.rot.y)) <= 0x4300) {
BossGanon2* bossGanon2 = func_80B53488(this, globalCtx);
- if ((bossGanon2 != NULL) && (bossGanon2->unk_324 <= 0.12345679104328156f)) {
+ if ((bossGanon2 != NULL) && (bossGanon2->unk_324 <= (10.0f / 81.0f))) {
this->actor.flags |= 9;
this->actor.flags |= 1;
this->actor.textId = 0x7059;
@@ -1243,7 +1241,7 @@ void func_80B56214(EnZl3* this, GlobalContext* globalCtx) {
BossGanon2* bossGanon2 = func_80B53488(this, globalCtx);
if (bossGanon2 != NULL) {
- if (bossGanon2->unk_324 <= 0.12345679104328156f) {
+ if (bossGanon2->unk_324 <= (10.0f / 81.0f)) {
this->actor.flags |= 9;
this->actor.flags |= 1;
this->actor.textId = 0x7059;
@@ -1616,7 +1614,7 @@ s32 func_80B57034(EnZl3* this, s32 arg1, s32 arg2) {
f32 xDiff = vec2->x - vec1->x;
f32 zDiff = vec2->z - vec1->z;
- return ((xDiff == 0.0f) && (zDiff == 0.0f)) ? 0 : (s16)(Math_FAtan2F(xDiff, zDiff) * 10430.3779296875f);
+ return ((xDiff == 0.0f) && (zDiff == 0.0f)) ? 0 : (s16)(Math_FAtan2F(xDiff, zDiff) * (0x8000 / M_PI));
}
return 0;
}
@@ -1743,7 +1741,7 @@ s32 func_80B57458(EnZl3* this, GlobalContext* globalCtx) {
return 1;
}
- temp_v0 = (s16)(temp_v1 - (s16)(Math_FAtan2F(temp_f12, temp_f13) * 10430.3779296875f));
+ temp_v0 = (s16)(temp_v1 - (s16)(Math_FAtan2F(temp_f12, temp_f13) * (0x8000 / M_PI)));
if (temp_v0 < 0x1555) {
return 1;
@@ -1774,6 +1772,7 @@ s32 func_80B575F0(EnZl3* this, GlobalContext* globalCtx) {
if ((sceneNum == SCENE_GANON_SONOGO) && (func_80B54DB4(this) == 0x26)) {
s32 unk_314 = this->unk_314;
+
if (unk_314 == 1) {
return 1;
}
@@ -1786,10 +1785,9 @@ void func_80B5764C(EnZl3* this, GlobalContext* globalCtx) {
if ((sceneNum == SCENE_GANON_SONOGO) && (func_80B54DB4(this) == 0x26)) {
s32 unk_314 = this->unk_314 + 1;
- if (unk_314 == 1) {
- if (!Gameplay_InCsMode(globalCtx)) {
- func_800800F8(globalCtx, 0x3E8, 0x28, &this->actor, 0);
- }
+
+ if ((unk_314 == 1) && !Gameplay_InCsMode(globalCtx)) {
+ OnePointCutscene_Init(globalCtx, 1000, 40, &this->actor, MAIN_CAM);
}
}
}
@@ -1830,7 +1828,7 @@ void func_80B577BC(GlobalContext* globalCtx, Vec3f* vec) {
f32 posZ = vec->z;
Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_TEST, posX, posY, posZ, 0,
- (Math_FAtan2F(playerPos->x - posX, playerPos->z - posZ) * 10430.3779296875f), 0, 5);
+ (Math_FAtan2F(playerPos->x - posX, playerPos->z - posZ) * (0x8000 / M_PI)), 0, 5);
}
void func_80B57858(GlobalContext* globalCtx) {
@@ -2041,14 +2039,14 @@ void func_80B58014(EnZl3* this, GlobalContext* globalCtx) {
this->action = 29;
func_80B538B0(this);
} else if (func_80B57C8C(this) && func_80B57F84(this, globalCtx)) {
- func_800800F8(globalCtx, 0xFA0, -0x63, &this->actor, 0);
+ OnePointCutscene_Init(globalCtx, 4000, -99, &this->actor, MAIN_CAM);
this->unk_3D0 = 0;
} else if (func_80B576C8(this, globalCtx) && func_80B575B0(this, globalCtx) && !Gameplay_InCsMode(globalCtx)) {
this->action = 0x1F;
this->unk_3CC = 0.0f;
func_80B537E8(this);
this->unk_3D8 = 1;
- func_800800F8(globalCtx, 0xFAA, -0x63, &this->actor, 0);
+ OnePointCutscene_Init(globalCtx, 4010, -99, &this->actor, MAIN_CAM);
} else if (!func_80B57C8C(this) && !func_80B576C8(this, globalCtx) && func_80B57564(this, globalCtx)) {
func_80B54E14(this, &gZelda2Anime2Anim_009BE4, 0, -8.0f, 0);
func_80B5764C(this, globalCtx);
@@ -2120,7 +2118,7 @@ void func_80B584B4(EnZl3* this, GlobalContext* globalCtx) {
if (D_80B5A4BC == 0) {
if ((nearbyEnTest == NULL) && (!Gameplay_InCsMode(globalCtx))) {
this->action = 33;
- func_800800F8(globalCtx, 0xFAB, -0x63, &this->actor, 0);
+ OnePointCutscene_Init(globalCtx, 4011, -99, &this->actor, MAIN_CAM);
} else if (invincibilityTimer > 0) {
func_80B54E14(this, &gZelda2Anime2Anim_003FF8, 0, -12.0f, 0);
D_80B5A4BC = 1;
@@ -2131,7 +2129,7 @@ void func_80B584B4(EnZl3* this, GlobalContext* globalCtx) {
func_80B54E14(this, &gZelda2Anime2Anim_007664, 0, -12.0f, 0);
D_80B5A4BC = 0;
this->action = 33;
- func_800800F8(globalCtx, 0xFAB, -0x63, &this->actor, 0);
+ OnePointCutscene_Init(globalCtx, 4011, -99, &this->actor, MAIN_CAM);
} else if (invincibilityTimer <= 0) {
func_80B54E14(this, &gZelda2Anime2Anim_007664, 0, -12.0f, 0);
D_80B5A4BC = 0;
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 9591fcd08..83be6ade9 100644
--- a/src/overlays/actors/ovl_En_Zl4/z_en_zl4.c
+++ b/src/overlays/actors/ovl_En_Zl4/z_en_zl4.c
@@ -183,7 +183,7 @@ static struct_80034EC0_Entry sAnimationEntries[] = {
void EnZl4_SetCsCameraAngle(GlobalContext* globalCtx, s16 index) {
Camera* activeCam = ACTIVE_CAM;
- Camera_ChangeSetting(activeCam, 0x21);
+ Camera_ChangeSetting(activeCam, CAM_SET_FREE0);
activeCam->at = sCsCameraAngle[index].at;
activeCam->eye = activeCam->eyeNext = sCsCameraAngle[index].eye;
activeCam->roll = sCsCameraAngle[index].roll;
@@ -194,7 +194,7 @@ void EnZl4_SetCsCameraMove(GlobalContext* globalCtx, s16 index) {
Camera* activeCam = ACTIVE_CAM;
Player* player = PLAYER;
- Camera_ChangeSetting(activeCam, 0x25);
+ Camera_ChangeSetting(activeCam, CAM_SET_DEMO0);
Camera_ResetAnim(activeCam);
Camera_SetCSParams(activeCam, sCsCameraMove[index].atPoints, sCsCameraMove[index].eyePoints, player,
sCsCameraMove[index].relativeToPlayer);
@@ -896,9 +896,9 @@ s32 EnZl4_CsLookWindow(EnZl4* this, GlobalContext* globalCtx) {
this->talkState++;
break;
case 1:
- if (globalCtx->csCtx.state != 0) {
+ if (globalCtx->csCtx.state != CS_STATE_IDLE) {
if (globalCtx->csCtx.frames == 90) {
- globalCtx->csCtx.state = 3;
+ globalCtx->csCtx.state = CS_STATE_UNSKIPPABLE_INIT;
}
} else {
globalCtx->csCtx.segment = SEGMENTED_TO_VIRTUAL(gZeldasCourtyardGanonCs);
@@ -908,9 +908,9 @@ s32 EnZl4_CsLookWindow(EnZl4* this, GlobalContext* globalCtx) {
}
break;
case 2:
- if (globalCtx->csCtx.state != 0) {
+ if (globalCtx->csCtx.state != CS_STATE_IDLE) {
if (globalCtx->csCtx.frames == 209) {
- globalCtx->csCtx.state = 3;
+ globalCtx->csCtx.state = CS_STATE_UNSKIPPABLE_INIT;
}
} else {
func_800AA000(0.0f, 0xA0, 0xA, 0x28);
@@ -1098,7 +1098,7 @@ s32 EnZl4_CsMakePlan(EnZl4* this, GlobalContext* globalCtx) {
if (!((func_8010BDBC(&globalCtx->msgCtx) == 5) && func_80106BC8(globalCtx))) {
break;
} else {
- Camera_ChangeSetting(globalCtx->cameraPtrs[globalCtx->activeCamera], 1);
+ Camera_ChangeSetting(ACTIVE_CAM, 1);
this->talkState = 7;
globalCtx->talkWithPlayer(globalCtx, &this->actor);
func_8002F434(&this->actor, globalCtx, GI_LETTER_ZELDA, fabsf(this->actor.xzDistToPlayer) + 1.0f,
diff --git a/src/overlays/actors/ovl_En_fHG/z_en_fhg.c b/src/overlays/actors/ovl_En_fHG/z_en_fhg.c
index 5a30f52b4..422912aab 100644
--- a/src/overlays/actors/ovl_En_fHG/z_en_fhg.c
+++ b/src/overlays/actors/ovl_En_fHG/z_en_fhg.c
@@ -158,8 +158,8 @@ void EnfHG_Intro(EnfHG* this, GlobalContext* globalCtx) {
func_80064520(globalCtx, &globalCtx->csCtx);
func_8002DF54(globalCtx, &this->actor, 8);
this->cutsceneCamera = Gameplay_CreateSubCamera(globalCtx);
- Gameplay_ChangeCameraStatus(globalCtx, 0, 1);
- Gameplay_ChangeCameraStatus(globalCtx, this->cutsceneCamera, 7);
+ Gameplay_ChangeCameraStatus(globalCtx, MAIN_CAM, CAM_STAT_WAIT);
+ Gameplay_ChangeCameraStatus(globalCtx, this->cutsceneCamera, CAM_STAT_ACTIVE);
this->cutsceneState = INTRO_FENCE;
this->timers[0] = 60;
this->actor.world.pos.y = GND_BOSSROOM_CENTER_Y - 7.0f;
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 55273df83..c28f166ca 100644
--- a/src/overlays/actors/ovl_Item_Etcetera/z_item_etcetera.c
+++ b/src/overlays/actors/ovl_Item_Etcetera/z_item_etcetera.c
@@ -180,7 +180,7 @@ void func_80B85B28(ItemEtcetera* this, GlobalContext* globalCtx) {
}
void ItemEtcetera_UpdateFireArrow(ItemEtcetera* this, GlobalContext* globalCtx) {
- if ((globalCtx->csCtx.state != 0) && (globalCtx->csCtx.npcActions[0] != NULL)) {
+ if ((globalCtx->csCtx.state != CS_STATE_IDLE) && (globalCtx->csCtx.npcActions[0] != NULL)) {
LOG_NUM("(game_play->demo_play.npcdemopnt[0]->dousa)", globalCtx->csCtx.npcActions[0]->action,
"../z_item_etcetera.c", 441);
if (globalCtx->csCtx.npcActions[0]->action == 2) {
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 476377925..a26540ff3 100644
--- a/src/overlays/actors/ovl_Magic_Fire/z_magic_fire.c
+++ b/src/overlays/actors/ovl_Magic_Fire/z_magic_fire.c
@@ -406,7 +406,7 @@ void MagicFire_Update(Actor* thisx, GlobalContext* globalCtx) {
}
break;
case DF_ACTION_EXPAND_QUICKLY: // Sphere beings to grow again and quickly expands out until killed
- this->alphaMultiplier -= 0.06722689f;
+ this->alphaMultiplier -= 8.0f / 119.000008f;
this->actor.scale.x += this->scalingSpeed;
this->actor.scale.y += this->scalingSpeed;
this->actor.scale.z += this->scalingSpeed;
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 344f5ed4f..73cb272b9 100644
--- a/src/overlays/actors/ovl_Obj_Blockstop/z_obj_blockstop.c
+++ b/src/overlays/actors/ovl_Obj_Blockstop/z_obj_blockstop.c
@@ -33,7 +33,7 @@ void ObjBlockstop_Init(Actor* thisx, GlobalContext* globalCtx) {
if (Flags_GetSwitch(globalCtx, this->actor.params)) {
Actor_Kill(&this->actor);
} else {
- this->actor.world.pos.y += 1;
+ this->actor.world.pos.y++;
}
}
@@ -48,7 +48,7 @@ void ObjBlockstop_Update(Actor* thisx, GlobalContext* globalCtx) {
s32 pad;
if (BgCheck_EntityLineTest2(&globalCtx->colCtx, &this->actor.home.pos, &this->actor.world.pos, &sp4C,
- &this->actor.floorPoly, 0, 0, 1, 1, &bgId, &this->actor)) {
+ &this->actor.floorPoly, false, false, true, true, &bgId, &this->actor)) {
dynaPolyActor = DynaPoly_GetActor(&globalCtx->colCtx, bgId);
if (dynaPolyActor != NULL && dynaPolyActor->actor.id == ACTOR_OBJ_OSHIHIKI) {
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 95c37fe2b..8d548e78f 100644
--- a/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c
+++ b/src/overlays/actors/ovl_Obj_Comb/z_obj_comb.c
@@ -214,9 +214,9 @@ void ObjComb_Draw(Actor* thisx, GlobalContext* globalCtx) {
Matrix_Translate(this->actor.world.pos.x, this->actor.world.pos.y + (118.0f * this->actor.scale.y),
this->actor.world.pos.z, 0);
- Matrix_RotateY(this->actor.shape.rot.y * 0.0000958738f, 1);
- Matrix_RotateX(this->actor.shape.rot.x * 0.0000958738f, 1);
- Matrix_RotateZ(this->actor.shape.rot.z * 0.0000958738f, 1);
+ Matrix_RotateY(this->actor.shape.rot.y * (M_PI / 0x8000), 1);
+ Matrix_RotateX(this->actor.shape.rot.x * (M_PI / 0x8000), 1);
+ Matrix_RotateZ(this->actor.shape.rot.z * (M_PI / 0x8000), 1);
Matrix_Translate(0, -(this->actor.scale.y * 118.0f), 0, 1);
Matrix_Scale(this->actor.scale.x, this->actor.scale.y, this->actor.scale.z, 1);
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 88bf2c715..a99ce98e4 100644
--- a/src/overlays/actors/ovl_Obj_Dekujr/z_obj_dekujr.c
+++ b/src/overlays/actors/ovl_Obj_Dekujr/z_obj_dekujr.c
@@ -95,7 +95,7 @@ void ObjDekujr_ComeUp(ObjDekujr* this, GlobalContext* globalCtx) {
f32 actionLength;
f32 gravity;
- if (globalCtx->csCtx.state == 0) {
+ if (globalCtx->csCtx.state == CS_STATE_IDLE) {
this->unk_19C = 2;
this->unk_19B = 0;
} else {
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 80b2e1b2d..a84b4b3ce 100644
--- a/src/overlays/actors/ovl_Obj_Hamishi/z_obj_hamishi.c
+++ b/src/overlays/actors/ovl_Obj_Hamishi/z_obj_hamishi.c
@@ -143,7 +143,7 @@ void ObjHamishi_Init(Actor* thisx, GlobalContext* globalCtx) {
Actor_ProcessInitChain(&this->actor, sInitChain);
- if (globalCtx->csCtx.state != 0) {
+ if (globalCtx->csCtx.state != CS_STATE_IDLE) {
this->actor.uncullZoneForward += 1000.0f;
}
if (this->actor.shape.rot.y == 0) {
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 e966e0b7c..5b517a48f 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
@@ -121,7 +121,7 @@ void ObjIcePoly_Idle(ObjIcePoly* this, GlobalContext* globalCtx) {
if (this->colliderIce.base.acFlags & AC_HIT) {
this->meltTimer = -this->colliderIce.info.acHitInfo->toucher.damage;
this->actor.focus.rot.y = this->actor.yawTowardsPlayer;
- func_800800F8(globalCtx, 0x1400, 40, &this->actor, 0);
+ OnePointCutscene_Init(globalCtx, 5120, 40, &this->actor, MAIN_CAM);
this->actionFunc = ObjIcePoly_Melt;
} else if (this->actor.parent != NULL) {
this->actor.parent->freezeTimer = 40;
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 ef763fef6..9f544ab65 100644
--- a/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.c
+++ b/src/overlays/actors/ovl_Obj_Lightswitch/z_obj_lightswitch.c
@@ -116,11 +116,11 @@ void ObjLightswitch_SetSwitchFlag(ObjLightswitch* this, GlobalContext* globalCtx
Flags_SetSwitch(globalCtx, this->actor.params >> 8 & 0x3F);
if (type == OBJLIGHTSWITCH_TYPE_1) {
- func_800806BC(globalCtx, thisx, NA_SE_SY_TRE_BOX_APPEAR);
+ OnePointCutscene_AttentionSetSfx(globalCtx, thisx, NA_SE_SY_TRE_BOX_APPEAR);
} else if (type == OBJLIGHTSWITCH_TYPE_BURN) {
- func_800806BC(globalCtx, thisx, NA_SE_SY_ERROR);
+ OnePointCutscene_AttentionSetSfx(globalCtx, thisx, NA_SE_SY_ERROR);
} else {
- func_800806BC(globalCtx, thisx, NA_SE_SY_CORRECT_CHIME);
+ OnePointCutscene_AttentionSetSfx(globalCtx, thisx, NA_SE_SY_CORRECT_CHIME);
}
}
}
@@ -130,7 +130,7 @@ void ObjLightswitch_ClearSwitchFlag(ObjLightswitch* this, GlobalContext* globalC
Flags_UnsetSwitch(globalCtx, this->actor.params >> 8 & 0x3F);
if ((this->actor.params >> 4 & 3) == OBJLIGHTSWITCH_TYPE_1) {
- func_800806BC(globalCtx, &this->actor, NA_SE_SY_TRE_BOX_APPEAR);
+ OnePointCutscene_AttentionSetSfx(globalCtx, &this->actor, NA_SE_SY_TRE_BOX_APPEAR);
}
}
}
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 cef1a1956..716cc44a4 100644
--- a/src/overlays/actors/ovl_Obj_Mure2/z_obj_mure2.c
+++ b/src/overlays/actors/ovl_Obj_Mure2/z_obj_mure2.c
@@ -171,7 +171,7 @@ void ObjMure2_Init(Actor* thisx, GlobalContext* globalCtx) {
ObjMure2* this = THIS;
Actor_ProcessInitChain(&this->actor, sInitChain);
- if (globalCtx->csCtx.state != 0) {
+ if (globalCtx->csCtx.state != CS_STATE_IDLE) {
this->actor.uncullZoneForward += 1200.0f;
}
ObjMure2_SetupWait(this);
@@ -215,7 +215,7 @@ void func_80B9A6F8(ObjMure2* this, GlobalContext* globalCtx) {
void ObjMure2_Update(Actor* thisx, GlobalContext* globalCtx) {
ObjMure2* this = THIS;
- if (globalCtx->csCtx.state == 0) {
+ if (globalCtx->csCtx.state == CS_STATE_IDLE) {
this->unk_184 = 1.0f;
} else {
this->unk_184 = 4.0f;
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 2439c7627..d5ee44146 100644
--- a/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c
+++ b/src/overlays/actors/ovl_Obj_Oshihiki/z_obj_oshihiki.c
@@ -428,12 +428,12 @@ s32 ObjOshihiki_CheckWall(GlobalContext* globalCtx, s16 angle, f32 direction, Ob
faceVtxNext.x = faceVtx.x + maxDist * sn;
faceVtxNext.y = faceVtx.y;
faceVtxNext.z = faceVtx.z + maxDist * cs;
- if (BgCheck_EntityLineTest3(&globalCtx->colCtx, &faceVtx, &faceVtxNext, &posResult, &outPoly, 1, 0, 0, 1, &bgId,
- &this->dyna.actor, 0.0f)) {
- return 1;
+ if (BgCheck_EntityLineTest3(&globalCtx->colCtx, &faceVtx, &faceVtxNext, &posResult, &outPoly, true, false,
+ false, true, &bgId, &this->dyna.actor, 0.0f)) {
+ return true;
}
}
- return 0;
+ return false;
}
s32 ObjOshihiki_MoveWithBlockUnder(ObjOshihiki* this, GlobalContext* globalCtx) {
@@ -452,12 +452,12 @@ s32 ObjOshihiki_MoveWithBlockUnder(ObjOshihiki* this, GlobalContext* globalCtx)
this->dyna.actor.world.pos.x += this->underDistX;
this->dyna.actor.world.pos.z += this->underDistZ;
ObjOshihiki_UpdateInitPos(this);
- return 1;
+ return true;
} else if (!(this->blockUnder->stateFlags & PUSHBLOCK_SETUP_PUSH)) {
this->blockUnder = NULL;
}
}
- return 0;
+ return false;
}
void ObjOshihiki_SetupOnScene(ObjOshihiki* this, GlobalContext* globalCtx) {
@@ -490,9 +490,7 @@ void ObjOshihiki_OnScene(ObjOshihiki* this, GlobalContext* globalCtx) {
void ObjOshihiki_SetupOnActor(ObjOshihiki* this, GlobalContext* globalCtx) {
this->stateFlags |= PUSHBLOCK_SETUP_ON_ACTOR;
this->actionFunc = ObjOshihiki_OnActor;
- this->dyna.actor.velocity.z = 0.0f;
- this->dyna.actor.velocity.y = 0.0f;
- this->dyna.actor.velocity.x = 0.0f;
+ this->dyna.actor.velocity.x = this->dyna.actor.velocity.y = this->dyna.actor.velocity.z = 0.0f;
this->dyna.actor.gravity = -1.0f;
}
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 9bf7bd02e..63e3e39cd 100644
--- a/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c
+++ b/src/overlays/actors/ovl_Obj_Switch/z_obj_switch.c
@@ -251,9 +251,9 @@ void ObjSwitch_SetOn(ObjSwitch* this, GlobalContext* globalCtx) {
Flags_SetSwitch(globalCtx, (this->dyna.actor.params >> 8 & 0x3F));
if (subType == 0 || subType == 4) {
- func_800806BC(globalCtx, &this->dyna.actor, NA_SE_SY_CORRECT_CHIME);
+ OnePointCutscene_AttentionSetSfx(globalCtx, &this->dyna.actor, NA_SE_SY_CORRECT_CHIME);
} else {
- func_800806BC(globalCtx, &this->dyna.actor, NA_SE_SY_TRE_BOX_APPEAR);
+ OnePointCutscene_AttentionSetSfx(globalCtx, &this->dyna.actor, NA_SE_SY_TRE_BOX_APPEAR);
}
this->cooldownOn = true;
@@ -267,7 +267,7 @@ void ObjSwitch_SetOff(ObjSwitch* this, GlobalContext* globalCtx) {
Flags_UnsetSwitch(globalCtx, (this->dyna.actor.params >> 8 & 0x3F));
if ((this->dyna.actor.params >> 4 & 7) == 1) {
- func_800806BC(globalCtx, &this->dyna.actor, NA_SE_SY_TRE_BOX_APPEAR);
+ OnePointCutscene_AttentionSetSfx(globalCtx, &this->dyna.actor, NA_SE_SY_TRE_BOX_APPEAR);
this->cooldownOn = true;
}
}
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 141d15a4c..6bc2a937e 100644
--- a/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.c
+++ b/src/overlays/actors/ovl_Obj_Syokudai/z_obj_syokudai.c
@@ -163,7 +163,7 @@ void ObjSyokudai_Update(Actor* thisx, GlobalContext* globalCtx2) {
if (this->litTimer == 0) {
this->litTimer = -1;
if (torchType == 0) {
- func_80080480(globalCtx, &this->actor);
+ OnePointCutscene_Attention(globalCtx, &this->actor);
}
} else if (this->litTimer > 0) {
this->litTimer = -1;
@@ -214,13 +214,13 @@ void ObjSyokudai_Update(Actor* thisx, GlobalContext* globalCtx2) {
this->litTimer = -1;
if (torchType != 2) {
Flags_SetSwitch(globalCtx, switchFlag);
- func_80080480(globalCtx, &this->actor);
+ OnePointCutscene_Attention(globalCtx, &this->actor);
}
} else {
sLitTorchCount++;
if (sLitTorchCount >= torchCount) {
Flags_SetSwitch(globalCtx, switchFlag);
- func_80080480(globalCtx, &this->actor);
+ OnePointCutscene_Attention(globalCtx, &this->actor);
this->litTimer = -1;
} else {
this->litTimer = (litTimeScale * 50) + 110;
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 8d03d921a..e7d008766 100644
--- a/src/overlays/actors/ovl_Obj_Timeblock/z_obj_timeblock.c
+++ b/src/overlays/actors/ovl_Obj_Timeblock/z_obj_timeblock.c
@@ -218,7 +218,7 @@ void ObjTimeblock_Normal(ObjTimeblock* this, GlobalContext* globalCtx) {
this->demoEffectTimer = 160;
// Possibly points the camera to this actor
- func_80080480(globalCtx, &this->dyna.actor);
+ OnePointCutscene_Attention(globalCtx, &this->dyna.actor);
// "◯◯◯◯ Time Block Attention Camera (frame counter %d)\n"
osSyncPrintf("◯◯◯◯ Time Block 注目カメラ (frame counter %d)\n", globalCtx->state.frames);
@@ -275,7 +275,7 @@ void ObjTimeblock_AltBehaviorVisible(ObjTimeblock* this, GlobalContext* globalCt
this->demoEffectFirstPartTimer = 12;
ObjTimeblock_SpawnDemoEffect(this, globalCtx);
this->demoEffectTimer = 160;
- func_80080480(globalCtx, &this->dyna.actor);
+ OnePointCutscene_Attention(globalCtx, &this->dyna.actor);
// "Time Block Attention Camera (frame counter)"
osSyncPrintf("◯◯◯◯ Time Block 注目カメラ (frame counter %d)\n", globalCtx->state.frames);
ObjTimeblock_ToggleSwitchFlag(globalCtx, this->dyna.actor.params & 0x3F);
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 1b8341880..2444b93a8 100644
--- a/src/overlays/actors/ovl_Obj_Warp2block/z_obj_warp2block.c
+++ b/src/overlays/actors/ovl_Obj_Warp2block/z_obj_warp2block.c
@@ -281,7 +281,7 @@ void func_80BA2610(ObjWarp2block* this, GlobalContext* globalCtx) {
if ((func_80BA2304(this, globalCtx) != 0) && (this->unk_16C <= 0)) {
ObjWarp2block_Spawn(this, globalCtx);
this->unk_16C = 0xA0;
- func_80080480(globalCtx, &this->dyna.actor);
+ OnePointCutscene_Attention(globalCtx, &this->dyna.actor);
this->unk_170 = 0xC;
}
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 338c9aeb7..556b3e17b 100644
--- a/src/overlays/actors/ovl_Shot_Sun/z_shot_sun.c
+++ b/src/overlays/actors/ovl_Shot_Sun/z_shot_sun.c
@@ -91,23 +91,22 @@ void ShotSun_SpawnFairy(ShotSun* this, GlobalContext* globalCtx) {
if (this->timer > 0) {
this->timer--;
- return;
- }
-
- switch (params) {
- case 0x40:
- fairyType = FAIRY_HEAL_BIG;
- break;
- case 0x41:
- fairyType = FAIRY_HEAL_BIG;
- break;
- }
+ } else {
+ switch (params) {
+ case 0x40:
+ fairyType = FAIRY_HEAL_BIG;
+ break;
+ case 0x41:
+ fairyType = FAIRY_HEAL_BIG;
+ break;
+ }
- //! @bug fairyType may be uninitialized
- Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_ELF, this->actor.home.pos.x, this->actor.home.pos.y,
- this->actor.home.pos.z, 0, 0, 0, fairyType);
+ //! @bug fairyType may be uninitialized
+ Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_ELF, this->actor.home.pos.x, this->actor.home.pos.y,
+ this->actor.home.pos.z, 0, 0, 0, fairyType);
- Actor_Kill(&this->actor);
+ Actor_Kill(&this->actor);
+ }
}
void ShotSun_TriggerFairy(ShotSun* this, GlobalContext* globalCtx) {
@@ -141,14 +140,11 @@ void func_80BADF0C(ShotSun* this, GlobalContext* globalCtx) {
if (this->unk_1A4 == 1) {
func_8010BD58(globalCtx, 1);
this->unk_1A4 = 2;
- return;
- }
-
- if (this->unk_1A4 == 2 && globalCtx->msgCtx.unk_E3EE == 4) {
+ } else if (this->unk_1A4 == 2 && globalCtx->msgCtx.unk_E3EE == 4) {
if ((params == 0x40 && globalCtx->msgCtx.unk_E3EC == 9) ||
(params == 0x41 && globalCtx->msgCtx.unk_E3EC == 0xB)) {
this->actionFunc = ShotSun_TriggerFairy;
- func_80080480(globalCtx, &this->actor);
+ OnePointCutscene_Attention(globalCtx, &this->actor);
this->timer = 0;
} else {
this->unk_1A4 = 0;
@@ -186,10 +182,10 @@ void ShotSun_UpdateHyliaSun(ShotSun* this, GlobalContext* globalCtx) {
}
Actor_Kill(&this->actor);
} else {
- if (!(120.0f < this->actor.xzDistToPlayer) && gSaveContext.dayTime >= 0x4555 && gSaveContext.dayTime < 0x5000) {
- cylinderPos.x = player->bodyPartsPos[7].x + globalCtx->envCtx.unk_04.x * 0.16666667f;
- cylinderPos.y = player->bodyPartsPos[7].y - 30.0f + globalCtx->envCtx.unk_04.y * 0.16666667f;
- cylinderPos.z = player->bodyPartsPos[7].z + globalCtx->envCtx.unk_04.z * 0.16666667f;
+ if (!(this->actor.xzDistToPlayer > 120.0f) && gSaveContext.dayTime >= 0x4555 && gSaveContext.dayTime < 0x5000) {
+ cylinderPos.x = player->bodyPartsPos[7].x + globalCtx->envCtx.unk_04.x * (1.0f / 6.0f);
+ cylinderPos.y = player->bodyPartsPos[7].y - 30.0f + globalCtx->envCtx.unk_04.y * (1.0f / 6.0f);
+ cylinderPos.z = player->bodyPartsPos[7].z + globalCtx->envCtx.unk_04.z * (1.0f / 6.0f);
this->hitboxPos = cylinderPos;
@@ -201,5 +197,6 @@ void ShotSun_UpdateHyliaSun(ShotSun* this, GlobalContext* globalCtx) {
void ShotSun_Update(Actor* thisx, GlobalContext* globalCtx) {
ShotSun* this = THIS;
+
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 64513b48f..261091093 100644
--- a/src/overlays/actors/ovl_player_actor/z_player.c
+++ b/src/overlays/actors/ovl_player_actor/z_player.c
@@ -417,7 +417,7 @@ PlayerAgeProperties sAgeProperties[] = {
{
40.0f,
60.0f,
- 0.6470588446f,
+ 11.0f / 17.0f,
71.0f,
50.0f,
47.0f,
@@ -428,7 +428,7 @@ PlayerAgeProperties sAgeProperties[] = {
29.6f,
32.0f,
48.0f,
- 45.29412079f,
+ 70.0f * (11.0f / 17.0f),
14.0f,
12.0f,
55.0f,
@@ -1137,11 +1137,11 @@ void func_80832318(Player* this) {
void func_80832340(GlobalContext* globalCtx, Player* this) {
Camera* camera;
- if (this->unk_46C != -1) {
+ if (this->unk_46C != SUBCAM_NONE) {
camera = globalCtx->cameraPtrs[this->unk_46C];
- if ((camera != NULL) && (camera->unk_168 == 1100)) {
- func_800803F0(globalCtx, this->unk_46C);
- this->unk_46C = -1;
+ if ((camera != NULL) && (camera->csId == 1100)) {
+ OnePointCutscene_EndCutscene(globalCtx, this->unk_46C);
+ this->unk_46C = SUBCAM_NONE;
}
}
@@ -1925,8 +1925,8 @@ void func_808340DC(Player* this, GlobalContext* globalCtx) {
void func_80834298(Player* this, GlobalContext* globalCtx) {
if ((this->actor.category == ACTORCAT_PLAYER) && !(this->stateFlags1 & 0x100) &&
((this->heldItemActionParam == this->itemActionParam) || (this->stateFlags1 & 0x400000)) &&
- (gSaveContext.health != 0) && (globalCtx->csCtx.state == 0) && (this->csMode == 0) &&
- (globalCtx->shootingGalleryStatus == 0) && (globalCtx->activeCamera == 0) &&
+ (gSaveContext.health != 0) && (globalCtx->csCtx.state == CS_STATE_IDLE) && (this->csMode == 0) &&
+ (globalCtx->shootingGalleryStatus == 0) && (globalCtx->activeCamera == MAIN_CAM) &&
(globalCtx->sceneLoadFlag != 0x14) && (gSaveContext.timer1State != 10)) {
func_80833DF8(this, globalCtx);
}
@@ -2778,7 +2778,7 @@ void func_80836448(GlobalContext* globalCtx, Player* this, LinkAnimationHeader*
gSaveContext.nightSeqIndex = 0xFF;
}
- func_800800F8(globalCtx, 0x264E, cond ? 120 : 60, &this->actor, 0);
+ OnePointCutscene_Init(globalCtx, 9806, cond ? 120 : 60, &this->actor, MAIN_CAM);
ShrinkWindow_SetVal(0x20);
}
}
@@ -2917,7 +2917,7 @@ void func_80836BEC(Player* this, GlobalContext* globalCtx) {
this->stateFlags1 &= ~0x40000000;
}
- if ((globalCtx->csCtx.state != 0) || (this->csMode != 0) || (this->stateFlags1 & 0x20000080) ||
+ if ((globalCtx->csCtx.state != CS_STATE_IDLE) || (this->csMode != 0) || (this->stateFlags1 & 0x20000080) ||
(this->stateFlags3 & 0x80)) {
this->unk_66C = 0;
} else if (zTrigPressed || (this->stateFlags2 & 0x2000) || (this->unk_684 != NULL)) {
@@ -4035,7 +4035,7 @@ s32 func_80839768(GlobalContext* globalCtx, Player* this, Vec3f* arg2, Collision
func_808395DC(this, &this->actor.world.pos, arg2, &sp38);
- return BgCheck_EntityLineTest1(&globalCtx->colCtx, &sp44, &sp38, arg5, arg3, 1, 0, 0, 1, arg4);
+ return BgCheck_EntityLineTest1(&globalCtx->colCtx, &sp44, &sp38, arg5, arg3, true, false, false, true, arg4);
}
s32 func_80839800(Player* this, GlobalContext* globalCtx) {
@@ -4423,8 +4423,8 @@ s32 func_8083A6AC(Player* this, GlobalContext* globalCtx) {
sp74.y = this->actor.world.pos.y;
sp74.z = this->actor.prevPos.z + (sp74.z * temp1);
- if (BgCheck_EntityLineTest1(&globalCtx->colCtx, &this->actor.world.pos, &sp74, &sp68, &sp84, 1, 0, 0, 1,
- &sp80) &&
+ if (BgCheck_EntityLineTest1(&globalCtx->colCtx, &this->actor.world.pos, &sp74, &sp68, &sp84, true, false, false,
+ true, &sp80) &&
(ABS(sp84->normal.y) < 600)) {
f32 nx = COLPOLY_GET_NORMAL(sp84->normal.x);
f32 ny = COLPOLY_GET_NORMAL(sp84->normal.y);
@@ -4612,7 +4612,7 @@ void func_8083AF44(GlobalContext* globalCtx, Player* this, s32 magicSpell) {
LinkAnimation_PlayOnceSetSpeed(globalCtx, &this->skelAnime, &gPlayer326Anim, 0.83f);
if (magicSpell == 5) {
- this->unk_46C = func_800800F8(globalCtx, 1100, -101, NULL, 0);
+ this->unk_46C = OnePointCutscene_Init(globalCtx, 1100, -101, NULL, MAIN_CAM);
} else {
func_80835EA4(globalCtx, 10);
}
@@ -5700,8 +5700,8 @@ void func_8083DFE0(Player* this, f32* arg1, s16* arg2) {
}
struct_80854578 D_80854578[] = {
- { &gPlayer532Anim, 35.16999817f, 6.609999657f },
- { &gPlayer534Anim, -34.15999985f, 7.909999847f },
+ { &gPlayer532Anim, 35.17f, 6.6099997f },
+ { &gPlayer534Anim, -34.16f, 7.91f },
};
s32 func_8083E0FC(Player* this, GlobalContext* globalCtx) {
@@ -5877,9 +5877,9 @@ s32 func_8083E5A8(Player* this, GlobalContext* globalCtx) {
this->stateFlags1 |= 0x20000C00;
func_8083AE40(this, giEntry->objectId);
this->actor.world.pos.x =
- chest->dyna.actor.world.pos.x - (Math_SinS(chest->dyna.actor.shape.rot.y) * 29.434299469f);
+ chest->dyna.actor.world.pos.x - (Math_SinS(chest->dyna.actor.shape.rot.y) * 29.4343f);
this->actor.world.pos.z =
- chest->dyna.actor.world.pos.z - (Math_CosS(chest->dyna.actor.shape.rot.y) * 29.434299469f);
+ chest->dyna.actor.world.pos.z - (Math_CosS(chest->dyna.actor.shape.rot.y) * 29.4343f);
this->currentYaw = this->actor.shape.rot.y = chest->dyna.actor.shape.rot.y;
func_80832224(this);
@@ -6159,7 +6159,8 @@ s32 func_8083F360(GlobalContext* globalCtx, Player* this, f32 arg1, f32 arg2, f3
sp60.z = this->actor.world.pos.z + (arg3 * yawCos);
sp60.y = sp6C.y = this->actor.world.pos.y + arg1;
- if (BgCheck_EntityLineTest1(&globalCtx->colCtx, &sp6C, &sp60, &sp54, &this->actor.wallPoly, 1, 0, 0, 1, &sp78)) {
+ if (BgCheck_EntityLineTest1(&globalCtx->colCtx, &sp6C, &sp60, &sp54, &this->actor.wallPoly, true, false, false,
+ true, &sp78)) {
wallPoly = this->actor.wallPoly;
this->actor.bgCheckFlags |= 0x200;
@@ -6205,13 +6206,13 @@ s32 func_8083F570(Player* this, GlobalContext* globalCtx) {
this->actor.shape.rot.y = this->actor.wallYaw + 0x8000;
func_80832264(globalCtx, this, &gPlayer129Anim);
func_80832F54(globalCtx, this, 0x9D);
- func_800800F8(globalCtx, 0x2581, 999, NULL, 0);
+ OnePointCutscene_Init(globalCtx, 9601, 999, NULL, MAIN_CAM);
} else {
this->actor.shape.rot.y = this->actor.wallYaw;
LinkAnimation_Change(globalCtx, &this->skelAnime, &gPlayer130Anim, -1.0f,
Animation_GetLastFrame(&gPlayer130Anim), 0.0f, ANIMMODE_ONCE, 0.0f);
func_80832F54(globalCtx, this, 0x9D);
- func_800800F8(globalCtx, 0x2582, 999, NULL, 0);
+ OnePointCutscene_Init(globalCtx, 9602, 999, NULL, MAIN_CAM);
}
this->currentYaw = this->actor.shape.rot.y;
@@ -6867,7 +6868,7 @@ void func_80841138(Player* this, GlobalContext* globalCtx) {
func_8084029C(this, 1.2f + ((REG(38) / 1000.0f) * temp2));
}
LinkAnimation_LoadToMorph(globalCtx, &this->skelAnime, D_80853BFC[this->modelAnimType], this->unk_868);
- LinkAnimation_LoadToJoint(globalCtx, &this->skelAnime, &gPlayer347Anim, this->unk_868 * 0.551724135876f);
+ LinkAnimation_LoadToJoint(globalCtx, &this->skelAnime, &gPlayer347Anim, this->unk_868 * (16.0f / 29.0f));
}
}
@@ -6980,18 +6981,15 @@ void func_808417FC(Player* this, GlobalContext* globalCtx) {
}
void func_80841860(GlobalContext* globalCtx, Player* this) {
- s32 pad;
- LinkAnimationHeader* sp38;
- LinkAnimationHeader* sp34;
f32 frame;
+ LinkAnimationHeader* sp38 = D_80853914[this->modelAnimType + 144];
+ LinkAnimationHeader* sp34 = D_80853914[this->modelAnimType + 150];
- sp38 = D_80853914[this->modelAnimType + 144];
- sp34 = D_80853914[this->modelAnimType + 150];
this->skelAnime.animation = sp38;
func_8084029C(this, (REG(30) / 1000.0f) + ((REG(32) / 1000.0f) * this->linearVelocity));
- frame = this->unk_868 * 0.551724135876f;
+ frame = this->unk_868 * (16.0f / 29.0f);
LinkAnimation_BlendToJoint(globalCtx, &this->skelAnime, sp34, frame, sp38, frame, this->unk_870, this->blendTable);
}
@@ -7171,7 +7169,8 @@ void func_80841EE4(Player* this, GlobalContext* globalCtx) {
func_80841CC4(this, 1, globalCtx);
- LinkAnimation_LoadToJoint(globalCtx, &this->skelAnime, func_80833438(this), this->unk_868 * 0.689655185f);
+ LinkAnimation_LoadToJoint(globalCtx, &this->skelAnime, func_80833438(this),
+ this->unk_868 * (20.0f / 29.0f));
}
}
@@ -7467,9 +7466,9 @@ s32 func_80842DF4(GlobalContext* globalCtx, Player* this) {
sp68.y = this->swordInfo[0].tip.y + (sp50.y * phi_f2);
sp68.z = this->swordInfo[0].tip.z + (sp50.z * phi_f2);
- if ((BgCheck_EntityLineTest1(&globalCtx->colCtx, &sp68, &this->swordInfo[0].tip, &sp5C, &sp78, 1, 0,
- 0, 1, &sp74) != 0) &&
- (SurfaceType_IsIgnoredByEntities(&globalCtx->colCtx, sp78, sp74) == 0) &&
+ if (BgCheck_EntityLineTest1(&globalCtx->colCtx, &sp68, &this->swordInfo[0].tip, &sp5C, &sp78, true,
+ false, false, true, &sp74) &&
+ !SurfaceType_IsIgnoredByEntities(&globalCtx->colCtx, sp78, sp74) &&
(func_80041D4C(&globalCtx->colCtx, sp78, sp74) != 6) &&
(func_8002F9EC(globalCtx, &this->actor, sp78, sp74, &sp5C) == 0)) {
@@ -7787,7 +7786,7 @@ void func_80843AE8(GlobalContext* globalCtx, Player* this) {
this->unk_850 = 60;
Player_SpawnFairy(globalCtx, this, &this->actor.world.pos, &D_808545E4, FAIRY_REVIVE_DEATH);
func_8002F7DC(&this->actor, NA_SE_EV_FIATY_HEAL - SFX_FLAG);
- func_800800F8(globalCtx, 0x26B4, 125, &this->actor, 0);
+ OnePointCutscene_Init(globalCtx, 9908, 125, &this->actor, MAIN_CAM);
} else if (globalCtx->gameOverCtx.state == GAMEOVER_DEATH_WAIT_GROUND) {
globalCtx->gameOverCtx.state = GAMEOVER_DEATH_DELAY_MENU;
}
@@ -8272,7 +8271,7 @@ void func_80845000(Player* this, GlobalContext* globalCtx) {
sp58 = CLAMP(sp5C * 0.5f, 0.5f, 1.0f);
LinkAnimation_BlendToJoint(globalCtx, &this->skelAnime, D_80854360[Player_HoldsTwoHandedWeapon(this)], 0.0f,
- D_80854370[Player_HoldsTwoHandedWeapon(this)], this->unk_868 * 0.7241379022598267f, sp58,
+ D_80854370[Player_HoldsTwoHandedWeapon(this)], this->unk_868 * (21.0f / 29.0f), sp58,
this->blendTable);
if (!func_80842964(this, globalCtx) && !func_80844BE4(this, globalCtx)) {
@@ -8340,7 +8339,7 @@ void func_80845308(Player* this, GlobalContext* globalCtx) {
sp58 = CLAMP(sp5C * 0.5f, 0.5f, 1.0f);
LinkAnimation_BlendToJoint(globalCtx, &this->skelAnime, D_80854360[Player_HoldsTwoHandedWeapon(this)], 0.0f,
- D_80854378[Player_HoldsTwoHandedWeapon(this)], this->unk_868 * 0.7241379022598267f, sp58,
+ D_80854378[Player_HoldsTwoHandedWeapon(this)], this->unk_868 * (21.0f / 29.0f), sp58,
this->blendTable);
if (!func_80842964(this, globalCtx) && !func_80844BE4(this, globalCtx)) {
@@ -8913,7 +8912,7 @@ void func_808468E8(GlobalContext* globalCtx, Player* this) {
func_80835C58(globalCtx, this, func_8084F9C0, 0);
this->stateFlags1 |= 0x20000000;
this->fallStartHeight = this->actor.world.pos.y;
- func_800800F8(globalCtx, 0x13F6, 40, &this->actor, 0);
+ OnePointCutscene_Init(globalCtx, 5110, 40, &this->actor, MAIN_CAM);
}
void func_80846978(GlobalContext* globalCtx, Player* this) {
@@ -8966,7 +8965,7 @@ void Player_InitCommon(Player* this, GlobalContext* globalCtx, FlexSkeletonHeade
Effect_Add(globalCtx, &this->swordEffectIndex, EFFECT_BLURE2, 0, 0, &D_8085470C);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawFeet, this->ageProperties->unk_04);
- this->unk_46C = -1;
+ this->unk_46C = SUBCAM_NONE;
Collider_InitCylinder(globalCtx, &this->cylinder);
Collider_SetCylinder(globalCtx, &this->cylinder, &this->actor, &D_80854624);
@@ -10047,14 +10046,15 @@ void Player_UpdateCommon(Player* this, GlobalContext* globalCtx, Input* input) {
}
}
- if ((globalCtx->csCtx.state != 0) && (this->csMode != 6) && !(this->stateFlags1 & 0x800000) &&
+ if ((globalCtx->csCtx.state != CS_STATE_IDLE) && (this->csMode != 6) && !(this->stateFlags1 & 0x800000) &&
!(this->stateFlags2 & 0x80) && (this->actor.category == ACTORCAT_PLAYER)) {
CsCmdActorAction* linkActionCsCmd = globalCtx->csCtx.linkAction;
if ((linkActionCsCmd != NULL) && (D_808547C4[linkActionCsCmd->action] != 0)) {
func_8002DF54(globalCtx, NULL, 6);
func_80832210(this);
- } else if ((this->csMode == 0) && !(this->stateFlags2 & 0x400) && (globalCtx->csCtx.state != 3)) {
+ } else if ((this->csMode == 0) && !(this->stateFlags2 & 0x400) &&
+ (globalCtx->csCtx.state != CS_STATE_UNSKIPPABLE_INIT)) {
func_8002DF54(globalCtx, NULL, 0x31);
func_80832210(this);
}
@@ -10311,7 +10311,7 @@ void func_8084A0E8(GlobalContext* globalCtx, Player* this, s32 lod, Gfx* cullDLi
D_8085486C = (-sp5C * 4) + 36;
D_8085486C = D_8085486C * D_8085486C;
D_8085486C = (s32)((Math_CosS(D_8085486C) * 100.0f) + 100.0f) + 55.0f;
- D_8085486C = D_8085486C * (sp5C * 0.11111111f);
+ D_8085486C = D_8085486C * (sp5C * (1.0f / 9.0f));
}
func_800D1694(this->actor.world.pos.x, this->actor.world.pos.y + 2.0f, this->actor.world.pos.z,
@@ -10813,7 +10813,8 @@ void func_8084B9E4(Player* this, GlobalContext* globalCtx) {
sp44.x = this->actor.world.pos.x;
sp44.z = this->actor.world.pos.z;
sp44.y = sp5C.y;
- if (BgCheck_EntityLineTest1(&globalCtx->colCtx, &sp44, &sp5C, &sp38, &sp54, 1, 0, 0, 1, &sp50) == 0) {
+ if (!BgCheck_EntityLineTest1(&globalCtx->colCtx, &sp44, &sp5C, &sp38, &sp54, true, false, false, true,
+ &sp50)) {
func_8084B840(globalCtx, this, -2.0f);
return;
}
@@ -11185,7 +11186,7 @@ s32 func_8084C9BC(Player* this, GlobalContext* globalCtx) {
}
}
- if ((globalCtx->csCtx.state == 0) && (globalCtx->transitionMode == 0) &&
+ if ((globalCtx->csCtx.state == CS_STATE_IDLE) && (globalCtx->transitionMode == 0) &&
(EN_HORSE_CHECK_1(rideActor) || EN_HORSE_CHECK_4(rideActor))) {
this->stateFlags2 |= 0x400000;
@@ -11339,7 +11340,7 @@ void func_8084CC98(Player* this, GlobalContext* globalCtx) {
AnimationContext_SetCopyAll(globalCtx, this->skelAnime.limbCount, this->skelAnime.morphTable,
this->skelAnime.jointTable);
- if ((globalCtx->csCtx.state != 0) || (this->csMode != 0)) {
+ if ((globalCtx->csCtx.state != CS_STATE_IDLE) || (this->csMode != 0)) {
if (this->csMode == 7) {
this->csMode = 0;
}
@@ -12352,7 +12353,7 @@ void func_8084F710(Player* this, GlobalContext* globalCtx) {
return;
}
- if ((globalCtx->csCtx.state != 0) && (globalCtx->csCtx.linkAction != NULL)) {
+ if ((globalCtx->csCtx.state != CS_STATE_IDLE) && (globalCtx->csCtx.linkAction != NULL)) {
f32 sp28 = this->actor.world.pos.y;
func_808529D0(globalCtx, this, globalCtx->csCtx.linkAction);
this->actor.world.pos.y = sp28;
@@ -13346,7 +13347,7 @@ void func_808515A4(GlobalContext* globalCtx, Player* this, CsCmdActorAction* arg
void func_80851688(GlobalContext* globalCtx, Player* this, CsCmdActorAction* arg2) {
if (func_8084B3CC(globalCtx, this) == 0) {
- if ((this->csMode == 0x31) && (globalCtx->csCtx.state == 0)) {
+ if ((this->csMode == 0x31) && (globalCtx->csCtx.state == CS_STATE_IDLE)) {
func_8002DF54(globalCtx, NULL, 7);
return;
}
@@ -13916,7 +13917,7 @@ void func_80852C50(GlobalContext* globalCtx, Player* this, CsCmdActorAction* arg
s32 pad;
s32 sp24;
- if (globalCtx->csCtx.state == 3) {
+ if (globalCtx->csCtx.state == CS_STATE_UNSKIPPABLE_INIT) {
func_8002DF54(globalCtx, NULL, 7);
this->unk_446 = 0;
func_80832210(this);
diff --git a/src/overlays/effects/ovl_Effect_Ss_En_Fire/z_eff_ss_en_fire.c b/src/overlays/effects/ovl_Effect_Ss_En_Fire/z_eff_ss_en_fire.c
index 8ce179f3f..c155950cd 100644
--- a/src/overlays/effects/ovl_Effect_Ss_En_Fire/z_eff_ss_en_fire.c
+++ b/src/overlays/effects/ovl_Effect_Ss_En_Fire/z_eff_ss_en_fire.c
@@ -74,7 +74,7 @@ void EffectSsEnFire_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) {
Matrix_Translate(this->pos.x, this->pos.y, this->pos.z, MTXMODE_NEW);
camYaw = (Camera_GetCamDirYaw(ACTIVE_CAM) + 0x8000);
- Matrix_RotateY(camYaw * 0.0000958738f, MTXMODE_APPLY);
+ Matrix_RotateY(camYaw * (M_PI / 0x8000), MTXMODE_APPLY);
scale = Math_SinS(this->life * 0x333) * (this->rScale * 0.00005f);
Matrix_Scale(scale, scale, scale, MTXMODE_APPLY);
@@ -127,8 +127,8 @@ void EffectSsEnFire_Update(GlobalContext* globalCtx, u32 index, EffectSs* this)
if (this->rBodyPart < 0) {
Matrix_Translate(this->actor->world.pos.x, this->actor->world.pos.y, this->actor->world.pos.z,
MTXMODE_NEW);
- Matrix_RotateY((this->rYaw + this->actor->shape.rot.y) * 0.0000958738f, MTXMODE_APPLY);
- Matrix_RotateX((this->rPitch + this->actor->shape.rot.x) * 0.0000958738f, MTXMODE_APPLY);
+ Matrix_RotateY((this->rYaw + this->actor->shape.rot.y) * (M_PI / 0x8000), MTXMODE_APPLY);
+ Matrix_RotateX((this->rPitch + this->actor->shape.rot.x) * (M_PI / 0x8000), MTXMODE_APPLY);
Matrix_MultVec3f(&this->vec, &this->pos);
} else {
if ((this->rFlags & 0x8000)) {
diff --git a/src/overlays/effects/ovl_Effect_Ss_En_Ice/z_eff_ss_en_ice.c b/src/overlays/effects/ovl_Effect_Ss_En_Ice/z_eff_ss_en_ice.c
index a28f8c66d..59bec0fad 100644
--- a/src/overlays/effects/ovl_Effect_Ss_En_Ice/z_eff_ss_en_ice.c
+++ b/src/overlays/effects/ovl_Effect_Ss_En_Ice/z_eff_ss_en_ice.c
@@ -111,8 +111,8 @@ void EffectSsEnIce_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) {
Matrix_Translate(this->pos.x, this->pos.y, this->pos.z, MTXMODE_NEW);
Matrix_Scale(scale, scale, scale, MTXMODE_APPLY);
- Matrix_RotateY(this->rYaw * 0.0000958738f, MTXMODE_APPLY);
- Matrix_RotateX(this->rPitch * 0.0000958738f, MTXMODE_APPLY);
+ Matrix_RotateY(this->rYaw * (M_PI / 0x8000), MTXMODE_APPLY);
+ Matrix_RotateX(this->rPitch * (M_PI / 0x8000), MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_eff_en_ice.c", 261),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
diff --git a/src/overlays/effects/ovl_Effect_Ss_Fcircle/z_eff_ss_fcircle.c b/src/overlays/effects/ovl_Effect_Ss_Fcircle/z_eff_ss_fcircle.c
index 50fef5763..6faac64c9 100644
--- a/src/overlays/effects/ovl_Effect_Ss_Fcircle/z_eff_ss_fcircle.c
+++ b/src/overlays/effects/ovl_Effect_Ss_Fcircle/z_eff_ss_fcircle.c
@@ -57,7 +57,7 @@ void EffectSsFcircle_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) {
Matrix_Translate(this->pos.x, this->pos.y, this->pos.z, MTXMODE_NEW);
Matrix_Scale(xzScale, yScale, xzScale, MTXMODE_APPLY);
- Matrix_RotateY(this->rYaw * 0.0000958738f, MTXMODE_APPLY);
+ Matrix_RotateY(this->rYaw * (M_PI / 0x8000), MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_eff_fcircle.c", 163),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
func_80093D84(globalCtx->state.gfxCtx);
diff --git a/src/overlays/effects/ovl_Effect_Ss_Fire_Tail/z_eff_ss_fire_tail.c b/src/overlays/effects/ovl_Effect_Ss_Fire_Tail/z_eff_ss_fire_tail.c
index d94366e38..09066252e 100644
--- a/src/overlays/effects/ovl_Effect_Ss_Fire_Tail/z_eff_ss_fire_tail.c
+++ b/src/overlays/effects/ovl_Effect_Ss_Fire_Tail/z_eff_ss_fire_tail.c
@@ -103,8 +103,8 @@ void EffectSsFireTail_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this)
temp1 = fabsf(Math_CosS(yaw));
temp2 = Math_SinS(yaw);
dist = Math_Vec3f_DistXZ(&scale, &this->vec) / (this->rReg10 * 0.1f);
- Matrix_RotateY((s16)(Camera_GetCamDirYaw(ACTIVE_CAM) + 0x8000) * 0.0000958738f, MTXMODE_APPLY);
- Matrix_RotateZ(temp2 * this->rReg2 * dist * 0.017453292f, MTXMODE_APPLY);
+ Matrix_RotateY((s16)(Camera_GetCamDirYaw(ACTIVE_CAM) + 0x8000) * (M_PI / 0x8000), MTXMODE_APPLY);
+ Matrix_RotateZ(temp2 * this->rReg2 * dist * (M_PI / 180.0f), MTXMODE_APPLY);
temp2 = 1.0f - ((f32)(this->life + 1) / this->rLifespan);
temp2 = 1.0f - SQ(temp2);
scale.x = scale.y = scale.z = temp2 * (this->rScale * 0.000010000001f);
diff --git a/src/overlays/effects/ovl_Effect_Ss_Ice_Piece/z_eff_ss_ice_piece.c b/src/overlays/effects/ovl_Effect_Ss_Ice_Piece/z_eff_ss_ice_piece.c
index 2d1cb502c..1c787d369 100644
--- a/src/overlays/effects/ovl_Effect_Ss_Ice_Piece/z_eff_ss_ice_piece.c
+++ b/src/overlays/effects/ovl_Effect_Ss_Ice_Piece/z_eff_ss_ice_piece.c
@@ -65,8 +65,8 @@ void EffectSsIcePiece_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this)
Matrix_Translate(this->pos.x, this->pos.y, this->pos.z, MTXMODE_NEW);
Matrix_Scale(scale, scale, scale, MTXMODE_APPLY);
- Matrix_RotateY(this->rYaw * 0.0000958738f, MTXMODE_APPLY);
- Matrix_RotateX(this->rPitch * 0.0000958738f, MTXMODE_APPLY);
+ Matrix_RotateY(this->rYaw * (M_PI / 0x8000), MTXMODE_APPLY);
+ Matrix_RotateX(this->rPitch * (M_PI / 0x8000), MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(gfxCtx, "../z_eff_ice_piece.c", 185),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
func_80093D84(globalCtx->state.gfxCtx);
diff --git a/src/overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.c b/src/overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.c
index d795fc7be..e8c7cff42 100644
--- a/src/overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.c
+++ b/src/overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.c
@@ -93,7 +93,7 @@ void EffectSsKakera_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) {
f32 scale;
s32 colorIdx;
- scale = this->rScale * 0.00390625f;
+ scale = this->rScale / 256.0f;
colorIdx = this->rColorIdx;
OPEN_DISPS(gfxCtx, "../z_eff_kakera.c", 241);
@@ -154,9 +154,9 @@ void func_809A9C10(EffectSs* this) {
f32 temp_f20;
f32 temp_f0;
- temp_f18 = this->rReg5 * 0.0009765625f;
- temp_f20 = this->rReg6 * 0.0009765625f;
- temp_f14 = (this->rReg9 * 0.0009765625f) * 4.0f;
+ temp_f18 = this->rReg5 / 1024.0f;
+ temp_f20 = this->rReg6 / 1024.0f;
+ temp_f14 = (this->rReg9 / 1024.0f) * 4.0f;
temp_f2 = this->velocity.x - func_809A9818(0.0f, temp_f14);
temp_f16 = this->velocity.y - func_809A9818(0.0f, temp_f14);
@@ -286,7 +286,7 @@ s32 func_809A9FD8(EffectSs* this, Vec3f* diff, f32 dist) {
temp_a1 = (this->rReg0 >> 7) & 0xF;
temp_f0 = D_809AA588[temp_a1](dist, temp_a1);
- temp_f0 = func_809A9818(temp_f0, (this->rReg9 * temp_f0) * 0.0009765625f);
+ temp_f0 = func_809A9818(temp_f0, (this->rReg9 * temp_f0) / 1024.0f);
this->accel.x *= temp_f0;
this->accel.y *= temp_f0;
@@ -300,7 +300,7 @@ s32 func_809A9FD8(EffectSs* this, Vec3f* diff, f32 dist) {
}
s32 func_809AA0B8(EffectSs* this, Vec3f* diff, f32 dist) {
- this->accel.y += this->rGravity * 0.00390625f;
+ this->accel.y += this->rGravity / 256.0f;
return 1;
}