TONY: Remove various bits of unused code.
This commit is contained in:
parent
037920bf76
commit
7b4dd0a682
13 changed files with 35 additions and 175 deletions
|
@ -49,21 +49,6 @@ RMFont::~RMFont() {
|
|||
unload();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Dumps a font to a buffer
|
||||
* @param buf Buffer for font contents
|
||||
* @param nChars Number of characters (max 256)
|
||||
* @param dimx X dimension in pixels
|
||||
* @param dimy Y dimension in pixels
|
||||
*
|
||||
\****************************************************************************/
|
||||
|
||||
void DumpFontBMP(const char *filename, const byte *buf, int nChars, int charX, int charY, byte *pal) {
|
||||
error("DumpFontBMP not supported in ScummVM");
|
||||
}
|
||||
|
||||
|
||||
void RMFont::load(const byte *buf, int nChars, int dimx, int dimy, uint32 palResID) {
|
||||
_letter = new RMGfxSourceBuffer8RLEByte[nChars];
|
||||
|
||||
|
@ -150,7 +135,7 @@ int RMFont::stringLen(char bChar, char bNext) {
|
|||
}
|
||||
|
||||
/****************************************************************************\
|
||||
* Metodi di RMFontColor
|
||||
* RMFontColor Methods
|
||||
\****************************************************************************/
|
||||
|
||||
RMFontColor::RMFontColor() : RMFont() {
|
||||
|
@ -180,7 +165,7 @@ void RMFontColor::setBaseColor(byte r1, byte g1, byte b1) {
|
|||
_fontG = g1;
|
||||
_fontB = b1;
|
||||
|
||||
// Constructs a new paletter for the font
|
||||
// Constructs a new palette for the font
|
||||
for (i = 1; i < 16; i++) {
|
||||
pal[i * 3 + 0] = r >> 16;
|
||||
pal[i * 3 + 1] = g >> 16;
|
||||
|
|
|
@ -1527,12 +1527,6 @@ void RMPointer::close() {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
int RMPointer::priority() {
|
||||
// Pointer has minimum priority so it will be drawn last
|
||||
return 200;
|
||||
}
|
||||
|
||||
void RMPointer::draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim) {
|
||||
CORO_BEGIN_CONTEXT;
|
||||
int n;
|
||||
|
|
|
@ -100,11 +100,6 @@ public:
|
|||
*/
|
||||
void doFrame();
|
||||
|
||||
/**
|
||||
* Overloading of priorities
|
||||
*/
|
||||
int priority();
|
||||
|
||||
/**
|
||||
* draw method
|
||||
*/
|
||||
|
|
|
@ -65,7 +65,6 @@ void RMGfxTaskSetPrior::setPriority(int nPrior) {
|
|||
|
||||
RMGfxBuffer::RMGfxBuffer() {
|
||||
_dimx = _dimy = 0;
|
||||
_bUseDDraw = false;
|
||||
_origBuf = _buf = NULL;
|
||||
}
|
||||
|
||||
|
@ -73,7 +72,7 @@ RMGfxBuffer::~RMGfxBuffer() {
|
|||
destroy();
|
||||
}
|
||||
|
||||
void RMGfxBuffer::create(int dimx, int dimy, int nBpp, bool bUseDDraw) {
|
||||
void RMGfxBuffer::create(int dimx, int dimy, int nBpp) {
|
||||
// Destroy the buffer it is already exists
|
||||
if (_buf != NULL)
|
||||
destroy();
|
||||
|
@ -81,36 +80,19 @@ void RMGfxBuffer::create(int dimx, int dimy, int nBpp, bool bUseDDraw) {
|
|||
// Copy the parameters in the private members
|
||||
_dimx = dimx;
|
||||
_dimy = dimy;
|
||||
_bUseDDraw = bUseDDraw;
|
||||
|
||||
if (!_bUseDDraw) {
|
||||
// Allocate a buffer
|
||||
_origBuf = _buf = new byte[_dimx * _dimy * nBpp / 8];
|
||||
assert(_buf != NULL);
|
||||
Common::fill(_origBuf, _origBuf + _dimx * _dimy * nBpp / 8, 0);
|
||||
}
|
||||
}
|
||||
|
||||
void RMGfxBuffer::destroy() {
|
||||
if (!_bUseDDraw) {
|
||||
if (_origBuf != NULL && _origBuf == _buf) {
|
||||
delete[] _origBuf;
|
||||
_origBuf = _buf = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void RMGfxBuffer::lock() {
|
||||
if (_bUseDDraw) {
|
||||
// Manages acceleration
|
||||
}
|
||||
}
|
||||
|
||||
void RMGfxBuffer::unlock() {
|
||||
if (_bUseDDraw) {
|
||||
// Manages acceleration
|
||||
}
|
||||
}
|
||||
|
||||
void RMGfxBuffer::offsetY(int nLines, int nBpp) {
|
||||
_buf += nLines * getDimx() * nBpp / 8;
|
||||
|
@ -125,8 +107,8 @@ RMGfxBuffer::operator void *() {
|
|||
return (void *)_buf;
|
||||
}
|
||||
|
||||
RMGfxBuffer::RMGfxBuffer(int dimx, int dimy, int nBpp, bool bUseDDraw) {
|
||||
create(dimx, dimy, nBpp, bUseDDraw);
|
||||
RMGfxBuffer::RMGfxBuffer(int dimx, int dimy, int nBpp) {
|
||||
create(dimx, dimy, nBpp);
|
||||
}
|
||||
|
||||
/****************************************************************************\
|
||||
|
@ -240,8 +222,8 @@ RMGfxWoodyBuffer::RMGfxWoodyBuffer() {
|
|||
|
||||
}
|
||||
|
||||
RMGfxWoodyBuffer::RMGfxWoodyBuffer(int dimx, int dimy, bool bUseDDraw)
|
||||
: RMGfxBuffer(dimx, dimy, 16, bUseDDraw) {
|
||||
RMGfxWoodyBuffer::RMGfxWoodyBuffer(int dimx, int dimy)
|
||||
: RMGfxBuffer(dimx, dimy, 16) {
|
||||
}
|
||||
|
||||
/****************************************************************************\
|
||||
|
@ -252,19 +234,15 @@ RMGfxTargetBuffer::RMGfxTargetBuffer() {
|
|||
_otlist = NULL;
|
||||
_otSize = 0;
|
||||
_trackDirtyRects = false;
|
||||
// csModifyingOT = g_system->createMutex();
|
||||
}
|
||||
|
||||
RMGfxTargetBuffer::~RMGfxTargetBuffer() {
|
||||
clearOT();
|
||||
// g_system->deleteMutex(csModifyingOT);
|
||||
}
|
||||
|
||||
void RMGfxTargetBuffer::clearOT() {
|
||||
OTList *cur, *n;
|
||||
|
||||
// g_system->lockMutex(csModifyingOT);
|
||||
|
||||
cur = _otlist;
|
||||
|
||||
while (cur != NULL) {
|
||||
|
@ -276,8 +254,6 @@ void RMGfxTargetBuffer::clearOT() {
|
|||
}
|
||||
|
||||
_otlist = NULL;
|
||||
|
||||
// g_system->unlockMutex(csModifyingOT);
|
||||
}
|
||||
|
||||
void RMGfxTargetBuffer::drawOT(CORO_PARAM) {
|
||||
|
@ -294,10 +270,6 @@ void RMGfxTargetBuffer::drawOT(CORO_PARAM) {
|
|||
_ctx->prev = NULL;
|
||||
_ctx->cur = _otlist;
|
||||
|
||||
// Lock the buffer to access it
|
||||
lock();
|
||||
// g_system->lockMutex(csModifyingOT);
|
||||
|
||||
while (_ctx->cur != NULL) {
|
||||
// Call the task Draw method, passing it a copy of the original
|
||||
_ctx->myprim = _ctx->cur->_prim->duplicate();
|
||||
|
@ -330,11 +302,6 @@ void RMGfxTargetBuffer::drawOT(CORO_PARAM) {
|
|||
}
|
||||
}
|
||||
|
||||
// g_system->unlockMutex(csModifyingOT);
|
||||
|
||||
//Unlock after writing
|
||||
unlock();
|
||||
|
||||
CORO_END_CODE;
|
||||
}
|
||||
|
||||
|
@ -342,8 +309,6 @@ void RMGfxTargetBuffer::addPrim(RMGfxPrimitive *prim) {
|
|||
int nPrior;
|
||||
OTList *cur, *n;
|
||||
|
||||
// g_system->lockMutex(csModifyingOT);
|
||||
|
||||
// Warn of the OT listing
|
||||
prim->_task->Register();
|
||||
|
||||
|
@ -368,8 +333,6 @@ void RMGfxTargetBuffer::addPrim(RMGfxPrimitive *prim) {
|
|||
n->_next = cur->_next;
|
||||
cur->_next = n;
|
||||
}
|
||||
|
||||
// g_system->unlockMutex(csModifyingOT);
|
||||
}
|
||||
|
||||
void RMGfxTargetBuffer::addDirtyRect(const Common::Rect &r) {
|
||||
|
@ -554,8 +517,8 @@ int RMGfxSourceBufferPal::loadPaletteWA(uint32 resID, bool bSwapped) {
|
|||
void RMGfxSourceBuffer4::draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim) {
|
||||
}
|
||||
|
||||
RMGfxSourceBuffer4::RMGfxSourceBuffer4(int dimx, int dimy, bool bUseDDraw)
|
||||
: RMGfxBuffer(dimx, dimy, 4, bUseDDraw) {
|
||||
RMGfxSourceBuffer4::RMGfxSourceBuffer4(int dimx, int dimy)
|
||||
: RMGfxBuffer(dimx, dimy, 4) {
|
||||
setPriority(0);
|
||||
}
|
||||
|
||||
|
@ -569,8 +532,8 @@ int RMGfxSourceBuffer4::getBpp() {
|
|||
return 4;
|
||||
}
|
||||
|
||||
void RMGfxSourceBuffer4::create(int dimx, int dimy, bool bUseDDraw) {
|
||||
RMGfxBuffer::create(dimx, dimy, 4, bUseDDraw);
|
||||
void RMGfxSourceBuffer4::create(int dimx, int dimy) {
|
||||
RMGfxBuffer::create(dimx, dimy, 4);
|
||||
}
|
||||
|
||||
/****************************************************************************\
|
||||
|
@ -641,8 +604,8 @@ void RMGfxSourceBuffer8::draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimit
|
|||
bigBuf.addDirtyRect(Common::Rect(dst._x1, dst._y1, dst._x1 + width, dst._y1 + height));
|
||||
}
|
||||
|
||||
RMGfxSourceBuffer8::RMGfxSourceBuffer8(int dimx, int dimy, bool bUseDDraw)
|
||||
: RMGfxBuffer(dimx, dimy, 8, bUseDDraw) {
|
||||
RMGfxSourceBuffer8::RMGfxSourceBuffer8(int dimx, int dimy)
|
||||
: RMGfxBuffer(dimx, dimy, 8) {
|
||||
setPriority(0);
|
||||
_bTrasp0 = false;
|
||||
}
|
||||
|
@ -661,8 +624,8 @@ int RMGfxSourceBuffer8::getBpp() {
|
|||
return 8;
|
||||
}
|
||||
|
||||
void RMGfxSourceBuffer8::create(int dimx, int dimy, bool bUseDDraw) {
|
||||
RMGfxBuffer::create(dimx, dimy, 8, bUseDDraw);
|
||||
void RMGfxSourceBuffer8::create(int dimx, int dimy) {
|
||||
RMGfxBuffer::create(dimx, dimy, 8);
|
||||
}
|
||||
|
||||
#define GETRED(x) (((x) >> 10) & 0x1F)
|
||||
|
@ -1989,8 +1952,8 @@ void RMGfxSourceBuffer16::prepareImage() {
|
|||
WRITE_LE_UINT16(&buf[i], FROM_LE_16(buf[i]) & 0x7FFF);
|
||||
}
|
||||
|
||||
RMGfxSourceBuffer16::RMGfxSourceBuffer16(int dimx, int dimy, bool bUseDDraw)
|
||||
: RMGfxBuffer(dimx, dimy, 16, bUseDDraw) {
|
||||
RMGfxSourceBuffer16::RMGfxSourceBuffer16(int dimx, int dimy)
|
||||
: RMGfxBuffer(dimx, dimy, 16) {
|
||||
setPriority(0);
|
||||
_bTrasp0 = false;
|
||||
}
|
||||
|
@ -2004,8 +1967,8 @@ int RMGfxSourceBuffer16::getBpp() {
|
|||
return 16;
|
||||
}
|
||||
|
||||
void RMGfxSourceBuffer16::create(int dimx, int dimy, bool bUseDDraw) {
|
||||
RMGfxBuffer::create(dimx, dimy, 16, bUseDDraw);
|
||||
void RMGfxSourceBuffer16::create(int dimx, int dimy) {
|
||||
RMGfxBuffer::create(dimx, dimy, 16);
|
||||
}
|
||||
|
||||
/****************************************************************************\
|
||||
|
|
|
@ -61,11 +61,10 @@ protected:
|
|||
int _dimx, _dimy;
|
||||
byte *_buf;
|
||||
byte *_origBuf;
|
||||
bool _bUseDDraw;
|
||||
|
||||
public:
|
||||
RMGfxBuffer();
|
||||
RMGfxBuffer(int dimx, int dimy, int nBpp, bool bUseDDraw = false);
|
||||
RMGfxBuffer(int dimx, int dimy, int nBpp);
|
||||
virtual ~RMGfxBuffer();
|
||||
|
||||
// Attributes
|
||||
|
@ -77,13 +76,9 @@ public:
|
|||
}
|
||||
|
||||
// Creation
|
||||
virtual void create(int dimx, int dimy, int nBpp, bool bUseDDraw = false);
|
||||
virtual void create(int dimx, int dimy, int nBpp);
|
||||
virtual void destroy();
|
||||
|
||||
// Buffer access
|
||||
void lock();
|
||||
void unlock();
|
||||
|
||||
// These are valid only if the buffer is locked
|
||||
operator byte *();
|
||||
operator void *();
|
||||
|
@ -321,11 +316,11 @@ protected:
|
|||
|
||||
public:
|
||||
RMGfxSourceBuffer16(bool bUseTrasp = false);
|
||||
RMGfxSourceBuffer16(int dimx, int dimy, bool bUseDDraw = false);
|
||||
RMGfxSourceBuffer16(int dimx, int dimy);
|
||||
virtual ~RMGfxSourceBuffer16();
|
||||
|
||||
// Initialization
|
||||
void create(int dimx, int dimy, bool bUseDDraw = false);
|
||||
void create(int dimx, int dimy);
|
||||
|
||||
int getBpp();
|
||||
virtual void draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
|
||||
|
@ -366,11 +361,11 @@ protected:
|
|||
|
||||
public:
|
||||
RMGfxSourceBuffer8(bool bTrasp0 = true);
|
||||
RMGfxSourceBuffer8(int dimx, int dimy, bool bUseDDraw = false);
|
||||
RMGfxSourceBuffer8(int dimx, int dimy);
|
||||
virtual ~RMGfxSourceBuffer8();
|
||||
|
||||
// Initialization
|
||||
void create(int dimx, int dimy, bool bUseDDraw = false);
|
||||
void create(int dimx, int dimy);
|
||||
|
||||
int getBpp();
|
||||
virtual void draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
|
||||
|
@ -533,10 +528,10 @@ public:
|
|||
class RMGfxSourceBuffer4 : public RMGfxSourceBufferPal {
|
||||
public:
|
||||
RMGfxSourceBuffer4();
|
||||
RMGfxSourceBuffer4(int dimx, int dimy, bool bUseDDraw = false);
|
||||
RMGfxSourceBuffer4(int dimx, int dimy);
|
||||
|
||||
// Initialization
|
||||
void create(int dimx, int dimy, bool bUseDDraw = false);
|
||||
void create(int dimx, int dimy);
|
||||
|
||||
int getBpp();
|
||||
virtual void draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
|
||||
|
@ -618,7 +613,7 @@ public:
|
|||
class RMGfxWoodyBuffer: public RMGfxSourceBuffer16, public RMGfxTargetBuffer {
|
||||
public:
|
||||
RMGfxWoodyBuffer();
|
||||
RMGfxWoodyBuffer(int dimx, int dimy, bool bUseDDraw = false);
|
||||
RMGfxWoodyBuffer(int dimx, int dimy);
|
||||
virtual ~RMGfxWoodyBuffer();
|
||||
|
||||
virtual void draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
|
||||
|
|
|
@ -500,9 +500,6 @@ void RMGfxEngine::init() {
|
|||
GLOBALS._gfxEngine = this;
|
||||
mpalInstallItemIrq(itemIrq);
|
||||
|
||||
// Initialize the input
|
||||
_input.init();
|
||||
|
||||
// Initialize the mouse pointer
|
||||
_point.init();
|
||||
|
||||
|
@ -530,13 +527,6 @@ void RMGfxEngine::close() {
|
|||
_inv.close();
|
||||
_tony.close();
|
||||
_point.close();
|
||||
_input.close();
|
||||
}
|
||||
|
||||
void RMGfxEngine::switchFullscreen(bool bFull) {
|
||||
}
|
||||
|
||||
void RMGfxEngine::GDIControl(bool bCon) {
|
||||
}
|
||||
|
||||
void RMGfxEngine::enableInput() {
|
||||
|
|
|
@ -92,12 +92,6 @@ public:
|
|||
// Closes the graphics engine
|
||||
void close();
|
||||
|
||||
// Warns when changing
|
||||
void switchFullscreen(bool bFull);
|
||||
|
||||
// Warn that we are guided by the GDI
|
||||
void GDIControl(bool bCon);
|
||||
|
||||
// Warns when entering or exits the options menu
|
||||
void openOptionScreen(CORO_PARAM, int type);
|
||||
|
||||
|
|
|
@ -101,12 +101,6 @@ void RMInput::poll() {
|
|||
}
|
||||
}
|
||||
|
||||
void RMInput::init() {
|
||||
}
|
||||
|
||||
void RMInput::close() {
|
||||
}
|
||||
|
||||
bool RMInput::mouseLeft() {
|
||||
return _leftButton;
|
||||
}
|
||||
|
|
|
@ -46,26 +46,11 @@ private:
|
|||
|
||||
// Keyboard related fields
|
||||
bool _keyDown[350];
|
||||
private:
|
||||
/**
|
||||
* Deinitialize DirectInput
|
||||
*/
|
||||
void DIClose();
|
||||
|
||||
public:
|
||||
RMInput();
|
||||
~RMInput();
|
||||
|
||||
/**
|
||||
* Class initialization
|
||||
*/
|
||||
void init(/*uint32 hInst*/);
|
||||
|
||||
/**
|
||||
* Closes the class
|
||||
*/
|
||||
void close();
|
||||
|
||||
/**
|
||||
* Polling (must be performed once per frame)
|
||||
*/
|
||||
|
|
|
@ -610,9 +610,6 @@ void TonyEngine::grabThumbnail() {
|
|||
_window.grabThumbnail(_curThumbnail);
|
||||
}
|
||||
|
||||
void TonyEngine::optionScreen() {
|
||||
}
|
||||
|
||||
void TonyEngine::openInitLoadMenu(CORO_PARAM) {
|
||||
_theEngine.openOptionScreen(coroParam, 1);
|
||||
}
|
||||
|
@ -706,15 +703,6 @@ void TonyEngine::close() {
|
|||
delete[] _curThumbnail;
|
||||
}
|
||||
|
||||
void TonyEngine::switchFullscreen(bool bFull) {
|
||||
_window.switchFullscreen(bFull);
|
||||
_theEngine.switchFullscreen(bFull);
|
||||
}
|
||||
|
||||
void TonyEngine::GDIControl(bool bCon) {
|
||||
_theEngine.GDIControl(bCon);
|
||||
}
|
||||
|
||||
void TonyEngine::freezeTime() {
|
||||
_bTimeFreezed = true;
|
||||
_nTimeFreezed = getTime() - _startTime;
|
||||
|
|
|
@ -167,20 +167,12 @@ public:
|
|||
Common::Error loadGameState(int slot);
|
||||
Common::Error saveGameState(int slot, const Common::String &desc);
|
||||
|
||||
/**
|
||||
* Warn when are being controlled by the GDI
|
||||
*/
|
||||
void GDIControl(bool bCon);
|
||||
|
||||
void play();
|
||||
void close();
|
||||
void abortGame();
|
||||
|
||||
void getDataDirectory(DataDir dir, char *path);
|
||||
|
||||
void switchFullscreen(bool bFull);
|
||||
void optionScreen();
|
||||
|
||||
void showLocation() {
|
||||
_bDrawLocation = true;
|
||||
}
|
||||
|
|
|
@ -109,13 +109,6 @@ void RMWindow::repaint() {
|
|||
g_system->updateScreen();
|
||||
}
|
||||
|
||||
bool RMWindow::lock() {
|
||||
return true;
|
||||
}
|
||||
|
||||
void RMWindow::unlock() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Wipes an area of the screen
|
||||
*/
|
||||
|
|
|
@ -53,8 +53,6 @@ public:
|
|||
|
||||
class RMWindow {
|
||||
private:
|
||||
bool lock();
|
||||
void unlock();
|
||||
void plotSplices(const byte *lpBuf, const Common::Point ¢er, int x, int y);
|
||||
void plotLines(const byte *lpBuf, const Common::Point ¢er, int x, int y);
|
||||
|
||||
|
@ -83,7 +81,6 @@ public:
|
|||
* Initialization
|
||||
*/
|
||||
void init(/*HINSTANCE hInst*/);
|
||||
void initDirectDraw();
|
||||
void close();
|
||||
|
||||
/**
|
||||
|
@ -91,11 +88,6 @@ public:
|
|||
*/
|
||||
void repaint();
|
||||
|
||||
/**
|
||||
* Switch between windowed and fullscreen
|
||||
*/
|
||||
void switchFullscreen(bool bFull) {}
|
||||
|
||||
/**
|
||||
* Reads the next frame
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue