Commit 79e276c8 authored by Ian Wadham's avatar Ian Wadham

Change the version number. Turn off debugging output from the game-engine.

svn path=/trunk/KDE/kdegames/kgoldrunner/; revision=1150877
parent ed4f986b
...@@ -680,19 +680,15 @@ bool KGoldrunner::identifyMoveAction (QKeyEvent * event, bool pressed) ...@@ -680,19 +680,15 @@ bool KGoldrunner::identifyMoveAction (QKeyEvent * event, bool pressed)
result = true; result = true;
if ((ACTION ("move_left"))->shortcuts().contains(keystroke)) { if ((ACTION ("move_left"))->shortcuts().contains(keystroke)) {
kDebug() << "move_left" << "pressed" << pressed; // IDW
game->kbControl (LEFT, pressed); game->kbControl (LEFT, pressed);
} }
else if ((ACTION ("move_right"))->shortcuts().contains(keystroke)) { else if ((ACTION ("move_right"))->shortcuts().contains(keystroke)) {
kDebug() << "move_right" << "pressed" << pressed; // IDW
game->kbControl (RIGHT, pressed); game->kbControl (RIGHT, pressed);
} }
else if ((ACTION ("move_up"))->shortcuts().contains(keystroke)) { else if ((ACTION ("move_up"))->shortcuts().contains(keystroke)) {
kDebug() << "move_up" << "pressed" << pressed; // IDW
game->kbControl (UP, pressed); game->kbControl (UP, pressed);
} }
else if ((ACTION ("move_down"))->shortcuts().contains(keystroke)) { else if ((ACTION ("move_down"))->shortcuts().contains(keystroke)) {
kDebug() << "move_down" << "pressed" << pressed; // IDW
game->kbControl (DOWN, pressed); game->kbControl (DOWN, pressed);
} }
else { else {
......
...@@ -61,7 +61,7 @@ KGrLevelPlayer::KGrLevelPlayer (QObject * parent, KRandomSequence * pRandomGen) ...@@ -61,7 +61,7 @@ KGrLevelPlayer::KGrLevelPlayer (QObject * parent, KRandomSequence * pRandomGen)
{ {
t.start(); // IDW t.start(); // IDW
dbgLevel = 2; dbgLevel = 0;
} }
int KGrLevelPlayer::playerCount = 0; int KGrLevelPlayer::playerCount = 0;
...@@ -317,8 +317,6 @@ void KGrLevelPlayer::startDigging (Direction diggingDirection) ...@@ -317,8 +317,6 @@ void KGrLevelPlayer::startDigging (Direction diggingDirection)
t.elapsed()}; // IDW test t.elapsed()}; // IDW test
(* thisBrick) = brick; (* thisBrick) = brick;
dugBricks.append (thisBrick); dugBricks.append (thisBrick);
// kDebug() << "DIG" << thisBrick->id << thisBrick->countdown
// << "time" << (t.elapsed() - thisBrick->startTime);
} }
} }
...@@ -334,22 +332,16 @@ void KGrLevelPlayer::processDugBricks (const int scaledTime) ...@@ -334,22 +332,16 @@ void KGrLevelPlayer::processDugBricks (const int scaledTime)
dugBrick->cycleTimeLeft += digCycleTime; dugBrick->cycleTimeLeft += digCycleTime;
if (--dugBrick->countdown == digClosingCycles) { if (--dugBrick->countdown == digClosingCycles) {
// Start the brick-closing animation (non-repeating). // Start the brick-closing animation (non-repeating).
// kDebug() << "Brick" << dugBrick->digI << dugBrick->digJ <<
// "count" << dugBrick->countdown;
emit startAnimation (dugBrick->id, false, emit startAnimation (dugBrick->id, false,
dugBrick->digI, dugBrick->digJ, dugBrick->digI, dugBrick->digJ,
(digClosingCycles * digCycleTime), (digClosingCycles * digCycleTime),
STAND, CLOSE_BRICK); STAND, CLOSE_BRICK);
} }
if (dugBrick->countdown == digKillingTime) { if (dugBrick->countdown == digKillingTime) {
// kDebug() << "Brick" << dugBrick->digI << dugBrick->digJ <<
// "count" << dugBrick->countdown;
// Close the hole and maybe capture the hero or an enemy. // Close the hole and maybe capture the hero or an enemy.
grid->changeCellAt (dugBrick->digI, dugBrick->digJ, BRICK); grid->changeCellAt (dugBrick->digI, dugBrick->digJ, BRICK);
} }
if (dugBrick->countdown <= 0) { if (dugBrick->countdown <= 0) {
// kDebug() << "DIG" << dugBrick->id << dugBrick->countdown
// << "time" << (t.elapsed() - dugBrick->startTime);
// Dispose of the dug brick and remove it from the list. // Dispose of the dug brick and remove it from the list.
emit deleteSprite (dugBrick->id); emit deleteSprite (dugBrick->id);
delete dugBrick; delete dugBrick;
...@@ -361,7 +353,6 @@ void KGrLevelPlayer::processDugBricks (const int scaledTime) ...@@ -361,7 +353,6 @@ void KGrLevelPlayer::processDugBricks (const int scaledTime)
void KGrLevelPlayer::prepareToPlay() void KGrLevelPlayer::prepareToPlay()
{ {
kDebug() << "Set mouse to:" << targetI << targetJ;
if ((controlMode == MOUSE) || (controlMode == LAPTOP)) { if ((controlMode == MOUSE) || (controlMode == LAPTOP)) {
emit setMousePos (targetI, targetJ); emit setMousePos (targetI, targetJ);
} }
...@@ -476,7 +467,6 @@ void KGrLevelPlayer::setDirectionByKey (const Direction dirn, ...@@ -476,7 +467,6 @@ void KGrLevelPlayer::setDirectionByKey (const Direction dirn,
int sign = pressed ? +1 : -1; int sign = pressed ? +1 : -1;
dX = dX + sign * movement [dirn][X]; dX = dX + sign * movement [dirn][X];
dY = dY + sign * movement [dirn][Y]; dY = dY + sign * movement [dirn][Y];
kDebug() << "dX" << dX << "dY" << dY; // IDW
} }
} }
} }
...@@ -500,7 +490,7 @@ Direction KGrLevelPlayer::getDirection (int heroI, int heroJ) ...@@ -500,7 +490,7 @@ Direction KGrLevelPlayer::getDirection (int heroI, int heroJ)
// (if there are multi-key holds) into either horizontal or vertical. // (if there are multi-key holds) into either horizontal or vertical.
direction = setDirectionByDelta (dX, dY, heroI, heroJ); direction = setDirectionByDelta (dX, dY, heroI, heroJ);
/* dbe2 IDW*/ dbe "T %04d recIndex %03d delta [%02d, %02d] " dbe2 "T %04d recIndex %03d delta [%02d, %02d] "
"hero at [%02d, %02d] direction %d\n", "hero at [%02d, %02d] direction %d\n",
T, recIndex - 1, dX, dY, heroI, heroJ, direction); T, recIndex - 1, dX, dY, heroI, heroJ, direction);
} }
...@@ -512,26 +502,20 @@ Direction KGrLevelPlayer::setDirectionByDelta (const int di, const int dj, ...@@ -512,26 +502,20 @@ Direction KGrLevelPlayer::setDirectionByDelta (const int di, const int dj,
const int heroI, const int heroJ) const int heroI, const int heroJ)
{ {
Direction dirn = STAND; Direction dirn = STAND;
kDebug() << "di" << di << "dj" << dj;
if ((dj > 0) && (grid->heroMoves (heroI, heroJ) & dFlag [DOWN])) { if ((dj > 0) && (grid->heroMoves (heroI, heroJ) & dFlag [DOWN])) {
// kDebug() << "Go down";
dirn = DOWN; dirn = DOWN;
} }
else if ((dj < 0) && (grid->heroMoves (heroI, heroJ) & dFlag [UP])) { else if ((dj < 0) && (grid->heroMoves (heroI, heroJ) & dFlag [UP])) {
// kDebug() << "Go up";
dirn = UP; dirn = UP;
} }
else if (di > 0) { else if (di > 0) {
// kDebug() << "Go right";
dirn = RIGHT; dirn = RIGHT;
} }
else if (di < 0) { else if (di < 0) {
// kDebug() << "Go left";
dirn = LEFT; dirn = LEFT;
} }
else { // Note: di is zero, but dj is not necessarily zero. else { // Note: di is zero, but dj is not necessarily zero.
// kDebug() << "Stand";
dirn = STAND; dirn = STAND;
} }
return dirn; return dirn;
...@@ -788,7 +772,6 @@ void KGrLevelPlayer::tick (bool missed, int scaledTime) ...@@ -788,7 +772,6 @@ void KGrLevelPlayer::tick (bool missed, int scaledTime)
// IDW Need a better condition here. (playState == Playing) was to stop // IDW Need a better condition here. (playState == Playing) was to stop
// IDW the HOLD_KEY option recording a whole lot of STAND directions before // IDW the HOLD_KEY option recording a whole lot of STAND directions before
// IDW the first key is pressed. (direction != NO_DIRECTION) is previous code. // IDW the first key is pressed. (direction != NO_DIRECTION) is previous code.
kDebug() << "Record playState" << playState << "dirn" << direction;
record (2, DIRECTION_CODE + direction); record (2, DIRECTION_CODE + direction);
} }
} }
......
...@@ -27,7 +27,7 @@ static const char description[] = ...@@ -27,7 +27,7 @@ static const char description[] =
I18N_NOOP ("KGoldrunner is a game of action and puzzle solving"); I18N_NOOP ("KGoldrunner is a game of action and puzzle solving");
// The intention is to keep the KGoldrunner version number in line with KDE. // The intention is to keep the KGoldrunner version number in line with KDE.
static const char version[] = "4.3"; static const char version[] = "4.6";
static bool gameDataOK(); static bool gameDataOK();
static void addCredits (KAboutData & about); static void addCredits (KAboutData & about);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment