[Scummvm-cvs-logs] SF.net SVN: scummvm: [25386] scummvm/trunk/engines/parallaction
peres001 at users.sourceforge.net
peres001 at users.sourceforge.net
Sun Feb 4 16:43:45 CET 2007
Revision: 25386
http://scummvm.svn.sourceforge.net/scummvm/?rev=25386&view=rev
Author: peres001
Date: 2007-02-04 07:43:45 -0800 (Sun, 04 Feb 2007)
Log Message:
-----------
added more debug levels and comments
Modified Paths:
--------------
scummvm/trunk/engines/parallaction/defs.h
scummvm/trunk/engines/parallaction/graphics.cpp
scummvm/trunk/engines/parallaction/location.cpp
scummvm/trunk/engines/parallaction/parallaction.cpp
Modified: scummvm/trunk/engines/parallaction/defs.h
===================================================================
--- scummvm/trunk/engines/parallaction/defs.h 2007-02-04 13:40:11 UTC (rev 25385)
+++ scummvm/trunk/engines/parallaction/defs.h 2007-02-04 15:43:45 UTC (rev 25386)
@@ -105,7 +105,8 @@
kDebugDisk = 1 << 0,
kDebugWalk = 1 << 1,
kDebugLocation = 1 << 2,
- kDebugDialogue = 1 << 3
+ kDebugDialogue = 1 << 3,
+ kDebugGraphics = 1 << 4
};
} // namespace Parallaction
Modified: scummvm/trunk/engines/parallaction/graphics.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/graphics.cpp 2007-02-04 13:40:11 UTC (rev 25385)
+++ scummvm/trunk/engines/parallaction/graphics.cpp 2007-02-04 15:43:45 UTC (rev 25386)
@@ -235,7 +235,7 @@
// 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::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 @@
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 @@
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;
Modified: scummvm/trunk/engines/parallaction/location.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/location.cpp 2007-02-04 13:40:11 UTC (rev 25385)
+++ scummvm/trunk/engines/parallaction/location.cpp 2007-02-04 15:43:45 UTC (rev 25386)
@@ -202,6 +202,7 @@
void freeLocation() {
+ debugC(7, kDebugLocation, "freeLocation");
uint16 _si = 1;
while (_localFlagNames[_si] != 0) {
@@ -209,34 +210,41 @@
_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 @@
return;
}
-extern Zone *_hoverZone;
+extern Zone *_hoverZone;
void Parallaction::changeLocation(char *location) {
debugC(1, kDebugLocation, "changeLocation to '%s'", location);
@@ -317,7 +325,7 @@
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 @@
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 @@
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 @@
_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 @@
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 @@
_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 @@
if (_locationComment) {
doLocationEnterTransition();
- debugC(1, kDebugLocation, "changeLocation: shown location comment");
+ debugC(2, kDebugLocation, "changeLocation: shown location comment");
}
runJobs();
Modified: scummvm/trunk/engines/parallaction/parallaction.cpp
===================================================================
--- scummvm/trunk/engines/parallaction/parallaction.cpp 2007-02-04 13:40:11 UTC (rev 25385)
+++ scummvm/trunk/engines/parallaction/parallaction.cpp 2007-02-04 15:43:45 UTC (rev 25386)
@@ -184,6 +184,7 @@
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 runJobs() {
- debugC(1, kDebugLocation, "runJobs");
if (_engineFlags & kEnginePauseJobs) return;
@@ -972,10 +972,9 @@
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
//
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list