aboutsummaryrefslogtreecommitdiff
path: root/engines/cge/snail.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2011-06-27 19:03:50 +1000
committerPaul Gilbert2011-06-27 19:03:50 +1000
commitaf00b91111d4cbf6660879e924e06d542b8ebc3b (patch)
treed282254bcb9feb9aaff40a18f43bdf68d136f808 /engines/cge/snail.cpp
parente13317baeab99f4868d49a89e110deda1d5ca5f4 (diff)
parent083d6ff6122cb2faf0a4330eb480bb9f77afa255 (diff)
downloadscummvm-rg350-af00b91111d4cbf6660879e924e06d542b8ebc3b.tar.gz
scummvm-rg350-af00b91111d4cbf6660879e924e06d542b8ebc3b.tar.bz2
scummvm-rg350-af00b91111d4cbf6660879e924e06d542b8ebc3b.zip
Merge branch 'soltys_wip2' of github.com:Strangerke/scummvm into cge
Conflicts: engines/cge/cge_main.cpp engines/cge/general.cpp engines/cge/snail.cpp engines/cge/vga13h.cpp
Diffstat (limited to 'engines/cge/snail.cpp')
-rw-r--r--engines/cge/snail.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/engines/cge/snail.cpp b/engines/cge/snail.cpp
index a07cf9d09b..24ed08c140 100644
--- a/engines/cge/snail.cpp
+++ b/engines/cge/snail.cpp
@@ -287,7 +287,7 @@ void ContractSprite(SPRITE *spr) {
}
int FindPocket(SPRITE *spr) {
- for (int i = 0; i < POCKET_NX; i ++)
+ for (int i = 0; i < POCKET_NX; i++)
if (Pocket[i] == spr)
return i;
return -1;
@@ -345,7 +345,7 @@ void FeedSnail(SPRITE *spr, SNLIST snq) {
if (FindPocket(NULL) < 0) { // no empty pockets?
SNAIL::COM *p;
- for (p = c; p->Com != SNNEXT; p ++) { // find KEEP command
+ for (p = c; p->Com != SNNEXT; p++) { // find KEEP command
if (p->Com == SNKEEP) {
PocFul();
return;
@@ -423,10 +423,10 @@ const char *SNAIL::ComTxt[] = {
};
-SNAIL::SNAIL(bool turbo)
+SNAIL::SNAIL(CGEEngine *vm, bool turbo)
: Turbo(turbo), Busy(false), TextDelay(false),
Pause(0), TalkEnable(true),
- Head(0), Tail(0), SNList(farnew(COM, 256)) {
+ Head(0), Tail(0), SNList(farnew(COM, 256)), _vm(vm) {
}
@@ -438,7 +438,7 @@ SNAIL::~SNAIL(void) {
void SNAIL::AddCom(SNCOM com, int ref, int val, void *ptr) {
_disable();
- COM *snc = &SNList[Head ++];
+ COM *snc = &SNList[Head++];
snc->Com = com;
snc->Ref = ref;
snc->Val = val;
@@ -849,7 +849,7 @@ void SNFlash(bool on) {
DAC *pal = farnew(DAC, PAL_CNT);
if (pal) {
memcpy(pal, VGA::SysPal, PAL_SIZ);
- for (int i = 0; i < PAL_CNT; i ++) {
+ for (int i = 0; i < PAL_CNT; i++) {
register int c;
c = pal[i].R << 1;
pal[i].R = (c < 64) ? c : 63;
@@ -906,7 +906,6 @@ static void SNMouse(bool on) {
void SNAIL::RunCom(void) {
static int count = 1;
-// extern void SwitchCave(int);
if (! Busy) {
Busy = true;
uint8 tmphea = Head;
@@ -954,13 +953,13 @@ void SNAIL::RunCom(void) {
if (sprel && TalkEnable) {
if (sprel == Hero && sprel->SeqTest(-1))
sprel->Step(HTALK);
- Say(Text->getText(snc->Val), sprel);
+ Text->Say(Text->getText(snc->Val), sprel);
Sys->FunDel = HEROFUN0;
}
break;
case SNINF :
if (TalkEnable) {
- Inf(Text->getText(snc->Val));
+ _vm->Inf(Text->getText(snc->Val));
Sys->FunDel = HEROFUN0;
}
break;