aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTravis Howell2006-04-21 00:26:18 +0000
committerTravis Howell2006-04-21 00:26:18 +0000
commitfc3284efce00c130de80c5522dde2055de423283 (patch)
tree47e8cd05a78d651894ebf125daf61e8a7fb70610
parentb80ef2cd8fddc0cf78ec1fbd283c79578fc08234 (diff)
downloadscummvm-rg350-fc3284efce00c130de80c5522dde2055de423283.tar.gz
scummvm-rg350-fc3284efce00c130de80c5522dde2055de423283.tar.bz2
scummvm-rg350-fc3284efce00c130de80c5522dde2055de423283.zip
Add back debug function
svn-id: r22063
-rw-r--r--engines/simon/simon.cpp43
-rw-r--r--engines/simon/simon.h1
2 files changed, 41 insertions, 3 deletions
diff --git a/engines/simon/simon.cpp b/engines/simon/simon.cpp
index c1982c0901..0aa93c4b11 100644
--- a/engines/simon/simon.cpp
+++ b/engines/simon/simon.cpp
@@ -2628,9 +2628,6 @@ void SimonEngine::animateSprites() {
_vgaCurSpriteId = vsp->id;
_vgaCurSpritePriority = vsp->priority;
- if (_drawImagesDebug && vsp->image)
- fprintf(_dumpFile, "id:%5d image:%3d base-color:%3d x:%3d y:%3d flags:%x\n",
- vsp->id, vsp->image, vsp->palette, vsp->x, vsp->y, vsp->flags);
params[0] = readUint16Wrapper(&vsp->image);
params[1] = readUint16Wrapper(&vsp->palette);
params[2] = readUint16Wrapper(&vsp->x);
@@ -2655,6 +2652,44 @@ void SimonEngine::animateSprites() {
_vcPtr = vc_ptr_org;
}
+void SimonEngine::animateSpritesDebug() {
+ VgaSprite *vsp;
+ VgaPointersEntry *vpe;
+ const byte *vc_ptr_org = _vcPtr;
+ uint16 params[5]; // parameters to vc10_draw
+
+ if (_paletteFlag == 2)
+ _paletteFlag = 1;
+
+ vsp = _vgaSprites;
+ while (vsp->id != 0) {
+ vsp->windowNum &= 0x7FFF;
+
+ vpe = &_vgaBufferPointers[vsp->zoneNum];
+ _curVgaFile1 = vpe->vgaFile1;
+ _curVgaFile2 = vpe->vgaFile2;
+ _curSfxFile = vpe->sfxFile;
+ _windowNum = vsp->windowNum;
+ _vgaCurSpriteId = vsp->id;
+
+ if (vsp->image)
+ fprintf(_dumpFile, "id:%5d image:%3d base-color:%3d x:%3d y:%3d flags:%x\n",
+ vsp->id, vsp->image, vsp->palette, vsp->x, vsp->y, vsp->flags);
+ params[0] = readUint16Wrapper(&vsp->image);
+ params[1] = readUint16Wrapper(&vsp->palette);
+ params[2] = readUint16Wrapper(&vsp->x);
+ params[3] = readUint16Wrapper(&vsp->y);
+ params[4] = readUint16Wrapper(&vsp->flags);
+ _vcPtr = (const byte *)params;
+ vc10_draw();
+
+ vsp++;
+ }
+
+ _updateScreen++;
+ _vcPtr = vc_ptr_org;
+}
+
void SimonEngine::scrollScreen() {
byte *dst = getFrontBuf();
const byte *src;
@@ -2743,6 +2778,8 @@ void SimonEngine::timer_proc1() {
}
animateSprites();
+ if (_drawImagesDebug)
+ animateSpritesDebug();
if (_copyPartialMode == 1) {
fillBackFromFront(80, 46, 208 - 80, 94 - 46);
diff --git a/engines/simon/simon.h b/engines/simon/simon.h
index 19b30211a1..677d97eb46 100644
--- a/engines/simon/simon.h
+++ b/engines/simon/simon.h
@@ -1064,6 +1064,7 @@ protected:
void timer_proc1();
void animateSprites();
+ void animateSpritesDebug();
void dx_clear_surfaces(uint num_lines);
void dx_update_screen_and_palette();