diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/simon/charset.cpp | 2 | ||||
-rw-r--r-- | engines/simon/icons.cpp | 2 | ||||
-rw-r--r-- | engines/simon/simon.cpp | 17 | ||||
-rw-r--r-- | engines/simon/simon.h | 6 | ||||
-rw-r--r-- | engines/simon/vga.cpp | 12 | ||||
-rw-r--r-- | engines/simon/vga.h | 1 |
6 files changed, 20 insertions, 20 deletions
diff --git a/engines/simon/charset.cpp b/engines/simon/charset.cpp index 990b9104c6..39ac18c578 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 = dx_lock_2(); + dst = getBackBuf(); dst += y * _dxSurfacePitch + x * 8 + fcs->textColumnOffset; switch(_language) { diff --git a/engines/simon/icons.cpp b/engines/simon/icons.cpp index aca4d0f9cf..e26e325f97 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 = dx_lock_2(); + dst = getBackBuf(); if (!(getGameType() == GType_SIMON2)) { // Simon 1 diff --git a/engines/simon/simon.cpp b/engines/simon/simon.cpp index f392cfc508..e3b8a1792b 100644 --- a/engines/simon/simon.cpp +++ b/engines/simon/simon.cpp @@ -1935,7 +1935,7 @@ void SimonEngine::f10_key() { if (x_ >= 311) continue; - dst = dx_lock_attached(); + dst = getFrontBuf(); dst += (((_dxSurfacePitch / 4) * y_) * 4) + x_; @@ -2386,7 +2386,6 @@ void SimonEngine::set_video_mode_internal(uint mode, uint vga_res_id) { _lockWord |= 0x20; if (vga_res_id == 0) { - if (getGameType() == GType_SIMON1) { _unkPalFlag = true; } else { @@ -2734,7 +2733,7 @@ void SimonEngine::timer_vga_sprites() { } void SimonEngine::timer_vga_sprites_helper() { - byte *dst = dx_lock_2(); + byte *dst = getBackBuf(); const byte *src; uint x; @@ -3100,7 +3099,7 @@ void SimonEngine::video_erase(FillOrCopyStruct *fcs) { _lockWord |= 0x8000; - dst = dx_lock_2(); + dst = getBackBuf(); dst += _dxSurfacePitch * fcs->y + fcs->x * 8; h = fcs->height * 8; @@ -3257,7 +3256,7 @@ void SimonEngine::video_toggle_colors(HitArea * ha, byte a, byte b, byte c, byte uint w, h, i; _lockWord |= 0x8000; - src = dx_lock_2() + ha->y * _dxSurfacePitch + ha->x; + src = getBackBuf() + ha->y * _dxSurfacePitch + ha->x; w = ha->width; h = ha->height; @@ -3782,7 +3781,7 @@ void SimonEngine::dx_copy_rgn_from_3_to_2(uint b, uint r, uint y, uint x) { byte *dst, *src; uint i; - dst = dx_lock_2(); + dst = getBackBuf(); src = _sdl_buf_3; dst += y * _dxSurfacePitch; @@ -4170,17 +4169,17 @@ void SimonEngine::loadMusic(uint music) { } } -byte *SimonEngine::dx_lock_2() { +byte *SimonEngine::getBackBuf() { _dxSurfacePitch = _screenWidth; return _sdl_buf; } -byte *SimonEngine::dx_lock_attached() { +byte *SimonEngine::getFrontBuf() { _dxSurfacePitch = _screenWidth; return _dxUse3Or4ForLock ? _sdl_buf_3 : _sdl_buf_attached; } -byte *SimonEngine::dx_lock_scaled() { +byte *SimonEngine::getScaleBuf() { _dxSurfacePitch = _screenWidth; return _sdl_buf_scaled; } diff --git a/engines/simon/simon.h b/engines/simon/simon.h index bb7ab1b0b6..9dbec5c5ca 100644 --- a/engines/simon/simon.h +++ b/engines/simon/simon.h @@ -814,9 +814,9 @@ protected: void dx_copy_rgn_from_3_to_2(uint b, uint r, uint y, uint x); - byte *dx_lock_2(); - byte *dx_lock_attached(); - byte *dx_lock_scaled(); + byte *getBackBuf(); + byte *getFrontBuf(); + 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 52c7b4c4b0..a50f41f8cc 100644 --- a/engines/simon/vga.cpp +++ b/engines/simon/vga.cpp @@ -748,7 +748,7 @@ void SimonEngine::vc10_draw() { vcWriteVar(251, _scrollX); - dst = dx_lock_attached(); + dst = getFrontBuf(); src = state.depack_src + _scrollX * 4; for (w = 0; w < 40; w++) { @@ -771,10 +771,10 @@ void SimonEngine::vc10_draw() { state.width = state.draw_width = width; /* cl */ state.height = state.draw_height = height; /* ch */ - state.surf2_addr = dx_lock_2(); + state.surf2_addr = getBackBuf(); state.surf2_pitch = _dxSurfacePitch; - state.surf_addr = dx_lock_attached(); + state.surf_addr = getFrontBuf(); state.surf_pitch = _dxSurfacePitch; if (getGameType() == GType_FF) { @@ -848,7 +848,7 @@ bool SimonEngine::drawImages_clip(VC10_state *state) { void SimonEngine::drawImages_Feeble(VC10_state *state) { if (state->flags & kDFCompressed) { if (state->flags & kDFScaled) { - state->surf_addr = dx_lock_scaled(); + state->surf_addr = getScaleBuf(); state->surf_pitch = _dxSurfacePitch; uint w, h; @@ -887,7 +887,7 @@ void SimonEngine::drawImages_Feeble(VC10_state *state) { scaleClip(state->height, state->width, state->y, state->x, _scrollY); } } else if (state->flags & kDFOverlayed) { - state->surf_addr = dx_lock_scaled(); + state->surf_addr = getScaleBuf(); state->surf_pitch = _dxSurfacePitch; state->surf_addr += state->x + state->y * state->surf_pitch; @@ -1238,7 +1238,7 @@ void SimonEngine::drawImages(VC10_state *state) { } /* vc10_helper_4 */ } else { - if (getGameType() == GType_SIMON2 && state->flags & 0x4 && _bitArray[10] & 0x800) { + if (getGameType() == GType_SIMON2 && state->flags & kDFUseBackBuf && _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 e5ea5bfa41..e8cee69f32 100644 --- a/engines/simon/vga.h +++ b/engines/simon/vga.h @@ -100,6 +100,7 @@ struct AnimationHeader_Simon { enum DrawFlags { kDFFlip = 0x1, kDFNonTrans = 0x2, + kDFUseBackBuf = 0x4, kDFCompressed = 0x8, kDFCompressedFlip = 0x10, kDFMasked = 0x20, |