mirror of
https://github.com/mlaux/gb6.git
synced 2026-04-26 02:23:49 +00:00
add menu items to resedit, v1.4.0
This commit is contained in:
+16
-14
@@ -170,10 +170,6 @@ void InitToolbox(void)
|
||||
if (!audio_mac_available()) {
|
||||
DisableItem(GetMenuHandle(MENU_EDIT), EDIT_SOUND);
|
||||
}
|
||||
// Add GBC mode toggle to Options menu (after Key Mappings)
|
||||
InsertMenuItem(GetMenuHandle(MENU_EDIT), "\p(-", EDIT_KEY_MAPPINGS);
|
||||
InsertMenuItem(GetMenuHandle(MENU_EDIT), "\pRun as GBC", EDIT_KEY_MAPPINGS + 1);
|
||||
InsertMenuItem(GetMenuHandle(MENU_EDIT), "\pIgnore Double Speed", EDIT_KEY_MAPPINGS + 2);
|
||||
DrawMenuBar();
|
||||
|
||||
app_running = 1;
|
||||
@@ -412,8 +408,23 @@ static void UpdateMenuItems(void)
|
||||
CheckItem(menu, EDIT_LIMIT_FPS, limit_fps);
|
||||
CheckItem(menu, EDIT_SCALE_1X, screen_scale == 1);
|
||||
CheckItem(menu, EDIT_SCALE_2X, screen_scale == 2);
|
||||
CheckItem(menu, EDIT_GBC_MODE, gbc_enabled);
|
||||
CheckItem(menu, EDIT_IGNORE_DOUBLE_SPEED, ignore_double_speed);
|
||||
if (g_wp) {
|
||||
int supports_cgb = rom.cgb_flag == 0x80 || rom.cgb_flag == 0xC0;
|
||||
if (!supports_cgb) {
|
||||
// force menu item off for non-cgb roms so it's not disabled and checked
|
||||
// which would be confusing
|
||||
CheckItem(menu, EDIT_GBC_MODE, 0);
|
||||
} else {
|
||||
// show real state
|
||||
CheckItem(menu, EDIT_GBC_MODE, gbc_enabled);
|
||||
}
|
||||
DisableItem(menu, EDIT_GBC_MODE);
|
||||
} else {
|
||||
// no game loaded, CGB can be adjusted freely
|
||||
EnableItem(menu, EDIT_GBC_MODE);
|
||||
CheckItem(menu, EDIT_GBC_MODE, gbc_enabled);
|
||||
}
|
||||
}
|
||||
|
||||
void SetScreenScale(int scale)
|
||||
@@ -654,15 +665,6 @@ void OnMenuAction(long action)
|
||||
} else if (item == EDIT_GBC_MODE) {
|
||||
gbc_enabled = !gbc_enabled;
|
||||
CheckItem(GetMenuHandle(MENU_EDIT), EDIT_GBC_MODE, gbc_enabled);
|
||||
// Update dmg.cgb if emulator is running
|
||||
if (g_wp) {
|
||||
if (gbc_enabled && (rom.cgb_flag == 0x80 || rom.cgb_flag == 0xC0)) {
|
||||
cgb_init(&cgb_state, rom.cgb_flag);
|
||||
dmg.cgb = &cgb_state;
|
||||
} else {
|
||||
dmg.cgb = NULL;
|
||||
}
|
||||
}
|
||||
SavePreferences();
|
||||
} else if (item == EDIT_IGNORE_DOUBLE_SPEED) {
|
||||
ignore_double_speed = !ignore_double_speed;
|
||||
|
||||
+5
-5
@@ -28,7 +28,7 @@ extern BitMap offscreen_bmp;
|
||||
extern char offscreen_color_buf[];
|
||||
extern PixMap offscreen_pixmap;
|
||||
|
||||
#define APP_VERSION "1.3.1 ${GIT_SHA}"
|
||||
#define APP_VERSION "1.4.0 ${GIT_SHA}"
|
||||
|
||||
#define WINDOW_X 8
|
||||
#define WINDOW_Y 40
|
||||
@@ -61,10 +61,10 @@ extern PixMap offscreen_pixmap;
|
||||
#define EDIT_LIMIT_FPS 2
|
||||
#define EDIT_SCALE_1X 5
|
||||
#define EDIT_SCALE_2X 6
|
||||
#define EDIT_PREFERENCES 8
|
||||
#define EDIT_KEY_MAPPINGS 9
|
||||
#define EDIT_GBC_MODE 11
|
||||
#define EDIT_IGNORE_DOUBLE_SPEED 12
|
||||
#define EDIT_GBC_MODE 8
|
||||
#define EDIT_IGNORE_DOUBLE_SPEED 9
|
||||
#define EDIT_PREFERENCES 11
|
||||
#define EDIT_KEY_MAPPINGS 12
|
||||
|
||||
#define RES_MDEF_ID 128
|
||||
|
||||
|
||||
+18
-13
@@ -13,15 +13,18 @@ data 'BNDL' (128) {
|
||||
};
|
||||
|
||||
data 'DITL' (128) {
|
||||
$"0002 0000 0000 0041 00F0 0055 012C 0405" /* .......A...U.,.. */
|
||||
$"0002 0000 0000 006E 00F0 0082 012C 0405" /* .......n...Ç.,.. */
|
||||
$"436C 6F73 6558 0000 0000 0013 000A 0033" /* CloseX.........3 */
|
||||
$"002A 2002 0080 0000 0000 000A 0032 003C" /* .* ..Ä.......2.< */
|
||||
$"012C 884D 4772 6179 2042 7269 636B 3A20" /* .,àMGray Brick: */
|
||||
$"002A 2002 0080 0000 0000 000A 0032 006E" /* .* ..Ä.......2.n */
|
||||
$"012C 8882 4772 6179 2042 7269 636B 3A20" /* .,àÇGray Brick: */
|
||||
$"4742 2065 6D75 6C61 746F 7220 666F 7220" /* GB emulator for */
|
||||
$"3638 6B20 4D61 630D 3230 3133 2D32 3032" /* 68k Mac¬2013-202 */
|
||||
$"3620 636F 6E73 7463 6173 740D 6874 7470" /* 6 constcast¬http */
|
||||
$"3A2F 2F63 6F6E 7374 6361 7374 2E6F 7267" /* ://constcast.org */
|
||||
$"2F00" /* /. */
|
||||
$"3638 6B20 4D61 630D 6279 204D 6174 7468" /* 68k Mac¬by Matth */
|
||||
$"6577 204C 6175 7820 6874 7470 3A2F 2F63" /* ew Laux http://c */
|
||||
$"6F6E 7374 6361 7374 2E6F 7267 2F0D 0D47" /* onstcast.org/¬¬G */
|
||||
$"4243 2073 7570 706F 7274 2062 7920 5461" /* BC support by Ta */
|
||||
$"6E6E 6572 2046 6F6B 6B65 6E73 0D50 616C" /* nner Fokkens¬Pal */
|
||||
$"6574 7465 7320 6672 6F6D 206C 6F73 7065" /* ettes from lospe */
|
||||
$"632E 636F 6D0D" /* c.com¬ */
|
||||
};
|
||||
|
||||
data 'DITL' (129) {
|
||||
@@ -95,7 +98,7 @@ data 'DITL' (132) {
|
||||
};
|
||||
|
||||
data 'DLOG' (128) {
|
||||
$"0034 007E 0093 01B4 0003 0100 0100 0000" /* .4.~.ì.¥........ */
|
||||
$"0034 007E 00C0 01B4 0003 0100 0100 0000" /* .4.~.¿.¥........ */
|
||||
$"0000 0080 00" /* ...Ä. */
|
||||
};
|
||||
|
||||
@@ -256,15 +259,17 @@ data 'MENU' (129) {
|
||||
};
|
||||
|
||||
data 'MENU' (130) {
|
||||
$"0082 0000 0000 0000 0000 FFFF FF67 074F" /* .Ç...........g.O */
|
||||
$"0082 0000 0000 0000 0000 FFFF FB67 074F" /* .Ç...........g.O */
|
||||
$"7074 696F 6E73 0C45 6E61 626C 6520 4175" /* ptions.Enable Au */
|
||||
$"6469 6F00 4100 000F 4C69 6D69 7420 746F" /* dio.A...Limit to */
|
||||
$"2036 3020 4650 5300 0000 0001 2D00 0000" /* 60 FPS.....-... */
|
||||
$"0005 5363 616C 6500 0000 0002 3178 0031" /* ..Scale.....1x.1 */
|
||||
$"0000 0232 7800 3200 0001 2D00 0000 000C" /* ...2x.2...-..... */
|
||||
$"5072 6566 6572 656E 6365 73C9 002C 0000" /* Preferences….,.. */
|
||||
$"0D4B 6579 204D 6170 7069 6E67 73C9 004B" /* ¬Key Mappings….K */
|
||||
$"0000 00" /* ... */
|
||||
$"0000 0232 7800 3200 0001 2D00 0000 000A" /* ...2x.2...-..... */
|
||||
$"5275 6E20 6173 2047 4243 0000 0000 1349" /* Run as GBC.....I */
|
||||
$"676E 6F72 6520 446F 7562 6C65 2053 7065" /* gnore Double Spe */
|
||||
$"6564 0000 0000 012D 0000 0000 0C50 7265" /* ed.....-.....Pre */
|
||||
$"6665 7265 6E63 6573 C900 2C00 000D 4B65" /* ferences….,..¬Ke */
|
||||
$"7920 4D61 7070 696E 6773 C900 4B00 0000" /* y Mappings….K... */
|
||||
};
|
||||
|
||||
data 'MENU' (132) {
|
||||
|
||||
Reference in New Issue
Block a user