aboutsummaryrefslogtreecommitdiff
path: root/engines/simon
diff options
context:
space:
mode:
authorTravis Howell2006-03-22 13:54:26 +0000
committerTravis Howell2006-03-22 13:54:26 +0000
commit3110c11ea1295dd8d913193f5952b7a1034cfe69 (patch)
tree75f9d2514b7aba80d679a9017c039ee6374075bd /engines/simon
parent6227f38cba05d89178be16c92c5f7adc0df53504 (diff)
downloadscummvm-rg350-3110c11ea1295dd8d913193f5952b7a1034cfe69.tar.gz
scummvm-rg350-3110c11ea1295dd8d913193f5952b7a1034cfe69.tar.bz2
scummvm-rg350-3110c11ea1295dd8d913193f5952b7a1034cfe69.zip
Rename draw buffers correctly
svn-id: r21406
Diffstat (limited to 'engines/simon')
-rw-r--r--engines/simon/charset.cpp2
-rw-r--r--engines/simon/icons.cpp2
-rw-r--r--engines/simon/simon.cpp14
-rw-r--r--engines/simon/simon.h2
-rw-r--r--engines/simon/vga.cpp14
-rw-r--r--engines/simon/vga.h2
6 files changed, 18 insertions, 18 deletions
diff --git a/engines/simon/charset.cpp b/engines/simon/charset.cpp
index dadba8a956..efbba9eb0a 100644
--- a/engines/simon/charset.cpp
+++ b/engines/simon/charset.cpp
@@ -1196,7 +1196,7 @@ void SimonEngine::video_putchar_drawchar(FillOrCopyStruct *fcs, uint x, uint y,
_lockWord |= 0x8000;
- dst = getBackBuf();
+ dst = getFrontBuf();
dst += y * _dxSurfacePitch + x * 8 + fcs->textColumnOffset;
switch(_language) {
diff --git a/engines/simon/icons.cpp b/engines/simon/icons.cpp
index 09471a94da..e508002468 100644
--- a/engines/simon/icons.cpp
+++ b/engines/simon/icons.cpp
@@ -160,7 +160,7 @@ void SimonEngine::draw_icon_c(FillOrCopyStruct *fcs, uint icon, uint x, uint y)
byte *src;
_lockWord |= 0x8000;
- dst = getBackBuf();
+ dst = getFrontBuf();
if (!(getGameType() == GType_SIMON2)) {
// Simon 1
diff --git a/engines/simon/simon.cpp b/engines/simon/simon.cpp
index c47dbbea66..e017bb2602 100644
--- a/engines/simon/simon.cpp
+++ b/engines/simon/simon.cpp
@@ -1950,7 +1950,7 @@ void SimonEngine::f10_key() {
if (x_ >= 311)
continue;
- dst = getFrontBuf();
+ dst = getBackBuf();
dst += (((_dxSurfacePitch / 4) * y_) * 4) + x_;
@@ -2750,7 +2750,7 @@ void SimonEngine::timer_vga_sprites() {
}
void SimonEngine::timer_vga_sprites_helper() {
- byte *dst = getBackBuf();
+ byte *dst = getFrontBuf();
const byte *src;
uint x;
@@ -3112,7 +3112,7 @@ void SimonEngine::colorWindow(FillOrCopyStruct *fcs) {
_lockWord |= 0x8000;
- dst = getBackBuf();
+ dst = getFrontBuf();
dst += _dxSurfacePitch * fcs->y + fcs->x * 8;
h = fcs->height * 8;
@@ -3269,7 +3269,7 @@ void SimonEngine::video_toggle_colors(HitArea * ha, byte a, byte b, byte c, byte
uint w, h, i;
_lockWord |= 0x8000;
- src = getBackBuf() + ha->y * _dxSurfacePitch + ha->x;
+ src = getFrontBuf() + ha->y * _dxSurfacePitch + ha->x;
w = ha->width;
h = ha->height;
@@ -3839,7 +3839,7 @@ void SimonEngine::restoreBlock(uint b, uint r, uint y, uint x) {
byte *dst, *src;
uint i;
- dst = getBackBuf();
+ dst = getFrontBuf();
src = _sdl_buf_3;
dst += y * _dxSurfacePitch;
@@ -4227,12 +4227,12 @@ void SimonEngine::loadMusic(uint music) {
}
}
-byte *SimonEngine::getBackBuf() {
+byte *SimonEngine::getFrontBuf() {
_dxSurfacePitch = _screenWidth;
return _sdl_buf;
}
-byte *SimonEngine::getFrontBuf() {
+byte *SimonEngine::getBackBuf() {
_dxSurfacePitch = _screenWidth;
return _dxUse3Or4ForLock ? _sdl_buf_3 : _sdl_buf_attached;
}
diff --git a/engines/simon/simon.h b/engines/simon/simon.h
index 61b936d4d6..879f2ebc71 100644
--- a/engines/simon/simon.h
+++ b/engines/simon/simon.h
@@ -813,8 +813,8 @@ protected:
void restoreBlock(uint b, uint r, uint y, uint x);
- byte *getBackBuf();
byte *getFrontBuf();
+ byte *getBackBuf();
byte *getScaleBuf();
byte *read_vga_from_datfile_2(uint id, uint type);
diff --git a/engines/simon/vga.cpp b/engines/simon/vga.cpp
index 36f6e59772..d846bb52ba 100644
--- a/engines/simon/vga.cpp
+++ b/engines/simon/vga.cpp
@@ -748,7 +748,7 @@ void SimonEngine::vc10_draw() {
vcWriteVar(251, _scrollX);
- dst = getFrontBuf();
+ dst = getBackBuf();
src = state.depack_src + _scrollX * 4;
for (w = 0; w < 40; w++) {
@@ -774,10 +774,10 @@ void SimonEngine::vc10_draw() {
state.x_skip = 0; /* colums to skip = bh */
state.y_skip = 0; /* rows to skip = bl */
- state.surf2_addr = getBackBuf();
+ state.surf2_addr = getFrontBuf();
state.surf2_pitch = _dxSurfacePitch;
- state.surf_addr = getFrontBuf();
+ state.surf_addr = getBackBuf();
state.surf_pitch = _dxSurfacePitch;
if (getGameType() == GType_FF) {
@@ -881,7 +881,7 @@ void SimonEngine::drawImages_Feeble(VC10_state *state) {
} else {
scaleClip(state->height, state->width, state->y, state->x, state->y + _scrollY);
}
- } else if (state->flags & kDFOverlayed) {
+ } else if (state->flags & kDFOverlayed) {
state->surf_addr = getScaleBuf();
state->surf_pitch = _dxSurfacePitch;
state->surf_addr += state->x + state->y * state->surf_pitch;
@@ -912,7 +912,7 @@ void SimonEngine::drawImages_Feeble(VC10_state *state) {
} while (++w != state->draw_width);
_vgaCurSpritePriority /= 10;
- if (_vgaCurSpritePriority != 900) {
+ if (_vgaCurSpritePriority == 900) {
scaleClip(_scaleHeight, _scaleWidth, _scaleY, _scaleX, _scaleY + _scrollY);
}
} else {
@@ -1136,7 +1136,7 @@ void SimonEngine::drawImages(VC10_state *state) {
do {
mask = vc10_depack_column(state); /* esi */
src = state->surf2_addr + w * 2; /* ebx */
- dst = state->surf_addr + w * 2; /* edi */
+ dst = state->surf_addr + w * 2; /* edi */
h = state->draw_height;
if ((getGameType() == GType_SIMON1) && vcGetBit(88)) {
@@ -1280,7 +1280,7 @@ void SimonEngine::drawImages(VC10_state *state) {
}
/* vc10_helper_4 */
} else {
- if (getGameType() == GType_SIMON2 && state->flags & kDFUseBackBuf && _bitArray[10] & 0x800) {
+ if (getGameType() == GType_SIMON2 && state->flags & kDFUseFrontBuf && _bitArray[10] & 0x800) {
state->surf_addr = state->surf2_addr;
state->surf_pitch = state->surf2_pitch;
}
diff --git a/engines/simon/vga.h b/engines/simon/vga.h
index e8cee69f32..f983b48418 100644
--- a/engines/simon/vga.h
+++ b/engines/simon/vga.h
@@ -100,7 +100,7 @@ struct AnimationHeader_Simon {
enum DrawFlags {
kDFFlip = 0x1,
kDFNonTrans = 0x2,
- kDFUseBackBuf = 0x4,
+ kDFUseFrontBuf = 0x4,
kDFCompressed = 0x8,
kDFCompressedFlip = 0x10,
kDFMasked = 0x20,