aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/draci/draci.cpp3
-rw-r--r--engines/draci/draci.h1
-rw-r--r--engines/draci/mouse.cpp12
3 files changed, 5 insertions, 11 deletions
diff --git a/engines/draci/draci.cpp b/engines/draci/draci.cpp
index 3041c70341..2578d8a12e 100644
--- a/engines/draci/draci.cpp
+++ b/engines/draci/draci.cpp
@@ -50,6 +50,7 @@ const Common::String spritesPath("OBR_AN.DFW");
const Common::String overlaysPath("OBR_MAS.DFW");
const Common::String roomsPath("MIST.DFW");
const Common::String animationsPath("ANIM.DFW");
+const Common::String iconsPath("HRA.DFW");
DraciEngine::DraciEngine(OSystem *syst, const ADGameDescription *gameDesc)
: Engine(syst) {
@@ -84,6 +85,7 @@ int DraciEngine::init() {
_roomsArchive = new BArchive(roomsPath);
_overlaysArchive = new BArchive(overlaysPath);
_animationsArchive = new BArchive(animationsPath);
+ _iconsArchive = new BArchive(iconsPath);
// Load the game's fonts
_smallFont = new Font(kFontSmall);
@@ -179,6 +181,7 @@ DraciEngine::~DraciEngine() {
delete _roomsArchive;
delete _overlaysArchive;
delete _animationsArchive;
+ delete _iconsArchive;
// Remove all of our debug levels here
Common::clearAllDebugChannels();
diff --git a/engines/draci/draci.h b/engines/draci/draci.h
index c01a30a7e4..b3e3b020a7 100644
--- a/engines/draci/draci.h
+++ b/engines/draci/draci.h
@@ -60,6 +60,7 @@ public:
Font *_smallFont;
Font *_bigFont;
+ BArchive *_iconsArchive;
BArchive *_objectsArchive;
BArchive *_spritesArchive;
BArchive *_paletteArchive;
diff --git a/engines/draci/mouse.cpp b/engines/draci/mouse.cpp
index 09216085a7..4a02f47444 100644
--- a/engines/draci/mouse.cpp
+++ b/engines/draci/mouse.cpp
@@ -98,21 +98,11 @@ void Mouse::setPosition(uint16 x, uint16 y) {
}
// FIXME: Handle hotspots properly
-// TODO: Implement a resource manager
void Mouse::setCursorType(CursorType cur) {
_cursorType = cur;
- Common::String path("HRA.DFW");
BAFile *f;
- BArchive ar;
- ar.openArchive(path);
-
- if(ar.isOpen()) {
- f = ar.getFile(_cursorType);
- } else {
- debugC(2, kDraciGeneralDebugLevel, "ERROR - Archive not opened - %s", path.c_str());
- return;
- }
+ f = _vm->_iconsArchive->getFile(_cursorType);
Sprite sp(f->_data, f->_length, 0, 0, true);
CursorMan.replaceCursorPalette(_vm->_screen->getPalette(), 0, kNumColours);