aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorStrangerke2019-10-30 23:00:03 +0100
committerEugene Sandulenko2019-11-13 22:07:08 +0100
commit9142bea88570f0b1dcf54ff84b3a421daabdab84 (patch)
tree8d418af83f1ada8cc1b79bb038d3edd61f5454bb /engines
parent4a822bc21dc50723c5ab528b119169d635fc275e (diff)
downloadscummvm-rg350-9142bea88570f0b1dcf54ff84b3a421daabdab84.tar.gz
scummvm-rg350-9142bea88570f0b1dcf54ff84b3a421daabdab84.tar.bz2
scummvm-rg350-9142bea88570f0b1dcf54ff84b3a421daabdab84.zip
GRIFFON: start renaming members of Griffon engine class
Diffstat (limited to 'engines')
-rw-r--r--engines/griffon/combat.cpp118
-rw-r--r--engines/griffon/cutscenes.cpp148
-rw-r--r--engines/griffon/dialogs.cpp132
-rw-r--r--engines/griffon/draw.cpp292
-rw-r--r--engines/griffon/engine.cpp32
-rw-r--r--engines/griffon/gfx.cpp40
-rw-r--r--engines/griffon/griffon.h46
-rw-r--r--engines/griffon/input.cpp234
-rw-r--r--engines/griffon/logic.cpp276
-rw-r--r--engines/griffon/resources.cpp216
-rw-r--r--engines/griffon/saveload.cpp12
-rw-r--r--engines/griffon/sound.cpp8
12 files changed, 774 insertions, 780 deletions
diff --git a/engines/griffon/combat.cpp b/engines/griffon/combat.cpp
index f8541040f5..727973003d 100644
--- a/engines/griffon/combat.cpp
+++ b/engines/griffon/combat.cpp
@@ -52,7 +52,7 @@ void GriffonEngine::attack() {
if (ly > 0) {
int o2 = 0; // ??
int o = _objectMap[lx][ly - 1];
- if (ly > 1 && (_curmap == 54 || _curmap == 58))
+ if (ly > 1 && (_curMap == 54 || _curMap == 58))
o2 = _objectMap[lx][ly - 2];
// cst
@@ -67,7 +67,7 @@ void GriffonEngine::attack() {
_player.inventory[kInvFlask]++;
addFloatIcon(6, lx * 16, (ly - 1) * 16);
- _objmapf[_curmap][lx][ly - 1] = 1;
+ _objmapf[_curMap][lx][ly - 1] = 1;
if (config.effects) {
int snd = playSound(_sfx[kSndPowerUp]);
@@ -86,7 +86,7 @@ void GriffonEngine::attack() {
eventText("Cannot Carry any more Flasks!");
}
- _itemticks = _ticks + 215;
+ _itemTicks = _ticks + 215;
return;
break;
case kScriptMasterKey:
@@ -94,14 +94,14 @@ void GriffonEngine::attack() {
addFloatIcon(14, lx * 16, (ly - 1) * 16);
- _itemticks = _ticks + 215;
+ _itemTicks = _ticks + 215;
- if (_curmap == 34)
- _scriptflag[kScriptMasterKey][0] = 2;
- else if (_curmap == 62)
- _scriptflag[kScriptGardenMasterKey][0] = 2;
- else if (_curmap == 81)
- _scriptflag[kScriptCitadelMasterKey][0] = 2;
+ if (_curMap == 34)
+ _scriptFlag[kScriptMasterKey][0] = 2;
+ else if (_curMap == 62)
+ _scriptFlag[kScriptGardenMasterKey][0] = 2;
+ else if (_curMap == 81)
+ _scriptFlag[kScriptCitadelMasterKey][0] = 2;
if (config.effects) {
int snd = playSound(_sfx[kSndPowerUp]);
@@ -127,7 +127,7 @@ void GriffonEngine::attack() {
_objectMap[lx][ly - 1] = 3;
eventText("Found the Infinite Crystal!");
- _itemticks = _ticks + 215;
+ _itemTicks = _ticks + 215;
return;
case kScriptFindShield:
if (_player.shield == 1) {
@@ -135,7 +135,7 @@ void GriffonEngine::attack() {
addFloatIcon(4, lx * 16, (ly - 1) * 16);
- _itemticks = _ticks + 215;
+ _itemTicks = _ticks + 215;
if (config.effects) {
int snd = playSound(_sfx[kSndPowerUp]);
@@ -156,7 +156,7 @@ void GriffonEngine::attack() {
addFloatIcon(3, lx * 16, (ly - 1) * 16);
- _itemticks = _ticks + 215;
+ _itemTicks = _ticks + 215;
if (config.effects) {
int snd = playSound(_sfx[kSndPowerUp]);
@@ -174,8 +174,8 @@ void GriffonEngine::attack() {
_player.inventory[kInvNormalKey]++;
for (int s = 20; s <= 23; s++) {
- if (_scriptflag[s][0] == 1) {
- _scriptflag[s][0] = 2;
+ if (_scriptFlag[s][0] == 1) {
+ _scriptFlag[s][0] = 2;
}
}
@@ -184,7 +184,7 @@ void GriffonEngine::attack() {
setChannelVolume(snd, config.effectsvol);
}
- _objmapf[_curmap][lx][ly - 1] = 1;
+ _objmapf[_curMap][lx][ly - 1] = 1;
if (_objectInfo[o][4] == 1)
_objectMap[lx][ly - 1] = 3;
@@ -205,7 +205,7 @@ void GriffonEngine::attack() {
_player.inventory[kInvDoubleFlask]++;
addFloatIcon(12, lx * 16, (ly - 1) * 16);
- _objmapf[_curmap][lx][ly - 1] = 1;
+ _objmapf[_curMap][lx][ly - 1] = 1;
if (config.effects) {
int snd = playSound(_sfx[kSndPowerUp]);
@@ -225,7 +225,7 @@ void GriffonEngine::attack() {
eventText("Cannot Carry any more Mega Flasks!");
}
- _itemticks = _ticks + 215;
+ _itemTicks = _ticks + 215;
return;
break;
case kScriptBlueFlaskChest:
@@ -233,7 +233,7 @@ void GriffonEngine::attack() {
_player.inventory[kInvDoubleFlask]++;
addFloatIcon(12, lx * 16, (ly - 1) * 16);
- _objmapf[_curmap][lx][ly - 1] = 1;
+ _objmapf[_curMap][lx][ly - 1] = 1;
if (config.effects) {
int snd = playSound(_sfx[kSndPowerUp]);
@@ -252,7 +252,7 @@ void GriffonEngine::attack() {
eventText("Cannot Carry any more Mega Flasks!");
}
- _itemticks = _ticks + 215;
+ _itemTicks = _ticks + 215;
return;
break;
case kScriptLightningChest:
@@ -260,7 +260,7 @@ void GriffonEngine::attack() {
_player.inventory[kInvShock]++;
addFloatIcon(17, lx * 16, (ly - 1) * 16);
- _objmapf[_curmap][lx][ly - 1] = 1;
+ _objmapf[_curMap][lx][ly - 1] = 1;
if (config.effects) {
int snd = playSound(_sfx[kSndPowerUp]);
@@ -279,7 +279,7 @@ void GriffonEngine::attack() {
eventText("Cannot Carry any more Lightning Bombs!");
}
- _itemticks = _ticks + 215;
+ _itemTicks = _ticks + 215;
return;
break;
case kScriptArmourChest:
@@ -297,33 +297,33 @@ void GriffonEngine::attack() {
_objectMap[lx][ly - 1] = 3;
eventText("Found the Fidelis Mail!");
- _itemticks = _ticks + 215;
+ _itemTicks = _ticks + 215;
return;
}
break;
case kScriptLever:
- if (_curmap == 58 && _scriptflag[kScriptLever][0] == 0) {
- _scriptflag[kScriptLever][0] = 1;
+ if (_curMap == 58 && _scriptFlag[kScriptLever][0] == 0) {
+ _scriptFlag[kScriptLever][0] = 1;
if (config.effects) {
int snd = playSound(_sfx[kSndLever]);
setChannelVolume(snd, config.effectsvol);
}
- } else if (_curmap == 58 && _scriptflag[kScriptLever][0] > 0) {
+ } else if (_curMap == 58 && _scriptFlag[kScriptLever][0] > 0) {
if (config.effects) {
int snd = playSound(_sfx[kSndDoor]);
setChannelVolume(snd, config.effectsvol);
}
eventText("It's stuck!");
- } else if (_curmap == 54 && _scriptflag[kScriptLever][0] == 1) {
+ } else if (_curMap == 54 && _scriptFlag[kScriptLever][0] == 1) {
if (config.effects) {
int snd = playSound(_sfx[kSndLever]);
setChannelVolume(snd, config.effectsvol);
}
- _scriptflag[kScriptLever][0] = 2;
- } else if (_curmap == 54 && _scriptflag[kScriptLever][0] > 1) {
+ _scriptFlag[kScriptLever][0] = 2;
+ } else if (_curMap == 54 && _scriptFlag[kScriptLever][0] > 1) {
if (config.effects) {
int snd = playSound(_sfx[kSndDoor]);
setChannelVolume(snd, config.effectsvol);
@@ -338,7 +338,7 @@ void GriffonEngine::attack() {
addFloatIcon(18, lx * 16, (ly - 1) * 16);
- _itemticks = _ticks + 215;
+ _itemTicks = _ticks + 215;
if (config.effects) {
int snd = playSound(_sfx[kSndPowerUp]);
@@ -356,7 +356,7 @@ void GriffonEngine::attack() {
if (_player.shield < 3) {
_player.shield = 3;
addFloatIcon(19, lx * 16, (ly - 1) * 16);
- _itemticks = _ticks + 215;
+ _itemTicks = _ticks + 215;
if (config.effects) {
int snd = playSound(_sfx[kSndPowerUp]);
@@ -374,7 +374,7 @@ void GriffonEngine::attack() {
if (_player.armour < 3) {
_player.armour = 3;
addFloatIcon(20, lx * 16, (ly - 1) * 16);
- _itemticks = _ticks + 215;
+ _itemTicks = _ticks + 215;
if (config.effects) {
int snd = playSound(_sfx[kSndPowerUp]);
@@ -670,8 +670,8 @@ void GriffonEngine::damageNPC(int npcnum, int damage, int spell) {
if (lx == cx && ly == cy)
_player.py += 16;
- _clipbg2->fillRect(rcDest, _clipbg->format.RGBToColor(255, 255, 255));
- _scriptflag[kScriptMasterKey][0] = 1;
+ _clipBg2->fillRect(rcDest, _clipBg->format.RGBToColor(255, 255, 255));
+ _scriptFlag[kScriptMasterKey][0] = 1;
}
}
@@ -702,13 +702,13 @@ void GriffonEngine::damageNPC(int npcnum, int damage, int spell) {
if (lx == cx && ly == cy)
_player.py += 16;
- _scriptflag[kScriptFindCrystal][0] = 1;
- _clipbg2->fillRect(rcDest, _clipbg->format.RGBToColor(255, 255, 255));
+ _scriptFlag[kScriptFindCrystal][0] = 1;
+ _clipBg2->fillRect(rcDest, _clipBg->format.RGBToColor(255, 255, 255));
}
}
// tower shield chest script
- if (_npcinfo[npcnum].script == kScriptFindShield && _scriptflag[kScriptFindShield][0] == 0) {
+ if (_npcinfo[npcnum].script == kScriptFindShield && _scriptFlag[kScriptFindShield][0] == 0) {
_triggerloc[9][7] = 5004;
int curTile = 40;
@@ -730,7 +730,7 @@ void GriffonEngine::damageNPC(int npcnum, int damage, int spell) {
rcDest.setWidth(16);
rcDest.setHeight(16);
- _tiles[curTileL]->blit(*_mapbg, rcDest.left, rcDest.top, Graphics::FLIP_NONE, &rcSrc);
+ _tiles[curTileL]->blit(*_mapBg, rcDest.left, rcDest.top, Graphics::FLIP_NONE, &rcSrc);
}
// firehydra sword chest
@@ -760,14 +760,14 @@ void GriffonEngine::damageNPC(int npcnum, int damage, int spell) {
if (lx == cx && ly == cy)
_player.py += 16;
- _scriptflag[kScriptFindSword][0] = 1;
- _clipbg2->fillRect(rcDest, _clipbg->format.RGBToColor(255, 255, 255));
+ _scriptFlag[kScriptFindSword][0] = 1;
+ _clipBg2->fillRect(rcDest, _clipBg->format.RGBToColor(255, 255, 255));
}
}
// gardens master key script
- if (_npcinfo[npcnum].script == kScriptGardenMasterKey && _scriptflag[kScriptKeyChest][0] == 0) {
+ if (_npcinfo[npcnum].script == kScriptGardenMasterKey && _scriptFlag[kScriptKeyChest][0] == 0) {
bool alive = false;
for (int i = 1; i <= _lastnpc; i++) {
if (_npcinfo[i].hp > 0)
@@ -793,14 +793,14 @@ void GriffonEngine::damageNPC(int npcnum, int damage, int spell) {
if (lx == cx && ly == cy)
_player.py += 16;
- _clipbg2->fillRect(rcDest, _clipbg->format.RGBToColor(255, 255, 255));
- _scriptflag[kScriptGardenMasterKey][0] = 1;
+ _clipBg2->fillRect(rcDest, _clipBg->format.RGBToColor(255, 255, 255));
+ _scriptFlag[kScriptGardenMasterKey][0] = 1;
}
}
// regular key chest 1
for (int s = 20; s <= 23; s++) {
- if (_npcinfo[npcnum].script == s && _scriptflag[s][0] < 2) {
+ if (_npcinfo[npcnum].script == s && _scriptFlag[s][0] < 2) {
bool alive = false;
for (int i = 1; i <= _lastnpc; i++) {
if (_npcinfo[i].hp > 0)
@@ -826,14 +826,14 @@ void GriffonEngine::damageNPC(int npcnum, int damage, int spell) {
if (lx == cx && ly == cy)
_player.py += 16;
- _scriptflag[s][0] = 1;
- _clipbg2->fillRect(rcDest, _clipbg->format.RGBToColor(255, 255, 255));
+ _scriptFlag[s][0] = 1;
+ _clipBg2->fillRect(rcDest, _clipBg->format.RGBToColor(255, 255, 255));
}
}
}
// pickup lightning bomb
- if (_npcinfo[npcnum].script == kScriptLightningBomb && (_curmap == 41 && _scriptflag[kScriptLightningBomb][1] == 0)) {
+ if (_npcinfo[npcnum].script == kScriptLightningBomb && (_curMap == 41 && _scriptFlag[kScriptLightningBomb][1] == 0)) {
bool alive = false;
for (int i = 1; i <= _lastnpc; i++) {
if (_npcinfo[i].hp > 0)
@@ -889,13 +889,13 @@ void GriffonEngine::damageNPC(int npcnum, int damage, int spell) {
if (lx == cx && ly == cy)
_player.py += 16;
- _scriptflag[kScriptArmourChest][0] = 1;
- _clipbg2->fillRect(rcDest, _clipbg->format.RGBToColor(255, 255, 255));
+ _scriptFlag[kScriptArmourChest][0] = 1;
+ _clipBg2->fillRect(rcDest, _clipBg->format.RGBToColor(255, 255, 255));
}
}
// citadel master key script
- if (_npcinfo[npcnum].script == kScriptCitadelMasterKey && _scriptflag[kScriptCitadelMasterKey][0] == 0) {
+ if (_npcinfo[npcnum].script == kScriptCitadelMasterKey && _scriptFlag[kScriptCitadelMasterKey][0] == 0) {
bool alive = false;
for (int i = 1; i <= _lastnpc; i++) {
if (_npcinfo[i].hp > 0)
@@ -921,13 +921,13 @@ void GriffonEngine::damageNPC(int npcnum, int damage, int spell) {
if (lx == cx && ly == cy)
_player.py += 16;
- _clipbg2->fillRect(rcDest, _clipbg->format.RGBToColor(255, 255, 255));
- _scriptflag[kScriptCitadelMasterKey][0] = 1;
+ _clipBg2->fillRect(rcDest, _clipBg->format.RGBToColor(255, 255, 255));
+ _scriptFlag[kScriptCitadelMasterKey][0] = 1;
}
}
// max ups
- if (_npcinfo[npcnum].script == kScriptGetSword3 && _scriptflag[kScriptGetSword3][0] == 0) {
+ if (_npcinfo[npcnum].script == kScriptGetSword3 && _scriptFlag[kScriptGetSword3][0] == 0) {
bool alive = false;
for (int i = 1; i <= _lastnpc; i++) {
if (_npcinfo[i].hp > 0)
@@ -953,8 +953,8 @@ void GriffonEngine::damageNPC(int npcnum, int damage, int spell) {
if (lx == cx && ly == cy)
_player.py += 16;
- _clipbg2->fillRect(rcDest, _clipbg->format.RGBToColor(255, 255, 255));
- _scriptflag[kScriptGetSword3][0] = 1;
+ _clipBg2->fillRect(rcDest, _clipBg->format.RGBToColor(255, 255, 255));
+ _scriptFlag[kScriptGetSword3][0] = 1;
cx = 9;
cy = 8;
@@ -974,9 +974,9 @@ void GriffonEngine::damageNPC(int npcnum, int damage, int spell) {
if (lx == cx && ly == cy)
_player.py += 16;
- _clipbg2->fillRect(rcDest, _clipbg->format.RGBToColor(255, 255, 255));
+ _clipBg2->fillRect(rcDest, _clipBg->format.RGBToColor(255, 255, 255));
- _scriptflag[kScriptShield3][0] = 1;
+ _scriptFlag[kScriptShield3][0] = 1;
cx = 12;
cy = 8;
@@ -996,8 +996,8 @@ void GriffonEngine::damageNPC(int npcnum, int damage, int spell) {
if (lx == cx && ly == cy)
_player.py += 16;
- _clipbg2->fillRect(rcDest, _clipbg->format.RGBToColor(255, 255, 255));
- _scriptflag[kScriptArmour3][0] = 1;
+ _clipBg2->fillRect(rcDest, _clipBg->format.RGBToColor(255, 255, 255));
+ _scriptFlag[kScriptArmour3][0] = 1;
}
}
diff --git a/engines/griffon/cutscenes.cpp b/engines/griffon/cutscenes.cpp
index 719e89f18b..ce58ad9a78 100644
--- a/engines/griffon/cutscenes.cpp
+++ b/engines/griffon/cutscenes.cpp
@@ -138,10 +138,10 @@ void GriffonEngine::showLogos() {
y = CLIP<float>(y, 0.0, 255.0);
}
- _videobuffer->fillRect(Common::Rect(0, 0, 320, 240), 0);
- _logosimg->blit(*_videobuffer, 0, 0, Graphics::FLIP_NONE, nullptr, TS_ARGB((int)y, (int)y, (int)y, (int)y));
+ _videoBuffer->fillRect(Common::Rect(0, 0, 320, 240), 0);
+ _logosImg->blit(*_videoBuffer, 0, 0, Graphics::FLIP_NONE, nullptr, TS_ARGB((int)y, (int)y, (int)y, (int)y));
- g_system->copyRectToScreen(_videobuffer->getPixels(), _videobuffer->pitch, 0, 0, _videobuffer->w, _videobuffer->h);
+ g_system->copyRectToScreen(_videoBuffer->getPixels(), _videoBuffer->pitch, 0, 0, _videoBuffer->w, _videoBuffer->h);
g_system->updateScreen();
g_system->getEventManager()->pollEvent(_event);
@@ -149,15 +149,15 @@ void GriffonEngine::showLogos() {
if (_event.type == Common::EVENT_QUIT)
_shouldQuit = true;
- _tickspassed = _ticks;
+ _ticksPassed = _ticks;
_ticks = g_system->getMillis();
- _tickspassed = _ticks - _tickspassed;
- _fpsr = (float)_tickspassed / 24;
+ _ticksPassed = _ticks - _ticksPassed;
+ _fpsr = (float)_ticksPassed / 24;
_fp++;
- if (_ticks > _nextticks) {
- _nextticks = _ticks + 1000;
+ if (_ticks > _nextTicks) {
+ _nextTicks = _ticks + 1000;
_fps = _fp;
_fp = 0;
}
@@ -169,13 +169,13 @@ void GriffonEngine::showLogos() {
}
void GriffonEngine::intro() {
- _videobuffer2->fillRect(Common::Rect(0, 0, _videobuffer2->w, _videobuffer2->h), 0);
- _videobuffer3->fillRect(Common::Rect(0, 0, _videobuffer3->w, _videobuffer3->h), 0);
+ _videoBuffer2->fillRect(Common::Rect(0, 0, _videoBuffer2->w, _videoBuffer2->h), 0);
+ _videoBuffer3->fillRect(Common::Rect(0, 0, _videoBuffer3->w, _videoBuffer3->h), 0);
_ticks = g_system->getMillis();
- _videobuffer->blit(*_videobuffer3);
- _videobuffer->blit(*_videobuffer2);
+ _videoBuffer->blit(*_videoBuffer3);
+ _videoBuffer->blit(*_videoBuffer2);
_fpsr = 0.0;
int y = 140;
@@ -187,7 +187,7 @@ void GriffonEngine::intro() {
}
_secsingame = 0;
- _secstart = 0;
+ _secStart = 0;
bool ldstop = false;
int cnt = 0;
@@ -208,12 +208,12 @@ void GriffonEngine::intro() {
rc.left = -xofs;
rc.top = 0;
- _titleimg->blit(*_videobuffer, rc.left, rc.top);
+ _titleImg->blit(*_videoBuffer, rc.left, rc.top);
rc.left = -xofs + 320;
rc.top = 0;
- _titleimg->blit(*_videobuffer, rc.left, rc.top);
+ _titleImg->blit(*_videoBuffer, rc.left, rc.top);
if (++cnt >= 6) {
cnt = 0;
@@ -224,25 +224,25 @@ void GriffonEngine::intro() {
int yy = y + i * 10;
if (yy > -8 && yy < 240) {
int x = 160 - strlen(story[i]) * 4;
- drawString(_videobuffer, story[i], x, yy, 4);
+ drawString(_videoBuffer, story[i], x, yy, 4);
}
if (yy < 10 && i == 47)
return;
}
- g_system->copyRectToScreen(_videobuffer->getPixels(), _videobuffer->pitch, 0, 0, _videobuffer->w, _videobuffer->h);
+ g_system->copyRectToScreen(_videoBuffer->getPixels(), _videoBuffer->pitch, 0, 0, _videoBuffer->w, _videoBuffer->h);
g_system->updateScreen();
- _tickspassed = _ticks;
+ _ticksPassed = _ticks;
_ticks = g_system->getMillis();
- _tickspassed = _ticks - _tickspassed;
- _fpsr = (float)_tickspassed / 24.0;
+ _ticksPassed = _ticks - _ticksPassed;
+ _fpsr = (float)_ticksPassed / 24.0;
_fp++;
- if (_ticks > _nextticks) {
- _nextticks = _ticks + 1000;
+ if (_ticks > _nextTicks) {
+ _nextTicks = _ticks + 1000;
_fps = _fp;
_fp = 0;
}
@@ -283,9 +283,9 @@ void GriffonEngine::endOfGame() {
int ticks1 = _ticks;
int ya = 0;
- _videobuffer2->fillRect(Common::Rect(0, 0, _videobuffer2->w, _videobuffer2->h), 0);
- _videobuffer3->fillRect(Common::Rect(0, 0, _videobuffer3->w, _videobuffer3->h), 0);
- _videobuffer2->copyRectToSurface(_videobuffer->getPixels(), _videobuffer->pitch, 0, 0, _videobuffer->w, _videobuffer->h);
+ _videoBuffer2->fillRect(Common::Rect(0, 0, _videoBuffer2->w, _videoBuffer2->h), 0);
+ _videoBuffer3->fillRect(Common::Rect(0, 0, _videoBuffer3->w, _videoBuffer3->h), 0);
+ _videoBuffer2->copyRectToSurface(_videoBuffer->getPixels(), _videoBuffer->pitch, 0, 0, _videoBuffer->w, _videoBuffer->h);
float ld = 0;
bool ldstop = false; // CHECKME: Check if actually used
@@ -307,27 +307,27 @@ void GriffonEngine::endOfGame() {
} else
break;
- _videobuffer->fillRect(Common::Rect(0, 0, _videobuffer->w, _videobuffer->h), 0);
+ _videoBuffer->fillRect(Common::Rect(0, 0, _videoBuffer->w, _videoBuffer->h), 0);
- _videobuffer->setAlpha(ya);
- _videobuffer3->copyRectToSurface(_videobuffer2->getPixels(), _videobuffer2->pitch, 0, 0, _videobuffer2->w, _videobuffer2->h);
- _videobuffer3->copyRectToSurface(_videobuffer->getPixels(), _videobuffer->pitch, 0, 0, _videobuffer->w, _videobuffer->h);
+ _videoBuffer->setAlpha(ya);
+ _videoBuffer3->copyRectToSurface(_videoBuffer2->getPixels(), _videoBuffer2->pitch, 0, 0, _videoBuffer2->w, _videoBuffer2->h);
+ _videoBuffer3->copyRectToSurface(_videoBuffer->getPixels(), _videoBuffer->pitch, 0, 0, _videoBuffer->w, _videoBuffer->h);
- g_system->copyRectToScreen(_videobuffer3->getPixels(), _videobuffer3->pitch, 0, 0, _videobuffer3->w, _videobuffer3->h);
+ g_system->copyRectToScreen(_videoBuffer3->getPixels(), _videoBuffer3->pitch, 0, 0, _videoBuffer3->w, _videoBuffer3->h);
g_system->updateScreen();
g_system->getEventManager()->pollEvent(_event);
g_system->delayMillis(10);
- _tickspassed = _ticks;
+ _ticksPassed = _ticks;
_ticks = g_system->getMillis();
- _tickspassed = _ticks - _tickspassed;
- _fpsr = (float)_tickspassed / 24;
+ _ticksPassed = _ticks - _ticksPassed;
+ _fpsr = (float)_ticksPassed / 24;
_fp++;
- if (_ticks > _nextticks) {
- _nextticks = _ticks + 1000;
+ if (_ticks > _nextTicks) {
+ _nextTicks = _ticks + 1000;
_fps = _fp;
_fp = 0;
}
@@ -343,19 +343,19 @@ void GriffonEngine::endOfGame() {
rc.left = -xofs;
rc.top = 0;
- _titleimg->blit(*_videobuffer, rc.left, rc.top);
+ _titleImg->blit(*_videoBuffer, rc.left, rc.top);
rc.left = -xofs + 320;
rc.top = 0;
- _titleimg->blit(*_videobuffer, rc.left, rc.top);
+ _titleImg->blit(*_videoBuffer, rc.left, rc.top);
y = y - spd * _fpsr;
for (int i = 0; i <= 26; i++) {
int yy = y + i * 10;
if (yy > -8 && yy < 240) {
int x = 160 - strlen(story2[i]) * 4;
- drawString(_videobuffer, story2[i], x, yy, 4);
+ drawString(_videoBuffer, story2[i], x, yy, 4);
}
if (yy < 10 && i == 25)
@@ -368,22 +368,22 @@ void GriffonEngine::endOfGame() {
ya = CLIP(ya, 0, 255);
}
- _videobuffer->setAlpha(ya);
- g_system->copyRectToScreen(_videobuffer->getPixels(), _videobuffer->pitch, 0, 0, _videobuffer->w, _videobuffer->h);
+ _videoBuffer->setAlpha(ya);
+ g_system->copyRectToScreen(_videoBuffer->getPixels(), _videoBuffer->pitch, 0, 0, _videoBuffer->w, _videoBuffer->h);
g_system->updateScreen();
g_system->getEventManager()->pollEvent(_event);
g_system->delayMillis(10);
- _tickspassed = _ticks;
+ _ticksPassed = _ticks;
_ticks = g_system->getMillis();
- _tickspassed = _ticks - _tickspassed;
- _fpsr = (float)_tickspassed / 24;
+ _ticksPassed = _ticks - _ticksPassed;
+ _fpsr = (float)_ticksPassed / 24;
_fp++;
- if (_ticks > _nextticks) {
- _nextticks = _ticks + 1000;
+ if (_ticks > _nextTicks) {
+ _nextTicks = _ticks + 1000;
_fps = _fp;
_fp = 0;
}
@@ -408,7 +408,7 @@ void GriffonEngine::endOfGame() {
ticks1 = _ticks;
int y1 = 0;
- _videobuffer2->copyRectToSurface(_videobuffer->getPixels(), _videobuffer->pitch, 0, 0, _videobuffer->w, _videobuffer->h);
+ _videoBuffer2->copyRectToSurface(_videoBuffer->getPixels(), _videoBuffer->pitch, 0, 0, _videoBuffer->w, _videoBuffer->h);
do {
if (_ticks < ticks1 + 1500) {
@@ -418,27 +418,27 @@ void GriffonEngine::endOfGame() {
else
break;
- _videobuffer->fillRect(Common::Rect(0, 0, _videobuffer->w, _videobuffer->h), 0);
+ _videoBuffer->fillRect(Common::Rect(0, 0, _videoBuffer->w, _videoBuffer->h), 0);
- _videobuffer->setAlpha(y1);
- _videobuffer2->blit(*_videobuffer3);
- _videobuffer->blit(*_videobuffer3);
+ _videoBuffer->setAlpha(y1);
+ _videoBuffer2->blit(*_videoBuffer3);
+ _videoBuffer->blit(*_videoBuffer3);
- g_system->copyRectToScreen(_videobuffer3->getPixels(), _videobuffer3->pitch, 0, 0, _videobuffer3->w, _videobuffer3->h);
+ g_system->copyRectToScreen(_videoBuffer3->getPixels(), _videoBuffer3->pitch, 0, 0, _videoBuffer3->w, _videoBuffer3->h);
g_system->updateScreen();
g_system->getEventManager()->pollEvent(_event);
g_system->delayMillis(10);
- _tickspassed = _ticks;
+ _ticksPassed = _ticks;
_ticks = g_system->getMillis();
- _tickspassed = _ticks - _tickspassed;
- _fpsr = (float)_tickspassed / 24;
+ _ticksPassed = _ticks - _ticksPassed;
+ _fpsr = (float)_ticksPassed / 24;
_fp++;
- if (_ticks > _nextticks) {
- _nextticks = _ticks + 1000;
+ if (_ticks > _nextTicks) {
+ _nextTicks = _ticks + 1000;
_fps = _fp;
_fp = 0;
}
@@ -451,7 +451,7 @@ void GriffonEngine::endOfGame() {
y1 = 0;
do {
- _videobuffer->copyRectToSurface(_theendimg->getPixels(), _theendimg->pitch, 0, 0, _theendimg->w, _theendimg->h);
+ _videoBuffer->copyRectToSurface(_theEndImg->getPixels(), _theEndImg->pitch, 0, 0, _theEndImg->w, _theEndImg->h);
y1 = 255;
if (_ticks < ticks1 + 1000) {
@@ -459,22 +459,22 @@ void GriffonEngine::endOfGame() {
y1 = CLIP(y1, 0, 255);
}
- _videobuffer->setAlpha(y1);
- g_system->copyRectToScreen(_videobuffer->getPixels(), _videobuffer->pitch, 0, 0, _videobuffer->w, _videobuffer->h);
+ _videoBuffer->setAlpha(y1);
+ g_system->copyRectToScreen(_videoBuffer->getPixels(), _videoBuffer->pitch, 0, 0, _videoBuffer->w, _videoBuffer->h);
g_system->updateScreen();
g_system->getEventManager()->pollEvent(_event);
g_system->delayMillis(10);
- _tickspassed = _ticks;
+ _ticksPassed = _ticks;
_ticks = g_system->getMillis();
- _tickspassed = _ticks - _tickspassed;
- _fpsr = (float)_tickspassed / 24;
+ _ticksPassed = _ticks - _ticksPassed;
+ _fpsr = (float)_ticksPassed / 24;
_fp++;
- if (_ticks > _nextticks) {
- _nextticks = _ticks + 1000;
+ if (_ticks > _nextTicks) {
+ _nextTicks = _ticks + 1000;
_fps = _fp;
_fp = 0;
}
@@ -486,8 +486,8 @@ void GriffonEngine::endOfGame() {
} while (1);
- _videobuffer2->fillRect(Common::Rect(0, 0, _videobuffer2->w, _videobuffer2->h), 0);
- _videobuffer3->fillRect(Common::Rect(0, 0, _videobuffer3->w, _videobuffer3->h), 0);
+ _videoBuffer2->fillRect(Common::Rect(0, 0, _videoBuffer2->w, _videoBuffer2->h), 0);
+ _videoBuffer3->fillRect(Common::Rect(0, 0, _videoBuffer3->w, _videoBuffer3->h), 0);
theEnd();
@@ -500,23 +500,23 @@ void GriffonEngine::theEnd() {
}
for (float y = 0; y < 100; y += _fpsr) {
- _videobuffer->setAlpha((int)y);
- _videobuffer->fillRect(Common::Rect(0, 0, _videobuffer->w, _videobuffer->h), 0);
- g_system->copyRectToScreen(_videobuffer->getPixels(), _videobuffer->pitch, 0, 0, _videobuffer->w, _videobuffer->h);
+ _videoBuffer->setAlpha((int)y);
+ _videoBuffer->fillRect(Common::Rect(0, 0, _videoBuffer->w, _videoBuffer->h), 0);
+ g_system->copyRectToScreen(_videoBuffer->getPixels(), _videoBuffer->pitch, 0, 0, _videoBuffer->w, _videoBuffer->h);
g_system->updateScreen();
g_system->getEventManager()->pollEvent(_event);
g_system->delayMillis(10);
- _tickspassed = _ticks;
+ _ticksPassed = _ticks;
_ticks = g_system->getMillis();
- _tickspassed = _ticks - _tickspassed;
- _fpsr = (float)_tickspassed / 24.0;
+ _ticksPassed = _ticks - _ticksPassed;
+ _fpsr = (float)_ticksPassed / 24.0;
_fp++;
- if (_ticks > _nextticks) {
- _nextticks = _ticks + 1000;
+ if (_ticks > _nextTicks) {
+ _nextTicks = _ticks + 1000;
_fps = _fp;
_fp = 0;
}
diff --git a/engines/griffon/dialogs.cpp b/engines/griffon/dialogs.cpp
index a26f65c2e1..959cdfeff1 100644
--- a/engines/griffon/dialogs.cpp
+++ b/engines/griffon/dialogs.cpp
@@ -56,13 +56,13 @@ void GriffonEngine::title(int mode) {
rcSrc.setWidth(320);
rcSrc.setHeight(240);
- _videobuffer2->fillRect(rcSrc, 0);
- _videobuffer3->fillRect(rcSrc, 0);
+ _videoBuffer2->fillRect(rcSrc, 0);
+ _videoBuffer3->fillRect(rcSrc, 0);
_ticks = g_system->getMillis();
- _videobuffer->blit(*_videobuffer3);
- _videobuffer->blit(*_videobuffer2);
+ _videoBuffer->blit(*_videoBuffer3);
+ _videoBuffer->blit(*_videoBuffer2);
int cursel = 0;
int keypause = _ticks + 220;
@@ -95,34 +95,34 @@ void GriffonEngine::title(int mode) {
rc.left = -xofs;
rc.top = 0;
- _titleimg->blit(*_videobuffer, rc.left, rc.top);
+ _titleImg->blit(*_videoBuffer, rc.left, rc.top);
rc.left = -xofs + 320.0;
rc.top = 0;
- _titleimg->blit(*_videobuffer, rc.left, rc.top);
+ _titleImg->blit(*_videoBuffer, rc.left, rc.top);
rc.left = 0;
rc.top = 0;
- _titleimg2->blit(*_videobuffer, rc.left, rc.top);
+ _titleImg2->blit(*_videoBuffer, rc.left, rc.top);
int y = 172;
int x = 160 - 14 * 4;
- drawString(_videobuffer, "new game/save/load", x, y, 4);
- drawString(_videobuffer, "options", x, y + 16, 4);
- drawString(_videobuffer, "quit game", x, y + 32, 4);
+ drawString(_videoBuffer, "new game/save/load", x, y, 4);
+ drawString(_videoBuffer, "options", x, y + 16, 4);
+ drawString(_videoBuffer, "quit game", x, y + 32, 4);
if (mode == 1)
- drawString(_videobuffer, "return", x, y + 48, 4);
+ drawString(_videoBuffer, "return", x, y + 48, 4);
else
- drawString(_videobuffer, "(c) 2005 by Daniel 'Syn9' Kennedy", 28, 224, 4);
+ drawString(_videoBuffer, "(c) 2005 by Daniel 'Syn9' Kennedy", 28, 224, 4);
rc.left = (int16)(x - 16 - 4 * cos(2 * PI * _itemyloc / 16));
rc.top = (int16)(y - 4 + 16 * cursel);
- _itemimg[15]->blit(*_videobuffer, rc.left, rc.top);
+ _itemImg[15]->blit(*_videoBuffer, rc.left, rc.top);
float yf = 255.0;
if (_ticks < ticks1 + 1000) {
@@ -130,19 +130,19 @@ void GriffonEngine::title(int mode) {
yf = CLIP<float>(yf, 0.0, 255.0);
}
- _videobuffer->setAlpha((int)yf);
- g_system->copyRectToScreen(_videobuffer->getPixels(), _videobuffer->pitch, 0, 0, _videobuffer->w, _videobuffer->h);
+ _videoBuffer->setAlpha((int)yf);
+ g_system->copyRectToScreen(_videoBuffer->getPixels(), _videoBuffer->pitch, 0, 0, _videoBuffer->w, _videoBuffer->h);
g_system->updateScreen();
- _tickspassed = _ticks;
+ _ticksPassed = _ticks;
_ticks = g_system->getMillis();
- _tickspassed = _ticks - _tickspassed;
- _fpsr = (float)_tickspassed / 24.0;
+ _ticksPassed = _ticks - _ticksPassed;
+ _fpsr = (float)_ticksPassed / 24.0;
_fp++;
- if (_ticks > _nextticks) {
- _nextticks = _ticks + 1000;
+ if (_ticks > _nextTicks) {
+ _nextTicks = _ticks + 1000;
_fps = _fp;
_fp = 0;
}
@@ -216,7 +216,7 @@ void GriffonEngine::title(int mode) {
g_system->delayMillis(10);
} while (!_shouldQuit && !exitTitle);
- _itemticks = _ticks + 210;
+ _itemTicks = _ticks + 210;
if (config.music) {
haltSoundChannel(_menuChannel);
@@ -262,7 +262,7 @@ void GriffonEngine::configMenu() {
int ticks1 = _ticks;
do {
- _videobuffer->fillRect(Common::Rect(0, 0, _videobuffer->w, _videobuffer->h), 0);
+ _videoBuffer->fillRect(Common::Rect(0, 0, _videoBuffer->w, _videoBuffer->h), 0);
rcDest.left = 256 + 256 * cos(PI / 180 * clouddeg * 40);
rcDest.top = 192 + 192 * sin(PI / 180 * clouddeg * 40);
@@ -270,7 +270,7 @@ void GriffonEngine::configMenu() {
rcDest.setHeight(240);
cloudimg->setAlpha(128, true);
- cloudimg->blit(*_videobuffer, 0, 0, Graphics::FLIP_NONE, &rcDest);
+ cloudimg->blit(*_videoBuffer, 0, 0, Graphics::FLIP_NONE, &rcDest);
cloudimg->setAlpha(64, true);
rcDest.left = 256;
@@ -279,10 +279,10 @@ void GriffonEngine::configMenu() {
rcDest.setHeight(240);
cloudimg->setAlpha(128, true);
- cloudimg->blit(*_videobuffer, 0, 0, Graphics::FLIP_NONE, &rcDest);
+ cloudimg->blit(*_videoBuffer, 0, 0, Graphics::FLIP_NONE, &rcDest);
cloudimg->setAlpha(64, true);
- _videobuffer->copyRectToSurface(configwindow->getPixels(), configwindow->pitch, 0, 0, configwindow->w, configwindow->h);
+ _videoBuffer->copyRectToSurface(configwindow->getPixels(), configwindow->pitch, 0, 0, configwindow->w, configwindow->h);
int sy = SY;
@@ -308,8 +308,8 @@ void GriffonEngine::configMenu() {
} else if (i > 18)
destColumn = 0;
- drawString(_videobuffer, optionTitles[i], 156 - 8 * strlen(optionTitles[i]), sy + i * 8, 0);
- drawString(_videobuffer, optionValues[i], 164, sy + i * 8, destColumn);
+ drawString(_videoBuffer, optionTitles[i], 156 - 8 * strlen(optionTitles[i]), sy + i * 8, 0);
+ drawString(_videoBuffer, optionValues[i], 164, sy + i * 8, destColumn);
}
int curselt = cursel + 2;
@@ -328,7 +328,7 @@ void GriffonEngine::configMenu() {
rc.left = 148 + 3 * cos(2 * PI * _itemyloc / 16.0);
rc.top = sy + 8 * curselt - 4;
- _itemimg[15]->blit(*_videobuffer, rc.left, rc.top);
+ _itemImg[15]->blit(*_videoBuffer, rc.left, rc.top);
float yy = 255.0;
if (_ticks < ticks1 + 1000) {
@@ -336,21 +336,21 @@ void GriffonEngine::configMenu() {
yy = CLIP<float>(yy, 0.0, 255.0);
}
- _videobuffer->setAlpha((int)yy);
- g_system->copyRectToScreen(_videobuffer->getPixels(), _videobuffer->pitch, 0, 0, _videobuffer->w, _videobuffer->h);
+ _videoBuffer->setAlpha((int)yy);
+ g_system->copyRectToScreen(_videoBuffer->getPixels(), _videoBuffer->pitch, 0, 0, _videoBuffer->w, _videoBuffer->h);
g_system->updateScreen();
g_system->getEventManager()->pollEvent(_event);
- _tickspassed = _ticks;
+ _ticksPassed = _ticks;
_ticks = g_system->getMillis();
- _tickspassed = _ticks - _tickspassed;
- _fpsr = (float)_tickspassed / 24;
+ _ticksPassed = _ticks - _ticksPassed;
+ _fpsr = (float)_ticksPassed / 24;
_fp++;
- if (_ticks > _nextticks) {
- _nextticks = _ticks + 1000;
+ if (_ticks > _nextTicks) {
+ _nextTicks = _ticks + 1000;
_fps = _fp;
_fp = 0;
}
@@ -465,7 +465,7 @@ void GriffonEngine::configMenu() {
} while (!_shouldQuit && !exitMenu);
configwindow->free();
- _itemticks = _ticks + 210;
+ _itemTicks = _ticks + 210;
cloudimg->setAlpha(64, true);
}
@@ -475,8 +475,8 @@ void GriffonEngine::saveLoadNew() {
clouddeg = 0;
- _videobuffer->setAlpha(255);
- saveloadimg->setAlpha(192, true);
+ _videoBuffer->setAlpha(255);
+ _saveLoadImg->setAlpha(192, true);
int currow = 0;
int curcol = 0;
@@ -487,7 +487,7 @@ void GriffonEngine::saveLoadNew() {
int tickpause = _ticks + 150;
do {
- _videobuffer->fillRect(Common::Rect(0, 0, _videobuffer->w, _videobuffer->h), 0);
+ _videoBuffer->fillRect(Common::Rect(0, 0, _videoBuffer->w, _videoBuffer->h), 0);
y += 1 * _fpsr;
@@ -497,7 +497,7 @@ void GriffonEngine::saveLoadNew() {
rcDest.setHeight(240);
cloudimg->setAlpha(128, true);
- cloudimg->blit(*_videobuffer, 0, 0, Graphics::FLIP_NONE, &rcDest);
+ cloudimg->blit(*_videoBuffer, 0, 0, Graphics::FLIP_NONE, &rcDest);
cloudimg->setAlpha(64, true);
rcDest.left = 256;
@@ -506,10 +506,10 @@ void GriffonEngine::saveLoadNew() {
rcDest.setHeight(240);
cloudimg->setAlpha(128, true);
- cloudimg->blit(*_videobuffer, 0, 0, Graphics::FLIP_NONE, &rcDest);
+ cloudimg->blit(*_videoBuffer, 0, 0, Graphics::FLIP_NONE, &rcDest);
cloudimg->setAlpha(64, true);
- saveloadimg->blit(*_videobuffer);
+ _saveLoadImg->blit(*_videoBuffer);
g_system->getEventManager()->pollEvent(_event);
@@ -520,7 +520,7 @@ void GriffonEngine::saveLoadNew() {
if (tickpause < _ticks) {
if (_event.type == Common::EVENT_KEYDOWN) {
- _itemticks = _ticks + 220;
+ _itemTicks = _ticks + 220;
if (_event.kbd.keycode == Common::KEYCODE_RETURN) {
// QUIT - non existent :)
@@ -541,7 +541,7 @@ void GriffonEngine::saveLoadNew() {
// LOAD GAME
if (currow == 0 && curcol == 1) {
lowerLock = true;
- currow = 1 + _saveslot;
+ currow = 1 + _saveSlot;
tickpause = _ticks + 125;
}
// SAVE GAME
@@ -553,10 +553,10 @@ void GriffonEngine::saveLoadNew() {
if (lowerLock && curcol == 1 && tickpause < _ticks) {
if (saveState(currow - 1)) {
- _secstart += _secsingame;
+ _secStart += _secsingame;
_secsingame = 0;
lowerLock = false;
- _saveslot = currow - 1;
+ _saveSlot = currow - 1;
currow = 0;
}
}
@@ -564,7 +564,7 @@ void GriffonEngine::saveLoadNew() {
if (lowerLock && curcol == 2 && tickpause < _ticks) {
if (loadState(currow - 1)) {
_player.walkSpeed = 1.1f;
- _animspd = 0.5f;
+ _animSpeed = 0.5f;
attacking = false;
_player.attackSpeed = 1.5f;
@@ -574,8 +574,8 @@ void GriffonEngine::saveLoadNew() {
haltSoundChannel(-1);
_secsingame = 0;
- _saveslot = currow - 1;
- loadMap(_curmap);
+ _saveSlot = currow - 1;
+ loadMap(_curMap);
mainLoop();
}
}
@@ -652,21 +652,21 @@ void GriffonEngine::saveLoadNew() {
char line[256];
sprintf(line, "Game Time: %02i:%02i:%02i", h, m, s);
- drawString(_videobuffer, line, 160 - strlen(line) * 4, sy, 0);
+ drawString(_videoBuffer, line, 160 - strlen(line) * 4, sy, 0);
sx = 12;
sy += 11;
int cc = 0;
sprintf(line, "Health: %i/%i", _playera.hp, _playera.maxHp);
- drawString(_videobuffer, line, sx, sy, cc);
+ drawString(_videoBuffer, line, sx, sy, cc);
if (_playera.level == 22)
strcpy(line, "Level: MAX");
else
sprintf(line, "Level: %i", _playera.level);
- drawString(_videobuffer, line, sx, sy + 11, 0);
+ drawString(_videoBuffer, line, sx, sy + 11, 0);
rcSrc.left = sx + 15 * 8 + 24;
rcSrc.top = sy + 1;
@@ -674,19 +674,19 @@ void GriffonEngine::saveLoadNew() {
int ss = (_playera.sword - 1) * 3;
if (_playera.sword == 3)
ss = 18;
- _itemimg[ss]->blit(*_videobuffer, rcSrc.left, rcSrc.top);
+ _itemImg[ss]->blit(*_videoBuffer, rcSrc.left, rcSrc.top);
rcSrc.left += 16;
ss = (_playera.shield - 1) * 3 + 1;
if (_playera.shield == 3)
ss = 19;
- _itemimg[ss]->blit(*_videobuffer, rcSrc.left, rcSrc.top);
+ _itemImg[ss]->blit(*_videoBuffer, rcSrc.left, rcSrc.top);
rcSrc.left += 16;
ss = (_playera.armour - 1) * 3 + 2;
if (_playera.armour == 3)
ss = 20;
- _itemimg[ss]->blit(*_videobuffer, rcSrc.left, rcSrc.top);
+ _itemImg[ss]->blit(*_videoBuffer, rcSrc.left, rcSrc.top);
int nx = rcSrc.left + 13 + 3 * 8;
rcSrc.left = nx - 17;
@@ -695,12 +695,12 @@ void GriffonEngine::saveLoadNew() {
for (int i = 0; i < 5; i++) {
rcSrc.left += 17;
if (_playera.foundSpell[i])
- _itemimg[7 + i]->blit(*_videobuffer, rcSrc.left, rcSrc.top);
+ _itemImg[7 + i]->blit(*_videoBuffer, rcSrc.left, rcSrc.top);
}
}
} else {
int sy = 57 + ff * 48;
- drawString(_videobuffer, "Empty", 160 - 5 * 4, sy, 0);
+ drawString(_videoBuffer, "Empty", 160 - 5 * 4, sy, 0);
}
}
// ------------------------------------------
@@ -732,7 +732,7 @@ void GriffonEngine::saveLoadNew() {
rcDest.top = (int16)(53 + (currow - 1) * 48);
}
- _itemimg[15]->blit(*_videobuffer, rcDest.left, rcDest.top);
+ _itemImg[15]->blit(*_videoBuffer, rcDest.left, rcDest.top);
if (lowerLock) {
@@ -745,7 +745,7 @@ void GriffonEngine::saveLoadNew() {
// CHECKME: Useless code? or temporary commented?
// rcDest.left = rcDest.left; // + 2 + 2 * sin(-2 * PI * _itemyloc / 16)
- _itemimg[15]->blit(*_videobuffer, rcDest.left, rcDest.top);
+ _itemImg[15]->blit(*_videoBuffer, rcDest.left, rcDest.top);
}
int yy = 255;
@@ -754,21 +754,21 @@ void GriffonEngine::saveLoadNew() {
yy = CLIP(yy, 0, 255);
}
- _videobuffer->setAlpha((int)yy);
- g_system->copyRectToScreen(_videobuffer->getPixels(), _videobuffer->pitch, 0, 0, _videobuffer->w, _videobuffer->h);
+ _videoBuffer->setAlpha((int)yy);
+ g_system->copyRectToScreen(_videoBuffer->getPixels(), _videoBuffer->pitch, 0, 0, _videoBuffer->w, _videoBuffer->h);
g_system->updateScreen();
g_system->getEventManager()->pollEvent(_event);
- _tickspassed = _ticks;
+ _ticksPassed = _ticks;
_ticks = g_system->getMillis();
- _tickspassed = _ticks - _tickspassed;
- _fpsr = (float)_tickspassed / 24;
+ _ticksPassed = _ticks - _ticksPassed;
+ _fpsr = (float)_ticksPassed / 24;
_fp++;
- if (_ticks > _nextticks) {
- _nextticks = _ticks + 1000;
+ if (_ticks > _nextTicks) {
+ _nextTicks = _ticks + 1000;
_fps = _fp;
_fp = 0;
}
diff --git a/engines/griffon/draw.cpp b/engines/griffon/draw.cpp
index 54d249a4cc..0710e89b71 100644
--- a/engines/griffon/draw.cpp
+++ b/engines/griffon/draw.cpp
@@ -113,9 +113,9 @@ void GriffonEngine::drawAnims(int Layer) {
int curtilex = c % 20;
int curtiley = (c - curtilex) / 20;
- if (_curmap == 58 && _scriptflag[kScriptLever][0] > 0)
+ if (_curMap == 58 && _scriptFlag[kScriptLever][0] > 0)
curtilex = 1;
- if (_curmap == 54 && _scriptflag[kScriptLever][0] > 1)
+ if (_curMap == 54 && _scriptFlag[kScriptLever][0] > 1)
curtilex = 1;
rcSrc.left = curtilex * 16;
rcSrc.top = curtiley * 16;
@@ -127,7 +127,7 @@ void GriffonEngine::drawAnims(int Layer) {
rcDest.setWidth(16);
rcDest.setHeight(16);
- _tiles[curtilel]->blit(*_videobuffer, rcDest.left, rcDest.top, Graphics::FLIP_NONE, &rcSrc);
+ _tiles[curtilel]->blit(*_videoBuffer, rcDest.left, rcDest.top, Graphics::FLIP_NONE, &rcSrc);
}
if (Layer == 1) {
@@ -163,7 +163,7 @@ void GriffonEngine::drawAnims(int Layer) {
}
if (pass)
- _tiles[curtilel]->blit(*_videobuffer, rcDest.left, rcDest.top, Graphics::FLIP_NONE, &rcSrc);
+ _tiles[curtilel]->blit(*_videoBuffer, rcDest.left, rcDest.top, Graphics::FLIP_NONE, &rcSrc);
}
}
}
@@ -180,13 +180,13 @@ int hud_recalc(int a, int b, int c) {
return result > b ? b : result;
}
-#define RGB(R, G, B) (_videobuffer->format.RGBToColor((R), (G), (B)))
+#define RGB(R, G, B) (_videoBuffer->format.RGBToColor((R), (G), (B)))
void GriffonEngine::drawHud() {
//sprintf(line, "_fps: %i, map: %i, exp: %i/%i", (int)_fps, _curmap, _player.exp, _player.nextlevel);
//drawString(_videobuffer, line, 0, 0, 0);
- game_fillrect(_videobuffer2, 0, 0, 320, 240, 0);
+ game_fillrect(_videoBuffer2, 0, 0, 320, 240, 0);
for (int i = 0; i < kMaxFloat; i++) {
if (_floattext[i][0] > 0) {
@@ -201,13 +201,13 @@ void GriffonEngine::drawHud() {
c2 = 2;
if (fc != 0) {
- drawString(_videobuffer, _floatstri[i], (int)(_floattext[i][1]) + 0, (int)(_floattext[i][2]) - 1, c2);
- drawString(_videobuffer, _floatstri[i], (int)(_floattext[i][1]) + 0, (int)(_floattext[i][2]) + 1, c2);
- drawString(_videobuffer, _floatstri[i], (int)(_floattext[i][1]) - 1, (int)(_floattext[i][2]) + 0, c2);
- drawString(_videobuffer, _floatstri[i], (int)(_floattext[i][1]) + 1, (int)(_floattext[i][2]) + 0, c2);
+ drawString(_videoBuffer, _floatstri[i], (int)(_floattext[i][1]) + 0, (int)(_floattext[i][2]) - 1, c2);
+ drawString(_videoBuffer, _floatstri[i], (int)(_floattext[i][1]) + 0, (int)(_floattext[i][2]) + 1, c2);
+ drawString(_videoBuffer, _floatstri[i], (int)(_floattext[i][1]) - 1, (int)(_floattext[i][2]) + 0, c2);
+ drawString(_videoBuffer, _floatstri[i], (int)(_floattext[i][1]) + 1, (int)(_floattext[i][2]) + 0, c2);
}
- drawString(_videobuffer, _floatstri[i], (int)(_floattext[i][1]), (int)(_floattext[i][2]), c);
+ drawString(_videoBuffer, _floatstri[i], (int)(_floattext[i][1]), (int)(_floattext[i][2]), c);
}
if (_floaticon[i][0] > 0) {
@@ -219,9 +219,9 @@ void GriffonEngine::drawHud() {
rcDest.top = iy;
if (ico != 99)
- _itemimg[ico]->blit(*_videobuffer, rcDest.left, rcDest.top);
+ _itemImg[ico]->blit(*_videoBuffer, rcDest.left, rcDest.top);
if (ico == 99) {
- _spellimg->setAlpha((int)(RND() * 96) + 96, true);
+ _spellImg->setAlpha((int)(RND() * 96) + 96, true);
rcSrc.left = 16 * (int)(RND() * 2);
rcSrc.top = 80;
@@ -231,9 +231,9 @@ void GriffonEngine::drawHud() {
rcDest.left = ix;
rcDest.top = iy;
- _spellimg->blit(*_videobuffer, rcDest.left, rcDest.top, Graphics::FLIP_NONE, &rcSrc);
+ _spellImg->blit(*_videoBuffer, rcDest.left, rcDest.top, Graphics::FLIP_NONE, &rcSrc);
- _spellimg->setAlpha(255, true);
+ _spellImg->setAlpha(255, true);
}
}
}
@@ -251,10 +251,10 @@ void GriffonEngine::drawHud() {
rcSrc.left = rcSrc.left + 17;
if (_player.foundSpell[i]) {
- _itemimg[7 + i]->blit(*_videobuffer, rcSrc.left, rcSrc.top);
+ _itemImg[7 + i]->blit(*_videoBuffer, rcSrc.left, rcSrc.top);
- game_fillrect(_videobuffer, rcSrc.left, sy + 16, 16, 4, RGB(0, 32, 32));
- game_fillrect(_videobuffer, rcSrc.left + 1, sy + 17,
+ game_fillrect(_videoBuffer, rcSrc.left, sy + 16, 16, 4, RGB(0, 32, 32));
+ game_fillrect(_videoBuffer, rcSrc.left + 1, sy + 17,
hud_recalc(_player.spellCharge[i], 14, 100), 2,
ABS(_player.spellCharge[i] - 100) < kEpsilon ? RGB(255, 128, 32) : RGB(0, 224, 64));
}
@@ -268,17 +268,17 @@ void GriffonEngine::drawHud() {
rcDest.top = 0;
rcDest.right = 320;
rcDest.bottom = 240;
- _videobuffer2->fillRect(rcDest, 0);
- _videobuffer2->setAlpha((int)(_player.itemselshade * 4)); // FIXME
- _videobuffer2->blit(*_videobuffer);
+ _videoBuffer2->fillRect(rcDest, 0);
+ _videoBuffer2->setAlpha((int)(_player.itemselshade * 4)); // FIXME
+ _videoBuffer2->blit(*_videoBuffer);
int sy = 202;
rcSrc.left = 46;
rcSrc.top = 46;
- _inventoryimg->setAlpha(160, true); // 128
- _inventoryimg->blit(*_videobuffer, rcSrc.left, rcSrc.top);
- _inventoryimg->setAlpha(255, true);
+ _inventoryImg->setAlpha(160, true); // 128
+ _inventoryImg->blit(*_videoBuffer, rcSrc.left, rcSrc.top);
+ _inventoryImg->setAlpha(255, true);
int sx = 54;
sy = 55;
@@ -288,66 +288,66 @@ void GriffonEngine::drawHud() {
rcDest.top = 46 + 77;
int amap = 0;
- if (_curmap > 46)
+ if (_curMap > 46)
amap = 2;
- if (_curmap > 67)
+ if (_curMap > 67)
amap = 3;
- if (_curmap > 5 && _curmap < 42)
+ if (_curMap > 5 && _curMap < 42)
amap = 1;
- mapimg[amap]->blit(*_videobuffer, rcDest.left, rcDest.top);
+ mapImg[amap]->blit(*_videoBuffer, rcDest.left, rcDest.top);
- long ccc = _videobuffer->format.RGBToColor(128 + 127 * sin(3.141592 * 2 * _itemyloc / 16), 0, 0);
+ long ccc = _videoBuffer->format.RGBToColor(128 + 127 * sin(3.141592 * 2 * _itemyloc / 16), 0, 0);
for (int b = 0; b <= 6; b++) {
for (int a = 0; a <= 12; a++) {
- if (invmap[amap][b][a] == _curmap) {
- game_fillrect(_videobuffer, 46 + 9 + a * 9 + 2, 46 + 77 + b * 9 + 1, 6, 6, ccc);
+ if (invmap[amap][b][a] == _curMap) {
+ game_fillrect(_videoBuffer, 46 + 9 + a * 9 + 2, 46 + 77 + b * 9 + 1, 6, 6, ccc);
}
}
}
if (amap == 1) {
- drawString(_videobuffer, "L1", 46 + 9, 46 + 77, 0);
- drawString(_videobuffer, "L2", 46 + 9 + 7 * 9, 46 + 77, 0);
+ drawString(_videoBuffer, "L1", 46 + 9, 46 + 77, 0);
+ drawString(_videoBuffer, "L2", 46 + 9 + 7 * 9, 46 + 77, 0);
}
char line[128];
sprintf(line, "Health: %i/%i", _player.hp, _player.maxHp);
- drawString(_videobuffer, line, sx, sy, _player.hp <= _player.maxHp * 0.25 ? (int)_player.hpflash : 0);
+ drawString(_videoBuffer, line, sx, sy, _player.hp <= _player.maxHp * 0.25 ? (int)_player.hpflash : 0);
sprintf(line, "Level : %i", _player.level);
if (_player.level == _player.maxLevel)
strcpy(line, "Level : MAX");
- drawString(_videobuffer, line, sx, sy + 8, 0);
+ drawString(_videoBuffer, line, sx, sy + 8, 0);
// experience
- game_fillrect(_videobuffer, sx + 64, sy + 16, 16, 4, RGB(0, 32, 32));
- game_fillrect(_videobuffer, sx + 65, sy + 17,
+ game_fillrect(_videoBuffer, sx + 64, sy + 16, 16, 4, RGB(0, 32, 32));
+ game_fillrect(_videoBuffer, sx + 65, sy + 17,
hud_recalc(_player.exp, 14, _player.nextLevel), 2, RGB(0, 224, 64));
// attack strength
- game_fillrect(_videobuffer, sx + 1, sy + 16, 56, 6, RGB(0, 32, 32));
- game_fillrect(_videobuffer, sx + 1, sy + 17,
+ game_fillrect(_videoBuffer, sx + 1, sy + 16, 56, 6, RGB(0, 32, 32));
+ game_fillrect(_videoBuffer, sx + 1, sy + 17,
hud_recalc(_player.attackStrength, 54, 100), 2,
ABS(_player.attackStrength - 100) < kEpsilon ? RGB(255, 128, 32) : RGB(0, 64, 224));
// spell strength
- game_fillrect(_videobuffer, sx + 1, sy + 19,
+ game_fillrect(_videoBuffer, sx + 1, sy + 19,
hud_recalc(_player.spellStrength, 54, 100), 2,
ABS(_player.spellStrength - 100) < kEpsilon ? RGB(224, 0, 0) : RGB(128, 0, 224));
// time
- int ase = _secstart + _secsingame;
+ int ase = _secStart + _secsingame;
int h = ((ase - (ase % 3600)) / 3600);
- ase = (ase - h * 3600);
+ ase -= h * 3600;
int m = ((ase - (ase % 60)) / 60);
int s = (ase - m * 60);
sprintf(line, "%02i:%02i:%02i", h, m, s);
- drawString(_videobuffer, line, 46 + 38 - strlen(line) * 4, 46 + 49, 0);
+ drawString(_videoBuffer, line, 46 + 38 - strlen(line) * 4, 46 + 49, 0);
- drawString(_videobuffer, "Use", 193, 55, 0);
- drawString(_videobuffer, "Cast", 236, 55, 0);
+ drawString(_videoBuffer, "Use", 193, 55, 0);
+ drawString(_videoBuffer, "Cast", 236, 55, 0);
rcSrc.left = 128;
rcSrc.top = 91;
@@ -355,19 +355,19 @@ void GriffonEngine::drawHud() {
int ss = (_player.sword - 1) * 3;
if (_player.sword == 3)
ss = 18;
- _itemimg[ss]->blit(*_videobuffer, rcSrc.left, rcSrc.top);
+ _itemImg[ss]->blit(*_videoBuffer, rcSrc.left, rcSrc.top);
rcSrc.left = rcSrc.left + 16;
ss = (_player.shield - 1) * 3 + 1;
if (_player.shield == 3)
ss = 19;
- _itemimg[ss]->blit(*_videobuffer, rcSrc.left, rcSrc.top);
+ _itemImg[ss]->blit(*_videoBuffer, rcSrc.left, rcSrc.top);
rcSrc.left = rcSrc.left + 16;
ss = (_player.armour - 1) * 3 + 2;
if (_player.armour == 3)
ss = 20;
- _itemimg[ss]->blit(*_videobuffer, rcSrc.left, rcSrc.top);
+ _itemImg[ss]->blit(*_videoBuffer, rcSrc.left, rcSrc.top);
for (int i = 0; i <= 4; i++) {
sx = 188;
@@ -375,18 +375,18 @@ void GriffonEngine::drawHud() {
rcSrc.left = sx;
rcSrc.top = sy;
if (i == 0)
- _itemimg[6]->blit(*_videobuffer, rcSrc.left, rcSrc.top);
+ _itemImg[6]->blit(*_videoBuffer, rcSrc.left, rcSrc.top);
if (i == 1)
- _itemimg[12]->blit(*_videobuffer, rcSrc.left, rcSrc.top);
+ _itemImg[12]->blit(*_videoBuffer, rcSrc.left, rcSrc.top);
if (i == 2)
- _itemimg[17]->blit(*_videobuffer, rcSrc.left, rcSrc.top);
+ _itemImg[17]->blit(*_videoBuffer, rcSrc.left, rcSrc.top);
if (i == 3)
- _itemimg[16]->blit(*_videobuffer, rcSrc.left, rcSrc.top);
+ _itemImg[16]->blit(*_videoBuffer, rcSrc.left, rcSrc.top);
if (i == 4)
- _itemimg[14]->blit(*_videobuffer, rcSrc.left, rcSrc.top);
+ _itemImg[14]->blit(*_videoBuffer, rcSrc.left, rcSrc.top);
sprintf(line, "x%i", _player.inventory[i]);
- drawString(_videobuffer, line, sx + 17, sy + 7, 0);
+ drawString(_videoBuffer, line, sx + 17, sy + 7, 0);
}
// spells in menu
@@ -397,10 +397,10 @@ void GriffonEngine::drawHud() {
sy = rcSrc.top;
if (_player.foundSpell[i]) {
- _itemimg[7 + i]->blit(*_videobuffer, rcSrc.left, rcSrc.top);
+ _itemImg[7 + i]->blit(*_videoBuffer, rcSrc.left, rcSrc.top);
- game_fillrect(_videobuffer, rcSrc.left, sy + 16, 16, 4, RGB(0, 32, 32));
- game_fillrect(_videobuffer, rcSrc.left + 1, sy + 17,
+ game_fillrect(_videoBuffer, rcSrc.left, sy + 16, 16, 4, RGB(0, 32, 32));
+ game_fillrect(_videoBuffer, rcSrc.left + 1, sy + 17,
hud_recalc(_player.spellCharge[i], 14, 100), 2,
ABS(_player.spellCharge[i] - 100) < kEpsilon ? RGB(255, 128, 32) : RGB(0, 224, 64));
}
@@ -409,43 +409,43 @@ void GriffonEngine::drawHud() {
if (_itemSelOn) {
for (int i = 0; i <= 4; i++) {
- if (_curitem == 5 + i) {
+ if (_curItem == 5 + i) {
rcDest.left = (float)(243 - 12 + 3 * sin(3.141592 * 2 * _itemyloc / 16));
rcDest.top = 67 + 24 * i;
- _itemimg[15]->blit(*_videobuffer, rcDest.left, rcDest.top);
+ _itemImg[15]->blit(*_videoBuffer, rcDest.left, rcDest.top);
}
- if (_curitem == i) {
+ if (_curItem == i) {
rcDest.left = (float)(189 - 12 + 3 * sin(3.141592 * 2 * _itemyloc / 16));
rcDest.top = 70 + 24 * i;
- _itemimg[15]->blit(*_videobuffer, rcDest.left, rcDest.top);
+ _itemImg[15]->blit(*_videoBuffer, rcDest.left, rcDest.top);
}
}
}
}
if (_selEnemyOn) {
- if (_curenemy > _lastnpc) {
- int pst = _curenemy - _lastnpc - 1;
- rcDest.left = postinfo[pst][0];
- rcDest.top = (float)(postinfo[pst][1] - 4 - sin(3.141592 / 8 * _itemyloc));
+ if (_curEnemy > _lastnpc) {
+ int pst = _curEnemy - _lastnpc - 1;
+ rcDest.left = _postInfo[pst][0];
+ rcDest.top = (float)(_postInfo[pst][1] - 4 - sin(3.141592 / 8 * _itemyloc));
} else {
- rcDest.left = _npcinfo[_curenemy].x + 4;
- rcDest.top = (float)(_npcinfo[_curenemy].y + 4 - 16 - sin(3.141592 / 8 * _itemyloc));
+ rcDest.left = _npcinfo[_curEnemy].x + 4;
+ rcDest.top = (float)(_npcinfo[_curEnemy].y + 4 - 16 - sin(3.141592 / 8 * _itemyloc));
}
- _itemimg[13]->blit(*_videobuffer, rcDest.left, rcDest.top);
+ _itemImg[13]->blit(*_videoBuffer, rcDest.left, rcDest.top);
}
}
void GriffonEngine::drawNPCs(int mode) {
- unsigned int ccc = _videobuffer->format.RGBToColor(255, 128, 32);
+ unsigned int ccc = _videoBuffer->format.RGBToColor(255, 128, 32);
int fst = _firsty;
int lst = _lasty;
if (mode == 0)
lst = _player.ysort;
- if (mode == 1)
+ else if (mode == 1)
fst = _player.ysort;
for (int yy = fst; yy <= lst; yy++) {
@@ -484,7 +484,7 @@ void GriffonEngine::drawNPCs(int mode) {
rcDest.top += (int)(RND() * 3) - 1;
}
- _anims[sprite]->blit(*_videobuffer, rcDest.left, rcDest.top, Graphics::FLIP_NONE, &rcSrc);
+ _anims[sprite]->blit(*_videoBuffer, rcDest.left, rcDest.top, Graphics::FLIP_NONE, &rcSrc);
} else {
int cframe = _npcinfo[i].cattackframe;
@@ -498,7 +498,7 @@ void GriffonEngine::drawNPCs(int mode) {
rcDest.setWidth(24);
rcDest.setHeight(24);
- _animsa[sprite]->blit(*_videobuffer, rcDest.left, rcDest.top, Graphics::FLIP_NONE, &rcSrc);
+ _animsAttack[sprite]->blit(*_videoBuffer, rcDest.left, rcDest.top, Graphics::FLIP_NONE, &rcSrc);
}
}
@@ -515,7 +515,7 @@ void GriffonEngine::drawNPCs(int mode) {
rcDest.left = _npcinfo[i].bodysection[f].x - _animset2[s].xofs;
rcDest.top = _npcinfo[i].bodysection[f].y - _animset2[s].yofs + 2;
- _anims[2]->blit(*_videobuffer, rcDest.left, rcDest.top, Graphics::FLIP_NONE, &rcSrc);
+ _anims[2]->blit(*_videoBuffer, rcDest.left, rcDest.top, Graphics::FLIP_NONE, &rcSrc);
}
}
@@ -525,7 +525,7 @@ void GriffonEngine::drawNPCs(int mode) {
for (int f = 0; f < 7; f++) {
int yp = 0;
- if (f == 0 && (_curmap == 53 || _curmap == 57 || _curmap == 61 || _curmap == 65 || _curmap == 56 || _curmap > 66) && _scriptflag[kScriptLever][0] > 0)
+ if (f == 0 && (_curMap == 53 || _curMap == 57 || _curMap == 61 || _curMap == 65 || _curMap == 56 || _curMap > 66) && _scriptFlag[kScriptLever][0] > 0)
yp = 16;
int s = _npcinfo[i].bodysection[f].sprite;
rcSrc.left = _animset9[s].x;
@@ -536,7 +536,7 @@ void GriffonEngine::drawNPCs(int mode) {
rcDest.left = _npcinfo[i].bodysection[f].x - _animset9[s].xofs;
rcDest.top = _npcinfo[i].bodysection[f].y - _animset9[s].yofs + 2;
- _anims[9]->blit(*_videobuffer, rcDest.left, rcDest.top, Graphics::FLIP_NONE, &rcSrc);
+ _anims[9]->blit(*_videoBuffer, rcDest.left, rcDest.top, Graphics::FLIP_NONE, &rcSrc);
}
}
@@ -558,7 +558,7 @@ void GriffonEngine::drawNPCs(int mode) {
rcDest.left = npx - 2;
rcDest.top = npy - 24;
- _anims[3]->blit(*_videobuffer, rcDest.left, rcDest.top, Graphics::FLIP_NONE, &rcSrc);
+ _anims[3]->blit(*_videoBuffer, rcDest.left, rcDest.top, Graphics::FLIP_NONE, &rcSrc);
}
@@ -577,7 +577,7 @@ void GriffonEngine::drawNPCs(int mode) {
rcDest.left = npx - 2;
rcDest.top = npy - 24;
- _anims[4]->blit(*_videobuffer, rcDest.left, rcDest.top, Graphics::FLIP_NONE, &rcSrc);
+ _anims[4]->blit(*_videoBuffer, rcDest.left, rcDest.top, Graphics::FLIP_NONE, &rcSrc);
}
@@ -596,9 +596,9 @@ void GriffonEngine::drawNPCs(int mode) {
int x = 192 + ((int)(_itemyloc + ff * 5) % 3) * 64;
if (x > 255)
x = 255;
- _spellimg->setAlpha(x, true);
- _spellimg->blit(*_videobuffer, rcDest.left, rcDest.top, Graphics::FLIP_NONE, &rcSrc);
- _spellimg->setAlpha(255, true);
+ _spellImg->setAlpha(x, true);
+ _spellImg->blit(*_videoBuffer, rcDest.left, rcDest.top, Graphics::FLIP_NONE, &rcSrc);
+ _spellImg->setAlpha(255, true);
for (int f = 1; f <= 8; f++) {
rcSrc.left = 16 * (int)(RND() * 2);
@@ -612,9 +612,9 @@ void GriffonEngine::drawNPCs(int mode) {
x = 192 + f % 3 * 64;
if (x > 255)
x = 255;
- _spellimg->setAlpha(x, true);
- _spellimg->blit(*_videobuffer, rcDest.left, rcDest.top, Graphics::FLIP_NONE, &rcSrc);
- _spellimg->setAlpha(255, true);
+ _spellImg->setAlpha(x, true);
+ _spellImg->blit(*_videoBuffer, rcDest.left, rcDest.top, Graphics::FLIP_NONE, &rcSrc);
+ _spellImg->setAlpha(255, true);
}
rcSrc.left = 0;
@@ -625,9 +625,9 @@ void GriffonEngine::drawNPCs(int mode) {
rcDest.left = _npcinfo[i].bodysection[10 * ff + 9].x - 21;
rcDest.top = _npcinfo[i].bodysection[10 * ff + 9].y - 21;
- _spellimg->setAlpha(192, true);
- _anims[5]->blit(*_videobuffer, rcDest.left, rcDest.top, Graphics::FLIP_NONE, &rcSrc);
- _spellimg->setAlpha(255, true);
+ _spellImg->setAlpha(192, true);
+ _anims[5]->blit(*_videoBuffer, rcDest.left, rcDest.top, Graphics::FLIP_NONE, &rcSrc);
+ _spellImg->setAlpha(255, true);
}
}
@@ -654,7 +654,7 @@ void GriffonEngine::drawNPCs(int mode) {
rcDest.top = rcDest.top + (int)(RND() * 3) - 1;
}
- _anims[sprite]->blit(*_videobuffer, rcDest.left, rcDest.top, Graphics::FLIP_NONE, &rcSrc);
+ _anims[sprite]->blit(*_videoBuffer, rcDest.left, rcDest.top, Graphics::FLIP_NONE, &rcSrc);
}
// wizard
@@ -677,7 +677,7 @@ void GriffonEngine::drawNPCs(int mode) {
rcDest.left = rcDest.left + (int)(RND() * 3) - 1;
rcDest.top = rcDest.top + (int)(RND() * 3) - 1;
}
- _anims[sprite]->blit(*_videobuffer, rcDest.left, rcDest.top, Graphics::FLIP_NONE, &rcSrc);
+ _anims[sprite]->blit(*_videoBuffer, rcDest.left, rcDest.top, Graphics::FLIP_NONE, &rcSrc);
// } else {
//cframe = _npcinfo[i].cattackframe;
@@ -714,7 +714,7 @@ void GriffonEngine::drawNPCs(int mode) {
rcDest.left = rcDest.left + (int)(RND() * 3) - 1;
rcDest.top = rcDest.top + (int)(RND() * 3) - 1;
}
- _anims[sprite]->blit(*_videobuffer, rcDest.left, rcDest.top, Graphics::FLIP_NONE, &rcSrc);
+ _anims[sprite]->blit(*_videoBuffer, rcDest.left, rcDest.top, Graphics::FLIP_NONE, &rcSrc);
}
@@ -754,7 +754,7 @@ void GriffonEngine::drawNPCs(int mode) {
rcDest.top = rcDest.top + (int)(RND() * 3) - 1;
}
- _anims[sprite]->blit(*_videobuffer, rcDest.left, rcDest.top, Graphics::FLIP_NONE, &rcSrc);
+ _anims[sprite]->blit(*_videoBuffer, rcDest.left, rcDest.top, Graphics::FLIP_NONE, &rcSrc);
} else {
_npcinfo[i].floating = _npcinfo[i].floating + 0.25 * _fpsr;
while (_npcinfo[i].floating >= 16)
@@ -772,7 +772,7 @@ void GriffonEngine::drawNPCs(int mode) {
rcDest.setWidth(24);
rcDest.setHeight(24);
- _animsa[sprite]->blit(*_videobuffer, rcDest.left, rcDest.top, Graphics::FLIP_NONE, &rcSrc);
+ _animsAttack[sprite]->blit(*_videoBuffer, rcDest.left, rcDest.top, Graphics::FLIP_NONE, &rcSrc);
}
}
@@ -796,7 +796,7 @@ void GriffonEngine::drawNPCs(int mode) {
int sy = (float)(npy + 12 - 50 - 3 * sin(3.141592 * 2 * _npcinfo[i].floating / 16));
for (int fr = 0; fr <= 3; fr++) {
- _spellimg->setAlpha(128 + (int)(RND() * 96), true);
+ _spellImg->setAlpha(128 + (int)(RND() * 96), true);
rcSrc.left = 16 * (int)(RND() * 2);
rcSrc.top = 80;
@@ -806,7 +806,7 @@ void GriffonEngine::drawNPCs(int mode) {
rcDest.left = sx + 32 + (int)(RND() * 3) - 1;
rcDest.top = sy - (int)(RND() * 6);
- _spellimg->blit(*_videobuffer, rcDest.left, rcDest.top, Graphics::FLIP_NONE, &rcSrc);
+ _spellImg->blit(*_videoBuffer, rcDest.left, rcDest.top, Graphics::FLIP_NONE, &rcSrc);
}
for (int ii = 0; ii <= 8; ii++) {
@@ -823,9 +823,9 @@ void GriffonEngine::drawNPCs(int mode) {
rcDest.left = (float)(sx + 36 + ii * 8 - ii * cos(3.14159 * 2 * (fr3 - ii) / 16) * 2);
rcDest.top = (float)(sy + 16 + ii * sin(3.14159 * 2 * (fr3 - ii) / 16) * 3 - ii); // * 4
- _spellimg->setAlpha(i2 / 3 * 224, true);
+ _spellImg->setAlpha(i2 / 3 * 224, true);
- _spellimg->blit(*_videobuffer, rcDest.left, rcDest.top, Graphics::FLIP_NONE, &rcSrc);
+ _spellImg->blit(*_videoBuffer, rcDest.left, rcDest.top, Graphics::FLIP_NONE, &rcSrc);
int xloc = rcDest.left;
int yloc = rcDest.top;
@@ -849,9 +849,9 @@ void GriffonEngine::drawNPCs(int mode) {
rcDest.left = (float)(sx + 36 - ii * 8 + ii * cos(3.14159 * 2 * (fr3 - ii) / 16) * 2);
rcDest.top = (float)(sy + 16 + ii * sin(3.14159 * 2 * (fr3 - ii) / 16) * 3 - ii); // * 4
- _spellimg->setAlpha(i2 / 3 * 224, true);
+ _spellImg->setAlpha(i2 / 3 * 224, true);
- _spellimg->blit(*_videobuffer, rcDest.left, rcDest.top, Graphics::FLIP_NONE, &rcSrc);
+ _spellImg->blit(*_videoBuffer, rcDest.left, rcDest.top, Graphics::FLIP_NONE, &rcSrc);
xloc = rcDest.left;
yloc = rcDest.top;
@@ -872,7 +872,7 @@ void GriffonEngine::drawNPCs(int mode) {
}
}
- _spellimg->setAlpha(255, true);
+ _spellImg->setAlpha(255, true);
if (!_npcinfo[i].attacking) {
int cframe = (int)(frame);
@@ -890,7 +890,7 @@ void GriffonEngine::drawNPCs(int mode) {
rcDest.left = rcDest.top + (int)(RND() * 3) - 1;
}
- _anims[sprite]->blit(*_videobuffer, rcDest.left, rcDest.top, Graphics::FLIP_NONE, &rcSrc);
+ _anims[sprite]->blit(*_videoBuffer, rcDest.left, rcDest.top, Graphics::FLIP_NONE, &rcSrc);
} else {
int cframe = (int)(_npcinfo[i].cattackframe);
@@ -902,7 +902,7 @@ void GriffonEngine::drawNPCs(int mode) {
rcDest.left = sx;
rcDest.top = sy;
- _animsa[sprite]->blit(*_videobuffer, rcDest.left, rcDest.top, Graphics::FLIP_NONE, &rcSrc);
+ _animsAttack[sprite]->blit(*_videoBuffer, rcDest.left, rcDest.top, Graphics::FLIP_NONE, &rcSrc);
}
}
@@ -941,7 +941,7 @@ void GriffonEngine::drawNPCs(int mode) {
rcDest.top = rcDest.top + (int)(RND() * 3) - 1;
}
- _anims[sprite]->blit(*_videobuffer, rcDest.left, rcDest.top, Graphics::FLIP_NONE, &rcSrc);
+ _anims[sprite]->blit(*_videoBuffer, rcDest.left, rcDest.top, Graphics::FLIP_NONE, &rcSrc);
}
rcDest.left = npx + 4;
@@ -949,31 +949,28 @@ void GriffonEngine::drawNPCs(int mode) {
rcDest.setWidth(16);
rcDest.setHeight(4);
- _videobuffer->fillRect(rcDest, 0);
+ _videoBuffer->fillRect(rcDest, 0);
rcDest.left = npx + 5;
rcDest.top = npy + 23;
int ww = 14 * _npcinfo[i].hp / _npcinfo[i].maxhp;
- if (ww > 14)
- ww = 14;
- if (ww < 1)
- ww = 1;
+ ww = CLIP(ww, 1, 14);
rcDest.setWidth(ww);
rcDest.setHeight(2);
- _videobuffer->fillRect(rcDest, ccc);
+ _videoBuffer->fillRect(rcDest, ccc);
bool pass = true;
if (_npcinfo[i].spriteset == kMonsterBoss1)
pass = false;
+
if (pass)
drawOver(npx, npy);
-
}
}
}
@@ -996,7 +993,6 @@ void GriffonEngine::drawOver(int modx, int mody) {
int sy2 = sy * 16;
if (sx > -1 && sx < 40 && sy > -1 && sy < 24) {
-
int curtile = _tileinfo[2][sx][sy][0];
int curtilel = _tileinfo[2][sx][sy][1];
@@ -1026,7 +1022,7 @@ void GriffonEngine::drawOver(int modx, int mody) {
}
if (pass)
- _tiles[curtilel]->blit(*_videobuffer, rcDest.left, rcDest.top, Graphics::FLIP_NONE, &rcSrc);
+ _tiles[curtilel]->blit(*_videoBuffer, rcDest.left, rcDest.top, Graphics::FLIP_NONE, &rcSrc);
}
}
}
@@ -1049,7 +1045,7 @@ void GriffonEngine::drawPlayer() {
rcDest.setWidth(24);
rcDest.setHeight(24);
- _anims[f]->blit(*_videobuffer, rcDest.left, rcDest.top, Graphics::FLIP_NONE, &rcSrc);
+ _anims[f]->blit(*_videoBuffer, rcDest.left, rcDest.top, Graphics::FLIP_NONE, &rcSrc);
} else {
rcSrc.left = (int)(_player.attackFrame / 4) * 24;
rcSrc.top = _player.walkDir * 24;
@@ -1061,20 +1057,19 @@ void GriffonEngine::drawPlayer() {
rcDest.setWidth(24);
rcDest.setHeight(24);
- _animsa[f]->blit(*_videobuffer, rcDest.left, rcDest.top, Graphics::FLIP_NONE, &rcSrc);
-
+ _animsAttack[f]->blit(*_videoBuffer, rcDest.left, rcDest.top, Graphics::FLIP_NONE, &rcSrc);
}
- long ccc = _videobuffer->format.RGBToColor(224, 224, 64);
+ long ccc = _videoBuffer->format.RGBToColor(224, 224, 64);
bool pass = false;
if (_player.hp <= _player.maxHp * 0.25)
pass = true;
if (pass) {
- ccc = _videobuffer->format.RGBToColor(255, 255, 255);
+ ccc = _videoBuffer->format.RGBToColor(255, 255, 255);
if ((int)(_player.hpflash) == 1)
- ccc = _videobuffer->format.RGBToColor(255, 0, 0);
+ ccc = _videoBuffer->format.RGBToColor(255, 0, 0);
}
int sss = 6;
@@ -1087,23 +1082,22 @@ void GriffonEngine::drawPlayer() {
rcDest.setWidth(16);
rcDest.setHeight(sss);
- _videobuffer->fillRect(rcDest, 0);
+ _videoBuffer->fillRect(rcDest, 0);
rcDest.left = npx + 5;
rcDest.top = npy + 23;
-
int ww = 14 * _player.hp / _player.maxHp;
ww = CLIP(ww, 1, 14);
rcDest.setWidth(ww);
rcDest.setHeight(2);
- _videobuffer->fillRect(rcDest, ccc);
+ _videoBuffer->fillRect(rcDest, ccc);
- ccc = _videobuffer->format.RGBToColor(0, 224, 64);
+ ccc = _videoBuffer->format.RGBToColor(0, 224, 64);
if (ABS(_player.attackStrength - 100) < kEpsilon)
- ccc = _videobuffer->format.RGBToColor(255, 128, 32);
+ ccc = _videoBuffer->format.RGBToColor(255, 128, 32);
ww = 14 * _player.attackStrength / 100;
if (ww > 14)
@@ -1117,35 +1111,35 @@ void GriffonEngine::drawPlayer() {
rcDest.setWidth(ww);
rcDest.setHeight(2);
- _videobuffer->fillRect(rcDest, ccc);
+ _videoBuffer->fillRect(rcDest, ccc);
- ccc = _videobuffer->format.RGBToColor(128, 0, 224);
+ ccc = _videoBuffer->format.RGBToColor(128, 0, 224);
if (ABS(_player.spellStrength - 100) < kEpsilon)
- ccc = _videobuffer->format.RGBToColor(224, 0, 0);
+ ccc = _videoBuffer->format.RGBToColor(224, 0, 0);
rcDest.top = rcDest.top + 2;
rcDest.setWidth(ww2);
rcDest.setHeight(2);
- _videobuffer->fillRect(rcDest, ccc);
+ _videoBuffer->fillRect(rcDest, ccc);
}
void GriffonEngine::drawView() {
- _videobuffer->copyRectToSurface(_mapbg->getPixels(), _mapbg->pitch, 0, 0, _mapbg->w, _mapbg->h);
+ _videoBuffer->copyRectToSurface(_mapBg->getPixels(), _mapBg->pitch, 0, 0, _mapBg->w, _mapBg->h);
updateSpellsUnder();
drawAnims(0);
// ------dontdrawover = special case to make boss work right in room 24
- if (dontdrawover == 1)
+ if (_dontDrawOver)
drawAnims(1);
drawNPCs(0);
drawPlayer();
drawNPCs(1);
- if (dontdrawover == 0)
+ if (!_dontDrawOver)
drawAnims(1);
drawOver((int)_player.px, (int)_player.py);
@@ -1159,12 +1153,12 @@ void GriffonEngine::drawView() {
rc.setWidth(320);
rc.setHeight(240);
- cloudimg->blit(*_videobuffer, 0, 0, Graphics::FLIP_NONE, &rc);
+ cloudimg->blit(*_videoBuffer, 0, 0, Graphics::FLIP_NONE, &rc);
}
drawHud();
- g_system->copyRectToScreen(_videobuffer->getPixels(), _videobuffer->pitch, 0, 0, _videobuffer->w, _videobuffer->h);
+ g_system->copyRectToScreen(_videoBuffer->getPixels(), _videoBuffer->pitch, 0, 0, _videoBuffer->w, _videoBuffer->h);
}
void GriffonEngine::swash() {
@@ -1172,24 +1166,24 @@ void GriffonEngine::swash() {
do {
y += 1 * _fpsr;
- _videobuffer->setAlpha((int)y);
- _videobuffer->fillRect(Common::Rect(0, 0, _videobuffer->w, _videobuffer->h), 0);
+ _videoBuffer->setAlpha((int)y);
+ _videoBuffer->fillRect(Common::Rect(0, 0, _videoBuffer->w, _videoBuffer->h), 0);
- g_system->copyRectToScreen(_videobuffer->getPixels(), _videobuffer->pitch, 0, 0, _videobuffer->w, _videobuffer->h);
+ g_system->copyRectToScreen(_videoBuffer->getPixels(), _videoBuffer->pitch, 0, 0, _videoBuffer->w, _videoBuffer->h);
g_system->updateScreen();
g_system->getEventManager()->pollEvent(_event);
g_system->delayMillis(10);
- _tickspassed = _ticks;
+ _ticksPassed = _ticks;
_ticks = g_system->getMillis();
- _tickspassed = _ticks - _tickspassed;
- _fpsr = (float)_tickspassed / 24.0;
+ _ticksPassed = _ticks - _ticksPassed;
+ _fpsr = (float)_ticksPassed / 24.0;
_fp++;
- if (_ticks > _nextticks) {
- _nextticks = _ticks + 1000;
+ if (_ticks > _nextTicks) {
+ _nextTicks = _ticks + 1000;
_fps = _fp;
_fp = 0;
}
@@ -1206,8 +1200,8 @@ void GriffonEngine::swash() {
do {
y = y + 1 * _fpsr;
- _videobuffer->setAlpha((int)(y * 25));
- _mapbg->blit(*_videobuffer);
+ _videoBuffer->setAlpha((int)(y * 25));
+ _mapBg->blit(*_videoBuffer);
if (_cloudsOn) {
rcDest.left = (float)(256 + 256 * cos(3.141592 / 180 * clouddeg));
@@ -1215,38 +1209,38 @@ void GriffonEngine::swash() {
rcDest.setWidth(320);
rcDest.setHeight(240);
- cloudimg->blit(*_videobuffer, 0, 0, Graphics::FLIP_NONE, &rcDest);
+ cloudimg->blit(*_videoBuffer, 0, 0, Graphics::FLIP_NONE, &rcDest);
}
- g_system->copyRectToScreen(_videobuffer->getPixels(), _videobuffer->pitch, 0, 0, _videobuffer->w, _videobuffer->h);
+ g_system->copyRectToScreen(_videoBuffer->getPixels(), _videoBuffer->pitch, 0, 0, _videoBuffer->w, _videoBuffer->h);
g_system->updateScreen();
g_system->getEventManager()->pollEvent(_event);
g_system->delayMillis(10);
- _tickspassed = _ticks;
+ _ticksPassed = _ticks;
_ticks = g_system->getMillis();
- _tickspassed = _ticks - _tickspassed;
- _fpsr = (float)_tickspassed / 24.0;
+ _ticksPassed = _ticks - _ticksPassed;
+ _fpsr = (float)_ticksPassed / 24.0;
_fp++;
- if (_ticks > _nextticks) {
- _nextticks = _ticks + 1000;
+ if (_ticks > _nextTicks) {
+ _nextTicks = _ticks + 1000;
_fps = _fp;
_fp = 0;
}
clouddeg += 0.01 * _fpsr;
while (clouddeg >= 360)
- clouddeg = clouddeg - 360;
+ clouddeg -= 360;
if (y > 10)
break;
} while (1);
- _videobuffer->setAlpha(255);
+ _videoBuffer->setAlpha(255);
}
diff --git a/engines/griffon/engine.cpp b/engines/griffon/engine.cpp
index a323febf41..9feca285e9 100644
--- a/engines/griffon/engine.cpp
+++ b/engines/griffon/engine.cpp
@@ -57,7 +57,7 @@ void GriffonEngine::mainLoop() {
}
do {
- if (!_forcepause) {
+ if (!_forcePause) {
updateAnims();
updateNPCs();
}
@@ -65,7 +65,7 @@ void GriffonEngine::mainLoop() {
checkTrigger();
checkInputs();
- if (!_forcepause)
+ if (!_forcePause)
handleWalking();
updateY();
@@ -83,15 +83,15 @@ void GriffonEngine::updateEngine() {
g_system->updateScreen();
g_system->getEventManager()->pollEvent(_event);
- _tickspassed = _ticks;
+ _ticksPassed = _ticks;
_ticks = g_system->getMillis();
- _tickspassed = _ticks - _tickspassed;
- _fpsr = (float)_tickspassed / 24.0;
+ _ticksPassed = _ticks - _ticksPassed;
+ _fpsr = (float)_ticksPassed / 24.0;
_fp++;
- if (_ticks > _nextticks) {
- _nextticks = _ticks + 1000;
+ if (_ticks > _nextTicks) {
+ _nextTicks = _ticks + 1000;
_fps = _fp;
_fp = 0;
_secsingame = _secsingame + 1;
@@ -119,7 +119,7 @@ void GriffonEngine::updateEngine() {
int sx = (int)(_player.px / 2 + 6);
int sy = (int)(_player.py / 2 + 10);
- uint32 *temp = (uint32 *)_clipbg->getBasePtr(sx, sy);
+ uint32 *temp = (uint32 *)_clipBg->getBasePtr(sx, sy);
uint32 bgc = *temp;
if (bgc > 0) {
_player.px = opx;
@@ -174,7 +174,7 @@ void GriffonEngine::updateEngine() {
}
}
- _clipbg->copyRectToSurface(_clipbg2->getPixels(), _clipbg2->pitch, 0, 0, _clipbg2->w, _clipbg2->h);
+ _clipBg->copyRectToSurface(_clipBg2->getPixels(), _clipBg2->pitch, 0, 0, _clipBg2->w, _clipBg2->h);
Common::Rect rc;
@@ -183,9 +183,9 @@ void GriffonEngine::updateEngine() {
rc.setWidth(5);
rc.setHeight(5);
- _clipbg->fillRect(rc, 1000);
+ _clipBg->fillRect(rc, 1000);
- if (!_forcepause) {
+ if (!_forcePause) {
for (int i = 0; i < 5; i++) {
if (_player.foundSpell[i])
_player.spellCharge[i] += 1 * _player.level * 0.01 * _fpsr;
@@ -213,11 +213,11 @@ void GriffonEngine::updateEngine() {
if (_player.hp <= 0)
theEnd();
- if (_roomlock) {
- _roomlock = false;
+ if (_roomLock) {
+ _roomLock = false;
for (int i = 1; i <= _lastnpc; i++)
if (_npcinfo[i].hp > 0)
- _roomlock = true;
+ _roomLock = true;
}
clouddeg += 0.1 * _fpsr;
@@ -282,7 +282,7 @@ void GriffonEngine::newGame() {
_player.exp = 0;
_player.nextLevel = 0;
- memset(_scriptflag, 0, sizeof(_scriptflag));
+ memset(_scriptFlag, 0, sizeof(_scriptFlag));
memset(_objmapf, 0, sizeof(_objmapf));
memset(_roomLocks, 0, sizeof(_roomLocks));
@@ -295,7 +295,7 @@ void GriffonEngine::newGame() {
_roomLocks[82] = 2;
_player.walkSpeed = 1.1f;
- _animspd = 0.5f;
+ _animSpeed = 0.5f;
attacking = false;
_player.attackSpeed = 1.5f;
diff --git a/engines/griffon/gfx.cpp b/engines/griffon/gfx.cpp
index 31dfc6a73f..2ba73a0f41 100644
--- a/engines/griffon/gfx.cpp
+++ b/engines/griffon/gfx.cpp
@@ -66,8 +66,8 @@ void GriffonEngine::addFloatText(const char *stri, float xloc, float yloc, int c
}
void GriffonEngine::eventText(const char *stri) {
- _videobuffer2->fillRect(Common::Rect(0, 0, _videobuffer2->w, _videobuffer2->h), 0);
- _videobuffer3->fillRect(Common::Rect(0, 0, _videobuffer3->w, _videobuffer3->h), 0);
+ _videoBuffer2->fillRect(Common::Rect(0, 0, _videoBuffer2->w, _videoBuffer2->h), 0);
+ _videoBuffer3->fillRect(Common::Rect(0, 0, _videoBuffer3->w, _videoBuffer3->h), 0);
int x = 160 - 4 * strlen(stri);
@@ -75,15 +75,15 @@ void GriffonEngine::eventText(const char *stri) {
int pause_ticks = _ticks + 500;
int b_ticks = _ticks;
- _videobuffer->blit(*_videobuffer3);
- _videobuffer->blit(*_videobuffer2);
+ _videoBuffer->blit(*_videoBuffer3);
+ _videoBuffer->blit(*_videoBuffer2);
do {
g_system->getEventManager()->pollEvent(_event);
if (_event.type == Common::EVENT_KEYDOWN && pause_ticks < _ticks)
break;
- _videobuffer2->blit(*_videobuffer);
+ _videoBuffer2->blit(*_videoBuffer);
int fr = 192;
@@ -92,27 +92,27 @@ void GriffonEngine::eventText(const char *stri) {
if (fr > 192)
fr = 192;
- _windowimg->setAlpha(fr, true);
+ _windowImg->setAlpha(fr, true);
- _windowimg->blit(*_videobuffer);
+ _windowImg->blit(*_videoBuffer);
if (pause_ticks < _ticks)
- drawString(_videobuffer, stri, x, 15, 0);
+ drawString(_videoBuffer, stri, x, 15, 0);
- g_system->copyRectToScreen(_videobuffer->getPixels(), _videobuffer->pitch, 0, 0, _videobuffer->w, _videobuffer->h);
+ g_system->copyRectToScreen(_videoBuffer->getPixels(), _videoBuffer->pitch, 0, 0, _videoBuffer->w, _videoBuffer->h);
g_system->updateScreen();
g_system->getEventManager()->pollEvent(_event);
g_system->delayMillis(10);
- _tickspassed = _ticks;
+ _ticksPassed = _ticks;
_ticks = g_system->getMillis();
- _tickspassed = _ticks - _tickspassed;
- _fpsr = (float)_tickspassed / 24.0;
+ _ticksPassed = _ticks - _ticksPassed;
+ _fpsr = (float)_ticksPassed / 24.0;
_fp++;
- if (_ticks > _nextticks) {
- _nextticks = _ticks + 1000;
+ if (_ticks > _nextTicks) {
+ _nextTicks = _ticks + 1000;
_fps = _fp;
_fp = 0;
}
@@ -120,9 +120,9 @@ void GriffonEngine::eventText(const char *stri) {
g_system->delayMillis(10);
} while (1);
- _videobuffer3->blit(*_videobuffer);
+ _videoBuffer3->blit(*_videoBuffer);
- _itemticks = _ticks + 210;
+ _itemTicks = _ticks + 210;
}
void GriffonEngine::drawLine(Graphics::TransparentSurface *buffer, int x1, int y1, int x2, int y2, int col) {
@@ -151,17 +151,17 @@ void GriffonEngine::drawString(Graphics::TransparentSurface *buffer, const char
rcDest.left = xloc + i * 8;
rcDest.top = yloc;
- _fontchr[stri[i] - 32][col]->blit(*buffer, rcDest.left, rcDest.top);
+ _fontChr[stri[i] - 32][col]->blit(*buffer, rcDest.left, rcDest.top);
}
}
void GriffonEngine::drawProgress(int w, int wm) {
- long ccc = _videobuffer->format.RGBToColor(0, 255, 0);
+ long ccc = _videoBuffer->format.RGBToColor(0, 255, 0);
rcDest.setWidth(w * 74 / wm);
- _videobuffer->fillRect(rcDest, ccc);
+ _videoBuffer->fillRect(rcDest, ccc);
- g_system->copyRectToScreen(_videobuffer->getPixels(), _videobuffer->pitch, 0, 0, _videobuffer->w, _videobuffer->h);
+ g_system->copyRectToScreen(_videoBuffer->getPixels(), _videoBuffer->pitch, 0, 0, _videoBuffer->w, _videoBuffer->h);
g_system->updateScreen();
g_system->getEventManager()->pollEvent(_event);
diff --git a/engines/griffon/griffon.h b/engines/griffon/griffon.h
index a3128306cd..34f3c3ef3a 100644
--- a/engines/griffon/griffon.h
+++ b/engines/griffon/griffon.h
@@ -381,51 +381,51 @@ private:
void updateMusic();
private:
- Graphics::TransparentSurface *_video, *_videobuffer, *_videobuffer2, *_videobuffer3;
+ Graphics::TransparentSurface *_video, *_videoBuffer, *_videoBuffer2, *_videoBuffer3;
// system
- Graphics::TransparentSurface *_titleimg, *_titleimg2, *_inventoryimg;
- Graphics::TransparentSurface *_logosimg, *_theendimg;
+ Graphics::TransparentSurface *_titleImg, *_titleImg2, *_inventoryImg;
+ Graphics::TransparentSurface *_logosImg, *_theEndImg;
Common::Event _event;
- Graphics::TransparentSurface *_mapbg, *_clipbg, *_clipbg2;
- unsigned int _clipsurround[4][4];
+ Graphics::TransparentSurface *_mapBg, *_clipBg, *_clipBg2;
+ unsigned int _clipSurround[4][4];
- float _animspd; // CHECKME: it seems to always be 0.5
- int _rampdata[40][24];
+ float _animSpeed; // CHECKME: it seems to always be 0.5
+ int _rampData[40][24];
- int _curmap;
- Graphics::TransparentSurface *_fontchr[224][5]; // 256 - 32
- Graphics::TransparentSurface *_itemimg[21], *_windowimg;
- Graphics::TransparentSurface *_spellimg;
+ int _curMap;
+ Graphics::TransparentSurface *_fontChr[224][5]; // 256 - 32
+ Graphics::TransparentSurface *_itemImg[21], *_windowImg;
+ Graphics::TransparentSurface *_spellImg;
bool _itemSelOn;
- int _curitem, _itemticks;
+ int _curItem, _itemTicks;
float _itemyloc;
bool _selEnemyOn;
- int _curenemy;
- bool _forcepause;
- bool _roomlock; // set to disable any room jumps while in the room
- int _scriptflag[100][10], _saveslot; // script, flag
+ int _curEnemy;
+ bool _forcePause;
+ bool _roomLock; // set to disable any room jumps while in the room
+ int _scriptFlag[100][10], _saveSlot; // script, flag
// timer related - move to local later
- int _ticks, _tickspassed, _nextticks;
+ int _ticks, _ticksPassed, _nextTicks;
float _fp, _fps, _fpsr; // CHECKME: _fp and _fps seems to be integers
- int _secsingame, _secstart;
+ int _secsingame, _secStart;
- Graphics::TransparentSurface *mapimg[4];
+ Graphics::TransparentSurface *mapImg[4];
Common::Rect rcSrc, rcDest;
// -----------special case
- int dontdrawover; // used in map24 so that the candles don't draw over the boss, default set to 0
+ bool _dontDrawOver; // used in map24 so that the candles don't draw over the boss, default set to 0
// saveload info
- Graphics::TransparentSurface *saveloadimg;
+ Graphics::TransparentSurface *_saveLoadImg;
// post info
- float postinfo[21][3];
+ float _postInfo[21][3];
int nposts;
// cloud info
@@ -450,7 +450,7 @@ private:
// animation info
Graphics::TransparentSurface *_anims[100];
// id number 0&1 = players
- Graphics::TransparentSurface *_animsa[100];
+ Graphics::TransparentSurface *_animsAttack[100];
// attack anims
float _playerattackofs[4][16][3];
// [dir] [frame] [x,y ofs, completed(0/1)]
diff --git a/engines/griffon/input.cpp b/engines/griffon/input.cpp
index 72398387fe..a1dba708a5 100644
--- a/engines/griffon/input.cpp
+++ b/engines/griffon/input.cpp
@@ -50,22 +50,22 @@ void GriffonEngine::checkInputs() {
nposts = 0;
for (int i = 0; i <= 20; i++) {
- postinfo[i][0] = 0;
- postinfo[i][1] = 0;
+ _postInfo[i][0] = 0;
+ _postInfo[i][1] = 0;
}
for (int x = 0; x <= 19; x++) {
for (int y = 0; y <= 14; y++) {
int o = _objectMap[x][y];
if (_objectInfo[o][4] == 3) {
- postinfo[nposts][0] = x * 16;
- postinfo[nposts][1] = y * 16;
+ _postInfo[nposts][0] = x * 16;
+ _postInfo[nposts][1] = y * 16;
nposts = nposts + 1;
}
}
}
- if (attacking || (_forcepause && !_itemSelOn))
+ if (attacking || (_forcePause && !_itemSelOn))
return;
if (_event.type == Common::EVENT_QUIT) {
@@ -75,18 +75,18 @@ void GriffonEngine::checkInputs() {
if (_event.type == Common::EVENT_KEYDOWN) {
if (_event.kbd.keycode == Common::KEYCODE_ESCAPE) {
- if (_itemticks < _ticks)
+ if (_itemTicks < _ticks)
title(1);
} else if (_event.kbd.keycode == Common::KEYCODE_d && _event.kbd.hasFlags(Common::KBD_CTRL)) {
_console->attach();
_event.type = Common::EVENT_INVALID;
} else if (_event.kbd.hasFlags(Common::KBD_CTRL)) {
- if (!_itemSelOn && (_itemticks < _ticks))
+ if (!_itemSelOn && (_itemTicks < _ticks))
attack();
- if (_itemSelOn && _itemticks < _ticks) {
- if (_curitem == 0 && _player.inventory[kInvFlask] > 0) {
- _itemticks = _ticks + ntickdelay;
+ if (_itemSelOn && _itemTicks < _ticks) {
+ if (_curItem == 0 && _player.inventory[kInvFlask] > 0) {
+ _itemTicks = _ticks + ntickdelay;
int heal = 50;
int maxh = _player.maxHp - _player.hp;
@@ -108,11 +108,11 @@ void GriffonEngine::checkInputs() {
}
_itemSelOn = false;
- _forcepause = false;
+ _forcePause = false;
}
- if (_curitem == 1 && _player.inventory[kInvDoubleFlask] > 0) {
- _itemticks = _ticks + ntickdelay;
+ if (_curItem == 1 && _player.inventory[kInvDoubleFlask] > 0) {
+ _itemTicks = _ticks + ntickdelay;
int heal = 200;
int maxHeal = _player.maxHp - _player.hp;
@@ -134,86 +134,86 @@ void GriffonEngine::checkInputs() {
}
_itemSelOn = false;
- _forcepause = false;
+ _forcePause = false;
}
- if (_curitem == 2 && _player.inventory[kInvShock] > 0) {
- castSpell(8, _player.px, _player.py, _npcinfo[_curenemy].x, _npcinfo[_curenemy].y, 0);
+ if (_curItem == 2 && _player.inventory[kInvShock] > 0) {
+ castSpell(8, _player.px, _player.py, _npcinfo[_curEnemy].x, _npcinfo[_curEnemy].y, 0);
- _forcepause = true;
+ _forcePause = true;
_player.inventory[kInvShock]--;
- _itemticks = _ticks + ntickdelay;
+ _itemTicks = _ticks + ntickdelay;
_selEnemyOn = false;
_itemSelOn = false;
}
- if (_curitem == 3 && _player.inventory[kInvNormalKey] > 0 && _canUseKey && _lockType == 1) {
+ if (_curItem == 3 && _player.inventory[kInvNormalKey] > 0 && _canUseKey && _lockType == 1) {
_roomLocks[_roomToUnlock] = 0;
eventText("UnLocked!");
_player.inventory[kInvNormalKey]--;
- _itemticks = _ticks + ntickdelay;
+ _itemTicks = _ticks + ntickdelay;
_selEnemyOn = false;
_itemSelOn = false;
return;
}
- if (_curitem == 4 && _player.inventory[kInvMasterKey] > 0 && _canUseKey && _lockType == 2) {
+ if (_curItem == 4 && _player.inventory[kInvMasterKey] > 0 && _canUseKey && _lockType == 2) {
_roomLocks[_roomToUnlock] = 0;
eventText("UnLocked!");
_player.inventory[kInvMasterKey]--;
- _itemticks = _ticks + ntickdelay;
+ _itemTicks = _ticks + ntickdelay;
_selEnemyOn = false;
_itemSelOn = false;
return;
}
- if (_curitem == 5 && _player.spellCharge[0] == 100) {
- castSpell(5, _player.px, _player.py, _npcinfo[_curenemy].x, _npcinfo[_curenemy].y, 0);
+ if (_curItem == 5 && _player.spellCharge[0] == 100) {
+ castSpell(5, _player.px, _player.py, _npcinfo[_curEnemy].x, _npcinfo[_curEnemy].y, 0);
_player.spellCharge[0] = 0;
- _forcepause = true;
+ _forcePause = true;
- _itemticks = _ticks + ntickdelay;
+ _itemTicks = _ticks + ntickdelay;
_selEnemyOn = false;
_itemSelOn = false;
}
- if (_curitem > 5 && _selEnemyOn) {
- if (_curenemy <= _lastnpc) {
- castSpell(_curitem - 6, _player.px, _player.py, _npcinfo[_curenemy].x, _npcinfo[_curenemy].y, 0);
+ if (_curItem > 5 && _selEnemyOn) {
+ if (_curEnemy <= _lastnpc) {
+ castSpell(_curItem - 6, _player.px, _player.py, _npcinfo[_curEnemy].x, _npcinfo[_curEnemy].y, 0);
} else {
- int pst = _curenemy - _lastnpc - 1;
- castSpell(_curitem - 6, _player.px, _player.py, postinfo[pst][0], postinfo[pst][1], 0);
+ int pst = _curEnemy - _lastnpc - 1;
+ castSpell(_curItem - 6, _player.px, _player.py, _postInfo[pst][0], _postInfo[pst][1], 0);
}
- _player.spellCharge[_curitem - 5] = 0;
+ _player.spellCharge[_curItem - 5] = 0;
_player.spellStrength = 0;
- _itemticks = _ticks + ntickdelay;
+ _itemTicks = _ticks + ntickdelay;
_selEnemyOn = false;
_itemSelOn = false;
- _forcepause = false;
+ _forcePause = false;
}
- if (_curitem > 5 && !_selEnemyOn && _itemSelOn) {
- if (ABS(_player.spellCharge[_curitem - 5] - 100) < kEpsilon) {
- _itemticks = _ticks + ntickdelay;
+ if (_curItem > 5 && !_selEnemyOn && _itemSelOn) {
+ if (ABS(_player.spellCharge[_curItem - 5] - 100) < kEpsilon) {
+ _itemTicks = _ticks + ntickdelay;
_selEnemyOn = true;
int i = 0;
do {
if (_npcinfo[i].hp > 0) {
- _curenemy = i;
+ _curEnemy = i;
goto __exit_do;
}
i = i + 1;
@@ -226,23 +226,23 @@ __exit_do:
if (nposts > 0 && !_selEnemyOn) {
_selEnemyOn = true;
- _curenemy = _lastnpc + 1;
+ _curEnemy = _lastnpc + 1;
}
}
}
}
} else if (_event.kbd.hasFlags(Common::KBD_ALT)) {
- if (_itemticks < _ticks) {
+ if (_itemTicks < _ticks) {
_selEnemyOn = false;
if (_itemSelOn) {
_itemSelOn = false;
- _itemticks = _ticks + 220;
- _forcepause = false;
+ _itemTicks = _ticks + 220;
+ _forcePause = false;
} else {
_itemSelOn = true;
- _itemticks = _ticks + 220;
- _forcepause = true;
+ _itemTicks = _ticks + 220;
+ _forcePause = true;
_player.itemselshade = 0;
}
}
@@ -269,75 +269,75 @@ __exit_do:
movingright = false;
if (_selEnemyOn) {
- if (_itemticks < _ticks) {
+ if (_itemTicks < _ticks) {
if (_event.kbd.keycode == Common::KEYCODE_LEFT) {
- int origin = _curenemy;
+ int origin = _curEnemy;
do {
- _curenemy = _curenemy - 1;
- if (_curenemy < 1)
- _curenemy = _lastnpc + nposts;
- if (_curenemy == origin)
+ _curEnemy = _curEnemy - 1;
+ if (_curEnemy < 1)
+ _curEnemy = _lastnpc + nposts;
+ if (_curEnemy == origin)
break;
- if (_curenemy <= _lastnpc && _npcinfo[_curenemy].hp > 0)
+ if (_curEnemy <= _lastnpc && _npcinfo[_curEnemy].hp > 0)
break;
- if (_curenemy > _lastnpc)
+ if (_curEnemy > _lastnpc)
break;
} while (1);
- _itemticks = _ticks + ntickdelay;
+ _itemTicks = _ticks + ntickdelay;
}
if (_event.kbd.keycode == Common::KEYCODE_RIGHT) {
- int origin = _curenemy;
+ int origin = _curEnemy;
do {
- _curenemy = _curenemy + 1;
- if (_curenemy > _lastnpc + nposts)
- _curenemy = 1;
- if (_curenemy == origin)
+ _curEnemy = _curEnemy + 1;
+ if (_curEnemy > _lastnpc + nposts)
+ _curEnemy = 1;
+ if (_curEnemy == origin)
break;
- if (_curenemy <= _lastnpc && _npcinfo[_curenemy].hp > 0)
+ if (_curEnemy <= _lastnpc && _npcinfo[_curEnemy].hp > 0)
break;
- if (_curenemy > _lastnpc)
+ if (_curEnemy > _lastnpc)
break;
} while (1);
- _itemticks = _ticks + ntickdelay;
+ _itemTicks = _ticks + ntickdelay;
}
- if (_curenemy > _lastnpc + nposts)
- _curenemy = 1;
- if (_curenemy < 1)
- _curenemy = _lastnpc + nposts;
+ if (_curEnemy > _lastnpc + nposts)
+ _curEnemy = 1;
+ if (_curEnemy < 1)
+ _curEnemy = _lastnpc + nposts;
}
} else {
- if (_itemticks < _ticks) {
+ if (_itemTicks < _ticks) {
if (_event.kbd.keycode == Common::KEYCODE_UP) {
- _curitem = _curitem - 1;
- _itemticks = _ticks + ntickdelay;
- if (_curitem == 4)
- _curitem = 9;
- if (_curitem == -1)
- _curitem = 4;
+ _curItem = _curItem - 1;
+ _itemTicks = _ticks + ntickdelay;
+ if (_curItem == 4)
+ _curItem = 9;
+ if (_curItem == -1)
+ _curItem = 4;
}
if (_event.kbd.keycode == Common::KEYCODE_DOWN) {
- _curitem = _curitem + 1;
- _itemticks = _ticks + ntickdelay;
- if (_curitem == 5)
- _curitem = 0;
- if (_curitem == 10)
- _curitem = 5;
+ _curItem = _curItem + 1;
+ _itemTicks = _ticks + ntickdelay;
+ if (_curItem == 5)
+ _curItem = 0;
+ if (_curItem == 10)
+ _curItem = 5;
}
if (_event.kbd.keycode == Common::KEYCODE_LEFT) {
- _curitem = _curitem - 5;
- _itemticks = _ticks + ntickdelay;
+ _curItem = _curItem - 5;
+ _itemTicks = _ticks + ntickdelay;
}
if (_event.kbd.keycode == Common::KEYCODE_RIGHT) {
- _curitem = _curitem + 5;
- _itemticks = _ticks + ntickdelay;
+ _curItem = _curItem + 5;
+ _itemTicks = _ticks + ntickdelay;
}
- if (_curitem > 9)
- _curitem = _curitem - 10;
- if (_curitem < 0)
- _curitem = _curitem + 10;
+ if (_curItem > 9)
+ _curItem = _curItem - 10;
+ if (_curItem < 0)
+ _curItem = _curItem + 10;
}
}
}
@@ -362,7 +362,7 @@ void GriffonEngine::handleWalking() {
int lx = (int)npx / 16;
int ly = (int)npy / 16;
- int ramp = _rampdata[lx][ly];
+ int ramp = _rampData[lx][ly];
if (ramp == 1 && movingup)
spd *= 2;
if (ramp == 1 && movingdown)
@@ -385,10 +385,10 @@ void GriffonEngine::handleWalking() {
int sx = nx + x;
int sy = ny + y;
- _clipsurround[x + 1][y + 1] = 0;
+ _clipSurround[x + 1][y + 1] = 0;
if (sx > -1 && sx < 320 && sy > -1 && sy < 192) {
- temp = (uint32 *)_clipbg->getBasePtr(sx, sy);
- _clipsurround[x + 1][y + 1] = *temp;
+ temp = (uint32 *)_clipBg->getBasePtr(sx, sy);
+ _clipSurround[x + 1][y + 1] = *temp;
}
}
}
@@ -402,66 +402,66 @@ void GriffonEngine::handleWalking() {
if (movingright)
_player.walkDir = 3;
- if (movingup && _clipsurround[1][0] == 0) {
+ if (movingup && _clipSurround[1][0] == 0) {
py -= spd;
_player.walkDir = 0;
- } else if (movingup && _clipsurround[1][0] > 0) {
+ } else if (movingup && _clipSurround[1][0] > 0) {
// move upleft
- if (!movingright && _clipsurround[0][0] == 0) {
+ if (!movingright && _clipSurround[0][0] == 0) {
py -= spd;
px -= spd;
}
// move upright
- if (!movingleft && _clipsurround[2][0] == 0) {
+ if (!movingleft && _clipSurround[2][0] == 0) {
py -= spd;
px += spd;
}
}
- if (movingdown && _clipsurround[1][2] == 0) {
+ if (movingdown && _clipSurround[1][2] == 0) {
py += spd;
_player.walkDir = 1;
- } else if (movingdown && _clipsurround[1][2] > 0) {
+ } else if (movingdown && _clipSurround[1][2] > 0) {
// move downleft
- if (movingright == 0 && _clipsurround[0][2] == 0) {
+ if (movingright == 0 && _clipSurround[0][2] == 0) {
py += spd;
px -= spd;
}
// move downright
- if (movingleft == 0 && _clipsurround[2][2] == 0) {
+ if (movingleft == 0 && _clipSurround[2][2] == 0) {
py += spd;
px += spd;
}
}
- if (movingleft && _clipsurround[0][1] == 0) {
+ if (movingleft && _clipSurround[0][1] == 0) {
px -= spd;
_player.walkDir = 2;
- } else if (movingleft && _clipsurround[0][1] > 0) {
+ } else if (movingleft && _clipSurround[0][1] > 0) {
// move leftup
- if (!movingdown && _clipsurround[0][0] == 0) {
+ if (!movingdown && _clipSurround[0][0] == 0) {
py -= spd;
px -= spd;
}
// move leftdown
- if (!movingup && _clipsurround[0][2] == 0) {
+ if (!movingup && _clipSurround[0][2] == 0) {
py += spd;
px -= spd;
}
}
- if (movingright && _clipsurround[2][1] == 0) {
+ if (movingright && _clipSurround[2][1] == 0) {
px += spd;
_player.walkDir = 3;
- } else if (movingright && _clipsurround[2][1] > 0) {
+ } else if (movingright && _clipSurround[2][1] > 0) {
// move rightup
- if (!movingdown && _clipsurround[2][0] == 0) {
+ if (!movingdown && _clipSurround[2][0] == 0) {
px += spd;
py -= spd;
}
// move rightdown
- if (!movingup && _clipsurround[2][2] == 0) {
+ if (!movingup && _clipSurround[2][2] == 0) {
py += spd;
px += spd;
}
@@ -480,7 +480,7 @@ void GriffonEngine::handleWalking() {
int sx = (px / 2 + 6);
int sy = (py / 2 + 10);
- temp = (uint32 *)_clipbg->getBasePtr(sx, sy);
+ temp = (uint32 *)_clipBg->getBasePtr(sx, sy);
bgc = *temp;
if (bgc > 0 && bgc != 1000) {
px = opx;
@@ -520,7 +520,7 @@ void GriffonEngine::handleWalking() {
sx = (int)(npx / 2 + 6);
sy = (int)(npy / 2 + 10);
- temp = (uint32 *)_clipbg->getBasePtr(sx, sy);
+ temp = (uint32 *)_clipBg->getBasePtr(sx, sy);
bgc = *temp;
if (bgc > 0) {
@@ -537,7 +537,7 @@ void GriffonEngine::handleWalking() {
_player.py = py;
if (_player.px != _player.opx || _player.py != _player.opy)
- _player.walkFrame += _animspd * _fpsr;
+ _player.walkFrame += _animSpeed * _fpsr;
if (_player.walkFrame >= 16)
_player.walkFrame -= 16;
@@ -552,7 +552,7 @@ void GriffonEngine::handleWalking() {
_player.inventory[kInvFlask]++;
addFloatIcon(6, lx * 16, ly * 16);
- _objmapf[_curmap][lx][ly] = 1;
+ _objmapf[_curMap][lx][ly] = 1;
if (config.effects) {
int snd = playSound(_sfx[kSndPowerUp]);
@@ -566,7 +566,7 @@ void GriffonEngine::handleWalking() {
_player.inventory[kInvDoubleFlask]++;
addFloatIcon(12, lx * 16, ly * 16);
- _objmapf[_curmap][lx][ly] = 1;
+ _objmapf[_curMap][lx][ly] = 1;
if (config.effects) {
int snd = playSound(_sfx[kSndPowerUp]);
@@ -574,15 +574,15 @@ void GriffonEngine::handleWalking() {
}
}
- if (_objectInfo[o][5] == 9 && _player.inventory[kInvShock] < 9 && (_curmap == 41 && _scriptflag[kScriptLightningBomb][1] == 0)) {
+ if (_objectInfo[o][5] == 9 && _player.inventory[kInvShock] < 9 && (_curMap == 41 && _scriptFlag[kScriptLightningBomb][1] == 0)) {
_objectMap[lx][ly] = -1;
_player.inventory[kInvShock]++;
addFloatIcon(17, lx * 16, ly * 16);
- _objmapf[_curmap][lx][ly] = 1;
- if (_curmap == 41)
- _scriptflag[kScriptLightningBomb][1] = 1;
+ _objmapf[_curMap][lx][ly] = 1;
+ if (_curMap == 41)
+ _scriptFlag[kScriptLightningBomb][1] = 1;
if (config.effects) {
int snd = playSound(_sfx[kSndPowerUp]);
@@ -597,7 +597,7 @@ void GriffonEngine::handleWalking() {
_player.inventory[kInvShock]++;
addFloatIcon(17, lx * 16, ly * 16);
- _objmapf[_curmap][lx][ly] = 1;
+ _objmapf[_curMap][lx][ly] = 1;
if (config.effects) {
int snd = playSound(_sfx[kSndPowerUp]);
@@ -624,7 +624,7 @@ void GriffonEngine::checkTrigger() {
void GriffonEngine::processTrigger(int trignum) {
int trigtype = _triggers[trignum][0];
- if (_roomlock)
+ if (_roomLock)
return;
// map jump------------------------------
diff --git a/engines/griffon/logic.cpp b/engines/griffon/logic.cpp
index 3225930555..01ee9f01ff 100644
--- a/engines/griffon/logic.cpp
+++ b/engines/griffon/logic.cpp
@@ -307,7 +307,7 @@ void GriffonEngine::updateNPCs() {
if (moveup) {
int sx = xp;
int sy = yp - ii;
- uint32 *temp = (uint32 *)_clipbg->getBasePtr(sx, sy);
+ uint32 *temp = (uint32 *)_clipBg->getBasePtr(sx, sy);
uint32 dq = *temp;
if (_npcinfo[i].spriteset == kMonsterFinalBoss)
dq = 0;
@@ -317,7 +317,7 @@ void GriffonEngine::updateNPCs() {
if (dq > 0) {
sx = xp - ii;
sy = yp - ii;
- temp = (uint32 *)_clipbg->getBasePtr(sx, sy);
+ temp = (uint32 *)_clipBg->getBasePtr(sx, sy);
dq = *temp;
if (_npcinfo[i].spriteset == kMonsterFinalBoss)
dq = 0;
@@ -329,7 +329,7 @@ void GriffonEngine::updateNPCs() {
if (dq > 0) {
sx = xp + ii;
sy = yp - ii;
- temp = (uint32 *)_clipbg->getBasePtr(sx, sy);
+ temp = (uint32 *)_clipBg->getBasePtr(sx, sy);
dq = *temp;
if (_npcinfo[i].spriteset == kMonsterFinalBoss)
dq = 0;
@@ -343,7 +343,7 @@ void GriffonEngine::updateNPCs() {
if (movedown) {
int sx = xp;
int sy = yp + ii;
- uint32 *temp = (uint32 *)_clipbg->getBasePtr(sx, sy);
+ uint32 *temp = (uint32 *)_clipBg->getBasePtr(sx, sy);
uint32 dq = *temp;
if (_npcinfo[i].spriteset == kMonsterFinalBoss)
dq = 0;
@@ -352,7 +352,7 @@ void GriffonEngine::updateNPCs() {
if (dq > 0) {
sx = xp - ii;
sy = yp + ii;
- temp = (uint32 *)_clipbg->getBasePtr(sx, sy);
+ temp = (uint32 *)_clipBg->getBasePtr(sx, sy);
dq = *temp;
if (_npcinfo[i].spriteset == kMonsterFinalBoss)
dq = 0;
@@ -364,7 +364,7 @@ void GriffonEngine::updateNPCs() {
if (dq > 0) {
sx = xp + ii;
sy = yp + ii;
- temp = (uint32 *)_clipbg->getBasePtr(sx, sy);
+ temp = (uint32 *)_clipBg->getBasePtr(sx, sy);
dq = *temp;
if (_npcinfo[i].spriteset == kMonsterFinalBoss)
dq = 0;
@@ -378,7 +378,7 @@ void GriffonEngine::updateNPCs() {
if (moveleft) {
int sx = xp - ii;
int sy = yp;
- uint32 *temp = (uint32 *)_clipbg->getBasePtr(sx, sy);
+ uint32 *temp = (uint32 *)_clipBg->getBasePtr(sx, sy);
uint32 dq = *temp;
if (_npcinfo[i].spriteset == kMonsterFinalBoss)
dq = 0;
@@ -387,7 +387,7 @@ void GriffonEngine::updateNPCs() {
if (dq > 0) {
sx = xp - ii;
sy = yp - ii;
- temp = (uint32 *)_clipbg->getBasePtr(sx, sy);
+ temp = (uint32 *)_clipBg->getBasePtr(sx, sy);
dq = *temp;
if (_npcinfo[i].spriteset == kMonsterFinalBoss)
dq = 0;
@@ -399,7 +399,7 @@ void GriffonEngine::updateNPCs() {
if (dq > 0) {
sx = xp - ii;
sy = yp + ii;
- temp = (uint32 *)_clipbg->getBasePtr(sx, sy);
+ temp = (uint32 *)_clipBg->getBasePtr(sx, sy);
dq = *temp;
if (_npcinfo[i].spriteset == kMonsterFinalBoss)
dq = 0;
@@ -413,7 +413,7 @@ void GriffonEngine::updateNPCs() {
if (moveright) {
int sx = xp + ii;
int sy = yp;
- uint32 *temp = (uint32 *)_clipbg->getBasePtr(sx, sy);
+ uint32 *temp = (uint32 *)_clipBg->getBasePtr(sx, sy);
uint32 dq = *temp;
if (_npcinfo[i].spriteset == kMonsterFinalBoss)
dq = 0;
@@ -422,7 +422,7 @@ void GriffonEngine::updateNPCs() {
if (dq > 0) {
sx = xp + ii;
sy = yp - ii;
- temp = (uint32 *)_clipbg->getBasePtr(sx, sy);
+ temp = (uint32 *)_clipBg->getBasePtr(sx, sy);
dq = *temp;
if (_npcinfo[i].spriteset == kMonsterFinalBoss)
dq = 0;
@@ -434,7 +434,7 @@ void GriffonEngine::updateNPCs() {
if (dq > 0) {
sx = xp + ii;
sy = yp + ii;
- temp = (uint32 *)_clipbg->getBasePtr(sx, sy);
+ temp = (uint32 *)_clipBg->getBasePtr(sx, sy);
dq = *temp;
if (_npcinfo[i].spriteset == kMonsterFinalBoss)
dq = 0;
@@ -475,7 +475,7 @@ void GriffonEngine::updateNPCs() {
int sx = xp;
int sy = yp;
- uint32 *temp = (uint32 *)_clipbg->getBasePtr(sx, sy);
+ uint32 *temp = (uint32 *)_clipBg->getBasePtr(sx, sy);
uint32 bgc = *temp;
float anpx = npx + 12;
@@ -974,7 +974,7 @@ void GriffonEngine::updateNPCs() {
rcSrc.setHeight(3);
if (_npcinfo[i].pause < _ticks)
- _clipbg->fillRect(rcSrc, i);
+ _clipBg->fillRect(rcSrc, i);
pass = 0;
@@ -1245,7 +1245,7 @@ void GriffonEngine::updateSpells() {
int spellnum = spellinfo[i].spellnum;
// water
- if (spellnum == 0 && !_forcepause) {
+ if (spellnum == 0 && !_forcePause) {
float fr = (32 - spellinfo[i].frame);
int ll[4][2];
@@ -1307,9 +1307,9 @@ void GriffonEngine::updateSpells() {
}
if (xloc > -16 && xloc < 304 && yloc > -16 && yloc < 224) {
- _spellimg->setAlpha(alf, true);
- _spellimg->blit(*_videobuffer, rcDest.left, rcDest.top, Graphics::FLIP_NONE, &rcSrc);
- _spellimg->setAlpha(255, true);
+ _spellImg->setAlpha(alf, true);
+ _spellImg->blit(*_videoBuffer, rcDest.left, rcDest.top, Graphics::FLIP_NONE, &rcSrc);
+ _spellImg->setAlpha(255, true);
if (spellinfo[i].damagewho == 0) {
for (int e = 1; e <= _lastnpc; e++) {
@@ -1333,21 +1333,21 @@ void GriffonEngine::updateSpells() {
// check for post damage
if (nposts > 0) {
for (int e = 0; e <= nposts - 1; e++) {
- float xdif = (xloc + 16) - (postinfo[e][0] + 8);
- float ydif = (yloc + 16) - (postinfo[e][1] + 8);
+ float xdif = (xloc + 16) - (_postInfo[e][0] + 8);
+ float ydif = (yloc + 16) - (_postInfo[e][1] + 8);
if ((abs(xdif) < 16 && abs(ydif) < 16)) {
- _objmapf[_curmap][(int)postinfo[e][0] / 16][(int)postinfo[e][1] / 16] = 1;
- _objectMap[(int)postinfo[e][0] / 16][(int)postinfo[e][1] / 16] = -1;
+ _objmapf[_curMap][(int)_postInfo[e][0] / 16][(int)_postInfo[e][1] / 16] = 1;
+ _objectMap[(int)_postInfo[e][0] / 16][(int)_postInfo[e][1] / 16] = -1;
- rcSrc.left = postinfo[e][0] / 2;
- rcSrc.top = postinfo[e][1] / 2;
+ rcSrc.left = _postInfo[e][0] / 2;
+ rcSrc.top = _postInfo[e][1] / 2;
rcSrc.setWidth(8);
rcSrc.setHeight(8);
- _clipbg2->fillRect(rcSrc, 0);
+ _clipBg2->fillRect(rcSrc, 0);
- addFloatIcon(99, postinfo[e][0], postinfo[e][1]);
+ addFloatIcon(99, _postInfo[e][0], _postInfo[e][1]);
if (config.effects) {
int snd = playSound(_sfx[kSndIce]);
@@ -1362,7 +1362,7 @@ void GriffonEngine::updateSpells() {
}
// metal
- if (spellnum == 1 && !_forcepause) {
+ if (spellnum == 1 && !_forcePause) {
int fr = (int)((32 - spellinfo[i].frame) * 4) % 3;
rcSrc.left = fr * 48;
@@ -1384,7 +1384,7 @@ void GriffonEngine::updateSpells() {
rcDest.left = xloc;
rcDest.top = yloc;
- _spellimg->blit(*_videobuffer, rcDest.left, rcDest.top, Graphics::FLIP_NONE, &rcSrc);
+ _spellImg->blit(*_videoBuffer, rcDest.left, rcDest.top, Graphics::FLIP_NONE, &rcSrc);
spellinfo[i].frame = spellinfo[i].frame - 0.2 * _fpsr;
if (spellinfo[i].frame < 0)
@@ -1452,21 +1452,21 @@ void GriffonEngine::updateSpells() {
// check for(int post damage
if (nposts > 0) {
for (int e = 0; e <= nposts - 1; e++) {
- float xdif = (xloc + 24) - (postinfo[e][0] + 8);
- float ydif = (yloc + 24) - (postinfo[e][1] + 8);
+ float xdif = (xloc + 24) - (_postInfo[e][0] + 8);
+ float ydif = (yloc + 24) - (_postInfo[e][1] + 8);
if ((abs(xdif) < 24 && abs(ydif) < 24)) {
- _objmapf[_curmap][(int)postinfo[e][0] / 16][(int)postinfo[e][1] / 16] = 1;
- _objectMap[(int)postinfo[e][0] / 16][(int)postinfo[e][1] / 16] = -1;
+ _objmapf[_curMap][(int)_postInfo[e][0] / 16][(int)_postInfo[e][1] / 16] = 1;
+ _objectMap[(int)_postInfo[e][0] / 16][(int)_postInfo[e][1] / 16] = -1;
- rcSrc.left = postinfo[e][0] / 2;
- rcSrc.top = postinfo[e][1] / 2;
+ rcSrc.left = _postInfo[e][0] / 2;
+ rcSrc.top = _postInfo[e][1] / 2;
rcSrc.setWidth(8);
rcSrc.setHeight(8);
- _clipbg2->fillRect(rcSrc, 0);
+ _clipBg2->fillRect(rcSrc, 0);
- addFloatIcon(99, postinfo[e][0], postinfo[e][1]);
+ addFloatIcon(99, _postInfo[e][0], _postInfo[e][1]);
if (config.effects) {
int snd = playSound(_sfx[kSndMetalHit]);
@@ -1478,7 +1478,7 @@ void GriffonEngine::updateSpells() {
}
// earth
- if (spellnum == 2 && !_forcepause) {
+ if (spellnum == 2 && !_forcePause) {
float hght = 240 - spellinfo[i].enemyy;
for (int f = 8; f >= 0; f--) {
@@ -1506,7 +1506,7 @@ void GriffonEngine::updateSpells() {
rcDest.top = yloc;
if (xloc > -16 && xloc < 304 && yloc > -16 && yloc < 224) {
- _spellimg->blit(*_videobuffer, rcDest.left, rcDest.top, Graphics::FLIP_NONE, &rcSrc);
+ _spellImg->blit(*_videoBuffer, rcDest.left, rcDest.top, Graphics::FLIP_NONE, &rcSrc);
if (scatter) {
if (spellinfo[i].damagewho == 0) {
@@ -1532,21 +1532,21 @@ void GriffonEngine::updateSpells() {
// check for(int post damage
if (nposts > 0) {
for (int e = 0; e <= nposts - 1; e++) {
- float xdif = (xloc + 16) - (postinfo[e][0] + 8);
- float ydif = (yloc + 16) - (postinfo[e][1] + 8);
+ float xdif = (xloc + 16) - (_postInfo[e][0] + 8);
+ float ydif = (yloc + 16) - (_postInfo[e][1] + 8);
if ((abs(xdif) < 16 && abs(ydif) < 16)) {
- _objmapf[_curmap][(int)postinfo[e][0] / 16][(int)postinfo[e][1] / 16] = 1;
- _objectMap[(int)postinfo[e][0] / 16][(int)postinfo[e][1] / 16] = -1;
+ _objmapf[_curMap][(int)_postInfo[e][0] / 16][(int)_postInfo[e][1] / 16] = 1;
+ _objectMap[(int)_postInfo[e][0] / 16][(int)_postInfo[e][1] / 16] = -1;
- rcSrc.left = postinfo[e][0] / 2;
- rcSrc.top = postinfo[e][1] / 2;
+ rcSrc.left = _postInfo[e][0] / 2;
+ rcSrc.top = _postInfo[e][1] / 2;
rcSrc.setWidth(8);
rcSrc.setHeight(8);
- _clipbg2->fillRect(rcSrc, 0);
+ _clipBg2->fillRect(rcSrc, 0);
- addFloatIcon(99, postinfo[e][0], postinfo[e][1]);
+ addFloatIcon(99, _postInfo[e][0], _postInfo[e][1]);
if (config.effects) {
int snd = playSound(_sfx[kSndRocks]);
@@ -1585,14 +1585,14 @@ void GriffonEngine::updateSpells() {
if (fra > 24)
f = 192 * (1 - (fra - 24) / 8);
- _spellimg->setAlpha(f, true);
- _spellimg->blit(*_videobuffer, rcDest.left, rcDest.top, Graphics::FLIP_NONE, &rcSrc);
- _spellimg->setAlpha(255, true);
+ _spellImg->setAlpha(f, true);
+ _spellImg->blit(*_videoBuffer, rcDest.left, rcDest.top, Graphics::FLIP_NONE, &rcSrc);
+ _spellImg->setAlpha(255, true);
spellinfo[i].frame = spellinfo[i].frame - 0.3 * _fpsr;
if (spellinfo[i].frame < 0) {
spellinfo[i].frame = 0;
- _forcepause = false;
+ _forcePause = false;
float npx = _player.px + 12;
float npy = _player.py + 20;
@@ -1664,12 +1664,12 @@ void GriffonEngine::updateSpells() {
}
// room fireballs
- if (spellnum == 6 && !_forcepause) {
+ if (spellnum == 6 && !_forcePause) {
if (spellinfo[i].frame > 16) {
float fr = (32 - spellinfo[i].frame);
- _spellimg->setAlpha(192 * sin(3.14159 * fr / 4), true);
+ _spellImg->setAlpha(192 * sin(3.14159 * fr / 4), true);
rcSrc.left = 16 * (int)(RND() * 2);
rcSrc.top = 80;
@@ -1684,12 +1684,12 @@ void GriffonEngine::updateSpells() {
rcDest.left = xloc;
rcDest.top = yloc;
- _spellimg->blit(*_videobuffer, rcDest.left, rcDest.top, Graphics::FLIP_NONE, &rcSrc);
+ _spellImg->blit(*_videoBuffer, rcDest.left, rcDest.top, Graphics::FLIP_NONE, &rcSrc);
}
- _spellimg->setAlpha(255, true);
+ _spellImg->setAlpha(255, true);
} else {
- _spellimg->setAlpha(192, true);
+ _spellImg->setAlpha(192, true);
rcSrc.left = 16 * (int)(RND() * 2);
rcSrc.top = 80;
@@ -1719,14 +1719,14 @@ void GriffonEngine::updateSpells() {
rcDest.left = xloc;
rcDest.top = yloc;
- _spellimg->blit(*_videobuffer, rcDest.left, rcDest.top, Graphics::FLIP_NONE, &rcSrc);
+ _spellImg->blit(*_videoBuffer, rcDest.left, rcDest.top, Graphics::FLIP_NONE, &rcSrc);
}
if (xloc < -1 || yloc < -1 || xloc > 304 || yloc > 224)
spellinfo[i].ballon[ff] = 0;
}
- _spellimg->setAlpha(255, true);
+ _spellImg->setAlpha(255, true);
}
spellinfo[i].frame = spellinfo[i].frame - 0.2 * _fpsr;
@@ -1760,9 +1760,9 @@ void GriffonEngine::updateSpells() {
// lightning bomb
if (spellnum == 8) {
- long cl1 = _videobuffer->format.RGBToColor(0, 32, 204);
- long cl2 = _videobuffer->format.RGBToColor(142, 173, 191);
- long cl3 = _videobuffer->format.RGBToColor(240, 240, 240);
+ long cl1 = _videoBuffer->format.RGBToColor(0, 32, 204);
+ long cl2 = _videoBuffer->format.RGBToColor(142, 173, 191);
+ long cl3 = _videoBuffer->format.RGBToColor(240, 240, 240);
float px = _player.px + 12;
float py = _player.py + 12;
@@ -1781,13 +1781,13 @@ void GriffonEngine::updateSpells() {
else if (orn == 2)
++y;
- drawLine(_videobuffer, x, y - 1, x, y + 2, cl1);
- drawLine(_videobuffer, x, y, x, y + 1, cl3);
+ drawLine(_videoBuffer, x, y - 1, x, y + 2, cl1);
+ drawLine(_videoBuffer, x, y, x, y + 1, cl3);
if (rn == 0)
- drawLine(_videobuffer, x, y + 1, x, y + 1, cl2);
+ drawLine(_videoBuffer, x, y + 1, x, y + 1, cl2);
if (rn == 2)
- drawLine(_videobuffer, x, y, x, y, cl2);
+ drawLine(_videoBuffer, x, y, x, y, cl2);
orn = rn;
@@ -1808,21 +1808,21 @@ void GriffonEngine::updateSpells() {
// check for post damage
if (nposts > 0) {
for (int e = 0; e <= nposts - 1; e++) {
- float xdif = (xloc + 16) - (postinfo[e][0] + 8);
- float ydif = (yloc + 16) - (postinfo[e][1] + 8);
+ float xdif = (xloc + 16) - (_postInfo[e][0] + 8);
+ float ydif = (yloc + 16) - (_postInfo[e][1] + 8);
if ((abs(xdif) < 16 && abs(ydif) < 16)) {
- _objmapf[_curmap][(int)postinfo[e][0] / 16][(int)postinfo[e][1] / 16] = 1;
- _objectMap[(int)postinfo[e][0] / 16][(int)postinfo[e][1] / 16] = -1;
+ _objmapf[_curMap][(int)_postInfo[e][0] / 16][(int)_postInfo[e][1] / 16] = 1;
+ _objectMap[(int)_postInfo[e][0] / 16][(int)_postInfo[e][1] / 16] = -1;
- rcSrc.left = postinfo[e][0] / 2;
- rcSrc.top = postinfo[e][1] / 2;
+ rcSrc.left = _postInfo[e][0] / 2;
+ rcSrc.top = _postInfo[e][1] / 2;
rcSrc.setWidth(8);
rcSrc.setHeight(8);
- _clipbg2->fillRect(rcSrc, 0);
+ _clipBg2->fillRect(rcSrc, 0);
- addFloatIcon(99, postinfo[e][0], postinfo[e][1]);
+ addFloatIcon(99, _postInfo[e][0], _postInfo[e][1]);
}
}
}
@@ -1838,13 +1838,13 @@ void GriffonEngine::updateSpells() {
else if (orn == 2)
++y;
- drawLine(_videobuffer, x, y - 1, x, y + 2, cl1);
- drawLine(_videobuffer, x, y, x, y + 1, cl3);
+ drawLine(_videoBuffer, x, y - 1, x, y + 2, cl1);
+ drawLine(_videoBuffer, x, y, x, y + 1, cl3);
if (rn == 0)
- drawLine(_videobuffer, x, y + 1, x, y + 1, cl2);
+ drawLine(_videoBuffer, x, y + 1, x, y + 1, cl2);
if (rn == 2)
- drawLine(_videobuffer, x, y, x, y, cl2);
+ drawLine(_videoBuffer, x, y, x, y, cl2);
orn = rn;
@@ -1865,21 +1865,21 @@ void GriffonEngine::updateSpells() {
// check for post damage
if (nposts > 0) {
for (int e = 0; e <= nposts - 1; e++) {
- float xdif = (xloc + 16) - (postinfo[e][0] + 8);
- float ydif = (yloc + 16) - (postinfo[e][1] + 8);
+ float xdif = (xloc + 16) - (_postInfo[e][0] + 8);
+ float ydif = (yloc + 16) - (_postInfo[e][1] + 8);
if ((abs(xdif) < 16 && abs(ydif) < 16)) {
- _objmapf[_curmap][(int)postinfo[e][0] / 16][(int)postinfo[e][1] / 16] = 1;
- _objectMap[(int)postinfo[e][0] / 16][(int)postinfo[e][1] / 16] = -1;
+ _objmapf[_curMap][(int)_postInfo[e][0] / 16][(int)_postInfo[e][1] / 16] = 1;
+ _objectMap[(int)_postInfo[e][0] / 16][(int)_postInfo[e][1] / 16] = -1;
- rcSrc.left = postinfo[e][0] / 2;
- rcSrc.top = postinfo[e][1] / 2;
+ rcSrc.left = _postInfo[e][0] / 2;
+ rcSrc.top = _postInfo[e][1] / 2;
rcSrc.setWidth(8);
rcSrc.setHeight(8);
- _clipbg2->fillRect(rcSrc, 0);
+ _clipBg2->fillRect(rcSrc, 0);
- addFloatIcon(99, postinfo[e][0], postinfo[e][1]);
+ addFloatIcon(99, _postInfo[e][0], _postInfo[e][1]);
}
}
}
@@ -1895,13 +1895,13 @@ void GriffonEngine::updateSpells() {
if (orn == 2)
x = x + 1;
- drawLine(_videobuffer, x - 1, y, x + 2, y, cl1);
- drawLine(_videobuffer, x, y, x + 1, y, cl3);
+ drawLine(_videoBuffer, x - 1, y, x + 2, y, cl1);
+ drawLine(_videoBuffer, x, y, x + 1, y, cl3);
if (rn == 0)
- drawLine(_videobuffer, x + 1, y, x + 1, y, cl2);
+ drawLine(_videoBuffer, x + 1, y, x + 1, y, cl2);
if (rn == 2)
- drawLine(_videobuffer, x, y, x, y, cl2);
+ drawLine(_videoBuffer, x, y, x, y, cl2);
orn = rn;
@@ -1922,21 +1922,21 @@ void GriffonEngine::updateSpells() {
// check for post damage
if (nposts > 0) {
for (int e = 0; e <= nposts - 1; e++) {
- float xdif = (xloc + 16) - (postinfo[e][0] + 8);
- float ydif = (yloc + 16) - (postinfo[e][1] + 8);
+ float xdif = (xloc + 16) - (_postInfo[e][0] + 8);
+ float ydif = (yloc + 16) - (_postInfo[e][1] + 8);
if ((abs(xdif) < 16 && abs(ydif) < 16)) {
- _objmapf[_curmap][(int)postinfo[e][0] / 16][(int)postinfo[e][1] / 16] = 1;
- _objectMap[(int)postinfo[e][0] / 16][(int)postinfo[e][1] / 16] = -1;
+ _objmapf[_curMap][(int)_postInfo[e][0] / 16][(int)_postInfo[e][1] / 16] = 1;
+ _objectMap[(int)_postInfo[e][0] / 16][(int)_postInfo[e][1] / 16] = -1;
- rcSrc.left = postinfo[e][0] / 2;
- rcSrc.top = postinfo[e][1] / 2;
+ rcSrc.left = _postInfo[e][0] / 2;
+ rcSrc.top = _postInfo[e][1] / 2;
rcSrc.setWidth(8);
rcSrc.setHeight(8);
- _clipbg2->fillRect(rcSrc, 0);
+ _clipBg2->fillRect(rcSrc, 0);
- addFloatIcon(99, postinfo[e][0], postinfo[e][1]);
+ addFloatIcon(99, _postInfo[e][0], _postInfo[e][1]);
}
}
}
@@ -1952,13 +1952,13 @@ void GriffonEngine::updateSpells() {
if (orn == 2)
x = x + 1;
- drawLine(_videobuffer, x - 1, y, x + 2, y, cl1);
- drawLine(_videobuffer, x, y, x + 1, y, cl3);
+ drawLine(_videoBuffer, x - 1, y, x + 2, y, cl1);
+ drawLine(_videoBuffer, x, y, x + 1, y, cl3);
if (rn == 0)
- drawLine(_videobuffer, x + 1, y, x + 1, y, cl2);
+ drawLine(_videoBuffer, x + 1, y, x + 1, y, cl2);
if (rn == 2)
- drawLine(_videobuffer, x, y, x, y, cl2);
+ drawLine(_videoBuffer, x, y, x, y, cl2);
orn = rn;
@@ -1979,21 +1979,21 @@ void GriffonEngine::updateSpells() {
// check for post damage
if (nposts > 0) {
for (int e = 0; e <= nposts - 1; e++) {
- float xdif = (xloc + 16) - (postinfo[e][0] + 8);
- float ydif = (yloc + 16) - (postinfo[e][1] + 8);
+ float xdif = (xloc + 16) - (_postInfo[e][0] + 8);
+ float ydif = (yloc + 16) - (_postInfo[e][1] + 8);
if ((abs(xdif) < 16 && abs(ydif) < 16)) {
- _objmapf[_curmap][(int)postinfo[e][0] / 16][(int)postinfo[e][1] / 16] = 1;
- _objectMap[(int)postinfo[e][0] / 16][(int)postinfo[e][1] / 16] = -1;
+ _objmapf[_curMap][(int)_postInfo[e][0] / 16][(int)_postInfo[e][1] / 16] = 1;
+ _objectMap[(int)_postInfo[e][0] / 16][(int)_postInfo[e][1] / 16] = -1;
- rcSrc.left = postinfo[e][0] / 2;
- rcSrc.top = postinfo[e][1] / 2;
+ rcSrc.left = _postInfo[e][0] / 2;
+ rcSrc.top = _postInfo[e][1] / 2;
rcSrc.setWidth(8);
rcSrc.setHeight(8);
- _clipbg2->fillRect(rcSrc, 0);
+ _clipBg2->fillRect(rcSrc, 0);
- addFloatIcon(99, postinfo[e][0], postinfo[e][1]);
+ addFloatIcon(99, _postInfo[e][0], _postInfo[e][1]);
}
}
}
@@ -2003,15 +2003,15 @@ void GriffonEngine::updateSpells() {
spellinfo[i].frame -= 0.5 * _fpsr;
if (spellinfo[i].frame < 0) {
spellinfo[i].frame = 0;
- _forcepause = false;
+ _forcePause = false;
}
}
// wizard 1 lightning
if (spellnum == 9) {
- long cl1 = _videobuffer->format.RGBToColor(0, 32, 204);
- long cl2 = _videobuffer->format.RGBToColor(142, 173, 191);
- long cl3 = _videobuffer->format.RGBToColor(240, 240, 240);
+ long cl1 = _videoBuffer->format.RGBToColor(0, 32, 204);
+ long cl2 = _videoBuffer->format.RGBToColor(142, 173, 191);
+ long cl3 = _videoBuffer->format.RGBToColor(240, 240, 240);
int px = spellinfo[i].enemyx + 12;
int py = spellinfo[i].enemyy + 24;
@@ -2030,13 +2030,13 @@ void GriffonEngine::updateSpells() {
if (orn == 2)
x = x + 1;
- drawLine(_videobuffer, x - 1, y, x + 2, y, cl1);
- drawLine(_videobuffer, x, y, x + 1, y, cl3);
+ drawLine(_videoBuffer, x - 1, y, x + 2, y, cl1);
+ drawLine(_videoBuffer, x, y, x + 1, y, cl3);
if (rn == 0)
- drawLine(_videobuffer, x + 1, y, x + 1, y, cl2);
+ drawLine(_videoBuffer, x + 1, y, x + 1, y, cl2);
if (rn == 2)
- drawLine(_videobuffer, x, y, x, y, cl2);
+ drawLine(_videoBuffer, x, y, x, y, cl2);
orn = rn;
@@ -2072,7 +2072,7 @@ void GriffonEngine::updateSpells() {
}
void GriffonEngine::updateSpellsUnder() {
- if (_forcepause)
+ if (_forcePause)
return;
for (int i = 0; i < kMaxSpell; i++) {
@@ -2098,9 +2098,9 @@ void GriffonEngine::updateSpellsUnder() {
if (fra > 24)
f = 160 * (1 - (fra - 24) / 8);
- _spellimg->setAlpha(f, true);
- _spellimg->blit(*_videobuffer, rcDest.left, rcDest.top, Graphics::FLIP_NONE, &rcSrc);
- _spellimg->setAlpha(255, true);
+ _spellImg->setAlpha(f, true);
+ _spellImg->blit(*_videoBuffer, rcDest.left, rcDest.top, Graphics::FLIP_NONE, &rcSrc);
+ _spellImg->setAlpha(255, true);
spellinfo[i].frame = spellinfo[i].frame - 0.2 * _fpsr;
if (spellinfo[i].frame < 0)
@@ -2125,7 +2125,7 @@ void GriffonEngine::updateSpellsUnder() {
int sx = (newx / 2 + 6);
int sy = (newy / 2 + 10);
- unsigned int *temp = (uint32 *)_clipbg->getBasePtr(sx, sy);
+ unsigned int *temp = (uint32 *)_clipBg->getBasePtr(sx, sy);
unsigned int dq = *temp;
if (dq == 0) {
@@ -2138,7 +2138,7 @@ void GriffonEngine::updateSpellsUnder() {
sx = (newx / 2 + 6);
sy = (_npcinfo[f].y / 2 + 10);
- temp = (uint32 *)_clipbg->getBasePtr(sx, sy);
+ temp = (uint32 *)_clipBg->getBasePtr(sx, sy);
dq = *temp;
if (dq == 0)
@@ -2147,7 +2147,7 @@ void GriffonEngine::updateSpellsUnder() {
sx = (_npcinfo[f].x / 2 + 6);
sy = (newy / 2 + 10);
- temp = (uint32 *)_clipbg->getBasePtr(sx, sy);
+ temp = (uint32 *)_clipBg->getBasePtr(sx, sy);
dq = *temp;
if (dq == 0)
@@ -2187,7 +2187,7 @@ void GriffonEngine::updateSpellsUnder() {
for (int f = 0; f <= 4; f++) {
for (int x = 0; x <= fra; x += 2) {
if (spellinfo[i].legalive[f] >= x) {
- _spellimg->setAlpha(192 * sin(3.14159 * x / 32) * s / 8, true);
+ _spellImg->setAlpha(192 * sin(3.14159 * x / 32) * s / 8, true);
float an = 360 / 5 * f + x / 32 * 180;
@@ -2202,12 +2202,12 @@ void GriffonEngine::updateSpellsUnder() {
rcDest.top = (int)yloc;
if (xloc > -1 && xloc < 304 && yloc > -1 && yloc < 224) {
- _spellimg->blit(*_videobuffer, rcDest.left, rcDest.top, Graphics::FLIP_NONE, &rcSrc);
+ _spellImg->blit(*_videoBuffer, rcDest.left, rcDest.top, Graphics::FLIP_NONE, &rcSrc);
int sx = (xloc / 2 + 4);
int sy = (yloc / 2 + 8);
- unsigned int *temp = (uint32 *)_clipbg->getBasePtr(sx, sy);
+ unsigned int *temp = (uint32 *)_clipBg->getBasePtr(sx, sy);
unsigned int dq = *temp;
if (dq > 1000 && x > 4)
@@ -2257,26 +2257,26 @@ void GriffonEngine::updateSpellsUnder() {
// check for post damage
if (nposts > 0) {
for (int e = 0; e <= nposts - 1; e++) {
- float xdif = (xloc + 8) - (postinfo[e][0] + 8);
- float ydif = (yloc + 8) - (postinfo[e][1] + 8);
+ float xdif = (xloc + 8) - (_postInfo[e][0] + 8);
+ float ydif = (yloc + 8) - (_postInfo[e][1] + 8);
if ((abs(xdif) < 8 && abs(ydif) < 8)) {
- _objmapf[_curmap][(int)postinfo[e][0] / 16][(int)postinfo[e][1] / 16] = 1;
- _objectMap[(int)postinfo[e][0] / 16][(int)postinfo[e][1] / 16] = -1;
+ _objmapf[_curMap][(int)_postInfo[e][0] / 16][(int)_postInfo[e][1] / 16] = 1;
+ _objectMap[(int)_postInfo[e][0] / 16][(int)_postInfo[e][1] / 16] = -1;
- rcSrc.left = postinfo[e][0] / 2;
- rcSrc.top = postinfo[e][1] / 2;
+ rcSrc.left = _postInfo[e][0] / 2;
+ rcSrc.top = _postInfo[e][1] / 2;
rcSrc.setWidth(8);
rcSrc.setHeight(8);
- _clipbg2->fillRect(rcSrc, 0);
+ _clipBg2->fillRect(rcSrc, 0);
if (config.effects) {
int snd = playSound(_sfx[kSndFire]);
setChannelVolume(snd, config.effectsvol);
}
- addFloatIcon(99, postinfo[e][0], postinfo[e][1]);
+ addFloatIcon(99, _postInfo[e][0], _postInfo[e][1]);
}
}
}
@@ -2285,7 +2285,7 @@ void GriffonEngine::updateSpellsUnder() {
}
}
- _spellimg->setAlpha(255, true);
+ _spellImg->setAlpha(255, true);
spellinfo[i].frame = spellinfo[i].frame - 0.2 * _fpsr;
if (spellinfo[i].frame < 0)
@@ -2313,7 +2313,7 @@ void GriffonEngine::updateSpellsUnder() {
float yy = 16 * sin(3.141592 / 2 * xx / 16) - 8;
alpha = CLIP(alpha, 0, 255);
- _spellimg->setAlpha(alpha, true);
+ _spellImg->setAlpha(alpha, true);
rcSrc.left = 16 * (int)(RND() * 2);
rcSrc.top = 80;
@@ -2327,7 +2327,7 @@ void GriffonEngine::updateSpellsUnder() {
rcDest.top = yloc;
if (xloc > -16 && xloc < 320 && yloc > -16 && yloc < 240) {
- _spellimg->blit(*_videobuffer, rcDest.left, rcDest.top, Graphics::FLIP_NONE, &rcSrc);
+ _spellImg->blit(*_videoBuffer, rcDest.left, rcDest.top, Graphics::FLIP_NONE, &rcSrc);
if (spellinfo[i].damagewho == 1) {
float xdif = (xloc + 8) - (_player.px + 12);
@@ -2351,7 +2351,7 @@ void GriffonEngine::updateSpellsUnder() {
}
- _spellimg->setAlpha(255, true);
+ _spellImg->setAlpha(255, true);
spellinfo[i].frame = spellinfo[i].frame - 0.5 * _fpsr;
if (spellinfo[i].frame < 0)
spellinfo[i].frame = 0;
diff --git a/engines/griffon/resources.cpp b/engines/griffon/resources.cpp
index 0c8b7045e5..e881845d1a 100644
--- a/engines/griffon/resources.cpp
+++ b/engines/griffon/resources.cpp
@@ -59,41 +59,41 @@ void GriffonEngine::initialize() {
_video = new Graphics::TransparentSurface;
_video->create(320, 240, g_system->getScreenFormat());
- _videobuffer = new Graphics::TransparentSurface;
- _videobuffer->create(320, 240, g_system->getScreenFormat());
- _videobuffer2 = new Graphics::TransparentSurface;
- _videobuffer2->create(320, 240, g_system->getScreenFormat());
- _videobuffer3 = new Graphics::TransparentSurface;
- _videobuffer3->create(320, 240, g_system->getScreenFormat());
- _mapbg = new Graphics::TransparentSurface;
- _mapbg->create(320, 240, g_system->getScreenFormat());
- _clipbg = new Graphics::TransparentSurface;
- _clipbg->create(320, 240, g_system->getScreenFormat());
- _clipbg2 = new Graphics::TransparentSurface;
- _clipbg2->create(320, 240, g_system->getScreenFormat());
+ _videoBuffer = new Graphics::TransparentSurface;
+ _videoBuffer->create(320, 240, g_system->getScreenFormat());
+ _videoBuffer2 = new Graphics::TransparentSurface;
+ _videoBuffer2->create(320, 240, g_system->getScreenFormat());
+ _videoBuffer3 = new Graphics::TransparentSurface;
+ _videoBuffer3->create(320, 240, g_system->getScreenFormat());
+ _mapBg = new Graphics::TransparentSurface;
+ _mapBg->create(320, 240, g_system->getScreenFormat());
+ _clipBg = new Graphics::TransparentSurface;
+ _clipBg->create(320, 240, g_system->getScreenFormat());
+ _clipBg2 = new Graphics::TransparentSurface;
+ _clipBg2->create(320, 240, g_system->getScreenFormat());
for (int i = 0; i <= 3; i++) {
char name[128];
sprintf(name, "art/map%i.bmp", i + 1);
- mapimg[i] = loadImage(name, true);
+ mapImg[i] = loadImage(name, true);
}
cloudimg = loadImage("art/clouds.bmp", true);
cloudimg->setAlpha(96, true);
- saveloadimg = loadImage("art/saveloadnew.bmp", true);
- saveloadimg->setAlpha(160, true);
+ _saveLoadImg = loadImage("art/saveloadnew.bmp", true);
+ _saveLoadImg->setAlpha(160, true);
- _titleimg = loadImage("art/titleb.bmp");
- _titleimg2 = loadImage("art/titlea.bmp", true);
+ _titleImg = loadImage("art/titleb.bmp");
+ _titleImg2 = loadImage("art/titlea.bmp", true);
//_titleimg2->setAlpha(204, true);
- _inventoryimg = loadImage("art/inventory.bmp", true);
+ _inventoryImg = loadImage("art/inventory.bmp", true);
- _logosimg = loadImage("art/logos.bmp");
- _theendimg = loadImage("art/theend.bmp");
+ _logosImg = loadImage("art/logos.bmp");
+ _theEndImg = loadImage("art/theend.bmp");
loadTiles();
@@ -104,7 +104,7 @@ void GriffonEngine::initialize() {
loadItemImgs();
_fpsr = 1.0f;
- _nextticks = _ticks + 1000;
+ _nextTicks = _ticks + 1000;
for (int i = 0; i <= 15; i++) {
_playerattackofs[0][i][0] = 0; // -1// -(i + 1)
@@ -148,16 +148,16 @@ Graphics::TransparentSurface *GriffonEngine::loadImage(const char *name, bool co
void GriffonEngine::loadMap(int mapnum) {
debug(2, "Loaded map %d", mapnum);
- unsigned int ccc = _clipbg->format.RGBToColor(255, 255, 255);
+ unsigned int ccc = _clipBg->format.RGBToColor(255, 255, 255);
- _curmap = mapnum;
+ _curMap = mapnum;
Common::Rect trect(320, 240);
- _mapbg->fillRect(trect, 0);
- _clipbg->fillRect(trect, ccc);
- _clipbg2->fillRect(trect, ccc);
+ _mapBg->fillRect(trect, 0);
+ _clipBg->fillRect(trect, ccc);
+ _clipBg2->fillRect(trect, ccc);
- _forcepause = false;
+ _forcePause = false;
_cloudsOn = false;
if (mapnum < 6)
_cloudsOn = true;
@@ -181,19 +181,19 @@ void GriffonEngine::loadMap(int mapnum) {
_cloudsOn = true;
// -----------special case
- dontdrawover = 0;
+ _dontDrawOver = false;
if (mapnum == 24)
- dontdrawover = 1;
+ _dontDrawOver = true;
- if ((mapnum == 53 || mapnum == 57 || mapnum == 61 || mapnum == 65 || mapnum == 62) && _scriptflag[kScriptLever][0] > 0)
+ if ((mapnum == 53 || mapnum == 57 || mapnum == 61 || mapnum == 65 || mapnum == 62) && _scriptFlag[kScriptLever][0] > 0)
mapnum = mapnum + 100;
- if ((mapnum == 161 || mapnum == 162) && _scriptflag[kScriptLever][0] == 2)
+ if ((mapnum == 161 || mapnum == 162) && _scriptFlag[kScriptLever][0] == 2)
mapnum = mapnum + 100;
for (int i = 0; i < kMaxSpell; i++)
spellinfo[i].frame = 0;
- _roomlock = false;
+ _roomLock = false;
char name[256];
// read *.map file
@@ -242,7 +242,7 @@ void GriffonEngine::loadMap(int mapnum) {
for (int y = 0; y <= 23; y++) {
for (int x = 0; x <= 39; x++)
- _rampdata[x][y] = tempmap[3 * 40 + x][y + 40];
+ _rampData[x][y] = tempmap[3 * 40 + x][y + 40];
}
for (int y = 0; y <= 23; y++) {
@@ -254,7 +254,7 @@ void GriffonEngine::loadMap(int mapnum) {
}
}
- if (_scriptflag[kScriptFindShield][0] == 1 && _curmap == 4) {
+ if (_scriptFlag[kScriptFindShield][0] == 1 && _curMap == 4) {
_triggerloc[9][7] = 5004;
tempmap[9][7] = 41;
tempmap[9][7 + 40] = 0;
@@ -307,7 +307,7 @@ void GriffonEngine::loadMap(int mapnum) {
}
}
- _tiles[curtilel]->blit(*_mapbg, rcDest.left, rcDest.top, Graphics::FLIP_NONE, &rcSrc);
+ _tiles[curtilel]->blit(*_mapBg, rcDest.left, rcDest.top, Graphics::FLIP_NONE, &rcSrc);
_tiles[curtilel]->setAlpha(255, true);
rcDest.left = x * 8;
@@ -315,7 +315,7 @@ void GriffonEngine::loadMap(int mapnum) {
rcDest.setWidth(8);
rcDest.setHeight(8);
- _clipbg->fillRect(rcDest, 0);
+ _clipBg->fillRect(rcDest, 0);
}
}
}
@@ -325,7 +325,7 @@ void GriffonEngine::loadMap(int mapnum) {
for (int y = 0; y <= 23; y++) {
int d = tempmap[3 * 40 + x][y];
- if (_scriptflag[kScriptFindShield][0] == 1 && x == 9 && y == 7)
+ if (_scriptFlag[kScriptFindShield][0] == 1 && x == 9 && y == 7)
d = 99;
if (d > 0) {
@@ -348,37 +348,37 @@ void GriffonEngine::loadMap(int mapnum) {
if (d == 1) {
for (int i = 0; i <= 7; i++) {
- drawLine(_clipbg, x1, y1 + i, x1 + 7 - i, y1 + i, ccc);
+ drawLine(_clipBg, x1, y1 + i, x1 + 7 - i, y1 + i, ccc);
}
} else if (d == 2) {
- drawLine(_clipbg, x1, y1, x1 + 7, y1, ccc);
- drawLine(_clipbg, x1, y1 + 1, x1 + 7, y1 + 1, ccc);
+ drawLine(_clipBg, x1, y1, x1 + 7, y1, ccc);
+ drawLine(_clipBg, x1, y1 + 1, x1 + 7, y1 + 1, ccc);
} else if (d == 3) {
for (int i = 0; i <= 7; i++) {
- drawLine(_clipbg, x1 + i, y1 + i, x1 + 7, y1 + i, ccc);
+ drawLine(_clipBg, x1 + i, y1 + i, x1 + 7, y1 + i, ccc);
}
} else if (d == 4) {
- drawLine(_clipbg, x1, y1, x1, y1 + 7, ccc);
- drawLine(_clipbg, x1 + 1, y1, x1 + 1, y1 + 7, ccc);
+ drawLine(_clipBg, x1, y1, x1, y1 + 7, ccc);
+ drawLine(_clipBg, x1 + 1, y1, x1 + 1, y1 + 7, ccc);
} else if (d == 5) {
rcDest.left = x1;
rcDest.top = y1;
rcDest.setWidth(8);
rcDest.setHeight(8);
- _clipbg->fillRect(rcDest, ccc);
+ _clipBg->fillRect(rcDest, ccc);
} else if (d == 6) {
- drawLine(_clipbg, x1 + 7, y1, x1 + 7, y1 + 7, ccc);
- drawLine(_clipbg, x1 + 6, y1, x1 + 6, y1 + 7, ccc);
+ drawLine(_clipBg, x1 + 7, y1, x1 + 7, y1 + 7, ccc);
+ drawLine(_clipBg, x1 + 6, y1, x1 + 6, y1 + 7, ccc);
} else if (d == 7) {
for (int i = 0; i <= 7; i++) {
- drawLine(_clipbg, x1, y1 + i, x1 + i, y1 + i, ccc);
+ drawLine(_clipBg, x1, y1 + i, x1 + i, y1 + i, ccc);
}
} else if (d == 8) {
- drawLine(_clipbg, x1, y1 + 7, x1 + 7, y1 + 7, ccc);
- drawLine(_clipbg, x1, y1 + 7, x1 + 6, y1 + 6, ccc);
+ drawLine(_clipBg, x1, y1 + 7, x1 + 7, y1 + 7, ccc);
+ drawLine(_clipBg, x1, y1 + 7, x1 + 6, y1 + 6, ccc);
} else if (d == 9) {
for (int i = 0; i <= 7; i++) {
- drawLine(_clipbg, x1 + 7 - i, y1 + i, x1 + 7, y1 + i, ccc);
+ drawLine(_clipBg, x1 + 7 - i, y1 + i, x1 + 7, y1 + i, ccc);
}
}
}
@@ -412,7 +412,7 @@ void GriffonEngine::loadMap(int mapnum) {
int o = tempmap[5 * 40 + x][y];
- if (_objmapf[_curmap][x][y] == 0) {
+ if (_objmapf[_curMap][x][y] == 0) {
_objectMap[x][y] = o;
if (_objectInfo[o][0] > 1) {
@@ -429,9 +429,9 @@ void GriffonEngine::loadMap(int mapnum) {
rcDest.setHeight(8);
if (_objectInfo[o][4] == 1)
- _clipbg->fillRect(rcDest, ccc);
+ _clipBg->fillRect(rcDest, ccc);
if (_objectInfo[o][4] == 3)
- _clipbg->fillRect(rcDest, ccc);
+ _clipBg->fillRect(rcDest, ccc);
}
}
if (npc == 1) {
@@ -450,21 +450,21 @@ void GriffonEngine::loadMap(int mapnum) {
}
- if (_curmap == 62 && _scriptflag[kScriptGardenMasterKey][0] > 0)
+ if (_curMap == 62 && _scriptFlag[kScriptGardenMasterKey][0] > 0)
_lastnpc = 0;
- if (_curmap == 73 && _scriptflag[kScriptArmourChest][0] > 0)
+ if (_curMap == 73 && _scriptFlag[kScriptArmourChest][0] > 0)
_lastnpc = 0;
- if (_curmap == 81 && _scriptflag[kScriptCitadelMasterKey][0] > 0)
+ if (_curMap == 81 && _scriptFlag[kScriptCitadelMasterKey][0] > 0)
_lastnpc = 0;
- if (_curmap == 73 && _scriptflag[kScriptArmourChest][0] == 0)
- _roomlock = true;
- if (_curmap == 81 && _scriptflag[kScriptCitadelMasterKey][0] == 0)
- _roomlock = true;
- if (_curmap == 83 && _scriptflag[kScriptGetSword3][0] == 0)
- _roomlock = true;
- if (_curmap == 82)
- _roomlock = true;
+ if (_curMap == 73 && _scriptFlag[kScriptArmourChest][0] == 0)
+ _roomLock = true;
+ if (_curMap == 81 && _scriptFlag[kScriptCitadelMasterKey][0] == 0)
+ _roomLock = true;
+ if (_curMap == 83 && _scriptFlag[kScriptGetSword3][0] == 0)
+ _roomLock = true;
+ if (_curMap == 82)
+ _roomLock = true;
// read *.npc file
sprintf(name, "mapdb/%04i.npc", mapnum);
@@ -699,33 +699,33 @@ void GriffonEngine::loadMap(int mapnum) {
}
if (_npcinfo[i].script == kScriptMasterKey) {
- _roomlock = true;
- if (_scriptflag[kScriptMasterKey][0] > 0) {
- _roomlock = false;
+ _roomLock = true;
+ if (_scriptFlag[kScriptMasterKey][0] > 0) {
+ _roomLock = false;
_npcinfo[i].hp = 0;
}
}
if (_npcinfo[i].script == kScriptFindCrystal) {
- _roomlock = true;
- if (_scriptflag[kScriptFindCrystal][0] > 0) {
- _roomlock = false;
+ _roomLock = true;
+ if (_scriptFlag[kScriptFindCrystal][0] > 0) {
+ _roomLock = false;
_npcinfo[i].hp = 0;
}
}
if (_npcinfo[i].script == kScriptFindSword) {
- _roomlock = true;
- if (_scriptflag[kScriptFindSword][0] > 0) {
- _roomlock = false;
+ _roomLock = true;
+ if (_scriptFlag[kScriptFindSword][0] > 0) {
+ _roomLock = false;
_npcinfo[i].hp = 0;
}
}
if (_npcinfo[i].script == kScriptGetSword3) {
- _roomlock = true;
- if (_scriptflag[kScriptGetSword3][0] > 0) {
- _roomlock = false;
+ _roomLock = true;
+ if (_scriptFlag[kScriptGetSword3][0] > 0) {
+ _roomLock = false;
_npcinfo[i].hp = 0;
}
}
@@ -739,7 +739,7 @@ void GriffonEngine::loadMap(int mapnum) {
int cx, cy, npx, npy, lx, ly;
// academy master key
- if (_curmap == 34 && _scriptflag[kScriptMasterKey][0] == 1) {
+ if (_curMap == 34 && _scriptFlag[kScriptMasterKey][0] == 1) {
cx = 9;
cy = 7;
@@ -759,11 +759,11 @@ void GriffonEngine::loadMap(int mapnum) {
if (lx == cx && ly == cy)
_player.py = _player.py + 16;
- _clipbg->fillRect(rcDest, ccc);
+ _clipBg->fillRect(rcDest, ccc);
}
// academy crystal
- if (_curmap == 24 && !_player.foundSpell[0] && _scriptflag[kScriptFindCrystal][0] == 1) {
+ if (_curMap == 24 && !_player.foundSpell[0] && _scriptFlag[kScriptFindCrystal][0] == 1) {
cx = 9;
cy = 7;
@@ -783,11 +783,11 @@ void GriffonEngine::loadMap(int mapnum) {
if (lx == cx && ly == cy)
_player.py = _player.py + 16;
- _clipbg->fillRect(rcDest, ccc);
+ _clipBg->fillRect(rcDest, ccc);
}
// gardens master key
- if (_curmap == 62 && _scriptflag[kScriptGardenMasterKey][0] == 1) {
+ if (_curMap == 62 && _scriptFlag[kScriptGardenMasterKey][0] == 1) {
cx = 13;
cy = 7;
@@ -807,11 +807,11 @@ void GriffonEngine::loadMap(int mapnum) {
if (lx == cx && ly == cy)
_player.py = _player.py + 16;
- _clipbg->fillRect(rcDest, ccc);
+ _clipBg->fillRect(rcDest, ccc);
}
// gardens fidelis sword
- if (_curmap == 66 && _scriptflag[kScriptFindSword][0] == 1 && _player.sword == 1) {
+ if (_curMap == 66 && _scriptFlag[kScriptFindSword][0] == 1 && _player.sword == 1) {
cx = 9;
cy = 6;
@@ -831,11 +831,11 @@ void GriffonEngine::loadMap(int mapnum) {
if (lx == cx && ly == cy)
_player.py = _player.py + 16;
- _clipbg->fillRect(rcDest, ccc);
+ _clipBg->fillRect(rcDest, ccc);
}
// citadel armour
- if (_curmap == 73 && _scriptflag[kScriptArmourChest][0] == 1 && _player.armour == 1) {
+ if (_curMap == 73 && _scriptFlag[kScriptArmourChest][0] == 1 && _player.armour == 1) {
cx = 8;
cy = 7;
@@ -855,11 +855,11 @@ void GriffonEngine::loadMap(int mapnum) {
if (lx == cx && ly == cy)
_player.py = _player.py + 16;
- _clipbg->fillRect(rcDest, ccc);
+ _clipBg->fillRect(rcDest, ccc);
}
// citadel master key
- if (_curmap == 81 && _scriptflag[kScriptCitadelMasterKey][0] == 1) {
+ if (_curMap == 81 && _scriptFlag[kScriptCitadelMasterKey][0] == 1) {
cx = 11;
cy = 10;
@@ -879,12 +879,12 @@ void GriffonEngine::loadMap(int mapnum) {
if (lx == cx && ly == cy)
_player.py = _player.py + 16;
- _clipbg->fillRect(rcDest, ccc);
+ _clipBg->fillRect(rcDest, ccc);
}
// max ups
- if (_curmap == 83 && _scriptflag[kScriptGetSword3][0] == 1 && _player.sword < 3) {
+ if (_curMap == 83 && _scriptFlag[kScriptGetSword3][0] == 1 && _player.sword < 3) {
cx = 6;
cy = 8;
@@ -904,10 +904,10 @@ void GriffonEngine::loadMap(int mapnum) {
if (lx == cx && ly == cy)
_player.py = _player.py + 16;
- _clipbg->fillRect(rcDest, ccc);
+ _clipBg->fillRect(rcDest, ccc);
}
- if (_curmap == 83 && _scriptflag[kScriptShield3][0] == 1 && _player.shield < 3) {
+ if (_curMap == 83 && _scriptFlag[kScriptShield3][0] == 1 && _player.shield < 3) {
cx = 9;
cy = 8;
@@ -927,10 +927,10 @@ void GriffonEngine::loadMap(int mapnum) {
if (lx == cx && ly == cy)
_player.py = _player.py + 16;
- _clipbg->fillRect(rcDest, ccc);
+ _clipBg->fillRect(rcDest, ccc);
}
- if (_curmap == 83 && _scriptflag[kScriptArmour3][0] == 1 && _player.armour < 3) {
+ if (_curMap == 83 && _scriptFlag[kScriptArmour3][0] == 1 && _player.armour < 3) {
cx = 12;
cy = 8;
@@ -950,20 +950,20 @@ void GriffonEngine::loadMap(int mapnum) {
if (lx == cx && ly == cy)
_player.py = _player.py + 16;
- _clipbg->fillRect(rcDest, ccc);
+ _clipBg->fillRect(rcDest, ccc);
}
- _clipbg2->copyRectToSurface(_clipbg->getPixels(), _clipbg->pitch, 0, 0, _clipbg->w, _clipbg->h);
+ _clipBg2->copyRectToSurface(_clipBg->getPixels(), _clipBg->pitch, 0, 0, _clipBg->w, _clipBg->h);
}
void GriffonEngine::loadAnims() {
- _spellimg = loadImage("art/spells.bmp", true);
+ _spellImg = loadImage("art/spells.bmp", true);
_anims[0] = loadImage("art/anims0.bmp", true);
- _animsa[0] = loadImage("art/anims0a.bmp", true);
+ _animsAttack[0] = loadImage("art/anims0a.bmp", true);
_anims[13] = loadImage("art/anims0x.bmp", true);
- _animsa[13] = loadImage("art/anims0xa.bmp", true);
+ _animsAttack[13] = loadImage("art/anims0xa.bmp", true);
_anims[1] = loadImage("art/anims1.bmp", true);
- _animsa[1] = loadImage("art/anims1a.bmp", true);
+ _animsAttack[1] = loadImage("art/anims1a.bmp", true);
_anims[2] = loadImage("art/anims2.bmp", true);
// huge
@@ -1061,9 +1061,9 @@ void GriffonEngine::loadAnims() {
_anims[7] = loadImage("art/anims7.bmp", true);
_anims[8] = loadImage("art/anims8.bmp", true);
_anims[10] = loadImage("art/anims10.bmp", true);
- _animsa[10] = loadImage("art/anims10a.bmp", true);
+ _animsAttack[10] = loadImage("art/anims10a.bmp", true);
_anims[11] = loadImage("art/anims11.bmp", true);
- _animsa[11] = loadImage("art/anims11a.bmp", true);
+ _animsAttack[11] = loadImage("art/anims11a.bmp", true);
_anims[12] = loadImage("art/anims12.bmp", true);
}
@@ -1071,15 +1071,15 @@ void GriffonEngine::loadItemImgs() {
Graphics::TransparentSurface *temp = loadImage("art/icons.bmp", true);
for (int i = 0; i <= 20; i++) {
- _itemimg[i] = new Graphics::TransparentSurface;
- _itemimg[i]->create(16, 16, g_system->getScreenFormat());
+ _itemImg[i] = new Graphics::TransparentSurface;
+ _itemImg[i]->create(16, 16, g_system->getScreenFormat());
rcSrc.left = i * 16;
rcSrc.top = 0;
rcSrc.setWidth(16);
rcSrc.setHeight(16);
- temp->blit(*_itemimg[i], 0, 0, Graphics::FLIP_NONE, &rcSrc);
+ temp->blit(*_itemImg[i], 0, 0, Graphics::FLIP_NONE, &rcSrc);
}
temp->free();
@@ -1092,8 +1092,8 @@ void GriffonEngine::loadFont() {
for (int f = 0; f <= 4; f++) {
int i2 = i - 32;
- _fontchr[i2][f] = new Graphics::TransparentSurface;
- _fontchr[i2][f]->create(8, 8, g_system->getScreenFormat());
+ _fontChr[i2][f] = new Graphics::TransparentSurface;
+ _fontChr[i2][f]->create(8, 8, g_system->getScreenFormat());
int col = i2 % 40;
@@ -1106,7 +1106,7 @@ void GriffonEngine::loadFont() {
rcDest.left = 0;
rcDest.top = 0;
- font->blit(*_fontchr[i2][f], rcDest.left, rcDest.top, Graphics::FLIP_NONE, &rcSrc);
+ font->blit(*_fontChr[i2][f], rcDest.left, rcDest.top, Graphics::FLIP_NONE, &rcSrc);
}
font->free();
@@ -1118,7 +1118,7 @@ void GriffonEngine::loadTiles() {
_tiles[2] = loadImage("art/tx2.bmp", true);
_tiles[3] = loadImage("art/tx3.bmp", true);
- _windowimg = loadImage("art/window.bmp", true);
+ _windowImg = loadImage("art/window.bmp", true);
}
void GriffonEngine::loadTriggers() {
diff --git a/engines/griffon/saveload.cpp b/engines/griffon/saveload.cpp
index 972d1b0eaf..aab7bcb14a 100644
--- a/engines/griffon/saveload.cpp
+++ b/engines/griffon/saveload.cpp
@@ -69,7 +69,7 @@ int GriffonEngine::loadState(int slotnum) {
if (_player.level > 0) {
char temp[256];
- INPUT("%i", &_secstart);
+ INPUT("%i", &_secStart);
INPUT("%s", temp);
INPUT("%f", &_player.px);
@@ -103,10 +103,10 @@ int GriffonEngine::loadState(int slotnum) {
INPUT("%i", &_player.nextLevel);
for (int a = 0; a <= 99; a++) {
for (int b = 0; b <= 9; b++) {
- INPUT("%i", &_scriptflag[a][b]);
+ INPUT("%i", &_scriptFlag[a][b]);
}
}
- INPUT("%i", &_curmap);
+ INPUT("%i", &_curMap);
for (int a = 0; a <= 999; a++) {
for (int b = 0; b <= 20; b++) {
@@ -194,7 +194,7 @@ int GriffonEngine::saveState(int slotnum) {
PRINT("%i", _player.level);
if (_player.level > 0) {
- PRINT("%i", (_secstart + _secsingame));
+ PRINT("%i", (_secStart + _secsingame));
PRINT("%s", "a");
PRINT("%f", _player.px);
@@ -228,10 +228,10 @@ int GriffonEngine::saveState(int slotnum) {
PRINT("%i", _player.nextLevel);
for (int a = 0; a <= 99; a++) {
for (int b = 0; b <= 9; b++) {
- PRINT("%i", _scriptflag[a][b]);
+ PRINT("%i", _scriptFlag[a][b]);
}
}
- PRINT("%i", _curmap);
+ PRINT("%i", _curMap);
for (int a = 0; a <= 999; a++) {
for (int b = 0; b <= 20; b++) {
diff --git a/engines/griffon/sound.cpp b/engines/griffon/sound.cpp
index c2de94d619..2e79320e39 100644
--- a/engines/griffon/sound.cpp
+++ b/engines/griffon/sound.cpp
@@ -121,7 +121,7 @@ void GriffonEngine::setupAudio() {
//atexit(Mix_CloseAudio);
const char *stri = "Loading...";
- drawString(_videobuffer, stri, 160 - 4 * strlen(stri), 116, 0);
+ drawString(_videoBuffer, stri, 160 - 4 * strlen(stri), 116, 0);
Graphics::TransparentSurface *loadimg = loadImage("art/load.bmp", true);
@@ -134,9 +134,9 @@ void GriffonEngine::setupAudio() {
rcDest.top = 116 + 12;
loadimg->setAlpha(160, true); // 128
- loadimg->blit(*_videobuffer, rcDest.left, rcDest.top, Graphics::FLIP_NONE, &rcSrc);
+ loadimg->blit(*_videoBuffer, rcDest.left, rcDest.top, Graphics::FLIP_NONE, &rcSrc);
- g_system->copyRectToScreen(_videobuffer->getPixels(), _videobuffer->pitch, 0, 0, _videobuffer->w, _videobuffer->h);
+ g_system->copyRectToScreen(_videoBuffer->getPixels(), _videoBuffer->pitch, 0, 0, _videoBuffer->w, _videoBuffer->h);
g_system->updateScreen();
rcDest.left = 160 - 44 + 7;
@@ -198,7 +198,7 @@ void GriffonEngine::updateMusic() {
// if(_curmap > 5 && _curmap < 42) iplaysound = macademy;
// if(_curmap > 47) iplaysound = _mgardens;
iplaysound = _mgardens;
- if (_roomlock)
+ if (_roomLock)
iplaysound = _mboss;
if (iplaysound == _mboss && _playingBoss)