Skip to content

Commit c85bd6e

Browse files
author
Patrick Rye
committed
Update to v1.2.5-Beta
## [1.2.5-Beta] - 2015-09-23 ### Added * Doxygen Support * Doxygen Documentation * Makefile ### Changed * Change log format to be markdown * License format to be markdown ### Removed * Autoversioning support * clsCannonball::enableDrag (pointless now, it is just enabled in another function)
1 parent 2f21f0a commit c85bd6e

File tree

3 files changed

+38
-6
lines changed

3 files changed

+38
-6
lines changed

src/screen.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,18 +43,31 @@ class clsScreen {
4343
WINATT getWindow(void);
4444

4545
private:
46+
/** The ball texture */
4647
SDL_Texture *ball;
48+
49+
/** The pixel texture, used to draw lines */
4750
SDL_Texture *pixel; //used for drawing the line
4851

52+
/** Window Attributes. */
4953
WINATT window;
5054

5155
//Keeps track of which parts have been loaded
5256
//so when ending only the ones that are open
5357
//are closed
58+
/** If window is loaded */
5459
bool blnWindow;
60+
61+
/** If renderer is loaded */
5562
bool blnRenderer;
63+
64+
/** If ball image is loaded */
5665
bool blnBall;
66+
67+
/** If pixel image is loaded */
5768
bool blnPixel;
69+
70+
/** If SDL is started an without issues */
5871
bool bln_SDL_started;
5972

6073
SDL_Texture* loadIMG(std::string);

src/tick.cpp

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,45 @@
55
/**********************************************************************************************************************************************/
66
//Default Constructor
77
clsTick::clsTick() {
8+
/////////////////////////////////////////////////
9+
/// @brief Default constructor, just sets lngTimerStart to now
10+
/////////////////////////////////////////////////
11+
812
lngTimerStart = clock();
913
}
1014
/**********************************************************************************************************************************************/
1115
void clsTick::startTimer() {
16+
/////////////////////////////////////////////////
17+
/// @brief Sets lngTimerStart to now.
18+
/////////////////////////////////////////////////
19+
1220
lngTimerStart = clock();
1321
}
1422
/**********************************************************************************************************************************************/
1523
double clsTick::getTimeDifference() {
24+
/////////////////////////////////////////////////
25+
/// @brief Returns the difference (in seconds) from now to when lngTimerStart
26+
/// @return Time in Seconds
27+
/////////////////////////////////////////////////
28+
1629
double temp_time = (double)(((double)clock() - (double)lngTimerStart) / (double)CLOCKS_PER_SEC);
1730
startTimer();
1831
return temp_time;
1932
}
2033
/**********************************************************************************************************************************************/
2134
void clsTick::startHolding() {
35+
/////////////////////////////////////////////////
36+
/// @brief Sets lngTimerStart to now.
37+
/////////////////////////////////////////////////
2238
lngHoldingStart = clock();
2339
}
2440
/**********************************************************************************************************************************************/
2541
double clsTick::stopHolding() {
42+
/////////////////////////////////////////////////
43+
/// @brief Returns the difference (in seconds) from now to when lngHoldingStart
44+
/// @return Time in Seconds
45+
/////////////////////////////////////////////////
46+
2647
return (double)(((double)clock() - (double)lngHoldingStart) / (double)CLOCKS_PER_SEC);
2748
}
2849
/**********************************************************************************************************************************************/

src/tick.h

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,15 @@
66
#include <cstdio>
77
#include <cstdlib>
88
/**********************************************************************************************************************************************/
9-
namespace Global {extern const bool blnDebugMode;}
10-
/**********************************************************************************************************************************************/
11-
//typedef because reasons
12-
typedef unsigned char uchar;
13-
typedef unsigned int uint;
14-
typedef unsigned long ulong;
9+
#include "global.h"
1510
/**********************************************************************************************************************************************/
1611
class clsTick {
1712
private:
1813
//Members
14+
/** The time the ball positions were last updated at */
1915
clock_t lngTimerStart;
16+
17+
/** The time of the start of the mouse being held down */
2018
clock_t lngHoldingStart;
2119
public:
2220
//Default Constructor

0 commit comments

Comments
 (0)