Merge pull request #188 from Cuyler36/m_bgm

Implement & link m_bgm
This commit is contained in:
Cuyler36
2023-12-13 18:20:28 -05:00
committed by GitHub
11 changed files with 3026 additions and 22 deletions
+5
View File
@@ -40,6 +40,11 @@ m_bg_item.c:
.text: [0x80378858, 0x803789F8]
.rodata: [0x806413E0, 0x806413F0]
.bss: [0x81263080, 0x81263088]
m_bgm.c:
.text: [0x803789F8, 0x8037D190]
.rodata: [0x806413F0, 0x80641438]
.data: [0x8064F658, 0x8064F818]
.bss: [0x81263088, 0x812633A0]
m_calendar.c:
.text: [0x8037D190, 0x8037DA54]
m_camera2.c:
+2 -2
View File
@@ -19,8 +19,8 @@ extern void sAdo_Calc_MicPosition_forTrig(f32* fcalc, u16* scalc, xyz_t* pos);
extern void sAdo_Calc_MicPosition_forLevel(f32* fcalc, u16* scalc, xyz_t* pos);
extern void sAdo_GameFrame();
extern void sAdo_BgmStart(s8 id);
extern void sAdo_BgmStop(s16 id);
extern void sAdo_BgmStart(u8 id);
extern void sAdo_BgmStop(u16 id);
extern void sAdo_SysTrgStart(u16 id);
extern void sAdo_PlyWalkSe(int walk, xyz_t* pos);
+2 -2
View File
@@ -9,9 +9,9 @@ extern "C" {
extern void Na_InitAudio(void (*fatal_callback)(), u8* load_addr, size_t load_size, u8* bootsound, size_t bootsound_size, BOOL cut_flag);
extern void Na_GameFrame();
extern void Na_BgmStart(s8);
extern void Na_BgmStart(u8);
extern void Na_BgmCrossfadeStart(u8);
extern void Na_BgmStop(s16);
extern void Na_BgmStop(u16);
extern void Na_SysTrgStart(u16);
extern void Na_PlyWalkSe(int, u16,f32);
extern void Na_PlyWalkSeRoom(int, u16, f32);
+39 -10
View File
@@ -2,26 +2,55 @@
#define M_BGM_H
#include "types.h"
#include "game_h.h"
#include "m_lib.h"
#ifdef __cplusplus
extern "C" {
#endif
extern void mBGM_ct();
extern void mBGM_reset();
extern void mBGMPsComp_make_ps_lost_fanfare(u8 bgm_no, u16 unk);
extern void mBGMPsComp_scene_mode(int scene_mode);
extern void mBGMPsComp_make_ps_wipe(u16 ps_wipe);
extern void mBGMPsComp_delete_ps_demo(u8 bgm_num, u16 stop_type);
extern void mBGMPsComp_make_ps_demo(u8 bgm_no, u16 stop_type);
extern void mBGMPsComp_museum_status(int museum_status);
extern void mBGMPsComp_make_ps_fanfare(u8 bgm_num, u16 stop_type);
extern void mBGMPsComp_make_ps_lost_fanfare(u8 bgm_num, u16 stop_type);
extern void mBGMPsComp_make_ps_wipe(u16 stop_type);
extern void mBGMPsComp_make_ps_quiet(u16 stop_type);
extern void mBGMPsComp_make_ps_co_quiet(u16 stop_type, s16 counter);
extern void mBGMPsComp_make_ps_fc_quiet(u16 stop_type);
extern void mBGMPsComp_make_ps_demo(u8 bgm_num, u16 stop_type);
extern void mBGMPsComp_make_ps_happening(u8 bgm_num, u16 stop_type);
extern void mBGMPsComp_make_ps_room(u8 bgm_num, u16 stop_type);
extern void mBGMPsComp_make_ps_quietField(u16 stop_type);
extern void mBGMPsComp_make_ps_fc_quietField(u16 stop_type);
extern void mBGMPsComp_make_ps_fieldSuddenEv(u8 bgm_num, u16 stop_type, u8 priority);
extern void mBGMPsComp_delete_ps_fanfare(u8 bgm_num, u16 stop_type);
extern void mBGMPsComp_delete_ps_wipe();
extern void mBGMPsComp_delete_ps_demo(u8 bgm_num, u16 stop_type);
extern void mBGMPsComp_delete_ps_happening(u8 bgm_num, u16 stop_type);
extern void mBGMPsComp_delete_ps_room(u8 bgm_num, u16 stop_type);
extern void mBGMPsComp_delete_ps_quietField();
extern void mBGMPsComp_make_ps_co_quiet(u16 stop_type, s16 frames);
extern void mBGMPsComp_delete_ps_fieldSuddenEv(u8 bgm_num, u16 stop_type);
extern void mBGMPsComp_volume_fishing_start();
extern void mBGMPsComp_volume_fishing_end();
extern void mBGMPsComp_volume_collect_insects_start();
extern void mBGMPsComp_volume_collect_insects_end();
extern void mBGMPsComp_volume_talk_start();
extern void mBGMPsComp_volume_talk_end();
extern void mBGMPsComp_volume_boat_start();
extern void mBGMPsComp_volume_boat_end();
extern void mBGMPsComp_pause(int state);
extern void mBGMPsComp_MDPlayerPos_make();
extern void mBGMPsComp_MDPlayerPos_delete();
extern void mBGMPsComp_MDPlayerPos_param_set(const xyz_t* pos, u16 angle, u16 md_type, u32 ongen_no);
extern void mBGMPsComp_scene_mode(u8 mode);
extern void mBGMPsComp_museum_status(u8 status);
extern int mBGMPsComp_execute_bgm_num_get();
extern void mBGMForce_inform_start();
extern void mBGMForce_inform_end();
extern void mBGMPsComp_pause(int pause_mode);
extern void mBGMForce_room_nonstop_start();
extern void mBGM_main(GAME* game);
extern void mBGM_ct();
extern void mBGM_init();
extern void mBGM_cleanup();
extern void mBGM_reset();
#ifdef __cplusplus
}
+1
View File
@@ -487,6 +487,7 @@ extern int mEv_CheckFirstIntro();
extern int mEv_CheckArbeit();
extern int mEv_CheckTitleDemo();
extern int mEv_check_status(int event, s16 status);
extern int mEv_check_status_edge(s16 status);
extern s8* mEv_get_common_area(int type, s8 id);
extern s8* mEv_reserve_common_area(int type, s8 id);
extern s8* mEv_get_save_area(int type, s8 id);
+1 -1
View File
@@ -25,7 +25,7 @@ extern void mPlib_Set_goal_player_demo_walk(f32 goal_x, f32 goal_z, f32 speed);
extern void mPlib_Set_able_hand_all_item_in_demo(s8 enable);
extern void mPlib_change_player_cloth_info_lv2(Private_c* priv, mActor_name_t cloth_name);
extern int mPlib_Get_address_able_display();
extern int mPlib_get_player_actor_main_index(GAME_PLAY* play);
extern int mPlib_get_player_actor_main_index(GAME* game);
extern int mPlib_check_player_actor_main_index_AllWade(GAME_PLAY* play);
extern int mPlib_request_main_demo_wait_type1(GAME_PLAY* play, int param_2, void* param_3);
extern int mPlib_request_main_talk_type1(GAME_PLAY* play, ACTOR* other_actor, int turn, int flag);
+4 -4
View File
@@ -49,11 +49,11 @@ extern void sAdo_GameFrame(){
Na_GameFrame();
}
extern void sAdo_BgmStart(s8 id){
extern void sAdo_BgmStart(u8 id){
Na_BgmStart(id);
}
extern void sAdo_BgmStop(s16 id){
extern void sAdo_BgmStop(u16 id){
Na_BgmStop(id);
}
extern void sAdo_SysTrgStart(u16 id){
@@ -261,9 +261,9 @@ extern void sAdo_MDPlayerPos(xyz_t* pos, u16 s1, u16 s2, int p){
Na_MDPlayerPos(scalc,s1,s2,p,fcalc);
}
extern void sAdo_BGMVolume(f32 f, u16 volume){
extern void sAdo_BGMVolume(f32 volume, u16 vol_move_ctr){
Na_BGMVolume(f,volume);
Na_BGMVolume(volume, vol_move_ctr);
}
extern void sAdo_BgmCrossfadeStart(u8 b){
+2969
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -1397,7 +1397,7 @@ static void Camera2_main_Normal_SetEndCenterPos_fromPlayer(GAME_PLAY* play, xyz_
Camera2_GetBorderScale(play, scale, &border_x0, &border_x1, &border_z0, &border_z1);
*end_center_pos = player->actor_class.eye.position;
if (mPlib_get_player_actor_main_index(play) == 114) {
if (mPlib_get_player_actor_main_index((GAME*)play) == 114) {
if (mFI_Wpos2BlockNum(&block_x, &block_z, player->actor_class.world.position)) {
if (block_x == 5) {
if (block_z == 7) {
+1 -1
View File
@@ -439,7 +439,7 @@ static int wait_talk_start() {
if (demo->data.talk.change_player) {
if (
mPlib_get_player_actor_main_index((GAME_PLAY*)gamePT) != 65 &&
mPlib_get_player_actor_main_index(gamePT) != 65 &&
mPlib_request_main_talk_type1((GAME_PLAY*)gamePT, demo->current.actor, demo->data.talk.turn, FALSE) == FALSE
) {
return FALSE;
+1 -1
View File
@@ -1169,7 +1169,7 @@ extern int mSC_LightHouse_travel_check() {
}
extern void mSC_change_player_freeze(GAME_PLAY* play) {
if (mPlib_get_player_actor_main_index(play) != 74) {
if (mPlib_get_player_actor_main_index((GAME*)play) != 74) {
mPlib_request_main_demo_wait_type1(play, 0, NULL);
}
}