mirror of
https://github.com/Polprzewodnikowy/N64FlashcartMenu.git
synced 2024-11-26 12:34:16 +01:00
Add extra rom info screen (#121)
<!--- Provide a general summary of your changes in the Title above --> ## Description <!--- Describe your changes in detail --> Move certain parameters to a seperate screen (messagebox). ## Motivation and Context <!--- What does this sample do? What problem does it solve? --> <!--- If it fixes/closes/resolves an open issue, please link to the issue here --> The ROM info was convoluted Builds on #120 ## How Has This Been Tested? <!-- (if applicable) --> <!--- Please describe in detail how you tested your sample/changes. --> <!--- Include details of your testing environment, and the tests you ran to --> <!--- see how your change affects other areas of the code, etc. --> ## Screenshots <!-- (if appropriate): --> ![image](https://github.com/Polprzewodnikowy/N64FlashcartMenu/assets/11439699/7d1626c0-3b8d-4e7d-8c3b-61f23744dc60) ## Types of changes <!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: --> - [x] Improvement (non-breaking change that adds a new feature) - [ ] Bug fix (fixes an issue) - [ ] Breaking change (breaking change) - [ ] Config and build (change in the configuration and build system, has no impact on code or features) ## Checklist: <!--- Go over all the following points, and put an `x` in all the boxes that apply. --> <!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! --> - [ ] My code follows the code style of this project. - [ ] My change requires a change to the documentation. - [ ] I have updated the documentation accordingly. - [ ] I have added tests to cover my changes. - [ ] All new and existing tests passed. <!--- It would be nice if you could sign off your contribution by replacing the name with your GitHub user name and GitHub email contact. --> Signed-off-by: GITHUB_USER <GITHUB_USER_EMAIL>
This commit is contained in:
parent
fa4bdbbfb9
commit
73f848450d
@ -4,7 +4,7 @@
|
|||||||
#include "../sound.h"
|
#include "../sound.h"
|
||||||
#include "views.h"
|
#include "views.h"
|
||||||
|
|
||||||
|
static bool show_extra_info_message = false;
|
||||||
static bool load_pending;
|
static bool load_pending;
|
||||||
static component_boxart_t *boxart;
|
static component_boxart_t *boxart;
|
||||||
|
|
||||||
@ -203,6 +203,13 @@ static void process (menu_t *menu) {
|
|||||||
} else if (menu->actions.options) {
|
} else if (menu->actions.options) {
|
||||||
component_context_menu_show(&options_context_menu);
|
component_context_menu_show(&options_context_menu);
|
||||||
sound_play_effect(SFX_SETTING);
|
sound_play_effect(SFX_SETTING);
|
||||||
|
} else if (menu->actions.lz_context) {
|
||||||
|
if (show_extra_info_message) {
|
||||||
|
show_extra_info_message = false;
|
||||||
|
} else {
|
||||||
|
show_extra_info_message = true;
|
||||||
|
}
|
||||||
|
sound_play_effect(SFX_SETTING);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -240,10 +247,7 @@ static void draw (menu_t *menu, surface_t *d) {
|
|||||||
" Save type: %s\n"
|
" Save type: %s\n"
|
||||||
" TV type: %s\n"
|
" TV type: %s\n"
|
||||||
" Expansion PAK: %s\n"
|
" Expansion PAK: %s\n"
|
||||||
" CIC: %s\n"
|
" CIC: %s\n",
|
||||||
" Boot address: 0x%08lX\n"
|
|
||||||
" SDK version: %.1f%c\n"
|
|
||||||
" Clock Rate: %.2fMHz\n",
|
|
||||||
format_rom_endianness(menu->load.rom_info.endianness),
|
format_rom_endianness(menu->load.rom_info.endianness),
|
||||||
menu->load.rom_info.title,
|
menu->load.rom_info.title,
|
||||||
menu->load.rom_info.game_code[0], menu->load.rom_info.game_code[1], menu->load.rom_info.game_code[2], menu->load.rom_info.game_code[3],
|
menu->load.rom_info.game_code[0], menu->load.rom_info.game_code[1], menu->load.rom_info.game_code[2], menu->load.rom_info.game_code[3],
|
||||||
@ -254,10 +258,7 @@ static void draw (menu_t *menu, surface_t *d) {
|
|||||||
format_rom_save_type(rom_info_get_save_type(&menu->load.rom_info)),
|
format_rom_save_type(rom_info_get_save_type(&menu->load.rom_info)),
|
||||||
format_rom_tv_type(rom_info_get_tv_type(&menu->load.rom_info)),
|
format_rom_tv_type(rom_info_get_tv_type(&menu->load.rom_info)),
|
||||||
format_rom_expansion_pak_info(menu->load.rom_info.features.expansion_pak),
|
format_rom_expansion_pak_info(menu->load.rom_info.features.expansion_pak),
|
||||||
format_cic_type(rom_info_get_cic_type(&menu->load.rom_info)),
|
format_cic_type(rom_info_get_cic_type(&menu->load.rom_info))
|
||||||
menu->load.rom_info.boot_address,
|
|
||||||
(menu->load.rom_info.libultra.version / 10.0f), menu->load.rom_info.libultra.revision,
|
|
||||||
menu->load.rom_info.clock_rate
|
|
||||||
);
|
);
|
||||||
|
|
||||||
component_actions_bar_text_draw(
|
component_actions_bar_text_draw(
|
||||||
@ -268,12 +269,26 @@ static void draw (menu_t *menu, surface_t *d) {
|
|||||||
|
|
||||||
component_actions_bar_text_draw(
|
component_actions_bar_text_draw(
|
||||||
ALIGN_RIGHT, VALIGN_TOP,
|
ALIGN_RIGHT, VALIGN_TOP,
|
||||||
"\n"
|
"L|Z: Extra Info\n"
|
||||||
"R: Options"
|
"R: Options"
|
||||||
);
|
);
|
||||||
|
|
||||||
component_boxart_draw(boxart);
|
component_boxart_draw(boxart);
|
||||||
|
|
||||||
|
if (show_extra_info_message) {
|
||||||
|
component_messagebox_draw(
|
||||||
|
"EXTRA ROM INFO\n"
|
||||||
|
"\n"
|
||||||
|
" Boot address: 0x%08lX\n"
|
||||||
|
" SDK version: %.1f%c\n"
|
||||||
|
" Clock Rate: %.2fMHz\n\n\n"
|
||||||
|
"Press L|Z to return.\n",
|
||||||
|
menu->load.rom_info.boot_address,
|
||||||
|
(menu->load.rom_info.libultra.version / 10.0f), menu->load.rom_info.libultra.revision,
|
||||||
|
menu->load.rom_info.clock_rate
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
component_context_menu_draw(&options_context_menu);
|
component_context_menu_draw(&options_context_menu);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user