2012-04-10 19:12:38 +02:00
|
|
|
|
|
|
|
//============================================================================
|
|
|
|
// Name : plugin.hpp
|
|
|
|
// Copyright : 2012 FIX94
|
|
|
|
//============================================================================
|
|
|
|
|
|
|
|
#ifndef _PLUGIN_HPP_
|
|
|
|
#define _PLUGIN_HPP_
|
|
|
|
|
|
|
|
#include <fstream>
|
|
|
|
#include <iostream>
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
#include "config/config.hpp"
|
|
|
|
#include "safe_vector.hpp"
|
2012-04-12 00:01:41 +02:00
|
|
|
#include "loader/disc.h"
|
2012-04-10 19:12:38 +02:00
|
|
|
|
|
|
|
using namespace std;
|
|
|
|
|
2012-05-01 15:30:16 +02:00
|
|
|
struct PluginOptions
|
|
|
|
{
|
|
|
|
u8 *BannerSound;
|
|
|
|
u32 BannerSoundSize;
|
|
|
|
u32 magicWord;
|
|
|
|
string DolName;
|
|
|
|
string coverFolder;
|
|
|
|
u32 caseColor;
|
|
|
|
bool ReturnLoader;
|
|
|
|
};
|
|
|
|
|
2012-04-10 19:12:38 +02:00
|
|
|
class Plugin
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
bool AddPlugin(Config &plugin);
|
|
|
|
u8* GetBannerSound(u32 magic);
|
|
|
|
u32 GetBannerSoundSize();
|
|
|
|
char* GetDolName(u32 magic);
|
2012-05-01 15:30:16 +02:00
|
|
|
char* GetCoverFolderName(u32 magic);
|
2012-04-14 21:43:37 +02:00
|
|
|
bool UseReturnLoader(u32 magic);
|
2012-04-10 19:12:38 +02:00
|
|
|
void init(string);
|
|
|
|
void Cleanup();
|
|
|
|
void EndAdd();
|
2012-04-16 06:58:17 +02:00
|
|
|
safe_vector<dir_discHdr> ParseScummvmINI(Config &ini, string Device);
|
2012-04-10 19:12:38 +02:00
|
|
|
private:
|
2012-05-01 15:30:16 +02:00
|
|
|
safe_vector<PluginOptions> Plugins;
|
2012-04-10 19:12:38 +02:00
|
|
|
u8 banner_pos;
|
|
|
|
string pluginsDir;
|
|
|
|
bool adding;
|
|
|
|
};
|
|
|
|
#endif
|