diff options
author | Martin Kiewitz | 2010-06-15 12:01:49 +0000 |
---|---|---|
committer | Martin Kiewitz | 2010-06-15 12:01:49 +0000 |
commit | 59d0035b033ac4791bfa91245418852a66e4e63a (patch) | |
tree | 231cb99ee2f86069d4bdaad81bc6893b612801ca /engines/sci/graphics | |
parent | 5b484b5be7a9b9abbaf6b686e59b2ee9f88acb2d (diff) | |
download | scummvm-rg350-59d0035b033ac4791bfa91245418852a66e4e63a.tar.gz scummvm-rg350-59d0035b033ac4791bfa91245418852a66e4e63a.tar.bz2 scummvm-rg350-59d0035b033ac4791bfa91245418852a66e4e63a.zip |
SCI: move portrait methods to gfxPaint16
svn-id: r49806
Diffstat (limited to 'engines/sci/graphics')
-rw-r--r-- | engines/sci/graphics/gui.cpp | 20 | ||||
-rw-r--r-- | engines/sci/graphics/gui.h | 4 | ||||
-rw-r--r-- | engines/sci/graphics/paint16.cpp | 20 | ||||
-rw-r--r-- | engines/sci/graphics/paint16.h | 4 |
4 files changed, 24 insertions, 24 deletions
diff --git a/engines/sci/graphics/gui.cpp b/engines/sci/graphics/gui.cpp index 63ac6c0a05..677359c201 100644 --- a/engines/sci/graphics/gui.cpp +++ b/engines/sci/graphics/gui.cpp @@ -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 @@ void SciGui::textColors(int argc, reg_t *argv) { _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 diff --git a/engines/sci/graphics/gui.h b/engines/sci/graphics/gui.h index 8e4abdf5b7..73c37de099 100644 --- a/engines/sci/graphics/gui.h +++ b/engines/sci/graphics/gui.h @@ -57,10 +57,6 @@ public: 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; diff --git a/engines/sci/graphics/paint16.cpp b/engines/sci/graphics/paint16.cpp index 6a13f792cb..eb3fea969a 100644 --- a/engines/sci/graphics/paint16.cpp +++ b/engines/sci/graphics/paint16.cpp @@ -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 @@ void GfxPaint16::kernelShakeScreen(uint16 shakeCount, uint16 directions) { } } +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 diff --git a/engines/sci/graphics/paint16.h b/engines/sci/graphics/paint16.h index 65f9dd0d9c..7a1a3bd7eb 100644 --- a/engines/sci/graphics/paint16.h +++ b/engines/sci/graphics/paint16.h @@ -91,6 +91,10 @@ public: 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; |