cleanup / refactor / profiled

This commit is contained in:
Charles J. Cliffe
2014-12-23 01:12:14 -05:00
parent 703501f32d
commit 8ce3065bce
13 changed files with 50 additions and 74 deletions
+3 -3
View File
@@ -5,7 +5,7 @@
#include <algorithm>
GLFontChar::GLFontChar() :
id(0), x(0), y(0), width(0), height(0), xadvance(0), xoffset(0), yoffset(0), index(0), aspect(1) {
id(0), x(0), y(0), width(0), height(0), xoffset(0), yoffset(0), xadvance(0), aspect(1), index(0) {
}
@@ -96,7 +96,7 @@ int GLFontChar::getIndex() {
}
GLFont::GLFont() :
numCharacters(0), imageHeight(0), imageWidth(0), base(0), lineHeight(0), texId(0), loaded(false) {
numCharacters(0), lineHeight(0), base(0), imageWidth(0), imageHeight(0), loaded(false), texId(0) {
}
@@ -289,7 +289,7 @@ void GLFont::loadFont(std::string fontFile) {
unsigned int ofs = 0;
for (char_i = characters.begin(); char_i != characters.end(); char_i++) {
int charId = (*char_i).first;
// int charId = (*char_i).first;
GLFontChar *fchar = (*char_i).second;
float faspect = fchar->getAspect();
+4 -6
View File
@@ -5,14 +5,12 @@
class MouseTracker {
public:
MouseTracker(wxWindow *target) :
target(target), mouseX(0), mouseY(0), lastMouseX(0), lastMouseY(0), originMouseX(0), originMouseY(0), deltaMouseX(0), deltaMouseY(0), isMouseDown(
false), vertDragLock(false), horizDragLock(false), isMouseInView(false) {
mouseX(0), mouseY(0), lastMouseX(0), lastMouseY(0), originMouseX(0), originMouseY(0), deltaMouseX(0), deltaMouseY(0), vertDragLock(false), horizDragLock(false), isMouseDown(false), isMouseInView(false), target(target) {
}
MouseTracker() :
target(NULL), mouseX(0), mouseY(0), lastMouseX(0), lastMouseY(0), originMouseX(0), originMouseY(0), deltaMouseX(0), deltaMouseY(0), isMouseDown(
false), vertDragLock(false), horizDragLock(false), isMouseInView(false) {
mouseX(0), mouseY(0), lastMouseX(0), lastMouseY(0), originMouseX(0), originMouseY(0), deltaMouseX(0), deltaMouseY(0), vertDragLock(false), horizDragLock(false), isMouseDown(false), isMouseInView(false), target(NULL) {
}
@@ -43,10 +41,10 @@ public:
private:
float mouseX, mouseY;
float lastMouseX, lastMouseY;
float deltaMouseX, deltaMouseY;
float originMouseX, originMouseY;
float deltaMouseX, deltaMouseY;
bool isMouseDown, isMouseInView;
bool vertDragLock, horizDragLock;
bool isMouseDown, isMouseInView;
wxWindow *target;
};
+1 -1
View File
@@ -5,7 +5,7 @@
#include <mmsystem.h>
#endif
Timer::Timer(void) : time_elapsed(0), system_milliseconds(0), start_time(0), end_time(0), last_update(0), paused_time(0), offset(0), paused_state(false), num_updates(0), lock_state(0), lock_rate(0)
Timer::Timer(void) : time_elapsed(0), system_milliseconds(0), start_time(0), end_time(0), last_update(0), num_updates(0), paused_time(0), offset(0), paused_state(false), lock_state(0), lock_rate(0)
{
}