[Scummvm-cvs-logs] SF.net SVN: scummvm:[42535] scummvm/branches/gsoc2009-draci/engines/draci
dkasak13 at users.sourceforge.net
dkasak13 at users.sourceforge.net
Thu Jul 16 18:06:29 CEST 2009
Revision: 42535
http://scummvm.svn.sourceforge.net/scummvm/?rev=42535&view=rev
Author: dkasak13
Date: 2009-07-16 16:06:29 +0000 (Thu, 16 Jul 2009)
Log Message:
-----------
Added _iconsArchive to DraciEngine and modified the Mouse class to use it.
Modified Paths:
--------------
scummvm/branches/gsoc2009-draci/engines/draci/draci.cpp
scummvm/branches/gsoc2009-draci/engines/draci/draci.h
scummvm/branches/gsoc2009-draci/engines/draci/mouse.cpp
Modified: scummvm/branches/gsoc2009-draci/engines/draci/draci.cpp
===================================================================
--- scummvm/branches/gsoc2009-draci/engines/draci/draci.cpp 2009-07-16 15:00:46 UTC (rev 42534)
+++ scummvm/branches/gsoc2009-draci/engines/draci/draci.cpp 2009-07-16 16:06:29 UTC (rev 42535)
@@ -50,6 +50,7 @@
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 @@
_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 @@
delete _roomsArchive;
delete _overlaysArchive;
delete _animationsArchive;
+ delete _iconsArchive;
// Remove all of our debug levels here
Common::clearAllDebugChannels();
Modified: scummvm/branches/gsoc2009-draci/engines/draci/draci.h
===================================================================
--- scummvm/branches/gsoc2009-draci/engines/draci/draci.h 2009-07-16 15:00:46 UTC (rev 42534)
+++ scummvm/branches/gsoc2009-draci/engines/draci/draci.h 2009-07-16 16:06:29 UTC (rev 42535)
@@ -60,6 +60,7 @@
Font *_smallFont;
Font *_bigFont;
+ BArchive *_iconsArchive;
BArchive *_objectsArchive;
BArchive *_spritesArchive;
BArchive *_paletteArchive;
Modified: scummvm/branches/gsoc2009-draci/engines/draci/mouse.cpp
===================================================================
--- scummvm/branches/gsoc2009-draci/engines/draci/mouse.cpp 2009-07-16 15:00:46 UTC (rev 42534)
+++ scummvm/branches/gsoc2009-draci/engines/draci/mouse.cpp 2009-07-16 16:06:29 UTC (rev 42535)
@@ -98,21 +98,11 @@
}
// 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);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list