diff options
author | Martin Kiewitz | 2010-02-05 13:05:26 +0000 |
---|---|---|
committer | Martin Kiewitz | 2010-02-05 13:05:26 +0000 |
commit | 6c204cc890ed769f4d9268e80c6814c2eb95eb02 (patch) | |
tree | c84a91a8892615842017b16f5c0a5a7e9c47b32a /engines/sci | |
parent | 19910ec27906dc07066271a11d295c9e5fcb90d9 (diff) | |
download | scummvm-rg350-6c204cc890ed769f4d9268e80c6814c2eb95eb02.tar.gz scummvm-rg350-6c204cc890ed769f4d9268e80c6814c2eb95eb02.tar.bz2 scummvm-rg350-6c204cc890ed769f4d9268e80c6814c2eb95eb02.zip |
SCI: renamed class Cursor to GfxCursor
svn-id: r47902
Diffstat (limited to 'engines/sci')
-rw-r--r-- | engines/sci/graphics/animate.cpp | 2 | ||||
-rw-r--r-- | engines/sci/graphics/animate.h | 5 | ||||
-rw-r--r-- | engines/sci/graphics/cursor.cpp | 22 | ||||
-rw-r--r-- | engines/sci/graphics/cursor.h | 6 | ||||
-rw-r--r-- | engines/sci/graphics/gui.cpp | 2 | ||||
-rw-r--r-- | engines/sci/graphics/gui.h | 6 | ||||
-rw-r--r-- | engines/sci/graphics/gui32.cpp | 2 | ||||
-rw-r--r-- | engines/sci/graphics/gui32.h | 6 | ||||
-rw-r--r-- | engines/sci/graphics/menu.cpp | 2 | ||||
-rw-r--r-- | engines/sci/graphics/menu.h | 4 | ||||
-rw-r--r-- | engines/sci/sci.cpp | 2 |
11 files changed, 30 insertions, 29 deletions
diff --git a/engines/sci/graphics/animate.cpp b/engines/sci/graphics/animate.cpp index 9762966755..5cd6346100 100644 --- a/engines/sci/graphics/animate.cpp +++ b/engines/sci/graphics/animate.cpp @@ -42,7 +42,7 @@ namespace Sci { -GfxAnimate::GfxAnimate(EngineState *state, GfxCache *cache, GfxPorts *ports, GfxPaint16 *paint16, GfxScreen *screen, GfxPalette *palette, Cursor *cursor, GfxTransitions *transitions) +GfxAnimate::GfxAnimate(EngineState *state, GfxCache *cache, GfxPorts *ports, GfxPaint16 *paint16, GfxScreen *screen, GfxPalette *palette, GfxCursor *cursor, GfxTransitions *transitions) : _s(state), _cache(cache), _ports(ports), _paint16(paint16), _screen(screen), _palette(palette), _cursor(cursor), _transitions(transitions) { init(); } diff --git a/engines/sci/graphics/animate.h b/engines/sci/graphics/animate.h index 37dbb7081a..958f881e2f 100644 --- a/engines/sci/graphics/animate.h +++ b/engines/sci/graphics/animate.h @@ -75,6 +75,7 @@ struct AnimateEntry { typedef Common::List<AnimateEntry *> AnimateList; class GfxCache; +class GfxCursor; class GfxPorts; class GfxPaint16; class GfxScreen; @@ -82,7 +83,7 @@ class GfxPalette; class GfxTransitions; class GfxAnimate { public: - GfxAnimate(EngineState *state, GfxCache *cache, GfxPorts *ports, GfxPaint16 *paint16, GfxScreen *screen, GfxPalette *palette, Cursor *cursor, GfxTransitions *transitions); + GfxAnimate(EngineState *state, GfxCache *cache, GfxPorts *ports, GfxPaint16 *paint16, GfxScreen *screen, GfxPalette *palette, GfxCursor *cursor, GfxTransitions *transitions); virtual ~GfxAnimate(); // FIXME: Don't store EngineState @@ -118,7 +119,7 @@ private: GfxPaint16 *_paint16; GfxScreen *_screen; GfxPalette *_palette; - Cursor *_cursor; + GfxCursor *_cursor; GfxTransitions *_transitions; uint16 _listCount; diff --git a/engines/sci/graphics/cursor.cpp b/engines/sci/graphics/cursor.cpp index 62c9d146c5..ff681922ad 100644 --- a/engines/sci/graphics/cursor.cpp +++ b/engines/sci/graphics/cursor.cpp @@ -36,7 +36,7 @@ namespace Sci { -Cursor::Cursor(ResourceManager *resMan, GfxPalette *palette, GfxScreen *screen) +GfxCursor::GfxCursor(ResourceManager *resMan, GfxPalette *palette, GfxScreen *screen) : _resMan(resMan), _palette(palette), _screen(screen) { _upscaledHires = _screen->getUpscaledHires(); @@ -47,25 +47,25 @@ Cursor::Cursor(ResourceManager *resMan, GfxPalette *palette, GfxScreen *screen) _isVisible = true; } -Cursor::~Cursor() { +GfxCursor::~GfxCursor() { purgeCache(); } -void Cursor::show() { +void GfxCursor::show() { CursorMan.showMouse(true); _isVisible = true; } -void Cursor::hide() { +void GfxCursor::hide() { CursorMan.showMouse(false); _isVisible = false; } -bool Cursor::isVisible() { +bool GfxCursor::isVisible() { return _isVisible; } -void Cursor::purgeCache() { +void GfxCursor::purgeCache() { for (CursorCache::iterator iter = _cachedCursors.begin(); iter != _cachedCursors.end(); ++iter) { delete iter->_value; iter->_value = 0; @@ -74,7 +74,7 @@ void Cursor::purgeCache() { _cachedCursors.clear(); } -void Cursor::setShape(GuiResourceId resourceId) { +void GfxCursor::setShape(GuiResourceId resourceId) { Resource *resource; byte *resourceData; Common::Point hotspot = Common::Point(0, 0); @@ -133,7 +133,7 @@ void Cursor::setShape(GuiResourceId resourceId) { delete[] rawBitmap; } -void Cursor::setView(GuiResourceId viewNum, int loopNum, int celNum, Common::Point *hotspot) { +void GfxCursor::setView(GuiResourceId viewNum, int loopNum, int celNum, Common::Point *hotspot) { if (_cachedCursors.size() >= MAX_CACHED_CURSORS) purgeCache(); @@ -180,7 +180,7 @@ void Cursor::setView(GuiResourceId viewNum, int loopNum, int celNum, Common::Poi delete cursorHotspot; } -void Cursor::setPosition(Common::Point pos) { +void GfxCursor::setPosition(Common::Point pos) { if (!_upscaledHires) { g_system->warpMouse(pos.x, pos.y); } else { @@ -188,7 +188,7 @@ void Cursor::setPosition(Common::Point pos) { } } -Common::Point Cursor::getPosition() { +Common::Point GfxCursor::getPosition() { Common::Point mousePos = g_system->getEventManager()->getMousePos(); if (_upscaledHires) { @@ -199,7 +199,7 @@ Common::Point Cursor::getPosition() { return mousePos; } -void Cursor::refreshPosition() { +void GfxCursor::refreshPosition() { bool clipped = false; Common::Point mousePoint = getPosition(); diff --git a/engines/sci/graphics/cursor.h b/engines/sci/graphics/cursor.h index 281dc93dea..311a0ef876 100644 --- a/engines/sci/graphics/cursor.h +++ b/engines/sci/graphics/cursor.h @@ -40,10 +40,10 @@ class GfxPalette; typedef Common::HashMap<int, GfxView *> CursorCache; -class Cursor { +class GfxCursor { public: - Cursor(ResourceManager *resMan, GfxPalette *palette, GfxScreen *screen); - ~Cursor(); + GfxCursor(ResourceManager *resMan, GfxPalette *palette, GfxScreen *screen); + ~GfxCursor(); void show(); void hide(); diff --git a/engines/sci/graphics/gui.cpp b/engines/sci/graphics/gui.cpp index 7e200d7816..2c22619b6b 100644 --- a/engines/sci/graphics/gui.cpp +++ b/engines/sci/graphics/gui.cpp @@ -50,7 +50,7 @@ namespace Sci { -SciGui::SciGui(EngineState *state, GfxScreen *screen, GfxPalette *palette, GfxCache *cache, Cursor *cursor, GfxPorts *ports, AudioPlayer *audio) +SciGui::SciGui(EngineState *state, GfxScreen *screen, GfxPalette *palette, GfxCache *cache, GfxCursor *cursor, GfxPorts *ports, AudioPlayer *audio) : _s(state), _screen(screen), _palette(palette), _cache(cache), _cursor(cursor), _ports(ports), _audio(audio) { _compare = new GfxCompare(_s->_segMan, _s->_kernel, _cache, _screen); diff --git a/engines/sci/graphics/gui.h b/engines/sci/graphics/gui.h index c5c80342c6..f2904d5ff2 100644 --- a/engines/sci/graphics/gui.h +++ b/engines/sci/graphics/gui.h @@ -43,7 +43,7 @@ enum { class GfxScreen; class GfxPalette; -class Cursor; +class GfxCursor; class GfxCache; class GfxCompare; class GfxPorts; @@ -56,7 +56,7 @@ class GfxTransitions; class SciGui { public: - SciGui(EngineState *s, GfxScreen *screen, GfxPalette *palette, GfxCache *cache, Cursor *cursor, GfxPorts *ports, AudioPlayer *audio); + SciGui(EngineState *s, GfxScreen *screen, GfxPalette *palette, GfxCache *cache, GfxCursor *cursor, GfxPorts *ports, AudioPlayer *audio); virtual ~SciGui(); virtual void init(bool usesOldGfxFunctions); @@ -109,7 +109,7 @@ public: virtual void resetEngineState(EngineState *s); protected: - Cursor *_cursor; + GfxCursor *_cursor; EngineState *_s; GfxScreen *_screen; GfxPalette *_palette; diff --git a/engines/sci/graphics/gui32.cpp b/engines/sci/graphics/gui32.cpp index 79f4c98198..170acd07d5 100644 --- a/engines/sci/graphics/gui32.cpp +++ b/engines/sci/graphics/gui32.cpp @@ -45,7 +45,7 @@ namespace Sci { -SciGui32::SciGui32(EngineState *state, GfxScreen *screen, GfxPalette *palette, GfxCache *cache, Cursor *cursor) +SciGui32::SciGui32(EngineState *state, GfxScreen *screen, GfxPalette *palette, GfxCache *cache, GfxCursor *cursor) : _s(state), _screen(screen), _palette(palette), _cache(cache), _cursor(cursor) { _compare = new GfxCompare(_s->_segMan, _s->_kernel, _cache, _screen); diff --git a/engines/sci/graphics/gui32.h b/engines/sci/graphics/gui32.h index c635646efa..e8d909292c 100644 --- a/engines/sci/graphics/gui32.h +++ b/engines/sci/graphics/gui32.h @@ -30,7 +30,7 @@ namespace Sci { -class Cursor; +class GfxCursor; class GfxScreen; class GfxPalette; class GfxCache; @@ -40,7 +40,7 @@ class GfxPaint32; class SciGui32 { public: - SciGui32(EngineState *s, GfxScreen *screen, GfxPalette *palette, GfxCache *cache, Cursor *cursor); + SciGui32(EngineState *s, GfxScreen *screen, GfxPalette *palette, GfxCache *cache, GfxCursor *cursor); ~SciGui32(); void init(); @@ -83,7 +83,7 @@ public: void resetEngineState(EngineState *s); protected: - Cursor *_cursor; + GfxCursor *_cursor; EngineState *_s; GfxScreen *_screen; GfxPalette *_palette; diff --git a/engines/sci/graphics/menu.cpp b/engines/sci/graphics/menu.cpp index cff22eaefb..d2545c5e47 100644 --- a/engines/sci/graphics/menu.cpp +++ b/engines/sci/graphics/menu.cpp @@ -43,7 +43,7 @@ namespace Sci { -GfxMenu::GfxMenu(SciEvent *event, SegManager *segMan, SciGui *gui, GfxPorts *ports, GfxPaint16 *paint16, GfxText16 *text16, GfxScreen *screen, Cursor *cursor) +GfxMenu::GfxMenu(SciEvent *event, SegManager *segMan, SciGui *gui, GfxPorts *ports, GfxPaint16 *paint16, GfxText16 *text16, GfxScreen *screen, GfxCursor *cursor) : _event(event), _segMan(segMan), _gui(gui), _ports(ports), _paint16(paint16), _text16(text16), _screen(screen), _cursor(cursor) { _listCount = 0; diff --git a/engines/sci/graphics/menu.h b/engines/sci/graphics/menu.h index fb87c62f98..4144eab584 100644 --- a/engines/sci/graphics/menu.h +++ b/engines/sci/graphics/menu.h @@ -78,7 +78,7 @@ typedef Common::List<GuiMenuItemEntry *> GuiMenuItemList; class GfxMenu { public: - GfxMenu(SciEvent *event, SegManager *segMan, SciGui *gui, GfxPorts *ports, GfxPaint16 *paint16, GfxText16 *text16, GfxScreen *screen, Cursor *cursor); + GfxMenu(SciEvent *event, SegManager *segMan, SciGui *gui, GfxPorts *ports, GfxPaint16 *paint16, GfxText16 *text16, GfxScreen *screen, GfxCursor *cursor); ~GfxMenu(); void reset(); @@ -109,7 +109,7 @@ private: GfxPaint16 *_paint16; GfxText16 *_text16; GfxScreen *_screen; - Cursor *_cursor; + GfxCursor *_cursor; uint16 _listCount; GuiMenuList _list; diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp index 9218fdcc2a..e36614f5c0 100644 --- a/engines/sci/sci.cpp +++ b/engines/sci/sci.cpp @@ -156,7 +156,7 @@ Common::Error SciEngine::run() { GfxPalette *palette = new GfxPalette(_resMan, screen); GfxCache *cache = new GfxCache(_resMan, screen, palette); - Cursor *cursor = new Cursor(_resMan, palette, screen); + GfxCursor *cursor = new GfxCursor(_resMan, palette, screen); // Create debugger console. It requires GFX to be initialized _console = new Console(this); |