Skip to content

Commit

Permalink
Remove buttons from menu, fix random bgm on menu
Browse files Browse the repository at this point in the history
  • Loading branch information
kandowontu committed Jan 15, 2025
1 parent 1866761 commit 552a4ce
Show file tree
Hide file tree
Showing 6 changed files with 477 additions and 474 deletions.
14 changes: 7 additions & 7 deletions SAUCE/defines/menunametable.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const unsigned char gameover[187]={
};


const unsigned char game_start_screen[318]={ // main menu lol
const unsigned char game_start_screen[293]={
0x01,0xff,0x01,0x87,0x20,0x21,0x22,0x23,0x24,0x25,0x26,0x27,0x28,0x29,0x22,0x23,
0x22,0x2b,0x2c,0x2c,0xff,0x01,0x0f,0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,
0x39,0x32,0x33,0x3a,0x3b,0x3c,0x3d,0xff,0x01,0x0f,0x40,0xff,0x42,0x43,0x44,0x45,
Expand All @@ -43,22 +43,22 @@ const unsigned char game_start_screen[318]={ // main menu lol
0x64,0x65,0x66,0x67,0xff,0xff,0x60,0x61,0x62,0x63,0xff,0xff,0x58,0x59,0x5a,0x5b,
0xff,0x01,0x0f,0x74,0x75,0x76,0x77,0xff,0xff,0x70,0x71,0x72,0x73,0xff,0xff,0x68,
0x69,0x6a,0x77,0xff,0x01,0x0f,0x84,0x85,0x86,0x87,0xff,0xff,0x80,0x81,0x82,0x83,
0xff,0xff,0x84,0x85,0x86,0x87,0xff,0x01,0x53,0x78,0x79,0xff,0x01,0x03,0x7a,0x7b,
0xff,0x01,0x17,0x88,0x89,0xff,0x01,0x03,0x8a,0x8b,0xff,0x01,0x4b,0x10,0x11,0x01,
0x06,0x10,0x11,0x01,0x06,0x10,0x11,0x01,0x06,0x10,0x11,0x01,0x06,0x12,0x13,0x01,
0xff,0xff,0x84,0x85,0x86,0x87,0xff,0x01,0xc7,0x10,0x11,0x01,0x06,0x10,0x11,0x01,
0x06,0x10,0x11,0x01,0x06,0x10,0x11,0x01,0x06,0x12,0x13,0x01,0x06,0x12,0x13,0x01,
0x06,0x12,0x13,0x01,0x06,0x12,0x13,0x01,0x06,0x12,0x13,0x01,0x06,0x12,0x13,0x01,
0x06,0x12,0x13,0x01,0x06,0x12,0x13,0x01,0x06,0x12,0x13,0x01,0x06,0x12,0x13,0x01,
0x06,0x12,0x13,0x01,0x06,0x12,0x13,0x01,0x06,0x12,0x13,0x01,0x06,0x12,0x13,0x01,
0x06,0x12,0x13,0x01,0x06,0x12,0x13,0x01,0x06,0x12,0x13,0x01,0x06,0x12,0x13,0x01,
0x06,0x12,0x13,0x01,0x06,0x12,0x13,0x01,0x06,0x12,0x13,0x01,0x06,0x12,0x13,0x01,
0x06,0x12,0x13,0x01,0x06,0x12,0x13,0x01,0x06,0x12,0x13,0x01,0x06,0x12,0x13,0x01,
0x06,0x12,0x13,0x01,0x06,0x12,0x13,0x01,0x06,0x12,0x13,0x01,0x06,0x00,0x01,0x09,
0x55,0x01,0x03,0x00,0x01,0x0b,0x55,0x44,0x11,0x55,0x00,0x01,0x04,0x10,0x40,0x00,
0x01,0x02,0xf0,0x01,0x07,0xff,0x01,0x07,0x0f,0x01,0x06,0x0f,0x01,0x00
0x06,0x12,0x13,0x01,0x06,0x12,0x13,0x01,0x06,0x00,0x01,0x09,0x55,0x01,0x03,0x00,
0x01,0x0b,0x55,0x44,0x11,0x55,0x00,0x01,0x09,0xf0,0x01,0x07,0xff,0x01,0x07,0x0f,
0x01,0x06,0x0f,0x01,0x00
};




const unsigned char customizescreen[254]={
0x03,0x02,0x03,0x3f,0x06,0x07,0x06,0x07,0x0f,0xff,0x03,0x1a,0x08,0x09,0x08,0x09,
0xff,0x03,0x1b,0x06,0x07,0x0f,0xff,0x03,0x05,0xe3,0xf5,0xf3,0xf4,0xef,0xed,0xe9,
Expand Down
4 changes: 2 additions & 2 deletions SAUCE/gamestates/state_demo.h
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,6 @@ const uint8_t xbgm_lookup_table3[] = {
song_blast_processing,
song_toe_2,
song_endgame,
song_practice,
song_retray,
song_infernoplex,
song_problematic,
Expand All @@ -385,6 +384,7 @@ const uint8_t xbgm_lookup_table3[] = {
song_chaozfantasy,
song_just_right,
song_against_the_odds_redux,
song_practice,
};

void set_settings() {
Expand All @@ -396,7 +396,7 @@ void set_settings() {
case 2: // sfxoff
options ^= sfxoff; break;
case 3: // musicoff
options ^= musicoff; if (options & musicoff) { famistudio_music_stop(); music_update(); } else { music_play(xbgm_lookup_table3[newrand() & 31]); } break;
options ^= musicoff; if (options & musicoff) { famistudio_music_stop(); music_update(); } else { music_play(xbgm_lookup_table3[(newrand() & 31) + 1]); } break;
case 4: // jumpsound
options ^= jumpsound; break;
case 5:
Expand Down
2 changes: 1 addition & 1 deletion SAUCE/gamestates/state_lvldone.h
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,6 @@ const uint8_t xbgm_lookup_table2[] = {
song_blast_processing,
song_toe_2,
song_endgame,
song_practice,
song_retray,
song_infernoplex,
song_problematic,
Expand All @@ -696,6 +695,7 @@ const uint8_t xbgm_lookup_table2[] = {
song_chaozfantasy,
song_just_right,
song_against_the_odds_redux,
song_practice,
};


Expand Down
24 changes: 14 additions & 10 deletions SAUCE/gamestates/state_menu.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ const uint8_t xbgm_lookup_table[] = {
song_blast_processing,
song_toe_2,
song_endgame,
song_practice,
song_retray,
song_infernoplex,
song_problematic,
Expand All @@ -72,14 +71,15 @@ const uint8_t xbgm_lookup_table[] = {
song_chaozfantasy,
song_just_right,
song_against_the_odds_redux,
song_practice,
};


const uint8_t loNTAddrTableTitleScreen[]={
LSB(NTADR_A(9, 11)), // -1 = 4
LSB(NTADR_A(15, 11)), // 0
LSB(NTADR_A(21, 11)), // 1
LSB(NTADR_A(12, 17)), // 2
LSB(NTADR_A(15, 17)), // 2
LSB(NTADR_A(18, 17)), // 3
LSB(NTADR_A(27, 1)), // 4
LSB(NTADR_A(9, 11)), // 5 = 0
Expand All @@ -90,7 +90,7 @@ const uint8_t hiNTAddrTableTitleScreen[]={
MSB(NTADR_A(9, 11)), // -1 = 4
MSB(NTADR_A(15, 11)), // 0
MSB(NTADR_A(21, 11)), // 1
MSB(NTADR_A(12, 17)), // 2
MSB(NTADR_A(15, 17)), // 2
MSB(NTADR_A(18, 17)), // 3
MSB(NTADR_A(27, 1)), // 4
MSB(NTADR_A(9, 11)), // 5 = 0
Expand Down Expand Up @@ -201,7 +201,7 @@ void levelselection() {
cube_rotate[0] = 0;
cube_rotate[1] = 0;

if (menuMusicCurrentlyPlaying == 0 && !nestopia) music_play(xbgm_lookup_table[newrand() & 31]);
if (menuMusicCurrentlyPlaying == 0 && !nestopia) music_play(xbgm_lookup_table[(newrand() & 31) + 1]);
menuMusicCurrentlyPlaying = 1;

ppu_on_all();
Expand Down Expand Up @@ -806,7 +806,7 @@ void state_menu() {
if (!NTSC_SYS) multi_vram_buffer_horz(palsystem, sizeof(palsystem)-1, NTADR_A(9,7));
//mmc3_set_prg_bank_1(GET_BANK(state_menu));

if (menuMusicCurrentlyPlaying == 0 && !nestopia) music_play(xbgm_lookup_table[newrand() & 31]);
if (menuMusicCurrentlyPlaying == 0 && !nestopia) music_play(xbgm_lookup_table[(newrand() & 31) + 1]);
menuMusicCurrentlyPlaying = 1;

settingvalue = 0;
Expand Down Expand Up @@ -856,7 +856,7 @@ void state_menu() {
titlecolor3 = color3;
titlecolor2 = color2;
titlecolor1 = color1;
if (all_levels_complete != 0xFC) {
/* if (all_levels_complete != 0xFC) {
one_vram_buffer(0x19, NTADR_A(27,2));
one_vram_buffer(0x1A, NTADR_A(28,2));
one_vram_buffer(0x2D, NTADR_A(27,3));
Expand All @@ -868,7 +868,7 @@ void state_menu() {
one_vram_buffer(0x1D, NTADR_A(27,3));
one_vram_buffer(0x1E, NTADR_A(28,3));
}

*/
while (!(joypad1.press & (PAD_START | PAD_A)) || !coins_inserted){

if (joypad1.press & PAD_SELECT && coins_inserted != 255) {
Expand Down Expand Up @@ -1325,22 +1325,26 @@ void state_menu() {
// pal_col(6, tmp2);
// pal_col(5, oneShadeDarker(tmp2));
// pal_set_update();
pal_set_update();
discoframe++;
pal_set_update();
if (discoframe == 12) discoframe = 0;
}
dec_mouse_timer();
tmp3 = 0;

if (joypad1.press_right) {
if (menuselection == 5) menuselection = 0;
else if (menuselection == 1) { menuselection = 5; tmp3--; tmp3--; tmp3--; }
else menuselection++;
tmp3--;
menutimer = 0;
}
if (joypad1.press_left) {
if (menuselection == 0) menuselection = 5;
else if (menuselection == 5) { menuselection = 1; tmp3++; tmp3++; tmp3++; }
else menuselection--;
tmp3++;
menutimer = 0;
}

if (tmp3 ) { // menu selection incremented
Expand Down Expand Up @@ -1719,8 +1723,8 @@ void clear_shit() {
}

void check_if_music_stopped() {
if (songplaying && famistudio_song_speed == 0x80) { music_play(xbgm_lookup_table[newrand() & 31]); }
else if (famistudio_song_speed == 0x80) { music_play(xbgm_lookup_table[newrand() & 31]); }
if (songplaying && famistudio_song_speed == 0x80) { music_play(xbgm_lookup_table[(newrand() & 31) + 1]); }
else if (famistudio_song_speed == 0x80) { music_play(xbgm_lookup_table[(newrand() & 31) + 1]); }
}


Expand Down
Loading

0 comments on commit 552a4ce

Please sign in to comment.