diff options
author | Paul Gilbert | 2011-07-03 11:43:59 +1000 |
---|---|---|
committer | Paul Gilbert | 2011-07-03 11:43:59 +1000 |
commit | ac0caf757950b960cba058800fa42eebc7becbd8 (patch) | |
tree | 200cd95e778edd3c1aece28634b894e0585bb2bc /engines/cge | |
parent | 5f64f3ff4743b91559756a319c4a41ab36851ac1 (diff) | |
download | scummvm-rg350-ac0caf757950b960cba058800fa42eebc7becbd8.tar.gz scummvm-rg350-ac0caf757950b960cba058800fa42eebc7becbd8.tar.bz2 scummvm-rg350-ac0caf757950b960cba058800fa42eebc7becbd8.zip |
CGE: Implemented BITMAP::Hide method
Diffstat (limited to 'engines/cge')
-rw-r--r-- | engines/cge/vga13h.cpp | 67 |
1 files changed, 5 insertions, 62 deletions
diff --git a/engines/cge/vga13h.cpp b/engines/cge/vga13h.cpp index a6275a3929..43de8dc9b7 100644 --- a/engines/cge/vga13h.cpp +++ b/engines/cge/vga13h.cpp @@ -1319,69 +1319,12 @@ void Bitmap::show(int x, int y) { void Bitmap::hide(int x, int y) { - /* - uint8 *scr = VGA::Page[1] + y * (SCR_WID / 4) + x / 4; - uint16 d = FP_OFF(VGA::Page[2]) - FP_OFF(VGA::Page[1]); - HideDesc *b = B; - uint16 extra = ((x & 3) != 0); - uint16 h = H; - - // asm push bx - asm push si - asm push ds - - asm cld - asm les di,scr - asm mov si,di - asm add si,d // take bytes from background page - asm lds bx,b - - asm mov dx,VGAGRA_ - asm mov al,0x05 // R/W mode - asm out dx,al - asm inc dx - asm in al,dx - asm and al,0xF4 - asm push ax - asm push dx - asm or al,0x01 - asm out dx,al - - asm mov dx,VGASEQ_ - asm mov ax,0x0F02 // enable all planes - asm out dx,ax + for (int yp = y; yp < y + _h; ++yp) { + const byte *srcP = (const byte *)VGA::Page[2]->getBasePtr(x, yp); + byte *destP = (byte *)VGA::Page[1]->getBasePtr(x, yp); - asm mov dx,ds // save DS - - row: - // skip block - asm mov cx,[bx] - asm add si,cx - asm add di,cx - asm mov cx,[bx+2] - asm add bx,4 - asm add cx,extra - - asm push es - asm pop ds // set DS to video seg - asm rep movsb // move bytes fast - asm sub si,extra - asm sub di,extra - asm mov ds,dx // restore DS - - asm dec h - asm jnz row - - asm pop dx - asm pop ax - asm out dx,al // end of copy mode - - - asm pop ds - asm pop si - // asm pop bx - */ - warning("STUB: Bitmap::hide"); + Common::copy(srcP, srcP + _w, destP); + } } } // End of namespace CGE |