Combine some small headers together

This commit is contained in:
Ilari Liusvaara 2014-05-28 20:11:09 +03:00
parent 205b8eccdf
commit cfc18e9e91
19 changed files with 54 additions and 70 deletions

View file

@ -3,7 +3,6 @@
#include "settings.hpp"
#include "rom.hpp"
#include "romloader.hpp"
#include "moviefile.hpp"
#include "movie.hpp"

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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>

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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

View file

@ -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

View file

@ -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"

View file

@ -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;

View file

@ -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"

View file

@ -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"

View file

@ -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"

View file

@ -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"