/* * This file is part of the Advance project. * * Copyright (C) 1999, 2000, 2001, 2002, 2003 Andrea Mazzoleni * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #ifndef __MCONFIG_H #define __MCONFIG_H #include "game.h" #include "category.h" #include "emulator.h" #include "choice.h" #include "conf.h" #include #define ADV_COPY \ "AdvanceMENU - Copyright (C) 1999-2004 by Andrea Mazzoleni\n" enum clip_mode_t { clip_none, clip_single, clip_singleloop, clip_multi, clip_multiloop, clip_multiloopall }; /// Type of sorting. enum listsort_t { sort_by_group, sort_by_name, sort_by_root_name, sort_by_time, sort_by_year, sort_by_manufacturer, sort_by_type, sort_by_size, sort_by_session, sort_by_res, sort_by_info, sort_by_timepersession, sort_by_emulator }; inline bool sort_by_root_name_func(const game* A, const game* B) { return pgame_combine_less(A, B, pgame_by_leveldesc_less, pgame_by_desc_less, pgame_by_name_less); } inline bool sort_by_name_func(const game* A, const game* B) { return pgame_combine_less(A, B, pgame_by_desc_less, pgame_by_name_less); } inline bool sort_by_manufacturer_func(const game* A, const game* B) { return pgame_combine_less(A, B, pgame_by_manufacturer_less, pgame_by_desc_less, pgame_by_name_less); } inline bool sort_by_year_func(const game* A, const game* B) { return pgame_combine_less(A, B, pgame_by_year_less, pgame_by_desc_less, pgame_by_name_less); } inline bool sort_by_res_func(const game* A, const game* B) { return pgame_combine_less(A, B, pgame_by_res_less, pgame_by_desc_less, pgame_by_name_less); } inline bool sort_by_time_func(const game* A, const game* B) { return pgame_combine_less(A, B, pgame_by_time_less, pgame_by_desc_less, pgame_by_name_less); } inline bool sort_by_session_func(const game* A, const game* B) { return pgame_combine_less(A, B, pgame_by_session_less, pgame_by_desc_less, pgame_by_name_less); } inline bool sort_by_timepersession_func(const game* A, const game* B) { return pgame_combine_less(A, B, pgame_by_timepersession_less, pgame_by_desc_less, pgame_by_name_less); } inline bool sort_by_group_func(const game* A, const game* B) { return pgame_combine_less(A, B, pgame_by_group_less, pgame_by_desc_less, pgame_by_name_less); } inline bool sort_by_type_func(const game* A, const game* B) { return pgame_combine_less(A, B, pgame_by_type_less, pgame_by_desc_less, pgame_by_name_less); } inline bool sort_by_size_func(const game* A, const game* B) { return pgame_combine_less(A, B, pgame_by_size_less, pgame_by_desc_less, pgame_by_name_less); } inline bool sort_by_info_func(const game* A, const game* B) { return pgame_combine_less(A, B, pgame_by_info_less, pgame_by_desc_less, pgame_by_name_less); } inline bool sort_by_emulator_func(const game* A, const game* B) { return pgame_combine_less(A, B, pgame_by_emulator_less, pgame_by_leveldesc_less, pgame_by_desc_less); } typedef bool (*pgame_sort_func)(const game*, const game*); typedef std::set pgame_sort_set; /// Type of mode. enum listmode_t { mode_list = 1, mode_tile_small = 2, mode_tile_normal = 4, mode_tile_big = 8, mode_tile_enormous = 16, mode_tile_giant = 32, mode_full = 64, mode_full_mixed = 128, mode_tile_icon = 256, mode_tile_marquee = 512, mode_list_mixed = 1024, mode_text = 2048 }; /// Type of image to display. enum listpreview_t { preview_snap = 1, preview_flyer = 2, preview_cabinet = 4, preview_icon = 8, preview_marquee = 16, preview_title = 32 }; /// Type of screensaver to display. enum saver_t { saver_snap, saver_play, saver_flyer, saver_cabinet, saver_title, saver_off }; /// Type of configuration save/restore. enum restore_t { restore_none, ///< Save the modification in the config file. restore_exit, ///< Restore the original before exiting. restore_idle ///< Restore the original data at the idle. }; enum exit_t { exit_none, exit_normal, exit_shutdown, exit_all }; struct script { std::string name; std::string text; script(const std::string& Aname, const std::string& Atext) : name(Aname), text(Atext) { } }; typedef std::list