TONY: Some more renaming

This commit is contained in:
Strangerke 2012-06-05 08:39:55 +02:00
parent 93cba6d880
commit 23c95d7014
18 changed files with 731 additions and 722 deletions

View File

@ -1998,7 +1998,7 @@ DECLARE_CUSTOM_FUNCTION(StartDialog)(CORO_PARAM, uint32 nDialog, uint32 nStartGr
}
// Making a choice for dialog
_ctx->dc.Init();
_ctx->dc.init();
_ctx->dc.SetNumChoices(_ctx->num);
// Writeall the possible options

View File

@ -69,8 +69,8 @@ void RMFont::Load(const byte *buf, int nChars, int dimx, int dimy, uint32 palRes
// Initialise the fonts
for (int i = 0; i < nChars; i++) {
// Initialise the buffer with the letters
m_letter[i].Init(buf + i * (dimx * dimy + 8) + 8, dimx, dimy);
m_letter[i].LoadPaletteWA(palResID);
m_letter[i].init(buf + i * (dimx * dimy + 8) + 8, dimx, dimy);
m_letter[i].loadPaletteWA(palResID);
}
m_fontDimx = dimx;
@ -114,7 +114,7 @@ RMGfxPrimitive *RMFont::MakeLetterPrimitive(byte bChar, int &nLength) {
return prim;
}
void RMFont::Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim2) {
void RMFont::draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim2) {
CORO_BEGIN_CONTEXT;
CORO_END_CONTEXT(_ctx);
@ -124,7 +124,7 @@ void RMFont::Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim2)
// Call the draw method of the letter assigned to the primitive
if (prim->m_nChar != -1)
CORO_INVOKE_2(m_letter[prim->m_nChar].Draw, bigBuf, prim);
CORO_INVOKE_2(m_letter[prim->m_nChar].draw, bigBuf, prim);
CORO_END_CODE;
}
@ -197,7 +197,7 @@ void RMFontColor::SetBaseColor(byte r1, byte g1, byte b1) {
// Puts in all the letters
for (i = 0; i < nLetters; i++)
m_letter[i].LoadPaletteWA(pal);
m_letter[i].loadPaletteWA(pal);
}
@ -205,7 +205,7 @@ void RMFontColor::SetBaseColor(byte r1, byte g1, byte b1) {
* RMFontParla Methods
\****************************************************************************/
void RMFontParla::Init(void) {
void RMFontParla::init(void) {
int i;
// bernie: Number of characters in the font
@ -612,7 +612,7 @@ void RMFontParla::Init(void) {
* RMFontMacc Methods
\****************************************************************************/
void RMFontMacc::Init(void) {
void RMFontMacc::init(void) {
int i;
// bernie: Number of characters in the font
@ -976,7 +976,7 @@ void RMFontMacc::Init(void) {
* RMFontCredits Methods
\****************************************************************************/
void RMFontCredits::Init(void) {
void RMFontCredits::init(void) {
int i;
// bernie: Number of characters in the font
@ -1441,7 +1441,7 @@ void RMFontObj::SetBothCase(int nChar, int nNext, signed char spiazz) {
}
void RMFontObj::Init(void) {
void RMFontObj::init(void) {
int i;
//bernie: Number of characters in the font (solo maiuscolo)
@ -1763,7 +1763,7 @@ void RMFontObj::Init(void) {
RMFontColor *RMText::m_fonts[4] = { NULL, NULL, NULL, NULL };
RMGfxClearTask RMText::m_clear;
void RMText::InitStatics() {
void RMText::initStatics() {
Common::fill(&m_fonts[0], &m_fonts[4], (RMFontColor *)NULL);
}
@ -1774,10 +1774,10 @@ RMText::RMText() {
// Default length
maxLineLength = 350;
m_bTrasp0 = true;
_bTrasp0 = true;
aHorType = HCENTER;
aVerType = VTOP;
SetPriority(150);
setPriority(150);
}
RMText::~RMText() {
@ -1808,13 +1808,13 @@ void RMText::WriteText(const RMString &text, int nFont, int *time) {
// Initialises the font (only once)
if (m_fonts[0] == NULL) {
m_fonts[0] = new RMFontParla;
m_fonts[0]->Init();
m_fonts[0]->init();
m_fonts[1] = new RMFontObj;
m_fonts[1]->Init();
m_fonts[1]->init();
m_fonts[2] = new RMFontMacc;
m_fonts[2]->Init();
m_fonts[2]->init();
m_fonts[3] = new RMFontCredits;
m_fonts[3]->Init();
m_fonts[3]->init();
}
WriteText(text, m_fonts[nFont], time);
@ -1835,7 +1835,7 @@ void RMText::WriteText(const RMString &text, RMFontColor *font, int *time) {
font->SetBaseColor(m_r, m_g, m_b);
// Destroy the buffer before starting
Destroy();
destroy();
// If the string is empty, do nothing
if (text == NULL || text[0] == '\0')
@ -1893,7 +1893,7 @@ void RMText::WriteText(const RMString &text, RMFontColor *font, int *time) {
// Create the surface
Create(width, height);
//AddPrim(new RMGfxPrimitive(&m_clear));
Common::fill(m_buf, m_buf + width * height * 2, 0);
Common::fill(_buf, _buf + width * height * 2, 0);
p = string;
@ -1935,7 +1935,7 @@ void RMText::WriteText(const RMString &text, RMFontColor *font, int *time) {
prim = font->MakeLetterPrimitive(*p, len);
prim->Dst().x1 = x;
prim->Dst().y1 = y;
AddPrim(prim);
addPrim(prim);
numchar++;
@ -1956,37 +1956,37 @@ void RMText::ClipOnScreen(RMGfxPrimitive *prim) {
prim->Dst().x1 = 5;
if (prim->Dst().y1 < 5)
prim->Dst().y1 = 5;
if (prim->Dst().x1 + m_dimx > 635)
prim->Dst().x1 = 635 - m_dimx;
if (prim->Dst().y1 + m_dimy > 475)
prim->Dst().y1 = 475 - m_dimy;
if (prim->Dst().x1 + _dimx > 635)
prim->Dst().x1 = 635 - _dimx;
if (prim->Dst().y1 + _dimy > 475)
prim->Dst().y1 = 475 - _dimy;
}
void RMText::Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim) {
void RMText::draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim) {
CORO_BEGIN_CONTEXT;
CORO_END_CONTEXT(_ctx);
CORO_BEGIN_CODE(_ctx);
// Horizontally
if (aHorType == HCENTER)
prim->Dst().TopLeft() -= RMPoint(m_dimx / 2, 0);
prim->Dst().TopLeft() -= RMPoint(_dimx / 2, 0);
else if (aHorType == HRIGHT)
prim->Dst().TopLeft() -= RMPoint(m_dimx, 0);
prim->Dst().TopLeft() -= RMPoint(_dimx, 0);
// Vertically
if (aVerType == VTOP) {
} else if (aVerType == VCENTER) {
prim->Dst().y1 -= m_dimy / 2;
prim->Dst().y1 -= _dimy / 2;
} else if (aVerType == VBOTTOM) {
prim->Dst().y1 -= m_dimy;
prim->Dst().y1 -= _dimy;
}
ClipOnScreen(prim);
CORO_INVOKE_2(RMGfxWoodyBuffer::Draw, bigBuf, prim);
CORO_INVOKE_2(RMGfxWoodyBuffer::draw, bigBuf, prim);
CORO_END_CODE;
}
@ -2132,11 +2132,11 @@ void RMTextDialog::RemoveThis(CORO_PARAM, bool &result) {
void RMTextDialog::Unregister(void) {
RMGfxTask::Unregister();
assert(m_nInList == 0);
assert(_nInList == 0);
CoroScheduler.setEvent(hEndDisplay);
}
void RMTextDialog::Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim) {
void RMTextDialog::draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim) {
CORO_BEGIN_CONTEXT;
CORO_END_CONTEXT(_ctx);
@ -2148,7 +2148,7 @@ void RMTextDialog::Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *p
if (m_bShowed) {
if (GLOBALS.bCfgSottotitoli || m_bAlwaysDisplay) {
prim->Dst().TopLeft() = dst;
CORO_INVOKE_2(RMText::Draw, bigBuf, prim);
CORO_INVOKE_2(RMText::draw, bigBuf, prim);
}
}
@ -2187,7 +2187,7 @@ RMTextDialogScrolling::RMTextDialogScrolling(RMLocation *loc) {
RMTextDialogScrolling::~RMTextDialogScrolling() {
}
void RMTextDialogScrolling::Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim) {
void RMTextDialogScrolling::draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim) {
CORO_BEGIN_CONTEXT;
RMPoint curDst;
CORO_END_CONTEXT(_ctx);
@ -2199,7 +2199,7 @@ void RMTextDialogScrolling::Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPri
if (curLoc != NULL)
dst -= curLoc->ScrollPosition() - startScroll;
CORO_INVOKE_2(RMTextDialog::Draw, bigBuf, prim);
CORO_INVOKE_2(RMTextDialog::draw, bigBuf, prim);
dst = _ctx->curDst;
@ -2217,7 +2217,7 @@ void RMTextDialogScrolling::ClipOnScreen(RMGfxPrimitive *prim) {
RMTextItemName::RMTextItemName() : RMText() {
m_item = NULL;
SetPriority(220);
setPriority(220);
}
RMTextItemName::~RMTextItemName() {
@ -2237,8 +2237,8 @@ void RMTextItemName::DoFrame(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMLocation &
_ctx->lastItem = m_item;
// Adds to the list if there is need
if (!m_nInList)
bigBuf.AddPrim(new RMGfxPrimitive(this));
if (!_nInList)
bigBuf.addPrim(new RMGfxPrimitive(this));
// Update the scrolling co-ordinates
m_curscroll = loc.ScrollPosition();
@ -2275,20 +2275,20 @@ void RMTextItemName::DoFrame(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMLocation &
}
void RMTextItemName::Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim) {
void RMTextItemName::draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim) {
CORO_BEGIN_CONTEXT;
CORO_END_CONTEXT(_ctx);
CORO_BEGIN_CODE(_ctx);
// If there is no text, it's pointless to continue
if (m_buf == NULL)
if (_buf == NULL)
return;
// Set the destination coordinates of the mouse
prim->Dst().TopLeft() = m_mpos - RMPoint(0, 30);
CORO_INVOKE_2(RMText::Draw, bigBuf, prim);
CORO_INVOKE_2(RMText::draw, bigBuf, prim);
CORO_END_CODE;
}
@ -2322,11 +2322,11 @@ RMDialogChoice::RMDialogChoice() {
RMResRaw dlg2(RES_I_DLGTEXTLINE);
RMRes dlgpal(RES_I_DLGTEXTPAL);
DlgText.Init(dlg1, dlg1.Width(), dlg1.Height());
DlgTextLine.Init(dlg2, dlg2.Width(), dlg2.Height());
DlgText.init(dlg1, dlg1.Width(), dlg1.Height());
DlgTextLine.init(dlg2, dlg2.Width(), dlg2.Height());
DlgText.LoadPaletteWA(dlgpal);
DlgTextLine.LoadPaletteWA(dlgpal);
DlgText.loadPaletteWA(dlgpal);
DlgTextLine.loadPaletteWA(dlgpal);
hUnreg = CoroScheduler.createEvent(false, false);
bRemoveFromOT = false;
@ -2338,20 +2338,20 @@ RMDialogChoice::~RMDialogChoice() {
void RMDialogChoice::Unregister(void) {
RMGfxWoodyBuffer::Unregister();
assert(!m_nInList);
assert(!_nInList);
CoroScheduler.pulseEvent(hUnreg);
bRemoveFromOT = false;
}
void RMDialogChoice::Init(void) {
void RMDialogChoice::init(void) {
m_numChoices = 0;
m_drawedStrings = NULL;
m_ptDrawStrings = NULL;
m_curSelection = -1;
Create(640, 477);
SetPriority(140);
setPriority(140);
}
@ -2366,7 +2366,7 @@ void RMDialogChoice::Close(void) {
m_ptDrawStrings = NULL;
}
Destroy();
destroy();
}
void RMDialogChoice::SetNumChoices(int num) {
@ -2384,7 +2384,7 @@ void RMDialogChoice::SetNumChoices(int num) {
m_drawedStrings[i].SetColor(0, 255, 0);
m_drawedStrings[i].SetAlignType(RMText::HLEFTPAR, RMText::VTOP);
m_drawedStrings[i].SetMaxLineLength(600);
m_drawedStrings[i].SetPriority(10);
m_drawedStrings[i].setPriority(10);
}
}
@ -2402,22 +2402,22 @@ void RMDialogChoice::Prepare(CORO_PARAM) {
CORO_BEGIN_CODE(_ctx);
AddPrim(new RMGfxPrimitive(&DlgText, RMPoint(0, 0)));
AddPrim(new RMGfxPrimitive(&DlgTextLine, RMPoint(0, 155)));
AddPrim(new RMGfxPrimitive(&DlgTextLine, RMPoint(0, 155 + 83)));
AddPrim(new RMGfxPrimitive(&DlgTextLine, RMPoint(0, 155 + 83 + 83)));
AddPrim(new RMGfxPrimitive(&DlgTextLine, RMPoint(0, 155 + 83 + 83 + 83)));
addPrim(new RMGfxPrimitive(&DlgText, RMPoint(0, 0)));
addPrim(new RMGfxPrimitive(&DlgTextLine, RMPoint(0, 155)));
addPrim(new RMGfxPrimitive(&DlgTextLine, RMPoint(0, 155 + 83)));
addPrim(new RMGfxPrimitive(&DlgTextLine, RMPoint(0, 155 + 83 + 83)));
addPrim(new RMGfxPrimitive(&DlgTextLine, RMPoint(0, 155 + 83 + 83 + 83)));
_ctx->ptPos.Set(20, 90);
for (_ctx->i = 0; _ctx->i < m_numChoices; _ctx->i++) {
AddPrim(new RMGfxPrimitive(&m_drawedStrings[_ctx->i], _ctx->ptPos));
addPrim(new RMGfxPrimitive(&m_drawedStrings[_ctx->i], _ctx->ptPos));
m_ptDrawStrings[_ctx->i] = _ctx->ptPos;
_ctx->ptPos.Offset(0, m_drawedStrings[_ctx->i].Dimy() + 15);
_ctx->ptPos.Offset(0, m_drawedStrings[_ctx->i].getDimy() + 15);
}
CORO_INVOKE_0(DrawOT);
ClearOT();
CORO_INVOKE_0(drawOT);
clearOT();
m_ptDrawPos.Set(0, 480 - _ctx->ptPos.y);
@ -2435,29 +2435,29 @@ void RMDialogChoice::SetSelected(CORO_PARAM, int pos) {
if (pos == m_curSelection)
return;
_ctx->box.SetPriority(5);
_ctx->box.setPriority(5);
if (m_curSelection != -1) {
_ctx->box.SetColor(0xCC, 0xCC, 0xFF);
_ctx->rc.TopLeft() = RMPoint(18, m_ptDrawStrings[m_curSelection].y);
_ctx->rc.BottomRight() = _ctx->rc.TopLeft() + RMPoint(597, m_drawedStrings[m_curSelection].Dimy());
AddPrim(new RMGfxPrimitive(&_ctx->box, _ctx->rc));
_ctx->rc.BottomRight() = _ctx->rc.TopLeft() + RMPoint(597, m_drawedStrings[m_curSelection].getDimy());
addPrim(new RMGfxPrimitive(&_ctx->box, _ctx->rc));
AddPrim(new RMGfxPrimitive(&m_drawedStrings[m_curSelection], m_ptDrawStrings[m_curSelection]));
CORO_INVOKE_0(DrawOT);
ClearOT();
addPrim(new RMGfxPrimitive(&m_drawedStrings[m_curSelection], m_ptDrawStrings[m_curSelection]));
CORO_INVOKE_0(drawOT);
clearOT();
}
if (pos != -1) {
_ctx->box.SetColor(100, 100, 100);
_ctx->rc.TopLeft() = RMPoint(18, m_ptDrawStrings[pos].y);
_ctx->rc.BottomRight() = _ctx->rc.TopLeft() + RMPoint(597, m_drawedStrings[pos].Dimy());
AddPrim(new RMGfxPrimitive(&_ctx->box, _ctx->rc));
AddPrim(new RMGfxPrimitive(&m_drawedStrings[pos], m_ptDrawStrings[pos]));
_ctx->rc.BottomRight() = _ctx->rc.TopLeft() + RMPoint(597, m_drawedStrings[pos].getDimy());
addPrim(new RMGfxPrimitive(&_ctx->box, _ctx->rc));
addPrim(new RMGfxPrimitive(&m_drawedStrings[pos], m_ptDrawStrings[pos]));
}
CORO_INVOKE_0(DrawOT);
ClearOT();
CORO_INVOKE_0(drawOT);
clearOT();
m_curSelection = pos;
@ -2477,8 +2477,8 @@ void RMDialogChoice::Show(CORO_PARAM, RMGfxTargetBuffer *bigBuf) {
CORO_INVOKE_0(Prepare);
m_bShow = false;
if (!m_nInList && bigBuf != NULL)
bigBuf->AddPrim(new RMGfxPrimitive(this));
if (!_nInList && bigBuf != NULL)
bigBuf->addPrim(new RMGfxPrimitive(this));
if (0) {
m_bShow = true;
@ -2488,8 +2488,8 @@ void RMDialogChoice::Show(CORO_PARAM, RMGfxTargetBuffer *bigBuf) {
_ctx->destpt = m_ptDrawPos;
m_ptDrawPos.Set(0, 480);
if (!m_nInList && bigBuf != NULL)
bigBuf->AddPrim(new RMGfxPrimitive(this));
if (!_nInList && bigBuf != NULL)
bigBuf->addPrim(new RMGfxPrimitive(this));
m_bShow = true;
_ctx->elaps = 0;
@ -2507,7 +2507,7 @@ void RMDialogChoice::Show(CORO_PARAM, RMGfxTargetBuffer *bigBuf) {
CORO_END_CODE;
}
void RMDialogChoice::Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim) {
void RMDialogChoice::draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim) {
CORO_BEGIN_CONTEXT;
CORO_END_CONTEXT(_ctx);
@ -2516,8 +2516,8 @@ void RMDialogChoice::Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive
if (m_bShow == false)
return;
prim->SetDst(m_ptDrawPos);
CORO_INVOKE_2(RMGfxSourceBuffer16::Draw, bigBuf, prim);
prim->setDst(m_ptDrawPos);
CORO_INVOKE_2(RMGfxSourceBuffer16::draw, bigBuf, prim);
CORO_END_CODE;
}
@ -2567,7 +2567,7 @@ void RMDialogChoice::DoFrame(CORO_PARAM, RMPoint ptMousePos) {
if (ptMousePos.y > m_ptDrawPos.y) {
for (_ctx->i = 0; _ctx->i < m_numChoices; _ctx->i++) {
if ((ptMousePos.y >= m_ptDrawPos.y + m_ptDrawStrings[_ctx->i].y) && (ptMousePos.y < m_ptDrawPos.y + m_ptDrawStrings[_ctx->i].y + m_drawedStrings[_ctx->i].Dimy())) {
if ((ptMousePos.y >= m_ptDrawPos.y + m_ptDrawStrings[_ctx->i].y) && (ptMousePos.y < m_ptDrawPos.y + m_ptDrawStrings[_ctx->i].y + m_drawedStrings[_ctx->i].getDimy())) {
CORO_INVOKE_1(SetSelected, _ctx->i);
break;
}

View File

@ -90,11 +90,11 @@ public:
virtual ~RMFont();
// Initialisation and closing
virtual void Init(void) = 0;
virtual void init(void) = 0;
virtual void Close(void);
// Drawing
virtual void Draw(CORO_PARAM, RMGfxTargetBuffer &bigBug, RMGfxPrimitive *prim);
virtual void draw(CORO_PARAM, RMGfxTargetBuffer &bigBug, RMGfxPrimitive *prim);
// Create a primitive for a letter
RMGfxPrimitive *MakeLetterPrimitive(byte bChar, int &nLength);
@ -143,7 +143,7 @@ public:
class RMFontParla : public RMFontColor, public RMFontWithTables {
public:
void Init(void);
void init(void);
virtual ~RMFontParla() {}
};
@ -152,19 +152,19 @@ private:
void SetBothCase(int nChar, int nNext, signed char spiazz);
public:
void Init(void);
void init(void);
virtual ~RMFontObj() {}
};
class RMFontMacc : public RMFontColor, public RMFontWithTables {
public:
void Init(void);
void init(void);
virtual ~RMFontMacc() {}
};
class RMFontCredits : public RMFontColor, public RMFontWithTables {
public:
void Init(void);
void init(void);
virtual ~RMFontCredits() {}
virtual void SetBaseColor(byte r, byte g, byte b) {}
};
@ -203,7 +203,7 @@ protected:
public:
RMText();
virtual ~RMText();
static void InitStatics();
static void initStatics();
static void Unload();
// Set the alignment type
@ -223,7 +223,7 @@ public:
virtual void RemoveThis(CORO_PARAM, bool &result);
// Overloading of the Draw to center the text, if necessary
virtual void Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
virtual void draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
// Set the base colour
void SetColor(byte r, byte g, byte b) {
@ -267,7 +267,7 @@ public:
virtual void Unregister(void);
// Overloading of the Draw to center the text, if necessary
virtual void Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
virtual void draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
// Set the position
void SetPosition(const RMPoint &pt) {
@ -304,7 +304,7 @@ public:
RMTextDialogScrolling(RMLocation *loc);
virtual ~RMTextDialogScrolling();
virtual void Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
virtual void draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
};
@ -327,7 +327,7 @@ public:
}
void DoFrame(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMLocation &loc, RMPointer &ptr, RMInventory &inv);
virtual void Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
virtual void draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
RMPoint GetHotspot();
RMItem *GetSelectedItem();
@ -363,7 +363,7 @@ protected:
public:
virtual void RemoveThis(CORO_PARAM, bool &result);
virtual void Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
virtual void draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
void Unregister(void);
public:
@ -372,7 +372,7 @@ public:
virtual ~RMDialogChoice();
// Initialisation and closure
void Init(void);
void init(void);
void Close(void);
// Sets the number of possible sentences, which then be added with AddChoice()

View File

@ -126,7 +126,7 @@ RMOptionButton::RMOptionButton(uint32 dwRes, RMPoint pt, bool bDoubleState) {
RMResRaw raw(dwRes);
assert(raw.IsValid());
m_buf = new RMGfxSourceBuffer16(false);
m_buf->Init(raw, raw.Width(), raw.Height());
m_buf->init(raw, raw.Width(), raw.Height());
m_rect.SetRect(pt.x, pt.y, pt.x + raw.Width() - 1, pt.y + raw.Height() - 1);
m_bActive = false;
@ -170,9 +170,7 @@ bool RMOptionButton::DoFrame(const RMPoint &mousePos, bool bLeftClick, bool bRig
return false;
}
void RMOptionButton::Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim) {
void RMOptionButton::draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim) {
CORO_BEGIN_CONTEXT;
CORO_END_CONTEXT(_ctx);
@ -182,14 +180,14 @@ void RMOptionButton::Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive
return;
if (m_bHasGfx)
CORO_INVOKE_2(m_buf->Draw, bigBuf, prim);
CORO_INVOKE_2(m_buf->draw, bigBuf, prim);
CORO_END_CODE;
}
void RMOptionButton::AddToList(RMGfxTargetBuffer &bigBuf) {
if (m_bHasGfx)
bigBuf.AddPrim(new RMGfxPrimitive(this, m_rect));
bigBuf.addPrim(new RMGfxPrimitive(this, m_rect));
}
/****************************************************************************\
@ -272,7 +270,7 @@ bool RMOptionSlide::DoFrame(const RMPoint &mousePos, bool bLeftClick, bool bRigh
return bRefresh;
}
void RMOptionSlide::Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim) {
void RMOptionSlide::draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim) {
CORO_BEGIN_CONTEXT;
int i;
int val;
@ -290,21 +288,21 @@ void RMOptionSlide::Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *
else if (_ctx->val > 100) _ctx->val = 100;
if (_ctx->val == 1) {
prim->SetDst(_ctx->pos);
CORO_INVOKE_2(m_SliderSingle->Draw, bigBuf, prim);
prim->setDst(_ctx->pos);
CORO_INVOKE_2(m_SliderSingle->draw, bigBuf, prim);
} else {
prim->SetDst(_ctx->pos);
CORO_INVOKE_2(m_SliderLeft->Draw, bigBuf, prim);
prim->setDst(_ctx->pos);
CORO_INVOKE_2(m_SliderLeft->draw, bigBuf, prim);
_ctx->pos.x += 3;
for (_ctx->i = 1; _ctx->i < _ctx->val - 1; _ctx->i++) {
prim->SetDst(_ctx->pos);
CORO_INVOKE_2(m_SliderCenter->Draw, bigBuf, prim);
prim->setDst(_ctx->pos);
CORO_INVOKE_2(m_SliderCenter->draw, bigBuf, prim);
_ctx->pos.x += 3;
}
prim->SetDst(_ctx->pos);
CORO_INVOKE_2(m_SliderRight->Draw, bigBuf, prim);
prim->setDst(_ctx->pos);
CORO_INVOKE_2(m_SliderRight->draw, bigBuf, prim);
_ctx->pos.x += 3;
}
@ -312,7 +310,7 @@ void RMOptionSlide::Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *
}
void RMOptionSlide::AddToList(RMGfxTargetBuffer &bigBuf) {
bigBuf.AddPrim(new RMGfxPrimitive(this));
bigBuf.addPrim(new RMGfxPrimitive(this));
}
@ -392,15 +390,15 @@ void RMOptionScreen::RefreshAll(CORO_PARAM) {
CORO_END_CONTEXT(_ctx);
CORO_BEGIN_CODE(_ctx);
ClearOT();
clearOT();
AddPrim(new RMGfxPrimitive(m_menu));
addPrim(new RMGfxPrimitive(m_menu));
if (m_bNoLoadSave)
AddPrim(new RMGfxPrimitive(m_HideLoadSave, RMPoint(0, 401)));
addPrim(new RMGfxPrimitive(m_HideLoadSave, RMPoint(0, 401)));
if (m_bQuitConfirm) {
AddPrim(new RMGfxPrimitive(m_QuitConfirm, RMPoint(270, 200)));
addPrim(new RMGfxPrimitive(m_QuitConfirm, RMPoint(270, 200)));
m_ButtonQuitYes->AddToList(*this);
m_ButtonQuitNo->AddToList(*this);
}
@ -449,62 +447,62 @@ void RMOptionScreen::RefreshAll(CORO_PARAM) {
_ctx->title->WriteText(msg[0], 1);
}
AddPrim(new RMGfxPrimitive(_ctx->title, RMPoint(320, 10)));
addPrim(new RMGfxPrimitive(_ctx->title, RMPoint(320, 10)));
if (m_curThumbDiff[0] == 0)
AddPrim(new RMGfxPrimitive(m_SaveHard, RMPoint(48, 57)));
addPrim(new RMGfxPrimitive(m_SaveHard, RMPoint(48, 57)));
else if (m_curThumbDiff[0] == 1)
AddPrim(new RMGfxPrimitive(m_SaveEasy, RMPoint(48, 57)));
addPrim(new RMGfxPrimitive(m_SaveEasy, RMPoint(48, 57)));
if (m_curThumbDiff[1] == 0)
AddPrim(new RMGfxPrimitive(m_SaveHard, RMPoint(240, 57)));
addPrim(new RMGfxPrimitive(m_SaveHard, RMPoint(240, 57)));
else if (m_curThumbDiff[1] == 1)
AddPrim(new RMGfxPrimitive(m_SaveEasy, RMPoint(240, 57)));
addPrim(new RMGfxPrimitive(m_SaveEasy, RMPoint(240, 57)));
if (m_curThumbDiff[2] == 0)
AddPrim(new RMGfxPrimitive(m_SaveHard, RMPoint(432, 57)));
addPrim(new RMGfxPrimitive(m_SaveHard, RMPoint(432, 57)));
else if (m_curThumbDiff[2] == 1)
AddPrim(new RMGfxPrimitive(m_SaveEasy, RMPoint(432, 57)));
addPrim(new RMGfxPrimitive(m_SaveEasy, RMPoint(432, 57)));
if (m_curThumbDiff[3] == 0)
AddPrim(new RMGfxPrimitive(m_SaveHard, RMPoint(48, 239)));
addPrim(new RMGfxPrimitive(m_SaveHard, RMPoint(48, 239)));
else if (m_curThumbDiff[3] == 1)
AddPrim(new RMGfxPrimitive(m_SaveEasy, RMPoint(48, 239)));
addPrim(new RMGfxPrimitive(m_SaveEasy, RMPoint(48, 239)));
if (m_curThumbDiff[4] == 0)
AddPrim(new RMGfxPrimitive(m_SaveHard, RMPoint(240, 239)));
addPrim(new RMGfxPrimitive(m_SaveHard, RMPoint(240, 239)));
else if (m_curThumbDiff[4] == 1)
AddPrim(new RMGfxPrimitive(m_SaveEasy, RMPoint(240, 239)));
addPrim(new RMGfxPrimitive(m_SaveEasy, RMPoint(240, 239)));
if (m_curThumbDiff[5] == 0)
AddPrim(new RMGfxPrimitive(m_SaveHard, RMPoint(432, 239)));
addPrim(new RMGfxPrimitive(m_SaveHard, RMPoint(432, 239)));
else if (m_curThumbDiff[5] == 1)
AddPrim(new RMGfxPrimitive(m_SaveEasy, RMPoint(432, 239)));
addPrim(new RMGfxPrimitive(m_SaveEasy, RMPoint(432, 239)));
if (m_curThumb[0] && !(m_bEditSaveName && m_nEditPos == 0))
AddPrim(new RMGfxPrimitive(m_curThumb[0], RMPoint(48, 57)));
addPrim(new RMGfxPrimitive(m_curThumb[0], RMPoint(48, 57)));
if (m_curThumb[1] && !(m_bEditSaveName && m_nEditPos == 1))
AddPrim(new RMGfxPrimitive(m_curThumb[1], RMPoint(240, 57)));
addPrim(new RMGfxPrimitive(m_curThumb[1], RMPoint(240, 57)));
if (m_curThumb[2] && !(m_bEditSaveName && m_nEditPos == 2))
AddPrim(new RMGfxPrimitive(m_curThumb[2], RMPoint(432, 57)));
addPrim(new RMGfxPrimitive(m_curThumb[2], RMPoint(432, 57)));
if (m_curThumb[3] && !(m_bEditSaveName && m_nEditPos == 3))
AddPrim(new RMGfxPrimitive(m_curThumb[3], RMPoint(48, 239)));
addPrim(new RMGfxPrimitive(m_curThumb[3], RMPoint(48, 239)));
if (m_curThumb[4] && !(m_bEditSaveName && m_nEditPos == 4))
AddPrim(new RMGfxPrimitive(m_curThumb[4], RMPoint(240, 239)));
addPrim(new RMGfxPrimitive(m_curThumb[4], RMPoint(240, 239)));
if (m_curThumb[5] && !(m_bEditSaveName && m_nEditPos == 5))
AddPrim(new RMGfxPrimitive(m_curThumb[5], RMPoint(432, 239)));
addPrim(new RMGfxPrimitive(m_curThumb[5], RMPoint(432, 239)));
if (m_bEditSaveName) {
_ctx->thumb = new RMGfxSourceBuffer16;
_ctx->thumb->Init((byte *)_vm->getThumbnail(), 640 / 4, 480 / 4);
_ctx->thumb->init((byte *)_vm->getThumbnail(), 640 / 4, 480 / 4);
if (m_nEditPos == 0)
AddPrim(new RMGfxPrimitive(_ctx->thumb, RMPoint(48, 57)));
addPrim(new RMGfxPrimitive(_ctx->thumb, RMPoint(48, 57)));
else if (m_nEditPos == 1)
AddPrim(new RMGfxPrimitive(_ctx->thumb, RMPoint(240, 57)));
addPrim(new RMGfxPrimitive(_ctx->thumb, RMPoint(240, 57)));
else if (m_nEditPos == 2)
AddPrim(new RMGfxPrimitive(_ctx->thumb, RMPoint(432, 57)));
addPrim(new RMGfxPrimitive(_ctx->thumb, RMPoint(432, 57)));
else if (m_nEditPos == 3)
AddPrim(new RMGfxPrimitive(_ctx->thumb, RMPoint(48, 239)));
addPrim(new RMGfxPrimitive(_ctx->thumb, RMPoint(48, 239)));
else if (m_nEditPos == 4)
AddPrim(new RMGfxPrimitive(_ctx->thumb, RMPoint(240, 239)));
addPrim(new RMGfxPrimitive(_ctx->thumb, RMPoint(240, 239)));
else if (m_nEditPos == 5)
AddPrim(new RMGfxPrimitive(_ctx->thumb, RMPoint(432, 239)));
addPrim(new RMGfxPrimitive(_ctx->thumb, RMPoint(432, 239)));
}
for (_ctx->i = 0; _ctx->i < 6; _ctx->i++) {
@ -524,18 +522,18 @@ void RMOptionScreen::RefreshAll(CORO_PARAM) {
_ctx->num[_ctx->i]->WriteText(s, 2);
}
AddPrim(new RMGfxPrimitive(_ctx->num[0], RMPoint(55 - 3, 180 + 14)));
AddPrim(new RMGfxPrimitive(_ctx->num[1], RMPoint(247 - 3, 180 + 14)));
AddPrim(new RMGfxPrimitive(_ctx->num[2], RMPoint(439 - 3, 180 + 14)));
AddPrim(new RMGfxPrimitive(_ctx->num[3], RMPoint(55 - 3, 362 + 14)));
AddPrim(new RMGfxPrimitive(_ctx->num[4], RMPoint(247 - 3, 362 + 14)));
AddPrim(new RMGfxPrimitive(_ctx->num[5], RMPoint(439 - 3, 362 + 14)));
addPrim(new RMGfxPrimitive(_ctx->num[0], RMPoint(55 - 3, 180 + 14)));
addPrim(new RMGfxPrimitive(_ctx->num[1], RMPoint(247 - 3, 180 + 14)));
addPrim(new RMGfxPrimitive(_ctx->num[2], RMPoint(439 - 3, 180 + 14)));
addPrim(new RMGfxPrimitive(_ctx->num[3], RMPoint(55 - 3, 362 + 14)));
addPrim(new RMGfxPrimitive(_ctx->num[4], RMPoint(247 - 3, 362 + 14)));
addPrim(new RMGfxPrimitive(_ctx->num[5], RMPoint(439 - 3, 362 + 14)));
m_ButtonSave_ArrowLeft->AddToList(*this);
m_ButtonSave_ArrowRight->AddToList(*this);
}
CORO_INVOKE_0(DrawOT);
CORO_INVOKE_0(drawOT);
if (m_nState == MENULOAD || m_nState == MENUSAVE) {
if (_ctx->thumb) delete _ctx->thumb;
@ -588,7 +586,7 @@ void RMOptionScreen::InitState(CORO_PARAM) {
assert(_ctx->raw->IsValid());
assert(m_menu == NULL);
m_menu = new RMGfxSourceBuffer16(false);
m_menu->Init(*_ctx->raw, _ctx->raw->Width(), _ctx->raw->Height());
m_menu->init(*_ctx->raw, _ctx->raw->Width(), _ctx->raw->Height());
delete _ctx->raw;
if (m_nState == MENULOAD || m_nState == MENUSAVE) {
@ -650,22 +648,22 @@ void RMOptionScreen::InitState(CORO_PARAM) {
assert(_ctx->raw->IsValid());
assert(m_QuitConfirm == NULL);
m_QuitConfirm = new RMGfxSourceBuffer16(false);
m_QuitConfirm->Init(*_ctx->raw, _ctx->raw->Width(), _ctx->raw->Height());
m_QuitConfirm->init(*_ctx->raw, _ctx->raw->Width(), _ctx->raw->Height());
delete _ctx->raw;
assert(m_ButtonQuitYes == NULL);
m_ButtonQuitYes = new RMOptionButton(20022, RMPoint(281, 265));
m_ButtonQuitYes->SetPriority(30);
m_ButtonQuitYes->setPriority(30);
assert(m_ButtonQuitNo == NULL);
m_ButtonQuitNo = new RMOptionButton(20023, RMPoint(337, 264));
m_ButtonQuitNo->SetPriority(30);
m_ButtonQuitNo->setPriority(30);
if (m_bNoLoadSave) {
_ctx->raw = new RMResRaw(20028);
assert(_ctx->raw->IsValid());
assert(m_HideLoadSave == NULL);
m_HideLoadSave = new RMGfxSourceBuffer16(false);
m_HideLoadSave->Init(*_ctx->raw, _ctx->raw->Width(), _ctx->raw->Height());
m_HideLoadSave->init(*_ctx->raw, _ctx->raw->Width(), _ctx->raw->Height());
delete _ctx->raw;
}
@ -863,7 +861,7 @@ void RMOptionScreen::CloseState(void) {
}
void RMOptionScreen::ReInit(RMGfxTargetBuffer &bigBuf) {
bigBuf.AddPrim(new RMGfxPrimitive(this));
bigBuf.addPrim(new RMGfxPrimitive(this));
}
void RMOptionScreen::Init(CORO_PARAM, RMGfxTargetBuffer &bigBuf, bool &result) {
@ -885,7 +883,7 @@ void RMOptionScreen::Init(CORO_PARAM, RMGfxTargetBuffer &bigBuf, bool &result) {
m_bNoLoadSave = false;
m_bAlterGfx = false;
bigBuf.AddPrim(new RMGfxPrimitive(this));
bigBuf.addPrim(new RMGfxPrimitive(this));
if (m_nState == MENULOAD || m_nState == MENUSAVE)
m_nState = MENUGAME;
@ -916,7 +914,7 @@ void RMOptionScreen::InitLoadMenuOnly(CORO_PARAM, RMGfxTargetBuffer &bigBuf, boo
m_bNoLoadSave = false;
m_bAlterGfx = bAlternateGfx;
bigBuf.AddPrim(new RMGfxPrimitive(this));
bigBuf.addPrim(new RMGfxPrimitive(this));
m_nState = MENULOAD;
CORO_INVOKE_0(InitState);
@ -945,7 +943,7 @@ void RMOptionScreen::InitSaveMenuOnly(CORO_PARAM, RMGfxTargetBuffer &bigBuf, boo
m_bNoLoadSave = false;
m_bAlterGfx = bAlternateGfx;
bigBuf.AddPrim(new RMGfxPrimitive(this));
bigBuf.addPrim(new RMGfxPrimitive(this));
m_nState = MENUSAVE;
CORO_INVOKE_0(InitState);
@ -973,7 +971,7 @@ void RMOptionScreen::InitNoLoadSave(CORO_PARAM, RMGfxTargetBuffer &bigBuf, bool
m_bLoadMenuOnly = false;
m_bNoLoadSave = true;
bigBuf.AddPrim(new RMGfxPrimitive(this));
bigBuf.addPrim(new RMGfxPrimitive(this));
m_nState = MENUGAME;
CORO_INVOKE_0(InitState);
@ -1273,7 +1271,7 @@ void RMOptionScreen::DoFrame(CORO_PARAM, RMInput *input) {
}
void RMOptionScreen::Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim) {
void RMOptionScreen::draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim) {
CORO_BEGIN_CONTEXT;
int curTime;
CORO_END_CONTEXT(_ctx);
@ -1300,7 +1298,7 @@ void RMOptionScreen::Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive
}
// Set the part to draw the scrolling
prim->SetSrc(RMRect(0, 480 - m_FadeY, 640, 480));
prim->setSrc(RMRect(0, 480 - m_FadeY, 640, 480));
} else if (m_FadeStep == 2) {
// Bounce 1
@ -1310,7 +1308,7 @@ void RMOptionScreen::Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive
m_FadeStep++;
}
prim->SetSrc(RMRect(0, 480 - m_FadeY, 640, 480));
prim->setSrc(RMRect(0, 480 - m_FadeY, 640, 480));
} else if (m_FadeStep == 3) {
m_FadeY -= FADE_SPEED / 4 * SYNC;
@ -1319,7 +1317,7 @@ void RMOptionScreen::Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive
m_FadeStep++;
}
prim->SetSrc(RMRect(0, 480 - m_FadeY, 640, 480));
prim->setSrc(RMRect(0, 480 - m_FadeY, 640, 480));
} else if (m_FadeStep == 4) {
// Bounce 1 - 2
@ -1329,7 +1327,7 @@ void RMOptionScreen::Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive
m_FadeStep++;
}
prim->SetSrc(RMRect(0, 480 - m_FadeY, 640, 480));
prim->setSrc(RMRect(0, 480 - m_FadeY, 640, 480));
} else if (m_FadeStep == 5) {
m_FadeY += FADE_SPEED / 2 * SYNC;
@ -1339,7 +1337,7 @@ void RMOptionScreen::Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive
_vm->hideLocation();
}
prim->SetSrc(RMRect(0, 480 - m_FadeY, 640, 480));
prim->setSrc(RMRect(0, 480 - m_FadeY, 640, 480));
} else if (m_FadeStep == 6) {
// Menu ON
@ -1355,7 +1353,7 @@ void RMOptionScreen::Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive
m_FadeY = 0;
m_FadeStep++;
}
prim->SetSrc(RMRect(0, 480 - m_FadeY, 640, 480));
prim->setSrc(RMRect(0, 480 - m_FadeY, 640, 480));
} else if (m_FadeStep == 9) {
// Hello hello!
@ -1372,7 +1370,7 @@ void RMOptionScreen::Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive
m_FadeTime = _ctx->curTime;
CORO_INVOKE_2(RMGfxWoodyBuffer::Draw, bigBuf, prim);
CORO_INVOKE_2(RMGfxWoodyBuffer::draw, bigBuf, prim);
CORO_END_CODE;
}
@ -1483,8 +1481,8 @@ void RMPointer::Init(void) {
RMResRaw res(RES_P_GO + i);
m_pointer[i] = new RMGfxSourceBuffer8RLEByteAA;
m_pointer[i]->Init(res, res.Width(), res.Height(), false);
m_pointer[i]->LoadPaletteWA(RES_P_PAL);
m_pointer[i]->init(res, res.Width(), res.Height(), false);
m_pointer[i]->loadPaletteWA(RES_P_PAL);
}
for (i = 0; i < 5; i++) {
@ -1530,7 +1528,7 @@ int RMPointer::Priority() {
return 200;
}
void RMPointer::Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim) {
void RMPointer::draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim) {
CORO_BEGIN_CONTEXT;
int n;
CORO_END_CONTEXT(_ctx);
@ -1542,20 +1540,20 @@ void RMPointer::Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim
if (_ctx->n == TA_COMBINE) _ctx->n = TA_USE;
// Copy the destination coordinates in the primitive
prim->SetDst(m_pos);
prim->setDst(m_pos);
if (m_pos.x >= 0 && m_pos.y >= 0 && m_pos.x < RM_SX && m_pos.y < RM_SY) {
// Call the Draw method of the poitner
prim->Dst() -= m_hotspot[_ctx->n];
if (m_nCurSpecialPointer == 0) {
CORO_INVOKE_2(m_pointer[_ctx->n]->Draw, bigBuf, prim);
CORO_INVOKE_2(m_pointer[_ctx->n]->draw, bigBuf, prim);
} else {
if (m_nCurSpecialPointer == PTR_CUSTOM)
CORO_INVOKE_2(m_nCurCustomPointer->Draw, bigBuf, prim);
CORO_INVOKE_2(m_nCurCustomPointer->draw, bigBuf, prim);
else
// Call the draw on the special pointer
CORO_INVOKE_2(m_specialPointer[m_nCurSpecialPointer - 1]->Draw, bigBuf, prim);
CORO_INVOKE_2(m_specialPointer[m_nCurSpecialPointer - 1]->draw, bigBuf, prim);
}
}
@ -1564,7 +1562,7 @@ void RMPointer::Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim
void RMPointer::DoFrame(RMGfxTargetBuffer *bigBuf) {
// Add it to the list of primitives
bigBuf->AddPrim(new RMGfxPrimitive(this));
bigBuf->addPrim(new RMGfxPrimitive(this));
// If there is a special pointer, does DoFrame
if (m_nCurSpecialPointer != 0 && m_nCurSpecialPointer != PTR_CUSTOM)

View File

@ -42,7 +42,7 @@ namespace Tony {
assert(raw->IsValid()); \
assert((buf16) == NULL); \
(buf16) = new RMGfxSourceBuffer16(false); \
(buf16)->Init(*raw,raw->Width(),raw->Height()); \
(buf16)->init(*raw,raw->Width(),raw->Height()); \
delete raw;
#define INIT_GFX8_FROMRAW(raw, dwRes, buf8) \
@ -50,7 +50,7 @@ namespace Tony {
assert(raw->IsValid()); \
assert((buf8) == NULL); \
(buf8) = new RMGfxSourceBuffer8RLEByte(); \
(buf8)->Init(*raw, raw->Width(), raw->Height(), true); \
(buf8)->init(*raw, raw->Width(), raw->Height(), true); \
delete raw;
@ -96,7 +96,7 @@ public:
int Priority();
// Overloading draw method
virtual void Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
virtual void draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
// Sets the current co-ordinates
void SetCoord(const RMPoint &pt) {
@ -144,7 +144,7 @@ public:
virtual ~RMOptionButton();
bool DoFrame(const RMPoint &mousePos, bool bLeftClick, bool bRightClick);
virtual void Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
virtual void draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
void AddToList(RMGfxTargetBuffer &bigBuf);
bool IsActive() {
return m_bActive;
@ -173,7 +173,7 @@ public:
virtual ~RMOptionSlide();
bool DoFrame(const RMPoint &mousePos, bool bLeftClick, bool bRightClick);
virtual void Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
virtual void draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
void AddToList(RMGfxTargetBuffer &bigBuf);
int GetValue() {
@ -273,7 +273,7 @@ public:
// Overloaded methods
virtual int Priority();
virtual void Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
virtual void draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
virtual void RemoveThis(CORO_PARAM, bool &result);
// Polling for the option screen

File diff suppressed because it is too large Load Diff

View File

@ -58,10 +58,10 @@ class RMGfxClearTask; // Task
*/
class RMGfxBuffer {
protected:
int m_dimx, m_dimy;
byte *m_buf;
byte *m_origBuf;
bool m_bUseDDraw;
int _dimx, _dimy;
byte *_buf;
byte *_origBuf;
bool _bUseDDraw;
public:
RMGfxBuffer();
@ -69,27 +69,27 @@ public:
virtual ~RMGfxBuffer();
// Attributes
int Dimx() {
return m_dimx;
int getDimx() {
return _dimx;
}
int Dimy() {
return m_dimy;
int getDimy() {
return _dimy;
}
// Creation
virtual void Create(int dimx, int dimy, int nBpp, bool bUseDDraw = false);
virtual void Destroy(void);
virtual void create(int dimx, int dimy, int nBpp, bool bUseDDraw = false);
virtual void destroy(void);
// Buffer access
void Lock(void);
void Unlock(void);
void lock(void);
void unlock(void);
// These are valid only if the buffer is locked
operator byte *();
operator void *();
// Getting the offset for a given Y position
void OffsetY(int nLines, int nBpp);
void offsetY(int nLines, int nBpp);
};
/**
@ -97,116 +97,116 @@ public:
*/
class RMGfxPrimitive {
public:
RMGfxTask *m_task;
RMGfxTask *_task;
protected:
RMRect m_src;
RMRect m_dst;
RMRect _src;
RMRect _dst;
bool m_bStretch;
byte m_bFlag;
bool _bStretch;
byte _bFlag;
public:
RMGfxPrimitive() {
m_bFlag = 0;
m_task = NULL;
m_src.SetEmpty();
m_dst.SetEmpty();
_bFlag = 0;
_task = NULL;
_src.SetEmpty();
_dst.SetEmpty();
}
RMGfxPrimitive(RMGfxTask *task) {
m_task = task;
m_bFlag = 0;
_task = task;
_bFlag = 0;
}
RMGfxPrimitive(RMGfxTask *task, const RMRect &src, RMRect &dst) {
m_task = task;
m_src = src;
m_dst = dst;
m_bFlag = 0;
m_bStretch = (src.Width() != dst.Width() || src.Height() != dst.Height());
_task = task;
_src = src;
_dst = dst;
_bFlag = 0;
_bStretch = (src.Width() != dst.Width() || src.Height() != dst.Height());
}
RMGfxPrimitive(RMGfxTask *task, const RMPoint &src, RMRect &dst) {
m_task = task;
m_src.TopLeft() = src;
m_dst = dst;
m_bFlag = 0;
_task = task;
_src.TopLeft() = src;
_dst = dst;
_bFlag = 0;
}
RMGfxPrimitive(RMGfxTask *task, const RMPoint &src, RMPoint &dst) {
m_task = task;
m_src.TopLeft() = src;
m_dst.TopLeft() = dst;
m_bFlag = 0;
_task = task;
_src.TopLeft() = src;
_dst.TopLeft() = dst;
_bFlag = 0;
}
RMGfxPrimitive(RMGfxTask *task, const RMRect &src, RMPoint &dst) {
m_task = task;
m_src = src;
m_dst.TopLeft() = dst;
m_bFlag = 0;
_task = task;
_src = src;
_dst.TopLeft() = dst;
_bFlag = 0;
}
RMGfxPrimitive(RMGfxTask *task, const RMRect &dst) {
m_task = task;
m_dst = dst;
m_src.SetEmpty();
m_bFlag = 0;
_task = task;
_dst = dst;
_src.SetEmpty();
_bFlag = 0;
}
RMGfxPrimitive(RMGfxTask *task, const RMPoint &dst) {
m_task = task;
m_dst.TopLeft() = dst;
m_src.SetEmpty();
m_bFlag = 0;
_task = task;
_dst.TopLeft() = dst;
_src.SetEmpty();
_bFlag = 0;
}
virtual ~RMGfxPrimitive() { }
void SetFlag(byte bFlag) {
m_bFlag = bFlag;
void setFlag(byte bFlag) {
_bFlag = bFlag;
}
void SetTask(RMGfxTask *task) {
m_task = task;
void setTask(RMGfxTask *task) {
_task = task;
}
void SetSrc(const RMRect &src) {
m_src = src;
void setSrc(const RMRect &src) {
_src = src;
}
void SetSrc(const RMPoint &src) {
m_src.TopLeft() = src;
void setSrc(const RMPoint &src) {
_src.TopLeft() = src;
}
void SetDst(const RMRect &dst) {
m_dst = dst;
void setDst(const RMRect &dst) {
_dst = dst;
}
void SetDst(const RMPoint &dst) {
m_dst.TopLeft() = dst;
void setDst(const RMPoint &dst) {
_dst.TopLeft() = dst;
}
void SetStrecth(bool bStretch) {
m_bStretch = bStretch;
void setStrecth(bool bStretch) {
_bStretch = bStretch;
}
bool HaveDst() {
return !m_dst.IsEmpty();
bool haveDst() {
return !_dst.IsEmpty();
}
RMRect &Dst() {
return m_dst;
return _dst;
}
bool HaveSrc() {
return !m_src.IsEmpty();
bool haveSrc() {
return !_src.IsEmpty();
}
RMRect &Src() {
return m_src;
return _src;
}
// Flags
bool IsFlipped() {
return m_bFlag & 1;
bool isFlipped() {
return _bFlag & 1;
}
// Duplicate
virtual RMGfxPrimitive *Duplicate() {
virtual RMGfxPrimitive *duplicate() {
return new RMGfxPrimitive(*this);
}
};
@ -217,25 +217,25 @@ public:
*/
class RMGfxTask {
protected:
int m_nPrior;
int m_nInList;
int _nPrior;
int _nInList;
public:
// Standard constructor
RMGfxTask();
virtual ~RMGfxTask() { }
virtual int Priority();
virtual void Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim) = 0;
virtual void RemoveThis(CORO_PARAM, bool &result);
virtual int priority();
virtual void draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim) = 0;
virtual void removeThis(CORO_PARAM, bool &result);
// Registration
virtual void Register(void) {
m_nInList++;
_nInList++;
}
virtual void Unregister(void) {
m_nInList--;
assert(m_nInList >= 0);
_nInList--;
assert(_nInList >= 0);
}
};
@ -246,7 +246,7 @@ public:
class RMGfxTaskSetPrior : public RMGfxTask {
public:
virtual ~RMGfxTaskSetPrior() { }
void SetPriority(int nPrior);
void setPriority(int nPrior);
};
@ -258,8 +258,8 @@ public:
virtual ~RMGfxClearTask() { }
int Priority();
virtual void Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
virtual void RemoveThis(CORO_PARAM, bool &result);
virtual void draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
virtual void removeThis(CORO_PARAM, bool &result);
};
@ -274,8 +274,8 @@ public:
virtual ~RMGfxBox() { }
void SetColor(byte r, byte g, byte b);
virtual void Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
virtual void RemoveThis(CORO_PARAM, bool &result);
virtual void draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
virtual void removeThis(CORO_PARAM, bool &result);
};
@ -285,17 +285,17 @@ public:
class RMGfxSourceBuffer : public virtual RMGfxBuffer, public RMGfxTaskSetPrior {
public:
// Load the data for the surface
virtual int Init(uint32 resID, int dimx, int dimy, bool bLoadPalette = false);
virtual int Init(const byte *buf, int dimx, int dimy, bool bLoadPalette = false);
virtual void Init(RMDataStream &ds, int dimx, int dimy, bool bLoadPalette = false);
virtual int init(uint32 resID, int dimx, int dimy, bool bLoadPalette = false);
virtual int init(const byte *buf, int dimx, int dimy, bool bLoadPalette = false);
virtual void init(RMDataStream &ds, int dimx, int dimy, bool bLoadPalette = false);
virtual ~RMGfxSourceBuffer();
protected:
virtual void PrepareImage(void);
bool Clip2D(int &x1, int &y1, int &u, int &v, int &width, int &height, bool bUseSrc, RMGfxTargetBuffer *buf);
void OffsetY(int nLines) {
RMGfxBuffer::OffsetY(nLines, Bpp());
virtual void prepareImage(void);
bool clip2D(int &x1, int &y1, int &u, int &v, int &width, int &height, bool bUseSrc, RMGfxTargetBuffer *buf);
void offsetY(int nLines) {
RMGfxBuffer::offsetY(nLines, Bpp());
}
public:
@ -309,7 +309,7 @@ public:
class RMGfxSourceBuffer16 : public RMGfxSourceBuffer {
protected:
virtual void PrepareImage(void);
bool m_bTrasp0;
bool _bTrasp0;
public:
RMGfxSourceBuffer16(bool bUseTrasp = false);
@ -320,7 +320,7 @@ public:
void Create(int dimx, int dimy, bool bUseDDraw = false);
int Bpp();
virtual void Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
virtual void draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
};
@ -330,22 +330,22 @@ public:
class RMGfxSourceBufferPal : public RMGfxSourceBuffer {
protected:
// The size of the palette is (1 << Bpp()) * 4
byte m_pal[256 * 3];
uint16 m_palFinal[256];
byte _pal[256 * 3];
uint16 _palFinal[256];
// Post process to prepare the palette for drawing
virtual void PreparePalette(void);
virtual void preparePalette(void);
public:
virtual ~RMGfxSourceBufferPal();
virtual int Init(const byte *buf, int dimx, int dimy, bool bLoadPalette = false);
virtual void Init(RMDataStream &ds, int dimx, int dimy, bool bLoadPalette = false);
virtual int init(const byte *buf, int dimx, int dimy, bool bLoadPalette = false);
virtual void init(RMDataStream &ds, int dimx, int dimy, bool bLoadPalette = false);
int LoadPaletteWA(uint32 resID, bool bSwapped = false);
int LoadPaletteWA(const byte *buf, bool bSwapped = false);
int LoadPalette(uint32 resID);
int LoadPalette(const byte *buf);
int loadPaletteWA(uint32 resID, bool bSwapped = false);
int loadPaletteWA(const byte *buf, bool bSwapped = false);
int loadPalette(uint32 resID);
int loadPalette(const byte *buf);
};
@ -354,7 +354,7 @@ public:
*/
class RMGfxSourceBuffer8 : public RMGfxSourceBufferPal {
protected:
bool m_bTrasp0;
bool _bTrasp0;
public:
RMGfxSourceBuffer8(bool bTrasp0 = true);
@ -362,10 +362,10 @@ public:
virtual ~RMGfxSourceBuffer8();
// Initialisation
void Create(int dimx, int dimy, bool bUseDDraw = false);
void create(int dimx, int dimy, bool bUseDDraw = false);
int Bpp();
virtual void Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
virtual void draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
};
@ -374,11 +374,11 @@ public:
*/
class RMGfxSourceBuffer8AB : public RMGfxSourceBuffer8 {
protected:
int CalcTrasp(int f, int b);
int calcTrasp(int f, int b);
public:
virtual ~RMGfxSourceBuffer8AB();
virtual void Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
virtual void draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
};
@ -403,29 +403,29 @@ protected:
virtual void RLEDecompressLineFlipped(uint16 *dst, byte *src, int nStartSkip, int nLength) = 0;
// Perform image compression in RLE
void CompressRLE(void);
void compressRLE(void);
protected:
// Overriding initialisation methods
virtual void PrepareImage(void);
virtual void PreparePalette(void);
virtual void prepareImage(void);
virtual void preparePalette(void);
public:
RMGfxSourceBuffer8RLE();
virtual ~RMGfxSourceBuffer8RLE();
// Overload of the initialisation method
virtual void Init(RMDataStream &ds, int dimx, int dimy, bool bLoadPalette = false);
virtual int Init(const byte *buf, int dimx, int dimy, bool bLoadPalette = false);
virtual void init(RMDataStream &ds, int dimx, int dimy, bool bLoadPalette = false);
virtual int init(const byte *buf, int dimx, int dimy, bool bLoadPalette = false);
// Draw image with RLE decompression
virtual void Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
virtual void draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
// Sets the color that will be alpha blended
void SetAlphaBlendColor(int color);
void setAlphaBlendColor(int color);
// Warn if the data is already compressed
void SetAlreadyCompressed(void);
void setAlreadyCompressed(void);
};
class RMGfxSourceBuffer8RLEByte : public RMGfxSourceBuffer8RLE {
@ -470,50 +470,50 @@ class RMGfxSourceBuffer8AA : public virtual RMGfxSourceBuffer8 {
protected:
static byte MegaAABuf[];
static byte MegaAABuf2[];
byte *m_aabuf;
byte *_aabuf;
// Calculate the buffer for the anti-aliasing
void CalculateAA(void);
void calculateAA(void);
// Draw the AA
void DrawAA(RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
void drawAA(RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
protected:
void PrepareImage(void);
void prepareImage(void);
public:
RMGfxSourceBuffer8AA();
virtual ~RMGfxSourceBuffer8AA();
// Draw with anti-aliasing
virtual void Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
virtual void draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
};
class RMGfxSourceBuffer8RLEByteAA : public RMGfxSourceBuffer8RLEByte, public RMGfxSourceBuffer8AA {
protected:
void PrepareImage(void);
void prepareImage(void);
public:
virtual void Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
virtual void draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
// Overloaded initialisation methods
virtual void Init(RMDataStream &ds, int dimx, int dimy, bool bLoadPalette = false);
virtual int Init(const byte *buf, int dimx, int dimy, bool bLoadPalette = false);
virtual void init(RMDataStream &ds, int dimx, int dimy, bool bLoadPalette = false);
virtual int init(const byte *buf, int dimx, int dimy, bool bLoadPalette = false);
virtual ~RMGfxSourceBuffer8RLEByteAA();
};
class RMGfxSourceBuffer8RLEWordAA : public RMGfxSourceBuffer8RLEWord, public RMGfxSourceBuffer8AA {
protected:
void PrepareImage(void);
void prepareImage(void);
public:
virtual void Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
virtual void draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
// Overloaded initialisation methods
virtual void Init(RMDataStream &ds, int dimx, int dimy, bool bLoadPalette = false);
virtual int Init(byte *buf, int dimx, int dimy, bool bLoadPalette = false);
virtual void init(RMDataStream &ds, int dimx, int dimy, bool bLoadPalette = false);
virtual int init(byte *buf, int dimx, int dimy, bool bLoadPalette = false);
virtual ~RMGfxSourceBuffer8RLEWordAA();
};
@ -531,7 +531,7 @@ public:
void Create(int dimx, int dimy, bool bUseDDraw = false);
int Bpp();
virtual void Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
virtual void draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
};
@ -557,34 +557,34 @@ private:
protected:
OTList *otlist;
int m_otSize;
int _otSize;
public:
RMGfxTargetBuffer();
virtual ~RMGfxTargetBuffer();
// management of the OT list
void ClearOT(void);
void DrawOT(CORO_PARAM);
void AddPrim(RMGfxPrimitive *prim); // The pointer must be delted
void clearOT(void);
void drawOT(CORO_PARAM);
void addPrim(RMGfxPrimitive *prim); // The pointer must be delted
// Adds a task to clear the screen
void AddClearTask(void);
void addClearTask(void);
operator byte *() {
return m_buf;
return _buf;
}
operator void *() {
return (void *)m_buf;
return (void *)_buf;
}
operator uint16 *() {
// FIXME: This may not be endian safe
return (uint16 *)m_buf;
return (uint16 *)_buf;
}
// Offseting buffer
void OffsetY(int nLines) {
RMGfxBuffer::OffsetY(nLines, 16);
void offsetY(int nLines) {
RMGfxBuffer::offsetY(nLines, 16);
}
};
@ -598,7 +598,7 @@ public:
RMGfxWoodyBuffer(int dimx, int dimy, bool bUseDDraw = false);
virtual ~RMGfxWoodyBuffer();
virtual void Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
virtual void draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
};
} // End of namespace Tony

View File

@ -61,8 +61,8 @@ void ExitAllIdles(CORO_PARAM, const void *param) {
RMGfxEngine::RMGfxEngine() {
// Create big buffer where the frame will be rendered
_bigBuf.Create(RM_BBX, RM_BBY, 16);
_bigBuf.OffsetY(RM_SKIPY);
_bigBuf.create(RM_BBX, RM_BBY, 16);
_bigBuf.offsetY(RM_SKIPY);
_csMainLoop = NULL;
_nCurLoc = 0;
@ -84,7 +84,7 @@ RMGfxEngine::RMGfxEngine() {
RMGfxEngine::~RMGfxEngine() {
// Close the buffer
_bigBuf.Destroy();
_bigBuf.destroy();
g_system->deleteMutex(_csMainLoop);
}
@ -312,7 +312,7 @@ SKIPCLICKSINISTRO:
// **********************
// Draw the list in the OT
// **********************
CORO_INVOKE_0(_bigBuf.DrawOT);
CORO_INVOKE_0(_bigBuf.drawOT);
#define FSTEP (480/32)
@ -454,7 +454,7 @@ void RMGfxEngine::unloadLocation(CORO_PARAM, bool bDoOnExit, uint32 *result) {
_bLocationLoaded = false;
_bigBuf.ClearOT();
_bigBuf.clearOT();
_loc.Unload();
if (result != NULL)
@ -468,9 +468,9 @@ void RMGfxEngine::init() {
RMResRaw *raw;
RMGfxSourceBuffer16 *load = NULL;
INIT_GFX16_FROMRAW(20038, load);
_bigBuf.AddPrim(new RMGfxPrimitive(load));
_bigBuf.DrawOT(Common::nullContext);
_bigBuf.ClearOT();
_bigBuf.addPrim(new RMGfxPrimitive(load));
_bigBuf.drawOT(Common::nullContext);
_bigBuf.clearOT();
delete load;
_vm->_window.GetNewFrame(*this, NULL);
@ -502,7 +502,7 @@ void RMGfxEngine::init() {
_point.Init();
// Initialise Tony
_tony.Init();
_tony.init();
_tony.LinkToBoxes(&_vm->_theBoxes);
// Initialise the inventory and the interface
@ -519,7 +519,7 @@ void RMGfxEngine::init() {
}
void RMGfxEngine::close(void) {
_bigBuf.ClearOT();
_bigBuf.clearOT();
_inter.Close();
_inv.Close();

View File

@ -121,7 +121,7 @@ public:
// Link to graphic task
void linkGraphicTask(RMGfxTask *task) {
_bigBuf.AddPrim(new RMGfxPrimitive(task));
_bigBuf.addPrim(new RMGfxPrimitive(task));
};
// Manage a location

View File

@ -79,7 +79,7 @@ void RMInventory::Init(void) {
// Create the main buffer
Create(RM_SX, 68);
SetPriority(185);
setPriority(185);
// Setup the inventory
m_nInv = 0;
@ -122,7 +122,7 @@ void RMInventory::Init(void) {
assert(raw.IsValid());
m_items[i].pointer[j].Init((const byte *)raw, raw.Width(), raw.Height(), true);
m_items[i].pointer[j].init((const byte *)raw, raw.Width(), raw.Height(), true);
curres++;
}
}
@ -156,8 +156,8 @@ void RMInventory::Init(void) {
// Prepare initial inventory
Prepare();
DrawOT(Common::nullContext);
ClearOT();
drawOT(Common::nullContext);
clearOT();
}
void RMInventory::Close(void) {
@ -172,7 +172,7 @@ void RMInventory::Close(void) {
m_items = NULL;
}
Destroy();
destroy();
}
void RMInventory::Reset(void) {
@ -180,7 +180,7 @@ void RMInventory::Reset(void) {
EndCombine();
}
void RMInventory::Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim) {
void RMInventory::draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim) {
CORO_BEGIN_CONTEXT;
RMPoint pos;
RMPoint pos2;
@ -191,12 +191,12 @@ void RMInventory::Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *pr
CORO_BEGIN_CODE(_ctx);
if (m_state == OPENING || m_state == CLOSING)
prim->SetDst(RMPoint(0, m_curPutY));
prim->setDst(RMPoint(0, m_curPutY));
else
prim->SetDst(RMPoint(0, m_curPutY));
prim->setDst(RMPoint(0, m_curPutY));
g_system->lockMutex(m_csModifyInterface);
CORO_INVOKE_2(RMGfxWoodyBuffer::Draw, bigBuf, prim);
CORO_INVOKE_2(RMGfxWoodyBuffer::draw, bigBuf, prim);
g_system->unlockMutex(m_csModifyInterface);
if (m_state == SELECTING) {
@ -209,19 +209,19 @@ void RMInventory::Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *pr
_ctx->pos2.Set((m_nSelectObj + 1) * 64 + 34, 119 - 4);
}
_ctx->p = new RMGfxPrimitive(prim->m_task, _ctx->pos);
_ctx->p2 = new RMGfxPrimitive(prim->m_task, _ctx->pos2);
_ctx->p = new RMGfxPrimitive(prim->_task, _ctx->pos);
_ctx->p2 = new RMGfxPrimitive(prim->_task, _ctx->pos2);
// Draw the mini interface
CORO_INVOKE_2(miniInterface.Draw, bigBuf, _ctx->p);
CORO_INVOKE_2(miniInterface.draw, bigBuf, _ctx->p);
if (GLOBALS.bCfgInterTips) {
if (miniAction == 1) // Examine
CORO_INVOKE_2(m_hints[0].Draw, bigBuf, _ctx->p2);
CORO_INVOKE_2(m_hints[0].draw, bigBuf, _ctx->p2);
else if (miniAction == 2) // Talk
CORO_INVOKE_2(m_hints[1].Draw, bigBuf, _ctx->p2);
CORO_INVOKE_2(m_hints[1].draw, bigBuf, _ctx->p2);
else if (miniAction == 3) // Use
CORO_INVOKE_2(m_hints[2].Draw, bigBuf, _ctx->p2);
CORO_INVOKE_2(m_hints[2].draw, bigBuf, _ctx->p2);
}
delete _ctx->p;
@ -249,8 +249,8 @@ void RMInventory::RemoveItem(int code) {
m_nInv--;
Prepare();
DrawOT(Common::nullContext);
ClearOT();
drawOT(Common::nullContext);
clearOT();
g_system->unlockMutex(m_csModifyInterface);
return;
}
@ -270,8 +270,8 @@ void RMInventory::AddItem(int code) {
m_inv[m_nInv++] = code - 10000;
Prepare();
DrawOT(Common::nullContext);
ClearOT();
drawOT(Common::nullContext);
clearOT();
g_system->unlockMutex(m_csModifyInterface);
}
}
@ -285,8 +285,8 @@ void RMInventory::ChangeItemStatus(uint32 code, uint32 dwStatus) {
m_items[code - 10000].status = dwStatus;
Prepare();
DrawOT(Common::nullContext);
ClearOT();
drawOT(Common::nullContext);
clearOT();
g_system->unlockMutex(m_csModifyInterface);
}
}
@ -297,14 +297,14 @@ void RMInventory::Prepare(void) {
for (i = 1; i < RM_SX / 64 - 1; i++) {
if (i - 1 + m_curPos < m_nInv)
AddPrim(new RMGfxPrimitive(&m_items[m_inv[i - 1 + m_curPos]].icon, RMPoint(i * 64, 0)));
addPrim(new RMGfxPrimitive(&m_items[m_inv[i - 1 + m_curPos]].icon, RMPoint(i * 64, 0)));
else
AddPrim(new RMGfxPrimitive(&m_items[0].icon, RMPoint(i * 64, 0)));
addPrim(new RMGfxPrimitive(&m_items[0].icon, RMPoint(i * 64, 0)));
}
// Frecce
AddPrim(new RMGfxPrimitive(&m_items[29].icon, RMPoint(0, 0)));
AddPrim(new RMGfxPrimitive(&m_items[28].icon, RMPoint(640 - 64, 0)));
addPrim(new RMGfxPrimitive(&m_items[29].icon, RMPoint(0, 0)));
addPrim(new RMGfxPrimitive(&m_items[28].icon, RMPoint(640 - 64, 0)));
}
bool RMInventory::MiniActive(void) {
@ -364,8 +364,8 @@ bool RMInventory::LeftClick(const RMPoint &mpos, int &nCombineObj) {
}
Prepare();
DrawOT(Common::nullContext);
ClearOT();
drawOT(Common::nullContext);
clearOT();
g_system->unlockMutex(m_csModifyInterface);
}
// Click the left arrow
@ -385,8 +385,8 @@ bool RMInventory::LeftClick(const RMPoint &mpos, int &nCombineObj) {
}
Prepare();
DrawOT(Common::nullContext);
ClearOT();
drawOT(Common::nullContext);
clearOT();
g_system->unlockMutex(m_csModifyInterface);
}
@ -430,8 +430,8 @@ void RMInventory::RightClick(const RMPoint &mpos) {
}
Prepare();
DrawOT(Common::nullContext);
ClearOT();
drawOT(Common::nullContext);
clearOT();
g_system->unlockMutex(m_csModifyInterface);
} else if ((m_state == OPENED) && m_bBlinkingLeft) {
assert(m_curPos > 0);
@ -450,8 +450,8 @@ void RMInventory::RightClick(const RMPoint &mpos) {
}
Prepare();
DrawOT(Common::nullContext);
ClearOT();
drawOT(Common::nullContext);
clearOT();
g_system->unlockMutex(m_csModifyInterface);
}
}
@ -484,7 +484,7 @@ void RMInventory::DoFrame(RMGfxTargetBuffer &bigBuf, RMPointer &ptr, RMPoint mpo
if (m_state != CLOSED) {
// Clean up the OT list
g_system->lockMutex(m_csModifyInterface);
ClearOT();
clearOT();
// DoFrame makes all the objects currently in the inventory be displayed
// @@@ Maybe we should do all takeable objects? Please does not help
@ -662,8 +662,8 @@ void RMInventory::DoFrame(RMGfxTargetBuffer &bigBuf, RMPointer &ptr, RMPoint mpo
miniInterface.DoFrame(&bigBuf, false);
}
if ((m_state != CLOSED) && !m_nInList) {
bigBuf.AddPrim(new RMGfxPrimitive(this));
if ((m_state != CLOSED) && !_nInList) {
bigBuf.addPrim(new RMGfxPrimitive(this));
}
}
@ -744,8 +744,8 @@ int RMInventory::LoadState(byte *state) {
m_items[28].icon.SetPattern(1);
Prepare();
DrawOT(Common::nullContext);
ClearOT();
drawOT(Common::nullContext);
clearOT();
return GetSaveStateSize();
}
@ -781,7 +781,7 @@ int RMInterface::OnWhichBox(RMPoint pt) {
return -1;
}
void RMInterface::Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim) {
void RMInterface::draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim) {
CORO_BEGIN_CONTEXT;
int h;
CORO_END_CONTEXT(_ctx);
@ -789,13 +789,13 @@ void RMInterface::Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *pr
CORO_BEGIN_CODE(_ctx);
prim->Dst().TopLeft() = m_openStart;
CORO_INVOKE_2(RMGfxSourceBuffer8RLEByte::Draw, bigBuf, prim);
CORO_INVOKE_2(RMGfxSourceBuffer8RLEByte::draw, bigBuf, prim);
// Check if there is a draw hot zone
_ctx->h = OnWhichBox(m_mpos);
if (_ctx->h != -1) {
prim->Dst().TopLeft() = m_openStart;
CORO_INVOKE_2(m_hotzone[_ctx->h].Draw, bigBuf, prim);
CORO_INVOKE_2(m_hotzone[_ctx->h].draw, bigBuf, prim);
if (m_lastHotZone != _ctx->h) {
m_lastHotZone = _ctx->h;
@ -804,7 +804,7 @@ void RMInterface::Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *pr
if (GLOBALS.bCfgInterTips) {
prim->Dst().TopLeft() = m_openStart + RMPoint(70, 177);
CORO_INVOKE_2(m_hints[_ctx->h].Draw, bigBuf, prim);
CORO_INVOKE_2(m_hints[_ctx->h].draw, bigBuf, prim);
}
} else
m_lastHotZone = -1;
@ -815,8 +815,8 @@ void RMInterface::Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *pr
void RMInterface::DoFrame(RMGfxTargetBuffer &bigBuf, RMPoint mousepos) {
// If needed, add to the OT schedule list
if (!m_nInList && m_bActive)
bigBuf.AddPrim(new RMGfxPrimitive(this));
if (!_nInList && m_bActive)
bigBuf.addPrim(new RMGfxPrimitive(this));
m_mpos = mousepos;
}
@ -826,14 +826,14 @@ void RMInterface::Clicked(const RMPoint &mousepos) {
m_openPos = mousepos;
// Calculate the top left corner of the interface
m_openStart = m_openPos - RMPoint(m_dimx / 2, m_dimy / 2);
m_openStart = m_openPos - RMPoint(_dimx / 2, _dimy / 2);
m_lastHotZone = -1;
// Keep it inside the screen
if (m_openStart.x < 0) m_openStart.x = 0;
if (m_openStart.y < 0) m_openStart.y = 0;
if (m_openStart.x + m_dimx > RM_SX) m_openStart.x = RM_SX - m_dimx;
if (m_openStart.y + m_dimy > RM_SY) m_openStart.y = RM_SY - m_dimy;
if (m_openStart.x + _dimx > RM_SX) m_openStart.x = RM_SX - _dimx;
if (m_openStart.y + _dimy > RM_SY) m_openStart.y = RM_SY - _dimy;
// Play the sound effect
_vm->playUtilSFX(0);
@ -890,16 +890,16 @@ void RMInterface::Init(void) {
RMResRaw inter(RES_I_INTERFACE);
RMRes pal(RES_I_INTERPPAL);
SetPriority(191);
setPriority(191);
RMGfxSourceBuffer::Init(inter, inter.Width(), inter.Height());
LoadPaletteWA(RES_I_INTERPAL);
RMGfxSourceBuffer::init(inter, inter.Width(), inter.Height());
loadPaletteWA(RES_I_INTERPAL);
for (i = 0; i < 5; i++) {
RMResRaw part(RES_I_INTERP1 + i);
m_hotzone[i].Init(part, part.Width(), part.Height());
m_hotzone[i].LoadPaletteWA(pal);
m_hotzone[i].init(part, part.Width(), part.Height());
m_hotzone[i].loadPaletteWA(pal);
}
m_hotbbox[0].SetRect(126, 123, 159, 208); // Take
@ -935,10 +935,10 @@ void RMInterface::Init(void) {
void RMInterface::Close(void) {
int i;
Destroy();
destroy();
for (i = 0; i < 5; i++)
m_hotzone[i].Destroy();
m_hotzone[i].destroy();
}
} // End of namespace Tony

View File

@ -101,7 +101,7 @@ public:
virtual void RemoveThis(CORO_PARAM, bool &result);
// Overload the drawing of the inventory
virtual void Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
virtual void draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
// Method for determining whether the inventory currently has the focus
bool HaveFocus(const RMPoint &mpos);
@ -193,7 +193,7 @@ public:
bool GetPalesati(void);
// Overloaded Draw
virtual void Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
virtual void draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
};
} // End of namespace Tony

View File

@ -356,15 +356,15 @@ void RMSprite::ReadFromStream(RMDataStream &ds, bool bLOX) {
ds += 32;
// Create buffer and read
m_buf->Init(ds, dimx, dimy);
m_buf->init(ds, dimx, dimy);
}
void RMSprite::Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim) {
m_buf->Draw(coroParam, bigBuf, prim);
void RMSprite::draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim) {
m_buf->draw(coroParam, bigBuf, prim);
}
void RMSprite::SetPalette(byte *buf) {
((RMGfxSourceBufferPal *)m_buf)->LoadPalette(buf);
((RMGfxSourceBufferPal *)m_buf)->loadPalette(buf);
}
RMSprite::RMSprite() {
@ -500,9 +500,9 @@ RMGfxSourceBuffer *RMItem::NewItemSpriteBuffer(int dimx, int dimy, bool bPreRLE)
else
spr = new RMGfxSourceBuffer8RLEByteAA;
spr->SetAlphaBlendColor(m_FXparm);
spr->setAlphaBlendColor(m_FXparm);
if (bPreRLE)
spr->SetAlreadyCompressed();
spr->setAlreadyCompressed();
} else {
if (dimx == -1 || dimx > 255)
spr = new RMGfxSourceBuffer8RLEWord;
@ -510,7 +510,7 @@ RMGfxSourceBuffer *RMItem::NewItemSpriteBuffer(int dimx, int dimy, bool bPreRLE)
spr = new RMGfxSourceBuffer8RLEByte;
if (bPreRLE)
spr->SetAlreadyCompressed();
spr->setAlreadyCompressed();
}
return spr;
@ -675,8 +675,8 @@ bool RMItem::DoFrame(RMGfxTargetBuffer *bigBuf, bool bAddToList) {
}
// If we are not in the OT list, add ourselves
if (!m_nInList && bAddToList)
bigBuf->AddPrim(NewItemPrimitive());
if (!_nInList && bAddToList)
bigBuf->addPrim(NewItemPrimitive());
return oldSprite != m_nCurSprite;
}
@ -685,7 +685,7 @@ RMPoint RMItem::CalculatePos(void) {
return m_pos + m_patterns[m_nCurPattern].Pos();
}
void RMItem::Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim) {
void RMItem::draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim) {
CORO_BEGIN_CONTEXT;
CORO_END_CONTEXT(_ctx);
@ -696,7 +696,7 @@ void RMItem::Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim) {
return;
// Set the flag
prim->SetFlag(m_bCurFlag);
prim->setFlag(m_bCurFlag);
// Offset direction for scrolling
prim->Dst().Offset(-m_curScroll);
@ -706,10 +706,10 @@ void RMItem::Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim) {
prim->Dst().Offset(CalculatePos());
// No stretching, please
prim->SetStrecth(false);
prim->setStrecth(false);
// Now we turn to the generic surface drawing routines
CORO_INVOKE_2(m_sprites[m_nCurSprite].Draw, bigBuf, prim);
CORO_INVOKE_2(m_sprites[m_nCurSprite].draw, bigBuf, prim);
CORO_END_CODE;
}
@ -867,7 +867,7 @@ int RMWipe::Priority(void) {
void RMWipe::Unregister(void) {
RMGfxTask::Unregister();
assert(m_nInList == 0);
assert(_nInList == 0);
CoroScheduler.setEvent(m_hUnregistered);
}
@ -919,7 +919,7 @@ void RMWipe::InitFade(int type) {
void RMWipe::DoFrame(RMGfxTargetBuffer &bigBuf) {
if (m_bMustRegister) {
bigBuf.AddPrim(new RMGfxPrimitive(this));
bigBuf.addPrim(new RMGfxPrimitive(this));
m_bMustRegister = false;
}
@ -934,18 +934,18 @@ void RMWipe::DoFrame(RMGfxTargetBuffer &bigBuf) {
}
}
void RMWipe::Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim) {
void RMWipe::draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim) {
CORO_BEGIN_CONTEXT;
CORO_END_CONTEXT(_ctx);
CORO_BEGIN_CODE(_ctx);
if (m_bFading) {
CORO_INVOKE_2(m_wip0r.Draw, bigBuf, prim);
CORO_INVOKE_2(m_wip0r.draw, bigBuf, prim);
}
if (m_bEndFade)
Common::fill((byte *)bigBuf, (byte *)bigBuf + bigBuf.Dimx() * bigBuf.Dimy() * 2, 0x0);
Common::fill((byte *)bigBuf, (byte *)bigBuf + bigBuf.getDimx() * bigBuf.getDimy() * 2, 0x0);
CORO_END_CODE;
}
@ -1332,7 +1332,7 @@ RMPoint RMCharacter::NearestHotSpot(int sourcebox, int destbox) {
return puntocaldo;
}
void RMCharacter::Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim) {
void RMCharacter::draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim) {
CORO_BEGIN_CONTEXT;
CORO_END_CONTEXT(_ctx);
@ -1341,7 +1341,7 @@ void RMCharacter::Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *pr
if (bDrawNow) {
prim->Dst() += m_fixedScroll;
CORO_INVOKE_2(RMItem::Draw, bigBuf, prim);
CORO_INVOKE_2(RMItem::draw, bigBuf, prim);
}
CORO_END_CODE;
@ -2072,7 +2072,7 @@ bool RMLocation::Load(RMDataStream &ds) {
};
// Initialise the surface, loading the palette if necessary
m_buf->Init(ds, dimx, dimy, true);
m_buf->init(ds, dimx, dimy, true);
// Check the size of the location
// assert(dimy!=512);
@ -2119,7 +2119,7 @@ bool RMLocation::LoadLOX(RMDataStream &ds) {
m_buf = new RMGfxSourceBuffer16;
// Initialise the surface, loading in the palette if necessary
m_buf->Init(ds, dimx, dimy, true);
m_buf->init(ds, dimx, dimy, true);
// Number of items
ds >> m_nItems;
@ -2138,21 +2138,21 @@ bool RMLocation::LoadLOX(RMDataStream &ds) {
/**
* Draw method overloaded from RMGfxSourceBUffer8
*/
void RMLocation::Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim) {
void RMLocation::draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim) {
CORO_BEGIN_CONTEXT;
CORO_END_CONTEXT(_ctx);
CORO_BEGIN_CODE(_ctx);
// Set the position of the source scrolling
if (m_buf->Dimy() > RM_SY || m_buf->Dimx() > RM_SX) {
prim->SetSrc(RMRect(m_curScroll, m_curScroll + RMPoint(640, 480)));
if (m_buf->getDimy() > RM_SY || m_buf->getDimx() > RM_SX) {
prim->setSrc(RMRect(m_curScroll, m_curScroll + RMPoint(640, 480)));
}
prim->SetDst(m_fixedScroll);
prim->setDst(m_fixedScroll);
// Invoke the drawing method fo the image class, which will draw the location background
CORO_INVOKE_2(m_buf->Draw, bigBuf, prim);
CORO_INVOKE_2(m_buf->draw, bigBuf, prim);
CORO_END_CODE;
}
@ -2165,8 +2165,8 @@ void RMLocation::DoFrame(RMGfxTargetBuffer *bigBuf) {
int i;
// If the location is not in the OT list, add it in
if (!m_nInList)
bigBuf->AddPrim(new RMGfxPrimitive(this));
if (!_nInList)
bigBuf->addPrim(new RMGfxPrimitive(this));
// Process all the location items
for (i = 0; i < m_nItems; i++)
@ -2231,7 +2231,7 @@ void RMLocation::UpdateScrolling(const RMPoint &ptShowThis) {
m_curScroll.x = ptShowThis.x - 250;
} else if (m_curScroll.x + RM_SX - 250 < ptShowThis.x) {
m_curScroll.x = ptShowThis.x + 250 - RM_SX;
} else if (ABS(m_curScroll.x + RM_SX / 2 - ptShowThis.x) > 32 && m_buf->Dimx() > RM_SX) {
} else if (ABS(m_curScroll.x + RM_SX / 2 - ptShowThis.x) > 32 && m_buf->getDimx() > RM_SX) {
if (m_curScroll.x + RM_SX / 2 < ptShowThis.x)
m_curScroll.x++;
else
@ -2242,17 +2242,21 @@ void RMLocation::UpdateScrolling(const RMPoint &ptShowThis) {
m_curScroll.y = ptShowThis.y - 180;
} else if (m_curScroll.y + RM_SY - 180 < ptShowThis.y) {
m_curScroll.y = ptShowThis.y + 180 - RM_SY;
} else if (ABS(m_curScroll.y + RM_SY / 2 - ptShowThis.y) > 16 && m_buf->Dimy() > RM_SY) {
} else if (ABS(m_curScroll.y + RM_SY / 2 - ptShowThis.y) > 16 && m_buf->getDimy() > RM_SY) {
if (m_curScroll.y + RM_SY / 2 < ptShowThis.y)
m_curScroll.y++;
else
m_curScroll.y--;
}
if (m_curScroll.x < 0) m_curScroll.x = 0;
if (m_curScroll.y < 0) m_curScroll.y = 0;
if (m_curScroll.x + RM_SX > m_buf->Dimx()) m_curScroll.x = m_buf->Dimx() - RM_SX;
if (m_curScroll.y + RM_SY > m_buf->Dimy()) m_curScroll.y = m_buf->Dimy() - RM_SY;
if (m_curScroll.x < 0)
m_curScroll.x = 0;
if (m_curScroll.y < 0)
m_curScroll.y = 0;
if (m_curScroll.x + RM_SX > m_buf->getDimx())
m_curScroll.x = m_buf->getDimx() - RM_SX;
if (m_curScroll.y + RM_SY > m_buf->getDimy())
m_curScroll.y = m_buf->getDimy() - RM_SY;
if (oldScroll != m_curScroll)
for (int i = 0; i < m_nItems; i++)
@ -2268,10 +2272,14 @@ void RMLocation::SetFixedScroll(const RMPoint &scroll) {
void RMLocation::SetScrollPosition(const RMPoint &scroll) {
RMPoint pt = scroll;
if (pt.x < 0) pt.x = 0;
if (pt.y < 0) pt.y = 0;
if (pt.x + RM_SX > m_buf->Dimx()) pt.x = m_buf->Dimx() - RM_SX;
if (pt.y + RM_SY > m_buf->Dimy()) pt.y = m_buf->Dimy() - RM_SY;
if (pt.x < 0)
pt.x = 0;
if (pt.y < 0)
pt.y = 0;
if (pt.x + RM_SX > m_buf->getDimx())
pt.x = m_buf->getDimx() - RM_SX;
if (pt.y + RM_SY > m_buf->getDimy())
pt.y = m_buf->getDimy() - RM_SY;
m_curScroll = pt;

View File

@ -186,7 +186,7 @@ public:
void Init(RMGfxSourceBuffer *buf);
friend RMDataStream &operator>>(RMDataStream &ds, RMSprite &sprite);
virtual void Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
virtual void draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
void SetPalette(byte *lpBuf);
void GetSizeFromStream(RMDataStream &ds, int *dimx, int *dimy);
void LOXGetSizeFromStream(RMDataStream &ds, int *dimx, int *dimy);
@ -254,7 +254,7 @@ public:
virtual void RemoveThis(CORO_PARAM, bool &result);
// Overloaded Draw
virtual void Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
virtual void draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
// Overloaded priority: it's based on Z ordering
virtual int Priority() {
@ -460,7 +460,7 @@ public:
void DoFrame(CORO_PARAM, RMGfxTargetBuffer *bigBuf, int loc);
// Overloaded draw
virtual void Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
virtual void draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
// TRUE if you just stopped
bool EndOfPath() {
@ -510,7 +510,7 @@ public:
virtual ~RMWipe();
void DoFrame(RMGfxTargetBuffer &bigBuf);
virtual void Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
virtual void draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
void InitFade(int type);
void CloseFade(void);
@ -566,7 +566,7 @@ public:
void Unload(void);
// Overloaded draw
virtual void Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
virtual void draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
// Prepare a frame by drawing the location and all it's items
void DoFrame(RMGfxTargetBuffer *bigBuf);

View File

@ -104,14 +104,14 @@ Common::ErrorCode TonyEngine::init() {
_startTime = g_system->getMillis();
// Init static class fields
RMText::InitStatics();
RMTony::InitStatics();
RMText::initStatics();
RMTony::initStatics();
// Reset the scheduler
CoroScheduler.reset();
// Initialise the graphics window
_window.Init();
_window.init();
// Initialise the function list
Common::fill(_funcList, _funcList + 300, (LPCUSTOMFUNCTION)NULL);

View File

@ -40,7 +40,7 @@ namespace Tony {
bool RMTony::m_bAction = false;
void RMTony::InitStatics() {
void RMTony::initStatics() {
m_bAction = false;
}
@ -82,13 +82,13 @@ RMGfxSourceBuffer *RMTony::NewItemSpriteBuffer(int dimx, int dimy, bool bPreRLE)
assert(m_cm == CM_256);
spr = new RMGfxSourceBuffer8RLEByteAA;
spr->SetAlphaBlendColor(1);
spr->setAlphaBlendColor(1);
if (bPreRLE)
spr->SetAlreadyCompressed();
spr->setAlreadyCompressed();
return spr;
}
void RMTony::Init(void) {
void RMTony::init(void) {
RMRes tony(0);
RMRes body(9999);
RMDataStream ds;
@ -125,7 +125,7 @@ void RMTony::Init(void) {
void RMTony::Close(void) {
// Disalloca @@@ Deallocation of missing item
m_ombra.Destroy();
m_ombra.destroy();
}
void RMTony::DoFrame(CORO_PARAM, RMGfxTargetBuffer *bigBuf, int curLoc) {
@ -135,8 +135,8 @@ void RMTony::DoFrame(CORO_PARAM, RMGfxTargetBuffer *bigBuf, int curLoc) {
CORO_BEGIN_CODE(_ctx);
if (!m_nInList && m_bShow)
bigBuf->AddPrim(new RMGfxPrimitive(this));
if (!_nInList && m_bShow)
bigBuf->addPrim(new RMGfxPrimitive(this));
SetSpeed(GLOBALS.nCfgTonySpeed);
@ -172,7 +172,7 @@ void RMTony::Hide(bool bShowOmbra) {
}
void RMTony::Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim) {
void RMTony::draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim) {
CORO_BEGIN_CONTEXT;
CORO_END_CONTEXT(_ctx);
@ -185,7 +185,7 @@ void RMTony::Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim) {
prim->Dst().Offset(-44, -134);
if (m_bPastorella)
prim->Dst().Offset(1, 4);
CORO_INVOKE_2(RMCharacter::Draw, bigBuf, prim);
CORO_INVOKE_2(RMCharacter::draw, bigBuf, prim);
}
if (m_bIsTalking || m_bIsStaticTalk) {
@ -195,7 +195,7 @@ void RMTony::Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim) {
prim->Dst().Offset(m_pos);
prim->Dst().Offset(-44, -134);
prim->Dst() += m_nBodyOffset;
CORO_INVOKE_2(m_body.Draw, bigBuf, prim);
CORO_INVOKE_2(m_body.draw, bigBuf, prim);
}
if (!m_bCorpoDavanti) {
@ -203,7 +203,7 @@ void RMTony::Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim) {
prim->Dst().Offset(-44, -134);
if (m_bPastorella)
prim->Dst().Offset(0, 3);
CORO_INVOKE_2(RMCharacter::Draw, bigBuf, prim);
CORO_INVOKE_2(RMCharacter::draw, bigBuf, prim);
}
}

View File

@ -358,11 +358,11 @@ public:
};
public:
static void InitStatics();
static void initStatics();
RMTony();
// Initialise Tony
void Init(void);
void init(void);
// Free all memory
void Close(void);
@ -371,7 +371,7 @@ public:
void DoFrame(CORO_PARAM, RMGfxTargetBuffer *bigBuf, int curLoc);
// Draw method, which controls chararacter display
virtual void Draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
virtual void draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
// Show or hide
void Show(void);

View File

@ -51,7 +51,7 @@ RMWindow::~RMWindow() {
/**
* Initialises the graphics window
*/
void RMWindow::Init() {
void RMWindow::init() {
Graphics::PixelFormat pixelFormat(2, 5, 5, 5, 0, 10, 5, 0, 0);
initGraphics(RM_SX, RM_SY, true, &pixelFormat);

View File

@ -79,8 +79,8 @@ public:
~RMWindow();
// Initialisation
void Init(/*HINSTANCE hInst*/);
void InitDirectDraw(void);
void init(/*HINSTANCE hInst*/);
void initDirectDraw(void);
void Close(void);
// Drawing