[Scummvm-cvs-logs] CVS: scummvm/queen display.h,NONE,1.1 display.cpp,NONE,1.1 graphics.h,1.18,1.19 graphics.cpp,1.20,1.21 logic.h,1.32,1.33 logic.cpp,1.43,1.44 queen.h,1.6,1.7 queen.cpp,1.9,1.10 module.mk,1.9,1.10

Gregory Montoir cyx at users.sourceforge.net
Thu Oct 16 06:56:06 CEST 2003


Update of /cvsroot/scummvm/scummvm/queen
In directory sc8-pr-cvs1:/tmp/cvs-serv17743

Modified Files:
	graphics.h graphics.cpp logic.h logic.cpp queen.h queen.cpp 
	module.mk 
Added Files:
	display.h display.cpp 
Log Message:
new Display class, cleanup Graphics

--- NEW FILE: display.h ---
/* ScummVM - Scumm Interpreter
 * Copyright (C) 2003 The ScummVM project
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.

 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the
 * GNU General Public License for more details.

 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 *
 * $Header: /cvsroot/scummvm/scummvm/queen/display.h,v 1.1 2003/10/16 13:54:48 cyx Exp $
 *
 */

#ifndef QUEENDISPLAY_H
#define QUEENDISPLAY_H

#include "queen/queen.h"
#include "queen/defs.h"
#include "queen/structs.h"

namespace Queen {


enum RenderingBuffer {
	RB_BACKDROP = 0,
	RB_PANEL    = 1,
	RB_SCREEN   = 2
};


struct Dynalum {
	uint8 msk[50 * 160];
	int8 lum[8 * 3];
	uint8 prevColMask;
};


struct TextRenderer {
	void init();
	void drawString(uint8 *dstBuf, uint16 dstPitch, uint16 x, uint16 y, uint8 color, const char *text, bool outlined = true);
	void drawChar(uint8 *dstBuf, uint16 dstPitch, uint16 x, uint16 y, uint8 color, const uint8 *chr);

	uint8 charWidth[256];
	static const uint8 FONT[];
};


class Display {
public:

	Display(OSystem *system);
	~Display();

	void dynalumInit(Resource *resource, const char *roomName, uint16 roomNum);
	void dynalumUpdate(int x, int y);

	void palSetRoom(const uint8 *pal, int start, int end);
	void palFadeIn(uint8 start, uint8 end, uint16 roomNum);
	void palFadeOut(uint8 start, uint8 end, uint16 roomNum);
	void palFadePanel();
	void palCustomColors(uint16 roomNum); // check_colors
	void palCustomScroll(uint16 roomNum); // check_pal_scroll

	void screenMode(int comPanel, bool inCutaway);

	void prepareUpdate();
	void update(bool dynalum, int dynaX, int dynaY);

	void blit(RenderingBuffer dstBuf, uint16 dstX, uint16 dstY, const uint8 *srcBuf, uint16 srcW, uint16 srcH, uint16 srcPitch, bool xflip, bool masked);
	void fill(RenderingBuffer dstBuf, uint16 x, uint16 y, uint16 w, uint16 h, uint8 color);

	void pcxRead(uint8 *dst, uint16 dstPitch, const uint8 *src, uint16 w, uint16 h);
	void pcxReadBackdrop(const uint8 *pcxBuf, uint32 size, bool useFullPal);
	void pcxReadPanel(const uint8 *pcxBuf, uint32 size);

	void textDraw(uint16 x, uint16 y, uint8 color, const char *text, bool outlined = true);
	uint16 textWidth(const char *text) const;

	void horizontalScroll(uint16 scroll);

	bool fullscreen() const { return _fullscreen; }


private:

	enum BufferDimension {
		BACKDROP_W = 640,
		BACKDROP_H = 200,
		SCREEN_W   = 320,
		SCREEN_H   = 200,
		PANEL_W    = 320,
		PANEL_H    = 50
	};

	TextRenderer _textRenderer;

	struct {
		uint8 *screen;
		uint8 *room;
		int dirtyMin, dirtyMax;
	} _pals;

	uint8 *_buffers[3];
	uint16 _bufPitch[3];

	bool _fullscreen;
	bool _panel;

	uint16 _horizontalScroll;
	uint16 _bdWidth, _bdHeight;

	Dynalum _dynalum;
	OSystem *_system;

};


} // End of namespace Queen

#endif

--- NEW FILE: display.cpp ---
/* ScummVM - Scumm Interpreter
 * Copyright (C) 2003 The ScummVM project
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.

 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.	 See the
 * GNU General Public License for more details.

 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 *
 * $Header: /cvsroot/scummvm/scummvm/queen/display.cpp,v 1.1 2003/10/16 13:54:48 cyx Exp $
 *
 */

#include "queen/display.h"
#include "queen/defs.h"
#include "queen/resource.h"


namespace Queen {



void TextRenderer::init() {

	// calculate font justification sizes
	uint16 i, y, x;

	for (i = 0; i < 256; ++i) {
		charWidth[i] = 0;
		for (y = 0; y < 8; ++y) {
			uint8 c = FONT[i * 8 + y];
			for (x = 0; x < 8; ++x) {
				if ((c & (0x80 >> x)) && (x > charWidth[i])) {
					charWidth[i] = x;
				}
			}
		}
		charWidth[i] += 2;
	}
    charWidth[' '] = 4;
    --charWidth['^'];
}


void TextRenderer::drawString(uint8 *dstBuf, uint16 dstPitch, uint16 x, uint16 y, uint8 color, const char *text, bool outlined) {

	while (*text && x < dstPitch) {
		const uint8 *pchr = FONT + (*text) * 8;

		// FIXME: handle 0x96 character in french version (replace with 0xFB)

		if (outlined) {
			drawChar(dstBuf, dstPitch, x - 1, y - 1, INK_OUTLINED_TEXT, pchr);
			drawChar(dstBuf, dstPitch, x    , y - 1, INK_OUTLINED_TEXT, pchr);
			drawChar(dstBuf, dstPitch, x + 1, y - 1, INK_OUTLINED_TEXT, pchr);
			drawChar(dstBuf, dstPitch, x + 1, y    , INK_OUTLINED_TEXT, pchr);
			drawChar(dstBuf, dstPitch, x + 1, y + 1, INK_OUTLINED_TEXT, pchr);
			drawChar(dstBuf, dstPitch, x    , y + 1, INK_OUTLINED_TEXT, pchr);
			drawChar(dstBuf, dstPitch, x - 1, y + 1, INK_OUTLINED_TEXT, pchr);
			drawChar(dstBuf, dstPitch, x - 1, y    , INK_OUTLINED_TEXT, pchr);
		}
		drawChar(dstBuf, dstPitch, x, y, color, pchr);

		x += charWidth[ (int)*text ];
		++text;
	}
}


void TextRenderer::drawChar(uint8 *dstBuf, uint16 dstPitch, uint16 x, uint16 y, uint8 color, const uint8 *chr) {

	dstBuf += dstPitch * y + x;
	uint16 j, i;
	for (j = 0; j < 8; ++j) {
		uint8 *p = dstBuf;
		uint8 c = *chr++;
		if (c != 0) {
			for (i = 0; i < 8; ++i) {
				if(c & 0x80) {
					*p = color;
				}
				++p;
				c <<= 1;
			}
		}
		dstBuf += dstPitch;
	}
}



Display::Display(OSystem *system)
	: _system(system) {

	_dynalum.prevColMask = 0xFF;
	_textRenderer.init();

	_buffers[RB_BACKDROP] = new uint8[BACKDROP_W * BACKDROP_H];
	_buffers[RB_PANEL]    = new uint8[PANEL_W * PANEL_H];
	_buffers[RB_SCREEN]   = new uint8[SCREEN_W * SCREEN_H];
	memset(_buffers[RB_BACKDROP], 0, BACKDROP_W * BACKDROP_H);
	memset(_buffers[RB_PANEL],    0, PANEL_W * PANEL_H);
	memset(_buffers[RB_SCREEN],   0, SCREEN_W * SCREEN_H);
	_bufPitch[RB_BACKDROP] = BACKDROP_W;
	_bufPitch[RB_PANEL]    = PANEL_W;
	_bufPitch[RB_SCREEN]   = SCREEN_W;

	_pals.room   = new uint8[ 256 * 3 ];
	_pals.screen = new uint8[ 256 * 4 ];
	memset(_pals.room,   0, 256 * 3);
	memset(_pals.screen, 0, 256 * 4);
	_pals.dirtyMin = 0;
	_pals.dirtyMax = 255;
	
	_horizontalScroll = 0;
}


Display::~Display() {

	delete[] _buffers[RB_BACKDROP];
	delete[] _buffers[RB_PANEL];
	delete[] _buffers[RB_SCREEN];

	delete[] _pals.room;
	delete[] _pals.screen;
}


void Display::dynalumInit(Resource *resource, const char *roomName, uint16 roomNum) {

	debug(9, "Display::dynalumInit(%s, %d)", roomName, roomNum);
	memset(_dynalum.msk, 0, sizeof(_dynalum.msk));
	memset(_dynalum.lum, 0, sizeof(_dynalum.lum));
	// FIXME: are these tests really needed ?
	if (roomNum < 90 || ((roomNum > 94) && (roomNum < 114))) {
		char filename[20];
		sprintf(filename, "%s.msk", roomName);
		resource->loadFile(filename, 0, (uint8*)_dynalum.msk);
		sprintf(filename, "%s.lum", roomName);
		resource->loadFile(filename, 0, (uint8*)_dynalum.lum);
	}
}


void Display::dynalumUpdate(int x, int y) {

	if (x >= _bdWidth) {
		x = _bdWidth;
	}
	if (y >= ROOM_ZONE_HEIGHT - 1) {
		y = ROOM_ZONE_HEIGHT - 1;
	}
	uint8 colMask = _dynalum.msk[(y / 4) * 160 + (x / 4)];
	debug(9, "Graphics::dynalumUpdate(%d, %d) - colMask = %d", x, y, colMask);

	if (colMask != _dynalum.prevColMask) {
		uint8 i;
		for (i = 144; i < 160; ++i) {
			uint8 j;
			for (j = 0; j < 3; ++j) {
				int16 c = (int16)(_pals.room[i * 3 + j] + _dynalum.lum[colMask * 3 + j] * 4);
				if (c < 0) {
					c = 0;
				}
				else if (c > 255) {
					c = 255;
				}
				_pals.screen[i * 4 + j] = (uint8)c;
			}
		}
		_pals.dirtyMin = MIN(_pals.dirtyMin, 144);
		_pals.dirtyMax = MAX(_pals.dirtyMax, 160);
		_dynalum.prevColMask = colMask;
	}
}


void Display::palSetRoom(const uint8 *pal, int start, int end) {

	int i;
	pal += start * 3;
	for (i = start; i < end; ++i, pal += 3) {
		_pals.screen[i << 2 | 0] = _pals.room[i * 3 + 0] = *(pal + 0);
		_pals.screen[i << 2 | 1] = _pals.room[i * 3 + 1] = *(pal + 1);
		_pals.screen[i << 2 | 2] = _pals.room[i * 3 + 2] = *(pal + 2);
		_pals.screen[i << 2 | 3] = 0;
	}
	_pals.dirtyMin = MIN(_pals.dirtyMin, start);
	_pals.dirtyMax = MAX(_pals.dirtyMax, end);
}


void Display::palFadeIn(uint8 start, uint8 end, uint16 roomNum) {
	warning("Display::palFadeIn() unimplemented");
}


void Display::palFadeOut(uint8 start, uint8 end, uint16 roomNum) {
	warning("Display::palFadeOut() unimplemented");
}


void Display::palFadePanel() {
	warning("Display::palFadePanel() unimplemented");
}


void Display::palCustomColors(uint16 roomNum) {
	warning("Display::palCustomColors() unimplemented");
}


void Display::palCustomScroll(uint16 roomNum) {
	warning("Display::palCustomScroll() unimplemented");
}


void Display::screenMode(int comPanel, bool inCutaway) {

	if (comPanel == 2 && inCutaway) {
		if (_bdHeight == GAME_SCREEN_HEIGHT) {
			_fullscreen = true;
			_panel = false;
		}
		else {
			_fullscreen = false;
			_panel = true;
		}
	}
	else {
		_fullscreen = 0;
		_panel = (comPanel == 1);
	}
}


void Display::prepareUpdate() {

	if (_panel) {
		// draw the panel
		memcpy(_buffers[RB_SCREEN] + _bufPitch[RB_SCREEN] * ROOM_ZONE_HEIGHT, 
			_buffers[RB_PANEL], PANEL_W * PANEL_H);
	}
	else if (!_fullscreen) {
		// clear the panel
		memset(_buffers[RB_SCREEN] + _bufPitch[RB_SCREEN] * ROOM_ZONE_HEIGHT, 
			0, PANEL_W * PANEL_H);
	}

	// draw the backdrop bitmap
	int i;
	int n = _fullscreen ? 200 : 150;
	uint8 *dst = _buffers[RB_SCREEN];
	uint8 *src = _buffers[RB_BACKDROP] + _horizontalScroll;
	for (i = 0; i < n; ++i) {
		memcpy(dst, src, _bufPitch[RB_SCREEN]);
		dst += _bufPitch[RB_SCREEN];
		src += _bufPitch[RB_BACKDROP];
	}
}


void Display::update(bool dynalum, int dynaX, int dynaY) {

	if (dynalum) {
		dynalumUpdate(dynaX, dynaY);
	}

	if (_pals.dirtyMin != 144 || _pals.dirtyMax != 145) {
		const uint8 *p = _pals.screen + 4 * _pals.dirtyMin;
		_system->set_palette(p, _pals.dirtyMin, _pals.dirtyMax);
		_pals.dirtyMin = 144;
		_pals.dirtyMax = 145;
	}
	_system->copy_rect(_buffers[RB_SCREEN], _bufPitch[RB_SCREEN], 0, 0, SCREEN_W, SCREEN_H);
	_system->update_screen();
}


void Display::blit(RenderingBuffer dst, uint16 dstX, uint16 dstY, const uint8 *srcBuf, uint16 srcW, uint16 srcH, uint16 srcPitch, bool xflip, bool masked) {
 
	uint16 dstPitch = _bufPitch[dst];
	uint8 *dstBuf = _buffers[dst] + dstPitch * dstY + dstX;

	if (!masked) { // Unmasked always unflipped
		while (srcH--) {
			memcpy(dstBuf, srcBuf, srcW);
			srcBuf += srcPitch;
			dstBuf += dstPitch;
		}
	}
	else if (!xflip) { // Masked bitmap unflipped
		while (srcH--) {
			int i;
			for(i = 0; i < srcW; ++i) {
				uint8 b = *(srcBuf + i);
				if(b != 0) {
					*(dstBuf + i) = b;
				}
			}
			srcBuf += srcPitch;
			dstBuf += dstPitch;
		}
	}
	else { // Masked bitmap flipped
		while (srcH--) {
			int i;
			for(i = 0; i < srcW; ++i) {
				uint8 b = *(srcBuf + i);
				if(b != 0) {
					*(dstBuf - i) = b;
				}
			}
			srcBuf += srcPitch;
			dstBuf += dstPitch;   
		}
	}
}


void Display::fill(RenderingBuffer dst, uint16 x, uint16 y, uint16 w, uint16 h, uint8 color) {

	assert(w <= _bufPitch[dst]);
	uint16 dstPitch = _bufPitch[dst];
	uint8 *dstBuf = _buffers[dst] + dstPitch * y + x;
	while (h--) {
		memset(dstBuf, color, w);
		dstBuf += dstPitch;
	}
}


void Display::pcxRead(uint8 *dst, uint16 dstPitch, const uint8 *src, uint16 w, uint16 h) {

	while (h--) {
		uint8 *p = dst;
		while (p < dst + w ) {
			uint8 col = *src++;
			if ((col & 0xC0) == 0xC0) {
				uint8 len = col & 0x3F;
				memset(p, *src++, len);
				p += len;
			}
			else {
				*p++ = col;
			}
		}
		dst += dstPitch;
	}
}


void Display::pcxReadBackdrop(const uint8 *pcxBuf, uint32 size, bool useFullPal) {

	_bdWidth  = READ_LE_UINT16(pcxBuf + 12);
	_bdHeight = READ_LE_UINT16(pcxBuf + 14);
	pcxRead(_buffers[RB_BACKDROP], _bufPitch[RB_BACKDROP], pcxBuf + 128, _bdWidth, _bdHeight);
	palSetRoom(pcxBuf + size - 768, 0, useFullPal ? 256 : 144);
}


void Display::pcxReadPanel(const uint8 *pcxBuf, uint32 size) {

	uint8 *dst = _buffers[RB_PANEL] + PANEL_W * 10;
	pcxRead(dst, PANEL_W, pcxBuf + 128, PANEL_W, PANEL_H - 10);
	palSetRoom(pcxBuf + size - 768, 144, 256);
}


void Display::textDraw(uint16 x, uint16 y, uint8 color, const char *text, bool outlined) {

	_textRenderer.drawString(_buffers[RB_SCREEN], _bufPitch[RB_SCREEN], x, y, color, text, outlined);
}


uint16 Display::textWidth(const char *text) const {

	uint16 len = 0;
	while (*text) {
		len += _textRenderer.charWidth[ (int)*text ];
		++text;
	}
	return len;
}


void Display::horizontalScroll(uint16 scroll) {

	_horizontalScroll = scroll;
}


const uint8 TextRenderer::FONT[] = {
	0xF8, 0xB0, 0xB0, 0x80, 0xB0, 0xB0, 0xC0, 0x00, 0xF8, 0xB0, 
	0xB0, 0x80, 0xB0, 0xB0, 0xC0, 0x00, 0xF8, 0xB0, 0xB0, 0x80, 
	0xB0, 0xB0, 0xC0, 0x00, 0xF8, 0xB0, 0xB0, 0x80, 0xB0, 0xB0, 
	0xC0, 0x00, 0xF8, 0xB0, 0xB0, 0x80, 0xB0, 0xB0, 0xC0, 0x00, 
	0xF8, 0xB0, 0xB0, 0x80, 0xB0, 0xB0, 0xC0, 0x00, 0xF8, 0xB0, 
	0xB0, 0x80, 0xB0, 0xB0, 0xC0, 0x00, 0xF8, 0xB0, 0xB0, 0x80, 
	0xB0, 0xB0, 0xC0, 0x00, 0xF8, 0xB0, 0xB0, 0x80, 0xB0, 0xB0, 
	0xC0, 0x00, 0xF8, 0xB0, 0xB0, 0x80, 0xB0, 0xB0, 0xC0, 0x00, 
	0xF8, 0xB0, 0xB0, 0x80, 0xB0, 0xB0, 0xC0, 0x00, 0xF8, 0xB0, 
	0xB0, 0x80, 0xB0, 0xB0, 0xC0, 0x00, 0xF8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 
	0xC0, 0x00, 0xD8, 0xD8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x6C, 0x6C, 0xFE, 0x6C, 0xFE, 0x6C, 0x6C, 0x00, 0x30, 0x7C, 
	0xC0, 0x78, 0x0C, 0xF8, 0x30, 0x00, 0x00, 0xC6, 0xCC, 0x18, 
	0x30, 0x66, 0xC6, 0x00, 0x38, 0x6C, 0x68, 0x36, 0xDC, 0xCC, 
	0x76, 0x00, 0x60, 0x60, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x30, 0x60, 0xC0, 0xC0, 0xC0, 0x60, 0x30, 0x00, 0xC0, 0x60, 
	0x30, 0x30, 0x30, 0x60, 0xC0, 0x00, 0x00, 0x6C, 0x38, 0xFE, 
	0x38, 0x6C, 0x00, 0x00, 0x00, 0x30, 0x30, 0xFC, 0x30, 0x30, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0xC0, 
	0x00, 0x00, 0x00, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x03, 0x06, 0x0C, 0x18, 
	0x30, 0x60, 0xC0, 0x00, 0x78, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 
	0x78, 0x00, 0x30, 0x70, 0xF0, 0x30, 0x30, 0x30, 0x30, 0x00, 
	0x78, 0xCC, 0x0C, 0x78, 0xC0, 0xC0, 0xFC, 0x00, 0x78, 0xCC, 
	0x0C, 0x38, 0x0C, 0xCC, 0x78, 0x00, 0x1C, 0x3C, 0x6C, 0xCC, 
	0xFC, 0x0C, 0x0C, 0x00, 0xFC, 0xC0, 0xF8, 0x0C, 0x0C, 0xCC, 
	0x78, 0x00, 0x78, 0xCC, 0xC0, 0xF8, 0xCC, 0xCC, 0x78, 0x00, 
	0xFC, 0xCC, 0x0C, 0x18, 0x30, 0x30, 0x30, 0x00, 0x78, 0xCC, 
	0xCC, 0x78, 0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38, 0x60, 0x60, 0xC0, 0x60, 0x60, 
	0x38, 0x00, 0xC0, 0xC0, 0xC0, 0x00, 0xC0, 0xC0, 0xC0, 0x00, 
	0xE0, 0x30, 0x30, 0x18, 0x30, 0x30, 0xE0, 0x00, 0x38, 0x44, 
	0xBA, 0xAA, 0xBA, 0x44, 0x38, 0x00, 0x00, 0x98, 0x30, 0x60, 
	0xC8, 0x98, 0x30, 0x00, 0x1E, 0x30, 0x60, 0x60, 0x30, 0x1E, 
	0x0C, 0x18, 0x00, 0x66, 0x00, 0x66, 0x66, 0x66, 0x3E, 0x00, 
	0x0C, 0x18, 0x3C, 0x66, 0x7E, 0x60, 0x3C, 0x00, 0x18, 0x66, 
	0x3C, 0x06, 0x3E, 0x66, 0x3E, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x30, 0x18, 0x3C, 0x06, 0x3E, 0x66, 
	0x3E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x1E, 0x30, 0x60, 0x60, 0x30, 0x1E, 0x0C, 0x18, 0x18, 0x66, 
	0x3C, 0x66, 0x7E, 0x60, 0x3C, 0x00, 0x66, 0x00, 0x3C, 0x66, 
	0x7E, 0x60, 0x3C, 0x00, 0x30, 0x18, 0x3C, 0x66, 0x7E, 0x60, 
	0x3C, 0x00, 0x00, 0x66, 0x00, 0x18, 0x18, 0x18, 0x18, 0x00, 
	0x18, 0x66, 0x00, 0x18, 0x18, 0x18, 0x18, 0x00, 0x30, 0x18, 
	0x00, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x18, 0x30, 0xFC, 0xC0, 0xF0, 0xC0, 0xFC, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x66, 0x00, 0x3C, 
	0x66, 0x66, 0x3C, 0x00, 0x00, 0x66, 0x00, 0x3C, 0x66, 0x66, 
	0x3C, 0x00, 0x30, 0x18, 0x00, 0x3C, 0x66, 0x66, 0x3C, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x18, 
	0x00, 0x66, 0x66, 0x66, 0x3E, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0x18, 0x30, 0x78, 0x0C, 0x7C, 0xCC, 0x7C, 0x00, 0x0C, 0x18, 
	0x00, 0x18, 0x18, 0x18, 0x18, 0x00, 0x18, 0x30, 0x00, 0x78, 
	0xCC, 0xCC, 0x78, 0x00, 0x18, 0x30, 0x00, 0xCC, 0xCC, 0xCC, 
	0x7C, 0x00, 0x71, 0x8E, 0x00, 0x7C, 0x66, 0x66, 0x66, 0x00, 
	0x71, 0xCE, 0xE6, 0xF6, 0xDE, 0xCE, 0xC6, 0x00, 0x18, 0x18, 
	0x18, 0x00, 0x18, 0x18, 0x18, 0x00, 0x3C, 0x60, 0x3C, 0x66, 
	0x3C, 0x06, 0x3C, 0x00, 0x18, 0x00, 0x18, 0x0C, 0x06, 0x66, 
	0x3C, 0x00, 0x3F, 0x40, 0x4E, 0x58, 0x4E, 0x40, 0x3F, 0x00, 
	0x1C, 0xA4, 0xC4, 0xBC, 0x80, 0xFE, 0x00, 0x00, 0x00, 0x33, 
	0x66, 0xCC, 0x66, 0x33, 0x00, 0x00, 0x3E, 0x06, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0xC0, 0xC0, 0xC0, 
	0xC0, 0x00, 0x81, 0xB9, 0xA5, 0xB9, 0xA5, 0x81, 0x7E, 0x00, 
	0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0xCC, 
	0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x30, 0xFC, 0x30, 
	0x30, 0x00, 0xFC, 0x00, 0xF0, 0x18, 0x30, 0x60, 0xF8, 0x00, 
	0x00, 0x00, 0xF0, 0x18, 0x30, 0x18, 0xF0, 0x00, 0x00, 0x00, 
	0x30, 0x60, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
	0xCC, 0xCC, 0xCC, 0xCC, 0xFE, 0xC0, 0x3E, 0x7A, 0x7A, 0x3A, 
	0x0A, 0x0A, 0x0A, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 
	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x60, 
	0x60, 0xE0, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, 0x38, 0x44, 
	0x44, 0x38, 0x00, 0x7C, 0x00, 0x00, 0x00, 0xCC, 0x66, 0x33, 
	0x66, 0xCC, 0x00, 0x00, 0x40, 0xC6, 0x4C, 0x58, 0x32, 0x66, 
	0xCF, 0x02, 0x40, 0xC6, 0x4C, 0x58, 0x3E, 0x62, 0xC4, 0x0E, 
	0xC0, 0x23, 0x66, 0x2C, 0xD9, 0x33, 0x67, 0x01, 0x18, 0x00, 
	0x18, 0x30, 0x60, 0x66, 0x3C, 0x00, 0x60, 0x30, 0x7C, 0xC6, 
	0xFE, 0xC6, 0xC6, 0x00, 0x0C, 0x18, 0x7C, 0xC6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0x3F, 0x66, 
	0x6E, 0x7E, 0x76, 0x66, 0xFC, 0x00, 0x30, 0x18, 0x66, 0x66, 
	0x66, 0x66, 0x3E, 0x00, 0x0C, 0x18, 0x66, 0x66, 0x66, 0x66, 
	0x3E, 0x00, 0x18, 0x24, 0x66, 0x66, 0x66, 0x66, 0x3E, 0x00, 
	0x66, 0x00, 0x66, 0x66, 0x66, 0x66, 0x3E, 0x00, 0x06, 0x08, 
	0xC3, 0x66, 0x3C, 0x18, 0x18, 0x00, 0x60, 0x60, 0x7E, 0x63, 
	0x7E, 0x60, 0x60, 0x00, 0x3C, 0x66, 0x66, 0x6C, 0x66, 0x66, 
	0x6C, 0x60, 0x30, 0x18, 0x3C, 0x06, 0x3E, 0x66, 0x3E, 0x00, 
	0x0C, 0x18, 0x3C, 0x06, 0x3E, 0x66, 0x3E, 0x00, 0x18, 0x66, 
	0x3C, 0x06, 0x3E, 0x66, 0x3E, 0x00, 0x71, 0x8E, 0x3C, 0x06, 
	0x3E, 0x66, 0x3E, 0x00, 0x66, 0x00, 0x3C, 0x06, 0x3E, 0x66, 
	0x3E, 0x00, 0x18, 0x24, 0x3C, 0x06, 0x3E, 0x66, 0x3E, 0x00, 
	0x00, 0x00, 0x7E, 0x1B, 0x7F, 0xD8, 0x77, 0x00, 0x00, 0x00, 
	0x3C, 0x60, 0x60, 0x60, 0x3C, 0x18, 0x30, 0x18, 0x3C, 0x66, 
	0x7E, 0x60, 0x3C, 0x00, 0x0C, 0x18, 0x3C, 0x66, 0x7E, 0x60, 
	0x3C, 0x00, 0x18, 0x66, 0x3C, 0x66, 0x7E, 0x60, 0x3C, 0x00, 
	0x66, 0x00, 0x3C, 0x66, 0x7E, 0x60, 0x3C, 0x00, 0x30, 0x18, 
	0x00, 0x18, 0x18, 0x18, 0x18, 0x00, 0x0C, 0x18, 0x00, 0x18, 
	0x18, 0x18, 0x18, 0x00, 0x18, 0x66, 0x00, 0x18, 0x18, 0x18, 
	0x18, 0x00, 0x00, 0x66, 0x00, 0x18, 0x18, 0x18, 0x18, 0x00, 
	0x60, 0xFC, 0x18, 0x3C, 0x66, 0x66, 0x3C, 0x00, 0x71, 0x8E, 
	0x00, 0x7C, 0x66, 0x66, 0x66, 0x00, 0x30, 0x18, 0x00, 0x3C, 
	0x66, 0x66, 0x3C, 0x00, 0x0C, 0x18, 0x00, 0x3C, 0x66, 0x66, 
	0x3C, 0x00, 0x18, 0x66, 0x00, 0x3C, 0x66, 0x66, 0x3C, 0x00, 
	0x71, 0x8E, 0x00, 0x3C, 0x66, 0x66, 0x3C, 0x00, 0x00, 0x66, 
	0x00, 0x3C, 0x66, 0x66, 0x3C, 0x00, 0x00, 0x18, 0x00, 0x7E, 
	0x00, 0x18, 0x00, 0x00, 0x00, 0x02, 0x7C, 0xCE, 0xD6, 0xE6, 
	0x7C, 0x80, 0x30, 0x18, 0x00, 0x66, 0x66, 0x66, 0x3E, 0x00, 
	0x0C, 0x18, 0x00, 0x66, 0x66, 0x66, 0x3E, 0x00, 0x18, 0x66, 
	0x00, 0x66, 0x66, 0x66, 0x3E, 0x00, 0x00, 0x66, 0x00, 0x66, 
	0x66, 0x66, 0x3E, 0x00, 0x0C, 0x18, 0x00, 0x66, 0x66, 0x3C, 
	0x18, 0x30, 0x60, 0x60, 0x7C, 0x66, 0x66, 0x7C, 0x60, 0x60, 
	0x00, 0x66, 0x00, 0x66, 0x66, 0x3C, 0x18, 0x30, 0xFF 
};


} // End of namespace Queen

Index: graphics.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/graphics.h,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- graphics.h	15 Oct 2003 16:31:51 -0000	1.18
+++ graphics.h	16 Oct 2003 13:54:48 -0000	1.19
@@ -101,20 +101,20 @@
 };
 
 
-struct Dynalum {
-	uint8 msk[50 * 160]; // mask
-	int8 lum[8 * 3]; // rgb
-	int8 oldColMask;
-	Dynalum(): oldColMask(-1) {}
-};
+//struct Dynalum {
+//	uint8 msk[50 * 160]; // mask
+//	int8 lum[8 * 3]; // rgb
+//	int8 oldColMask;
+//	Dynalum(): oldColMask(-1) {}
+//};
 
 
-//class Display;
+class Display;
 
 class Graphics {
 public:
 
-	Graphics(Resource *resource);
+	Graphics(Display *display, Resource *resource);
 	~Graphics();
 
 	void bankLoad(const char *bankname, uint32 bankslot); // loadbank()
@@ -145,42 +145,19 @@
 	void frameErase(uint32 fslot);
 	void frameEraseAll(bool joe); // freeframes, freeallframes
 
-	void backdropLoad(const char *name, uint16 room); // loadbackdrop
-	void backdropDraw();
-
-	void panelLoad(); // loadpanel
-	void panelDraw();
-	void panelClear();
-
-	void boxDraw(const Box &b, uint8 color);
+	void loadBackdrop(const char *name, uint16 room);
+	void loadPanel();
 
 	void useJournal();
 	void journalBobSetup(uint32 bobnum, uint16 x, uint16 y, uint16 frame);
 	void journalBobPreDraw();
 
 	void update();
- 
-	void displayText(const TextSlot *pts, uint16 y); // FIXME: move to Display class
-	void displayChar(uint16 x, uint16 y, uint8 color, const uint8 *chr); // FIXME: move to Display class
-	static void displayBlit(uint8 *dst_buf, uint16 dst_x, uint16 dst_y, uint16 dst_pitch, const uint8 *src_buf, uint16 src_w, uint16 src_h, uint16 src_pitch, bool xflip, bool masked); // FIXME: move to Display class
-	void displayScreen();
-
-	void setScreenMode(int comPanel, bool inCutaway);
-	void setRoomPal(const uint8 *pal, int start, int end);
-
-	void dynalumInit(const char* roomPrefix, uint16 room);
-	void dynalumUpdate(uint16 x, uint16 y); // dynalum()
 
 
 private:
 
 	enum {
-		BACKDROP_W = 640,
-		BACKDROP_H = 200,
-		SCREEN_W = 320,
-		SCREEN_H = 200,
-		PANEL_W = 320,
-		PANEL_H = 50,
 		BOB_SHRINK_BUF_SIZE = 60000
 	};
 	
@@ -211,38 +188,8 @@
 
 	uint16 _cameraBob; // cambob
 
-	//! current room dimensions
-	uint16 _backdropWidth, _backdropHeight; // BDxres, BDyres
-
-	 //! current room bitmap
-	uint8 *_backdrop;
-
-	uint8 *_screen;
-
-	bool _fullscreen;
-
-	bool _panelFlag;
-
-	uint16 _horizontalScroll;
-
-	uint8 *_paletteRoom; // palette
-	uint8 *_paletteScreen; // tpal
-
-	//! panel storage area
-	uint8 *_panel;
-
+	Display *_display;
 	Resource *_resource;
-//	Display *_display;
-
-	Dynalum _dynalum;
-
-	//! font used to render the text
-	static const uint8 FONT[]; // FIXME: move to Display class
-
-	//! font justification values
-	static const uint8 FONT_SIZES[]; // FIXME: move to Display class
-
-	void readPCX(const uint8 *src, uint8 *dst, uint16 dstPitch, uint16 w, uint16 h);
 
 };
 

Index: graphics.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/graphics.cpp,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- graphics.cpp	16 Oct 2003 09:27:45 -0000	1.20
+++ graphics.cpp	16 Oct 2003 13:54:48 -0000	1.21
@@ -21,253 +21,14 @@
 
 #include "stdafx.h"
 #include "queen/graphics.h"
-#include "queen/resource.h"
+#include "queen/display.h"
 
 
 namespace Queen {
 
 
-const uint8 Graphics::FONT[] = {
-	0xF8, 0xB0, 0xB0, 0x80, 0xB0, 0xB0, 0xC0, 0x00, 0xF8, 0xB0, 
-	0xB0, 0x80, 0xB0, 0xB0, 0xC0, 0x00, 0xF8, 0xB0, 0xB0, 0x80, 
-	0xB0, 0xB0, 0xC0, 0x00, 0xF8, 0xB0, 0xB0, 0x80, 0xB0, 0xB0, 
-	0xC0, 0x00, 0xF8, 0xB0, 0xB0, 0x80, 0xB0, 0xB0, 0xC0, 0x00, 
-	0xF8, 0xB0, 0xB0, 0x80, 0xB0, 0xB0, 0xC0, 0x00, 0xF8, 0xB0, 
-	0xB0, 0x80, 0xB0, 0xB0, 0xC0, 0x00, 0xF8, 0xB0, 0xB0, 0x80, 
-	0xB0, 0xB0, 0xC0, 0x00, 0xF8, 0xB0, 0xB0, 0x80, 0xB0, 0xB0, 
-	0xC0, 0x00, 0xF8, 0xB0, 0xB0, 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B0, 0xB0, 0xC0, 0x00, 0xF8, 0xB0, 
-	0xB0, 0x80, 0xB0, 0xB0, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0xC0, 0xC0, 0xC0, 0xC0, 0x00, 0xC0, 
-	0xC0, 0x00, 0xD8, 0xD8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x6C, 0x6C, 0xFE, 0x6C, 0xFE, 0x6C, 0x6C, 0x00, 0x30, 0x7C, 
-	0xC0, 0x78, 0x0C, 0xF8, 0x30, 0x00, 0x00, 0xC6, 0xCC, 0x18, 
-	0x30, 0x66, 0xC6, 0x00, 0x38, 0x6C, 0x68, 0x36, 0xDC, 0xCC, 
-	0x76, 0x00, 0x60, 0x60, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x30, 0x60, 0xC0, 0xC0, 0xC0, 0x60, 0x30, 0x00, 0xC0, 0x60, 
-	0x30, 0x30, 0x30, 0x60, 0xC0, 0x00, 0x00, 0x6C, 0x38, 0xFE, 
-	0x38, 0x6C, 0x00, 0x00, 0x00, 0x30, 0x30, 0xFC, 0x30, 0x30, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0xC0, 
-	0x00, 0x00, 0x00, 0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0x03, 0x06, 0x0C, 0x18, 
-	0x30, 0x60, 0xC0, 0x00, 0x78, 0xCC, 0xCC, 0xCC, 0xCC, 0xCC, 
-	0x78, 0x00, 0x30, 0x70, 0xF0, 0x30, 0x30, 0x30, 0x30, 0x00, 
-	0x78, 0xCC, 0x0C, 0x78, 0xC0, 0xC0, 0xFC, 0x00, 0x78, 0xCC, 
-	0x0C, 0x38, 0x0C, 0xCC, 0x78, 0x00, 0x1C, 0x3C, 0x6C, 0xCC, 
-	0xFC, 0x0C, 0x0C, 0x00, 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xCC, 0xCC, 0xCC, 0x78, 
-	0x30, 0x00, 0x00, 0x00, 0xC6, 0xD6, 0xD6, 0x6C, 0x6C, 0x00, 
-	0x00, 0x00, 0xCC, 0x78, 0x30, 0x78, 0xCC, 0x00, 0x00, 0x00, 
-	0xCC, 0xCC, 0xCC, 0x78, 0x30, 0xE0, 0x00, 0x00, 0xFC, 0x18, 
-	0x30, 0x60, 0xFC, 0x00, 0x38, 0x60, 0x60, 0xC0, 0x60, 0x60, 
-	0x38, 0x00, 0xC0, 0xC0, 0xC0, 0x00, 0xC0, 0xC0, 0xC0, 0x00, 
-	0xE0, 0x30, 0x30, 0x18, 0x30, 0x30, 0xE0, 0x00, 0x38, 0x44, 
-	0xBA, 0xAA, 0xBA, 0x44, 0x38, 0x00, 0x00, 0x98, 0x30, 0x60, 
-	0xC8, 0x98, 0x30, 0x00, 0x1E, 0x30, 0x60, 0x60, 0x30, 0x1E, 
-	0x0C, 0x18, 0x00, 0x66, 0x00, 0x66, 0x66, 0x66, 0x3E, 0x00, 
-	0x0C, 0x18, 0x3C, 0x66, 0x7E, 0x60, 0x3C, 0x00, 0x18, 0x66, 
-	0x3C, 0x06, 0x3E, 0x66, 0x3E, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x30, 0x18, 0x3C, 0x06, 0x3E, 0x66, 
-	0x3E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x1E, 0x30, 0x60, 0x60, 0x30, 0x1E, 0x0C, 0x18, 0x18, 0x66, 
-	0x3C, 0x66, 0x7E, 0x60, 0x3C, 0x00, 0x66, 0x00, 0x3C, 0x66, 
-	0x7E, 0x60, 0x3C, 0x00, 0x30, 0x18, 0x3C, 0x66, 0x7E, 0x60, 
-	0x3C, 0x00, 0x00, 0x66, 0x00, 0x18, 0x18, 0x18, 0x18, 0x00, 
-	0x18, 0x66, 0x00, 0x18, 0x18, 0x18, 0x18, 0x00, 0x30, 0x18, 
-	0x00, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x18, 0x30, 0xFC, 0xC0, 0xF0, 0xC0, 0xFC, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x66, 0x00, 0x3C, 
-	0x66, 0x66, 0x3C, 0x00, 0x00, 0x66, 0x00, 0x3C, 0x66, 0x66, 
-	0x3C, 0x00, 0x30, 0x18, 0x00, 0x3C, 0x66, 0x66, 0x3C, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x18, 
-	0x00, 0x66, 0x66, 0x66, 0x3E, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0x18, 0x30, 0x78, 0x0C, 0x7C, 0xCC, 0x7C, 0x00, 0x0C, 0x18, 
-	0x00, 0x18, 0x18, 0x18, 0x18, 0x00, 0x18, 0x30, 0x00, 0x78, 
-	0xCC, 0xCC, 0x78, 0x00, 0x18, 0x30, 0x00, 0xCC, 0xCC, 0xCC, 
-	0x7C, 0x00, 0x71, 0x8E, 0x00, 0x7C, 0x66, 0x66, 0x66, 0x00, 
-	0x71, 0xCE, 0xE6, 0xF6, 0xDE, 0xCE, 0xC6, 0x00, 0x18, 0x18, 
-	0x18, 0x00, 0x18, 0x18, 0x18, 0x00, 0x3C, 0x60, 0x3C, 0x66, 
-	0x3C, 0x06, 0x3C, 0x00, 0x18, 0x00, 0x18, 0x0C, 0x06, 0x66, 
-	0x3C, 0x00, 0x3F, 0x40, 0x4E, 0x58, 0x4E, 0x40, 0x3F, 0x00, 
-	0x1C, 0xA4, 0xC4, 0xBC, 0x80, 0xFE, 0x00, 0x00, 0x00, 0x33, 
-	0x66, 0xCC, 0x66, 0x33, 0x00, 0x00, 0x3E, 0x06, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0xC0, 0xC0, 0x00, 0xC0, 0xC0, 0xC0, 
-	0xC0, 0x00, 0x81, 0xB9, 0xA5, 0xB9, 0xA5, 0x81, 0x7E, 0x00, 
-	0xFC, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0xCC, 
-	0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x30, 0xFC, 0x30, 
-	0x30, 0x00, 0xFC, 0x00, 0xF0, 0x18, 0x30, 0x60, 0xF8, 0x00, 
-	0x00, 0x00, 0xF0, 0x18, 0x30, 0x18, 0xF0, 0x00, 0x00, 0x00, 
-	0x30, 0x60, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-	0xCC, 0xCC, 0xCC, 0xCC, 0xFE, 0xC0, 0x3E, 0x7A, 0x7A, 0x3A, 
-	0x0A, 0x0A, 0x0A, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 
-	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x60, 
-	0x60, 0xE0, 0x60, 0x60, 0x60, 0x00, 0x00, 0x00, 0x38, 0x44, 
-	0x44, 0x38, 0x00, 0x7C, 0x00, 0x00, 0x00, 0xCC, 0x66, 0x33,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DE, 0xCE, 0xC6, 0x00, 
-	0x30, 0x18, 0x3C, 0x66, 0x66, 0x66, 0x3C, 0x00, 0x0C, 0x18, 
-	0x3C, 0x66, 0x66, 0x66, 0x3C, 0x00, 0x18, 0x66, 0x3C, 0x66, 
-	0x66, 0x66, 0x3C, 0x00, 0x71, 0x8E, 0x3C, 0x66, 0x66, 0x66, 
-	0x3C, 0x00, 0xC3, 0x3C, 0x66, 0x66, 0x66, 0x66, 0x3C, 0x00, 
-	0x00, 0xC6, 0x6C, 0x38, 0x6C, 0xC6, 0x00, 0x00, 0x3F, 0x66, 
-	0x6E, 0x7E, 0x76, 0x66, 0xFC, 0x00, 0x30, 0x18, 0x66, 0x66, 
-	0x66, 0x66, 0x3E, 0x00, 0x0C, 0x18, 0x66, 0x66, 0x66, 0x66, 
-	0x3E, 0x00, 0x18, 0x24, 0x66, 0x66, 0x66, 0x66, 0x3E, 0x00, 
-	0x66, 0x00, 0x66, 0x66, 0x66, 0x66, 0x3E, 0x00, 0x06, 0x08, 
-	0xC3, 0x66, 0x3C, 0x18, 0x18, 0x00, 0x60, 0x60, 0x7E, 0x63, 
-	0x7E, 0x60, 0x60, 0x00, 0x3C, 0x66, 0x66, 0x6C, 0x66, 0x66, 
-	0x6C, 0x60, 0x30, 0x18, 0x3C, 0x06, 0x3E, 0x66, 0x3E, 0x00, 
-	0x0C, 0x18, 0x3C, 0x06, 0x3E, 0x66, 0x3E, 0x00, 0x18, 0x66, 
-	0x3C, 0x06, 0x3E, 0x66, 0x3E, 0x00, 0x71, 0x8E, 0x3C, 0x06, 
-	0x3E, 0x66, 0x3E, 0x00, 0x66, 0x00, 0x3C, 0x06, 0x3E, 0x66, 
-	0x3E, 0x00, 0x18, 0x24, 0x3C, 0x06, 0x3E, 0x66, 0x3E, 0x00, 
-	0x00, 0x00, 0x7E, 0x1B, 0x7F, 0xD8, 0x77, 0x00, 0x00, 0x00, 
-	0x3C, 0x60, 0x60, 0x60, 0x3C, 0x18, 0x30, 0x18, 0x3C, 0x66, 
-	0x7E, 0x60, 0x3C, 0x00, 0x0C, 0x18, 0x3C, 0x66, 0x7E, 0x60, 
-	0x3C, 0x00, 0x18, 0x66, 0x3C, 0x66, 0x7E, 0x60, 0x3C, 0x00, 
-	0x66, 0x00, 0x3C, 0x66, 0x7E, 0x60, 0x3C, 0x00, 0x30, 0x18, 
-	0x00, 0x18, 0x18, 0x18, 0x18, 0x00, 0x0C, 0x18, 0x00, 0x18, 
-	0x18, 0x18, 0x18, 0x00, 0x18, 0x66, 0x00, 0x18, 0x18, 0x18, 
-	0x18, 0x00, 0x00, 0x66, 0x00, 0x18, 0x18, 0x18, 0x18, 0x00, 
-	0x60, 0xFC, 0x18, 0x3C, 0x66, 0x66, 0x3C, 0x00, 0x71, 0x8E, 
-	0x00, 0x7C, 0x66, 0x66, 0x66, 0x00, 0x30, 0x18, 0x00, 0x3C, 
-	0x66, 0x66, 0x3C, 0x00, 0x0C, 0x18, 0x00, 0x3C, 0x66, 0x66, 
-	0x3C, 0x00, 0x18, 0x66, 0x00, 0x3C, 0x66, 0x66, 0x3C, 0x00, 
-	0x71, 0x8E, 0x00, 0x3C, 0x66, 0x66, 0x3C, 0x00, 0x00, 0x66, 
-	0x00, 0x3C, 0x66, 0x66, 0x3C, 0x00, 0x00, 0x18, 0x00, 0x7E, 
-	0x00, 0x18, 0x00, 0x00, 0x00, 0x02, 0x7C, 0xCE, 0xD6, 0xE6, 
-	0x7C, 0x80, 0x30, 0x18, 0x00, 0x66, 0x66, 0x66, 0x3E, 0x00, 
-	0x0C, 0x18, 0x00, 0x66, 0x66, 0x66, 0x3E, 0x00, 0x18, 0x66, 
-	0x00, 0x66, 0x66, 0x66, 0x3E, 0x00, 0x00, 0x66, 0x00, 0x66, 
-	0x66, 0x66, 0x3E, 0x00, 0x0C, 0x18, 0x00, 0x66, 0x66, 0x3C, 
-	0x18, 0x30, 0x60, 0x60, 0x7C, 0x66, 0x66, 0x7C, 0x60, 0x60, 
-	0x00, 0x66, 0x00, 0x66, 0x66, 0x3C, 0x18, 0x30, 0xFF 
-};
-
-
-const uint8 Graphics::FONT_SIZES[] = {
-	0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
-	0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
-	0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
-	0x06, 0x06, 0x04, 0x03, 0x06, 0x08, 0x07, 0x08, 0x08, 0x04,
-	0x05, 0x05, 0x08, 0x07, 0x04, 0x07, 0x03, 0x09, 0x07, 0x05,
-	0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x03, 0x04,
-	0x06, 0x07, 0x06, 0x07, 0x08, 0x08, 0x07, 0x07, 0x07, 0x07,
-	0x07, 0x07, 0x07, 0x05, 0x07, 0x08, 0x07, 0x08, 0x08, 0x07,
-	0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x08, 0x08, 0x08, 0x07,
-	0x07, 0x05, 0x09, 0x05, 0x08, 0x02, 0x04, 0x07, 0x07, 0x07,
-	0x07, 0x07, 0x07, 0x07, 0x07, 0x03, 0x07, 0x07, 0x03, 0x08,
-	0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x08,
-	0x07, 0x07, 0x07, 0x06, 0x03, 0x06, 0x08, 0x06, 0x08, 0x08,
-	0x08, 0x08, 0x02, 0x08, 0x02, 0x08, 0x08, 0x08, 0x08, 0x08,
-	0x08, 0x06, 0x02, 0x02, 0x07, 0x02, 0x02, 0x08, 0x08, 0x08,
-	0x02, 0x08, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,
-	0x07, 0x07, 0x07, 0x07, 0x09, 0x09, 0x06, 0x08, 0x08, 0x09,
-	0x08, 0x09, 0x08, 0x03, 0x09, 0x07, 0x07, 0x07, 0x06, 0x06,
-	0x05, 0x08, 0x08, 0x06, 0x05, 0x04, 0x07, 0x09, 0x09, 0x08,
-	0x09, 0x08, 0x08, 0x08, 0x08, 0x09, 0x08, 0x08, 0x09, 0x08,
-	0x07, 0x07, 0x07, 0x07, 0x06, 0x06, 0x07, 0x07, 0x08, 0x09,
-	0x08, 0x08, 0x08, 0x09, 0x09, 0x08, 0x09, 0x08, 0x08, 0x08,
-	0x08, 0x09, 0x09, 0x08, 0x08, 0x08, 0x08, 0x09, 0x08, 0x08,
-	0x09, 0x07, 0x08, 0x08, 0x08, 0x08, 0x06, 0x07, 0x08, 0x08,
-	0x08, 0x09, 0x08, 0x08, 0x08, 0x09, 0x08, 0x08, 0x08, 0x08,
-	0x08, 0x08, 0x08, 0x08, 0x08, 0x08
-};
-
-
-Graphics::Graphics(Resource *resource)
-	: _cameraBob(0), _resource(resource) {
+Graphics::Graphics(Display *display, Resource *resource)
+	: _cameraBob(0), _display(display), _resource(resource) {
 		
 	memset(_frames, 0, sizeof(_frames));
 	memset(_banks, 0, sizeof(_banks));
@@ -275,13 +36,6 @@
 	memset(_sortedBobs, 0, sizeof(_sortedBobs));
 	_sortedBobsCount = 0;
 	_shrinkBuffer.data = new uint8[ BOB_SHRINK_BUF_SIZE ];
-	_backdrop = new uint8[ BACKDROP_W * BACKDROP_H ];
-	_panel = new uint8[ PANEL_W * PANEL_H ];
-	_screen = new uint8[ SCREEN_W * SCREEN_H ];
-	_fullscreen = true;
-	_horizontalScroll = 0;
-	_paletteRoom = new uint8[ 256 * 3 ];
-	_paletteScreen = new uint8[ 256 * 4 ];
 }
 
 
@@ -292,11 +46,6 @@
 	}
 	frameEraseAll(true);
 	delete[] _shrinkBuffer.data;
-	delete[] _backdrop;
-	delete[] _panel;
-	delete[] _screen;
-	delete[] _paletteRoom;
-	delete[] _paletteScreen;
 }
 
 
@@ -588,12 +337,12 @@
 		src += w * y_skip;
 		if (!xflip) {
 			src += x_skip;
-			displayBlit(_screen, x, y, SCREEN_W, src, w_new, h_new, w, xflip, true);
+			_display->blit(RB_SCREEN, x, y, src, w_new, h_new, w, xflip, true);
 		}
 		else {
 			src += w - w_new - x_skip;
 			x += w_new - 1;
-			displayBlit(_screen, x, y, SCREEN_W, src, w_new, h_new, w, xflip, true);
+			_display->blit(RB_SCREEN, x, y, src, w_new, h_new, w, xflip, true);
 		}
     }
 
@@ -603,11 +352,11 @@
 void Graphics::bobDrawInventoryItem(uint32 bobnum, uint16 x, uint16 y) {
 	if (bobnum == 0) {
 		// clear panel area
-		memset(_panel + y * 32 + x, INK_BG_PANEL, 32 * 32);
+		_display->fill(RB_PANEL, x, y, 32, 32, INK_BG_PANEL);
 	}
 	else {
 		BobFrame *pbf = &_frames[bobnum];
-		displayBlit(_panel, x, y, 320, pbf->data, pbf->width, pbf->height, pbf->width, false, false);
+		_display->blit(RB_PANEL, x, y, pbf->data, pbf->width, pbf->height, pbf->width, false, false);
 	}
 }
 
@@ -615,7 +364,7 @@
 void Graphics::bobPaste(uint32 bobnum, uint16 x, uint16 y) {
 
 	BobFrame *pbf = &_frames[bobnum];
-	displayBlit(_backdrop, x, y, 640, pbf->data, pbf->width, pbf->height, pbf->width, false, true);
+	_display->blit(RB_BACKDROP, x, y, pbf->data, pbf->width, pbf->height, pbf->width, false, true);
 	frameErase(bobnum);
 }
 
@@ -678,7 +427,7 @@
 	pbs->box.x1 = 0;
 	pbs->box.y1 = 0;
 	pbs->box.x2 = GAME_SCREEN_WIDTH - 1;
-	if (_fullscreen || bobnum == 16) { // FIXME: does bob number 16 really used ?
+	if (_display->fullscreen() || bobnum == 16) { // FIXME: does bob number 16 really used ?
 		pbs->box.y2 = GAME_SCREEN_HEIGHT - 1;
 	}
 	else {
@@ -801,7 +550,7 @@
 	for (y = GAME_SCREEN_HEIGHT - 1; y > 0; --y) {
 		const TextSlot *pts = &_texts[y];
 		if (!pts->text.isEmpty()) {
-			displayText(pts, y);
+			_display->textDraw(pts->x, y, pts->color, pts->text.c_str(), pts->outlined);
 		}
 	}
 }
@@ -818,12 +567,7 @@
 
 uint16 Graphics::textWidth(const char* text) const {
 
-	uint16 len = 0;
-	while (*text) {
-		len += FONT_SIZES[ (int)*text ];
-		++text;
-	}
-	return len;
+	return _display->textWidth(text);
 }
 
 
@@ -850,118 +594,47 @@
 }
 
 
-void Graphics::backdropLoad(const char* name, uint16 room) {
+void Graphics::loadBackdrop(const char* name, uint16 room) {
 
 	// init Dynalum
 	char roomPrefix[20];
 	strcpy(roomPrefix, name);
 	roomPrefix[ strlen(roomPrefix) - 4 ] = '\0';
-	dynalumInit(roomPrefix, room);
+	_display->dynalumInit(_resource, roomPrefix, room);
 
 	uint8 *pcxbuf = _resource->loadFile(name);
 	if (pcxbuf == NULL) {
 		error("Unable to load backdrop : '%s'", name);
 	}
-
 	uint32 size = _resource->fileSize(name);
-	setRoomPal(pcxbuf + size - 768, 0, (room <= 144) ? 144 : 256);
-
-	_backdropWidth  = READ_LE_UINT16(pcxbuf +  12);
-	_backdropHeight = READ_LE_UINT16(pcxbuf +  14);
+	_display->pcxReadBackdrop(pcxbuf, size, room > 114);
+	delete[] pcxbuf;
 
 	if (room >= 90) {
 		_cameraBob = 0;
 	}
-
-	readPCX(pcxbuf + 128, _backdrop, BACKDROP_W, _backdropWidth, _backdropHeight);
-	delete[] pcxbuf;
 }
 
 
-void Graphics::backdropDraw() {
-
-	int n = 3;
-	if (_fullscreen) {
-		n = 4;
-	}
-	uint8 *dst = _screen;
-	uint8 *src = _backdrop + _horizontalScroll;
-	while (n--) {
-		int i;
-		for (i = 0; i < 50; ++i) {
-			memcpy(dst, src, SCREEN_W);
-			dst += SCREEN_W;
-			src += BACKDROP_W;
-		}
-	}
-}
-
-
-void Graphics::panelLoad() {
+void Graphics::loadPanel() {
 
 	uint8 *pcxbuf = _resource->loadFile("panel.pcx");
 	if (pcxbuf == NULL) {
 		error("Unable to open panel file");
 	}
 	uint32 size = _resource->fileSize("panel.pcx");
-	setRoomPal(pcxbuf + size - 768, 144, 256);
-	readPCX(pcxbuf + 128, _panel + PANEL_W * 10, PANEL_W, PANEL_W, PANEL_H - 10);
+	_display->pcxReadPanel(pcxbuf, size);
 	delete[] pcxbuf;
 }
 
 
-void Graphics::panelDraw() {
-	memcpy(_screen + SCREEN_W * ROOM_ZONE_HEIGHT, _panel, PANEL_W * PANEL_H);
-}
-
-
-void Graphics::panelClear() {
-	memset(_screen + SCREEN_W * ROOM_ZONE_HEIGHT, 0, PANEL_W * PANEL_H);
-}
-
-
-void Graphics::readPCX(const uint8 *src, uint8 *dst, uint16 dstPitch, uint16 w, uint16 h) {
-
-	while (h--) {
-		uint8 *p = dst;
-		while (p < dst + w ) {
-			uint8 col = *src++;
-			if ((col & 0xC0) == 0xC0) {
-				uint8 len = col & 0x3F;
-				memset(p, *src++, len);
-				p += len;
-			}
-			else {
-				*p++ = col;
-			}
-		}
-		dst += dstPitch;
-	}
-}
-
-
-void Graphics::boxDraw(const Box &b, uint8 color) {
-
-	int x, y;
-
-	for (y = b.y1; y <= b.y2; ++y) {
-		*(_backdrop + y * 640 + b.x1) = color;
-		*(_backdrop + y * 640 + b.x2) = color;
-	}
-	for (x = b.x1; x <= b.x2; ++x) {
-		*(_backdrop + b.y1 * 640 + x) = color;
-		*(_backdrop + b.y2 * 640 + x) = color;
-	}
-}
-
-
 void Graphics::useJournal() { // GameSettings* pgs
 
 	int i;
 
 	bobClearAll();
-	backdropLoad("journal.pcx", 160);
-//	_display->fadeout(0,255);
+	loadBackdrop("journal.pcx", 160);
+	_display->palFadeOut(0, 255, 160);
 
 	// load and unpack journal frames
 	frameEraseAll(false);
@@ -979,7 +652,7 @@
 	// TODO: setup zones
 
 	journalBobPreDraw();
-//	_display->fadein(0, 255);
+	_display->palFadeIn(0, 255, 160);
 }
 
 
@@ -1014,192 +687,14 @@
 
 
 void Graphics::update() {
-	// FIXME: incomplete !
+	// FIXME: temporary code, move to Logic::update()
 	bobSortAll();
-	if (_panelFlag) {
-		panelDraw();
-	}
-	else if (!_fullscreen) {
-		panelClear();
-	}
-	backdropDraw();
+	_display->prepareUpdate();
 	bobDrawAll();
 	textDrawAll();
-	if (_bobs[0].active) {
-		dynalumUpdate(_bobs[0].x, _bobs[0].y);
-	}
-	displayScreen();
-	g_system->delay_msecs(100); // TEMP: move to Logic::update()
-}
-
-
-void Graphics::displayText(const TextSlot *pts, uint16 y) {
-
-	uint16 x = pts->x;
-	const uint8 *str = (const uint8*)pts->text.c_str();
-	while (*str && x < GAME_SCREEN_WIDTH) {
-		const uint8 *pchr = FONT + (*str) * 8;
-//		if (_resource->_gameVersion->versionString[1] == 'F' && *str == 150) {
-//			chr = 251;
-//		}
-		if (pts->outlined) {
-			displayChar(x - 1, y - 1, INK_OUTLINED_TEXT, pchr);
-			displayChar(x    , y - 1, INK_OUTLINED_TEXT, pchr);
-			displayChar(x + 1, y - 1, INK_OUTLINED_TEXT, pchr);
-			displayChar(x + 1, y    , INK_OUTLINED_TEXT, pchr);
-			displayChar(x + 1, y + 1, INK_OUTLINED_TEXT, pchr);
-			displayChar(x    , y + 1, INK_OUTLINED_TEXT, pchr);
-			displayChar(x - 1, y + 1, INK_OUTLINED_TEXT, pchr);
-			displayChar(x - 1, y    , INK_OUTLINED_TEXT, pchr);
-		}
-		displayChar(x, y, pts->color, pchr);
-
-		x += FONT_SIZES[ *str ];
-		++str;
-	}
-}
-
-
-void Graphics::displayChar(uint16 x, uint16 y, uint8 color, const uint8 *chr) {
-
-	int i, j;
-	uint8 *dst = _screen + y * SCREEN_W + x;
-	for (j = 0; j < 8; ++j) {
-		uint8* p = dst;
-		uint8 c = *chr++;
-		if (c != 0) {
-			for (i = 0; i < 8; ++i) {
-				if(c & 0x80) {
-					*p = color;
-				}
-				++p;
-				c <<= 1;
-			}
-		}
-		dst += SCREEN_W;
-	}
-}
-
-
-void Graphics::displayBlit(uint8 *dst_buf, uint16 dst_x, uint16 dst_y, uint16 dst_pitch, const uint8 *src_buf, uint16 src_w, uint16 src_h, uint16 src_pitch, bool xflip, bool masked) {
-
-	dst_buf += dst_y * dst_pitch + dst_x;
-	if (!masked) { // Unmasked always unflipped
-		while (src_h--) {
-			memcpy(dst_buf, src_buf, src_w);
-			src_buf += src_pitch;
-			dst_buf += dst_pitch;
-		}
-	}
-	else if (!xflip) { // Masked bitmap unflipped
-		while (src_h--) {
-			int i;
-			for(i = 0; i < src_w; ++i) {
-				uint8 b = *(src_buf + i);
-				if(b != 0) {
-					*(dst_buf + i) = b;
-				}
-			}
-			src_buf += src_pitch;
-			dst_buf += dst_pitch;
-		}
-	}
-	else { // Masked bitmap flipped
-		while (src_h--) {
-			int i;
-			for(i = 0; i < src_w; ++i) {
-				uint8 b = *(src_buf + i);
-				if(b != 0) {
-					*(dst_buf - i) = b;
-				}
-			}
-			src_buf += src_pitch;
-			dst_buf += dst_pitch;   
-		}
-	}
-}
-
-
-void Graphics::displayScreen() {
-	// FIXME: temporary code ; cleanup/move to Display class.
-	g_system->set_palette(_paletteScreen, 0, 256);
-	g_system->copy_rect(_screen, SCREEN_W, 0, 0, SCREEN_W, SCREEN_H);
-	g_system->update_screen();
-}
-
-
-void Graphics::setScreenMode(int comPanel, bool inCutaway) {
-	if (comPanel == 2 && inCutaway) {
-		if (_backdropHeight == GAME_SCREEN_HEIGHT) {
-			_fullscreen = true;
-			_panelFlag = false;
-		}
-		else {
-			_fullscreen = false;
-			_panelFlag = true;
-		}
-	}
-	else {
-		_fullscreen = 0;
-		_panelFlag = (comPanel == 1);
-	}
-}
-
-
-void Graphics::setRoomPal(const uint8 *pal, int start, int end) {
-	int i;
-	pal += start * 3;
-	for (i = start; i < end; ++i, pal += 3) {
-		_paletteScreen[i << 2 | 0] = _paletteRoom[i * 3 + 0] = *(pal + 0);
-		_paletteScreen[i << 2 | 1] = _paletteRoom[i * 3 + 1] = *(pal + 1);
-		_paletteScreen[i << 2 | 2] = _paletteRoom[i * 3 + 2] = *(pal + 2);
-		_paletteScreen[i << 2 | 3] = 0;
-	}
-}
-
-
-void Graphics::dynalumInit(const char* roomPrefix, uint16 room) {
-	// io.c l.2063-2089
-	memset(_dynalum.msk, 0, sizeof(_dynalum.msk));
-	memset(_dynalum.lum, 0, sizeof(_dynalum.lum));
-	if (room < 90 || ((room > 94) && (room < 114))) {
-		char filename[80];
-		sprintf(filename, "%s.msk", roomPrefix);
-		_resource->loadFile(filename, 0, (uint8*)_dynalum.msk);
-		sprintf(filename, "%s.lum", roomPrefix);
-		_resource->loadFile(filename, 0, (uint8*)_dynalum.lum);
-	}
-}
-
-
-void Graphics::dynalumUpdate(uint16 x, uint16 y) {
-
-	if (x >= _backdropWidth) {
-		x = _backdropWidth;
-	}
-	if (y >= ROOM_ZONE_HEIGHT - 1) {
-		y = ROOM_ZONE_HEIGHT - 1;
-	}
-	uint16 colMask = _dynalum.msk[(y / 4) * 160 + (x / 4)];
-	debug(9, "Graphics::dynalumUpdate(%d, %d) - colMask = %d", x, y, colMask);
-	if (colMask != _dynalum.oldColMask) {
-		uint8 i;
-		for (i = 0; i < 16; ++i) {
-			uint8 j;
-			for (j = 0; j < 3; ++j) {
-				int16 c = (int16)(_paletteRoom[(144 + i) * 3 + j] + _dynalum.lum[colMask * 3 + j] * 4);
-				if (c < 0) {
-					c = 0;
-				}
-				else if (c > 255) {
-					c = 255;
-				}
-				_paletteScreen[(144 + i) * 4 + j] = (uint8)c;
-			}
-		}
-		_dynalum.oldColMask = colMask;
-		// TODO: handle dirty colors (lopal, hipal)
-	}
+	g_system->delay_msecs(100);
+	_display->palCustomScroll(0); //_currentRoom
+	_display->update(_bobs[0].active, _bobs[0].x, _bobs[0].y);
 }
 
 

Index: logic.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/logic.h,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- logic.h	15 Oct 2003 16:31:51 -0000	1.32
+++ logic.h	16 Oct 2003 13:54:48 -0000	1.33
@@ -46,12 +46,13 @@
 
 class Graphics;
 class Resource;
+class Display;
 class Walk;
 
 class Logic {
 
 public:
-	Logic(Resource *resource, Graphics *graphics);
+	Logic(Resource *resource, Graphics *graphics, Display *display);
 	~Logic();
 
 	uint16 currentRoom();
@@ -227,6 +228,7 @@
 
 	Resource *_resource;
 	Graphics *_graphics;
+	Display *_display;
 	Walk *_walk;
 
 	int _talkSpeed;	// TALKSPD

Index: logic.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/logic.cpp,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -d -r1.43 -r1.44
--- logic.cpp	15 Oct 2003 16:31:51 -0000	1.43
+++ logic.cpp	16 Oct 2003 13:54:48 -0000	1.44
@@ -21,14 +21,15 @@
 
 #include "queen/logic.h"
 #include "queen/defs.h"
+#include "queen/display.h"
 #include "queen/graphics.h"
 #include "queen/walk.h"
 #include "common/str.h"
 
 namespace Queen {
 
-Logic::Logic(Resource *resource, Graphics *graphics) 
-	: _resource(resource), _graphics(graphics), _talkSpeed(DEFAULT_TALK_SPEED) {
+Logic::Logic(Resource *resource, Graphics *graphics, Display *display)
+	: _resource(resource), _graphics(graphics), _display(display), _talkSpeed(DEFAULT_TALK_SPEED) {
 	_jas = _resource->loadFile("QUEEN.JAS", 20);
 	_joe.x = _joe.y = 0;
 	_walk = new Walk(this, _graphics);
@@ -39,14 +40,11 @@
 Logic::~Logic() {
 	delete[] _jas;
 	delete _walk;
-	//free(_graphicData);
 }
 
 void Logic::initialise() {
 	int16 i, j;
 	uint8 *ptr = _jas;
-
-	//_display->loadFont();
 	
 	_numRooms = READ_BE_UINT16(ptr); ptr += 2;
 	_numNames = READ_BE_UINT16(ptr); ptr += 2;
@@ -293,7 +291,7 @@
 	else
 		_speechToggle = true;
 
-	_graphics->panelLoad();
+	_graphics->loadPanel();
 	_graphics->bobSetupControl();
 	joeSetup();
 	zoneSetupPanel();
@@ -680,7 +678,6 @@
 	uint16 maxAreaRoom = _areaMax[_currentRoom];
 	for (zoneNum = 1; zoneNum <= maxAreaRoom; ++zoneNum) {
 		zoneSet(ZONE_ROOM, maxObjRoom + zoneNum, _area[_currentRoom][zoneNum].box);
-		_graphics->boxDraw(_area[_currentRoom][zoneNum].box, 18);
 	}
 }
 
@@ -716,7 +713,14 @@
 	_graphics->bankErase(12);
 
 	// TODO: TALKHEAD=0;
-	// TODO: _display->fadeOut();
+
+	if (_currentRoom >= 114) {
+		_display->palFadeOut(0, 255, _currentRoom);
+	}
+	else {
+		_display->palFadeOut(0, 223, _currentRoom);
+	}
+	
 	// TODO: credits system
 
 	// invalidates all persons animations
@@ -1110,16 +1114,15 @@
 	// loads background image
 	Common::String bdFile(room);
 	bdFile += ".PCX";
-	_graphics->backdropLoad(bdFile.c_str(), _currentRoom);
+	_graphics->loadBackdrop(bdFile.c_str(), _currentRoom);
 
 	// setup graphics to enter fullscreen/panel mode
-	_graphics->setScreenMode(comPanel, inCutaway);
+	_display->screenMode(comPanel, inCutaway);
 
 	// reset sprites table (bounding box...)
 	_graphics->bobClearAll();
 
-	// setup any hard-coded palette effect
-	// TODO: graphics->check_colors(_currentRoom);
+	_display->palCustomColors(_currentRoom);
 
 	// load/setup objects associated to this room
 	Common::String bkFile(room);
@@ -1145,7 +1148,12 @@
 	}
 	if (mode != RDM_NOFADE_JOE) {
 		_graphics->update();
-		// TODO: _display->fadeIn();
+		if (_currentRoom >= 114) {
+			_display->palFadeIn(0, 255, _currentRoom);
+		}
+		else {
+			_display->palFadeOut(0, 223, _currentRoom);
+		}
 	}
 	if (pod != NULL) {
 		_walk->joeMove(0, pod->x, pod->y, inCutaway);

Index: queen.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/queen.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- queen.h	11 Oct 2003 10:24:12 -0000	1.6
+++ queen.h	16 Oct 2003 13:54:48 -0000	1.7
@@ -34,6 +34,7 @@
 
 class Graphics;
 class Logic;
+class Display;
 
 class QueenEngine : public Engine {
 	void errorString(const char *buf_input, char *buf_output);
@@ -53,6 +54,7 @@
 	Graphics *_graphics;
 	Resource *_resource;
 	Logic *_logic;
+	Display *_display;
 
 	GameDetector *_detector; // necessary for music
 	

Index: queen.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/queen.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- queen.cpp	14 Oct 2003 07:52:32 -0000	1.9
+++ queen.cpp	16 Oct 2003 13:54:48 -0000	1.10
@@ -25,6 +25,7 @@
 #include "common/file.h"
 #include "base/gameDetector.h"
 #include "base/plugins.h"
+#include "queen/display.h"
 #include "queen/graphics.h"
 
 extern uint16 _debugLevel;
@@ -74,10 +75,10 @@
 }
 
 QueenEngine::~QueenEngine() {
+	delete _resource;
+	delete _display;
 	delete _graphics;
 	delete _logic;
-	delete _resource;
-	//delete _queenDisplay;
 }
 
 void QueenEngine::errorString(const char *buf1, char *buf2) {
@@ -98,8 +99,9 @@
 
 void QueenEngine::initialise(void) {
 	_resource = new Resource(_gameDataPath);
-	_graphics = new Graphics(_resource);
-	_logic = new Logic(_resource, _graphics);
+	_display = new Display(_system);
+	_graphics = new Graphics(_display, _resource);
+	_logic = new Logic(_resource, _graphics, _display);
 	//_sound = new Sound(_mixer, _detector->_sfx_volume);
 }
 

Index: module.mk
===================================================================
RCS file: /cvsroot/scummvm/scummvm/queen/module.mk,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- module.mk	9 Oct 2003 09:09:40 -0000	1.9
+++ module.mk	16 Oct 2003 13:54:48 -0000	1.10
@@ -2,6 +2,7 @@
 
 MODULE_OBJS = \
 	queen/cutaway.o \
+	queen/display.o \
 	queen/graphics.o \
 	queen/logic.o \
 	queen/queen.o \





More information about the Scummvm-git-logs mailing list