aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/sci/gui/gui_gfx.cpp2
-rw-r--r--engines/sci/gui/gui_picture.cpp10
-rw-r--r--engines/sci/gui/gui_picture.h4
3 files changed, 8 insertions, 8 deletions
diff --git a/engines/sci/gui/gui_gfx.cpp b/engines/sci/gui/gui_gfx.cpp
index e1ebd0fa7f..ca5d6ea1e8 100644
--- a/engines/sci/gui/gui_gfx.cpp
+++ b/engines/sci/gui/gui_gfx.cpp
@@ -711,7 +711,7 @@ void SciGuiGfx::Draw_String(const char *text) {
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())
diff --git a/engines/sci/gui/gui_picture.cpp b/engines/sci/gui/gui_picture.cpp
index 5da92050b7..cc3dda3e69 100644
--- a/engines/sci/gui/gui_picture.cpp
+++ b/engines/sci/gui/gui_picture.cpp
@@ -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 @@ SciGuiPicture::~SciGuiPicture() {
}
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 @@ void SciGuiPicture::drawCelData(byte *inbuffer, int size, int headerPos, int rle
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 @@ void SciGuiPicture::drawVectorData(byte *data, int dataSize) {
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)
diff --git a/engines/sci/gui/gui_picture.h b/engines/sci/gui/gui_picture.h
index 6bfee607f8..79075b4e8b 100644
--- a/engines/sci/gui/gui_picture.h
+++ b/engines/sci/gui/gui_picture.h
@@ -34,7 +34,7 @@ namespace Sci {
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 @@ private:
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;