Skip to content

Commit

Permalink
HOPKINS: Remove 8b CopyAsm, rename the 16b one
Browse files Browse the repository at this point in the history
  • Loading branch information
Strangerke committed Jan 5, 2013
1 parent 907d705 commit c9f342f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 40 deletions.
46 changes: 7 additions & 39 deletions engines/hopkins/graphics.cpp
Expand Up @@ -170,7 +170,7 @@ void GraphicsManager::loadVgaImage(const Common::String &file) {
max_x = 320;

lockScreen();
CopyAsm16(_vesaBuffer);
copy16bToSurfaceScaleX2(_vesaBuffer);
unlockScreen();

fadeInBreakout();
Expand Down Expand Up @@ -683,7 +683,7 @@ void GraphicsManager::fadeOutDefaultLength(const byte *surface) {
void GraphicsManager::fadeInBreakout() {
setpal_vga256(_palette);
lockScreen();
CopyAsm16(_vesaBuffer);
copy16bToSurfaceScaleX2(_vesaBuffer);
unlockScreen();
DD_VBL();
}
Expand All @@ -698,7 +698,7 @@ void GraphicsManager::fateOutBreakout() {
setpal_vga256(palette);

lockScreen();
CopyAsm16(_vesaBuffer);
copy16bToSurfaceScaleX2(_vesaBuffer);
unlockScreen();
DD_VBL();
}
Expand Down Expand Up @@ -1202,42 +1202,10 @@ void GraphicsManager::AFFICHE_SPEEDVGA(const byte *objectData, int xp, int yp, i
addVesaSegment(xp, yp, xp + width, yp + height);
}

void GraphicsManager::CopyAsm(const byte *surface) {
const byte *srcP;
byte srcByte;
byte *destP;
byte *dest1P;
byte *dest2P;
byte *dest3P;
byte *destPitch;
const byte *srcPitch;

assert(_videoPtr);
srcP = surface;
srcByte = 30 * WinScan;
destP = (byte *)_videoPtr->pixels + 30 * WinScan;
for (int yCtr = 200; yCtr != 0; yCtr--) {
srcPitch = srcP;
destPitch = destP;
for (int xCtr = 320; xCtr != 0; xCtr--) {
srcByte = *srcP;
*destP = *srcP;
dest1P = WinScan + destP;
*dest1P = srcByte;
dest2P = dest1P - WinScan + 1;
*dest2P = srcByte;
dest3P = WinScan + dest2P;
*dest3P = srcByte;
destP = dest3P - WinScan + 1;
++srcP;
}

srcP = srcPitch + 320;
destP = WinScan + WinScan + destPitch;
}
}

void GraphicsManager::CopyAsm16(const byte *surface) {
/**
* Copy to surface to video buffer, scale 2x.
*/
void GraphicsManager::copy16bToSurfaceScaleX2(const byte *surface) {
const byte *v1;
byte *v2;
byte *v6;
Expand Down
2 changes: 1 addition & 1 deletion engines/hopkins/graphics.h
Expand Up @@ -154,7 +154,7 @@ class GraphicsManager {
void displayVesaSegment();
void AFFICHE_SPEEDVGA(const byte *objectData, int xp, int yp, int idx);
void CopyAsm(const byte *surface);
void CopyAsm16(const byte *surface);
void copy16bToSurfaceScaleX2(const byte *surface);
void Restore_Mem(byte *destSurface, const byte *src, int xp, int yp, int width, int height);
int zoomIn(int v, int percentage);
int zoomOut(int v, int percentage);
Expand Down

0 comments on commit c9f342f

Please sign in to comment.