Combine some small headers together
This commit is contained in:
parent
205b8eccdf
commit
cfc18e9e91
19 changed files with 54 additions and 70 deletions
|
@ -3,7 +3,6 @@
|
|||
|
||||
#include "settings.hpp"
|
||||
#include "rom.hpp"
|
||||
#include "romloader.hpp"
|
||||
#include "moviefile.hpp"
|
||||
#include "movie.hpp"
|
||||
|
||||
|
|
|
@ -11,6 +11,24 @@
|
|||
#include "interface/romtype.hpp"
|
||||
#include "library/fileimage.hpp"
|
||||
|
||||
//ROM request.
|
||||
struct rom_request
|
||||
{
|
||||
//List of core types.
|
||||
std::vector<core_type*> cores;
|
||||
//Selected core (default core on call).
|
||||
bool core_guessed;
|
||||
size_t selected;
|
||||
//Filename selected (on entry, filename hint).
|
||||
bool has_slot[ROM_SLOT_COUNT];
|
||||
bool guessed[ROM_SLOT_COUNT];
|
||||
std::string filename[ROM_SLOT_COUNT];
|
||||
std::string hash[ROM_SLOT_COUNT];
|
||||
std::string hashxml[ROM_SLOT_COUNT];
|
||||
//Canceled flag.
|
||||
bool canceled;
|
||||
};
|
||||
|
||||
/**
|
||||
* ROM loaded into memory.
|
||||
*/
|
||||
|
@ -135,6 +153,32 @@ std::map<std::string, std::vector<char>> load_sram_commandline(const std::vector
|
|||
*/
|
||||
void set_hasher_callback(std::function<void(uint64_t, uint64_t)> cb);
|
||||
|
||||
struct romload_request
|
||||
{
|
||||
//Pack file to load. Overrides everything else.
|
||||
std::string packfile;
|
||||
//Single file to load to default slot.
|
||||
std::string singlefile;
|
||||
//Core and system. May be blank.
|
||||
std::string core;
|
||||
std::string system;
|
||||
std::string region;
|
||||
//Files to load.
|
||||
std::string files[ROM_SLOT_COUNT];
|
||||
};
|
||||
|
||||
bool load_null_rom();
|
||||
bool _load_new_rom(const romload_request& req);
|
||||
bool reload_active_rom();
|
||||
regex_results get_argument(const std::vector<std::string>& cmdline, const std::string& regexp);
|
||||
std::string get_requested_core(const std::vector<std::string>& cmdline);
|
||||
loaded_rom construct_rom(const std::string& movie_filename, const std::vector<std::string>& cmdline);
|
||||
void try_guess_roms(rom_request& req);
|
||||
void record_filehash(const std::string& file, uint64_t prefix, const std::string& hash);
|
||||
std::string try_to_guess_rom(const std::string& hint, const std::string& hash, const std::string& xhash,
|
||||
core_type& type, unsigned i);
|
||||
|
||||
|
||||
//Map of preferred cores for each extension and type.
|
||||
extern std::map<std::string, core_type*> preferred_core;
|
||||
//Main hasher
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
#ifndef _romguess__hpp__included__
|
||||
#define _romguess__hpp__included__
|
||||
|
||||
#include "core/romloader.hpp"
|
||||
#include "core/window.hpp"
|
||||
|
||||
void try_guess_roms(rom_request& req);
|
||||
void record_filehash(const std::string& file, uint64_t prefix, const std::string& hash);
|
||||
std::string try_to_guess_rom(const std::string& hint, const std::string& hash, const std::string& xhash,
|
||||
core_type& type, unsigned i);
|
||||
|
||||
#endif
|
|
@ -1,25 +0,0 @@
|
|||
#ifndef _romloader__hpp__included__
|
||||
#define _romloader__hpp__included__
|
||||
|
||||
struct romload_request
|
||||
{
|
||||
//Pack file to load. Overrides everything else.
|
||||
std::string packfile;
|
||||
//Single file to load to default slot.
|
||||
std::string singlefile;
|
||||
//Core and system. May be blank.
|
||||
std::string core;
|
||||
std::string system;
|
||||
std::string region;
|
||||
//Files to load.
|
||||
std::string files[ROM_SLOT_COUNT];
|
||||
};
|
||||
|
||||
bool load_null_rom();
|
||||
bool _load_new_rom(const romload_request& req);
|
||||
bool reload_active_rom();
|
||||
regex_results get_argument(const std::vector<std::string>& cmdline, const std::string& regexp);
|
||||
std::string get_requested_core(const std::vector<std::string>& cmdline);
|
||||
loaded_rom construct_rom(const std::string& movie_filename, const std::vector<std::string>& cmdline);
|
||||
|
||||
#endif
|
|
@ -1,7 +1,6 @@
|
|||
#ifndef _window__hpp__included__
|
||||
#define _window__hpp__included__
|
||||
|
||||
#include "core/rom.hpp"
|
||||
#include "interface/romtype.hpp"
|
||||
#include "library/keyboard.hpp"
|
||||
#include "library/messagebuffer.hpp"
|
||||
|
@ -11,25 +10,7 @@
|
|||
#include <list>
|
||||
#include <stdexcept>
|
||||
|
||||
|
||||
//ROM request.
|
||||
struct rom_request
|
||||
{
|
||||
//List of core types.
|
||||
std::vector<core_type*> cores;
|
||||
//Selected core (default core on call).
|
||||
bool core_guessed;
|
||||
size_t selected;
|
||||
//Filename selected (on entry, filename hint).
|
||||
bool has_slot[ROM_SLOT_COUNT];
|
||||
bool guessed[ROM_SLOT_COUNT];
|
||||
std::string filename[ROM_SLOT_COUNT];
|
||||
std::string hash[ROM_SLOT_COUNT];
|
||||
std::string hashxml[ROM_SLOT_COUNT];
|
||||
//Canceled flag.
|
||||
bool canceled;
|
||||
};
|
||||
|
||||
class rom_request;
|
||||
|
||||
//Various methods corresponding to graphics_driver_*
|
||||
struct _graphics_driver
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
#include "library/minmax.hpp"
|
||||
#include "core/instance.hpp"
|
||||
#include "core/memorymanip.hpp"
|
||||
#include "core/misc.hpp"
|
||||
#include "core/window.hpp"
|
||||
#include "library/string.hpp"
|
||||
#include <iomanip>
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
#include "core/queue.hpp"
|
||||
#include "core/random.hpp"
|
||||
#include "core/rom.hpp"
|
||||
#include "core/romloader.hpp"
|
||||
#include "core/settings.hpp"
|
||||
#include "core/window.hpp"
|
||||
#include "interface/c-interface.hpp"
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
#include "core/moviedata.hpp"
|
||||
#include "core/project.hpp"
|
||||
#include "core/random.hpp"
|
||||
#include "core/romguess.hpp"
|
||||
#include "core/rom.hpp"
|
||||
#include "core/settings.hpp"
|
||||
#include "lua/lua.hpp"
|
||||
#include "library/directory.hpp"
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
#include "core/memorymanip.hpp"
|
||||
#include "core/misc.hpp"
|
||||
#include "core/rom.hpp"
|
||||
#include "core/romguess.hpp"
|
||||
#include "core/settings.hpp"
|
||||
#include "core/window.hpp"
|
||||
#include "interface/cover.hpp"
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#include "core/instance.hpp"
|
||||
#include "core/misc.hpp"
|
||||
#include "core/rom.hpp"
|
||||
#include "core/romguess.hpp"
|
||||
#include "core/settings.hpp"
|
||||
#include "core/window.hpp"
|
||||
#include "interface/romtype.hpp"
|
||||
#include "library/zip.hpp"
|
||||
#include "library/directory.hpp"
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
#include "core/instance.hpp"
|
||||
#include "core/moviedata.hpp"
|
||||
#include "core/rom.hpp"
|
||||
#include "core/romloader.hpp"
|
||||
#include "core/romguess.hpp"
|
||||
#include "core/settings.hpp"
|
||||
#include "core/project.hpp"
|
||||
#include "core/window.hpp"
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#include "romimage.hpp"
|
||||
#include "draw.hpp"
|
||||
#include "instance.hpp"
|
||||
#include "core/window.hpp"
|
||||
#include "core/misc.hpp"
|
||||
#include "library/zip.hpp"
|
||||
|
||||
#define DEMO_WAIT 1080
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#include "library/ogg.hpp"
|
||||
#include "library/opus-ogg.hpp"
|
||||
#include "library/string.hpp"
|
||||
#include "core/window.hpp"
|
||||
#include "core/misc.hpp"
|
||||
#include "state.hpp"
|
||||
|
||||
namespace sky
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#include "demo.hpp"
|
||||
#include "core/dispatch.hpp"
|
||||
#include "core/audioapi.hpp"
|
||||
#include "core/window.hpp"
|
||||
#include "core/misc.hpp"
|
||||
#include "interface/romtype.hpp"
|
||||
#include "interface/callbacks.hpp"
|
||||
#include "library/framebuffer-pixfmt-rgb32.hpp"
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include "library/framebuffer-pixfmt-rgb32.hpp"
|
||||
#include "library/framebuffer-pixfmt-lrgb.hpp"
|
||||
#include "core/audioapi.hpp"
|
||||
#include "core/misc.hpp"
|
||||
#include "core/window.hpp"
|
||||
|
||||
template<> int ccore_call_param_map<lsnes_core_enumerate_cores>::id = LSNES_CORE_ENUMERATE_CORES;
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#include "lua/internal.hpp"
|
||||
#include "core/framebuffer.hpp"
|
||||
#include "core/instance.hpp"
|
||||
#include "core/misc.hpp"
|
||||
#include "library/lua-framebuffer.hpp"
|
||||
#include "library/minmax.hpp"
|
||||
#include "library/png.hpp"
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
#include "core/misc.hpp"
|
||||
#include "core/moviedata.hpp"
|
||||
#include "core/project.hpp"
|
||||
#include "core/romloader.hpp"
|
||||
#include "core/rom.hpp"
|
||||
#include "core/settings.hpp"
|
||||
#include "core/window.hpp"
|
||||
#include "library/directory.hpp"
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
#include "core/moviedata.hpp"
|
||||
#include "core/random.hpp"
|
||||
#include "core/rom.hpp"
|
||||
#include "core/romloader.hpp"
|
||||
#include "core/settings.hpp"
|
||||
#include "core/window.hpp"
|
||||
#include "library/directory.hpp"
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
#include "core/moviedata.hpp"
|
||||
#include "core/random.hpp"
|
||||
#include "core/rom.hpp"
|
||||
#include "core/romloader.hpp"
|
||||
#include "core/settings.hpp"
|
||||
#include "core/window.hpp"
|
||||
#include "library/string.hpp"
|
||||
|
|
Loading…
Add table
Reference in a new issue