2015-08-27 00:23:46 +00:00
|
|
|
#ifndef __RETRO_CMAIN_HPP__
|
|
|
|
#define __RETRO_CMAIN_HPP__
|
|
|
|
|
2015-08-28 00:11:31 +00:00
|
|
|
#include <boo/boo.hpp>
|
2015-08-27 00:23:46 +00:00
|
|
|
#include "CMemory.hpp"
|
|
|
|
#include "CTweaks.hpp"
|
|
|
|
#include "CPlayMovie.hpp"
|
2015-11-02 18:45:39 +00:00
|
|
|
#include "IOStreams.hpp"
|
2015-08-27 00:23:46 +00:00
|
|
|
|
|
|
|
namespace Retro
|
|
|
|
{
|
|
|
|
class CStopwatch;
|
|
|
|
|
|
|
|
namespace MP1
|
|
|
|
{
|
|
|
|
|
2015-11-21 01:16:07 +00:00
|
|
|
enum class EGameplayResult
|
2015-08-27 00:23:46 +00:00
|
|
|
{
|
2015-11-21 01:16:07 +00:00
|
|
|
None,
|
|
|
|
Win,
|
|
|
|
Lose,
|
|
|
|
Playing
|
2015-08-27 00:23:46 +00:00
|
|
|
};
|
|
|
|
|
2015-11-02 18:45:39 +00:00
|
|
|
class WindowCallback : public boo::IWindowCallback
|
|
|
|
{
|
|
|
|
};
|
|
|
|
|
2015-08-28 00:11:31 +00:00
|
|
|
class CMain : public boo::IApplicationCallback
|
|
|
|
{
|
2015-11-02 18:45:39 +00:00
|
|
|
boo::IWindow* mainWindow;
|
|
|
|
int appMain(boo::IApplication* app);
|
2015-08-28 00:11:31 +00:00
|
|
|
void appQuitting(boo::IApplication*)
|
2015-11-09 03:43:11 +00:00
|
|
|
{ xe8_b24_finished = true; }
|
2015-08-28 00:11:31 +00:00
|
|
|
void appFilesOpen(boo::IApplication*, const std::vector<std::string>& paths)
|
|
|
|
{
|
|
|
|
fprintf(stderr, "OPENING: ");
|
|
|
|
for (const std::string& path : paths)
|
|
|
|
fprintf(stderr, "%s ", path.c_str());
|
|
|
|
fprintf(stderr, "\n");
|
|
|
|
}
|
|
|
|
|
2015-08-27 00:23:46 +00:00
|
|
|
CMemorySys x6c_memSys;
|
|
|
|
CTweaks x70_tweaks;
|
|
|
|
EGameplayResult xe4_gameplayResult;
|
2015-09-17 19:50:43 +00:00
|
|
|
bool xe8_b24_finished = false;
|
2015-08-28 00:11:31 +00:00
|
|
|
|
2015-08-27 00:23:46 +00:00
|
|
|
public:
|
|
|
|
CMain();
|
|
|
|
void RegisterResourceTweaks();
|
|
|
|
void ResetGameState();
|
|
|
|
void StreamNewGameState(CInputStream&);
|
|
|
|
void CheckTweakManagerDebugOptions() {}
|
|
|
|
void AddWorldPaks();
|
2015-08-31 03:44:42 +00:00
|
|
|
int RsMain(int argc, const boo::SystemChar* argv[]);
|
2015-08-27 00:23:46 +00:00
|
|
|
bool CheckReset();
|
|
|
|
bool CheckTerminate() {return false;}
|
|
|
|
void DrawDebugMetrics(double, CStopwatch&) {}
|
|
|
|
void DoPredrawMetrics() {}
|
|
|
|
void FillInAssetIDs();
|
|
|
|
void LoadAudio();
|
|
|
|
void ShutdownSubsystems();
|
|
|
|
void InitializeSubsystems();
|
|
|
|
EGameplayResult GetGameplayResult() const {return xe4_gameplayResult;}
|
|
|
|
void SetGameplayResult(EGameplayResult wl) {xe4_gameplayResult = wl;}
|
|
|
|
};
|
|
|
|
|
|
|
|
extern CMain* g_main;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // __RETRO_CMAIN_HPP__
|