diff options
-rw-r--r-- | engines/parallaction/defs.h | 3 | ||||
-rw-r--r-- | engines/parallaction/graphics.cpp | 10 | ||||
-rw-r--r-- | engines/parallaction/location.cpp | 34 | ||||
-rw-r--r-- | engines/parallaction/parallaction.cpp | 7 |
4 files changed, 31 insertions, 23 deletions
diff --git a/engines/parallaction/defs.h b/engines/parallaction/defs.h index 002b4832db..dc64c53b4f 100644 --- a/engines/parallaction/defs.h +++ b/engines/parallaction/defs.h @@ -105,7 +105,8 @@ enum { kDebugDisk = 1 << 0, kDebugWalk = 1 << 1, kDebugLocation = 1 << 2, - kDebugDialogue = 1 << 3 + kDebugDialogue = 1 << 3, + kDebugGraphics = 1 << 4 }; } // namespace Parallaction diff --git a/engines/parallaction/graphics.cpp b/engines/parallaction/graphics.cpp index 6a56c74df6..ecb3a2e574 100644 --- a/engines/parallaction/graphics.cpp +++ b/engines/parallaction/graphics.cpp @@ -235,7 +235,7 @@ void Graphics::quickFadePalette(byte *palette) { // FIXME: the effect is different from the original // void Graphics::animatePalette(byte *palette) { -// printf("Graphics::animatePalette()\n"); +// printf("Graphics::animatePalette()\n"); byte tmp[3]; @@ -360,7 +360,7 @@ void Graphics::floodFill(byte color, uint16 left, uint16 top, uint16 right, uint void Graphics::flatBlit(uint16 w, uint16 h, int16 x, int16 y, byte *data, Graphics::Buffers buffer) { -// printf("Graphics::flatBlit(%i, %i, %i, %i)\n", w, h, x, y); + debugC(9, kDebugGraphics, "Graphics::flatBlit(%i, %i, %i, %i)", w, h, x, y); // source coordinates int16 left = 0, top = 0; @@ -384,7 +384,7 @@ void Graphics::flatBlit(uint16 w, uint16 h, int16 x, int16 y, byte *data, Graphi byte *s = data + left + top * w; byte *d = _buffers[buffer] + x + y * SCREEN_WIDTH; -// printf("Graphics::flatBlit CLIPPED (%i, %i, %i, %i) -> (%i, %i) %x %x\n", left, top, right, bottom, x, y, (uint32)s, (uint32)d); + debugC(9, kDebugGraphics, "Graphics::flatBlit CLIPPED (%i, %i, %i, %i) -> (%i, %i) %x %x", left, top, right, bottom, x, y, (uint32)s, (uint32)d); for (uint16 i = top; i < bottom; i++) { for (uint16 j = left; j < right; j++) { @@ -397,11 +397,11 @@ void Graphics::flatBlit(uint16 w, uint16 h, int16 x, int16 y, byte *data, Graphi d += (SCREEN_WIDTH - right + left); } -// printf("Graphics::flatBlit BLITTED\n"); + debugC(9, kDebugGraphics, "Graphics::flatBlit BLITTED"); if (buffer == kBitFront) updateScreen(); -// printf("Graphics::flatBlit DONE\n"); + debugC(9, kDebugGraphics, "Graphics::flatBlit DONE"); return; diff --git a/engines/parallaction/location.cpp b/engines/parallaction/location.cpp index 9ea22922d7..522383de05 100644 --- a/engines/parallaction/location.cpp +++ b/engines/parallaction/location.cpp @@ -202,6 +202,7 @@ void resolveLocationForwards() { void freeLocation() { + debugC(7, kDebugLocation, "freeLocation"); uint16 _si = 1; while (_localFlagNames[_si] != 0) { @@ -209,34 +210,41 @@ void freeLocation() { _localFlagNames[_si] = NULL; _si++; } + debugC(7, kDebugLocation, "freeLocation: localflags names freed"); + freeNodeList(_locationWalkNodes._next); _locationWalkNodes._next = NULL; + debugC(7, kDebugLocation, "freeLocation: walk nodes freed"); freeZones(_zones._next); freeNodeList(_zones._next); memset(&_zones, 0, sizeof(Node)); + debugC(7, kDebugLocation, "freeLocation: zones freed"); freeZones(_animations._next); freeAnimations(); freeNodeList(_animations._next); - memset(&_animations, 0, sizeof(Node)); + memset(&_animations, 0, sizeof(Node)); + debugC(7, kDebugLocation, "freeLocation: animations freed"); if (_locationComment) { memFree(_locationComment); } _locationComment = NULL; + debugC(7, kDebugLocation, "freeLocation: comments freed"); if (_locationCommands) { freeNodeList(&_locationCommands->_node); } _locationCommands = NULL; - + debugC(7, kDebugLocation, "freeLocation: commands freed"); if (_locationACommands) { freeNodeList(&_locationACommands->_node); } _locationACommands = NULL; + debugC(7, kDebugLocation, "freeLocation: acommands freed"); return; } @@ -299,7 +307,7 @@ void switchBackground(char *name) { return; } -extern Zone *_hoverZone; +extern Zone *_hoverZone; void Parallaction::changeLocation(char *location) { debugC(1, kDebugLocation, "changeLocation to '%s'", location); @@ -317,7 +325,7 @@ void Parallaction::changeLocation(char *location) { playMusic(); _musicData1 = 0; - debugC(1, kDebugLocation, "changeLocation: started character specific music"); + debugC(2, kDebugLocation, "changeLocation: started character specific music"); } if (!scumm_stricmp(location, "night") || !scumm_stricmp(location, "intsushi")) { @@ -325,7 +333,7 @@ void Parallaction::changeLocation(char *location) { loadMusic("soft"); playMusic(); - debugC(1, kDebugLocation, "changeLocation: started music 'soft'"); + debugC(2, kDebugLocation, "changeLocation: started music 'soft'"); } if (!scumm_stricmp(location, "museo") || @@ -339,19 +347,19 @@ void Parallaction::changeLocation(char *location) { stopMusic(); _musicData1 = 1; - debugC(1, kDebugLocation, "changeLocation: music stopped"); + debugC(2, kDebugLocation, "changeLocation: music stopped"); } _hoverZone = NULL; if (_engineFlags & kEngineMouse) { changeCursor( kCursorArrow ); - debugC(1, kDebugLocation, "changeLocation: changed cursor"); + debugC(2, kDebugLocation, "changeLocation: changed cursor"); } strcpy(_newLocation, location); removeNode(&_yourself._zone._node); - debugC(1, kDebugLocation, "changeLocation: removed character from the animation list"); + debugC(2, kDebugLocation, "changeLocation: removed character from the animation list"); freeLocation(); debugC(1, kDebugLocation, "changeLocation: old location free'd"); @@ -382,7 +390,7 @@ void Parallaction::changeLocation(char *location) { _vm->_graphics->freeCnv(&Graphics::_font); waitUntilLeftClick(); - debugC(1, kDebugLocation, "changeLocation: intro text shown"); + debugC(2, kDebugLocation, "changeLocation: intro text shown"); tmp = strchr(tmp+1, '.'); strcpy(_newLocation, tmp+1); @@ -399,11 +407,11 @@ void Parallaction::changeLocation(char *location) { strcpy(_characterName, tmp+1); } - debugC(1, kDebugLocation, "changeLocation: character changed to '%s'", _characterName); + debugC(2, kDebugLocation, "changeLocation: character changed to '%s'", _characterName); } addNode(&_animations, &_yourself._zone._node); - debugC(1, kDebugLocation, "changeLocation: new character added to the animation list"); + debugC(2, kDebugLocation, "changeLocation: new character added to the animation list"); strcpy(_saveData1, _newLocation); @@ -422,7 +430,7 @@ void Parallaction::changeLocation(char *location) { _firstPosition._y = -1000; _firstPosition._x = -1000; - debugC(1, kDebugLocation, "changeLocation: initial position set to x: %i, y: %i, f: %i", _firstPosition._x, _firstPosition._y, _firstFrame); + debugC(2, kDebugLocation, "changeLocation: initial position set to x: %i, y: %i, f: %i", _firstPosition._x, _firstPosition._y, _firstFrame); } byte palette[PALETTE_SIZE]; @@ -439,7 +447,7 @@ void Parallaction::changeLocation(char *location) { if (_locationComment) { doLocationEnterTransition(); - debugC(1, kDebugLocation, "changeLocation: shown location comment"); + debugC(2, kDebugLocation, "changeLocation: shown location comment"); } runJobs(); diff --git a/engines/parallaction/parallaction.cpp b/engines/parallaction/parallaction.cpp index 31c1dc19f2..2613195134 100644 --- a/engines/parallaction/parallaction.cpp +++ b/engines/parallaction/parallaction.cpp @@ -184,6 +184,7 @@ Parallaction::Parallaction(OSystem *syst) : Common::addSpecialDebugLevel(kDebugLocation, "location", "Location debug level"); Common::addSpecialDebugLevel(kDebugDisk, "disk", "Disk debug level"); Common::addSpecialDebugLevel(kDebugWalk, "walk", "Walk debug level"); + Common::addSpecialDebugLevel(kDebugGraphics, "gfx", "Gfx debug level"); } @@ -956,7 +957,6 @@ void resumeJobs() { } void runJobs() { - debugC(1, kDebugLocation, "runJobs"); if (_engineFlags & kEnginePauseJobs) return; @@ -972,9 +972,8 @@ void runJobs() { j = v4; } - debugC(1, kDebugLocation, "runJobs completed"); - - return;} + return; +} // this Job uses a static counter to delay removal // and is in fact only used to remove jEraseLabel jobs |