diff --git a/JGE/src/JLBFont.cpp b/JGE/src/JLBFont.cpp index a7feb3e18..d9fa89824 100644 --- a/JGE/src/JLBFont.cpp +++ b/JGE/src/JLBFont.cpp @@ -113,6 +113,8 @@ void JLBFont::DrawString(const char *string, float x, float y, int align) else if (align == JGETEXT_CENTER) dx -= width/2; + dx = floorf(dx) + 0.1; + dy = floorf(dy); int index; while (*p) { diff --git a/JGE/src/Xmain.cpp b/JGE/src/Xmain.cpp index 96d4aab4a..b15ac9edf 100644 --- a/JGE/src/Xmain.cpp +++ b/JGE/src/Xmain.cpp @@ -172,7 +172,6 @@ void DestroyGame(void) void KillGLWindow(void) // Properly Kill The Window { - DestroyGame(); if (gXWindow && gXDisplay) XDestroyWindow(gXDisplay, gXWindow); gXWindow = NULL; @@ -252,6 +251,9 @@ BOOL CreateGLWindow(char* title, int width, int height, int bits __attribute__(( // Bind the GLX context to the Window glXMakeContextCurrent(gXDisplay, glxWin, glxWin, context); + free(vInfo); + free(fbConfigs); + SizeGLScene(width, height); if (!InitGL()) { @@ -259,12 +261,6 @@ BOOL CreateGLWindow(char* title, int width, int height, int bits __attribute__(( printf("Initializing GL failed."); return false; } - if (!InitGame()) - { - KillGLWindow(); - printf("Initializing game failed."); - return false; - } return true; } @@ -474,6 +470,7 @@ int main(int argc, char* argv[]) delete g_launcher; // Shutdown + DestroyGame(); KillGLWindow(); // Kill The Window return 0; } diff --git a/JGE/src/hge/hgeparticle.cpp b/JGE/src/hge/hgeparticle.cpp index 58f9a3754..893ec617b 100644 --- a/JGE/src/hge/hgeparticle.cpp +++ b/JGE/src/hge/hgeparticle.cpp @@ -80,6 +80,7 @@ hgeParticleSystem::hgeParticleSystem(const char *filename, JQuad *sprite) fEmissionResidue=0.0f; nParticlesAlive=0; fAge=-2.0; + mTimer = 0.0f; rectBoundingBox.Clear(); bUpdateBoundingBox=false; @@ -98,6 +99,7 @@ hgeParticleSystem::hgeParticleSystem(hgeParticleSystemInfo *psi) fEmissionResidue=0.0f; nParticlesAlive=0; fAge=-2.0; + mTimer = 0.0f; rectBoundingBox.Clear(); bUpdateBoundingBox=false; diff --git a/JGE/src/win/JRenderer_Win.cpp b/JGE/src/win/JRenderer_Win.cpp index 4ad7256e4..db6baaf95 100644 --- a/JGE/src/win/JRenderer_Win.cpp +++ b/JGE/src/win/JRenderer_Win.cpp @@ -1294,7 +1294,7 @@ void JRenderer::Enable2D() glMatrixMode (GL_PROJECTION); // Select The Projection Matrix glLoadIdentity (); // Reset The Projection Matrix - gluOrtho2D(0.0f, SCREEN_WIDTH_F-1.0f, 0.0f, SCREEN_HEIGHT_F-1.0f); + gluOrtho2D(0.0f, SCREEN_WIDTH_F, 0.0f, SCREEN_HEIGHT_F-1.0f); glMatrixMode (GL_MODELVIEW); // Select The Modelview Matrix glLoadIdentity (); // Reset The Modelview Matrix