[Scummvm-cvs-logs] SF.net SVN: scummvm:[44932] scummvm/trunk/engines/sci/gui
thebluegr at users.sourceforge.net
thebluegr at users.sourceforge.net
Sun Oct 11 18:12:24 CEST 2009
Revision: 44932
http://scummvm.svn.sourceforge.net/scummvm/?rev=44932&view=rev
Author: thebluegr
Date: 2009-10-11 16:12:24 +0000 (Sun, 11 Oct 2009)
Log Message:
-----------
Stop passing all of the engine state to SciGuiPicture
Modified Paths:
--------------
scummvm/trunk/engines/sci/gui/gui_gfx.cpp
scummvm/trunk/engines/sci/gui/gui_picture.cpp
scummvm/trunk/engines/sci/gui/gui_picture.h
Modified: scummvm/trunk/engines/sci/gui/gui_gfx.cpp
===================================================================
--- scummvm/trunk/engines/sci/gui/gui_gfx.cpp 2009-10-11 16:00:16 UTC (rev 44931)
+++ scummvm/trunk/engines/sci/gui/gui_gfx.cpp 2009-10-11 16:12:24 UTC (rev 44932)
@@ -711,7 +711,7 @@
void SciGuiGfx::drawPicture(GuiResourceId pictureId, int16 animationNr, bool mirroredFlag, bool addToFlag, GuiResourceId paletteId) {
SciGuiPicture *picture;
- picture = new SciGuiPicture(_s, this, _screen, _palette, pictureId);
+ picture = new SciGuiPicture(_s->resMan, this, _screen, _palette, pictureId);
// do we add to a picture? if not -> clear screen
if (!addToFlag) {
if (_s->resMan->isVGA())
Modified: scummvm/trunk/engines/sci/gui/gui_picture.cpp
===================================================================
--- scummvm/trunk/engines/sci/gui/gui_picture.cpp 2009-10-11 16:00:16 UTC (rev 44931)
+++ scummvm/trunk/engines/sci/gui/gui_picture.cpp 2009-10-11 16:12:24 UTC (rev 44932)
@@ -34,8 +34,8 @@
namespace Sci {
-SciGuiPicture::SciGuiPicture(EngineState *state, SciGuiGfx *gfx, SciGuiScreen *screen, SciGuiPalette *palette, GuiResourceId resourceId)
- : _s(state), _gfx(gfx), _screen(screen), _palette(palette), _resourceId(resourceId) {
+SciGuiPicture::SciGuiPicture(ResourceManager *resMan, SciGuiGfx *gfx, SciGuiScreen *screen, SciGuiPalette *palette, GuiResourceId resourceId)
+ : _resMan(resMan), _gfx(gfx), _screen(screen), _palette(palette), _resourceId(resourceId) {
assert(resourceId != -1);
initData(resourceId);
}
@@ -44,7 +44,7 @@
}
void SciGuiPicture::initData(GuiResourceId resourceId) {
- _resource = _s->resMan->findResource(ResourceId(kResourceTypePic, resourceId), false);
+ _resource = _resMan->findResource(ResourceId(kResourceTypePic, resourceId), false);
if (!_resource) {
error("picture resource %d not found", resourceId);
}
@@ -135,7 +135,7 @@
ptr = celBitmap;
if (literalPos == 0) {
// decompression for data that has only one stream (vecor embedded view data)
- switch (_s->resMan->getViewType()) {
+ switch (_resMan->getViewType()) {
case kViewVga:
case kViewVga11:
while (pixelNr < pixelCount) {
@@ -312,7 +312,7 @@
if (_EGApaletteNo >= PIC_EGAPALETTE_COUNT)
_EGApaletteNo = 0;
- if (_s->resMan->getViewType() == kViewEga) {
+ if (_resMan->getViewType() == kViewEga) {
isEGA = true;
// setup default mapping tables
for (i = 0; i < PIC_EGAPALETTE_TOTALSIZE; i += PIC_EGAPALETTE_SIZE)
Modified: scummvm/trunk/engines/sci/gui/gui_picture.h
===================================================================
--- scummvm/trunk/engines/sci/gui/gui_picture.h 2009-10-11 16:00:16 UTC (rev 44931)
+++ scummvm/trunk/engines/sci/gui/gui_picture.h 2009-10-11 16:12:24 UTC (rev 44932)
@@ -34,7 +34,7 @@
class SciGuiPicture {
public:
- SciGuiPicture(EngineState *state, SciGuiGfx *gfx, SciGuiScreen *screen, SciGuiPalette *palette, GuiResourceId resourceId);
+ SciGuiPicture(ResourceManager *resMan, SciGuiGfx *gfx, SciGuiScreen *screen, SciGuiPalette *palette, GuiResourceId resourceId);
~SciGuiPicture();
GuiResourceId getResourceId();
@@ -58,7 +58,7 @@
void vectorPatternCircle(Common::Rect box, byte size, byte color, byte prio, byte control);
void vectorPatternTexturedCircle(Common::Rect box, byte size, byte color, byte prio, byte control, byte texture);
- EngineState *_s;
+ ResourceManager *_resMan;
SciGuiGfx *_gfx;
SciGuiScreen *_screen;
SciGuiPalette *_palette;
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