aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/tony/custom.cpp253
-rw-r--r--engines/tony/debugger.cpp4
-rw-r--r--engines/tony/font.cpp14
-rw-r--r--engines/tony/game.h2
-rw-r--r--engines/tony/gfxengine.cpp68
-rw-r--r--engines/tony/inventory.cpp60
-rw-r--r--engines/tony/inventory.h4
-rw-r--r--engines/tony/loc.cpp1077
-rw-r--r--engines/tony/loc.h326
-rw-r--r--engines/tony/tony.cpp4
-rw-r--r--engines/tony/tonychar.cpp677
-rw-r--r--engines/tony/tonychar.h120
12 files changed, 1299 insertions, 1310 deletions
diff --git a/engines/tony/custom.cpp b/engines/tony/custom.cpp
index 2725f2565e..d42ef94a17 100644
--- a/engines/tony/custom.cpp
+++ b/engines/tony/custom.cpp
@@ -109,7 +109,7 @@ const char *staccFileNames[] = {
void ReapplyChangedHotspot(void) {
int i;
for (i = 0; i < GLOBALS.curChangedHotspot; i++)
- GLOBALS.Loc->GetItemFromCode(GLOBALS.ChangedHotspot[i].dwCode)->ChangeHotspot(RMPoint(GLOBALS.ChangedHotspot[i].nX, GLOBALS.ChangedHotspot[i].nY));
+ GLOBALS.Loc->getItemFromCode(GLOBALS.ChangedHotspot[i].dwCode)->changeHotspot(RMPoint(GLOBALS.ChangedHotspot[i].nX, GLOBALS.ChangedHotspot[i].nY));
}
void SaveChangedHotspot(Common::OutSaveFile *f) {
@@ -141,9 +141,9 @@ void LoadChangedHotspot(Common::InSaveFile *f) {
*/
void MCharResetCodes(void) {
for (int i = 0; i < 10; i++)
- GLOBALS.MCharacter[i].item = GLOBALS.Loc->GetItemFromCode(GLOBALS.MCharacter[i].code);
+ GLOBALS.MCharacter[i].item = GLOBALS.Loc->getItemFromCode(GLOBALS.MCharacter[i].code);
for (int i = 0; i < 10; i++)
- GLOBALS.Character[i].item = GLOBALS.Loc->GetItemFromCode(GLOBALS.Character[i].code);
+ GLOBALS.Character[i].item = GLOBALS.Loc->getItemFromCode(GLOBALS.Character[i].code);
}
void CharsSaveAll(Common::OutSaveFile *f) {
@@ -168,19 +168,19 @@ void CharsLoadAll(Common::InSaveFile *f) {
}
DECLARE_CUSTOM_FUNCTION(FaceToMe)(CORO_PARAM, uint32, uint32, uint32, uint32) {
- GLOBALS.Tony->SetPattern(GLOBALS.Tony->PAT_STANDDOWN);
+ GLOBALS.Tony->setPattern(GLOBALS.Tony->PAT_STANDDOWN);
}
DECLARE_CUSTOM_FUNCTION(BackToMe)(CORO_PARAM, uint32, uint32, uint32, uint32) {
- GLOBALS.Tony->SetPattern(GLOBALS.Tony->PAT_STANDUP);
+ GLOBALS.Tony->setPattern(GLOBALS.Tony->PAT_STANDUP);
}
DECLARE_CUSTOM_FUNCTION(LeftToMe)(CORO_PARAM, uint32, uint32, uint32, uint32) {
- GLOBALS.Tony->SetPattern(GLOBALS.Tony->PAT_STANDLEFT);
+ GLOBALS.Tony->setPattern(GLOBALS.Tony->PAT_STANDLEFT);
}
DECLARE_CUSTOM_FUNCTION(RightToMe)(CORO_PARAM, uint32, uint32, uint32, uint32) {
- GLOBALS.Tony->SetPattern(GLOBALS.Tony->PAT_STANDRIGHT);
+ GLOBALS.Tony->setPattern(GLOBALS.Tony->PAT_STANDRIGHT);
}
@@ -263,8 +263,8 @@ DECLARE_CUSTOM_FUNCTION(SendTonyMessage)(CORO_PARAM, uint32 dwMessage, uint32 nX
if (GLOBALS.bSkipIdle) return;
- _ctx->msg.Load(dwMessage);
- if (!_ctx->msg.IsValid()) {
+ _ctx->msg.load(dwMessage);
+ if (!_ctx->msg.isValid()) {
return;
}
@@ -285,15 +285,15 @@ DECLARE_CUSTOM_FUNCTION(SendTonyMessage)(CORO_PARAM, uint32 dwMessage, uint32 nX
}
if (GLOBALS.nTonyNextTalkType != GLOBALS.Tony->TALK_NORMAL) {
- CORO_INVOKE_1(GLOBALS.Tony->StartTalk, GLOBALS.nTonyNextTalkType);
+ CORO_INVOKE_1(GLOBALS.Tony->startTalk, GLOBALS.nTonyNextTalkType);
if (!GLOBALS.bStaticTalk)
GLOBALS.nTonyNextTalkType = GLOBALS.Tony->TALK_NORMAL;
} else {
- if (_ctx->msg.NumPeriods() > 1)
- CORO_INVOKE_1(GLOBALS.Tony->StartTalk, GLOBALS.Tony->TALK_FIANCHI);
+ if (_ctx->msg.numPeriods() > 1)
+ CORO_INVOKE_1(GLOBALS.Tony->startTalk, GLOBALS.Tony->TALK_FIANCHI);
else
- CORO_INVOKE_1(GLOBALS.Tony->StartTalk, GLOBALS.Tony->TALK_NORMAL);
+ CORO_INVOKE_1(GLOBALS.Tony->startTalk, GLOBALS.Tony->TALK_NORMAL);
}
if (GLOBALS.curBackText)
@@ -301,7 +301,7 @@ DECLARE_CUSTOM_FUNCTION(SendTonyMessage)(CORO_PARAM, uint32 dwMessage, uint32 nX
GLOBALS.bTonyIsSpeaking = true;
- for (_ctx->i = 0; _ctx->i < _ctx->msg.NumPeriods() && !GLOBALS.bSkipIdle; _ctx->i++) {
+ for (_ctx->i = 0; _ctx->i < _ctx->msg.numPeriods() && !GLOBALS.bSkipIdle; _ctx->i++) {
_ctx->text.setInput(GLOBALS.Input);
// Alignment
@@ -315,9 +315,9 @@ DECLARE_CUSTOM_FUNCTION(SendTonyMessage)(CORO_PARAM, uint32 dwMessage, uint32 nX
// Set the position
if (nX == 0 && nY == 0)
- _ctx->text.setPosition(GLOBALS.Tony->Position() - RMPoint(0, 130) - GLOBALS.Loc->ScrollPosition());
+ _ctx->text.setPosition(GLOBALS.Tony->position() - RMPoint(0, 130) - GLOBALS.Loc->scrollPosition());
else
- _ctx->text.setPosition(RMPoint(nX, nY) - GLOBALS.Loc->ScrollPosition());
+ _ctx->text.setPosition(RMPoint(nX, nY) - GLOBALS.Loc->scrollPosition());
// Handling for always display
if (GLOBALS.bAlwaysDisplay) {
@@ -359,13 +359,13 @@ DECLARE_CUSTOM_FUNCTION(SendTonyMessage)(CORO_PARAM, uint32 dwMessage, uint32 nX
if (GLOBALS.curBackText)
GLOBALS.curBackText->show();
- CORO_INVOKE_0(GLOBALS.Tony->EndTalk);
+ CORO_INVOKE_0(GLOBALS.Tony->endTalk);
CORO_END_CODE;
}
DECLARE_CUSTOM_FUNCTION(ChangeBoxStatus)(CORO_PARAM, uint32 nLoc, uint32 nBox, uint32 nStatus, uint32) {
- GLOBALS.Boxes->ChangeBoxStatus(nLoc, nBox, nStatus);
+ GLOBALS.Boxes->changeBoxStatus(nLoc, nBox, nStatus);
}
@@ -408,16 +408,16 @@ DECLARE_CUSTOM_FUNCTION(SendFullscreenMsgStart)(CORO_PARAM, uint32 nMsg, uint32
_ctx->msg = new RMMessage(nMsg);
GLOBALS.SFM_nLoc = GLOBALS.Loc->TEMPGetNumLoc();
- GLOBALS.SFM_pt = GLOBALS.Tony->Position();
+ GLOBALS.SFM_pt = GLOBALS.Tony->position();
if (GLOBALS.bSkipIdle)
return;
CORO_INVOKE_2(GLOBALS.UnloadLocation, false, NULL);
- GLOBALS.Tony->Hide();
+ GLOBALS.Tony->hide();
GLOBALS.Unfreeze();
- for (_ctx->i = 0; _ctx->i < _ctx->msg->NumPeriods() && !GLOBALS.bSkipIdle; _ctx->i++) {
+ for (_ctx->i = 0; _ctx->i < _ctx->msg->numPeriods() && !GLOBALS.bSkipIdle; _ctx->i++) {
_ctx->text.setInput(GLOBALS.Input);
// Alignment
@@ -474,7 +474,7 @@ DECLARE_CUSTOM_FUNCTION(SendFullscreenMsgEnd)(CORO_PARAM, uint32 bNotEnableTony,
GLOBALS.Freeze();
GLOBALS.LoadLocation(GLOBALS.SFM_nLoc, RMPoint(GLOBALS.SFM_pt.x, GLOBALS.SFM_pt.y), RMPoint(-1, -1));
if (!bNotEnableTony)
- GLOBALS.Tony->Show();
+ GLOBALS.Tony->show();
GLOBALS.Unfreeze();
MCharResetCodes();
@@ -578,7 +578,7 @@ DECLARE_CUSTOM_FUNCTION(SetLocStartPosition)(CORO_PARAM, uint32 nLoc, uint32 lX,
}
DECLARE_CUSTOM_FUNCTION(SaveTonyPosition)(CORO_PARAM, uint32, uint32, uint32, uint32) {
- GLOBALS.saveTonyPos = GLOBALS.Tony->Position();
+ GLOBALS.saveTonyPos = GLOBALS.Tony->position();
GLOBALS.saveTonyLoc = GLOBALS.Loc->TEMPGetNumLoc();
}
@@ -604,7 +604,7 @@ DECLARE_CUSTOM_FUNCTION(EnableInput)(CORO_PARAM, uint32, uint32, uint32, uint32)
}
DECLARE_CUSTOM_FUNCTION(StopTony)(CORO_PARAM, uint32, uint32, uint32, uint32) {
- GLOBALS.Tony->StopNoAction(coroParam);
+ GLOBALS.Tony->stopNoAction(coroParam);
}
DECLARE_CUSTOM_FUNCTION(CustEnableGUI)(CORO_PARAM, uint32, uint32, uint32, uint32) {
@@ -624,11 +624,11 @@ void TonyGenericTake1(CORO_PARAM, uint32 nDirection) {
CORO_BEGIN_CODE(_ctx);
GLOBALS.Freeze();
- GLOBALS.Tony->Take(nDirection, 0);
+ GLOBALS.Tony->take(nDirection, 0);
GLOBALS.Unfreeze();
if (!GLOBALS.bSkipIdle)
- CORO_INVOKE_0(GLOBALS.Tony->WaitForEndPattern);
+ CORO_INVOKE_0(GLOBALS.Tony->waitForEndPattern);
CORO_END_CODE;
}
@@ -640,14 +640,14 @@ void TonyGenericTake2(CORO_PARAM, uint32 nDirection) {
CORO_BEGIN_CODE(_ctx);
GLOBALS.Freeze();
- GLOBALS.Tony->Take(nDirection, 1);
+ GLOBALS.Tony->take(nDirection, 1);
GLOBALS.Unfreeze();
if (!GLOBALS.bSkipIdle)
- CORO_INVOKE_0(GLOBALS.Tony->WaitForEndPattern);
+ CORO_INVOKE_0(GLOBALS.Tony->waitForEndPattern);
GLOBALS.Freeze();
- GLOBALS.Tony->Take(nDirection, 2);
+ GLOBALS.Tony->take(nDirection, 2);
GLOBALS.Unfreeze();
CORO_END_CODE;
@@ -660,11 +660,11 @@ void TonyGenericPut1(CORO_PARAM, uint32 nDirection) {
CORO_BEGIN_CODE(_ctx);
GLOBALS.Freeze();
- GLOBALS.Tony->Put(nDirection, 0);
+ GLOBALS.Tony->put(nDirection, 0);
GLOBALS.Unfreeze();
if (!GLOBALS.bSkipIdle)
- CORO_INVOKE_0(GLOBALS.Tony->WaitForEndPattern);
+ CORO_INVOKE_0(GLOBALS.Tony->waitForEndPattern);
CORO_END_CODE;
}
@@ -676,14 +676,14 @@ void TonyGenericPut2(CORO_PARAM, uint32 nDirection) {
CORO_BEGIN_CODE(_ctx);
GLOBALS.Freeze();
- GLOBALS.Tony->Put(nDirection, 1);
+ GLOBALS.Tony->put(nDirection, 1);
GLOBALS.Unfreeze();
if (!GLOBALS.bSkipIdle)
- CORO_INVOKE_0(GLOBALS.Tony->WaitForEndPattern);
+ CORO_INVOKE_0(GLOBALS.Tony->waitForEndPattern);
GLOBALS.Freeze();
- GLOBALS.Tony->Put(nDirection, 2);
+ GLOBALS.Tony->put(nDirection, 2);
GLOBALS.Unfreeze();
CORO_END_CODE;
@@ -749,9 +749,9 @@ DECLARE_CUSTOM_FUNCTION(TonyPutDown2)(CORO_PARAM, uint32, uint32, uint32, uint32
DECLARE_CUSTOM_FUNCTION(TonyPerTerra)(CORO_PARAM, uint32 dwParte, uint32, uint32, uint32) {
if (dwParte == 0)
- GLOBALS.Tony->SetPattern(GLOBALS.Tony->PAT_PERTERRALEFT);
+ GLOBALS.Tony->setPattern(GLOBALS.Tony->PAT_PERTERRALEFT);
else
- GLOBALS.Tony->SetPattern(GLOBALS.Tony->PAT_PERTERRARIGHT);
+ GLOBALS.Tony->setPattern(GLOBALS.Tony->PAT_PERTERRARIGHT);
}
DECLARE_CUSTOM_FUNCTION(TonySiRialza)(CORO_PARAM, uint32 dwParte, uint32, uint32, uint32) {
@@ -761,18 +761,18 @@ DECLARE_CUSTOM_FUNCTION(TonySiRialza)(CORO_PARAM, uint32 dwParte, uint32, uint32
CORO_BEGIN_CODE(_ctx);
if (dwParte == 0)
- GLOBALS.Tony->SetPattern(GLOBALS.Tony->PAT_SIRIALZALEFT);
+ GLOBALS.Tony->setPattern(GLOBALS.Tony->PAT_SIRIALZALEFT);
else
- GLOBALS.Tony->SetPattern(GLOBALS.Tony->PAT_SIRIALZARIGHT);
+ GLOBALS.Tony->setPattern(GLOBALS.Tony->PAT_SIRIALZARIGHT);
if (!GLOBALS.bSkipIdle)
- CORO_INVOKE_0(GLOBALS.Tony->WaitForEndPattern);
+ CORO_INVOKE_0(GLOBALS.Tony->waitForEndPattern);
CORO_END_CODE;
}
DECLARE_CUSTOM_FUNCTION(TonyPastorella)(CORO_PARAM, uint32 bIsPast, uint32, uint32, uint32) {
- GLOBALS.Tony->SetPastorella(bIsPast);
+ GLOBALS.Tony->setPastorella(bIsPast);
}
DECLARE_CUSTOM_FUNCTION(TonyFischietto)(CORO_PARAM, uint32, uint32, uint32, uint32) {
@@ -781,11 +781,11 @@ DECLARE_CUSTOM_FUNCTION(TonyFischietto)(CORO_PARAM, uint32, uint32, uint32, uint
CORO_BEGIN_CODE(_ctx);
- GLOBALS.Tony->SetPattern(GLOBALS.Tony->PAT_FISCHIETTORIGHT);
+ GLOBALS.Tony->setPattern(GLOBALS.Tony->PAT_FISCHIETTORIGHT);
if (!GLOBALS.bSkipIdle)
- CORO_INVOKE_0(GLOBALS.Tony->WaitForEndPattern);
+ CORO_INVOKE_0(GLOBALS.Tony->waitForEndPattern);
- GLOBALS.Tony->SetPattern(GLOBALS.Tony->PAT_STANDRIGHT);
+ GLOBALS.Tony->setPattern(GLOBALS.Tony->PAT_STANDRIGHT);
CORO_END_CODE;
}
@@ -834,31 +834,31 @@ DECLARE_CUSTOM_FUNCTION(TonySpaventatoSenzaMani)(CORO_PARAM, uint32 dwText, uint
DECLARE_CUSTOM_FUNCTION(TonyConMartello)(CORO_PARAM, uint32 dwText, uint32, uint32, uint32) {
TonySetNumTexts(dwText);
GLOBALS.nTonyNextTalkType = GLOBALS.Tony->TALK_CONMARTELLO;
- GLOBALS.Tony->SetPattern(GLOBALS.Tony->PAT_CONMARTELLO);
+ GLOBALS.Tony->setPattern(GLOBALS.Tony->PAT_CONMARTELLO);
}
DECLARE_CUSTOM_FUNCTION(TonyConBicchiere)(CORO_PARAM, uint32 dwText, uint32, uint32, uint32) {
TonySetNumTexts(dwText);
GLOBALS.nTonyNextTalkType = GLOBALS.Tony->TALK_CONBICCHIERE;
- GLOBALS.Tony->SetPattern(GLOBALS.Tony->PAT_CONBICCHIERE);
+ GLOBALS.Tony->setPattern(GLOBALS.Tony->PAT_CONBICCHIERE);
}
DECLARE_CUSTOM_FUNCTION(TonyConVerme)(CORO_PARAM, uint32 dwText, uint32, uint32, uint32) {
TonySetNumTexts(dwText);
GLOBALS.nTonyNextTalkType = GLOBALS.Tony->TALK_CONVERME;
- GLOBALS.Tony->SetPattern(GLOBALS.Tony->PAT_CONVERME);
+ GLOBALS.Tony->setPattern(GLOBALS.Tony->PAT_CONVERME);
}
DECLARE_CUSTOM_FUNCTION(TonyConCorda)(CORO_PARAM, uint32 dwText, uint32, uint32, uint32) {
TonySetNumTexts(dwText);
GLOBALS.nTonyNextTalkType = GLOBALS.Tony->TALK_CONCORDA;
- GLOBALS.Tony->SetPattern(GLOBALS.Tony->PAT_CONCORDA);
+ GLOBALS.Tony->setPattern(GLOBALS.Tony->PAT_CONCORDA);
}
DECLARE_CUSTOM_FUNCTION(TonyConSegretaria)(CORO_PARAM, uint32 dwText, uint32, uint32, uint32) {
TonySetNumTexts(dwText);
GLOBALS.nTonyNextTalkType = GLOBALS.Tony->TALK_CONSEGRETARIA;
- GLOBALS.Tony->SetPattern(GLOBALS.Tony->PAT_CONSEGRETARIA);
+ GLOBALS.Tony->setPattern(GLOBALS.Tony->PAT_CONSEGRETARIA);
}
DECLARE_CUSTOM_FUNCTION(TonyConConiglioANIM)(CORO_PARAM, uint32 dwText, uint32, uint32, uint32) {
@@ -889,7 +889,7 @@ DECLARE_CUSTOM_FUNCTION(TonyConPupazzoStart)(CORO_PARAM, uint32, uint32, uint32,
GLOBALS.nTonyNextTalkType = GLOBALS.Tony->TALK_CONPUPAZZOSTATIC;
GLOBALS.bStaticTalk = true;
- CORO_INVOKE_1(GLOBALS.Tony->StartStatic, GLOBALS.Tony->TALK_CONPUPAZZOSTATIC);
+ CORO_INVOKE_1(GLOBALS.Tony->startStatic, GLOBALS.Tony->TALK_CONPUPAZZOSTATIC);
CORO_END_CODE;
}
@@ -900,7 +900,7 @@ DECLARE_CUSTOM_FUNCTION(TonyConPupazzoEnd)(CORO_PARAM, uint32, uint32, uint32, u
CORO_BEGIN_CODE(_ctx);
- CORO_INVOKE_1(GLOBALS.Tony->EndStatic, GLOBALS.Tony->TALK_CONPUPAZZOSTATIC);
+ CORO_INVOKE_1(GLOBALS.Tony->endStatic, GLOBALS.Tony->TALK_CONPUPAZZOSTATIC);
GLOBALS.bStaticTalk = false;
GLOBALS.nTonyNextTalkType = GLOBALS.Tony->TALK_NORMAL;
@@ -915,7 +915,7 @@ DECLARE_CUSTOM_FUNCTION(TonyConConiglioStart)(CORO_PARAM, uint32, uint32, uint32
GLOBALS.nTonyNextTalkType = GLOBALS.Tony->TALK_CONCONIGLIOSTATIC;
GLOBALS.bStaticTalk = true;
- CORO_INVOKE_1(GLOBALS.Tony->StartStatic, GLOBALS.Tony->TALK_CONCONIGLIOSTATIC);
+ CORO_INVOKE_1(GLOBALS.Tony->startStatic, GLOBALS.Tony->TALK_CONCONIGLIOSTATIC);
CORO_END_CODE;
}
@@ -926,7 +926,7 @@ DECLARE_CUSTOM_FUNCTION(TonyConConiglioEnd)(CORO_PARAM, uint32, uint32, uint32,
CORO_BEGIN_CODE(_ctx);
- CORO_INVOKE_1(GLOBALS.Tony->EndStatic, GLOBALS.Tony->TALK_CONCONIGLIOSTATIC);
+ CORO_INVOKE_1(GLOBALS.Tony->endStatic, GLOBALS.Tony->TALK_CONCONIGLIOSTATIC);
GLOBALS.bStaticTalk = false;
GLOBALS.nTonyNextTalkType = GLOBALS.Tony->TALK_NORMAL;
@@ -941,7 +941,7 @@ DECLARE_CUSTOM_FUNCTION(TonyConRicettaStart)(CORO_PARAM, uint32, uint32, uint32,
GLOBALS.nTonyNextTalkType = GLOBALS.Tony->TALK_CONRICETTASTATIC;
GLOBALS.bStaticTalk = true;
- CORO_INVOKE_1(GLOBALS.Tony->StartStatic, GLOBALS.Tony->TALK_CONRICETTASTATIC);
+ CORO_INVOKE_1(GLOBALS.Tony->startStatic, GLOBALS.Tony->TALK_CONRICETTASTATIC);
CORO_END_CODE;
}
@@ -952,7 +952,7 @@ DECLARE_CUSTOM_FUNCTION(TonyConRicettaEnd)(CORO_PARAM, uint32, uint32, uint32, u
CORO_BEGIN_CODE(_ctx);
- CORO_INVOKE_1(GLOBALS.Tony->EndStatic, GLOBALS.Tony->TALK_CONRICETTASTATIC);
+ CORO_INVOKE_1(GLOBALS.Tony->endStatic, GLOBALS.Tony->TALK_CONRICETTASTATIC);
GLOBALS.bStaticTalk = false;
GLOBALS.nTonyNextTalkType = GLOBALS.Tony->TALK_NORMAL;
@@ -967,7 +967,7 @@ DECLARE_CUSTOM_FUNCTION(TonyConCarteStart)(CORO_PARAM, uint32, uint32, uint32, u
GLOBALS.nTonyNextTalkType = GLOBALS.Tony->TALK_CONCARTESTATIC;
GLOBALS.bStaticTalk = true;
- CORO_INVOKE_1(GLOBALS.Tony->StartStatic, GLOBALS.Tony->TALK_CONCARTESTATIC);
+ CORO_INVOKE_1(GLOBALS.Tony->startStatic, GLOBALS.Tony->TALK_CONCARTESTATIC);
CORO_END_CODE;
}
@@ -978,7 +978,7 @@ DECLARE_CUSTOM_FUNCTION(TonyConCarteEnd)(CORO_PARAM, uint32, uint32, uint32, uin
CORO_BEGIN_CODE(_ctx);
- CORO_INVOKE_1(GLOBALS.Tony->EndStatic, GLOBALS.Tony->TALK_CONCARTESTATIC);
+ CORO_INVOKE_1(GLOBALS.Tony->endStatic, GLOBALS.Tony->TALK_CONCARTESTATIC);
GLOBALS.bStaticTalk = false;
GLOBALS.nTonyNextTalkType = GLOBALS.Tony->TALK_NORMAL;
@@ -993,7 +993,7 @@ DECLARE_CUSTOM_FUNCTION(TonyConTaccuinoStart)(CORO_PARAM, uint32, uint32, uint32
GLOBALS.nTonyNextTalkType = GLOBALS.Tony->TALK_CONTACCUINOSTATIC;
GLOBALS.bStaticTalk = true;
- CORO_INVOKE_1(GLOBALS.Tony->StartStatic, GLOBALS.Tony->TALK_CONTACCUINOSTATIC);
+ CORO_INVOKE_1(GLOBALS.Tony->startStatic, GLOBALS.Tony->TALK_CONTACCUINOSTATIC);
CORO_END_CODE;
}
@@ -1004,7 +1004,7 @@ DECLARE_CUSTOM_FUNCTION(TonyConTaccuinoEnd)(CORO_PARAM, uint32, uint32, uint32,
CORO_BEGIN_CODE(_ctx);
- CORO_INVOKE_1(GLOBALS.Tony->EndStatic, GLOBALS.Tony->TALK_CONTACCUINOSTATIC);
+ CORO_INVOKE_1(GLOBALS.Tony->endStatic, GLOBALS.Tony->TALK_CONTACCUINOSTATIC);
GLOBALS.bStaticTalk = false;
GLOBALS.nTonyNextTalkType = GLOBALS.Tony->TALK_NORMAL;
@@ -1019,7 +1019,7 @@ DECLARE_CUSTOM_FUNCTION(TonyConMegafonoStart)(CORO_PARAM, uint32, uint32, uint32
GLOBALS.nTonyNextTalkType = GLOBALS.Tony->TALK_CONMEGAFONOSTATIC;
GLOBALS.bStaticTalk = true;
- CORO_INVOKE_1(GLOBALS.Tony->StartStatic, GLOBALS.Tony->TALK_CONMEGAFONOSTATIC);
+ CORO_INVOKE_1(GLOBALS.Tony->startStatic, GLOBALS.Tony->TALK_CONMEGAFONOSTATIC);
CORO_END_CODE;
}
@@ -1030,7 +1030,7 @@ DECLARE_CUSTOM_FUNCTION(TonyConMegafonoEnd)(CORO_PARAM, uint32, uint32, uint32,
CORO_BEGIN_CODE(_ctx);
- CORO_INVOKE_1(GLOBALS.Tony->EndStatic, GLOBALS.Tony->TALK_CONMEGAFONOSTATIC);
+ CORO_INVOKE_1(GLOBALS.Tony->endStatic, GLOBALS.Tony->TALK_CONMEGAFONOSTATIC);
GLOBALS.bStaticTalk = false;
GLOBALS.nTonyNextTalkType = GLOBALS.Tony->TALK_NORMAL;
@@ -1045,7 +1045,7 @@ DECLARE_CUSTOM_FUNCTION(TonyConBarbaStart)(CORO_PARAM, uint32, uint32, uint32, u
GLOBALS.nTonyNextTalkType = GLOBALS.Tony->TALK_CONBARBASTATIC;
GLOBALS.bStaticTalk = true;
- CORO_INVOKE_1(GLOBALS.Tony->StartStatic, GLOBALS.Tony->TALK_CONBARBASTATIC);
+ CORO_INVOKE_1(GLOBALS.Tony->startStatic, GLOBALS.Tony->TALK_CONBARBASTATIC);
CORO_END_CODE;
}
@@ -1056,7 +1056,7 @@ DECLARE_CUSTOM_FUNCTION(TonyConBarbaEnd)(CORO_PARAM, uint32, uint32, uint32, uin
CORO_BEGIN_CODE(_ctx);
- CORO_INVOKE_1(GLOBALS.Tony->EndStatic, GLOBALS.Tony->TALK_CONBARBASTATIC);
+ CORO_INVOKE_1(GLOBALS.Tony->endStatic, GLOBALS.Tony->TALK_CONBARBASTATIC);
GLOBALS.bStaticTalk = false;
GLOBALS.nTonyNextTalkType = GLOBALS.Tony->TALK_NORMAL;
@@ -1071,7 +1071,7 @@ DECLARE_CUSTOM_FUNCTION(TonySpaventatoStart)(CORO_PARAM, uint32, uint32, uint32,
GLOBALS.nTonyNextTalkType = GLOBALS.Tony->TALK_SPAVENTATOSTATIC;
GLOBALS.bStaticTalk = true;
- CORO_INVOKE_1(GLOBALS.Tony->StartStatic, GLOBALS.Tony->TALK_SPAVENTATOSTATIC);
+ CORO_INVOKE_1(GLOBALS.Tony->startStatic, GLOBALS.Tony->TALK_SPAVENTATOSTATIC);
CORO_END_CODE;
}
@@ -1082,7 +1082,7 @@ DECLARE_CUSTOM_FUNCTION(TonySpaventatoEnd)(CORO_PARAM, uint32, uint32, uint32, u
CORO_BEGIN_CODE(_ctx);
- CORO_INVOKE_1(GLOBALS.Tony->EndStatic, GLOBALS.Tony->TALK_SPAVENTATOSTATIC);
+ CORO_INVOKE_1(GLOBALS.Tony->endStatic, GLOBALS.Tony->TALK_SPAVENTATOSTATIC);
GLOBALS.bStaticTalk = false;
GLOBALS.nTonyNextTalkType = GLOBALS.Tony->TALK_NORMAL;
@@ -1101,8 +1101,8 @@ DECLARE_CUSTOM_FUNCTION(TonySniffaLeft)(CORO_PARAM, uint32, uint32, uint32, uint
CORO_BEGIN_CODE(_ctx);
- GLOBALS.Tony->SetPattern(GLOBALS.Tony->PAT_SNIFFA_LEFT);
- CORO_INVOKE_0(GLOBALS.Tony->WaitForEndPattern);
+ GLOBALS.Tony->setPattern(GLOBALS.Tony->PAT_SNIFFA_LEFT);
+ CORO_INVOKE_0(GLOBALS.Tony->waitForEndPattern);
CORO_INVOKE_4(LeftToMe, 0, 0, 0, 0);
CORO_END_CODE;
@@ -1114,8 +1114,8 @@ DECLARE_CUSTOM_FUNCTION(TonySniffaRight)(CORO_PARAM, uint32, uint32, uint32, uin
CORO_BEGIN_CODE(_ctx);
- GLOBALS.Tony->SetPattern(GLOBALS.Tony->PAT_SNIFFA_RIGHT);
- CORO_INVOKE_0(GLOBALS.Tony->WaitForEndPattern);
+ GLOBALS.Tony->setPattern(GLOBALS.Tony->PAT_SNIFFA_RIGHT);
+ CORO_INVOKE_0(GLOBALS.Tony->waitForEndPattern);
CORO_INVOKE_4(RightToMe, 0, 0, 0, 0);
CORO_END_CODE;
@@ -1160,11 +1160,11 @@ DECLARE_CUSTOM_FUNCTION(TonyMacbeth)(CORO_PARAM, uint32 nPos, uint32, uint32, ui
DECLARE_CUSTOM_FUNCTION(EnableTony)(CORO_PARAM, uint32, uint32, uint32, uint32) {
- GLOBALS.Tony->Show();
+ GLOBALS.Tony->show();
}
DECLARE_CUSTOM_FUNCTION(DisableTony)(CORO_PARAM, uint32 bShowOmbra, uint32, uint32, uint32) {
- GLOBALS.Tony->Hide(bShowOmbra);
+ GLOBALS.Tony->hide(bShowOmbra);
}
DECLARE_CUSTOM_FUNCTION(WaitForPatternEnd)(CORO_PARAM, uint32 nItem, uint32, uint32, uint32) {
@@ -1174,17 +1174,17 @@ DECLARE_CUSTOM_FUNCTION(WaitForPatternEnd)(CORO_PARAM, uint32 nItem, uint32, uin
CORO_BEGIN_CODE(_ctx);
- _ctx->item = GLOBALS.Loc->GetItemFromCode(nItem);
+ _ctx->item = GLOBALS.Loc->getItemFromCode(nItem);
if (!GLOBALS.bSkipIdle && _ctx->item != NULL)
- CORO_INVOKE_1(_ctx->item->WaitForEndPattern, GLOBALS.hSkipIdle);
+ CORO_INVOKE_1(_ctx->item->waitForEndPattern, GLOBALS.hSkipIdle);
CORO_END_CODE;
}
DECLARE_CUSTOM_FUNCTION(SetTonyPosition)(CORO_PARAM, uint32 nX, uint32 nY, uint32 nLoc, uint32) {
- GLOBALS.Tony->SetPosition(RMPoint(nX, nY), nLoc);
+ GLOBALS.Tony->setPosition(RMPoint(nX, nY), nLoc);
}
DECLARE_CUSTOM_FUNCTION(MoveTonyAndWait)(CORO_PARAM, uint32 nX, uint32 nY, uint32, uint32) {
@@ -1193,16 +1193,16 @@ DECLARE_CUSTOM_FUNCTION(MoveTonyAndWait)(CORO_PARAM, uint32 nX, uint32 nY, uint3
CORO_BEGIN_CODE(_ctx);
- CORO_INVOKE_1(GLOBALS.Tony->Move, RMPoint(nX, nY));
+ CORO_INVOKE_1(GLOBALS.Tony->move, RMPoint(nX, nY));
if (!GLOBALS.bSkipIdle)
- CORO_INVOKE_0(GLOBALS.Tony->WaitForEndMovement);
+ CORO_INVOKE_0(GLOBALS.Tony->waitForEndMovement);
CORO_END_CODE;
}
DECLARE_CUSTOM_FUNCTION(MoveTony)(CORO_PARAM, uint32 nX, uint32 nY, uint32, uint32) {
- GLOBALS.Tony->Move(coroParam, RMPoint(nX, nY));
+ GLOBALS.Tony->move(coroParam, RMPoint(nX, nY));
}
DECLARE_CUSTOM_FUNCTION(ScrollLocation)(CORO_PARAM, uint32 nX, uint32 nY, uint32 sX, uint32 sY) {
@@ -1217,7 +1217,7 @@ DECLARE_CUSTOM_FUNCTION(ScrollLocation)(CORO_PARAM, uint32 nX, uint32 nY, uint32
_ctx->lx = (int32)nX;
_ctx->ly = (int32)nY;
- _ctx->pt = GLOBALS.Loc->ScrollPosition();
+ _ctx->pt = GLOBALS.Loc->scrollPosition();
while ((_ctx->lx != 0 || _ctx->ly != 0) && !GLOBALS.bSkipIdle) {
if (_ctx->lx > 0) {
@@ -1243,8 +1243,8 @@ DECLARE_CUSTOM_FUNCTION(ScrollLocation)(CORO_PARAM, uint32 nX, uint32 nY, uint32
CORO_INVOKE_0(GLOBALS.WaitFrame);
GLOBALS.Freeze();
- GLOBALS.Loc->SetScrollPosition(_ctx->pt);
- GLOBALS.Tony->SetScrollPosition(_ctx->pt);
+ GLOBALS.Loc->setScrollPosition(_ctx->pt);
+ GLOBALS.Tony->setScrollPosition(_ctx->pt);
GLOBALS.Unfreeze();
}
@@ -1276,7 +1276,7 @@ DECLARE_CUSTOM_FUNCTION(SyncScrollLocation)(CORO_PARAM, uint32 nX, uint32 nY, ui
_ctx->stepX = sX;
_ctx->stepY = sY;
- _ctx->startpt = GLOBALS.Loc->ScrollPosition();
+ _ctx->startpt = GLOBALS.Loc->scrollPosition();
_ctx->dwStartTime = _vm->getTime();
@@ -1308,8 +1308,8 @@ DECLARE_CUSTOM_FUNCTION(SyncScrollLocation)(CORO_PARAM, uint32 nX, uint32 nY, ui
CORO_INVOKE_0(GLOBALS.WaitFrame);
GLOBALS.Freeze();
- GLOBALS.Loc->SetScrollPosition(_ctx->pt);
- GLOBALS.Tony->SetScrollPosition(_ctx->pt);
+ GLOBALS.Loc->setScrollPosition(_ctx->pt);
+ GLOBALS.Tony->setScrollPosition(_ctx->pt);
GLOBALS.Unfreeze();
}
@@ -1329,8 +1329,8 @@ DECLARE_CUSTOM_FUNCTION(SyncScrollLocation)(CORO_PARAM, uint32 nX, uint32 nY, ui
}
GLOBALS.Freeze();
- GLOBALS.Loc->SetScrollPosition(_ctx->pt);
- GLOBALS.Tony->SetScrollPosition(_ctx->pt);
+ GLOBALS.Loc->setScrollPosition(_ctx->pt);
+ GLOBALS.Tony->setScrollPosition(_ctx->pt);
GLOBALS.Unfreeze();
CORO_END_CODE;
@@ -1354,7 +1354,7 @@ DECLARE_CUSTOM_FUNCTION(ChangeHotspot)(CORO_PARAM, uint32 dwCode, uint32 nX, uin
GLOBALS.curChangedHotspot++;
}
- GLOBALS.Loc->GetItemFromCode(dwCode)->ChangeHotspot(RMPoint(nX, nY));
+ GLOBALS.Loc->getItemFromCode(dwCode)->changeHotspot(RMPoint(nX, nY));
}
@@ -1384,8 +1384,8 @@ DECLARE_CUSTOM_FUNCTION(TremaSchermo)(CORO_PARAM, uint32 nScosse, uint32, uint32
CORO_INVOKE_0(GLOBALS.WaitFrame);
GLOBALS.Freeze();
- GLOBALS.Loc->SetFixedScroll(RMPoint(1 * _ctx->dirx, 1 * _ctx->diry));
- GLOBALS.Tony->SetFixedScroll(RMPoint(1 * _ctx->dirx, 1 * _ctx->diry));
+ GLOBALS.Loc->setFixedScroll(RMPoint(1 * _ctx->dirx, 1 * _ctx->diry));
+ GLOBALS.Tony->setFixedScroll(RMPoint(1 * _ctx->dirx, 1 * _ctx->diry));
GLOBALS.Unfreeze();
_ctx->i = _vm->_randomSource.getRandomNumber(2);
@@ -1397,8 +1397,8 @@ DECLARE_CUSTOM_FUNCTION(TremaSchermo)(CORO_PARAM, uint32 nScosse, uint32, uint32
}
GLOBALS.Freeze();
- GLOBALS.Loc->SetFixedScroll(RMPoint(0, 0));
- GLOBALS.Tony->SetFixedScroll(RMPoint(0, 0));
+ GLOBALS.Loc->setFixedScroll(RMPoint(0, 0));
+ GLOBALS.Tony->setFixedScroll(RMPoint(0, 0));
GLOBALS.Unfreeze();
CORO_END_CODE;
@@ -1413,7 +1413,7 @@ DECLARE_CUSTOM_FUNCTION(TremaSchermo)(CORO_PARAM, uint32 nScosse, uint32, uint32
DECLARE_CUSTOM_FUNCTION(CharSetCode)(CORO_PARAM, uint32 nChar, uint32 nCode, uint32, uint32) {
assert(nChar < 16);
GLOBALS.Character[nChar].code = nCode;
- GLOBALS.Character[nChar].item = GLOBALS.Loc->GetItemFromCode(nCode);
+ GLOBALS.Character[nChar].item = GLOBALS.Loc->getItemFromCode(nCode);
GLOBALS.Character[nChar].r = 255;
GLOBALS.Character[nChar].g = 255;
GLOBALS.Character[nChar].b = 255;
@@ -1461,18 +1461,18 @@ DECLARE_CUSTOM_FUNCTION(CharSendMessage)(CORO_PARAM, uint32 nChar, uint32 dwMess
_ctx->curOffset = 0;
assert(nChar < 16);
- _ctx->pt = GLOBALS.Character[nChar].item->CalculatePos() - RMPoint(-60, 20) - GLOBALS.Loc->ScrollPosition();
+ _ctx->pt = GLOBALS.Character[nChar].item->calculatePos() - RMPoint(-60, 20) - GLOBALS.Loc->scrollPosition();
if (GLOBALS.Character[nChar].starttalkpattern != 0) {
GLOBALS.Freeze();
- GLOBALS.Character[nChar].item->SetPattern(GLOBALS.Character[nChar].starttalkpattern);
+ GLOBALS.Character[nChar].item->setPattern(GLOBALS.Character[nChar].starttalkpattern);
GLOBALS.Unfreeze();
- CORO_INVOKE_0(GLOBALS.Character[nChar].item->WaitForEndPattern);
+ CORO_INVOKE_0(GLOBALS.Character[nChar].item->waitForEndPattern);
}
GLOBALS.Freeze();
- GLOBALS.Character[nChar].item->SetPattern(GLOBALS.Character[nChar].talkpattern);
+ GLOBALS.Character[nChar].item->setPattern(GLOBALS.Character[nChar].talkpattern);
GLOBALS.Unfreeze();
_ctx->curVoc = SearchVoiceHeader(0, dwMessage);
@@ -1483,7 +1483,7 @@ DECLARE_CUSTOM_FUNCTION(CharSendMessage)(CORO_PARAM, uint32 nChar, uint32 dwMess
_ctx->curOffset = _ctx->curVoc->_offset;
}
- for (_ctx->i = 0; _ctx->i < _ctx->msg->NumPeriods() && !GLOBALS.bSkipIdle; _ctx->i++) {
+ for (_ctx->i = 0; _ctx->i < _ctx->msg->numPeriods() && !GLOBALS.bSkipIdle; _ctx->i++) {
if (bIsBack) {
GLOBALS.curBackText = _ctx->text = new RMTextDialogScrolling(GLOBALS.Loc);
if (GLOBALS.bTonyIsSpeaking)
@@ -1545,13 +1545,13 @@ DECLARE_CUSTOM_FUNCTION(CharSendMessage)(CORO_PARAM, uint32 nChar, uint32 dwMess
if (GLOBALS.Character[nChar].endtalkpattern != 0) {
GLOBALS.Freeze();
- GLOBALS.Character[nChar].item->SetPattern(GLOBALS.Character[nChar].endtalkpattern);
+ GLOBALS.Character[nChar].item->setPattern(GLOBALS.Character[nChar].endtalkpattern);
GLOBALS.Unfreeze();
- CORO_INVOKE_0(GLOBALS.Character[nChar].item->WaitForEndPattern);
+ CORO_INVOKE_0(GLOBALS.Character[nChar].item->waitForEndPattern);
}
GLOBALS.Freeze();
- GLOBALS.Character[nChar].item->SetPattern(GLOBALS.Character[nChar].standpattern);
+ GLOBALS.Character[nChar].item->setPattern(GLOBALS.Character[nChar].standpattern);
GLOBALS.Unfreeze();
delete _ctx->msg;
@@ -1581,7 +1581,7 @@ DECLARE_CUSTOM_FUNCTION(MCharSetCode)(CORO_PARAM, uint32 nChar, uint32 nCode, ui
if (nCode == 0)
GLOBALS.MCharacter[nChar].item = NULL;
else
- GLOBALS.MCharacter[nChar].item = GLOBALS.Loc->GetItemFromCode(nCode);
+ GLOBALS.MCharacter[nChar].item = GLOBALS.Loc->getItemFromCode(nCode);
GLOBALS.MCharacter[nChar].r = 255;
GLOBALS.MCharacter[nChar].g = 255;
GLOBALS.MCharacter[nChar].b = 255;
@@ -1598,7 +1598,7 @@ DECLARE_CUSTOM_FUNCTION(MCharSetCode)(CORO_PARAM, uint32 nChar, uint32 nCode, ui
}
DECLARE_CUSTOM_FUNCTION(MCharResetCode)(CORO_PARAM, uint32 nChar, uint32, uint32, uint32) {
- GLOBALS.MCharacter[nChar].item = GLOBALS.Loc->GetItemFromCode(GLOBALS.MCharacter[nChar].code);
+ GLOBALS.MCharacter[nChar].item = GLOBALS.Loc->getItemFromCode(GLOBALS.MCharacter[nChar].code);
}
@@ -1670,7 +1670,7 @@ DECLARE_CUSTOM_FUNCTION(MCharSendMessage)(CORO_PARAM, uint32 nChar, uint32 dwMes
// Calculates the position of the text according to the current frame
if (GLOBALS.MCharacter[nChar].x == -1)
- _ctx->pt = GLOBALS.MCharacter[nChar].item->CalculatePos() - RMPoint(-60, 20) - GLOBALS.Loc->ScrollPosition();
+ _ctx->pt = GLOBALS.MCharacter[nChar].item->calculatePos() - RMPoint(-60, 20) - GLOBALS.Loc->scrollPosition();
else
_ctx->pt = RMPoint(GLOBALS.MCharacter[nChar].x, GLOBALS.MCharacter[nChar].y);
@@ -1680,7 +1680,7 @@ DECLARE_CUSTOM_FUNCTION(MCharSendMessage)(CORO_PARAM, uint32 nChar, uint32 dwMes
// Try to run the custom function to initialise the speech
if (GLOBALS.MCharacter[nChar].item) {
- _ctx->h = mpalQueryDoAction(30, GLOBALS.MCharacter[nChar].item->MpalCode(), _ctx->parm);
+ _ctx->h = mpalQueryDoAction(30, GLOBALS.MCharacter[nChar].item->mpalCode(), _ctx->parm);
if (_ctx->h != CORO_INVALID_PID_VALUE) {
CORO_INVOKE_2(CoroScheduler.waitForSingleObject, _ctx->h, CORO_INFINITE);
}
@@ -1695,7 +1695,7 @@ DECLARE_CUSTOM_FUNCTION(MCharSendMessage)(CORO_PARAM, uint32 nChar, uint32 dwMes
_ctx->curOffset = _ctx->curVoc->_offset;
}
- for (_ctx->i = 0; _ctx->i < _ctx->msg->NumPeriods() && !GLOBALS.bSkipIdle; _ctx->i++) {
+ for (_ctx->i = 0; _ctx->i < _ctx->msg->numPeriods() && !GLOBALS.bSkipIdle; _ctx->i++) {
// Create a different object depending on whether it's background or not
if (bIsBack) {
GLOBALS.curBackText = _ctx->text = new RMTextDialogScrolling(GLOBALS.Loc);
@@ -1759,7 +1759,7 @@ DECLARE_CUSTOM_FUNCTION(MCharSendMessage)(CORO_PARAM, uint32 nChar, uint32 dwMes
// Try to run the custom function to close the speech
if (GLOBALS.MCharacter[nChar].item) {
- _ctx->h = mpalQueryDoAction(31, GLOBALS.MCharacter[nChar].item->MpalCode(), _ctx->parm);
+ _ctx->h = mpalQueryDoAction(31, GLOBALS.MCharacter[nChar].item->mpalCode(), _ctx->parm);
if (_ctx->h != CORO_INVALID_PID_VALUE)
CORO_INVOKE_2(CoroScheduler.waitForSingleObject, _ctx->h, CORO_INFINITE);
}
@@ -1767,11 +1767,6 @@ DECLARE_CUSTOM_FUNCTION(MCharSendMessage)(CORO_PARAM, uint32 nChar, uint32 dwMes
CORO_END_CODE;
}
-
-
-
-
-
/*
* Dialoghi
*/
@@ -1815,46 +1810,46 @@ DECLARE_CUSTOM_FUNCTION(SendDialogMessage)(CORO_PARAM, uint32 nPers, uint32 nMsg
if (nPers == 0) {
_ctx->text = new RMTextDialog;
_ctx->text->setColor(0, 255, 0);
- _ctx->text->setPosition(GLOBALS.Tony->Position() - RMPoint(0, 130) - GLOBALS.Loc->ScrollPosition());
+ _ctx->text->setPosition(GLOBALS.Tony->position() - RMPoint(0, 130) - GLOBALS.Loc->scrollPosition());
_ctx->text->writeText(_ctx->string, 0);
if (GLOBALS.dwTonyNumTexts > 0) {
if (!GLOBALS.bTonyInTexts) {
if (GLOBALS.nTonyNextTalkType != GLOBALS.Tony->TALK_NORMAL) {
- CORO_INVOKE_1(GLOBALS.Tony->StartTalk, GLOBALS.nTonyNextTalkType);
+ CORO_INVOKE_1(GLOBALS.Tony->startTalk, GLOBALS.nTonyNextTalkType);
if (!GLOBALS.bStaticTalk)
GLOBALS.nTonyNextTalkType = GLOBALS.Tony->TALK_NORMAL;
} else
- CORO_INVOKE_1(GLOBALS.Tony->StartTalk, GLOBALS.Tony->TALK_NORMAL);
+ CORO_INVOKE_1(GLOBALS.Tony->startTalk, GLOBALS.Tony->TALK_NORMAL);
GLOBALS.bTonyInTexts = true;
}
GLOBALS.dwTonyNumTexts--;
} else {
- CORO_INVOKE_1(GLOBALS.Tony->StartTalk, GLOBALS.nTonyNextTalkType);
+ CORO_INVOKE_1(GLOBALS.Tony->startTalk, GLOBALS.nTonyNextTalkType);
if (!GLOBALS.bStaticTalk)
GLOBALS.nTonyNextTalkType = GLOBALS.Tony->TALK_NORMAL;
}
} else if (!GLOBALS.IsMChar[nPers]) {
_ctx->text = new RMTextDialog;
- _ctx->pt = GLOBALS.Character[nPers].item->CalculatePos() - RMPoint(-60, 20) - GLOBALS.Loc->ScrollPosition();
+ _ctx->pt = GLOBALS.Character[nPers].item->calculatePos() - RMPoint(-60, 20) - GLOBALS.Loc->scrollPosition();
if (GLOBALS.Character[nPers].starttalkpattern != 0) {
GLOBALS.Freeze();
- GLOBALS.Character[nPers].item->SetPattern(GLOBALS.Character[nPers].starttalkpattern);
+ GLOBALS.Character[nPers].item->setPattern(GLOBALS.Character[nPers].starttalkpattern);
GLOBALS.Unfreeze();
- CORO_INVOKE_0(GLOBALS.Character[nPers].item->WaitForEndPattern);
+ CORO_INVOKE_0(GLOBALS.Character[nPers].item->waitForEndPattern);
}
- GLOBALS.Character[nPers].item->SetPattern(GLOBALS.Character[nPers].talkpattern);
+ GLOBALS.Character[nPers].item->setPattern(GLOBALS.Character[nPers].talkpattern);
_ctx->text->setColor(GLOBALS.Character[nPers].r, GLOBALS.Character[nPers].g, GLOBALS.Character[nPers].b);
_ctx->text->writeText(_ctx->string, 0);
_ctx->text->setPosition(_ctx->pt);
} else {
if (GLOBALS.MCharacter[nPers].x == -1)
- _ctx->pt = GLOBALS.MCharacter[nPers].item->CalculatePos() - RMPoint(-60, 20) - GLOBALS.Loc->ScrollPosition();
+ _ctx->pt = GLOBALS.MCharacter[nPers].item->calculatePos() - RMPoint(-60, 20) - GLOBALS.Loc->scrollPosition();
else
_ctx->pt = RMPoint(GLOBALS.MCharacter[nPers].x, GLOBALS.MCharacter[nPers].y);
@@ -1866,7 +1861,7 @@ DECLARE_CUSTOM_FUNCTION(SendDialogMessage)(CORO_PARAM, uint32 nPers, uint32 nMsg
GLOBALS.MCharacter[nPers].numtexts--;
} else {
// Try to run the custom function to initialise the speech
- _ctx->h = mpalQueryDoAction(30, GLOBALS.MCharacter[nPers].item->MpalCode(), _ctx->parm);
+ _ctx->h = mpalQueryDoAction(30, GLOBALS.MCharacter[nPers].item->mpalCode(), _ctx->parm);
if (_ctx->h != CORO_INVALID_PID_VALUE)
CORO_INVOKE_2(CoroScheduler.waitForSingleObject, _ctx->h, CORO_INFINITE);
@@ -1922,18 +1917,18 @@ DECLARE_CUSTOM_FUNCTION(SendDialogMessage)(CORO_PARAM, uint32 nPers, uint32 nMsg
if (!GLOBALS.IsMChar[nPers]) {
if (GLOBALS.Character[nPers].endtalkpattern != 0) {
GLOBALS.Freeze();
- GLOBALS.Character[nPers].item->SetPattern(GLOBALS.Character[nPers].endtalkpattern);
+ GLOBALS.Character[nPers].item->setPattern(GLOBALS.Character[nPers].endtalkpattern);
GLOBALS.Unfreeze();
- CORO_INVOKE_0(GLOBALS.Character[nPers].item->WaitForEndPattern);
+ CORO_INVOKE_0(GLOBALS.Character[nPers].item->waitForEndPattern);
}
- GLOBALS.Character[nPers].item->SetPattern(GLOBALS.Character[nPers].standpattern);
+ GLOBALS.Character[nPers].item->setPattern(GLOBALS.Character[nPers].standpattern);
delete _ctx->text;
} else {
if ((GLOBALS.MCharacter[nPers].bInTexts && GLOBALS.MCharacter[nPers].numtexts == 0) || !GLOBALS.MCharacter[nPers].bInTexts) {
// Try to run the custom function to close the speech
GLOBALS.MCharacter[nPers].curTalk = (GLOBALS.MCharacter[nPers].curTalk % 10) + GLOBALS.MCharacter[nPers].curgroup * 10;
- _ctx->h = mpalQueryDoAction(31, GLOBALS.MCharacter[nPers].item->MpalCode(), GLOBALS.MCharacter[nPers].curTalk);
+ _ctx->h = mpalQueryDoAction(31, GLOBALS.MCharacter[nPers].item->mpalCode(), GLOBALS.MCharacter[nPers].curTalk);
if (_ctx->h != CORO_INVALID_PID_VALUE)
CORO_INVOKE_2(CoroScheduler.waitForSingleObject, _ctx->h, CORO_INFINITE);
@@ -1946,7 +1941,7 @@ DECLARE_CUSTOM_FUNCTION(SendDialogMessage)(CORO_PARAM, uint32 nPers, uint32 nMsg
}
} else {
if ((GLOBALS.dwTonyNumTexts == 0 && GLOBALS.bTonyInTexts) || !GLOBALS.bTonyInTexts) {
- CORO_INVOKE_0(GLOBALS.Tony->EndTalk);
+ CORO_INVOKE_0(GLOBALS.Tony->endTalk);
GLOBALS.dwTonyNumTexts = 0;
GLOBALS.bTonyInTexts = false;
}
@@ -2201,11 +2196,11 @@ DECLARE_CUSTOM_FUNCTION(PlayStacchetto)(CORO_PARAM, uint32 nMusic, uint32 nFX, u
DECLARE_CUSTOM_FUNCTION(PlayItemSfx)(CORO_PARAM, uint32 nItem, uint32 nSFX, uint32, uint32) {
if (nItem == 0) {
- GLOBALS.Tony->PlaySfx(nSFX);
+ GLOBALS.Tony->playSfx(nSFX);
} else {
- RMItem *item = GLOBALS.Loc->GetItemFromCode(nItem);
+ RMItem *item = GLOBALS.Loc->getItemFromCode(nItem);
if (item)
- item->PlaySfx(nSFX);
+ item->playSfx(nSFX);
}
}
@@ -2325,9 +2320,9 @@ DECLARE_CUSTOM_FUNCTION(DoCredits)(CORO_PARAM, uint32 nMsg, uint32 dwTime, uint3
_ctx->msg = new RMMessage(nMsg);
_ctx->hDisable = CoroScheduler.createEvent(true, false);
- _ctx->text = new RMTextDialog[_ctx->msg->NumPeriods()];
+ _ctx->text = new RMTextDialog[_ctx->msg->numPeriods()];
- for (_ctx->i = 0; _ctx->i < _ctx->msg->NumPeriods(); _ctx->i++) {
+ for (_ctx->i = 0; _ctx->i < _ctx->msg->numPeriods(); _ctx->i++) {
_ctx->text[_ctx->i].setInput(GLOBALS.Input);
// Alignment
diff --git a/engines/tony/debugger.cpp b/engines/tony/debugger.cpp
index 7dc32d9f61..66fddf2834 100644
--- a/engines/tony/debugger.cpp
+++ b/engines/tony/debugger.cpp
@@ -87,7 +87,7 @@ bool Debugger::Cmd_Scene(int argc, const char **argv) {
}
int sceneNumber = strToInt(argv[1]);
- if (sceneNumber >= _vm->_theBoxes.GetLocBoxesCount()) {
+ if (sceneNumber >= _vm->_theBoxes.getLocBoxesCount()) {
DebugPrintf("Invalid scene\n");
return true;
}
@@ -99,7 +99,7 @@ bool Debugger::Cmd_Scene(int argc, const char **argv) {
} else {
// Get the box areas for the scene, and choose one so as to have a default
// position for Tony that will be in the walkable areas
- RMBoxLoc *box = _vm->_theBoxes.GetBoxes(sceneNumber);
+ RMBoxLoc *box = _vm->_theBoxes.getBoxes(sceneNumber);
scenePos.Set(box->boxes[0].hotspot[0].hotx, box->boxes[0].hotspot[0].hoty);
}
diff --git a/engines/tony/font.cpp b/engines/tony/font.cpp
index bc32939061..e056484e54 100644
--- a/engines/tony/font.cpp
+++ b/engines/tony/font.cpp
@@ -2180,7 +2180,7 @@ RMTextDialogScrolling::RMTextDialogScrolling() {
RMTextDialogScrolling::RMTextDialogScrolling(RMLocation *loc) {
curLoc = loc;
- startScroll = loc->ScrollPosition();
+ startScroll = loc->scrollPosition();
}
RMTextDialogScrolling::~RMTextDialogScrolling() {
@@ -2196,7 +2196,7 @@ void RMTextDialogScrolling::draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPri
_ctx->curDst = dst;
if (curLoc != NULL)
- dst -= curLoc->ScrollPosition() - startScroll;
+ dst -= curLoc->scrollPosition() - startScroll;
CORO_INVOKE_2(RMTextDialog::draw, bigBuf, prim);
@@ -2240,19 +2240,19 @@ void RMTextItemName::doFrame(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMLocation &
bigBuf.addPrim(new RMGfxPrimitive(this));
// Update the scrolling co-ordinates
- _curscroll = loc.ScrollPosition();
+ _curscroll = loc.scrollPosition();
// Check if we are on the inventory
if (inv.itemInFocus(_mpos))
_item = inv.whichItemIsIn(_mpos);
else
- _item = loc.WhichItemIsIn(_mpos);
+ _item = loc.whichItemIsIn(_mpos);
itemName = "";
// If there an item, get its name
if (_item != NULL)
- _item->GetName(itemName);
+ _item->getName(itemName);
// Write it
writeText(itemName, 1);
@@ -2262,7 +2262,7 @@ void RMTextItemName::doFrame(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMLocation &
if (_item == NULL)
ptr.setSpecialPointer(RMPointer::PTR_NONE);
else {
- _ctx->hThread = mpalQueryDoAction(20, _item->MpalCode(), 0);
+ _ctx->hThread = mpalQueryDoAction(20, _item->mpalCode(), 0);
if (_ctx->hThread == CORO_INVALID_PID_VALUE)
ptr.setSpecialPointer(RMPointer::PTR_NONE);
else
@@ -2296,7 +2296,7 @@ RMPoint RMTextItemName::getHotspot() {
if (_item == NULL)
return _mpos + _curscroll;
else
- return _item->Hotspot();
+ return _item->hotspot();
}
RMItem *RMTextItemName::getSelectedItem() {
diff --git a/engines/tony/game.h b/engines/tony/game.h
index 34e99c369e..5f387d558b 100644
--- a/engines/tony/game.h
+++ b/engines/tony/game.h
@@ -115,7 +115,7 @@ public:
void setSpecialPointer(POINTER ptr) {
_nCurSpecialPointer = ptr;
if (_nCurSpecialPointer && _nCurSpecialPointer != PTR_CUSTOM)
- _specialPointer[ptr - 1]->SetPattern(1);
+ _specialPointer[ptr - 1]->setPattern(1);
}
POINTER getSpecialPointer(void) {
return (POINTER)_nCurSpecialPointer;
diff --git a/engines/tony/gfxengine.cpp b/engines/tony/gfxengine.cpp
index a80552b1d1..56ce8a47e1 100644
--- a/engines/tony/gfxengine.cpp
+++ b/engines/tony/gfxengine.cpp
@@ -126,7 +126,7 @@ void RMGfxEngine::openOptionScreen(CORO_PARAM, int type) {
if (type == 1 || type == 2) {
GLOBALS.bIdleExited = true;
} else {
- CORO_INVOKE_0(_tony.StopNoAction);
+ CORO_INVOKE_0(_tony.stopNoAction);
GLOBALS.bIdleExited = false;
@@ -170,7 +170,7 @@ void RMGfxEngine::doFrame(CORO_PARAM, bool bDrawLocation) {
_loc.doFrame(&_bigBuf);
// Check the mouse input
- if (_bInput && !_tony.InAction()) {
+ if (_bInput && !_tony.inAction()) {
// If we are on the inventory, it is it who controls all input
if (_inv.haveFocus(_input.mousePos()) && !_inter.active()) {
// Left Click
@@ -197,7 +197,7 @@ void RMGfxEngine::doFrame(CORO_PARAM, bool bDrawLocation) {
// *************
if (_input.mouseRightReleased()) {
if (_inv.rightRelease(_input.mousePos(), _curAction)) {
- CORO_INVOKE_3(_tony.MoveAndDoAction, _itemName.getHotspot(), _itemName.getSelectedItem(), _curAction);
+ CORO_INVOKE_3(_tony.moveAndDoAction, _itemName.getHotspot(), _itemName.getSelectedItem(), _curAction);
_curAction = TA_GOTO;
_point.setAction(_curAction);
@@ -207,7 +207,7 @@ void RMGfxEngine::doFrame(CORO_PARAM, bool bDrawLocation) {
// Options Menu
// ************
if (_bGUIOption) {
- if (!_tony.InAction() && _bInput) {
+ if (!_tony.inAction() && _bInput) {
if ((_input.mouseLeftClicked() && _input.mousePos().x < 3 && _input.mousePos().y < 3)) {
CORO_INVOKE_1(openOptionScreen, 0);
goto SKIPCLICKSINISTRO;
@@ -229,9 +229,9 @@ void RMGfxEngine::doFrame(CORO_PARAM, bool bDrawLocation) {
if (_input.mouseLeftClicked() && !_inter.active()) {
if (_curAction != TA_COMBINE)
- CORO_INVOKE_3(_tony.MoveAndDoAction, _itemName.getHotspot(), _itemName.getSelectedItem(), _point.curAction());
+ CORO_INVOKE_3(_tony.moveAndDoAction, _itemName.getHotspot(), _itemName.getSelectedItem(), _point.curAction());
else if (_itemName.getSelectedItem() != NULL)
- CORO_INVOKE_4(_tony.MoveAndDoAction, _itemName.getHotspot(), _itemName.getSelectedItem(), TA_COMBINE, _curActionObj);
+ CORO_INVOKE_4(_tony.moveAndDoAction, _itemName.getHotspot(), _itemName.getSelectedItem(), TA_COMBINE, _curActionObj);
if (_curAction == TA_COMBINE) {
_inv.endCombine();
@@ -271,7 +271,7 @@ SKIPCLICKSINISTRO:
if (_bGUIInterface) {
if (_inter.released(_input.mousePos(), _curAction)) {
_point.setAction(_curAction);
- CORO_INVOKE_3(_tony.MoveAndDoAction, _itemName.getHotspot(), _itemName.getSelectedItem(), _curAction);
+ CORO_INVOKE_3(_tony.moveAndDoAction, _itemName.getHotspot(), _itemName.getSelectedItem(), _curAction);
_curAction = TA_GOTO;
_point.setAction(_curAction);
@@ -288,23 +288,23 @@ SKIPCLICKSINISTRO:
// Interface & Inventory
_inter.doFrame(_bigBuf, _input.mousePos());
- _inv.doFrame(_bigBuf, _point, _input.mousePos(), (!_tony.InAction() && !_inter.active() && _bGUIInventory));
+ _inv.doFrame(_bigBuf, _point, _input.mousePos(), (!_tony.inAction() && !_inter.active() && _bGUIInventory));
}
// Animate Tony
- CORO_INVOKE_2(_tony.DoFrame, &_bigBuf, _nCurLoc);
+ CORO_INVOKE_2(_tony.doFrame, &_bigBuf, _nCurLoc);
// Update screen scrolling to keep Tony in focus
- if (_tony.MustUpdateScrolling() && _bLocationLoaded) {
- RMPoint showThis = _tony.Position();
+ if (_tony.mustUpdateScrolling() && _bLocationLoaded) {
+ RMPoint showThis = _tony.position();
showThis.y -= 60;
- _loc.UpdateScrolling(showThis);
+ _loc.updateScrolling(showThis);
}
if (_bLocationLoaded)
- _tony.SetScrollPosition(_loc.ScrollPosition());
+ _tony.setScrollPosition(_loc.scrollPosition());
- if ((!_tony.InAction() && _bInput) || _bAlwaysDrawMouse) {
+ if ((!_tony.inAction() && _bInput) || _bAlwaysDrawMouse) {
_point.setCoord(_input.mousePos());
_point.doFrame(&_bigBuf);
}
@@ -362,17 +362,17 @@ void RMGfxEngine::itemIrq(uint32 dwItem, int nPattern, int nStatus) {
assert(GLOBALS.GfxEngine);
if (GLOBALS.GfxEngine->_bLocationLoaded) {
- item = GLOBALS.GfxEngine->_loc.GetItemFromCode(dwItem);
+ item = GLOBALS.GfxEngine->_loc.getItemFromCode(dwItem);
if (item != NULL) {
if (nPattern != -1) {
if (GLOBALS.bPatIrqFreeze)
mainFreeze();
- item->SetPattern(nPattern, true);
+ item->setPattern(nPattern, true);
if (GLOBALS.bPatIrqFreeze)
mainUnfreeze();
}
if (nStatus != -1)
- item->SetStatus(nStatus);
+ item->setStatus(nStatus);
}
}
}
@@ -384,12 +384,12 @@ void RMGfxEngine::initForNewLocation(int nLoc, RMPoint ptTonyStart, RMPoint star
start.y = ptTonyStart.y - RM_SY / 2;
}
- _loc.SetScrollPosition(start);
+ _loc.setScrollPosition(start);
if (ptTonyStart.x == 0 && ptTonyStart.y == 0) {
} else {
- _tony.SetPosition(ptTonyStart, nLoc);
- _tony.SetScrollPosition(start);
+ _tony.setPosition(ptTonyStart, nLoc);
+ _tony.setScrollPosition(start);
}
_curAction = TA_GOTO;
@@ -415,7 +415,7 @@ uint32 RMGfxEngine::loadLocation(int nLoc, RMPoint ptTonyStart, RMPoint start) {
if (!res.IsValid())
continue;
- _loc.Load(res);
+ _loc.load(res);
initForNewLocation(nLoc, ptTonyStart, start);
bLoaded = true;
break;
@@ -455,7 +455,7 @@ void RMGfxEngine::unloadLocation(CORO_PARAM, bool bDoOnExit, uint32 *result) {
_bLocationLoaded = false;
_bigBuf.clearOT();
- _loc.Unload();
+ _loc.unload();
if (result != NULL)
*result = CORO_INVALID_PID_VALUE;
@@ -503,7 +503,7 @@ void RMGfxEngine::init() {
// Initialise Tony
_tony.init();
- _tony.LinkToBoxes(&_vm->_theBoxes);
+ _tony.linkToBoxes(&_vm->_theBoxes);
// Initialise the inventory and the interface
_inv.init();
@@ -515,7 +515,7 @@ void RMGfxEngine::init() {
enableInput();
// Starting the game
- _tony.ExecuteAction(20, 1, 0);
+ _tony.executeAction(20, 1, 0);
}
void RMGfxEngine::close(void) {
@@ -523,7 +523,7 @@ void RMGfxEngine::close(void) {
_inter.close();
_inv.close();
- _tony.Close();
+ _tony.close();
_point.close();
_input.close();
}
@@ -579,7 +579,7 @@ void RMGfxEngine::saveState(const Common::String &fn, byte *curThumb, const Comm
uint size;
int i;
char buf[4];
- RMPoint tp = _tony.Position();
+ RMPoint tp = _tony.position();
// Saving: MPAL variables, current location, and Tony inventory position
@@ -627,9 +627,9 @@ void RMGfxEngine::saveState(const Common::String &fn, byte *curThumb, const Comm
delete[] state;
// boxes
- size = _vm->_theBoxes.GetSaveStateSize();
+ size = _vm->_theBoxes.getSaveStateSize();
state = new byte[size];
- _vm->_theBoxes.SaveState(state);
+ _vm->_theBoxes.saveState(state);
f->writeUint32LE(size);
f->write(state, size);
delete[] state;
@@ -638,7 +638,7 @@ void RMGfxEngine::saveState(const Common::String &fn, byte *curThumb, const Comm
bool bStat;
// Saves the state of the shepherdess and show yourself
- bStat = _tony.GetPastorella();
+ bStat = _tony.getPastorella();
f->writeByte(bStat);
bStat = _inter.getPalesati();
f->writeByte(bStat);
@@ -765,7 +765,7 @@ void RMGfxEngine::loadState(CORO_PARAM, const Common::String &fn) {
_ctx->size = _ctx->f->readUint32LE();
_ctx->state = new byte[_ctx->size];
_ctx->f->read(_ctx->state, _ctx->size);
- _vm->_theBoxes.LoadState(_ctx->state);
+ _vm->_theBoxes.loadState(_ctx->state);
delete[] _ctx->state;
}
@@ -774,7 +774,7 @@ void RMGfxEngine::loadState(CORO_PARAM, const Common::String &fn) {
bool bStat = false;
bStat = _ctx->f->readByte();
- _tony.SetPastorella(bStat);
+ _tony.setPastorella(bStat);
bStat = _ctx->f->readByte();
_inter.setPalesati(bStat);
@@ -813,7 +813,7 @@ void RMGfxEngine::loadState(CORO_PARAM, const Common::String &fn) {
CORO_INVOKE_2(unloadLocation, false, NULL);
loadLocation(_ctx->loc, _ctx->tp, RMPoint(-1, -1));
- _tony.SetPattern(RMTony::PAT_STANDRIGHT);
+ _tony.setPattern(RMTony::PAT_STANDRIGHT);
mainUnfreeze();
// On older versions, need to an enter action
@@ -838,7 +838,7 @@ void RMGfxEngine::loadState(CORO_PARAM, const Common::String &fn) {
void RMGfxEngine::pauseSound(bool bPause) {
if (_bLocationLoaded)
- _loc.PauseSound(bPause);
+ _loc.pauseSound(bPause);
}
void RMGfxEngine::initWipe(int type) {
@@ -861,7 +861,7 @@ void RMGfxEngine::waitWipeEnd(CORO_PARAM) {
}
bool RMGfxEngine::canLoadSave() {
- return _bInput && !_tony.InAction() && !_vm->getIsDemo();
+ return _bInput && !_tony.inAction() && !_vm->getIsDemo();
}
} // End of namespace Tony
diff --git a/engines/tony/inventory.cpp b/engines/tony/inventory.cpp
index 595a1ba0f2..5ff4f6cd10 100644
--- a/engines/tony/inventory.cpp
+++ b/engines/tony/inventory.cpp
@@ -100,7 +100,7 @@ void RMInventory::init(void) {
assert(res.IsValid());
// Initialise the MPAL inventory item by reading it in.
- _items[i].icon.SetInitCurPattern(false);
+ _items[i].icon.setInitCurPattern(false);
ds.OpenBuffer(res);
ds >> _items[i].icon;
ds.Close();
@@ -108,16 +108,16 @@ void RMInventory::init(void) {
// Puts in the default pattern 1
_items[i].pointer = NULL;
_items[i].status = 1;
- _items[i].icon.SetPattern(1);
+ _items[i].icon.setPattern(1);
_items[i].icon.doFrame(this, false);
curres++;
if (i == 0 || i == 28 || i == 29)
continue;
- _items[i].pointer = new RMGfxSourceBuffer8RLEByteAA[_items[i].icon.NumPattern()];
+ _items[i].pointer = new RMGfxSourceBuffer8RLEByteAA[_items[i].icon.numPattern()];
- for (j = 0; j < _items[i].icon.NumPattern(); j++) {
+ for (j = 0; j < _items[i].icon.numPattern(); j++) {
RMResRaw raw(curres);
assert(raw.IsValid());
@@ -127,8 +127,8 @@ void RMInventory::init(void) {
}
}
- _items[28].icon.SetPattern(1);
- _items[29].icon.SetPattern(1);
+ _items[28].icon.setPattern(1);
+ _items[29].icon.setPattern(1);
// Download interface
RMDataStream ds;
@@ -136,7 +136,7 @@ void RMInventory::init(void) {
assert(res.IsValid());
ds.OpenBuffer(res);
ds >> miniInterface;
- miniInterface.SetPattern(1);
+ miniInterface.setPattern(1);
ds.Close();
// Create the text for hints on the mini interface
@@ -264,7 +264,7 @@ void RMInventory::addItem(int code) {
g_system->lockMutex(_csModifyInterface);
if (_curPos + 8 == _nInv) {
// Break through the inventory! On the flashing pattern
- _items[28].icon.SetPattern(2);
+ _items[28].icon.setPattern(2);
}
_inv[_nInv++] = code - 10000;
@@ -281,7 +281,7 @@ void RMInventory::changeItemStatus(uint32 code, uint32 dwStatus) {
error("Specified object code is not valid");
} else {
g_system->lockMutex(_csModifyInterface);
- _items[code - 10000].icon.SetPattern(dwStatus);
+ _items[code - 10000].icon.setPattern(dwStatus);
_items[code - 10000].status = dwStatus;
prepare();
@@ -355,12 +355,12 @@ bool RMInventory::leftClick(const RMPoint &mpos, int &nCombineObj) {
if (_curPos + 8 >= _nInv) {
_bBlinkingRight = false;
- _items[28].icon.SetPattern(1);
+ _items[28].icon.setPattern(1);
}
if (_curPos > 0) {
_bBlinkingLeft = true;
- _items[29].icon.SetPattern(2);
+ _items[29].icon.setPattern(2);
}
prepare();
@@ -376,12 +376,12 @@ bool RMInventory::leftClick(const RMPoint &mpos, int &nCombineObj) {
if (_curPos == 0) {
_bBlinkingLeft = false;
- _items[29].icon.SetPattern(1);
+ _items[29].icon.setPattern(1);
}
if (_curPos + 8 < _nInv) {
_bBlinkingRight = true;
- _items[28].icon.SetPattern(2);
+ _items[28].icon.setPattern(2);
}
prepare();
@@ -420,12 +420,12 @@ void RMInventory::rightClick(const RMPoint &mpos) {
if (_curPos + 8 <= _nInv) {
_bBlinkingRight = false;
- _items[28].icon.SetPattern(1);
+ _items[28].icon.setPattern(1);
}
if (_curPos > 0) {
_bBlinkingLeft = true;
- _items[29].icon.SetPattern(2);
+ _items[29].icon.setPattern(2);
}
prepare();
@@ -441,12 +441,12 @@ void RMInventory::rightClick(const RMPoint &mpos) {
if (_curPos == 0) {
_bBlinkingLeft = false;
- _items[29].icon.SetPattern(1);
+ _items[29].icon.setPattern(1);
}
if (_curPos + 8 < _nInv) {
_bBlinkingRight = true;
- _items[28].icon.SetPattern(2);
+ _items[28].icon.setPattern(2);
}
prepare();
@@ -495,24 +495,24 @@ void RMInventory::doFrame(RMGfxTargetBuffer &bigBuf, RMPointer &ptr, RMPoint mpo
if ((_state == CLOSING || _state == OPENING || _state == OPENED) && checkPointInside(mpos)) {
if (mpos.x > RM_SX - 64) {
if (_curPos + 8 < _nInv && !_bBlinkingRight) {
- _items[28].icon.SetPattern(3);
+ _items[28].icon.setPattern(3);
_bBlinkingRight = true;
bNeedRedraw = true;
}
} else if (_bBlinkingRight) {
- _items[28].icon.SetPattern(2);
+ _items[28].icon.setPattern(2);
_bBlinkingRight = false;
bNeedRedraw = true;
}
if (mpos.x < 64) {
if (_curPos > 0 && !_bBlinkingLeft) {
- _items[29].icon.SetPattern(3);
+ _items[29].icon.setPattern(3);
_bBlinkingLeft = true;
bNeedRedraw = true;
}
} else if (_bBlinkingLeft) {
- _items[29].icon.SetPattern(2);
+ _items[29].icon.setPattern(2);
_bBlinkingLeft = false;
bNeedRedraw = true;
}
@@ -633,28 +633,28 @@ void RMInventory::doFrame(RMGfxTargetBuffer &bigBuf, RMPointer &ptr, RMPoint mpo
if (mpos.y > starty && mpos.y < starty + 45) {
if (mpos.x > startx && mpos.x < startx + 40) {
if (miniAction != 1) {
- miniInterface.SetPattern(2);
+ miniInterface.setPattern(2);
miniAction = 1;
_vm->playUtilSFX(1);
}
} else if (mpos.x >= startx + 40 && mpos.x < startx + 80) {
if (miniAction != 2) {
- miniInterface.SetPattern(3);
+ miniInterface.setPattern(3);
miniAction = 2;
_vm->playUtilSFX(1);
}
} else if (mpos.x >= startx + 80 && mpos.x < startx + 108) {
if (miniAction != 3) {
- miniInterface.SetPattern(4);
+ miniInterface.setPattern(4);
miniAction = 3;
_vm->playUtilSFX(1);
}
} else {
- miniInterface.SetPattern(1);
+ miniInterface.setPattern(1);
miniAction = 0;
}
} else {
- miniInterface.SetPattern(1);
+ miniInterface.setPattern(1);
miniAction = 0;
}
@@ -729,19 +729,19 @@ int RMInventory::loadState(byte *state) {
if (i < _nItems) {
_items[i].status = x;
- _items[i].icon.SetPattern(x);
+ _items[i].icon.setPattern(x);
}
}
_curPos = 0;
_bCombining = false;
- _items[29].icon.SetPattern(1);
+ _items[29].icon.setPattern(1);
if (_nInv > 8)
- _items[28].icon.SetPattern(2);
+ _items[28].icon.setPattern(2);
else
- _items[28].icon.SetPattern(1);
+ _items[28].icon.setPattern(1);
prepare();
drawOT(Common::nullContext);
diff --git a/engines/tony/inventory.h b/engines/tony/inventory.h
index 6ffb33dd21..d8b20827b4 100644
--- a/engines/tony/inventory.h
+++ b/engines/tony/inventory.h
@@ -123,11 +123,11 @@ public:
// Add an item to the inventory
void addItem(int code);
RMInventory &operator+=(RMItem *item) {
- addItem(item->MpalCode());
+ addItem(item->mpalCode());
return *this;
}
RMInventory &operator+=(RMItem &item) {
- addItem(item.MpalCode());
+ addItem(item.mpalCode());
return *this;
}
RMInventory &operator+=(int code) {
diff --git a/engines/tony/loc.cpp b/engines/tony/loc.cpp
index ae34c577aa..d2688140fb 100644
--- a/engines/tony/loc.cpp
+++ b/engines/tony/loc.cpp
@@ -50,7 +50,7 @@ using namespace ::Tony::MPAL;
* @returns Reference to the data stream
*/
RMDataStream &operator>>(RMDataStream &ds, RMPalette &pal) {
- ds.Read(pal.m_data, 1024);
+ ds.Read(pal._data, 1024);
return ds;
}
@@ -67,26 +67,26 @@ RMDataStream &operator>>(RMDataStream &ds, RMPalette &pal) {
* @returns Reference to the data stream
*/
RMDataStream &operator>>(RMDataStream &ds, RMPattern::RMSlot &slot) {
- slot.ReadFromStream(ds);
+ slot.readFromStream(ds);
return ds;
}
-void RMPattern::RMSlot::ReadFromStream(RMDataStream &ds, bool bLOX) {
+void RMPattern::RMSlot::readFromStream(RMDataStream &ds, bool bLOX) {
byte type;
// Type
ds >> type;
- m_type = (RMPattern::RMSlotType)type;
+ _type = (RMPattern::RMSlotType)type;
// Dati
- ds >> m_data;
+ ds >> _data;
// Posizione
- ds >> m_pos;
+ ds >> _pos;
// Flag generica
- ds >> m_flag;
+ ds >> _flag;
}
@@ -103,159 +103,159 @@ void RMPattern::RMSlot::ReadFromStream(RMDataStream &ds, bool bLOX) {
* @returns Reference to the data stream
*/
RMDataStream &operator>>(RMDataStream &ds, RMPattern &pat) {
- pat.ReadFromStream(ds);
+ pat.readFromStream(ds);
return ds;
}
-void RMPattern::ReadFromStream(RMDataStream &ds, bool bLOX) {
+void RMPattern::readFromStream(RMDataStream &ds, bool bLOX) {
int i;
// Pattern name
if (!bLOX)
- ds >> m_name;
+ ds >> _name;
// Velocity
- ds >> m_speed;
+ ds >> _speed;
// Position
- ds >> m_pos;
+ ds >> _pos;
// Flag for pattern looping
- ds >> m_bLoop;
+ ds >> _bLoop;
// Number of slots
- ds >> m_nSlots;
+ ds >> _nSlots;
// Create and read the slots
- m_slots = new RMSlot[m_nSlots];
+ _slots = new RMSlot[_nSlots];
- for (i = 0; i < m_nSlots && !ds.IsError(); i++) {
+ for (i = 0; i < _nSlots && !ds.IsError(); i++) {
if (bLOX)
- m_slots[i].ReadFromStream(ds, true);
+ _slots[i].readFromStream(ds, true);
else
- m_slots[i].ReadFromStream(ds, false);
+ _slots[i].readFromStream(ds, false);
}
}
-void RMPattern::UpdateCoord(void) {
- m_curPos = m_pos + m_slots[m_nCurSlot].Pos();
+void RMPattern::updateCoord(void) {
+ _curPos = _pos + _slots[_nCurSlot].pos();
}
-void RMPattern::StopSfx(RMSfx *sfx) {
- for (int i = 0; i < m_nSlots; i++) {
- if (m_slots[i].m_type == SOUND) {
- if (sfx[m_slots[i].m_data].m_name[0] == '_')
- sfx[m_slots[i].m_data].Stop();
+void RMPattern::stopSfx(RMSfx *sfx) {
+ for (int i = 0; i < _nSlots; i++) {
+ if (_slots[i]._type == SOUND) {
+ if (sfx[_slots[i]._data]._name[0] == '_')
+ sfx[_slots[i]._data].stop();
else if (GLOBALS.bSkipSfxNoLoop)
- sfx[m_slots[i].m_data].Stop();
+ sfx[_slots[i]._data].stop();
}
}
}
-int RMPattern::Init(RMSfx *sfx, bool bPlayP0, byte *bFlag) {
+int RMPattern::init(RMSfx *sfx, bool bPlayP0, byte *bFlag) {
int i;
// Read the current time
- m_nStartTime = _vm->getTime();
- m_nCurSlot = 0;
+ _nStartTime = _vm->getTime();
+ _nCurSlot = 0;
// Find the first frame of the pattern
i = 0;
- while (m_slots[i].m_type != SPRITE) {
- assert(i + 1 < m_nSlots);
+ while (_slots[i]._type != SPRITE) {
+ assert(i + 1 < _nSlots);
i++;
}
- m_nCurSlot = i;
- m_nCurSprite = m_slots[i].m_data;
+ _nCurSlot = i;
+ _nCurSprite = _slots[i]._data;
if (bFlag)
- *bFlag = m_slots[i].m_flag;
+ *bFlag = _slots[i]._flag;
// Calculate the current coordinates
- UpdateCoord();
+ updateCoord();
// Check for sound:
// If the slot is 0, play
// If speed = 0, must playing unless it goes into loop '_', or if specified by the parameter
// If speed != 0, play only the loop
- for (i = 0; i < m_nSlots; i++) {
- if (m_slots[i].m_type == SOUND) {
+ for (i = 0; i < _nSlots; i++) {
+ if (_slots[i]._type == SOUND) {
if (i == 0) {
- if (sfx[m_slots[i].m_data].m_name[0] == '_') {
- sfx[m_slots[i].m_data].SetVolume(m_slots[i].Pos().x);
- sfx[m_slots[i].m_data].Play(true);
+ if (sfx[_slots[i]._data]._name[0] == '_') {
+ sfx[_slots[i]._data].setVolume(_slots[i].pos().x);
+ sfx[_slots[i]._data].play(true);
} else {
- sfx[m_slots[i].m_data].SetVolume(m_slots[i].Pos().x);
- sfx[m_slots[i].m_data].Play();
+ sfx[_slots[i]._data].setVolume(_slots[i].pos().x);
+ sfx[_slots[i]._data].play();
}
- } else if (m_speed == 0) {
+ } else if (_speed == 0) {
if (bPlayP0) {
- sfx[m_slots[i].m_data].SetVolume(m_slots[i].Pos().x);
- sfx[m_slots[i].m_data].Play();
- } else if (sfx[m_slots[i].m_data].m_name[0] == '_') {
- sfx[m_slots[i].m_data].SetVolume(m_slots[i].Pos().x);
- sfx[m_slots[i].m_data].Play(true);
+ sfx[_slots[i]._data].setVolume(_slots[i].pos().x);
+ sfx[_slots[i]._data].play();
+ } else if (sfx[_slots[i]._data]._name[0] == '_') {
+ sfx[_slots[i]._data].setVolume(_slots[i].pos().x);
+ sfx[_slots[i]._data].play(true);
}
} else {
- if (m_bLoop && sfx[m_slots[i].m_data].m_name[0] == '_') {
- sfx[m_slots[i].m_data].SetVolume(m_slots[i].Pos().x);
- sfx[m_slots[i].m_data].Play(true);
+ if (_bLoop && sfx[_slots[i]._data]._name[0] == '_') {
+ sfx[_slots[i]._data].setVolume(_slots[i].pos().x);
+ sfx[_slots[i]._data].play(true);
}
}
}
}
- return m_nCurSprite;
+ return _nCurSprite;
}
-int RMPattern::Update(uint32 hEndPattern, byte &bFlag, RMSfx *sfx) {
+int RMPattern::update(uint32 hEndPattern, byte &bFlag, RMSfx *sfx) {
int CurTime = _vm->getTime();
// If the speed is 0, then the pattern never advances
- if (m_speed == 0) {
+ if (_speed == 0) {
CoroScheduler.pulseEvent(hEndPattern);
- bFlag = m_slots[m_nCurSlot].m_flag;
- return m_nCurSprite;
+ bFlag = _slots[_nCurSlot]._flag;
+ return _nCurSprite;
}
// Is it time to change the slots?
- while (m_nStartTime + m_speed <= (uint32)CurTime) {
- m_nStartTime += m_speed;
- if (m_slots[m_nCurSlot].m_type == SPRITE)
- m_nCurSlot++;
- if (m_nCurSlot == m_nSlots) {
- m_nCurSlot = 0;
- bFlag = m_slots[m_nCurSlot].m_flag;
+ while (_nStartTime + _speed <= (uint32)CurTime) {
+ _nStartTime += _speed;
+ if (_slots[_nCurSlot]._type == SPRITE)
+ _nCurSlot++;
+ if (_nCurSlot == _nSlots) {
+ _nCurSlot = 0;
+ bFlag = _slots[_nCurSlot]._flag;
CoroScheduler.pulseEvent(hEndPattern);
// @@@ If there is no loop pattern, and there's a warning that it's the final
// frame, then remain on the last frame
- if (!m_bLoop) {
- m_nCurSlot = m_nSlots - 1;
- bFlag = m_slots[m_nCurSlot].m_flag;
- return m_nCurSprite;
+ if (!_bLoop) {
+ _nCurSlot = _nSlots - 1;
+ bFlag = _slots[_nCurSlot]._flag;
+ return _nCurSprite;
}
}
for (;;) {
- switch (m_slots[m_nCurSlot].m_type) {
+ switch (_slots[_nCurSlot]._type) {
case SPRITE:
// Read the next sprite
- m_nCurSprite = m_slots[m_nCurSlot].m_data;
+ _nCurSprite = _slots[_nCurSlot]._data;
// Update the parent & child coordinates
- UpdateCoord();
+ updateCoord();
break;
case SOUND:
if (sfx != NULL) {
- sfx[m_slots[m_nCurSlot].m_data].SetVolume(m_slots[m_nCurSlot].Pos().x);
+ sfx[_slots[_nCurSlot]._data].setVolume(_slots[_nCurSlot].pos().x);
- if (sfx[m_slots[m_nCurSlot].m_data].m_name[0] != '_')
- sfx[m_slots[m_nCurSlot].m_data].Play(false);
+ if (sfx[_slots[_nCurSlot]._data]._name[0] != '_')
+ sfx[_slots[_nCurSlot]._data].play(false);
else
- sfx[m_slots[m_nCurSlot].m_data].Play(true);
+ sfx[_slots[_nCurSlot]._data].play(true);
}
break;
@@ -268,38 +268,35 @@ int RMPattern::Update(uint32 hEndPattern, byte &bFlag, RMSfx *sfx) {
break;
}
- if (m_slots[m_nCurSlot].m_type == SPRITE)
+ if (_slots[_nCurSlot]._type == SPRITE)
break;
- m_nCurSlot++;
+ _nCurSlot++;
}
}
// Return the current sprite
- bFlag = m_slots[m_nCurSlot].m_flag;
- return m_nCurSprite;
+ bFlag = _slots[_nCurSlot]._flag;
+ return _nCurSprite;
}
RMPattern::RMPattern() {
- m_slots = NULL;
- m_speed = 0;
- m_bLoop = 0;
- m_nSlots = 0;
- m_nCurSlot = 0;
- m_nCurSprite = 0;
- m_nStartTime = 0;
- m_slots = NULL;
+ _slots = NULL;
+ _speed = 0;
+ _bLoop = 0;
+ _nSlots = 0;
+ _nCurSlot = 0;
+ _nCurSprite = 0;
+ _nStartTime = 0;
+ _slots = NULL;
}
RMPattern::~RMPattern() {
- if (m_slots != NULL) {
- delete[] m_slots;
- m_slots = NULL;
+ if (_slots != NULL) {
+ delete[] _slots;
+ _slots = NULL;
}
}
-
-
-
/****************************************************************************\
* RMSprite Methods
\****************************************************************************/
@@ -313,12 +310,12 @@ RMPattern::~RMPattern() {
* @returns Reference to the data stream
*/
RMDataStream &operator>>(RMDataStream &ds, RMSprite &sprite) {
- sprite.ReadFromStream(ds);
+ sprite.readFromStream(ds);
return ds;
}
-void RMSprite::Init(RMGfxSourceBuffer *buf) {
- m_buf = buf;
+void RMSprite::init(RMGfxSourceBuffer *buf) {
+ _buf = buf;
}
void RMSprite::LOXGetSizeFromStream(RMDataStream &ds, int *dimx, int *dimy) {
@@ -329,52 +326,52 @@ void RMSprite::LOXGetSizeFromStream(RMDataStream &ds, int *dimx, int *dimy) {
ds.Seek(pos, ds.START);
}
-void RMSprite::GetSizeFromStream(RMDataStream &ds, int *dimx, int *dimy) {
+void RMSprite::getSizeFromStream(RMDataStream &ds, int *dimx, int *dimy) {
int pos = ds.Pos();
- ds >> m_name;
+ ds >> _name;
ds >> *dimx >> *dimy;
ds.Seek(pos, ds.START);
}
-void RMSprite::ReadFromStream(RMDataStream &ds, bool bLOX) {
+void RMSprite::readFromStream(RMDataStream &ds, bool bLOX) {
int dimx, dimy;
// Sprite name
if (!bLOX)
- ds >> m_name;
+ ds >> _name;
// Dimensions
ds >> dimx >> dimy;
// Bounding box
- ds >> m_rcBox;
+ ds >> _rcBox;
// Unused space
if (!bLOX)
ds += 32;
// Create buffer and read
- m_buf->init(ds, dimx, dimy);
+ _buf->init(ds, dimx, dimy);
}
void RMSprite::draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim) {
- m_buf->draw(coroParam, bigBuf, prim);
+ _buf->draw(coroParam, bigBuf, prim);
}
-void RMSprite::SetPalette(byte *buf) {
- ((RMGfxSourceBufferPal *)m_buf)->loadPalette(buf);
+void RMSprite::setPalette(byte *buf) {
+ ((RMGfxSourceBufferPal *)_buf)->loadPalette(buf);
}
RMSprite::RMSprite() {
- m_buf = NULL;
+ _buf = NULL;
}
RMSprite::~RMSprite() {
- if (m_buf) {
- delete m_buf;
- m_buf = NULL;
+ if (_buf) {
+ delete _buf;
+ _buf = NULL;
}
}
@@ -392,17 +389,17 @@ RMSprite::~RMSprite() {
* @returns Reference to the data stream
*/
RMDataStream &operator>>(RMDataStream &ds, RMSfx &sfx) {
- sfx.ReadFromStream(ds);
+ sfx.readFromStream(ds);
return ds;
}
-void RMSfx::ReadFromStream(RMDataStream &ds, bool bLOX) {
+void RMSfx::readFromStream(RMDataStream &ds, bool bLOX) {
char id[4];
int size;
byte *raw;
// sfx name
- ds >> m_name;
+ ds >> _name;
ds >> size;
@@ -420,51 +417,51 @@ void RMSfx::ReadFromStream(RMDataStream &ds, bool bLOX) {
ds.Read(raw, size);
// Create the sound effect
- m_fx = _vm->createSFX(raw);
- m_fx->SetLoop(false);
+ _fx = _vm->createSFX(raw);
+ _fx->SetLoop(false);
// Close the read buffer which is no longer needed
delete[] raw;
}
RMSfx::RMSfx() {
- m_fx = NULL;
- m_bPlayingLoop = false;
+ _fx = NULL;
+ _bPlayingLoop = false;
}
RMSfx::~RMSfx() {
- if (m_fx) {
- m_fx->Release();
- m_fx = NULL;
+ if (_fx) {
+ _fx->Release();
+ _fx = NULL;
}
}
-void RMSfx::Play(bool bLoop) {
- if (m_fx && !m_bPlayingLoop) {
- m_fx->SetLoop(bLoop);
- m_fx->Play();
+void RMSfx::play(bool bLoop) {
+ if (_fx && !_bPlayingLoop) {
+ _fx->SetLoop(bLoop);
+ _fx->Play();
if (bLoop)
- m_bPlayingLoop = true;
+ _bPlayingLoop = true;
}
}
-void RMSfx::SetVolume(int vol) {
- if (m_fx) {
- m_fx->SetVolume(vol);
+void RMSfx::setVolume(int vol) {
+ if (_fx) {
+ _fx->SetVolume(vol);
}
}
-void RMSfx::Pause(bool bPause) {
- if (m_fx) {
- m_fx->Pause(bPause);
+void RMSfx::pause(bool bPause) {
+ if (_fx) {
+ _fx->Pause(bPause);
}
}
-void RMSfx::Stop(void) {
- if (m_fx) {
- m_fx->Stop();
- m_bPlayingLoop = false;
+void RMSfx::stop(void) {
+ if (_fx) {
+ _fx->Stop();
+ _bPlayingLoop = false;
}
}
@@ -483,24 +480,24 @@ void RMSfx::Stop(void) {
* @returns Reference to the data stream
*/
RMDataStream &operator>>(RMDataStream &ds, RMItem &item) {
- item.ReadFromStream(ds);
+ item.readFromStream(ds);
return ds;
}
-RMGfxSourceBuffer *RMItem::NewItemSpriteBuffer(int dimx, int dimy, bool bPreRLE) {
- if (m_cm == CM_256) {
+RMGfxSourceBuffer *RMItem::newItemSpriteBuffer(int dimx, int dimy, bool bPreRLE) {
+ if (_cm == CM_256) {
RMGfxSourceBuffer8RLE *spr;
- if (m_FX == 2) { // AB
+ if (_FX == 2) { // AB
spr = new RMGfxSourceBuffer8RLEWordAB;
- } else if (m_FX == 1) { // OMBRA+AA
+ } else if (_FX == 1) { // OMBRA+AA
if (dimx == -1 || dimx > 255)
spr = new RMGfxSourceBuffer8RLEWordAA;
else
spr = new RMGfxSourceBuffer8RLEByteAA;
- spr->setAlphaBlendColor(m_FXparm);
+ spr->setAlphaBlendColor(_FXparm);
if (bPreRLE)
spr->setAlreadyCompressed();
} else {
@@ -518,17 +515,17 @@ RMGfxSourceBuffer *RMItem::NewItemSpriteBuffer(int dimx, int dimy, bool bPreRLE)
return new RMGfxSourceBuffer16;
}
-bool RMItem::IsIn(const RMPoint &pt, int *size) {
+bool RMItem::isIn(const RMPoint &pt, int *size) {
RMRect rc;
- if (!m_bIsActive)
+ if (!_bIsActive)
return false;
// Search for the right bounding box to use - use the sprite's if it has one, otherwise use the generic one
- if (m_nCurPattern != 0 && !m_sprites[m_nCurSprite].m_rcBox.IsEmpty())
- rc = m_sprites[m_nCurSprite].m_rcBox + CalculatePos();
- else if (!m_rcBox.IsEmpty())
- rc = m_rcBox;
+ if (_nCurPattern != 0 && !_sprites[_nCurSprite]._rcBox.IsEmpty())
+ rc = _sprites[_nCurSprite]._rcBox + calculatePos();
+ else if (!_rcBox.IsEmpty())
+ rc = _rcBox;
// If no box, return immediately
else
return false;
@@ -536,153 +533,152 @@ bool RMItem::IsIn(const RMPoint &pt, int *size) {
if (size != NULL)
*size = rc.Size();
- return rc.PtInRect(pt + m_curScroll);
+ return rc.PtInRect(pt + _curScroll);
}
-
-void RMItem::ReadFromStream(RMDataStream &ds, bool bLOX) {
+void RMItem::readFromStream(RMDataStream &ds, bool bLOX) {
int i, dimx, dimy;
byte cm;
// MPAL code
- ds >> m_mpalCode;
+ ds >> _mpalCode;
// Object name
- ds >> m_name;
+ ds >> _name;
// Z (signed)
- ds >> m_z;
+ ds >> _z;
// Parent position
- ds >> m_pos;
+ ds >> _pos;
// Hotspot
- ds >> m_hot;
+ ds >> _hot;
// Bounding box
- ds >> m_rcBox;
+ ds >> _rcBox;
// Number of sprites, sound effects, and patterns
- ds >> m_nSprites >> m_nSfx >> m_nPatterns;
+ ds >> _nSprites >> _nSfx >> _nPatterns;
// Color mode
ds >> cm;
- m_cm = (RMColorMode)cm;
+ _cm = (RMColorMode)cm;
// Flag for the presence of custom palette differences
- ds >> m_bPal;
+ ds >> _bPal;
- if (m_cm == CM_256) {
+ if (_cm == CM_256) {
// If there is a palette, read it in
- if (m_bPal)
- ds >> m_pal;
+ if (_bPal)
+ ds >> _pal;
}
// MPAL data
if (!bLOX)
ds += 20;
- ds >> m_FX;
- ds >> m_FXparm;
+ ds >> _FX;
+ ds >> _FXparm;
if (!bLOX)
ds += 106;
// Create sub-classes
- if (m_nSprites > 0)
- m_sprites = new RMSprite[m_nSprites];
- if (m_nSfx > 0)
- m_sfx = new RMSfx[m_nSfx];
- m_patterns = new RMPattern[m_nPatterns + 1];
+ if (_nSprites > 0)
+ _sprites = new RMSprite[_nSprites];
+ if (_nSfx > 0)
+ _sfx = new RMSfx[_nSfx];
+ _patterns = new RMPattern[_nPatterns + 1];
// Read in class data
if (!ds.IsError())
- for (i = 0; i < m_nSprites && !ds.IsError(); i++) {
+ for (i = 0; i < _nSprites && !ds.IsError(); i++) {
// Download the sprites
if (bLOX) {
- m_sprites[i].LOXGetSizeFromStream(ds, &dimx, &dimy);
- m_sprites[i].Init(NewItemSpriteBuffer(dimx, dimy, true));
- m_sprites[i].ReadFromStream(ds, true);
+ _sprites[i].LOXGetSizeFromStream(ds, &dimx, &dimy);
+ _sprites[i].init(newItemSpriteBuffer(dimx, dimy, true));
+ _sprites[i].readFromStream(ds, true);
} else {
- m_sprites[i].GetSizeFromStream(ds, &dimx, &dimy);
- m_sprites[i].Init(NewItemSpriteBuffer(dimx, dimy, false));
- m_sprites[i].ReadFromStream(ds, false);
+ _sprites[i].getSizeFromStream(ds, &dimx, &dimy);
+ _sprites[i].init(newItemSpriteBuffer(dimx, dimy, false));
+ _sprites[i].readFromStream(ds, false);
}
- if (m_cm == CM_256 && m_bPal)
- m_sprites[i].SetPalette(m_pal.m_data);
+ if (_cm == CM_256 && _bPal)
+ _sprites[i].setPalette(_pal._data);
}
if (!ds.IsError())
- for (i = 0; i < m_nSfx && !ds.IsError(); i++) {
+ for (i = 0; i < _nSfx && !ds.IsError(); i++) {
if (bLOX)
- m_sfx[i].ReadFromStream(ds, true);
+ _sfx[i].readFromStream(ds, true);
else
- m_sfx[i].ReadFromStream(ds, false);
+ _sfx[i].readFromStream(ds, false);
}
// Read the pattern from pattern 1
if (!ds.IsError())
- for (i = 1; i <= m_nPatterns && !ds.IsError(); i++) {
+ for (i = 1; i <= _nPatterns && !ds.IsError(); i++) {
if (bLOX)
- m_patterns[i].ReadFromStream(ds, true);
+ _patterns[i].readFromStream(ds, true);
else
- m_patterns[i].ReadFromStream(ds, false);
+ _patterns[i].readFromStream(ds, false);
}
// Initialise the current pattern
- if (m_bInitCurPattern)
- SetPattern(mpalQueryItemPattern(m_mpalCode));
+ if (_bInitCurPattern)
+ setPattern(mpalQueryItemPattern(_mpalCode));
// Initailise the current activation state
- m_bIsActive = mpalQueryItemIsActive(m_mpalCode);
+ _bIsActive = mpalQueryItemIsActive(_mpalCode);
}
-RMGfxPrimitive *RMItem::NewItemPrimitive() {
+RMGfxPrimitive *RMItem::newItemPrimitive() {
return new RMGfxPrimitive(this);
}
-void RMItem::SetScrollPosition(const RMPoint &scroll) {
- m_curScroll = scroll;
+void RMItem::setScrollPosition(const RMPoint &scroll) {
+ _curScroll = scroll;
}
bool RMItem::doFrame(RMGfxTargetBuffer *bigBuf, bool bAddToList) {
- int oldSprite = m_nCurSprite;
+ int oldSprite = _nCurSprite;
// Pattern 0 = Do not draw anything!
- if (m_nCurPattern == 0)
+ if (_nCurPattern == 0)
return false;
// We do an update of the pattern, which also returns the current frame
- if (m_nCurPattern != 0) {
- m_nCurSprite = m_patterns[m_nCurPattern].Update(m_hEndPattern, m_bCurFlag, m_sfx);
+ if (_nCurPattern != 0) {
+ _nCurSprite = _patterns[_nCurPattern].update(_hEndPattern, _bCurFlag, _sfx);
// WORKAROUND: Currently, m_nCurSprite = -1 is used to flag that an item should be removed.
// However, this seems to be done inside a process waiting on an event pulsed inside the pattern
// Update method. So the value of m_nCurSprite = -1 is being destroyed with the return value
// replacing it. It may be that the current coroutine PulseEvent implementation is wrong somehow.
// In any case, a special check here is done for items that have ended
- if (m_nCurPattern == 0)
- m_nCurSprite = -1;
+ if (_nCurPattern == 0)
+ _nCurSprite = -1;
}
// If the function returned -1, it means that the pattern has finished
- if (m_nCurSprite == -1) {
+ if (_nCurSprite == -1) {
// We have pattern 0, so leave. The class will self de-register from the OT list
- m_nCurPattern = 0;
+ _nCurPattern = 0;
return false;
}
// If we are not in the OT list, add ourselves
if (!_nInList && bAddToList)
- bigBuf->addPrim(NewItemPrimitive());
+ bigBuf->addPrim(newItemPrimitive());
- return oldSprite != m_nCurSprite;
+ return oldSprite != _nCurSprite;
}
-RMPoint RMItem::CalculatePos(void) {
- return m_pos + m_patterns[m_nCurPattern].Pos();
+RMPoint RMItem::calculatePos(void) {
+ return _pos + _patterns[_nCurPattern].pos();
}
void RMItem::draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim) {
@@ -692,24 +688,24 @@ void RMItem::draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim) {
CORO_BEGIN_CODE(_ctx);
// If CurSprite == -1, then the pattern is finished
- if (m_nCurSprite == -1)
+ if (_nCurSprite == -1)
return;
// Set the flag
- prim->setFlag(m_bCurFlag);
+ prim->setFlag(_bCurFlag);
// Offset direction for scrolling
- prim->Dst().Offset(-m_curScroll);
+ prim->Dst().Offset(-_curScroll);
// We must offset the cordinates of the item inside the primitive
// It is estimated as nonno + (babbo + figlio)
- prim->Dst().Offset(CalculatePos());
+ prim->Dst().Offset(calculatePos());
// No stretching, please
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(_sprites[_nCurSprite].draw, bigBuf, prim);
CORO_END_CODE;
}
@@ -717,45 +713,45 @@ void RMItem::draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim) {
void RMItem::removeThis(CORO_PARAM, bool &result) {
// Remove from the OT list if the current frame is -1 (pattern over)
- result = (m_nCurSprite == -1);
+ result = (_nCurSprite == -1);
}
-void RMItem::SetStatus(int nStatus) {
- m_bIsActive = (nStatus > 0);
+void RMItem::setStatus(int nStatus) {
+ _bIsActive = (nStatus > 0);
}
-void RMItem::SetPattern(int nPattern, bool bPlayP0) {
+void RMItem::setPattern(int nPattern, bool bPlayP0) {
int i;
- assert(nPattern >= 0 && nPattern <= m_nPatterns);
+ assert(nPattern >= 0 && nPattern <= _nPatterns);
- if (m_sfx)
- if (m_nCurPattern > 0)
- m_patterns[m_nCurPattern].StopSfx(m_sfx);
+ if (_sfx)
+ if (_nCurPattern > 0)
+ _patterns[_nCurPattern].stopSfx(_sfx);
// Remember the current pattern
- m_nCurPattern = nPattern;
+ _nCurPattern = nPattern;
// Start the pattern to start the animation
- if (m_nCurPattern != 0)
- m_nCurSprite = m_patterns[m_nCurPattern].Init(m_sfx, bPlayP0, &m_bCurFlag);
+ if (_nCurPattern != 0)
+ _nCurSprite = _patterns[_nCurPattern].init(_sfx, bPlayP0, &_bCurFlag);
else {
- m_nCurSprite = -1;
+ _nCurSprite = -1;
// Look for the sound effect for pattern 0
if (bPlayP0)
- for (i = 0; i < m_nSfx; i++)
- if (strcmp(m_sfx[i].m_name, "p0") == 0)
- m_sfx[i].Play();
+ for (i = 0; i < _nSfx; i++)
+ if (strcmp(_sfx[i]._name, "p0") == 0)
+ _sfx[i].play();
}
}
-bool RMItem::GetName(RMString &name) {
+bool RMItem::getName(RMString &name) {
char buf[256];
- mpalQueryItemName(m_mpalCode, buf);
+ mpalQueryItemName(_mpalCode, buf);
name = buf;
if (buf[0] == '\0')
return false;
@@ -763,64 +759,64 @@ bool RMItem::GetName(RMString &name) {
}
-void RMItem::Unload(void) {
- if (m_patterns != NULL) {
- delete[] m_patterns;
- m_patterns = NULL;
+void RMItem::unload(void) {
+ if (_patterns != NULL) {
+ delete[] _patterns;
+ _patterns = NULL;
}
- if (m_sprites != NULL) {
- delete[] m_sprites;
- m_sprites = NULL;
+ if (_sprites != NULL) {
+ delete[] _sprites;
+ _sprites = NULL;
}
- if (m_sfx != NULL) {
- delete[] m_sfx;
- m_sfx = NULL;
+ if (_sfx != NULL) {
+ delete[] _sfx;
+ _sfx = NULL;
}
}
RMItem::RMItem() {
- m_bCurFlag = 0;
- m_patterns = NULL;
- m_sprites = NULL;
- m_sfx = NULL;
- m_curScroll.Set(0, 0);
- m_bInitCurPattern = true;
- m_nCurPattern = 0;
- m_z = 0;
- m_cm = CM_256;
- m_FX = 0;
- m_FXparm = 0;
- m_mpalCode = 0;
- m_nSprites = 0;
- m_nSfx = 0;
- m_nPatterns = 0;
- m_bPal = 0;
- m_nCurSprite = 0;
-
- m_hEndPattern = CoroScheduler.createEvent(false, false);
+ _bCurFlag = 0;
+ _patterns = NULL;
+ _sprites = NULL;
+ _sfx = NULL;
+ _curScroll.Set(0, 0);
+ _bInitCurPattern = true;
+ _nCurPattern = 0;
+ _z = 0;
+ _cm = CM_256;
+ _FX = 0;
+ _FXparm = 0;
+ _mpalCode = 0;
+ _nSprites = 0;
+ _nSfx = 0;
+ _nPatterns = 0;
+ _bPal = 0;
+ _nCurSprite = 0;
+
+ _hEndPattern = CoroScheduler.createEvent(false, false);
}
RMItem::~RMItem() {
- Unload();
- CoroScheduler.closeEvent(m_hEndPattern);
+ unload();
+ CoroScheduler.closeEvent(_hEndPattern);
}
-void RMItem::WaitForEndPattern(CORO_PARAM, uint32 hCustomSkip) {
+void RMItem::waitForEndPattern(CORO_PARAM, uint32 hCustomSkip) {
CORO_BEGIN_CONTEXT;
uint32 h[2];
CORO_END_CONTEXT(_ctx);
CORO_BEGIN_CODE(_ctx);
- if (m_nCurPattern != 0) {
+ if (_nCurPattern != 0) {
if (hCustomSkip == CORO_INVALID_PID_VALUE)
- CORO_INVOKE_2(CoroScheduler.waitForSingleObject, m_hEndPattern, CORO_INFINITE);
+ CORO_INVOKE_2(CoroScheduler.waitForSingleObject, _hEndPattern, CORO_INFINITE);
else {
_ctx->h[0] = hCustomSkip;
- _ctx->h[1] = m_hEndPattern;
+ _ctx->h[1] = _hEndPattern;
CORO_INVOKE_4(CoroScheduler.waitForMultipleObjects, 2, &_ctx->h[0], false, CORO_INFINITE);
}
}
@@ -828,20 +824,20 @@ void RMItem::WaitForEndPattern(CORO_PARAM, uint32 hCustomSkip) {
CORO_END_CODE;
}
-void RMItem::ChangeHotspot(const RMPoint &pt) {
- m_hot = pt;
+void RMItem::changeHotspot(const RMPoint &pt) {
+ _hot = pt;
}
-void RMItem::PlaySfx(int nSfx) {
- if (nSfx < m_nSfx)
- m_sfx[nSfx].Play();
+void RMItem::playSfx(int nSfx) {
+ if (nSfx < _nSfx)
+ _sfx[nSfx].play();
}
-void RMItem::PauseSound(bool bPause) {
+void RMItem::pauseSound(bool bPause) {
int i;
- for (i = 0; i < m_nSfx; i++)
- m_sfx[i].Pause(bPause);
+ for (i = 0; i < _nSfx; i++)
+ _sfx[i].pause(bPause);
}
@@ -852,13 +848,13 @@ void RMItem::PauseSound(bool bPause) {
RMWipe::RMWipe() {
- m_hUnregistered = CoroScheduler.createEvent(false, false);
- m_hEndOfFade = CoroScheduler.createEvent(false, false);
+ _hUnregistered = CoroScheduler.createEvent(false, false);
+ _hEndOfFade = CoroScheduler.createEvent(false, false);
}
RMWipe::~RMWipe() {
- CoroScheduler.closeEvent(m_hUnregistered);
- CoroScheduler.closeEvent(m_hEndOfFade);
+ CoroScheduler.closeEvent(_hUnregistered);
+ CoroScheduler.closeEvent(_hEndOfFade);
}
int RMWipe::priority(void) {
@@ -868,23 +864,23 @@ int RMWipe::priority(void) {
void RMWipe::Unregister(void) {
RMGfxTask::Unregister();
assert(_nInList == 0);
- CoroScheduler.setEvent(m_hUnregistered);
+ CoroScheduler.setEvent(_hUnregistered);
}
void RMWipe::removeThis(CORO_PARAM, bool &result) {
- result = m_bUnregister;
+ result = _bUnregister;
}
-void RMWipe::WaitForFadeEnd(CORO_PARAM) {
+void RMWipe::waitForFadeEnd(CORO_PARAM) {
CORO_BEGIN_CONTEXT;
CORO_END_CONTEXT(_ctx);
CORO_BEGIN_CODE(_ctx);
- CORO_INVOKE_2(CoroScheduler.waitForSingleObject, m_hEndOfFade, CORO_INFINITE);
+ CORO_INVOKE_2(CoroScheduler.waitForSingleObject, _hEndOfFade, CORO_INFINITE);
- m_bEndFade = true;
- m_bFading = false;
+ _bEndFade = true;
+ _bFading = false;
CORO_INVOKE_0(mainWaitFrame);
CORO_INVOKE_0(mainWaitFrame);
@@ -892,44 +888,44 @@ void RMWipe::WaitForFadeEnd(CORO_PARAM) {
CORO_END_CODE;
}
-void RMWipe::CloseFade(void) {
- m_wip0r.Unload();
+void RMWipe::closeFade(void) {
+ _wip0r.unload();
}
-void RMWipe::InitFade(int type) {
+void RMWipe::initFade(int type) {
// Activate the fade
- m_bUnregister = false;
- m_bEndFade = false;
+ _bUnregister = false;
+ _bEndFade = false;
- m_nFadeStep = 0;
+ _nFadeStep = 0;
- m_bMustRegister = true;
+ _bMustRegister = true;
RMRes res(RES_W_CERCHIO);
RMDataStream ds;
ds.OpenBuffer(res);
- ds >> m_wip0r;
+ ds >> _wip0r;
ds.Close();
- m_wip0r.SetPattern(1);
+ _wip0r.setPattern(1);
- m_bFading = true;
+ _bFading = true;
}
-void RMWipe::DoFrame(RMGfxTargetBuffer &bigBuf) {
- if (m_bMustRegister) {
+void RMWipe::doFrame(RMGfxTargetBuffer &bigBuf) {
+ if (_bMustRegister) {
bigBuf.addPrim(new RMGfxPrimitive(this));
- m_bMustRegister = false;
+ _bMustRegister = false;
}
- if (m_bFading) {
- m_wip0r.doFrame(&bigBuf, false);
+ if (_bFading) {
+ _wip0r.doFrame(&bigBuf, false);
- m_nFadeStep++;
+ _nFadeStep++;
- if (m_nFadeStep == 10) {
- CoroScheduler.setEvent(m_hEndOfFade);
+ if (_nFadeStep == 10) {
+ CoroScheduler.setEvent(_hEndOfFade);
}
}
}
@@ -940,18 +936,16 @@ void RMWipe::draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim) {
CORO_BEGIN_CODE(_ctx);
- if (m_bFading) {
- CORO_INVOKE_2(m_wip0r.draw, bigBuf, prim);
+ if (_bFading) {
+ CORO_INVOKE_2(_wip0r.draw, bigBuf, prim);
}
- if (m_bEndFade)
+ if (_bEndFade)
Common::fill((byte *)bigBuf, (byte *)bigBuf + bigBuf.getDimx() * bigBuf.getDimy() * 2, 0x0);
CORO_END_CODE;
}
-
-
/****************************************************************************\
* RMCharacter Methods
\****************************************************************************/
@@ -961,7 +955,7 @@ void RMWipe::draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim) {
/* Returns path along the vector path path[] */
/****************************************************************************/
-short RMCharacter::FindPath(short source, short destination) {
+short RMCharacter::findPath(short source, short destination) {
static RMBox BOX[MAXBOXES]; // Matrix of adjacent boxes
static short COSTO[MAXBOXES]; // Cost per node
static short VALIDO[MAXBOXES]; // 0:Invalid 1:Valid 2:Saturated
@@ -977,7 +971,7 @@ short RMCharacter::FindPath(short source, short destination) {
}
// Get the boxes
- cur = theBoxes->GetBoxes(curLocation);
+ cur = theBoxes->getBoxes(curLocation);
// Make a backup copy to work on
for (i = 0; i < cur->numbbox; i++)
@@ -1055,22 +1049,22 @@ short RMCharacter::FindPath(short source, short destination) {
}
-void RMCharacter::GoTo(CORO_PARAM, RMPoint destcoord, bool bReversed) {
+void RMCharacter::goTo(CORO_PARAM, RMPoint destcoord, bool bReversed) {
CORO_BEGIN_CONTEXT;
CORO_END_CONTEXT(_ctx);
CORO_BEGIN_CODE(_ctx);
- if (m_pos == destcoord) {
+ if (_pos == destcoord) {
if (minpath == 0) {
- CORO_INVOKE_0(Stop);
+ CORO_INVOKE_0(stop);
CoroScheduler.pulseEvent(hEndOfPath);
return;
}
}
status = WALK;
- linestart = m_pos;
+ linestart = _pos;
lineend = destcoord;
dx = linestart.x - lineend.x;
dy = linestart.y - lineend.y;
@@ -1085,7 +1079,7 @@ void RMCharacter::GoTo(CORO_PARAM, RMPoint destcoord, bool bReversed) {
while (0) ;
}
- int nPatt = GetCurPattern();
+ int nPatt = getCurPattern();
if (dx > dy) {
slope = fy / fx;
@@ -1097,10 +1091,10 @@ void RMCharacter::GoTo(CORO_PARAM, RMPoint destcoord, bool bReversed) {
bNeedToStop = true;
if ((walkspeed < 0 && !bReversed) || (walkspeed >= 0 && bReversed)) {
if (nPatt != PAT_WALKLEFT)
- SetPattern(PAT_WALKLEFT);
+ setPattern(PAT_WALKLEFT);
} else {
if (nPatt != PAT_WALKRIGHT)
- SetPattern(PAT_WALKRIGHT);
+ setPattern(PAT_WALKRIGHT);
}
} else {
slope = fx / fy;
@@ -1111,10 +1105,10 @@ void RMCharacter::GoTo(CORO_PARAM, RMPoint destcoord, bool bReversed) {
bNeedToStop = true;
if ((walkspeed < 0 && !bReversed) || (walkspeed >= 0 && bReversed)) {
if (nPatt != PAT_WALKUP)
- SetPattern(PAT_WALKUP);
+ setPattern(PAT_WALKUP);
} else {
if (nPatt != PAT_WALKDOWN)
- SetPattern(PAT_WALKDOWN);
+ setPattern(PAT_WALKDOWN);
}
}
@@ -1125,7 +1119,7 @@ void RMCharacter::GoTo(CORO_PARAM, RMPoint destcoord, bool bReversed) {
}
-RMPoint RMCharacter::Searching(char UP, char DOWN, char RIGHT, char LEFT, RMPoint punto) {
+RMPoint RMCharacter::searching(char UP, char DOWN, char RIGHT, char LEFT, RMPoint punto) {
short passi, minimo;
RMPoint nuovo, trovato;
minimo = 32000;
@@ -1133,12 +1127,12 @@ RMPoint RMCharacter::Searching(char UP, char DOWN, char RIGHT, char LEFT, RMPoin
if (UP) {
nuovo = punto;
passi = 0;
- while ((InWhichBox(nuovo) == -1) && (nuovo.y >= 0)) {
+ while ((inWhichBox(nuovo) == -1) && (nuovo.y >= 0)) {
nuovo.y--;
passi++;
}
- if ((InWhichBox(nuovo) != -1) && (passi < minimo) &&
- FindPath(InWhichBox(m_pos), InWhichBox(nuovo))) {
+ if ((inWhichBox(nuovo) != -1) && (passi < minimo) &&
+ findPath(inWhichBox(_pos), inWhichBox(nuovo))) {
minimo = passi;
nuovo.y--; // to avoid error?
trovato = nuovo;
@@ -1148,12 +1142,12 @@ RMPoint RMCharacter::Searching(char UP, char DOWN, char RIGHT, char LEFT, RMPoin
if (DOWN) {
nuovo = punto;
passi = 0;
- while ((InWhichBox(nuovo) == -1) && (nuovo.y < 480)) {
+ while ((inWhichBox(nuovo) == -1) && (nuovo.y < 480)) {
nuovo.y++;
passi++;
}
- if ((InWhichBox(nuovo) != -1) && (passi < minimo) &&
- FindPath(InWhichBox(m_pos), InWhichBox(nuovo))) {
+ if ((inWhichBox(nuovo) != -1) && (passi < minimo) &&
+ findPath(inWhichBox(_pos), inWhichBox(nuovo))) {
minimo = passi;
nuovo.y++; // to avoid error?
trovato = nuovo;
@@ -1163,12 +1157,12 @@ RMPoint RMCharacter::Searching(char UP, char DOWN, char RIGHT, char LEFT, RMPoin
if (RIGHT) {
nuovo = punto;
passi = 0;
- while ((InWhichBox(nuovo) == -1) && (nuovo.x < 640)) {
+ while ((inWhichBox(nuovo) == -1) && (nuovo.x < 640)) {
nuovo.x++;
passi++;
}
- if ((InWhichBox(nuovo) != -1) && (passi < minimo) &&
- FindPath(InWhichBox(m_pos), InWhichBox(nuovo))) {
+ if ((inWhichBox(nuovo) != -1) && (passi < minimo) &&
+ findPath(inWhichBox(_pos), inWhichBox(nuovo))) {
minimo = passi;
nuovo.x++; // to avoid error?
trovato = nuovo;
@@ -1178,12 +1172,12 @@ RMPoint RMCharacter::Searching(char UP, char DOWN, char RIGHT, char LEFT, RMPoin
if (LEFT) {
nuovo = punto;
passi = 0;
- while ((InWhichBox(nuovo) == -1) && (nuovo.x >= 0)) {
+ while ((inWhichBox(nuovo) == -1) && (nuovo.x >= 0)) {
nuovo.x--;
passi++;
}
- if ((InWhichBox(nuovo) != -1) && (passi < minimo) &&
- FindPath(InWhichBox(m_pos), InWhichBox(nuovo))) {
+ if ((inWhichBox(nuovo) != -1) && (passi < minimo) &&
+ findPath(inWhichBox(_pos), inWhichBox(nuovo))) {
minimo = passi;
nuovo.x--; // to avoid error?
trovato = nuovo;
@@ -1195,18 +1189,18 @@ RMPoint RMCharacter::Searching(char UP, char DOWN, char RIGHT, char LEFT, RMPoin
}
-RMPoint RMCharacter::NearestPoint(const RMPoint &punto) {
- return Searching(1, 1, 1, 1, punto);
+RMPoint RMCharacter::nearestPoint(const RMPoint &punto) {
+ return searching(1, 1, 1, 1, punto);
}
-short RMCharacter::ScanLine(const RMPoint &punto) {
+short RMCharacter::scanLine(const RMPoint &punto) {
int Ldx, Ldy, Lcount;
float Lfx, Lfy, Lslope;
RMPoint Lstart, Lend, Lscan;
signed char Lspeed, Lstatus;
- Lstart = m_pos;
+ Lstart = _pos;
Lend = punto;
Ldx = Lstart.x - Lend.x;
Ldy = Lstart.y - Lend.y;
@@ -1228,7 +1222,7 @@ short RMCharacter::ScanLine(const RMPoint &punto) {
}
Lscan = Lstart; // Start scanning
- while (InWhichBox(Lscan) != -1) {
+ while (inWhichBox(Lscan) != -1) {
Lcount++;
if (Lstatus) {
Ldx = Lspeed * Lcount;
@@ -1250,14 +1244,14 @@ short RMCharacter::ScanLine(const RMPoint &punto) {
/**
* Calculates intersections between the straight line and the closest BBOX
*/
-RMPoint RMCharacter::InvScanLine(const RMPoint &punto) {
+RMPoint RMCharacter::invScanLine(const RMPoint &punto) {
int Ldx, Ldy, Lcount;
float Lfx, Lfy, Lslope;
RMPoint Lstart, Lend, Lscan;
signed char Lspeed, Lstatus, Lbox = -1;
Lstart = punto; // Exchange!
- Lend = m_pos; // :-)
+ Lend = _pos; // :-)
Ldx = Lstart.x - Lend.x;
Ldy = Lstart.y - Lend.y;
Lfx = Ldx;
@@ -1279,12 +1273,12 @@ RMPoint RMCharacter::InvScanLine(const RMPoint &punto) {
Lscan = Lstart;
for (;;) {
- if (InWhichBox(Lscan) != -1) {
- if (InWhichBox(Lscan) != Lbox) {
- if (InWhichBox(m_pos) == InWhichBox(Lscan) || FindPath(InWhichBox(m_pos), InWhichBox(Lscan)))
+ if (inWhichBox(Lscan) != -1) {
+ if (inWhichBox(Lscan) != Lbox) {
+ if (inWhichBox(_pos) == inWhichBox(Lscan) || findPath(inWhichBox(_pos), inWhichBox(Lscan)))
return Lscan;
else
- Lbox = InWhichBox(Lscan);
+ Lbox = inWhichBox(Lscan);
}
}
@@ -1310,17 +1304,17 @@ RMPoint RMCharacter::InvScanLine(const RMPoint &punto) {
* Returns the HotSpot coordinate closest to the player
*/
-RMPoint RMCharacter::NearestHotSpot(int sourcebox, int destbox) {
+RMPoint RMCharacter::nearestHotSpot(int sourcebox, int destbox) {
RMPoint puntocaldo;
short cc;
int x, y, distanzaminima;
distanzaminima = 10000000;
- RMBoxLoc *cur = theBoxes->GetBoxes(curLocation);
+ RMBoxLoc *cur = theBoxes->getBoxes(curLocation);
for (cc = 0; cc < cur->boxes[sourcebox].numhotspot; cc++)
if ((cur->boxes[sourcebox].hotspot[cc].destination) == destbox) {
- x = ABS(cur->boxes[sourcebox].hotspot[cc].hotx - m_pos.x);
- y = ABS(cur->boxes[sourcebox].hotspot[cc].hoty - m_pos.y);
+ x = ABS(cur->boxes[sourcebox].hotspot[cc].hotx - _pos.x);
+ y = ABS(cur->boxes[sourcebox].hotspot[cc].hoty - _pos.y);
if ((x * x + y * y) < distanzaminima) {
distanzaminima = x * x + y * y;
@@ -1339,7 +1333,7 @@ void RMCharacter::draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *pr
CORO_BEGIN_CODE(_ctx);
if (bDrawNow) {
- prim->Dst() += m_fixedScroll;
+ prim->Dst() += _fixedScroll;
CORO_INVOKE_2(RMItem::draw, bigBuf, prim);
}
@@ -1347,39 +1341,39 @@ void RMCharacter::draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *pr
CORO_END_CODE;
}
-void RMCharacter::NewBoxEntered(int nBox) {
+void RMCharacter::newBoxEntered(int nBox) {
RMBoxLoc *cur;
bool bOldReverse;
// Recall on ExitBox
mpalQueryDoAction(3, curLocation, curbox);
- cur = theBoxes->GetBoxes(curLocation);
+ cur = theBoxes->getBoxes(curLocation);
bOldReverse = cur->boxes[curbox].bReversed;
curbox = nBox;
// If Z is changed, we must remove it from the OT
- if (cur->boxes[curbox].Zvalue != m_z) {
+ if (cur->boxes[curbox].Zvalue != _z) {
bRemoveFromOT = true;
- m_z = cur->boxes[curbox].Zvalue;
+ _z = cur->boxes[curbox].Zvalue;
}
// Movement management is reversed, only if we are not in the shortest path. If we are in the shortest
// path, directly do the DoFrame
if (bMovingWithoutMinpath) {
if ((cur->boxes[curbox].bReversed && !bOldReverse) || (!cur->boxes[curbox].bReversed && bOldReverse)) {
- switch (GetCurPattern()) {
+ switch (getCurPattern()) {
case PAT_WALKUP:
- SetPattern(PAT_WALKDOWN);
+ setPattern(PAT_WALKDOWN);
break;
case PAT_WALKDOWN:
- SetPattern(PAT_WALKUP);
+ setPattern(PAT_WALKUP);
break;
case PAT_WALKRIGHT:
- SetPattern(PAT_WALKLEFT);
+ setPattern(PAT_WALKLEFT);
break;
case PAT_WALKLEFT:
- SetPattern(PAT_WALKRIGHT);
+ setPattern(PAT_WALKRIGHT);
break;
}
}
@@ -1389,7 +1383,7 @@ void RMCharacter::NewBoxEntered(int nBox) {
mpalQueryDoAction(2, curLocation, curbox);
}
-void RMCharacter::DoFrame(CORO_PARAM, RMGfxTargetBuffer *bigBuf, int loc) {
+void RMCharacter::doFrame(CORO_PARAM, RMGfxTargetBuffer *bigBuf, int loc) {
CORO_BEGIN_CONTEXT;
bool bEndNow;
RMBoxLoc *cur;
@@ -1409,12 +1403,12 @@ void RMCharacter::DoFrame(CORO_PARAM, RMGfxTargetBuffer *bigBuf, int loc) {
if (walkstatus == 1) {
dx = walkspeed * walkcount;
dy = slope * dx;
- m_pos.x = linestart.x + dx;
- m_pos.y = linestart.y + dy;
+ _pos.x = linestart.x + dx;
+ _pos.y = linestart.y + dy;
// Right
- if (((walkspeed > 0) && (m_pos.x > lineend.x)) || ((walkspeed < 0) && (m_pos.x < lineend.x))) {
- m_pos = lineend;
+ if (((walkspeed > 0) && (_pos.x > lineend.x)) || ((walkspeed < 0) && (_pos.x < lineend.x))) {
+ _pos = lineend;
status = STAND;
_ctx->bEndNow = true;
}
@@ -1424,27 +1418,27 @@ void RMCharacter::DoFrame(CORO_PARAM, RMGfxTargetBuffer *bigBuf, int loc) {
if (walkstatus == 0) {
dy = walkspeed * walkcount;
dx = slope * dy;
- m_pos.x = linestart.x + dx;
- m_pos.y = linestart.y + dy;
+ _pos.x = linestart.x + dx;
+ _pos.y = linestart.y + dy;
// Down
- if (((walkspeed > 0) && (m_pos.y > lineend.y)) || ((walkspeed < 0) && (m_pos.y < lineend.y))) {
- m_pos = lineend;
+ if (((walkspeed > 0) && (_pos.y > lineend.y)) || ((walkspeed < 0) && (_pos.y < lineend.y))) {
+ _pos = lineend;
status = STAND;
_ctx->bEndNow = true;
}
}
// Check if the character came out of the BOX in error, in which case he returns immediately
- if (InWhichBox(m_pos) == -1) {
- m_pos.x = linestart.x + olddx;
- m_pos.y = linestart.y + olddy;
+ if (inWhichBox(_pos) == -1) {
+ _pos.x = linestart.x + olddx;
+ _pos.y = linestart.y + olddy;
}
// If we have just moved to a temporary location, and is over the shortest path, we stop permanently
if (_ctx->bEndNow && minpath == 0) {
if (!bEndOfPath)
- CORO_INVOKE_0(Stop);
+ CORO_INVOKE_0(stop);
bEndOfPath = true;
CoroScheduler.pulseEvent(hEndOfPath);
}
@@ -1454,8 +1448,8 @@ void RMCharacter::DoFrame(CORO_PARAM, RMGfxTargetBuffer *bigBuf, int loc) {
// Update the character Z. @@@ Should remove only if the Z was changed
// Check if the box was changed
- if (!theBoxes->IsInBox(curLocation, curbox, m_pos))
- NewBoxEntered(InWhichBox(m_pos));
+ if (!theBoxes->isInBox(curLocation, curbox, _pos))
+ newBoxEntered(inWhichBox(_pos));
// Update the old coordinates
olddx = dx;
@@ -1466,7 +1460,7 @@ void RMCharacter::DoFrame(CORO_PARAM, RMGfxTargetBuffer *bigBuf, int loc) {
if (status == STAND) {
// Check if there is still the shortest path to calculate
if (minpath == 1) {
- _ctx->cur = theBoxes->GetBoxes(curLocation);
+ _ctx->cur = theBoxes->getBoxes(curLocation);
// If we still have to go through a box
if (pathcount < pathlenght) {
@@ -1474,7 +1468,7 @@ void RMCharacter::DoFrame(CORO_PARAM, RMGfxTargetBuffer *bigBuf, int loc) {
if (_ctx->cur->boxes[path[pathcount - 1]].attivo) {
// Move in a straight line towards the nearest hotspot, taking into account the reversing
// NEWBOX = path[pathcount-1]
- CORO_INVOKE_2(GoTo, NearestHotSpot(path[pathcount - 1], path[pathcount]), _ctx->cur->boxes[path[pathcount - 1]].bReversed);
+ CORO_INVOKE_2(goTo, nearestHotSpot(path[pathcount - 1], path[pathcount]), _ctx->cur->boxes[path[pathcount - 1]].bReversed);
pathcount++;
} else {
// If the box is off, we can only block all
@@ -1482,7 +1476,7 @@ void RMCharacter::DoFrame(CORO_PARAM, RMGfxTargetBuffer *bigBuf, int loc) {
// the search for the minimum path
minpath = 0;
if (!bEndOfPath)
- CORO_INVOKE_0(Stop);
+ CORO_INVOKE_0(stop);
bEndOfPath = true;
CoroScheduler.pulseEvent(hEndOfPath);
}
@@ -1491,7 +1485,7 @@ void RMCharacter::DoFrame(CORO_PARAM, RMGfxTargetBuffer *bigBuf, int loc) {
// point of arrival
// NEWBOX = InWhichBox(pathend)
minpath = 0;
- CORO_INVOKE_2(GoTo, pathend, _ctx->cur->boxes[InWhichBox(pathend)].bReversed);
+ CORO_INVOKE_2(goTo, pathend, _ctx->cur->boxes[inWhichBox(pathend)].bReversed);
}
}
}
@@ -1504,7 +1498,7 @@ void RMCharacter::DoFrame(CORO_PARAM, RMGfxTargetBuffer *bigBuf, int loc) {
CORO_END_CODE;
}
-void RMCharacter::Stop(CORO_PARAM) {
+void RMCharacter::stop(CORO_PARAM) {
CORO_BEGIN_CONTEXT;
CORO_END_CONTEXT(_ctx);
@@ -1521,37 +1515,37 @@ void RMCharacter::Stop(CORO_PARAM) {
bNeedToStop = false;
- switch (GetCurPattern()) {
+ switch (getCurPattern()) {
case PAT_WALKUP:
- SetPattern(PAT_STANDUP);
+ setPattern(PAT_STANDUP);
break;
case PAT_WALKDOWN:
- SetPattern(PAT_STANDDOWN);
+ setPattern(PAT_STANDDOWN);
break;
case PAT_WALKLEFT:
- SetPattern(PAT_STANDLEFT);
+ setPattern(PAT_STANDLEFT);
break;
case PAT_WALKRIGHT:
- SetPattern(PAT_STANDRIGHT);
+ setPattern(PAT_STANDRIGHT);
break;
default:
- SetPattern(PAT_STANDDOWN);
+ setPattern(PAT_STANDDOWN);
break;
}
CORO_END_CODE;
}
-inline int RMCharacter::InWhichBox(const RMPoint &pt) {
- return theBoxes->WhichBox(curLocation, pt);
+inline int RMCharacter::inWhichBox(const RMPoint &pt) {
+ return theBoxes->whichBox(curLocation, pt);
}
-void RMCharacter::Move(CORO_PARAM, RMPoint pt, bool *result) {
+void RMCharacter::move(CORO_PARAM, RMPoint pt, bool *result) {
CORO_BEGIN_CONTEXT;
RMPoint dest;
int numbox;
@@ -1566,34 +1560,34 @@ void RMCharacter::Move(CORO_PARAM, RMPoint pt, bool *result) {
if (pt.x == 0 && pt.y == 0) {
minpath = 0;
status = STAND;
- CORO_INVOKE_0(Stop);
+ CORO_INVOKE_0(stop);
if (result)
*result = true;
return;
}
// If clicked outside the box
- _ctx->numbox = InWhichBox(pt);
+ _ctx->numbox = inWhichBox(pt);
if (_ctx->numbox == -1) {
// Find neareste point inside the box
- _ctx->dest = NearestPoint(pt);
+ _ctx->dest = nearestPoint(pt);
// ???!??
if (_ctx->dest == pt)
- _ctx->dest = InvScanLine(pt);
+ _ctx->dest = invScanLine(pt);
pt = _ctx->dest;
- _ctx->numbox = InWhichBox(pt);
+ _ctx->numbox = inWhichBox(pt);
}
- _ctx->cur = theBoxes->GetBoxes(curLocation);
+ _ctx->cur = theBoxes->getBoxes(curLocation);
minpath = 0;
status = STAND;
bMovingWithoutMinpath = true;
- if (ScanLine(pt))
- CORO_INVOKE_2(GoTo, pt, _ctx->cur->boxes[_ctx->numbox].bReversed);
- else if (FindPath(InWhichBox(m_pos), InWhichBox(pt))) {
+ if (scanLine(pt))
+ CORO_INVOKE_2(goTo, pt, _ctx->cur->boxes[_ctx->numbox].bReversed);
+ else if (findPath(inWhichBox(_pos), inWhichBox(pt))) {
bMovingWithoutMinpath = false;
minpath = 1;
pathcount = 1;
@@ -1601,12 +1595,12 @@ void RMCharacter::Move(CORO_PARAM, RMPoint pt, bool *result) {
} else {
// @@@ This case is whether a hotspot is inside a box, but there is
// a path to get there. We use the InvScanLine to search around a point
- _ctx->dest = InvScanLine(pt);
+ _ctx->dest = invScanLine(pt);
pt = _ctx->dest;
- if (ScanLine(pt))
- CORO_INVOKE_2(GoTo, pt, _ctx->cur->boxes[_ctx->numbox].bReversed);
- else if (FindPath(InWhichBox(m_pos), InWhichBox(pt))) {
+ if (scanLine(pt))
+ CORO_INVOKE_2(goTo, pt, _ctx->cur->boxes[_ctx->numbox].bReversed);
+ else if (findPath(inWhichBox(_pos), inWhichBox(pt))) {
bMovingWithoutMinpath = false;
minpath = 1;
pathcount = 1;
@@ -1627,25 +1621,25 @@ void RMCharacter::Move(CORO_PARAM, RMPoint pt, bool *result) {
CORO_END_CODE;
}
-void RMCharacter::SetPosition(const RMPoint &pt, int newloc) {
+void RMCharacter::setPosition(const RMPoint &pt, int newloc) {
RMBoxLoc *box;
minpath = 0;
status = STAND;
- m_pos = pt;
+ _pos = pt;
if (newloc != -1)
curLocation = newloc;
// Update the character's Z value
- box = theBoxes->GetBoxes(curLocation);
- curbox = InWhichBox(m_pos);
+ box = theBoxes->getBoxes(curLocation);
+ curbox = inWhichBox(_pos);
assert(curbox != -1);
- m_z = box->boxes[curbox].Zvalue;
+ _z = box->boxes[curbox].Zvalue;
bRemoveFromOT = true;
}
-void RMCharacter::WaitForEndMovement(CORO_PARAM) {
+void RMCharacter::waitForEndMovement(CORO_PARAM) {
CORO_BEGIN_CONTEXT;
CORO_END_CONTEXT(_ctx);
@@ -1694,7 +1688,7 @@ RMCharacter::RMCharacter() {
bDrawNow = false;
bNeedToStop = false;
- m_pos.Set(0, 0);
+ _pos.Set(0, 0);
}
RMCharacter::~RMCharacter() {
@@ -1702,7 +1696,7 @@ RMCharacter::~RMCharacter() {
CoroScheduler.closeEvent(hEndOfPath);
}
-void RMCharacter::LinkToBoxes(RMGameBoxes *boxes) {
+void RMCharacter::linkToBoxes(RMGameBoxes *boxes) {
theBoxes = boxes;
}
@@ -1710,7 +1704,7 @@ void RMCharacter::LinkToBoxes(RMGameBoxes *boxes) {
* RMBox Methods
\****************************************************************************/
-void RMBox::ReadFromStream(RMDataStream &ds) {
+void RMBox::readFromStream(RMDataStream &ds) {
uint16 w;
int i;
byte b;
@@ -1749,7 +1743,7 @@ void RMBox::ReadFromStream(RMDataStream &ds) {
}
RMDataStream &operator>>(RMDataStream &ds, RMBox &box) {
- box.ReadFromStream(ds);
+ box.readFromStream(ds);
return ds;
}
@@ -1766,7 +1760,7 @@ RMBoxLoc::~RMBoxLoc() {
delete[] boxes;
}
-void RMBoxLoc::ReadFromStream(RMDataStream &ds) {
+void RMBoxLoc::readFromStream(RMDataStream &ds) {
int i;
char buf[2];
byte ver;
@@ -1788,7 +1782,7 @@ void RMBoxLoc::ReadFromStream(RMDataStream &ds) {
}
-void RMBoxLoc::RecalcAllAdj(void) {
+void RMBoxLoc::recalcAllAdj(void) {
int i, j;
for (i = 0; i < numbbox; i++) {
@@ -1801,7 +1795,7 @@ void RMBoxLoc::RecalcAllAdj(void) {
}
RMDataStream &operator>>(RMDataStream &ds, RMBoxLoc &bl) {
- bl.ReadFromStream(ds);
+ bl.readFromStream(ds);
return ds;
}
@@ -1811,45 +1805,45 @@ RMDataStream &operator>>(RMDataStream &ds, RMBoxLoc &bl) {
\****************************************************************************/
RMGameBoxes::RMGameBoxes() {
- m_nLocBoxes = 0;
- Common::fill(m_allBoxes, m_allBoxes + GAME_BOXES_SIZE, (RMBoxLoc *)NULL);
+ _nLocBoxes = 0;
+ Common::fill(_allBoxes, _allBoxes + GAME_BOXES_SIZE, (RMBoxLoc *)NULL);
}
RMGameBoxes::~RMGameBoxes() {
- for (int i = 1; i <= m_nLocBoxes; ++i)
- delete m_allBoxes[i];
+ for (int i = 1; i <= _nLocBoxes; ++i)
+ delete _allBoxes[i];
}
-void RMGameBoxes::Init(void) {
+void RMGameBoxes::init(void) {
int i;
RMString fn;
RMDataStream ds;
// Load boxes from disk
- m_nLocBoxes = 130;
- for (i = 1; i <= m_nLocBoxes; i++) {
+ _nLocBoxes = 130;
+ for (i = 1; i <= _nLocBoxes; i++) {
RMRes res(10000 + i);
ds.OpenBuffer(res);
- m_allBoxes[i] = new RMBoxLoc();
- ds >> *m_allBoxes[i];
+ _allBoxes[i] = new RMBoxLoc();
+ ds >> *_allBoxes[i];
- m_allBoxes[i]->RecalcAllAdj();
+ _allBoxes[i]->recalcAllAdj();
ds.Close();
}
}
-void RMGameBoxes::Close(void) {
+void RMGameBoxes::close(void) {
}
-RMBoxLoc *RMGameBoxes::GetBoxes(int nLoc) {
- return m_allBoxes[nLoc];
+RMBoxLoc *RMGameBoxes::getBoxes(int nLoc) {
+ return _allBoxes[nLoc];
}
-bool RMGameBoxes::IsInBox(int nLoc, int nBox, const RMPoint &pt) {
- RMBoxLoc *cur = GetBoxes(nLoc);
+bool RMGameBoxes::isInBox(int nLoc, int nBox, const RMPoint &pt) {
+ RMBoxLoc *cur = getBoxes(nLoc);
if ((pt.x >= cur->boxes[nBox].left) && (pt.x <= cur->boxes[nBox].right) &&
(pt.y >= cur->boxes[nBox].top) && (pt.y <= cur->boxes[nBox].bottom))
@@ -1858,11 +1852,12 @@ bool RMGameBoxes::IsInBox(int nLoc, int nBox, const RMPoint &pt) {
return false;
}
-int RMGameBoxes::WhichBox(int nLoc, const RMPoint &punto) {
+int RMGameBoxes::whichBox(int nLoc, const RMPoint &punto) {
int i;
- RMBoxLoc *cur = GetBoxes(nLoc);
+ RMBoxLoc *cur = getBoxes(nLoc);
- if (!cur) return -1;
+ if (!cur)
+ return -1;
for (i = 0; i < cur->numbbox; i++)
if (cur->boxes[i].attivo)
@@ -1873,44 +1868,44 @@ int RMGameBoxes::WhichBox(int nLoc, const RMPoint &punto) {
return -1;
}
-void RMGameBoxes::ChangeBoxStatus(int nLoc, int nBox, int status) {
- m_allBoxes[nLoc]->boxes[nBox].attivo = status;
- m_allBoxes[nLoc]->RecalcAllAdj();
+void RMGameBoxes::changeBoxStatus(int nLoc, int nBox, int status) {
+ _allBoxes[nLoc]->boxes[nBox].attivo = status;
+ _allBoxes[nLoc]->recalcAllAdj();
}
-int RMGameBoxes::GetSaveStateSize(void) {
+int RMGameBoxes::getSaveStateSize(void) {
int size;
int i;
size = 4;
- for (i = 1; i <= m_nLocBoxes; i++) {
+ for (i = 1; i <= _nLocBoxes; i++) {
size += 4;
- size += m_allBoxes[i]->numbbox;
+ size += _allBoxes[i]->numbbox;
}
return size;
}
-void RMGameBoxes::SaveState(byte *state) {
+void RMGameBoxes::saveState(byte *state) {
int i, j;
// Save the number of locations with boxes
- WRITE_LE_UINT32(state, m_nLocBoxes);
+ WRITE_LE_UINT32(state, _nLocBoxes);
state += 4;
// For each location, write out the number of boxes and their status
- for (i = 1; i <= m_nLocBoxes; i++) {
- WRITE_LE_UINT32(state, m_allBoxes[i]->numbbox);
+ for (i = 1; i <= _nLocBoxes; i++) {
+ WRITE_LE_UINT32(state, _allBoxes[i]->numbbox);
state += 4;
- for (j = 0; j < m_allBoxes[i]->numbbox; j++)
- *state++ = m_allBoxes[i]->boxes[j].attivo;
+ for (j = 0; j < _allBoxes[i]->numbbox; j++)
+ *state++ = _allBoxes[i]->boxes[j].attivo;
}
}
-void RMGameBoxes::LoadState(byte *state) {
+void RMGameBoxes::loadState(byte *state) {
int i, j;
int nloc, nbox;
@@ -1918,7 +1913,7 @@ void RMGameBoxes::LoadState(byte *state) {
nloc = READ_LE_UINT32(state);
state += 4;
- assert(nloc <= m_nLocBoxes);
+ assert(nloc <= _nLocBoxes);
// For each location, read the number of boxes and their status
for (i = 1; i <= nloc; i++) {
@@ -1926,13 +1921,13 @@ void RMGameBoxes::LoadState(byte *state) {
state += 4;
for (j = 0; j < nbox ; j++) {
- if (j < m_allBoxes[i]->numbbox)
- m_allBoxes[i]->boxes[j].attivo = *state;
+ if (j < _allBoxes[i]->numbbox)
+ _allBoxes[i]->boxes[j].attivo = *state;
state++;
}
- m_allBoxes[i]->RecalcAllAdj();
+ _allBoxes[i]->recalcAllAdj();
}
}
@@ -1944,9 +1939,9 @@ void RMGameBoxes::LoadState(byte *state) {
* Standard constructor
*/
RMLocation::RMLocation() {
- m_nItems = 0;
- m_items = NULL;
- m_buf = NULL;
+ _nItems = 0;
+ _items = NULL;
+ _buf = NULL;
}
@@ -1955,7 +1950,7 @@ RMLocation::RMLocation() {
*
* @param lpszFileName Name of the file
*/
-bool RMLocation::Load(const char *lpszFileName) {
+bool RMLocation::load(const char *lpszFileName) {
Common::File f;
bool bRet;
@@ -1964,7 +1959,7 @@ bool RMLocation::Load(const char *lpszFileName) {
return false;
// Passes to the method variation for loading from the opened file
- bRet = Load(f);
+ bRet = load(f);
// Close the file
f.close();
@@ -1980,7 +1975,7 @@ bool RMLocation::Load(const char *lpszFileName) {
*
* @returns True if succeeded OK, false in case of error.
*/
-bool RMLocation::Load(Common::File &file) {
+bool RMLocation::load(Common::File &file) {
int size;
bool bRet;
@@ -1991,19 +1986,19 @@ bool RMLocation::Load(Common::File &file) {
RMFileStreamSlow fs;
fs.OpenFile(file);
- bRet = Load(fs);
+ bRet = load(fs);
fs.Close();
return bRet;
}
-bool RMLocation::Load(const byte *buf) {
+bool RMLocation::load(const byte *buf) {
RMDataStream ds;
bool bRet;
ds.OpenBuffer(buf);
- bRet = Load(ds);
+ bRet = load(ds);
ds.Close();
return bRet;
}
@@ -2015,7 +2010,7 @@ bool RMLocation::Load(const byte *buf) {
* @param ds Data stream
* @returns True if succeeded OK, false in case of error.
*/
-bool RMLocation::Load(RMDataStream &ds) {
+bool RMLocation::load(RMDataStream &ds) {
char id[3];
int dimx, dimy;
byte ver;
@@ -2027,7 +2022,7 @@ bool RMLocation::Load(RMDataStream &ds) {
// Check if we are in a LOX
if (id[0] == 'L' && id[1] == 'O' && id[2] == 'X')
- return LoadLOX(ds);
+ return loadLOX(ds);
// Otherwise, check that it is a normal LOC
if (id[0] != 'L' || id[1] != 'O' || id[2] != 'C')
@@ -2038,7 +2033,7 @@ bool RMLocation::Load(RMDataStream &ds) {
assert(ver == 6);
// Location name
- ds >> m_name;
+ ds >> _name;
// Skip the MPAL bailouts (64 bytes)
ds >> TEMPNumLoc;
@@ -2050,20 +2045,20 @@ bool RMLocation::Load(RMDataStream &ds) {
// Location dimensions
ds >> dimx >> dimy;
- m_curScroll.Set(0, 0);
+ _curScroll.Set(0, 0);
// Read the colour mode
ds >> cm;
- m_cmode = (RMColorMode)cm;
+ _cmode = (RMColorMode)cm;
// Initialise the source buffer and read the location
- switch (m_cmode) {
+ switch (_cmode) {
case CM_256:
- m_buf = new RMGfxSourceBuffer8;
+ _buf = new RMGfxSourceBuffer8;
break;
case CM_65K:
- m_buf = new RMGfxSourceBuffer16;
+ _buf = new RMGfxSourceBuffer16;
break;
default:
@@ -2072,29 +2067,29 @@ bool RMLocation::Load(RMDataStream &ds) {
};
// Initialise the surface, loading the palette if necessary
- m_buf->init(ds, dimx, dimy, true);
+ _buf->init(ds, dimx, dimy, true);
// Check the size of the location
// assert(dimy!=512);
// Number of objects
- ds >> m_nItems;
+ ds >> _nItems;
// Create and read in the objects
- if (m_nItems > 0)
- m_items = new RMItem[m_nItems];
+ if (_nItems > 0)
+ _items = new RMItem[_nItems];
_vm->freezeTime();
- for (i = 0; i < m_nItems && !ds.IsError(); i++)
- ds >> m_items[i];
+ for (i = 0; i < _nItems && !ds.IsError(); i++)
+ ds >> _items[i];
_vm->unfreezeTime();
return ds.IsError();
}
-bool RMLocation::LoadLOX(RMDataStream &ds) {
+bool RMLocation::loadLOX(RMDataStream &ds) {
int dimx, dimy;
byte ver;
int i;
@@ -2104,7 +2099,7 @@ bool RMLocation::LoadLOX(RMDataStream &ds) {
assert(ver == 1);
// Location name
- ds >> m_name;
+ ds >> _name;
// Location number
ds >> TEMPNumLoc;
@@ -2112,24 +2107,24 @@ bool RMLocation::LoadLOX(RMDataStream &ds) {
// Dimensions
ds >> dimx >> dimy;
- m_curScroll.Set(0, 0);
+ _curScroll.Set(0, 0);
// It's always 65K (16-bit) mode
- m_cmode = CM_65K;
- m_buf = new RMGfxSourceBuffer16;
+ _cmode = CM_65K;
+ _buf = new RMGfxSourceBuffer16;
// Initialise the surface, loading in the palette if necessary
- m_buf->init(ds, dimx, dimy, true);
+ _buf->init(ds, dimx, dimy, true);
// Number of items
- ds >> m_nItems;
+ ds >> _nItems;
// Create and read objects
- if (m_nItems > 0)
- m_items = new RMItem[m_nItems];
+ if (_nItems > 0)
+ _items = new RMItem[_nItems];
- for (i = 0; i < m_nItems && !ds.IsError(); i++)
- m_items[i].ReadFromStream(ds, true);
+ for (i = 0; i < _nItems && !ds.IsError(); i++)
+ _items[i].readFromStream(ds, true);
return ds.IsError();
}
@@ -2145,14 +2140,14 @@ void RMLocation::draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *pri
CORO_BEGIN_CODE(_ctx);
// Set the position of the source scrolling
- if (m_buf->getDimy() > RM_SY || m_buf->getDimx() > RM_SX) {
- prim->setSrc(RMRect(m_curScroll, m_curScroll + RMPoint(640, 480)));
+ if (_buf->getDimy() > RM_SY || _buf->getDimx() > RM_SX) {
+ prim->setSrc(RMRect(_curScroll, _curScroll + RMPoint(640, 480)));
}
- prim->setDst(m_fixedScroll);
+ prim->setDst(_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(_buf->draw, bigBuf, prim);
CORO_END_CODE;
}
@@ -2169,29 +2164,29 @@ void RMLocation::doFrame(RMGfxTargetBuffer *bigBuf) {
bigBuf->addPrim(new RMGfxPrimitive(this));
// Process all the location items
- for (i = 0; i < m_nItems; i++)
- m_items[i].doFrame(bigBuf);
+ for (i = 0; i < _nItems; i++)
+ _items[i].doFrame(bigBuf);
}
-RMItem *RMLocation::GetItemFromCode(uint32 dwCode) {
+RMItem *RMLocation::getItemFromCode(uint32 dwCode) {
int i;
- for (i = 0; i < m_nItems; i++)
- if (m_items[i].MpalCode() == (int)dwCode)
- return &m_items[i];
+ for (i = 0; i < _nItems; i++)
+ if (_items[i].mpalCode() == (int)dwCode)
+ return &_items[i];
return NULL;
}
-RMItem *RMLocation::WhichItemIsIn(const RMPoint &pt) {
+RMItem *RMLocation::whichItemIsIn(const RMPoint &pt) {
int found = -1;
int foundSize = 0;
int size;
- for (int i = 0; i < m_nItems; i++) {
+ for (int i = 0; i < _nItems; i++) {
size = 0;
- if (m_items[i].IsIn(pt, &size)) {
+ if (_items[i].isIn(pt, &size)) {
if (found == -1 || size < foundSize) {
foundSize = size;
found = i;
@@ -2202,97 +2197,97 @@ RMItem *RMLocation::WhichItemIsIn(const RMPoint &pt) {
if (found == -1)
return NULL;
else
- return &m_items[found];
+ return &_items[found];
}
RMLocation::~RMLocation() {
- Unload();
+ unload();
}
-void RMLocation::Unload(void) {
+void RMLocation::unload(void) {
// Clear memory
- if (m_items) {
- delete[] m_items;
- m_items = NULL;
+ if (_items) {
+ delete[] _items;
+ _items = NULL;
}
// Destroy the buffer
- if (m_buf) {
- delete m_buf;
- m_buf = NULL;
+ if (_buf) {
+ delete _buf;
+ _buf = NULL;
}
}
-void RMLocation::UpdateScrolling(const RMPoint &ptShowThis) {
- RMPoint oldScroll = m_curScroll;
+void RMLocation::updateScrolling(const RMPoint &ptShowThis) {
+ RMPoint oldScroll = _curScroll;
- if (m_curScroll.x + 250 > ptShowThis.x) {
- 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->getDimx() > RM_SX) {
- if (m_curScroll.x + RM_SX / 2 < ptShowThis.x)
- m_curScroll.x++;
+ if (_curScroll.x + 250 > ptShowThis.x) {
+ _curScroll.x = ptShowThis.x - 250;
+ } else if (_curScroll.x + RM_SX - 250 < ptShowThis.x) {
+ _curScroll.x = ptShowThis.x + 250 - RM_SX;
+ } else if (ABS(_curScroll.x + RM_SX / 2 - ptShowThis.x) > 32 && _buf->getDimx() > RM_SX) {
+ if (_curScroll.x + RM_SX / 2 < ptShowThis.x)
+ _curScroll.x++;
else
- m_curScroll.x--;
+ _curScroll.x--;
}
- if (m_curScroll.y + 180 > ptShowThis.y) {
- 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->getDimy() > RM_SY) {
- if (m_curScroll.y + RM_SY / 2 < ptShowThis.y)
- m_curScroll.y++;
+ if (_curScroll.y + 180 > ptShowThis.y) {
+ _curScroll.y = ptShowThis.y - 180;
+ } else if (_curScroll.y + RM_SY - 180 < ptShowThis.y) {
+ _curScroll.y = ptShowThis.y + 180 - RM_SY;
+ } else if (ABS(_curScroll.y + RM_SY / 2 - ptShowThis.y) > 16 && _buf->getDimy() > RM_SY) {
+ if (_curScroll.y + RM_SY / 2 < ptShowThis.y)
+ _curScroll.y++;
else
- m_curScroll.y--;
+ _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->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 (_curScroll.x < 0)
+ _curScroll.x = 0;
+ if (_curScroll.y < 0)
+ _curScroll.y = 0;
+ if (_curScroll.x + RM_SX > _buf->getDimx())
+ _curScroll.x = _buf->getDimx() - RM_SX;
+ if (_curScroll.y + RM_SY > _buf->getDimy())
+ _curScroll.y = _buf->getDimy() - RM_SY;
- if (oldScroll != m_curScroll)
- for (int i = 0; i < m_nItems; i++)
- m_items[i].SetScrollPosition(m_curScroll);
+ if (oldScroll != _curScroll)
+ for (int i = 0; i < _nItems; i++)
+ _items[i].setScrollPosition(_curScroll);
}
-void RMLocation::SetFixedScroll(const RMPoint &scroll) {
- m_fixedScroll = scroll;
+void RMLocation::setFixedScroll(const RMPoint &scroll) {
+ _fixedScroll = scroll;
- for (int i = 0; i < m_nItems; i++)
- m_items[i].SetScrollPosition(m_curScroll - m_fixedScroll);
+ for (int i = 0; i < _nItems; i++)
+ _items[i].setScrollPosition(_curScroll - _fixedScroll);
}
-void RMLocation::SetScrollPosition(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->getDimx())
- pt.x = m_buf->getDimx() - RM_SX;
- if (pt.y + RM_SY > m_buf->getDimy())
- pt.y = m_buf->getDimy() - RM_SY;
+ if (pt.x + RM_SX > _buf->getDimx())
+ pt.x = _buf->getDimx() - RM_SX;
+ if (pt.y + RM_SY > _buf->getDimy())
+ pt.y = _buf->getDimy() - RM_SY;
- m_curScroll = pt;
+ _curScroll = pt;
- for (int i = 0; i < m_nItems; i++)
- m_items[i].SetScrollPosition(m_curScroll);
+ for (int i = 0; i < _nItems; i++)
+ _items[i].setScrollPosition(_curScroll);
}
-void RMLocation::PauseSound(bool bPause) {
+void RMLocation::pauseSound(bool bPause) {
int i;
- for (i = 0; i < m_nItems; i++)
- m_items[i].PauseSound(bPause);
+ for (i = 0; i < _nItems; i++)
+ _items[i].pauseSound(bPause);
}
@@ -2301,7 +2296,7 @@ void RMLocation::PauseSound(bool bPause) {
\****************************************************************************/
RMMessage::RMMessage(uint32 dwId) {
- Load(dwId);
+ load(dwId);
}
RMMessage::RMMessage() {
@@ -2313,15 +2308,15 @@ RMMessage::~RMMessage() {
GlobalFree(lpMessage);
}
-void RMMessage::Load(uint32 dwId) {
+void RMMessage::load(uint32 dwId) {
lpMessage = mpalQueryMessage(dwId);
assert(lpMessage != NULL);
if (lpMessage)
- ParseMessage();
+ parseMessage();
}
-void RMMessage::ParseMessage(void) {
+void RMMessage::parseMessage(void) {
char *p;
assert(lpMessage != NULL);
diff --git a/engines/tony/loc.h b/engines/tony/loc.h
index abcdcb85a2..e465b113b2 100644
--- a/engines/tony/loc.h
+++ b/engines/tony/loc.h
@@ -59,7 +59,7 @@ typedef enum {
*/
class RMPalette {
public:
- byte m_data[1024];
+ byte _data[1024];
public:
friend RMDataStream &operator>>(RMDataStream &ds, RMPalette &pal);
@@ -71,9 +71,9 @@ public:
*/
class RMSfx {
public:
- RMString m_name;
- FPSFX *m_fx;
- bool m_bPlayingLoop;
+ RMString _name;
+ FPSFX *_fx;
+ bool _bPlayingLoop;
public:
RMSfx();
@@ -81,12 +81,12 @@ public:
friend RMDataStream &operator>>(RMDataStream &ds, RMSfx &sfx);
- void Play(bool bLoop = false);
- void SetVolume(int vol);
- void Pause(bool bPause);
- void Stop(void);
+ void play(bool bLoop = false);
+ void setVolume(int vol);
+ void pause(bool bPause);
+ void stop(void);
- void ReadFromStream(RMDataStream &ds, bool bLOX = false);
+ void readFromStream(RMDataStream &ds, bool bLOX = false);
};
@@ -108,38 +108,38 @@ public:
// Class slot
class RMSlot {
private:
- RMPoint m_pos; // Child co-ordinates
+ RMPoint _pos; // Child co-ordinates
public:
- RMSlotType m_type;
- int m_data;
- byte m_flag;
+ RMSlotType _type;
+ int _data;
+ byte _flag;
public:
friend RMDataStream &operator>>(RMDataStream &ds, RMSlot &slot);
- RMPoint Pos() {
- return m_pos;
+ RMPoint pos() {
+ return _pos;
}
- void ReadFromStream(RMDataStream &ds, bool bLOX = false);
+ void readFromStream(RMDataStream &ds, bool bLOX = false);
};
public:
- RMString m_name;
+ RMString _name;
private:
- int m_speed;
- RMPoint m_pos; // Parent coordinates
- RMPoint m_curPos; // Parent + child coordinates
- int m_bLoop;
- int m_nSlots;
- int m_nCurSlot;
- int m_nCurSprite;
+ int _speed;
+ RMPoint _pos; // Parent coordinates
+ RMPoint _curPos; // Parent + child coordinates
+ int _bLoop;
+ int _nSlots;
+ int _nCurSlot;
+ int _nCurSprite;
- RMSlot *m_slots;
+ RMSlot *_slots;
- uint32 m_nStartTime;
+ uint32 _nStartTime;
public:
RMPattern();
@@ -148,24 +148,24 @@ public:
friend RMDataStream &operator>>(RMDataStream &ds, RMPattern &pat);
// A warning that the pattern now and the current
- int Init(RMSfx *sfx, bool bPlayP0 = false, byte *bFlag = NULL);
+ int init(RMSfx *sfx, bool bPlayP0 = false, byte *bFlag = NULL);
// Update the pattern, checking to see if it's time to change slot and executing
// any associated commands
- int Update(uint32 hEndPattern, byte &bFlag, RMSfx *sfx);
+ int update(uint32 hEndPattern, byte &bFlag, RMSfx *sfx);
// Stop a sound effect
- void StopSfx(RMSfx *sfx);
+ void stopSfx(RMSfx *sfx);
// Reads the position of the pattern
- RMPoint Pos() {
- return m_curPos;
+ RMPoint pos() {
+ return _curPos;
}
- void ReadFromStream(RMDataStream &ds, bool bLOX = false);
+ void readFromStream(RMDataStream &ds, bool bLOX = false);
private:
- void UpdateCoord(void);
+ void updateCoord(void);
};
@@ -174,24 +174,24 @@ private:
*/
class RMSprite : public RMGfxTask {
public:
- RMString m_name;
- RMRect m_rcBox;
+ RMString _name;
+ RMRect _rcBox;
protected:
- RMGfxSourceBuffer *m_buf;
+ RMGfxSourceBuffer *_buf;
public:
RMSprite();
virtual ~RMSprite();
- void Init(RMGfxSourceBuffer *buf);
+ void init(RMGfxSourceBuffer *buf);
friend RMDataStream &operator>>(RMDataStream &ds, RMSprite &sprite);
virtual void draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
- void SetPalette(byte *lpBuf);
- void GetSizeFromStream(RMDataStream &ds, int *dimx, int *dimy);
+ void setPalette(byte *lpBuf);
+ void getSizeFromStream(RMDataStream &ds, int *dimx, int *dimy);
void LOXGetSizeFromStream(RMDataStream &ds, int *dimx, int *dimy);
- void ReadFromStream(RMDataStream &ds, bool bLOX = false);
+ void readFromStream(RMDataStream &ds, bool bLOX = false);
};
@@ -200,42 +200,42 @@ public:
*/
class RMItem : public RMGfxTask {
public:
- RMString m_name;
+ RMString _name;
protected:
- int m_z;
- RMPoint m_pos; // Coordinate nonno
- RMColorMode m_cm;
- RMPoint m_curScroll;
+ int _z;
+ RMPoint _pos; // Coordinate nonno
+ RMColorMode _cm;
+ RMPoint _curScroll;
- byte m_FX;
- byte m_FXparm;
+ byte _FX;
+ byte _FXparm;
- virtual int GetCurPattern() {
- return m_nCurPattern;
+ virtual int getCurPattern() {
+ return _nCurPattern;
}
private:
- int m_nCurPattern;
- int m_mpalCode;
- RMPoint m_hot;
- RMRect m_rcBox;
- int m_nSprites, m_nSfx, m_nPatterns;
- byte m_bPal;
- RMPalette m_pal;
-
- RMSprite *m_sprites;
- RMSfx *m_sfx;
- RMPattern *m_patterns;
-
- byte m_bCurFlag;
- int m_nCurSprite;
- bool m_bIsActive;
- uint32 m_hEndPattern;
- bool m_bInitCurPattern;
+ int _nCurPattern;
+ int _mpalCode;
+ RMPoint _hot;
+ RMRect _rcBox;
+ int _nSprites, _nSfx, _nPatterns;
+ byte _bPal;
+ RMPalette _pal;
+
+ RMSprite *_sprites;
+ RMSfx *_sfx;
+ RMPattern *_patterns;
+
+ byte _bCurFlag;
+ int _nCurSprite;
+ bool _bIsActive;
+ uint32 _hEndPattern;
+ bool _bInitCurPattern;
public:
- RMPoint CalculatePos(void);
+ RMPoint calculatePos(void);
public:
RMItem();
@@ -248,7 +248,7 @@ public:
bool doFrame(RMGfxTargetBuffer *bigBuf, bool bAddToList = true);
// Sets the current scrolling position
- void SetScrollPosition(const RMPoint &scroll);
+ void setScrollPosition(const RMPoint &scroll);
// Overloading of check whether to remove from active list
virtual void removeThis(CORO_PARAM, bool &result);
@@ -258,54 +258,54 @@ public:
// Overloaded priority: it's based on Z ordering
virtual int priority() {
- return m_z;
+ return _z;
}
// Pattern number
- int NumPattern() {
- return m_nPatterns;
+ int numPattern() {
+ return _nPatterns;
}
// Set anew animation pattern, changing abruptly from the current
- virtual void SetPattern(int nPattern, bool bPlayP0 = false);
+ virtual void setPattern(int nPattern, bool bPlayP0 = false);
// Set a new status
- void SetStatus(int nStatus);
+ void setStatus(int nStatus);
- bool IsIn(const RMPoint &pt, int *size = NULL);
- RMPoint Hotspot() {
- return m_hot;
+ bool isIn(const RMPoint &pt, int *size = NULL);
+ RMPoint hotspot() {
+ return _hot;
}
- bool GetName(RMString &name);
- int MpalCode() {
- return m_mpalCode;
+ bool getName(RMString &name);
+ int mpalCode() {
+ return _mpalCode;
}
// Unload
- void Unload(void);
+ void unload(void);
// Wait for the end of the current pattern
- void WaitForEndPattern(CORO_PARAM, uint32 hCustomSkip = CORO_INVALID_PID_VALUE);
+ void waitForEndPattern(CORO_PARAM, uint32 hCustomSkip = CORO_INVALID_PID_VALUE);
// Sets a new hotspot fro the object
- void ChangeHotspot(const RMPoint &pt);
+ void changeHotspot(const RMPoint &pt);
- void SetInitCurPattern(bool status) {
- m_bInitCurPattern = status;
+ void setInitCurPattern(bool status) {
+ _bInitCurPattern = status;
}
- void PlaySfx(int nSfx);
+ void playSfx(int nSfx);
- void ReadFromStream(RMDataStream &ds, bool bLOX = false);
+ void readFromStream(RMDataStream &ds, bool bLOX = false);
- void PauseSound(bool bPause);
+ void pauseSound(bool bPause);
protected:
// Create a primitive that has as it's task this item
- virtual RMGfxPrimitive *NewItemPrimitive();
+ virtual RMGfxPrimitive *newItemPrimitive();
// Allocate memory for the sprites
- virtual RMGfxSourceBuffer *NewItemSpriteBuffer(int dimx, int dimy, bool bPreRLE);
+ virtual RMGfxSourceBuffer *newItemSpriteBuffer(int dimx, int dimy, bool bPreRLE);
};
@@ -330,7 +330,7 @@ public:
bool bReversed;
private:
- void ReadFromStream(RMDataStream &ds);
+ void readFromStream(RMDataStream &ds);
public:
friend RMDataStream &operator>>(RMDataStream &ds, RMBox &box);
@@ -343,47 +343,47 @@ public:
RMBox *boxes;
private:
- void ReadFromStream(RMDataStream &ds);
+ void readFromStream(RMDataStream &ds);
public:
RMBoxLoc();
virtual ~RMBoxLoc();
friend RMDataStream &operator >>(RMDataStream &ds, RMBoxLoc &bl);
- void RecalcAllAdj(void);
+ void recalcAllAdj(void);
};
#define GAME_BOXES_SIZE 200
class RMGameBoxes {
protected:
- RMBoxLoc *m_allBoxes[GAME_BOXES_SIZE];
- int m_nLocBoxes;
+ RMBoxLoc *_allBoxes[GAME_BOXES_SIZE];
+ int _nLocBoxes;
public:
RMGameBoxes();
~RMGameBoxes();
- void Init(void);
- void Close(void);
+ void init(void);
+ void close(void);
// Get binding boxes for a given location
- RMBoxLoc *GetBoxes(int nLoc);
- int GetLocBoxesCount() const { return m_nLocBoxes; }
+ RMBoxLoc *getBoxes(int nLoc);
+ int getLocBoxesCount() const { return _nLocBoxes; }
// Return the box which contains a given point
- int WhichBox(int nLoc, const RMPoint &pt);
+ int whichBox(int nLoc, const RMPoint &pt);
// Check whether a point is inside a given box
- bool IsInBox(int nLoc, int nBox, const RMPoint &pt);
+ bool isInBox(int nLoc, int nBox, const RMPoint &pt);
// Change the status of a box
- void ChangeBoxStatus(int nLoc, int nBox, int status);
+ void changeBoxStatus(int nLoc, int nBox, int status);
// Save state handling
- int GetSaveStateSize(void);
- void SaveState(byte *buf);
- void LoadState(byte *buf);
+ int getSaveStateSize(void);
+ void saveState(byte *buf);
+ void loadState(byte *buf);
};
class RMCharacter : protected RMItem {
@@ -426,21 +426,21 @@ private:
bool bMovingWithoutMinpath;
RMGameBoxes *theBoxes;
- RMPoint m_fixedScroll;
+ RMPoint _fixedScroll;
private:
- int InWhichBox(const RMPoint &pt);
+ int inWhichBox(const RMPoint &pt);
- short FindPath(short source, short destination);
- RMPoint Searching(char UP, char DOWN, char RIGHT, char LEFT, RMPoint punto);
- RMPoint NearestPoint(const RMPoint &punto);
+ short findPath(short source, short destination);
+ RMPoint searching(char UP, char DOWN, char RIGHT, char LEFT, RMPoint punto);
+ RMPoint nearestPoint(const RMPoint &punto);
- void GoTo(CORO_PARAM, RMPoint destcoord, bool bReversed = false);
- short ScanLine(const RMPoint &punto);
- RMPoint InvScanLine(const RMPoint &punto);
- RMPoint NearestHotSpot(int sourcebox, int destbox);
+ void goTo(CORO_PARAM, RMPoint destcoord, bool bReversed = false);
+ short scanLine(const RMPoint &punto);
+ RMPoint invScanLine(const RMPoint &punto);
+ RMPoint nearestHotSpot(int sourcebox, int destbox);
- void NewBoxEntered(int nBox);
+ void newBoxEntered(int nBox);
protected:
bool bMoving;
@@ -452,42 +452,42 @@ public:
RMCharacter();
virtual ~RMCharacter();
- void LinkToBoxes(RMGameBoxes *theBoxes);
+ void linkToBoxes(RMGameBoxes *theBoxes);
virtual void removeThis(CORO_PARAM, bool &result);
// Update the position of a character
- void DoFrame(CORO_PARAM, RMGfxTargetBuffer *bigBuf, int loc);
+ void doFrame(CORO_PARAM, RMGfxTargetBuffer *bigBuf, int loc);
// Overloaded draw
virtual void draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
// TRUE if you just stopped
- bool EndOfPath() {
+ bool endOfPath() {
return bEndOfPath;
}
// Change the pattern of a character to STOP
- virtual void Stop(CORO_PARAM);
+ virtual void stop(CORO_PARAM);
// Check if the character is moving
- bool IsMoving() {
+ bool isMoving() {
return bMoving;
}
// Move the character to a certain position
- void Move(CORO_PARAM, RMPoint pt, bool *result = NULL);
+ void move(CORO_PARAM, RMPoint pt, bool *result = NULL);
// Place the character in a certain position WITHOUT moving
- void SetPosition(const RMPoint &pt, int newloc = -1);
+ void setPosition(const RMPoint &pt, int newloc = -1);
// Wait for the end of movement
- void WaitForEndMovement(CORO_PARAM);
+ void waitForEndMovement(CORO_PARAM);
- void SetFixedScroll(const RMPoint &fix) {
- m_fixedScroll = fix;
+ void setFixedScroll(const RMPoint &fix) {
+ _fixedScroll = fix;
}
- void SetSpeed(int speed) {
+ void setSpeed(int speed) {
curSpeed = speed;
}
};
@@ -495,26 +495,26 @@ public:
class RMWipe : public RMGfxTask {
private:
- bool m_bFading;
- bool m_bEndFade;
- bool m_bUnregister;
- uint32 m_hUnregistered;
- int m_nFadeStep;
- uint32 m_hEndOfFade;
- bool m_bMustRegister;
+ bool _bFading;
+ bool _bEndFade;
+ bool _bUnregister;
+ uint32 _hUnregistered;
+ int _nFadeStep;
+ uint32 _hEndOfFade;
+ bool _bMustRegister;
- RMItem m_wip0r;
+ RMItem _wip0r;
public:
RMWipe();
virtual ~RMWipe();
- void DoFrame(RMGfxTargetBuffer &bigBuf);
+ void doFrame(RMGfxTargetBuffer &bigBuf);
virtual void draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
- void InitFade(int type);
- void CloseFade(void);
- void WaitForFadeEnd(CORO_PARAM);
+ void initFade(int type);
+ void closeFade(void);
+ void waitForFadeEnd(CORO_PARAM);
virtual void Unregister(void);
virtual void removeThis(CORO_PARAM, bool &result);
@@ -527,17 +527,17 @@ public:
*/
class RMLocation : public RMGfxTaskSetPrior {
public:
- RMString m_name; // Name
+ RMString _name; // Name
private:
- RMColorMode m_cmode; // Color mode
- RMGfxSourceBuffer *m_buf; // Location picture
+ RMColorMode _cmode; // Color mode
+ RMGfxSourceBuffer *_buf; // Location picture
- int m_nItems; // Number of objects
- RMItem *m_items; // Objects
+ int _nItems; // Number of objects
+ RMItem *_items; // Objects
- RMPoint m_curScroll; // Current scroll position
- RMPoint m_fixedScroll;
+ RMPoint _curScroll; // Current scroll position
+ RMPoint _fixedScroll;
public:
// @@@@@@@@@@@@@@@@@@@@@@@
@@ -556,14 +556,14 @@ public:
virtual ~RMLocation();
// Load variations
- bool Load(const char *lpszFileName);
- bool Load(Common::File &file);
- bool Load(const byte *buf);
- bool Load(RMDataStream &ds);
- bool LoadLOX(RMDataStream &ds);
+ bool load(const char *lpszFileName);
+ bool load(Common::File &file);
+ bool load(const byte *buf);
+ bool load(RMDataStream &ds);
+ bool loadLOX(RMDataStream &ds);
// Unload
- void Unload(void);
+ void unload(void);
// Overloaded draw
virtual void draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
@@ -572,27 +572,27 @@ public:
void doFrame(RMGfxTargetBuffer *bigBuf);
// Return the item at a given point
- RMItem *WhichItemIsIn(const RMPoint &pt);
+ RMItem *whichItemIsIn(const RMPoint &pt);
// Return the item based on it's MPAL code
- RMItem *GetItemFromCode(uint32 dwCode);
+ RMItem *getItemFromCode(uint32 dwCode);
// Set the current scroll position
- void SetScrollPosition(const RMPoint &scroll);
+ void setScrollPosition(const RMPoint &scroll);
// Sets an additinal offset for scrolling
- void SetFixedScroll(const RMPoint &scroll);
+ void setFixedScroll(const RMPoint &scroll);
// Update the scrolling coordinates to display the specified point
- void UpdateScrolling(const RMPoint &ptShowThis);
+ void updateScrolling(const RMPoint &ptShowThis);
// Read the current scroll position
- RMPoint ScrollPosition() {
- return m_curScroll;
+ RMPoint scrollPosition() {
+ return _curScroll;
}
// Pause sound
- void PauseSound(bool bPause);
+ void pauseSound(bool bPause);
};
@@ -606,21 +606,21 @@ private:
int nPeriods;
private:
- void ParseMessage(void);
+ void parseMessage(void);
public:
RMMessage();
RMMessage(uint32 dwId);
virtual ~RMMessage();
- void Load(uint32 dwId);
- bool IsValid() {
+ void load(uint32 dwId);
+ bool isValid() {
return lpMessage != NULL;
}
- int NumPeriods() {
+ int numPeriods() {
return nPeriods;
}
- char *Period(int num) {
+ char *period(int num) {
return lpPeriods[num];
}
char *operator[](int num) {
diff --git a/engines/tony/tony.cpp b/engines/tony/tony.cpp
index ea378e0fc3..abc3033993 100644
--- a/engines/tony/tony.cpp
+++ b/engines/tony/tony.cpp
@@ -137,7 +137,7 @@ Common::ErrorCode TonyEngine::init() {
return Common::kReadingFailed;
// Initialise the boxes
- _theBoxes.Init();
+ _theBoxes.init();
// Link to the custom graphics engine
_theEngine.initCustomDll();
@@ -568,7 +568,7 @@ void TonyEngine::play(void) {
void TonyEngine::close(void) {
closeMusic();
CoroScheduler.closeEvent(_hEndOfFrame);
- _theBoxes.Close();
+ _theBoxes.close();
_theEngine.close();
_window.close();
delete[] _curThumbnail;
diff --git a/engines/tony/tonychar.cpp b/engines/tony/tonychar.cpp
index 8bca6fe7f6..dc771b08aa 100644
--- a/engines/tony/tonychar.cpp
+++ b/engines/tony/tonychar.cpp
@@ -38,31 +38,31 @@ namespace Tony {
* Metodi di RMTony
\****************************************************************************/
-bool RMTony::m_bAction = false;
+bool RMTony::_bAction = false;
void RMTony::initStatics() {
- m_bAction = false;
+ _bAction = false;
}
RMTony::RMTony() {
- m_bShow = false;
- m_bShowOmbra = false;
- m_bCorpoDavanti = false;
- m_bActionPending = false;
- m_ActionItem = NULL;
- m_Action = 0;
- m_ActionParm = 0;
- m_bPastorella = false;
- m_bIsStaticTalk = false;
- m_bIsTalking = false;
- m_nPatB4Talking = 0;
- m_nTalkType = TALK_NORMAL;
- m_TalkDirection = UP;
- m_nTimeLastStep = 0;
+ _bShow = false;
+ _bShowOmbra = false;
+ _bCorpoDavanti = false;
+ _bActionPending = false;
+ _ActionItem = NULL;
+ _Action = 0;
+ _ActionParm = 0;
+ _bPastorella = false;
+ _bIsStaticTalk = false;
+ _bIsTalking = false;
+ _nPatB4Talking = 0;
+ _nTalkType = TALK_NORMAL;
+ _TalkDirection = UP;
+ _nTimeLastStep = 0;
hActionThread = CORO_INVALID_PID_VALUE;
}
-void RMTony::WaitEndOfAction(CORO_PARAM, const void *param) {
+void RMTony::waitEndOfAction(CORO_PARAM, const void *param) {
CORO_BEGIN_CONTEXT;
CORO_END_CONTEXT(_ctx);
@@ -72,15 +72,15 @@ void RMTony::WaitEndOfAction(CORO_PARAM, const void *param) {
CORO_INVOKE_2(CoroScheduler.waitForSingleObject, pid, CORO_INFINITE);
- m_bAction = false;
+ _bAction = false;
CORO_END_CODE;
}
-RMGfxSourceBuffer *RMTony::NewItemSpriteBuffer(int dimx, int dimy, bool bPreRLE) {
+RMGfxSourceBuffer *RMTony::newItemSpriteBuffer(int dimx, int dimy, bool bPreRLE) {
RMGfxSourceBuffer8RLE *spr;
- assert(m_cm == CM_256);
+ assert(_cm == CM_256);
spr = new RMGfxSourceBuffer8RLEByteAA;
spr->setAlphaBlendColor(1);
if (bPreRLE)
@@ -94,81 +94,80 @@ void RMTony::init(void) {
RMDataStream ds;
// Tony is shown by default
- m_bShow = m_bShowOmbra = true;
+ _bShow = _bShowOmbra = true;
// No action pending
- m_bActionPending = false;
- m_bAction = false;
+ _bActionPending = false;
+ _bAction = false;
- m_bPastorella = false;
- m_bIsTalking = false;
- m_bIsStaticTalk = false;
+ _bPastorella = false;
+ _bIsTalking = false;
+ _bIsStaticTalk = false;
// Opens the buffer
ds.OpenBuffer(tony);
// Reads his details from the stream
- ReadFromStream(ds, true);
+ readFromStream(ds, true);
// Closes the buffer
ds.Close();
// Reads Tony's body
ds.OpenBuffer(body);
- m_body.ReadFromStream(ds, true);
+ _body.readFromStream(ds, true);
ds.Close();
- m_body.SetPattern(0);
+ _body.setPattern(0);
- m_nTimeLastStep = _vm->getTime();
+ _nTimeLastStep = _vm->getTime();
}
-void RMTony::Close(void) {
+void RMTony::close(void) {
// Disalloca @@@ Deallocation of missing item
- m_ombra.destroy();
+ _ombra.destroy();
}
-void RMTony::DoFrame(CORO_PARAM, RMGfxTargetBuffer *bigBuf, int curLoc) {
+void RMTony::doFrame(CORO_PARAM, RMGfxTargetBuffer *bigBuf, int curLoc) {
CORO_BEGIN_CONTEXT;
int time;
CORO_END_CONTEXT(_ctx);
CORO_BEGIN_CODE(_ctx);
- if (!_nInList && m_bShow)
+ if (!_nInList && _bShow)
bigBuf->addPrim(new RMGfxPrimitive(this));
- SetSpeed(GLOBALS.nCfgTonySpeed);
+ setSpeed(GLOBALS.nCfgTonySpeed);
// Runs the normal character movement
_ctx->time = _vm->getTime();
do {
- m_nTimeLastStep += (1000 / 40);
- CORO_INVOKE_2(RMCharacter::DoFrame, bigBuf, curLoc);
-
- } while (_ctx->time > m_nTimeLastStep + (1000 / 40));
+ _nTimeLastStep += (1000 / 40);
+ CORO_INVOKE_2(RMCharacter::doFrame, bigBuf, curLoc);
+ } while (_ctx->time > _nTimeLastStep + (1000 / 40));
// Check if we are at the end of a path
- if (EndOfPath() && m_bActionPending) {
+ if (endOfPath() && _bActionPending) {
// Must perform the action on which we clicked
- m_bActionPending = false;
+ _bActionPending = false;
}
- if (m_bIsTalking || m_bIsStaticTalk)
- m_body.doFrame(bigBuf, false);
+ if (_bIsTalking || _bIsStaticTalk)
+ _body.doFrame(bigBuf, false);
CORO_END_CODE;
}
-void RMTony::Show(void) {
- m_bShow = true;
- m_bShowOmbra = true;
+void RMTony::show(void) {
+ _bShow = true;
+ _bShowOmbra = true;
}
-void RMTony::Hide(bool bShowOmbra) {
- m_bShow = false;
- m_bShowOmbra = bShowOmbra;
+void RMTony::hide(bool bShowOmbra) {
+ _bShow = false;
+ _bShowOmbra = bShowOmbra;
}
@@ -179,29 +178,29 @@ void RMTony::draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim) {
CORO_BEGIN_CODE(_ctx);
// Call the Draw() of the parent class if Tony is visible
- if (m_bShow && bDrawNow) {
- if (m_bCorpoDavanti) {
+ if (_bShow && bDrawNow) {
+ if (_bCorpoDavanti) {
prim->Dst().SetEmpty();
prim->Dst().Offset(-44, -134);
- if (m_bPastorella)
+ if (_bPastorella)
prim->Dst().Offset(1, 4);
CORO_INVOKE_2(RMCharacter::draw, bigBuf, prim);
}
- if (m_bIsTalking || m_bIsStaticTalk) {
+ if (_bIsTalking || _bIsStaticTalk) {
// Offest direction from scrolling
prim->Dst().SetEmpty();
- prim->Dst().Offset(-m_curScroll);
- prim->Dst().Offset(m_pos);
+ prim->Dst().Offset(-_curScroll);
+ prim->Dst().Offset(_pos);
prim->Dst().Offset(-44, -134);
- prim->Dst() += m_nBodyOffset;
- CORO_INVOKE_2(m_body.draw, bigBuf, prim);
+ prim->Dst() += _nBodyOffset;
+ CORO_INVOKE_2(_body.draw, bigBuf, prim);
}
- if (!m_bCorpoDavanti) {
+ if (!_bCorpoDavanti) {
prim->Dst().SetEmpty();
prim->Dst().Offset(-44, -134);
- if (m_bPastorella)
+ if (_bPastorella)
prim->Dst().Offset(0, 3);
CORO_INVOKE_2(RMCharacter::draw, bigBuf, prim);
}
@@ -210,7 +209,7 @@ void RMTony::draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim) {
CORO_END_CODE;
}
-void RMTony::MoveAndDoAction(CORO_PARAM, RMPoint dst, RMItem *item, int nAction, int nActionParm) {
+void RMTony::moveAndDoAction(CORO_PARAM, RMPoint dst, RMItem *item, int nAction, int nActionParm) {
CORO_BEGIN_CONTEXT;
bool result;
CORO_END_CONTEXT(_ctx);
@@ -219,26 +218,26 @@ void RMTony::MoveAndDoAction(CORO_PARAM, RMPoint dst, RMItem *item, int nAction,
// Makes normal movement, but remember if you must then perform an action
if (item == NULL) {
- m_bActionPending = false;
- m_ActionItem = NULL;
+ _bActionPending = false;
+ _ActionItem = NULL;
} else {
- m_ActionItem = item;
- m_Action = nAction;
- m_ActionParm = nActionParm;
- m_bActionPending = true;
+ _ActionItem = item;
+ _Action = nAction;
+ _ActionParm = nActionParm;
+ _bActionPending = true;
}
- CORO_INVOKE_2(RMCharacter::Move, dst, &_ctx->result);
+ CORO_INVOKE_2(RMCharacter::move, dst, &_ctx->result);
if (!_ctx->result) {
- m_bActionPending = false;
- m_ActionItem = NULL;
+ _bActionPending = false;
+ _ActionItem = NULL;
}
CORO_END_CODE;
}
-void RMTony::ExecuteAction(int nAction, int nActionItem, int nParm) {
+void RMTony::executeAction(int nAction, int nActionItem, int nParm) {
uint32 pid;
if (nAction == TA_COMBINE) {
@@ -264,85 +263,85 @@ void RMTony::ExecuteAction(int nAction, int nActionItem, int nParm) {
}
if (pid != CORO_INVALID_PID_VALUE) {
- m_bAction = true;
- CoroScheduler.createProcess(WaitEndOfAction, &pid, sizeof(uint32));
+ _bAction = true;
+ CoroScheduler.createProcess(waitEndOfAction, &pid, sizeof(uint32));
hActionThread = pid;
} else if (nAction != TA_GOTO) {
if (nAction == TA_TALK) {
pid = mpalQueryDoAction(6, 1, 0);
- m_bAction = true;
- CoroScheduler.createProcess(WaitEndOfAction, &pid, sizeof(uint32));
+ _bAction = true;
+ CoroScheduler.createProcess(waitEndOfAction, &pid, sizeof(uint32));
hActionThread = pid;
} else if (nAction == TA_PALESATI) {
pid = mpalQueryDoAction(7, 1, 0);
- m_bAction = true;
- CoroScheduler.createProcess(WaitEndOfAction, &pid, sizeof(uint32));
+ _bAction = true;
+ CoroScheduler.createProcess(waitEndOfAction, &pid, sizeof(uint32));
hActionThread = pid;
} else {
pid = mpalQueryDoAction(5, 1, 0);
- m_bAction = true;
- CoroScheduler.createProcess(WaitEndOfAction, &pid, sizeof(uint32));
+ _bAction = true;
+ CoroScheduler.createProcess(waitEndOfAction, &pid, sizeof(uint32));
hActionThread = pid;
}
}
}
-void RMTony::StopNoAction(CORO_PARAM) {
+void RMTony::stopNoAction(CORO_PARAM) {
CORO_BEGIN_CONTEXT;
CORO_END_CONTEXT(_ctx);
CORO_BEGIN_CODE(_ctx);
- if (m_bAction)
+ if (_bAction)
CORO_INVOKE_2(CoroScheduler.waitForSingleObject, hActionThread, CORO_INFINITE);
- m_bActionPending = false;
- m_ActionItem = NULL;
- CORO_INVOKE_0(Stop);
+ _bActionPending = false;
+ _ActionItem = NULL;
+ CORO_INVOKE_0(stop);
CORO_END_CODE;
}
-void RMTony::Stop(CORO_PARAM) {
+void RMTony::stop(CORO_PARAM) {
CORO_BEGIN_CONTEXT;
uint32 pid;
CORO_END_CONTEXT(_ctx);
CORO_BEGIN_CODE(_ctx);
- if (m_ActionItem != NULL) {
+ if (_ActionItem != NULL) {
// Call MPAL to choose the direction
- _ctx->pid = mpalQueryDoAction(21, m_ActionItem->MpalCode(), 0);
+ _ctx->pid = mpalQueryDoAction(21, _ActionItem->mpalCode(), 0);
if (_ctx->pid == CORO_INVALID_PID_VALUE)
- CORO_INVOKE_0(RMCharacter::Stop);
+ CORO_INVOKE_0(RMCharacter::stop);
else {
bNeedToStop = false; // If we make the OnWhichDirection, we don't need at least after the Stop().
bMoving = false;
CORO_INVOKE_2(CoroScheduler.waitForSingleObject, _ctx->pid, CORO_INFINITE); // @@@ Put an assert after 10 seconds
}
} else {
- CORO_INVOKE_0(RMCharacter::Stop);
+ CORO_INVOKE_0(RMCharacter::stop);
}
- if (!m_bActionPending)
+ if (!_bActionPending)
return;
- m_bActionPending = false;
+ _bActionPending = false;
- ExecuteAction(m_Action, m_ActionItem->MpalCode(), m_ActionParm);
+ executeAction(_Action, _ActionItem->mpalCode(), _ActionParm);
- m_ActionItem = NULL;
+ _ActionItem = NULL;
CORO_END_CODE;
}
-int RMTony::GetCurPattern(void) {
- int nPatt = RMCharacter::GetCurPattern();
+int RMTony::getCurPattern(void) {
+ int nPatt = RMCharacter::getCurPattern();
- if (!m_bPastorella)
+ if (!_bPastorella)
return nPatt;
switch (nPatt) {
@@ -367,8 +366,8 @@ int RMTony::GetCurPattern(void) {
return nPatt;
}
-void RMTony::SetPattern(int nPatt, bool bPlayP0) {
- if (m_bPastorella) {
+void RMTony::setPattern(int nPatt, bool bPlayP0) {
+ if (_bPastorella) {
switch (nPatt) {
case PAT_STANDUP:
nPatt = PAT_PAST_STANDUP;
@@ -397,13 +396,13 @@ void RMTony::SetPattern(int nPatt, bool bPlayP0) {
}
}
- RMCharacter::SetPattern(nPatt, bPlayP0);
+ RMCharacter::setPattern(nPatt, bPlayP0);
}
-void RMTony::Take(int nWhere, int nPart) {
+void RMTony::take(int nWhere, int nPart) {
if (nPart == 0) {
- switch (GetCurPattern()) {
+ switch (getCurPattern()) {
case PAT_STANDDOWN:
assert(0); // Not while you're doing a StandDown
break;
@@ -411,13 +410,13 @@ void RMTony::Take(int nWhere, int nPart) {
case PAT_STANDUP:
switch (nWhere) {
case 0:
- SetPattern(PAT_TAKEUP_UP1);
+ setPattern(PAT_TAKEUP_UP1);
break;
case 1:
- SetPattern(PAT_TAKEUP_MID1);
+ setPattern(PAT_TAKEUP_MID1);
break;
case 2:
- SetPattern(PAT_TAKEUP_DOWN1);
+ setPattern(PAT_TAKEUP_DOWN1);
break;
}
break;
@@ -425,13 +424,13 @@ void RMTony::Take(int nWhere, int nPart) {
case PAT_STANDRIGHT:
switch (nWhere) {
case 0:
- SetPattern(PAT_TAKERIGHT_UP1);
+ setPattern(PAT_TAKERIGHT_UP1);
break;
case 1:
- SetPattern(PAT_TAKERIGHT_MID1);
+ setPattern(PAT_TAKERIGHT_MID1);
break;
case 2:
- SetPattern(PAT_TAKERIGHT_DOWN1);
+ setPattern(PAT_TAKERIGHT_DOWN1);
break;
}
break;
@@ -439,46 +438,46 @@ void RMTony::Take(int nWhere, int nPart) {
case PAT_STANDLEFT:
switch (nWhere) {
case 0:
- SetPattern(PAT_TAKELEFT_UP1);
+ setPattern(PAT_TAKELEFT_UP1);
break;
case 1:
- SetPattern(PAT_TAKELEFT_MID1);
+ setPattern(PAT_TAKELEFT_MID1);
break;
case 2:
- SetPattern(PAT_TAKELEFT_DOWN1);
+ setPattern(PAT_TAKELEFT_DOWN1);
break;
}
break;
}
} else if (nPart == 1) {
- SetPattern(GetCurPattern() + 1);
+ setPattern(getCurPattern() + 1);
} else if (nPart == 2) {
- switch (GetCurPattern()) {
+ switch (getCurPattern()) {
case PAT_TAKEUP_UP2:
case PAT_TAKEUP_MID2:
case PAT_TAKEUP_DOWN2:
- SetPattern(PAT_STANDUP);
+ setPattern(PAT_STANDUP);
break;
case PAT_TAKELEFT_UP2:
case PAT_TAKELEFT_MID2:
case PAT_TAKELEFT_DOWN2:
- SetPattern(PAT_STANDLEFT);
+ setPattern(PAT_STANDLEFT);
break;
case PAT_TAKERIGHT_UP2:
case PAT_TAKERIGHT_MID2:
case PAT_TAKERIGHT_DOWN2:
- SetPattern(PAT_STANDRIGHT);
+ setPattern(PAT_STANDRIGHT);
break;
}
}
}
-void RMTony::Put(int nWhere, int nPart) {
+void RMTony::put(int nWhere, int nPart) {
if (nPart == 0) {
- switch (GetCurPattern()) {
+ switch (getCurPattern()) {
case PAT_STANDDOWN:
//assert(0);
break;
@@ -486,13 +485,13 @@ void RMTony::Put(int nWhere, int nPart) {
case PAT_STANDUP:
switch (nWhere) {
case 0:
- SetPattern(PAT_PUTUP_UP1);
+ setPattern(PAT_PUTUP_UP1);
break;
case 1:
- SetPattern(PAT_PUTUP_MID1);
+ setPattern(PAT_PUTUP_MID1);
break;
case 2:
- SetPattern(PAT_PUTUP_DOWN1);
+ setPattern(PAT_PUTUP_DOWN1);
break;
}
break;
@@ -500,13 +499,13 @@ void RMTony::Put(int nWhere, int nPart) {
case PAT_STANDRIGHT:
switch (nWhere) {
case 0:
- SetPattern(PAT_PUTRIGHT_UP1);
+ setPattern(PAT_PUTRIGHT_UP1);
break;
case 1:
- SetPattern(PAT_PUTRIGHT_MID1);
+ setPattern(PAT_PUTRIGHT_MID1);
break;
case 2:
- SetPattern(PAT_PUTRIGHT_DOWN1);
+ setPattern(PAT_PUTRIGHT_DOWN1);
break;
}
break;
@@ -514,56 +513,56 @@ void RMTony::Put(int nWhere, int nPart) {
case PAT_STANDLEFT:
switch (nWhere) {
case 0:
- SetPattern(PAT_PUTLEFT_UP1);
+ setPattern(PAT_PUTLEFT_UP1);
break;
case 1:
- SetPattern(PAT_PUTLEFT_MID1);
+ setPattern(PAT_PUTLEFT_MID1);
break;
case 2:
- SetPattern(PAT_PUTLEFT_DOWN1);
+ setPattern(PAT_PUTLEFT_DOWN1);
break;
}
break;
}
} else if (nPart == 1) {
- SetPattern(GetCurPattern() + 1);
+ setPattern(getCurPattern() + 1);
} else if (nPart == 2) {
- switch (GetCurPattern()) {
+ switch (getCurPattern()) {
case PAT_PUTUP_UP2:
case PAT_PUTUP_MID2:
case PAT_PUTUP_DOWN2:
- SetPattern(PAT_STANDUP);
+ setPattern(PAT_STANDUP);
break;
case PAT_PUTLEFT_UP2:
case PAT_PUTLEFT_MID2:
case PAT_PUTLEFT_DOWN2:
- SetPattern(PAT_STANDLEFT);
+ setPattern(PAT_STANDLEFT);
break;
case PAT_PUTRIGHT_UP2:
case PAT_PUTRIGHT_MID2:
case PAT_PUTRIGHT_DOWN2:
- SetPattern(PAT_STANDRIGHT);
+ setPattern(PAT_STANDRIGHT);
break;
}
}
}
-bool RMTony::StartTalkCalculate(TALKTYPE nTalkType, int &headStartPat, int &bodyStartPat,
+bool RMTony::startTalkCalculate(TALKTYPE nTalkType, int &headStartPat, int &bodyStartPat,
int &headLoopPat, int &bodyLoopPat) {
- assert(!m_bIsTalking);
+ assert(!_bIsTalking);
- m_bIsTalking = true;
- m_nPatB4Talking = GetCurPattern();
- m_nTalkType = nTalkType;
+ _bIsTalking = true;
+ _nPatB4Talking = getCurPattern();
+ _nTalkType = nTalkType;
// Set the direction of speech ONLY if we are not in a static animation (since it would have already been done)
- if (!m_bIsStaticTalk) {
- switch (m_nPatB4Talking) {
+ if (!_bIsStaticTalk) {
+ switch (_nPatB4Talking) {
case PAT_STANDDOWN:
- m_TalkDirection = DOWN;
+ _TalkDirection = DOWN;
break;
case PAT_TAKELEFT_UP2:
@@ -571,7 +570,7 @@ bool RMTony::StartTalkCalculate(TALKTYPE nTalkType, int &headStartPat, int &body
case PAT_TAKELEFT_DOWN2:
case PAT_SIRIALZALEFT:
case PAT_STANDLEFT:
- m_TalkDirection = LEFT;
+ _TalkDirection = LEFT;
break;
case PAT_TAKERIGHT_UP2:
@@ -579,39 +578,39 @@ bool RMTony::StartTalkCalculate(TALKTYPE nTalkType, int &headStartPat, int &body
case PAT_TAKERIGHT_DOWN2:
case PAT_SIRIALZARIGHT:
case PAT_STANDRIGHT:
- m_TalkDirection = RIGHT;
+ _TalkDirection = RIGHT;
break;
case PAT_TAKEUP_UP2:
case PAT_TAKEUP_MID2:
case PAT_TAKEUP_DOWN2:
case PAT_STANDUP:
- m_TalkDirection = UP;
+ _TalkDirection = UP;
break;
}
// Puts the body in front by default
- m_bCorpoDavanti = true;
+ _bCorpoDavanti = true;
}
- if (m_bPastorella) {
+ if (_bPastorella) {
// Talking whilst a shepherdess
mainFreeze();
- switch (m_TalkDirection) {
+ switch (_TalkDirection) {
case UP:
- SetPattern(PAT_PAST_TALKUP);
+ setPattern(PAT_PAST_TALKUP);
break;
case DOWN:
- SetPattern(PAT_PAST_TALKDOWN);
+ setPattern(PAT_PAST_TALKDOWN);
break;
case LEFT:
- SetPattern(PAT_PAST_TALKLEFT);
+ setPattern(PAT_PAST_TALKLEFT);
break;
case RIGHT:
- SetPattern(PAT_PAST_TALKRIGHT);
+ setPattern(PAT_PAST_TALKRIGHT);
break;
}
mainUnfreeze();
@@ -623,42 +622,42 @@ bool RMTony::StartTalkCalculate(TALKTYPE nTalkType, int &headStartPat, int &body
switch (nTalkType) {
case TALK_NORMAL:
- m_bCorpoDavanti = false;
+ _bCorpoDavanti = false;
headStartPat = 0;
bodyStartPat = 0;
- switch (m_TalkDirection) {
+ switch (_TalkDirection) {
case DOWN:
headLoopPat = PAT_TALK_DOWN;
bodyLoopPat = BPAT_STANDDOWN;
- m_nBodyOffset.Set(4, 53);
+ _nBodyOffset.Set(4, 53);
break;
case LEFT:
headLoopPat = PAT_TALK_LEFT;
bodyLoopPat = BPAT_STANDLEFT;
- m_nBodyOffset.Set(6, 56);
+ _nBodyOffset.Set(6, 56);
break;
case RIGHT:
headLoopPat = PAT_TALK_RIGHT;
bodyLoopPat = BPAT_STANDRIGHT;
- m_nBodyOffset.Set(6, 56);
+ _nBodyOffset.Set(6, 56);
break;
case UP:
headLoopPat = PAT_TALK_UP;
bodyLoopPat = BPAT_STANDUP;
- m_nBodyOffset.Set(6, 53);
+ _nBodyOffset.Set(6, 53);
break;
}
break;
case TALK_FIANCHI:
- m_bCorpoDavanti = false;
- switch (m_TalkDirection) {
+ _bCorpoDavanti = false;
+ switch (_TalkDirection) {
case UP:
- m_nBodyOffset.Set(2, 42);
+ _nBodyOffset.Set(2, 42);
headStartPat = PAT_TESTA_UP;
bodyStartPat = BPAT_FIANCHIUP_START;
headLoopPat = PAT_TALK_UP;
@@ -666,7 +665,7 @@ bool RMTony::StartTalkCalculate(TALKTYPE nTalkType, int &headStartPat, int &body
break;
case DOWN:
- m_nBodyOffset.Set(2, 48);
+ _nBodyOffset.Set(2, 48);
headStartPat = PAT_TESTA_DOWN;
bodyStartPat = BPAT_FIANCHIDOWN_START;
headLoopPat = PAT_TALK_DOWN;
@@ -674,7 +673,7 @@ bool RMTony::StartTalkCalculate(TALKTYPE nTalkType, int &headStartPat, int &body
break;
case LEFT:
- m_nBodyOffset.Set(-3, 53);
+ _nBodyOffset.Set(-3, 53);
headStartPat = PAT_TESTA_LEFT;
bodyStartPat = BPAT_FIANCHILEFT_START;
headLoopPat = PAT_TALK_LEFT;
@@ -682,7 +681,7 @@ bool RMTony::StartTalkCalculate(TALKTYPE nTalkType, int &headStartPat, int &body
break;
case RIGHT:
- m_nBodyOffset.Set(2, 53);
+ _nBodyOffset.Set(2, 53);
headStartPat = PAT_TESTA_RIGHT;
bodyStartPat = BPAT_FIANCHIRIGHT_START;
headLoopPat = PAT_TALK_RIGHT;
@@ -693,7 +692,7 @@ bool RMTony::StartTalkCalculate(TALKTYPE nTalkType, int &headStartPat, int &body
case TALK_CANTA:
- m_nBodyOffset.Set(-10, 25);
+ _nBodyOffset.Set(-10, 25);
headStartPat = PAT_TESTA_LEFT;
bodyStartPat = BPAT_CANTALEFT_START;
headLoopPat = PAT_TALK_LEFT;
@@ -701,12 +700,12 @@ bool RMTony::StartTalkCalculate(TALKTYPE nTalkType, int &headStartPat, int &body
break;
case TALK_RIDE:
- m_bCorpoDavanti = false;
- switch (m_TalkDirection) {
+ _bCorpoDavanti = false;
+ switch (_TalkDirection) {
case UP:
case DOWN:
case LEFT:
- m_nBodyOffset.Set(6, 56);
+ _nBodyOffset.Set(6, 56);
headStartPat = PAT_RIDELEFT_START;
bodyStartPat = BPAT_STANDLEFT;
headLoopPat = PAT_RIDELEFT_LOOP;
@@ -714,7 +713,7 @@ bool RMTony::StartTalkCalculate(TALKTYPE nTalkType, int &headStartPat, int &body
break;
case RIGHT:
- m_nBodyOffset.Set(6, 56);
+ _nBodyOffset.Set(6, 56);
headStartPat = PAT_RIDERIGHT_START;
bodyStartPat = BPAT_STANDRIGHT;
headLoopPat = PAT_RIDERIGHT_LOOP;
@@ -724,19 +723,19 @@ bool RMTony::StartTalkCalculate(TALKTYPE nTalkType, int &headStartPat, int &body
break;
case TALK_RIDE2:
- m_bCorpoDavanti = false;
- switch (m_TalkDirection) {
+ _bCorpoDavanti = false;
+ switch (_TalkDirection) {
case UP:
case DOWN:
case LEFT:
- m_nBodyOffset.Set(6, 56);
+ _nBodyOffset.Set(6, 56);
headStartPat = PAT_RIDELEFT_START;
bodyStartPat = BPAT_STANDLEFT;
headLoopPat = PAT_RIDELEFT_LOOP;
break;
case RIGHT:
- m_nBodyOffset.Set(6, 56);
+ _nBodyOffset.Set(6, 56);
headStartPat = PAT_RIDERIGHT_START;
bodyStartPat = BPAT_STANDRIGHT;
headLoopPat = PAT_RIDERIGHT_LOOP;
@@ -747,17 +746,17 @@ bool RMTony::StartTalkCalculate(TALKTYPE nTalkType, int &headStartPat, int &body
case TALK_SIINDICA:
- switch (m_TalkDirection) {
+ switch (_TalkDirection) {
case UP:
case DOWN:
case LEFT:
- m_nBodyOffset.Set(-4, 40);
+ _nBodyOffset.Set(-4, 40);
headLoopPat = PAT_TALK_LEFT;
bodyLoopPat = BPAT_SIINDICALEFT;
break;
case RIGHT:
- m_nBodyOffset.Set(5, 40);
+ _nBodyOffset.Set(5, 40);
headLoopPat = PAT_TALK_RIGHT;
bodyLoopPat = BPAT_SIINDICARIGHT;
break;
@@ -765,9 +764,9 @@ bool RMTony::StartTalkCalculate(TALKTYPE nTalkType, int &headStartPat, int &body
break;
case TALK_SPAVENTATO:
- switch (m_TalkDirection) {
+ switch (_TalkDirection) {
case UP:
- m_nBodyOffset.Set(-4, -11);
+ _nBodyOffset.Set(-4, -11);
headStartPat = PAT_TESTA_UP;
bodyStartPat = BPAT_SPAVENTOUP_START;
headLoopPat = PAT_TALK_UP;
@@ -775,7 +774,7 @@ bool RMTony::StartTalkCalculate(TALKTYPE nTalkType, int &headStartPat, int &body
break;
case DOWN:
- m_nBodyOffset.Set(-5, 45);
+ _nBodyOffset.Set(-5, 45);
headStartPat = PAT_SPAVENTODOWN_START;
bodyStartPat = BPAT_SPAVENTODOWN_START;
headLoopPat = PAT_SPAVENTODOWN_LOOP;
@@ -783,7 +782,7 @@ bool RMTony::StartTalkCalculate(TALKTYPE nTalkType, int &headStartPat, int &body
break;
case RIGHT:
- m_nBodyOffset.Set(-4, 41);
+ _nBodyOffset.Set(-4, 41);
headStartPat = PAT_SPAVENTORIGHT_START;
bodyStartPat = BPAT_SPAVENTORIGHT_START;
headLoopPat = PAT_SPAVENTORIGHT_LOOP;
@@ -791,7 +790,7 @@ bool RMTony::StartTalkCalculate(TALKTYPE nTalkType, int &headStartPat, int &body
break;
case LEFT:
- m_nBodyOffset.Set(-10, 41);
+ _nBodyOffset.Set(-10, 41);
headStartPat = PAT_SPAVENTOLEFT_START;
bodyStartPat = BPAT_SPAVENTOLEFT_START;
headLoopPat = PAT_SPAVENTOLEFT_LOOP;
@@ -801,12 +800,12 @@ bool RMTony::StartTalkCalculate(TALKTYPE nTalkType, int &headStartPat, int &body
break;
case TALK_SPAVENTATO2:
- m_bCorpoDavanti = false;
- switch (m_TalkDirection) {
+ _bCorpoDavanti = false;
+ switch (_TalkDirection) {
case UP:
bodyStartPat = BPAT_STANDUP;
bodyLoopPat = BPAT_STANDUP;
- m_nBodyOffset.Set(6, 53);
+ _nBodyOffset.Set(6, 53);
headStartPat = PAT_TESTA_UP;
headLoopPat = PAT_TALK_UP;
@@ -815,7 +814,7 @@ bool RMTony::StartTalkCalculate(TALKTYPE nTalkType, int &headStartPat, int &body
case DOWN:
bodyStartPat = BPAT_STANDDOWN;
bodyLoopPat = BPAT_STANDDOWN;
- m_nBodyOffset.Set(4, 53);
+ _nBodyOffset.Set(4, 53);
headStartPat = PAT_SPAVENTODOWN_START;
headLoopPat = PAT_SPAVENTODOWN_LOOP;
@@ -824,7 +823,7 @@ bool RMTony::StartTalkCalculate(TALKTYPE nTalkType, int &headStartPat, int &body
case RIGHT:
bodyStartPat = BPAT_STANDRIGHT;
bodyLoopPat = BPAT_STANDRIGHT;
- m_nBodyOffset.Set(6, 56);
+ _nBodyOffset.Set(6, 56);
headStartPat = PAT_SPAVENTORIGHT_START;
headLoopPat = PAT_SPAVENTORIGHT_LOOP;
@@ -833,7 +832,7 @@ bool RMTony::StartTalkCalculate(TALKTYPE nTalkType, int &headStartPat, int &body
case LEFT:
bodyStartPat = BPAT_STANDLEFT;
bodyLoopPat = BPAT_STANDLEFT;
- m_nBodyOffset.Set(6, 56);
+ _nBodyOffset.Set(6, 56);
headStartPat = PAT_SPAVENTOLEFT_START;
headLoopPat = PAT_SPAVENTOLEFT_LOOP;
@@ -842,36 +841,36 @@ bool RMTony::StartTalkCalculate(TALKTYPE nTalkType, int &headStartPat, int &body
break;
case TALK_CONBICCHIERE:
- m_nBodyOffset.Set(4, 53);
+ _nBodyOffset.Set(4, 53);
headLoopPat = PAT_TALK_DOWN;
bodyLoopPat = BPAT_BICCHIERE;
break;
case TALK_CONVERME:
- m_nBodyOffset.Set(9, 56);
+ _nBodyOffset.Set(9, 56);
headLoopPat = PAT_TALK_RIGHT;
bodyLoopPat = BPAT_VERME;
break;
case TALK_CONMARTELLO:
- m_nBodyOffset.Set(6, 56);
+ _nBodyOffset.Set(6, 56);
headLoopPat = PAT_TALK_LEFT;
bodyLoopPat = BPAT_MARTELLO;
break;
case TALK_CONCORDA:
- m_nBodyOffset.Set(-3, 38);
+ _nBodyOffset.Set(-3, 38);
headLoopPat = PAT_TALK_RIGHT;
bodyLoopPat = BPAT_CORDA;
break;
case TALK_CONSEGRETARIA:
- m_nBodyOffset.Set(-17, 12);
+ _nBodyOffset.Set(-17, 12);
headLoopPat = PAT_TALK_RIGHT;
bodyLoopPat = BPAT_CONSEGRETARIA;
break;
case TALK_CONCONIGLIO:
- switch (m_TalkDirection) {
+ switch (_TalkDirection) {
case LEFT:
case UP:
- m_nBodyOffset.Set(-21, -5);
+ _nBodyOffset.Set(-21, -5);
bodyStartPat = BPAT_CONCONIGLIOLEFT_START;
headLoopPat = PAT_TALK_LEFT;
bodyLoopPat = BPAT_CONCONIGLIOLEFT_LOOP;
@@ -879,7 +878,7 @@ bool RMTony::StartTalkCalculate(TALKTYPE nTalkType, int &headStartPat, int &body
case DOWN:
case RIGHT:
- m_nBodyOffset.Set(-4, -5);
+ _nBodyOffset.Set(-4, -5);
bodyStartPat = BPAT_CONCONIGLIORIGHT_START;
headLoopPat = PAT_TALK_RIGHT;
bodyLoopPat = BPAT_CONCONIGLIORIGHT_LOOP;
@@ -888,10 +887,10 @@ bool RMTony::StartTalkCalculate(TALKTYPE nTalkType, int &headStartPat, int &body
break;
case TALK_CONRICETTA:
- switch (m_TalkDirection) {
+ switch (_TalkDirection) {
case LEFT:
case UP:
- m_nBodyOffset.Set(-61, -7);
+ _nBodyOffset.Set(-61, -7);
bodyStartPat = BPAT_CONRICETTALEFT_START;
headLoopPat = PAT_TALK_LEFT;
bodyLoopPat = BPAT_CONRICETTALEFT_LOOP;
@@ -899,7 +898,7 @@ bool RMTony::StartTalkCalculate(TALKTYPE nTalkType, int &headStartPat, int &body
case DOWN:
case RIGHT:
- m_nBodyOffset.Set(-5, -7);
+ _nBodyOffset.Set(-5, -7);
bodyStartPat = BPAT_CONRICETTARIGHT_START;
headLoopPat = PAT_TALK_RIGHT;
bodyLoopPat = BPAT_CONRICETTARIGHT_LOOP;
@@ -908,10 +907,10 @@ bool RMTony::StartTalkCalculate(TALKTYPE nTalkType, int &headStartPat, int &body
break;
case TALK_CONCARTE:
- switch (m_TalkDirection) {
+ switch (_TalkDirection) {
case LEFT:
case UP:
- m_nBodyOffset.Set(-34, -2);
+ _nBodyOffset.Set(-34, -2);
bodyStartPat = BPAT_CONCARTELEFT_START;
headLoopPat = PAT_TALK_LEFT;
bodyLoopPat = BPAT_CONCARTELEFT_LOOP;
@@ -919,7 +918,7 @@ bool RMTony::StartTalkCalculate(TALKTYPE nTalkType, int &headStartPat, int &body
case DOWN:
case RIGHT:
- m_nBodyOffset.Set(-4, -2);
+ _nBodyOffset.Set(-4, -2);
bodyStartPat = BPAT_CONCARTERIGHT_START;
headLoopPat = PAT_TALK_RIGHT;
bodyLoopPat = BPAT_CONCARTERIGHT_LOOP;
@@ -928,10 +927,10 @@ bool RMTony::StartTalkCalculate(TALKTYPE nTalkType, int &headStartPat, int &body
break;
case TALK_CONPUPAZZO:
- switch (m_TalkDirection) {
+ switch (_TalkDirection) {
case LEFT:
case UP:
- m_nBodyOffset.Set(-35, 2);
+ _nBodyOffset.Set(-35, 2);
bodyStartPat = BPAT_CONPUPAZZOLEFT_START;
headLoopPat = PAT_TALK_LEFT;
bodyLoopPat = BPAT_CONPUPAZZOLEFT_LOOP;
@@ -939,7 +938,7 @@ bool RMTony::StartTalkCalculate(TALKTYPE nTalkType, int &headStartPat, int &body
case DOWN:
case RIGHT:
- m_nBodyOffset.Set(-14, 2);
+ _nBodyOffset.Set(-14, 2);
bodyStartPat = BPAT_CONPUPAZZORIGHT_START;
headLoopPat = PAT_TALK_RIGHT;
bodyLoopPat = BPAT_CONPUPAZZORIGHT_LOOP;
@@ -953,7 +952,7 @@ bool RMTony::StartTalkCalculate(TALKTYPE nTalkType, int &headStartPat, int &body
case TALK_CONCARTESTATIC:
case TALK_CONTACCUINOSTATIC:
case TALK_CONMEGAFONOSTATIC:
- switch (m_TalkDirection) {
+ switch (_TalkDirection) {
case LEFT:
case UP:
headLoopPat = PAT_TALK_LEFT;
@@ -968,28 +967,28 @@ bool RMTony::StartTalkCalculate(TALKTYPE nTalkType, int &headStartPat, int &body
// The beard is the only case in which the head is animated separately while the body is the standard
case TALK_CONBARBASTATIC:
- switch (m_TalkDirection) {
+ switch (_TalkDirection) {
case LEFT:
case UP:
headLoopPat = PAT_TALKBARBA_LEFT;
bodyLoopPat = BPAT_STANDLEFT;
- m_nBodyOffset.Set(6, 56);
+ _nBodyOffset.Set(6, 56);
break;
case DOWN:
case RIGHT:
headLoopPat = PAT_TALKBARBA_RIGHT;
bodyLoopPat = BPAT_STANDRIGHT;
- m_nBodyOffset.Set(6, 56);
+ _nBodyOffset.Set(6, 56);
break;
}
break;
case TALK_SCHIFATO:
- switch (m_TalkDirection) {
+ switch (_TalkDirection) {
case LEFT:
case UP:
- m_nBodyOffset.Set(6, 56);
+ _nBodyOffset.Set(6, 56);
headStartPat = PAT_SCHIFATOLEFT_START;
bodyStartPat = BPAT_STANDLEFT;
headLoopPat = PAT_SCHIFATOLEFT_LOOP;
@@ -997,7 +996,7 @@ bool RMTony::StartTalkCalculate(TALKTYPE nTalkType, int &headStartPat, int &body
case DOWN:
case RIGHT:
- m_nBodyOffset.Set(6, 56);
+ _nBodyOffset.Set(6, 56);
headStartPat = PAT_SCHIFATORIGHT_START;
bodyStartPat = BPAT_STANDRIGHT;
headLoopPat = PAT_SCHIFATORIGHT_LOOP;
@@ -1006,10 +1005,10 @@ bool RMTony::StartTalkCalculate(TALKTYPE nTalkType, int &headStartPat, int &body
break;
case TALK_NAAH:
- switch (m_TalkDirection) {
+ switch (_TalkDirection) {
case LEFT:
case UP:
- m_nBodyOffset.Set(6, 56);
+ _nBodyOffset.Set(6, 56);
headStartPat = PAT_NAAHLEFT_START;
bodyStartPat = BPAT_STANDLEFT;
headLoopPat = PAT_NAAHLEFT_LOOP;
@@ -1017,7 +1016,7 @@ bool RMTony::StartTalkCalculate(TALKTYPE nTalkType, int &headStartPat, int &body
case DOWN:
case RIGHT:
- m_nBodyOffset.Set(6, 56);
+ _nBodyOffset.Set(6, 56);
headStartPat = PAT_NAAHRIGHT_START;
bodyStartPat = BPAT_STANDRIGHT;
headLoopPat = PAT_NAAHRIGHT_LOOP;
@@ -1026,58 +1025,58 @@ bool RMTony::StartTalkCalculate(TALKTYPE nTalkType, int &headStartPat, int &body
break;
case TALK_MACBETH1:
- m_nBodyOffset.Set(-33, -1);
+ _nBodyOffset.Set(-33, -1);
headLoopPat = PAT_TALK_LEFT;
bodyLoopPat = BPAT_MACBETH1;
break;
case TALK_MACBETH2:
- m_nBodyOffset.Set(-33, -1);
+ _nBodyOffset.Set(-33, -1);
headLoopPat = PAT_TALK_LEFT;
bodyLoopPat = BPAT_MACBETH2;
break;
case TALK_MACBETH3:
- m_nBodyOffset.Set(-33, -1);
+ _nBodyOffset.Set(-33, -1);
headLoopPat = PAT_TALK_LEFT;
bodyLoopPat = BPAT_MACBETH3;
break;
case TALK_MACBETH4:
- m_nBodyOffset.Set(-33, -1);
+ _nBodyOffset.Set(-33, -1);
headLoopPat = PAT_TALK_LEFT;
bodyLoopPat = BPAT_MACBETH4;
break;
case TALK_MACBETH5:
- m_nBodyOffset.Set(-33, -1);
+ _nBodyOffset.Set(-33, -1);
headLoopPat = PAT_TALK_LEFT;
bodyLoopPat = BPAT_MACBETH5;
break;
case TALK_MACBETH6:
- m_nBodyOffset.Set(-33, -1);
+ _nBodyOffset.Set(-33, -1);
headLoopPat = PAT_TALK_LEFT;
bodyLoopPat = BPAT_MACBETH6;
break;
case TALK_MACBETH7:
- m_nBodyOffset.Set(-33, -1);
+ _nBodyOffset.Set(-33, -1);
headLoopPat = PAT_TALK_LEFT;
bodyLoopPat = BPAT_MACBETH7;
break;
case TALK_MACBETH8:
- m_nBodyOffset.Set(-33, -1);
+ _nBodyOffset.Set(-33, -1);
headLoopPat = PAT_TALK_LEFT;
bodyLoopPat = BPAT_MACBETH8;
break;
case TALK_MACBETH9:
- m_nBodyOffset.Set(-33, -1);
+ _nBodyOffset.Set(-33, -1);
headLoopPat = PAT_TALK_LEFT;
bodyLoopPat = BPAT_MACBETH9;
break;
case TALK_SPAVENTATOSTATIC:
- m_bCorpoDavanti = false;
- switch (m_TalkDirection) {
+ _bCorpoDavanti = false;
+ switch (_TalkDirection) {
case DOWN:
bodyStartPat = BPAT_STANDDOWN;
bodyLoopPat = BPAT_STANDDOWN;
- m_nBodyOffset.Set(4, 53);
+ _nBodyOffset.Set(4, 53);
headStartPat = PAT_SPAVENTODOWN_STAND;
headLoopPat = PAT_SPAVENTODOWN_LOOP;
@@ -1086,7 +1085,7 @@ bool RMTony::StartTalkCalculate(TALKTYPE nTalkType, int &headStartPat, int &body
case RIGHT:
bodyStartPat = BPAT_STANDRIGHT;
bodyLoopPat = BPAT_STANDRIGHT;
- m_nBodyOffset.Set(6, 56);
+ _nBodyOffset.Set(6, 56);
headStartPat = PAT_SPAVENTORIGHT_STAND;
headLoopPat = PAT_SPAVENTORIGHT_LOOP;
@@ -1095,7 +1094,7 @@ bool RMTony::StartTalkCalculate(TALKTYPE nTalkType, int &headStartPat, int &body
case LEFT:
bodyStartPat = BPAT_STANDLEFT;
bodyLoopPat = BPAT_STANDLEFT;
- m_nBodyOffset.Set(6, 56);
+ _nBodyOffset.Set(6, 56);
headStartPat = PAT_SPAVENTOLEFT_STAND;
headLoopPat = PAT_SPAVENTOLEFT_LOOP;
@@ -1110,7 +1109,7 @@ bool RMTony::StartTalkCalculate(TALKTYPE nTalkType, int &headStartPat, int &body
return true;
}
-void RMTony::StartTalk(CORO_PARAM, TALKTYPE nTalkType) {
+void RMTony::startTalk(CORO_PARAM, TALKTYPE nTalkType) {
CORO_BEGIN_CONTEXT;
int headStartPat, bodyStartPat;
int headLoopPat, bodyLoopPat;
@@ -1121,38 +1120,38 @@ void RMTony::StartTalk(CORO_PARAM, TALKTYPE nTalkType) {
_ctx->headStartPat = _ctx->bodyStartPat = 0;
_ctx->headLoopPat = _ctx->bodyLoopPat = 0;
- if (!StartTalkCalculate(nTalkType, _ctx->headStartPat, _ctx->bodyStartPat,
+ if (!startTalkCalculate(nTalkType, _ctx->headStartPat, _ctx->bodyStartPat,
_ctx->headLoopPat, _ctx->bodyLoopPat))
return;
// Perform the set pattern
if (_ctx->headStartPat != 0 || _ctx->bodyStartPat != 0) {
mainFreeze();
- SetPattern(_ctx->headStartPat);
- m_body.SetPattern(_ctx->bodyStartPat);
+ setPattern(_ctx->headStartPat);
+ _body.setPattern(_ctx->bodyStartPat);
mainUnfreeze();
if (_ctx->bodyStartPat != 0)
- CORO_INVOKE_0(m_body.WaitForEndPattern);
+ CORO_INVOKE_0(_body.waitForEndPattern);
if (_ctx->headStartPat != 0)
- CORO_INVOKE_0(WaitForEndPattern);
+ CORO_INVOKE_0(waitForEndPattern);
}
mainFreeze();
- SetPattern(_ctx->headLoopPat);
+ setPattern(_ctx->headLoopPat);
if (_ctx->bodyLoopPat)
- m_body.SetPattern(_ctx->bodyLoopPat);
+ _body.setPattern(_ctx->bodyLoopPat);
mainUnfreeze();
CORO_END_CODE;
}
-bool RMTony::EndTalkCalculate(int &headStandPat, int &headEndPat, int &bodyEndPat, int &finalPat, bool &bStatic) {
+bool RMTony::endTalkCalculate(int &headStandPat, int &headEndPat, int &bodyEndPat, int &finalPat, bool &bStatic) {
bodyEndPat = 0;
headEndPat = 0;
- switch (m_TalkDirection) {
+ switch (_TalkDirection) {
case UP:
finalPat = PAT_STANDUP;
headStandPat = PAT_TESTA_UP;
@@ -1174,23 +1173,23 @@ bool RMTony::EndTalkCalculate(int &headStandPat, int &headEndPat, int &bodyEndPa
break;
}
- if (m_bPastorella) {
+ if (_bPastorella) {
mainFreeze();
- SetPattern(finalPat);
+ setPattern(finalPat);
mainUnfreeze();
- m_bIsTalking = false;
+ _bIsTalking = false;
return false;
}
bStatic = false;
- switch (m_nTalkType) {
+ switch (_nTalkType) {
case TALK_NORMAL:
bodyEndPat = 0;
break;
case TALK_FIANCHI:
- switch (m_TalkDirection) {
+ switch (_TalkDirection) {
case UP:
bodyEndPat = BPAT_FIANCHIUP_END;
break;
@@ -1215,16 +1214,16 @@ bool RMTony::EndTalkCalculate(int &headStandPat, int &headEndPat, int &bodyEndPa
case TALK_RIDE:
case TALK_RIDE2:
- if (m_TalkDirection == LEFT)
+ if (_TalkDirection == LEFT)
headEndPat = PAT_RIDELEFT_END;
- else if (m_TalkDirection == RIGHT)
+ else if (_TalkDirection == RIGHT)
headEndPat = PAT_RIDERIGHT_END;
bodyEndPat = 0;
break;
case TALK_SCHIFATO:
- switch (m_TalkDirection) {
+ switch (_TalkDirection) {
case UP:
case LEFT:
headEndPat = PAT_SCHIFATOLEFT_END;
@@ -1240,7 +1239,7 @@ bool RMTony::EndTalkCalculate(int &headStandPat, int &headEndPat, int &bodyEndPa
break;
case TALK_NAAH:
- switch (m_TalkDirection) {
+ switch (_TalkDirection) {
case UP:
case LEFT:
headEndPat = PAT_NAAHLEFT_END;
@@ -1259,7 +1258,7 @@ bool RMTony::EndTalkCalculate(int &headStandPat, int &headEndPat, int &bodyEndPa
break;
case TALK_SPAVENTATO:
- switch (m_TalkDirection) {
+ switch (_TalkDirection) {
case UP:
bodyEndPat = BPAT_SPAVENTOUP_END;
break;
@@ -1282,7 +1281,7 @@ bool RMTony::EndTalkCalculate(int &headStandPat, int &headEndPat, int &bodyEndPa
break;
case TALK_SPAVENTATO2:
- switch (m_TalkDirection) {
+ switch (_TalkDirection) {
case UP:
bodyEndPat = 0;
break;
@@ -1305,7 +1304,7 @@ bool RMTony::EndTalkCalculate(int &headStandPat, int &headEndPat, int &bodyEndPa
break;
case TALK_CONCONIGLIO:
- switch (m_TalkDirection) {
+ switch (_TalkDirection) {
case UP:
case LEFT:
finalPat = PAT_STANDLEFT;
@@ -1321,7 +1320,7 @@ bool RMTony::EndTalkCalculate(int &headStandPat, int &headEndPat, int &bodyEndPa
break;
case TALK_CONRICETTA:
- switch (m_TalkDirection) {
+ switch (_TalkDirection) {
case UP:
case LEFT:
finalPat = PAT_STANDLEFT;
@@ -1337,7 +1336,7 @@ bool RMTony::EndTalkCalculate(int &headStandPat, int &headEndPat, int &bodyEndPa
break;
case TALK_CONCARTE:
- switch (m_TalkDirection) {
+ switch (_TalkDirection) {
case UP:
case LEFT:
finalPat = PAT_STANDLEFT;
@@ -1353,7 +1352,7 @@ bool RMTony::EndTalkCalculate(int &headStandPat, int &headEndPat, int &bodyEndPa
break;
case TALK_CONPUPAZZO:
- switch (m_TalkDirection) {
+ switch (_TalkDirection) {
case UP:
case LEFT:
finalPat = PAT_STANDLEFT;
@@ -1396,7 +1395,7 @@ bool RMTony::EndTalkCalculate(int &headStandPat, int &headEndPat, int &bodyEndPa
break;
case TALK_SPAVENTATOSTATIC:
- switch (m_TalkDirection) {
+ switch (_TalkDirection) {
case DOWN:
headStandPat = PAT_SPAVENTODOWN_STAND;
bodyEndPat = 0;
@@ -1425,7 +1424,7 @@ bool RMTony::EndTalkCalculate(int &headStandPat, int &headEndPat, int &bodyEndPa
return true;
}
-void RMTony::EndTalk(CORO_PARAM) {
+void RMTony::endTalk(CORO_PARAM) {
CORO_BEGIN_CONTEXT;
int headStandPat, headEndPat;
int bodyEndPat, finalPat;
@@ -1441,93 +1440,93 @@ void RMTony::EndTalk(CORO_PARAM) {
_ctx->bodyEndPat = 0;
_ctx->headEndPat = 0;
- if (!EndTalkCalculate(_ctx->headStandPat, _ctx->headEndPat, _ctx->bodyEndPat, _ctx->finalPat, _ctx->bStatic))
+ if (!endTalkCalculate(_ctx->headStandPat, _ctx->headEndPat, _ctx->bodyEndPat, _ctx->finalPat, _ctx->bStatic))
return;
// Handles the end of an animated and static, leaving everything unchanged
- if (m_bIsStaticTalk) {
- if (m_nTalkType == TALK_CONBARBASTATIC) {
+ if (_bIsStaticTalk) {
+ if (_nTalkType == TALK_CONBARBASTATIC) {
mainFreeze();
- SetPattern(0);
- if (m_TalkDirection == UP || m_TalkDirection == LEFT) {
- m_body.SetPattern(BPAT_CONBARBALEFT_STATIC);
- m_nBodyOffset.Set(-41, -14);
- } else if (m_TalkDirection == DOWN || m_TalkDirection == RIGHT) {
- m_body.SetPattern(BPAT_CONBARBARIGHT_STATIC);
- m_nBodyOffset.Set(-26, -14);
+ setPattern(0);
+ if (_TalkDirection == UP || _TalkDirection == LEFT) {
+ _body.setPattern(BPAT_CONBARBALEFT_STATIC);
+ _nBodyOffset.Set(-41, -14);
+ } else if (_TalkDirection == DOWN || _TalkDirection == RIGHT) {
+ _body.setPattern(BPAT_CONBARBARIGHT_STATIC);
+ _nBodyOffset.Set(-26, -14);
}
mainUnfreeze();
} else {
mainFreeze();
- SetPattern(_ctx->headStandPat);
+ setPattern(_ctx->headStandPat);
mainUnfreeze();
- CORO_INVOKE_0(m_body.WaitForEndPattern);
+ CORO_INVOKE_0(_body.waitForEndPattern);
}
- m_bIsTalking = false;
+ _bIsTalking = false;
return;
}
// Set the pattern
if (_ctx->headEndPat != 0 && _ctx->bodyEndPat != 0) {
mainFreeze();
- SetPattern(_ctx->headEndPat);
+ setPattern(_ctx->headEndPat);
mainUnfreeze();
- CORO_INVOKE_0(m_body.WaitForEndPattern);
+ CORO_INVOKE_0(_body.waitForEndPattern);
mainFreeze();
- m_body.SetPattern(_ctx->bodyEndPat);
+ _body.setPattern(_ctx->bodyEndPat);
mainUnfreeze();
- CORO_INVOKE_0(WaitForEndPattern);
- CORO_INVOKE_0(m_body.WaitForEndPattern);
+ CORO_INVOKE_0(waitForEndPattern);
+ CORO_INVOKE_0(_body.waitForEndPattern);
} else if (_ctx->bodyEndPat != 0) {
mainFreeze();
- SetPattern(_ctx->headStandPat);
+ setPattern(_ctx->headStandPat);
mainUnfreeze();
- CORO_INVOKE_0(m_body.WaitForEndPattern);
+ CORO_INVOKE_0(_body.waitForEndPattern);
mainFreeze();
- m_body.SetPattern(_ctx->bodyEndPat);
+ _body.setPattern(_ctx->bodyEndPat);
mainUnfreeze();
- CORO_INVOKE_0(m_body.WaitForEndPattern);
+ CORO_INVOKE_0(_body.waitForEndPattern);
} else if (_ctx->headEndPat != 0) {
- CORO_INVOKE_0(m_body.WaitForEndPattern);
+ CORO_INVOKE_0(_body.waitForEndPattern);
mainFreeze();
- SetPattern(_ctx->headEndPat);
+ setPattern(_ctx->headEndPat);
mainUnfreeze();
- CORO_INVOKE_0(WaitForEndPattern);
+ CORO_INVOKE_0(waitForEndPattern);
} else {
- CORO_INVOKE_0(m_body.WaitForEndPattern);
+ CORO_INVOKE_0(_body.waitForEndPattern);
}
if (_ctx->finalPat != 0) {
mainFreeze();
- m_body.SetPattern(0);
- SetPattern(_ctx->finalPat);
+ _body.setPattern(0);
+ setPattern(_ctx->finalPat);
mainUnfreeze();
}
- m_bIsTalking = false;
+ _bIsTalking = false;
CORO_END_CODE;
}
-void RMTony::StartStaticCalculate(TALKTYPE nTalk, int &headPat, int &headLoopPat,
+void RMTony::startStaticCalculate(TALKTYPE nTalk, int &headPat, int &headLoopPat,
int &bodyStartPat, int &bodyLoopPat) {
- int nPat = GetCurPattern();
+ int nPat = getCurPattern();
headLoopPat = -1;
switch (nPat) {
case PAT_STANDDOWN:
- m_TalkDirection = DOWN;
+ _TalkDirection = DOWN;
headPat = PAT_TESTA_RIGHT;
break;
@@ -1536,7 +1535,7 @@ void RMTony::StartStaticCalculate(TALKTYPE nTalk, int &headPat, int &headLoopPat
case PAT_TAKELEFT_DOWN2:
case PAT_SIRIALZALEFT:
case PAT_STANDLEFT:
- m_TalkDirection = LEFT;
+ _TalkDirection = LEFT;
headPat = PAT_TESTA_LEFT;
break;
@@ -1545,7 +1544,7 @@ void RMTony::StartStaticCalculate(TALKTYPE nTalk, int &headPat, int &headLoopPat
case PAT_TAKERIGHT_DOWN2:
case PAT_SIRIALZARIGHT:
case PAT_STANDRIGHT:
- m_TalkDirection = RIGHT;
+ _TalkDirection = RIGHT;
headPat = PAT_TESTA_RIGHT;
break;
@@ -1553,26 +1552,26 @@ void RMTony::StartStaticCalculate(TALKTYPE nTalk, int &headPat, int &headLoopPat
case PAT_TAKEUP_MID2:
case PAT_TAKEUP_DOWN2:
case PAT_STANDUP:
- m_TalkDirection = UP;
+ _TalkDirection = UP;
headPat = PAT_TESTA_LEFT;
break;
}
- m_bCorpoDavanti = true;
+ _bCorpoDavanti = true;
switch (nTalk) {
case TALK_CONCONIGLIOSTATIC:
- switch (m_TalkDirection) {
+ switch (_TalkDirection) {
case UP:
case LEFT:
- m_nBodyOffset.Set(-21, -5);
+ _nBodyOffset.Set(-21, -5);
bodyStartPat = BPAT_CONCONIGLIOLEFT_START;
bodyLoopPat = BPAT_CONCONIGLIOLEFT_LOOP;
break;
case DOWN:
case RIGHT:
- m_nBodyOffset.Set(-4, -5);
+ _nBodyOffset.Set(-4, -5);
bodyStartPat = BPAT_CONCONIGLIORIGHT_START;
bodyLoopPat = BPAT_CONCONIGLIORIGHT_LOOP;
break;
@@ -1580,17 +1579,17 @@ void RMTony::StartStaticCalculate(TALKTYPE nTalk, int &headPat, int &headLoopPat
break;
case TALK_CONCARTESTATIC:
- switch (m_TalkDirection) {
+ switch (_TalkDirection) {
case UP:
case LEFT:
- m_nBodyOffset.Set(-34, -2);
+ _nBodyOffset.Set(-34, -2);
bodyStartPat = BPAT_CONCARTELEFT_START;
bodyLoopPat = BPAT_CONCARTELEFT_LOOP;
break;
case DOWN:
case RIGHT:
- m_nBodyOffset.Set(-4, -2);
+ _nBodyOffset.Set(-4, -2);
bodyStartPat = BPAT_CONCARTERIGHT_START;
bodyLoopPat = BPAT_CONCARTERIGHT_LOOP;
break;
@@ -1598,17 +1597,17 @@ void RMTony::StartStaticCalculate(TALKTYPE nTalk, int &headPat, int &headLoopPat
break;
case TALK_CONRICETTASTATIC:
- switch (m_TalkDirection) {
+ switch (_TalkDirection) {
case UP:
case LEFT:
- m_nBodyOffset.Set(-61, -7);
+ _nBodyOffset.Set(-61, -7);
bodyStartPat = BPAT_CONRICETTALEFT_START;
bodyLoopPat = BPAT_CONRICETTALEFT_LOOP;
break;
case DOWN:
case RIGHT:
- m_nBodyOffset.Set(-5, -7);
+ _nBodyOffset.Set(-5, -7);
bodyStartPat = BPAT_CONRICETTARIGHT_START;
bodyLoopPat = BPAT_CONRICETTARIGHT_LOOP;
break;
@@ -1616,17 +1615,17 @@ void RMTony::StartStaticCalculate(TALKTYPE nTalk, int &headPat, int &headLoopPat
break;
case TALK_CONPUPAZZOSTATIC:
- switch (m_TalkDirection) {
+ switch (_TalkDirection) {
case UP:
case LEFT:
- m_nBodyOffset.Set(-35, 2);
+ _nBodyOffset.Set(-35, 2);
bodyStartPat = BPAT_CONPUPAZZOLEFT_START;
bodyLoopPat = BPAT_CONPUPAZZOLEFT_LOOP;
break;
case DOWN:
case RIGHT:
- m_nBodyOffset.Set(-14, 2);
+ _nBodyOffset.Set(-14, 2);
bodyStartPat = BPAT_CONPUPAZZORIGHT_START;
bodyLoopPat = BPAT_CONPUPAZZORIGHT_LOOP;
break;
@@ -1634,17 +1633,17 @@ void RMTony::StartStaticCalculate(TALKTYPE nTalk, int &headPat, int &headLoopPat
break;
case TALK_CONTACCUINOSTATIC:
- switch (m_TalkDirection) {
+ switch (_TalkDirection) {
case UP:
case LEFT:
- m_nBodyOffset.Set(-16, -9);
+ _nBodyOffset.Set(-16, -9);
bodyStartPat = BPAT_CONTACCUINOLEFT_START;
bodyLoopPat = BPAT_CONTACCUINOLEFT_LOOP;
break;
case DOWN:
case RIGHT:
- m_nBodyOffset.Set(-6, -9);
+ _nBodyOffset.Set(-6, -9);
bodyStartPat = BPAT_CONTACCUINORIGHT_START;
bodyLoopPat = BPAT_CONTACCUINORIGHT_LOOP;
break;
@@ -1652,17 +1651,17 @@ void RMTony::StartStaticCalculate(TALKTYPE nTalk, int &headPat, int &headLoopPat
break;
case TALK_CONMEGAFONOSTATIC:
- switch (m_TalkDirection) {
+ switch (_TalkDirection) {
case UP:
case LEFT:
- m_nBodyOffset.Set(-41, -8);
+ _nBodyOffset.Set(-41, -8);
bodyStartPat = BPAT_CONMEGAFONOLEFT_START;
bodyLoopPat = BPAT_CONMEGAFONOLEFT_LOOP;
break;
case DOWN:
case RIGHT:
- m_nBodyOffset.Set(-14, -8);
+ _nBodyOffset.Set(-14, -8);
bodyStartPat = BPAT_CONMEGAFONORIGHT_START;
bodyLoopPat = BPAT_CONMEGAFONORIGHT_LOOP;
break;
@@ -1670,10 +1669,10 @@ void RMTony::StartStaticCalculate(TALKTYPE nTalk, int &headPat, int &headLoopPat
break;
case TALK_CONBARBASTATIC:
- switch (m_TalkDirection) {
+ switch (_TalkDirection) {
case UP:
case LEFT:
- m_nBodyOffset.Set(-41, -14);
+ _nBodyOffset.Set(-41, -14);
bodyStartPat = BPAT_CONBARBALEFT_START;
bodyLoopPat = BPAT_STANDLEFT;
headLoopPat = PAT_TALKBARBA_LEFT;
@@ -1682,7 +1681,7 @@ void RMTony::StartStaticCalculate(TALKTYPE nTalk, int &headPat, int &headLoopPat
case DOWN:
case RIGHT:
- m_nBodyOffset.Set(-26, -14);
+ _nBodyOffset.Set(-26, -14);
bodyStartPat = BPAT_CONBARBARIGHT_START;
bodyLoopPat = BPAT_STANDRIGHT;
headLoopPat = PAT_TALKBARBA_RIGHT;
@@ -1692,13 +1691,13 @@ void RMTony::StartStaticCalculate(TALKTYPE nTalk, int &headPat, int &headLoopPat
break;
case TALK_SPAVENTATOSTATIC:
- switch (m_TalkDirection) {
+ switch (_TalkDirection) {
case DOWN:
headPat = PAT_SPAVENTODOWN_START;
bodyLoopPat = BPAT_STANDDOWN;
bodyStartPat = BPAT_STANDDOWN;
headLoopPat = PAT_SPAVENTODOWN_STAND;
- m_nBodyOffset.Set(4, 53);
+ _nBodyOffset.Set(4, 53);
break;
case LEFT:
@@ -1706,7 +1705,7 @@ void RMTony::StartStaticCalculate(TALKTYPE nTalk, int &headPat, int &headLoopPat
bodyLoopPat = BPAT_STANDLEFT;
bodyStartPat = BPAT_STANDLEFT;
headLoopPat = PAT_SPAVENTOLEFT_STAND;
- m_nBodyOffset.Set(6, 56);
+ _nBodyOffset.Set(6, 56);
break;
case RIGHT:
@@ -1714,7 +1713,7 @@ void RMTony::StartStaticCalculate(TALKTYPE nTalk, int &headPat, int &headLoopPat
bodyLoopPat = BPAT_STANDRIGHT;
bodyStartPat = BPAT_STANDRIGHT;
headLoopPat = PAT_SPAVENTORIGHT_STAND;
- m_nBodyOffset.Set(6, 56);
+ _nBodyOffset.Set(6, 56);
break;
default:
@@ -1726,7 +1725,7 @@ void RMTony::StartStaticCalculate(TALKTYPE nTalk, int &headPat, int &headLoopPat
}
}
-void RMTony::StartStatic(CORO_PARAM, TALKTYPE nTalk) {
+void RMTony::startStatic(CORO_PARAM, TALKTYPE nTalk) {
CORO_BEGIN_CONTEXT;
int headPat, headLoopPat;
int bodyStartPat, bodyLoopPat;
@@ -1738,28 +1737,28 @@ void RMTony::StartStatic(CORO_PARAM, TALKTYPE nTalk) {
_ctx->bodyStartPat = _ctx->bodyLoopPat = 0;
// e vai con i pattern
- m_bIsStaticTalk = true;
+ _bIsStaticTalk = true;
mainFreeze();
- SetPattern(_ctx->headPat);
- m_body.SetPattern(_ctx->bodyStartPat);
+ setPattern(_ctx->headPat);
+ _body.setPattern(_ctx->bodyStartPat);
mainUnfreeze();
- CORO_INVOKE_0(m_body.WaitForEndPattern);
- CORO_INVOKE_0(WaitForEndPattern);
+ CORO_INVOKE_0(_body.waitForEndPattern);
+ CORO_INVOKE_0(waitForEndPattern);
mainFreeze();
if (_ctx->headLoopPat != -1)
- SetPattern(_ctx->headLoopPat);
- m_body.SetPattern(_ctx->bodyLoopPat);
+ setPattern(_ctx->headLoopPat);
+ _body.setPattern(_ctx->bodyLoopPat);
mainUnfreeze();
CORO_END_CODE;
}
-void RMTony::EndStaticCalculate(TALKTYPE nTalk, int &bodyEndPat, int &finalPat, int &headEndPat) {
- switch (m_TalkDirection) {
+void RMTony::endStaticCalculate(TALKTYPE nTalk, int &bodyEndPat, int &finalPat, int &headEndPat) {
+ switch (_TalkDirection) {
case UP:
case LEFT:
finalPat = PAT_STANDLEFT;
@@ -1773,7 +1772,7 @@ void RMTony::EndStaticCalculate(TALKTYPE nTalk, int &bodyEndPat, int &finalPat,
switch (nTalk) {
case TALK_CONPUPAZZOSTATIC:
- switch (m_TalkDirection) {
+ switch (_TalkDirection) {
case UP:
case LEFT:
bodyEndPat = BPAT_CONPUPAZZOLEFT_END;
@@ -1787,7 +1786,7 @@ void RMTony::EndStaticCalculate(TALKTYPE nTalk, int &bodyEndPat, int &finalPat,
break;
case TALK_CONRICETTASTATIC:
- switch (m_TalkDirection) {
+ switch (_TalkDirection) {
case UP:
case LEFT:
bodyEndPat = BPAT_CONRICETTALEFT_END;
@@ -1801,7 +1800,7 @@ void RMTony::EndStaticCalculate(TALKTYPE nTalk, int &bodyEndPat, int &finalPat,
break;
case TALK_CONCONIGLIOSTATIC:
- switch (m_TalkDirection) {
+ switch (_TalkDirection) {
case UP:
case LEFT:
bodyEndPat = BPAT_CONCONIGLIOLEFT_END;
@@ -1815,7 +1814,7 @@ void RMTony::EndStaticCalculate(TALKTYPE nTalk, int &bodyEndPat, int &finalPat,
break;
case TALK_CONCARTESTATIC:
- switch (m_TalkDirection) {
+ switch (_TalkDirection) {
case UP:
case LEFT:
bodyEndPat = BPAT_CONCARTELEFT_END;
@@ -1829,7 +1828,7 @@ void RMTony::EndStaticCalculate(TALKTYPE nTalk, int &bodyEndPat, int &finalPat,
break;
case TALK_CONTACCUINOSTATIC:
- switch (m_TalkDirection) {
+ switch (_TalkDirection) {
case UP:
case LEFT:
bodyEndPat = BPAT_CONTACCUINOLEFT_END;
@@ -1843,7 +1842,7 @@ void RMTony::EndStaticCalculate(TALKTYPE nTalk, int &bodyEndPat, int &finalPat,
break;
case TALK_CONMEGAFONOSTATIC:
- switch (m_TalkDirection) {
+ switch (_TalkDirection) {
case UP:
case LEFT:
bodyEndPat = BPAT_CONMEGAFONOLEFT_END;
@@ -1857,7 +1856,7 @@ void RMTony::EndStaticCalculate(TALKTYPE nTalk, int &bodyEndPat, int &finalPat,
break;
case TALK_CONBARBASTATIC:
- switch (m_TalkDirection) {
+ switch (_TalkDirection) {
case UP:
case LEFT:
bodyEndPat = BPAT_CONBARBALEFT_END;
@@ -1871,7 +1870,7 @@ void RMTony::EndStaticCalculate(TALKTYPE nTalk, int &bodyEndPat, int &finalPat,
break;
case TALK_SPAVENTATOSTATIC:
- switch (m_TalkDirection) {
+ switch (_TalkDirection) {
case LEFT:
headEndPat = PAT_SPAVENTOLEFT_END;
break;
@@ -1894,7 +1893,7 @@ void RMTony::EndStaticCalculate(TALKTYPE nTalk, int &bodyEndPat, int &finalPat,
}
}
-void RMTony::EndStatic(CORO_PARAM, TALKTYPE nTalk) {
+void RMTony::endStatic(CORO_PARAM, TALKTYPE nTalk) {
CORO_BEGIN_CONTEXT;
int bodyEndPat;
int finalPat;
@@ -1907,29 +1906,29 @@ void RMTony::EndStatic(CORO_PARAM, TALKTYPE nTalk) {
_ctx->finalPat = 0;
_ctx->headEndPat = 0;
- EndStaticCalculate(nTalk, _ctx->bodyEndPat, _ctx->finalPat, _ctx->headEndPat);
+ endStaticCalculate(nTalk, _ctx->bodyEndPat, _ctx->finalPat, _ctx->headEndPat);
if (_ctx->headEndPat != 0) {
mainFreeze();
- SetPattern(_ctx->headEndPat);
+ setPattern(_ctx->headEndPat);
mainUnfreeze();
- CORO_INVOKE_0(WaitForEndPattern);
+ CORO_INVOKE_0(waitForEndPattern);
} else {
// Play please
mainFreeze();
- m_body.SetPattern(_ctx->bodyEndPat);
+ _body.setPattern(_ctx->bodyEndPat);
mainUnfreeze();
- CORO_INVOKE_0(m_body.WaitForEndPattern);
+ CORO_INVOKE_0(_body.waitForEndPattern);
}
mainFreeze();
- SetPattern(_ctx->finalPat);
- m_body.SetPattern(0);
+ setPattern(_ctx->finalPat);
+ _body.setPattern(0);
mainUnfreeze();
- m_bIsStaticTalk = false;
+ _bIsStaticTalk = false;
CORO_END_CODE;
}
diff --git a/engines/tony/tonychar.h b/engines/tony/tonychar.h
index e7b4227fc5..5179230b4c 100644
--- a/engines/tony/tonychar.h
+++ b/engines/tony/tonychar.h
@@ -81,36 +81,36 @@ public:
};
private:
- bool m_bShow;
- bool m_bShowOmbra;
- bool m_bCorpoDavanti;
- RMGfxSourceBuffer8AB m_ombra;
- bool m_bActionPending;
- RMItem *m_ActionItem;
- int m_Action;
- int m_ActionParm;
- static bool m_bAction;
-
- bool m_bPastorella;
-
- bool m_bIsStaticTalk;
- bool m_bIsTalking;
- int m_nPatB4Talking;
- TALKTYPE m_nTalkType;
- DIRECTION m_TalkDirection;
- RMPoint m_nBodyOffset;
-
- int m_nTimeLastStep;
-
- RMItem m_body;
+ bool _bShow;
+ bool _bShowOmbra;
+ bool _bCorpoDavanti;
+ RMGfxSourceBuffer8AB _ombra;
+ bool _bActionPending;
+ RMItem *_ActionItem;
+ int _Action;
+ int _ActionParm;
+ static bool _bAction;
+
+ bool _bPastorella;
+
+ bool _bIsStaticTalk;
+ bool _bIsTalking;
+ int _nPatB4Talking;
+ TALKTYPE _nTalkType;
+ DIRECTION _TalkDirection;
+ RMPoint _nBodyOffset;
+
+ int _nTimeLastStep;
+
+ RMItem _body;
uint32 hActionThread;
protected:
// Overload of the allocation allocation of sprites
- virtual RMGfxSourceBuffer *NewItemSpriteBuffer(int dimx, int dimy, bool bPreRLE);
+ virtual RMGfxSourceBuffer *newItemSpriteBuffer(int dimx, int dimy, bool bPreRLE);
// Watch thread which waits for the end of an action
- static void WaitEndOfAction(CORO_PARAM, const void *param);
+ static void waitEndOfAction(CORO_PARAM, const void *param);
public:
enum PATTERNS {
@@ -365,87 +365,87 @@ public:
void init(void);
// Free all memory
- void Close(void);
+ void close(void);
// Tony makes a frame, updating the movement, etc.
- void DoFrame(CORO_PARAM, RMGfxTargetBuffer *bigBuf, int curLoc);
+ void doFrame(CORO_PARAM, RMGfxTargetBuffer *bigBuf, int curLoc);
// Draw method, which controls chararacter display
virtual void draw(CORO_PARAM, RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim);
// Show or hide
- void Show(void);
- void Hide(bool bShowOmbra = false);
+ void show(void);
+ void hide(bool bShowOmbra = false);
// Move and make an action, if necessary
- void MoveAndDoAction(CORO_PARAM, RMPoint dst, RMItem *item, int nAction, int nActionParm = 0);
+ void moveAndDoAction(CORO_PARAM, RMPoint dst, RMItem *item, int nAction, int nActionParm = 0);
// Tony stops (on the right side with respect to any subject)
- virtual void Stop(CORO_PARAM);
- void StopNoAction(CORO_PARAM);
+ virtual void stop(CORO_PARAM);
+ void stopNoAction(CORO_PARAM);
// Set a pattern
- void SetPattern(int npatt, bool bPlayP0 = false);
+ void setPattern(int npatt, bool bPlayP0 = false);
// Reads the current pattern
- int GetCurPattern();
+ int getCurPattern();
// Waits until the end of a pattern
- void WaitForEndPattern(CORO_PARAM, uint32 hCustomSkip = CORO_INVALID_PID_VALUE) {
- RMCharacter::WaitForEndPattern(coroParam, hCustomSkip);
+ void waitForEndPattern(CORO_PARAM, uint32 hCustomSkip = CORO_INVALID_PID_VALUE) {
+ RMCharacter::waitForEndPattern(coroParam, hCustomSkip);
}
// Check if currently in an action
- bool InAction() {
- return (m_bActionPending && m_Action != 0) | m_bAction;
+ bool inAction() {
+ return (_bActionPending && _Action != 0) | _bAction;
}
// Check if there needs to be an update for scrolling movement
- bool MustUpdateScrolling() {
- return ((!InAction()) || (IsMoving()));
+ bool mustUpdateScrolling() {
+ return ((!inAction()) || (isMoving()));
}
// Returns Tony's position
- RMPoint Position() {
- return m_pos;
+ RMPoint position() {
+ return _pos;
}
// Set the scrolling position
- void SetScrollPosition(const RMPoint &pt) {
- RMCharacter::SetScrollPosition(pt);
+ void setScrollPosition(const RMPoint &pt) {
+ RMCharacter::setScrollPosition(pt);
}
// Set the take animation
- void Take(int nWhere, int nPart);
- void Put(int nWhere, int nPart);
+ void take(int nWhere, int nPart);
+ void put(int nWhere, int nPart);
// Start or End Talk
- bool StartTalkCalculate(TALKTYPE nTalkType, int &headStartPat, int &bodyStartPat,
+ bool startTalkCalculate(TALKTYPE nTalkType, int &headStartPat, int &bodyStartPat,
int &headLoopPat, int &bodyLoopPat);
- void StartTalk(CORO_PARAM, TALKTYPE nTalkType);
- bool EndTalkCalculate(int &headStandPat, int &headEndPat, int &bodyEndPat, int &finalPat, bool &bStatic);
- void EndTalk(CORO_PARAM);
+ void startTalk(CORO_PARAM, TALKTYPE nTalkType);
+ bool endTalkCalculate(int &headStandPat, int &headEndPat, int &bodyEndPat, int &finalPat, bool &bStatic);
+ void endTalk(CORO_PARAM);
// Start or End Static
- void StartStaticCalculate(TALKTYPE nTalk, int &headPat, int &headLoopPat,
+ void startStaticCalculate(TALKTYPE nTalk, int &headPat, int &headLoopPat,
int &bodyStartPat, int &bodyLoopPat);
- void StartStatic(CORO_PARAM, TALKTYPE nTalkType);
- void EndStaticCalculate(TALKTYPE nTalk, int &bodyEndPat, int &finalPat, int &headEndPat);
- void EndStatic(CORO_PARAM, TALKTYPE nTalkType);
+ void startStatic(CORO_PARAM, TALKTYPE nTalkType);
+ void endStaticCalculate(TALKTYPE nTalk, int &bodyEndPat, int &finalPat, int &headEndPat);
+ void endStatic(CORO_PARAM, TALKTYPE nTalkType);
// Tony disguises himself!
- void SetPastorella(bool bIsPast) {
- m_bPastorella = bIsPast;
+ void setPastorella(bool bIsPast) {
+ _bPastorella = bIsPast;
}
- int GetPastorella(void) {
- return m_bPastorella;
+ int getPastorella(void) {
+ return _bPastorella;
}
// Perform an action
- void ExecuteAction(int nAction, int nActionItem, int nParm);
+ void executeAction(int nAction, int nActionItem, int nParm);
- void PlaySfx(int nSfx) {
- RMItem::PlaySfx(nSfx);
+ void playSfx(int nSfx) {
+ RMItem::playSfx(nSfx);
}
};