Skip to content

Commit

Permalink
menu/menusub: match TsBGMInit
Browse files Browse the repository at this point in the history
  • Loading branch information
polybiusproxy committed Jan 19, 2025
1 parent 28aea98 commit 5202156
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 4 deletions.
31 changes: 31 additions & 0 deletions include/menu/menusub.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,37 @@ typedef struct { // 0x18
/* 0x14 */ u_int h;
} TSTEX_INF;

typedef struct { // 0xc
/* 0x0 */ u_short chan;
/* 0x2 */ u_short tapNo;
/* 0x4 */ int lpTimeF;
/* 0x8 */ int lpTime;
} MAPBGM;

typedef struct { // 0xc
/* 0x0 */ u_short vol;
/* 0x2 */ short bPause;
/* 0x4 */ int tim;
/* 0x8 */ MAPBGM *pbgm;
} BGMONE;

typedef struct { // 0xa0
/* 0x00 */ u_short vol;
/* 0x02 */ u_short state;
/* 0x04 */ u_short ttim;
/* 0x06 */ u_short ttim0;
/* 0x08 */ u_short wtLoad;
/* 0x0a */ u_short wtNo;
/* 0x0c */ u_short wtTim;
/* 0x0e */ u_short pad;
/* 0x10 */ u_short chgReq;
/* 0x12 */ u_short sndno;
/* 0x14 */ u_short oldno;
/* 0x16 */ u_short cstate;
/* 0x18 */ u_short ctim;
/* 0x1c */ BGMONE wbgm[11];
} BGMSTATE;

void TsMENU_InitSystem(void);
void TsMENU_EndSystem(void);
void TsMenu_RankingClear(void);
Expand Down
2 changes: 1 addition & 1 deletion progress/main_progress.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"schemaVersion": 1, "label": "main", "message": "38.9003%", "color": "darkorange"}
{"schemaVersion": 1, "label": "main", "message": "39.9022%", "color": "darkorange"}
2 changes: 1 addition & 1 deletion progress/menu_progress.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"schemaVersion": 1, "label": "menu", "message": "8.5458%", "color": "crimson"}
{"schemaVersion": 1, "label": "menu", "message": "8.5666%", "color": "crimson"}
2 changes: 1 addition & 1 deletion progress/total_progress.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"schemaVersion": 1, "label": "Total percentage", "message": "46.6340%", "color": "darkorange"}
{"schemaVersion": 1, "label": "Total percentage", "message": "46.8941%", "color": "darkorange"}
6 changes: 5 additions & 1 deletion src/menu/menusub.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ HOSI_OBJ *HOSIObj;

/* .bss */
extern TSREPPAD menuPadState[2][4];
extern BGMSTATE TsBGMState;

static int TsGetMenuPadIsRepeat(int no, int npad)
{
Expand Down Expand Up @@ -37,7 +38,10 @@ INCLUDE_ASM("menu/menusub", tsBGMONEflow);

INCLUDE_ASM("menu/menusub", tsBGMONEPause);

INCLUDE_ASM("menu/menusub", TsBGMInit);
void TsBGMInit(void)
{
memset(&TsBGMState, 0, sizeof(TsBGMState));
}

INCLUDE_ASM("menu/menusub", TsBGMPlay);

Expand Down

0 comments on commit 5202156

Please sign in to comment.