J :
* A few bugfixes, a few pixel-precise adjustments.
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user