mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-04 09:18:38 +00:00
MACVENTURE: Add game file manager
This commit is contained in:
parent
f095c4a958
commit
d15e3a03c7
@ -27,7 +27,13 @@
|
||||
|
||||
#include "macventure/macventure.h"
|
||||
|
||||
#include "macventure.h"
|
||||
namespace MacVenture {
|
||||
|
||||
const char *MacVentureEngine::getGameFileName() const {
|
||||
return _gameDescription->filesDescriptions[0].fileName;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace MacVenture {
|
||||
|
||||
@ -68,6 +74,8 @@ bool MacVentureMetaEngine::createInstance(OSystem * syst, Engine ** engine, cons
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
} // End of namespace MacVenture
|
||||
|
||||
#if PLUGIN_ENABLED_DYNAMIC(MACVENTURE)
|
||||
|
@ -64,6 +64,10 @@ Common::Error MacVentureEngine::run() {
|
||||
// Your main even loop should be (invoked from) here.
|
||||
debug("MacVentureEngine::go: Hello, World!");
|
||||
|
||||
_resourceManager = new Common::MacResManager();
|
||||
if (!_resourceManager->open(getGameFileName()))
|
||||
error("Could not open %s as a resource fork", getGameFileName());
|
||||
|
||||
_shouldQuit = false;
|
||||
while (!_shouldQuit) {
|
||||
processEvents();
|
||||
@ -90,4 +94,6 @@ void MacVentureEngine::processEvents() {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} // End of namespace MacVenture
|
||||
|
@ -23,14 +23,11 @@
|
||||
#ifndef MACVENTURE_H
|
||||
#define MACVENTURE_H
|
||||
|
||||
#include "engines/engine.h"
|
||||
#include "common/debug.h"
|
||||
#include "common/random.h"
|
||||
#include "common/macresman.h"
|
||||
|
||||
#include "engines/engine.h"
|
||||
|
||||
#include "graphics/managed_surface.h"
|
||||
#include "graphics/macgui/macwindowmanager.h"
|
||||
|
||||
#include "gui/debugger.h"
|
||||
|
||||
#include "macventure/gui.h"
|
||||
@ -64,15 +61,22 @@ public:
|
||||
private:
|
||||
void processEvents();
|
||||
|
||||
private:
|
||||
private: // Attributes
|
||||
|
||||
const ADGameDescription *_gameDescription;
|
||||
Common::RandomSource *_rnd;
|
||||
|
||||
Common::MacResManager *_resourceManager;
|
||||
|
||||
Console *_debugger;
|
||||
|
||||
Gui *_gui;
|
||||
|
||||
bool _shouldQuit;
|
||||
|
||||
private: // Methods
|
||||
|
||||
const char* getGameFileName() const;
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user