[Scummvm-cvs-logs] SF.net SVN: scummvm:[49806] scummvm/trunk/engines/sci
m_kiewitz at users.sourceforge.net
m_kiewitz at users.sourceforge.net
Tue Jun 15 14:01:49 CEST 2010
Revision: 49806
http://scummvm.svn.sourceforge.net/scummvm/?rev=49806&view=rev
Author: m_kiewitz
Date: 2010-06-15 12:01:49 +0000 (Tue, 15 Jun 2010)
Log Message:
-----------
SCI: move portrait methods to gfxPaint16
Modified Paths:
--------------
scummvm/trunk/engines/sci/engine/kgraphics.cpp
scummvm/trunk/engines/sci/graphics/gui.cpp
scummvm/trunk/engines/sci/graphics/gui.h
scummvm/trunk/engines/sci/graphics/paint16.cpp
scummvm/trunk/engines/sci/graphics/paint16.h
Modified: scummvm/trunk/engines/sci/engine/kgraphics.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kgraphics.cpp 2010-06-15 11:44:55 UTC (rev 49805)
+++ scummvm/trunk/engines/sci/engine/kgraphics.cpp 2010-06-15 12:01:49 UTC (rev 49806)
@@ -698,7 +698,7 @@
case 0: { // load
if (argc == 2) {
Common::String resourceName = s->_segMan->getString(argv[1]);
- s->r_acc = g_sci->_gui->portraitLoad(resourceName);
+ s->r_acc = g_sci->_gfxPaint16->kernelPortraitLoad(resourceName);
} else {
warning("kPortrait(loadResource) called with unsupported argc %d", argc);
}
@@ -715,7 +715,7 @@
uint seq = argv[8].toUint16() & 0xff;
// argv[9] is usually 0??!!
- g_sci->_gui->portraitShow(resourceName, position, resourceNum, noun, verb, cond, seq);
+ g_sci->_gfxPaint16->kernelPortraitShow(resourceName, position, resourceNum, noun, verb, cond, seq);
return SIGNAL_REG;
} else {
warning("kPortrait(show) called with unsupported argc %d", argc);
@@ -725,7 +725,7 @@
case 2: { // unload
if (argc == 2) {
uint16 portraitId = argv[1].toUint16();
- g_sci->_gui->portraitUnload(portraitId);
+ g_sci->_gfxPaint16->kernelPortraitUnload(portraitId);
} else {
warning("kPortrait(unload) called with unsupported argc %d", argc);
}
Modified: scummvm/trunk/engines/sci/graphics/gui.cpp
===================================================================
--- scummvm/trunk/engines/sci/graphics/gui.cpp 2010-06-15 11:44:55 UTC (rev 49805)
+++ scummvm/trunk/engines/sci/graphics/gui.cpp 2010-06-15 12:01:49 UTC (rev 49806)
@@ -43,7 +43,6 @@
#include "sci/graphics/animate.h"
#include "sci/graphics/controls.h"
#include "sci/graphics/menu.h"
-#include "sci/graphics/portrait.h"
#include "sci/graphics/text16.h"
#include "sci/graphics/transitions.h"
#include "sci/graphics/view.h"
@@ -112,23 +111,4 @@
_text16->CodeSetColors(argc, argv);
}
-reg_t SciGui::portraitLoad(Common::String resourceName) {
- //Portrait *myPortrait = new Portrait(g_sci->getResMan(), _screen, _palette, resourceName);
- return NULL_REG;
-}
-
-void SciGui::portraitShow(Common::String resourceName, Common::Point position, uint16 resourceId, uint16 noun, uint16 verb, uint16 cond, uint16 seq) {
- Portrait *myPortrait = new Portrait(g_sci->getResMan(), g_sci->getEventManager(), this, _screen, _palette, _audio, resourceName);
- // TODO: cache portraits
- // adjust given coordinates to curPort (but dont adjust coordinates on upscaledHires_Save_Box and give us hires coordinates
- // on kDrawCel, yeah this whole stuff makes sense)
- position.x += _ports->getPort()->left; position.y += _ports->getPort()->top;
- _screen->adjustToUpscaledCoordinates(position.y, position.x);
- myPortrait->doit(position, resourceId, noun, verb, cond, seq);
- delete myPortrait;
-}
-
-void SciGui::portraitUnload(uint16 portraitId) {
-}
-
} // End of namespace Sci
Modified: scummvm/trunk/engines/sci/graphics/gui.h
===================================================================
--- scummvm/trunk/engines/sci/graphics/gui.h 2010-06-15 11:44:55 UTC (rev 49805)
+++ scummvm/trunk/engines/sci/graphics/gui.h 2010-06-15 12:01:49 UTC (rev 49806)
@@ -57,10 +57,6 @@
virtual void textFonts(int argc, reg_t *argv);
virtual void textColors(int argc, reg_t *argv);
- virtual reg_t portraitLoad(Common::String resourceName);
- virtual void portraitShow(Common::String resourceName, Common::Point position, uint16 resourceNum, uint16 noun, uint16 verb, uint16 cond, uint16 seq);
- virtual void portraitUnload(uint16 portraitId);
-
protected:
GfxCursor *_cursor;
EngineState *_s;
Modified: scummvm/trunk/engines/sci/graphics/paint16.cpp
===================================================================
--- scummvm/trunk/engines/sci/graphics/paint16.cpp 2010-06-15 11:44:55 UTC (rev 49805)
+++ scummvm/trunk/engines/sci/graphics/paint16.cpp 2010-06-15 12:01:49 UTC (rev 49806)
@@ -42,6 +42,7 @@
#include "sci/graphics/view.h"
#include "sci/graphics/screen.h"
#include "sci/graphics/palette.h"
+#include "sci/graphics/portrait.h"
#include "sci/graphics/text16.h"
#include "sci/graphics/transitions.h"
@@ -580,4 +581,23 @@
}
}
+reg_t GfxPaint16::kernelPortraitLoad(Common::String resourceName) {
+ //Portrait *myPortrait = new Portrait(g_sci->getResMan(), _screen, _palette, resourceName);
+ return NULL_REG;
+}
+
+void GfxPaint16::kernelPortraitShow(Common::String resourceName, Common::Point position, uint16 resourceId, uint16 noun, uint16 verb, uint16 cond, uint16 seq) {
+ Portrait *myPortrait = new Portrait(g_sci->getResMan(), g_sci->getEventManager(), this, _screen, _palette, _audio, resourceName);
+ // TODO: cache portraits
+ // adjust given coordinates to curPort (but dont adjust coordinates on upscaledHires_Save_Box and give us hires coordinates
+ // on kDrawCel, yeah this whole stuff makes sense)
+ position.x += _ports->getPort()->left; position.y += _ports->getPort()->top;
+ _screen->adjustToUpscaledCoordinates(position.y, position.x);
+ myPortrait->doit(position, resourceId, noun, verb, cond, seq);
+ delete myPortrait;
+}
+
+void GfxPaint16::kernelPortraitUnload(uint16 portraitId) {
+}
+
} // End of namespace Sci
Modified: scummvm/trunk/engines/sci/graphics/paint16.h
===================================================================
--- scummvm/trunk/engines/sci/graphics/paint16.h 2010-06-15 11:44:55 UTC (rev 49805)
+++ scummvm/trunk/engines/sci/graphics/paint16.h 2010-06-15 12:01:49 UTC (rev 49806)
@@ -91,6 +91,10 @@
void kernelShakeScreen(uint16 shakeCount, uint16 directions);
+ reg_t kernelPortraitLoad(Common::String resourceName);
+ void kernelPortraitShow(Common::String resourceName, Common::Point position, uint16 resourceNum, uint16 noun, uint16 verb, uint16 cond, uint16 seq);
+ void kernelPortraitUnload(uint16 portraitId);
+
private:
ResourceManager *_resMan;
SegManager *_segMan;
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