[Orxonox-commit 4419] r9090 - in code/branches/pCuts: data/levels src/modules/pong src/modules/tetris
jo at orxonox.net
jo at orxonox.net
Mon Apr 16 22:29:49 CEST 2012
Author: jo
Date: 2012-04-16 22:29:49 +0200 (Mon, 16 Apr 2012)
New Revision: 9090
Modified:
code/branches/pCuts/data/levels/tetris.oxw
code/branches/pCuts/src/modules/pong/Pong.cc
code/branches/pCuts/src/modules/pong/Pong.h
code/branches/pCuts/src/modules/pong/PongScore.cc
code/branches/pCuts/src/modules/tetris/CMakeLists.txt
code/branches/pCuts/src/modules/tetris/Tetris.cc
code/branches/pCuts/src/modules/tetris/TetrisPrereqs.h
Log:
Fighting with the controller. 'Undefined reference to orxonox::OverlayText' won. I don't see the error at the moment.
Modified: code/branches/pCuts/data/levels/tetris.oxw
===================================================================
--- code/branches/pCuts/data/levels/tetris.oxw 2012-04-14 20:03:54 UTC (rev 9089)
+++ code/branches/pCuts/data/levels/tetris.oxw 2012-04-16 20:29:49 UTC (rev 9090)
@@ -8,6 +8,7 @@
<?lua
include("HUDTemplates3.oxo")
include("stats.oxo")
+ include("pongHUD.oxo")
include("templates/lodInformation.oxt")
?>
Modified: code/branches/pCuts/src/modules/pong/Pong.cc
===================================================================
--- code/branches/pCuts/src/modules/pong/Pong.cc 2012-04-14 20:03:54 UTC (rev 9089)
+++ code/branches/pCuts/src/modules/pong/Pong.cc 2012-04-16 20:29:49 UTC (rev 9090)
@@ -75,8 +75,8 @@
// Set the type of Bots for this particular Gametype.
this->botclass_ = Class(PongBot);
- this->scoreLimit_ = 10;
- this->setConfigValues();
+ this->scoreLimit_ = 10;
+ this->setConfigValues();
}
/**
Modified: code/branches/pCuts/src/modules/pong/Pong.h
===================================================================
--- code/branches/pCuts/src/modules/pong/Pong.h 2012-04-14 20:03:54 UTC (rev 9089)
+++ code/branches/pCuts/src/modules/pong/Pong.h 2012-04-16 20:29:49 UTC (rev 9090)
@@ -82,7 +82,7 @@
{ this->center_ = center; }
void setConfigValues(); //!< Makes scoreLimit configurable.
- PlayerInfo* getLeftPlayer() const; //!< Get the left player.
+ PlayerInfo* getLeftPlayer() const; //!< Get the left player.
PlayerInfo* getRightPlayer() const; //!< Get the right player.
protected:
@@ -94,7 +94,7 @@
WeakPtr<PongCenterpoint> center_; //!< The playing field.
WeakPtr<PongBall> ball_; //!< The Pong ball.
WeakPtr<PongBat> bat_[2]; //!< The two bats.
- Timer starttimer_; //!< A timer to delay the start of the game.
+ Timer starttimer_; //!< A timer to delay the start of the game.
int scoreLimit_; //!< If a player scored that much points, the game is ended.
};
}
Modified: code/branches/pCuts/src/modules/pong/PongScore.cc
===================================================================
--- code/branches/pCuts/src/modules/pong/PongScore.cc 2012-04-14 20:03:54 UTC (rev 9089)
+++ code/branches/pCuts/src/modules/pong/PongScore.cc 2012-04-16 20:29:49 UTC (rev 9090)
@@ -60,7 +60,7 @@
this->bShowLeftPlayer_ = false;
this->bShowRightPlayer_ = false;
this->player1_ = NULL;
- this->player2_ = NULL;
+ this->player2_ = NULL;
}
/**
Modified: code/branches/pCuts/src/modules/tetris/CMakeLists.txt
===================================================================
--- code/branches/pCuts/src/modules/tetris/CMakeLists.txt 2012-04-14 20:03:54 UTC (rev 9089)
+++ code/branches/pCuts/src/modules/tetris/CMakeLists.txt 2012-04-16 20:29:49 UTC (rev 9090)
@@ -3,6 +3,7 @@
TetrisCenterpoint.cc
TetrisStone.cc
TetrisBrick.cc
+ TetrisScore.cc
)
ORXONOX_ADD_LIBRARY(tetris
Modified: code/branches/pCuts/src/modules/tetris/Tetris.cc
===================================================================
--- code/branches/pCuts/src/modules/tetris/Tetris.cc 2012-04-14 20:03:54 UTC (rev 9089)
+++ code/branches/pCuts/src/modules/tetris/Tetris.cc 2012-04-16 20:29:49 UTC (rev 9090)
@@ -30,12 +30,11 @@
*BUG d) wrong collision detection: sometimes stones "bounce off"
*BUG e) multiple rows are not cleared in one round
*
- *TASK a) give points for winning
+ *
*TASK b) write a hud (show points gained; new brick)
*TASK c) end the game in a nicer way
*TASK d) save the highscore
*TASK e) eye candy
- *TASK f) increasing speed
*/
/**
@@ -408,7 +407,9 @@
if(stonesPerRow == this->center_->getWidth())
{
clearRow(row);
- this->playerScored(this->player_);
+ this->playerScored(this->player_);// add points
+ //increase the stone's speed
+ this->center_->setStoneSpeed(this->center_->getStoneSpeed()+1.0f);
}
}
Modified: code/branches/pCuts/src/modules/tetris/TetrisPrereqs.h
===================================================================
--- code/branches/pCuts/src/modules/tetris/TetrisPrereqs.h 2012-04-14 20:03:54 UTC (rev 9089)
+++ code/branches/pCuts/src/modules/tetris/TetrisPrereqs.h 2012-04-16 20:29:49 UTC (rev 9090)
@@ -68,6 +68,7 @@
class TetrisCenterpoint;
class TetrisStone;
class TetrisBrick;
+ class TetrisScore;
}
#endif /* _TetrisPrereqs_H__ */
More information about the Orxonox-commit
mailing list