Merge pull request #309 from cxd4/do_et_4_mah_lulz

minor clean-ups to Glide64 config
This commit is contained in:
zilmar 2015-03-24 11:17:11 +11:00
commit bb5d7a4698
3 changed files with 118 additions and 88 deletions

View File

@ -1310,3 +1310,28 @@ void CALL DllAbout ( HWND hParent )
hostWindow = NULL;
#endif
}
void general_setting(short setting_ID, const char * name, unsigned int value)
{
RegisterSetting(
setting_ID,
Data_DWORD_General,
name,
NULL,
value,
NULL
);
return;
}
void game_setting(short setting_ID, const char * name, unsigned int value)
{
RegisterSetting(
setting_ID,
Data_DWORD_Game,
name,
NULL,
value,
NULL
);
return;
}

View File

@ -286,4 +286,9 @@ enum {
extern short Set_basic_mode, Set_texture_dir;
extern void
general_setting(short setting_ID, const char * name, unsigned int value);
extern void
game_setting(short setting_ID, const char * name, unsigned int value);
#endif // CONFIG_H

View File

@ -623,18 +623,18 @@ void WriteSettings (bool saveEmulationSettings)
SetSetting(Set_lodmode, settings.lodmode);
SetSetting(Set_aspect, settings.aspectmode);
SetSetting(Set_fb_read_always, settings.frame_buffer&fb_ref ? 1 : 0l);
SetSetting(Set_fb_smart, settings.frame_buffer & fb_emulation ? 1 : 0l);
SetSetting(Set_fb_hires, settings.frame_buffer & fb_hwfbe ? 1 : 0l);
SetSetting(Set_fb_get_info, settings.frame_buffer & fb_get_info ? 1 : 0l);
SetSetting(Set_fb_render, settings.frame_buffer & fb_depth_render ? 1 : 0l);
SetSetting(Set_detect_cpu_write, settings.frame_buffer & fb_cpu_write_hack ? 1 : 0l);
SetSetting(Set_fb_read_always, settings.frame_buffer&fb_ref ? 1 : 0);
SetSetting(Set_fb_smart, settings.frame_buffer & fb_emulation ? 1 : 0);
SetSetting(Set_fb_hires, settings.frame_buffer & fb_hwfbe ? 1 : 0);
SetSetting(Set_fb_get_info, settings.frame_buffer & fb_get_info ? 1 : 0);
SetSetting(Set_fb_render, settings.frame_buffer & fb_depth_render ? 1 : 0);
SetSetting(Set_detect_cpu_write, settings.frame_buffer & fb_cpu_write_hack ? 1 : 0);
if (settings.frame_buffer & fb_read_back_to_screen)
SetSetting(Set_read_back_to_screen, 1);
else if (settings.frame_buffer & fb_read_back_to_screen2)
SetSetting(Set_read_back_to_screen, 2);
else
SetSetting(Set_read_back_to_screen, 0l);
SetSetting(Set_read_back_to_screen, 0);
}
FlushSettings();
@ -1578,90 +1578,90 @@ void CALL PluginLoaded (void)
Set_texture_dir = FindSystemSettingId("Dir:Texture");
SetModuleName("Glide64");
RegisterSetting(Set_CardId, Data_DWORD_General,"card_id",NULL,0l,NULL);
RegisterSetting(Set_Resolution, Data_DWORD_General,"resolution",NULL,7,NULL);
RegisterSetting(Set_vsync, Data_DWORD_General,"vsync",NULL,1,NULL);
RegisterSetting(Set_ssformat, Data_DWORD_General,"ssformat",NULL,1,NULL);
RegisterSetting(Set_ShowFps, Data_DWORD_General,"show_fps",NULL,0l,NULL);
RegisterSetting(Set_clock, Data_DWORD_General,"clock",NULL,0l,NULL);
RegisterSetting(Set_clock_24_hr, Data_DWORD_General,"clock_24_hr",NULL,0l,NULL);
RegisterSetting(Set_texenh_options, Data_DWORD_General,"texenh_options",NULL,0l,NULL);
RegisterSetting(Set_hotkeys, Data_DWORD_General,"hotkeys",NULL,1l,NULL);
RegisterSetting(Set_wrpResolution, Data_DWORD_General,"wrpResolution",NULL,0l,NULL);
RegisterSetting(Set_wrpVRAM, Data_DWORD_General,"wrpVRAM",NULL,0l,NULL);
RegisterSetting(Set_wrpFBO, Data_DWORD_General,"wrpFBO",NULL,0l,NULL);
RegisterSetting(Set_wrpAnisotropic, Data_DWORD_General,"wrpAnisotropic",NULL,0l,NULL);
RegisterSetting(Set_autodetect_ucode, Data_DWORD_General,"autodetect_ucode",NULL, 1,NULL);
RegisterSetting(Set_ucode, Data_DWORD_General,"ucode",NULL, 2,NULL);
RegisterSetting(Set_wireframe, Data_DWORD_General,"wireframe",NULL, 0l,NULL);
RegisterSetting(Set_wfmode, Data_DWORD_General,"wfmode",NULL, 1,NULL);
RegisterSetting(Set_logging, Data_DWORD_General,"logging",NULL, 0l,NULL);
RegisterSetting(Set_log_clear, Data_DWORD_General,"log_clear",NULL, 0l,NULL);
RegisterSetting(Set_run_in_window, Data_DWORD_General,"run_in_window",NULL, 0l,NULL);
RegisterSetting(Set_elogging, Data_DWORD_General,"elogging",NULL, 0l,NULL);
RegisterSetting(Set_filter_cache, Data_DWORD_General,"filter_cache",NULL, 0l,NULL);
RegisterSetting(Set_unk_as_red, Data_DWORD_General,"unk_as_red",NULL, 0l,NULL);
RegisterSetting(Set_log_unk, Data_DWORD_General,"log_unk",NULL, 0l,NULL);
RegisterSetting(Set_unk_clear, Data_DWORD_General,"unk_clear",NULL, 0l,NULL);
RegisterSetting(Set_ghq_fltr, Data_DWORD_General,"ghq_fltr",NULL, 0l,NULL);
RegisterSetting(Set_ghq_cmpr, Data_DWORD_General,"ghq_cmpr",NULL, 0l,NULL);
RegisterSetting(Set_ghq_enht, Data_DWORD_General,"ghq_enht",NULL, 0l,NULL);
RegisterSetting(Set_ghq_hirs, Data_DWORD_General,"ghq_hirs",NULL, 0l,NULL);
RegisterSetting(Set_ghq_enht_cmpr, Data_DWORD_General,"ghq_enht_cmpr",NULL, 0l,NULL);
RegisterSetting(Set_ghq_enht_tile, Data_DWORD_General,"ghq_enht_tile",NULL, 0l,NULL);
RegisterSetting(Set_ghq_enht_f16bpp, Data_DWORD_General,"ghq_enht_f16bpp",NULL, 0l,NULL);
RegisterSetting(Set_ghq_enht_gz, Data_DWORD_General,"ghq_enht_gz",NULL, 1L,NULL);
RegisterSetting(Set_ghq_enht_nobg, Data_DWORD_General,"ghq_enht_nobg",NULL, 0l,NULL);
RegisterSetting(Set_ghq_hirs_cmpr, Data_DWORD_General,"ghq_hirs_cmpr",NULL, 0l,NULL);
RegisterSetting(Set_ghq_hirs_tile, Data_DWORD_General,"ghq_hirs_tile",NULL, 0l,NULL);
RegisterSetting(Set_ghq_hirs_f16bpp, Data_DWORD_General,"ghq_hirs_f16bpp",NULL, 0l,NULL);
RegisterSetting(Set_ghq_hirs_gz, Data_DWORD_General,"ghq_hirs_gz",NULL, 1,NULL);
RegisterSetting(Set_ghq_hirs_altcrc, Data_DWORD_General,"ghq_hirs_altcrc",NULL, 1,NULL);
RegisterSetting(Set_ghq_cache_save, Data_DWORD_General,"ghq_cache_save",NULL, 1,NULL);
RegisterSetting(Set_ghq_cache_size, Data_DWORD_General,"ghq_cache_size",NULL, 0l,NULL);
RegisterSetting(Set_ghq_hirs_let_texartists_fly, Data_DWORD_General,"ghq_hirs_let_texartists_fly",NULL, 0l,NULL);
RegisterSetting(Set_ghq_hirs_dump, Data_DWORD_General,"ghq_hirs_dump",NULL, 0l,NULL);
general_setting(Set_CardId, "card_id", 0);
general_setting(Set_Resolution, "resolution", 7);
general_setting(Set_vsync, "vsync", 1);
general_setting(Set_ssformat, "ssformat", 1);
general_setting(Set_ShowFps, "show_fps", 0);
general_setting(Set_clock, "clock", 0);
general_setting(Set_clock_24_hr, "clock_24_hr", 0);
general_setting(Set_texenh_options, "texenh_options", 0);
general_setting(Set_hotkeys, "hotkeys", 1);
general_setting(Set_wrpResolution, "wrpResolution", 0);
general_setting(Set_wrpVRAM, "wrpVRAM", 0);
general_setting(Set_wrpFBO, "wrpFBO", 0);
general_setting(Set_wrpAnisotropic, "wrpAnisotropic", 0);
general_setting(Set_autodetect_ucode, "autodetect_ucode", 1);
general_setting(Set_ucode, "ucode", 2);
general_setting(Set_wireframe, "wireframe", 0);
general_setting(Set_wfmode, "wfmode", 1);
general_setting(Set_logging, "logging", 0);
general_setting(Set_log_clear, "log_clear", 0);
general_setting(Set_run_in_window, "run_in_window", 0);
general_setting(Set_elogging, "elogging", 0);
general_setting(Set_filter_cache, "filter_cache", 0);
general_setting(Set_unk_as_red, "unk_as_red", 0);
general_setting(Set_log_unk, "log_unk", 0);
general_setting(Set_unk_clear, "unk_clear", 0);
general_setting(Set_ghq_fltr, "ghq_fltr", 0);
general_setting(Set_ghq_cmpr, "ghq_cmpr", 0);
general_setting(Set_ghq_enht, "ghq_enht", 0);
general_setting(Set_ghq_hirs, "ghq_hirs", 0);
general_setting(Set_ghq_enht_cmpr, "ghq_enht_cmpr", 0);
general_setting(Set_ghq_enht_tile, "ghq_enht_tile", 0);
general_setting(Set_ghq_enht_f16bpp, "ghq_enht_f16bpp", 0);
general_setting(Set_ghq_enht_gz, "ghq_enht_gz", 1);
general_setting(Set_ghq_enht_nobg, "ghq_enht_nobg", 0);
general_setting(Set_ghq_hirs_cmpr, "ghq_hirs_cmpr", 0);
general_setting(Set_ghq_hirs_tile, "ghq_hirs_tile", 0);
general_setting(Set_ghq_hirs_f16bpp, "ghq_hirs_f16bpp", 0);
general_setting(Set_ghq_hirs_gz, "ghq_hirs_gz", 1);
general_setting(Set_ghq_hirs_altcrc, "ghq_hirs_altcrc", 1);
general_setting(Set_ghq_cache_save, "ghq_cache_save", 1);
general_setting(Set_ghq_cache_size, "ghq_cache_size", 0);
general_setting(Set_ghq_hirs_let_texartists_fly, "ghq_hirs_let_texartists_fly", 0);
general_setting(Set_ghq_hirs_dump, "ghq_hirs_dump", 0);
RegisterSetting(Set_alt_tex_size,Data_DWORD_Game,"alt_tex_size",NULL,0l,NULL);
RegisterSetting(Set_use_sts1_only,Data_DWORD_Game,"use_sts1_only",NULL,0l,NULL);
RegisterSetting(Set_force_calc_sphere,Data_DWORD_Game,"force_calc_sphere",NULL,0l,NULL);
RegisterSetting(Set_correct_viewport,Data_DWORD_Game,"correct_viewport",NULL,0l,NULL);
RegisterSetting(Set_increase_texrect_edge,Data_DWORD_Game,"increase_texrect_edge",NULL,0,NULL);
RegisterSetting(Set_decrease_fillrect_edge,Data_DWORD_Game,"decrease_fillrect_edge",NULL,0l,NULL);
RegisterSetting(Set_texture_correction,Data_DWORD_Game,"texture_correction",NULL,1,NULL);
RegisterSetting(Set_pal230,Data_DWORD_Game,"pal230",NULL,0l,NULL);
RegisterSetting(Set_stipple_mode,Data_DWORD_Game,"stipple_mode",NULL,2,NULL);
game_setting(Set_alt_tex_size, "alt_tex_size", 0);
game_setting(Set_use_sts1_only, "use_sts1_only", 0);
game_setting(Set_force_calc_sphere, "force_calc_sphere", 0);
game_setting(Set_correct_viewport, "correct_viewport", 0);
game_setting(Set_increase_texrect_edge, "increase_texrect_edge", 0);
game_setting(Set_decrease_fillrect_edge, "decrease_fillrect_edge", 0);
game_setting(Set_texture_correction, "texture_correction", 1);
game_setting(Set_pal230, "pal230", 0);
game_setting(Set_stipple_mode, "stipple_mode", 2);
RegisterSetting(Set_stipple_pattern,Data_DWORD_Game,"stipple_pattern",NULL,1041204192,NULL);
RegisterSetting(Set_force_microcheck,Data_DWORD_Game,"force_microcheck",NULL,0l,NULL);
RegisterSetting(Set_force_quad3d,Data_DWORD_Game,"force_quad3d",NULL,0l,NULL);
RegisterSetting(Set_clip_zmin,Data_DWORD_Game,"clip_zmin",NULL,0l,NULL);
RegisterSetting(Set_clip_zmax,Data_DWORD_Game,"clip_zmax",NULL,1,NULL);
RegisterSetting(Set_fast_crc,Data_DWORD_Game,"fast_crc",NULL,1,NULL);
RegisterSetting(Set_adjust_aspect,Data_DWORD_Game,"adjust_aspect",NULL,1,NULL);
RegisterSetting(Set_zmode_compare_less,Data_DWORD_Game,"zmode_compare_less",NULL,0l,NULL);
RegisterSetting(Set_old_style_adither,Data_DWORD_Game,"old_style_adither",NULL,0l,NULL);
RegisterSetting(Set_n64_z_scale,Data_DWORD_Game,"n64_z_scale",NULL,0l,NULL);
RegisterSetting(Set_optimize_texrect,Data_DWORD_Game,"optimize_texrect",NULL,1,NULL);
RegisterSetting(Set_ignore_aux_copy,Data_DWORD_Game,"ignore_aux_copy",NULL,(unsigned int)-1,NULL);
RegisterSetting(Set_hires_buf_clear,Data_DWORD_Game,"hires_buf_clear",NULL,1,NULL);
RegisterSetting(Set_fb_read_alpha,Data_DWORD_Game,"fb_read_alpha",NULL,0l,NULL);
RegisterSetting(Set_useless_is_useless,Data_DWORD_Game,"useless_is_useless",NULL,(unsigned int)-1,NULL);
RegisterSetting(Set_fb_crc_mode,Data_DWORD_Game,"fb_crc_mode",NULL,1,NULL);
RegisterSetting(Set_filtering,Data_DWORD_Game,"filtering",NULL,0l,NULL);
RegisterSetting(Set_fog,Data_DWORD_Game,"fog",NULL,1,NULL);
RegisterSetting(Set_buff_clear,Data_DWORD_Game,"buff_clear",NULL,1,NULL);
RegisterSetting(Set_swapmode,Data_DWORD_Game,"swapmode",NULL,1,NULL);
RegisterSetting(Set_aspect,Data_DWORD_Game,"aspect",NULL,0l,NULL);
RegisterSetting(Set_lodmode,Data_DWORD_Game,"lodmode",NULL,0l,NULL);
game_setting(Set_stipple_pattern, "stipple_pattern", 0x3E0F83E0);
game_setting(Set_force_microcheck, "force_microcheck", 0);
game_setting(Set_force_quad3d, "force_quad3d", 0);
game_setting(Set_clip_zmin, "clip_zmin", 0);
game_setting(Set_clip_zmax, "clip_zmax", 1);
game_setting(Set_fast_crc, "fast_crc", 1);
game_setting(Set_adjust_aspect, "adjust_aspect", 1);
game_setting(Set_zmode_compare_less, "zmode_compare_less", 0);
game_setting(Set_old_style_adither, "old_style_adither", 0);
game_setting(Set_n64_z_scale, "n64_z_scale", 0);
game_setting(Set_optimize_texrect, "optimize_texrect", 1);
game_setting(Set_ignore_aux_copy, "ignore_aux_copy", (unsigned int)-1);
game_setting(Set_hires_buf_clear, "hires_buf_clear", 1);
game_setting(Set_fb_read_alpha, "fb_read_alpha", 0);
game_setting(Set_useless_is_useless, "useless_is_useless", (unsigned int)-1);
game_setting(Set_fb_crc_mode, "fb_crc_mode", 1);
game_setting(Set_filtering, "filtering", 0);
game_setting(Set_fog, "fog", 1);
game_setting(Set_buff_clear, "buff_clear", 1);
game_setting(Set_swapmode, "swapmode", 1);
game_setting(Set_aspect, "aspect", 0);
game_setting(Set_lodmode, "lodmode", 0);
RegisterSetting(Set_fb_smart,Data_DWORD_Game,"fb_smart",NULL,1l,NULL);
RegisterSetting(Set_fb_hires,Data_DWORD_Game,"fb_hires",NULL,1,NULL);
RegisterSetting(Set_fb_read_always,Data_DWORD_Game,"fb_read_always",NULL,0l,NULL);
RegisterSetting(Set_read_back_to_screen,Data_DWORD_Game,"read_back_to_screen",NULL,0l,NULL);
RegisterSetting(Set_detect_cpu_write,Data_DWORD_Game,"detect_cpu_write",NULL,0l,NULL);
RegisterSetting(Set_fb_get_info,Data_DWORD_Game,"fb_get_info",NULL,0l,NULL);
RegisterSetting(Set_fb_render,Data_DWORD_Game,"fb_render",NULL,1,NULL);
game_setting(Set_fb_smart, "fb_smart", 1);
game_setting(Set_fb_hires, "fb_hires", 1);
game_setting(Set_fb_read_always, "fb_read_always", 0);
game_setting(Set_read_back_to_screen, "read_back_to_screen", 0);
game_setting(Set_detect_cpu_write, "detect_cpu_write", 0);
game_setting(Set_fb_get_info, "fb_get_info", 0);
game_setting(Set_fb_render, "fb_render", 1);
}
/******************************************************************