mirror of https://github.com/skeeto/pixelcity.git
Added versioning info. Also some scattershot code cleanup.
This commit is contained in:
parent
361a716db6
commit
c2bd5f14da
|
@ -143,7 +143,7 @@ void CBuilding::RenderFlat (bool colored)
|
||||||
|
|
||||||
if (colored)
|
if (colored)
|
||||||
glColor3fv (&_color.red);
|
glColor3fv (&_color.red);
|
||||||
_mesh_flat->Render ();
|
//_mesh_flat->Render ();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -343,6 +343,7 @@ static void do_effects (int type)
|
||||||
radius = render_width / 16;
|
radius = render_width / 16;
|
||||||
do_progress ((float)render_width / 2, (float)render_height / 2, (float)radius, fade, EntityProgress ());
|
do_progress ((float)render_width / 2, (float)render_height / 2, (float)radius, fade, EntityProgress ());
|
||||||
RenderPrint (render_width / 2 - LOGO_PIXELS, render_height / 2 + LOGO_PIXELS, 0, glRgba (0.5f), "%1.2f%%", EntityProgress () * 100.0f);
|
RenderPrint (render_width / 2 - LOGO_PIXELS, render_height / 2 + LOGO_PIXELS, 0, glRgba (0.5f), "%1.2f%%", EntityProgress () * 100.0f);
|
||||||
|
RenderPrint (1, "%s v%d.%d.%03d", APP_TITLE, VERSION_MAJOR, VERSION_MINOR, VERSION_REVISION);
|
||||||
}
|
}
|
||||||
glPopMatrix ();
|
glPopMatrix ();
|
||||||
glMatrixMode (GL_PROJECTION);
|
glMatrixMode (GL_PROJECTION);
|
||||||
|
|
1
Render.h
1
Render.h
|
@ -15,6 +15,7 @@ bool RenderWireframe ();
|
||||||
void RenderWireframeToggle ();
|
void RenderWireframeToggle ();
|
||||||
void RenderHelpToggle ();
|
void RenderHelpToggle ();
|
||||||
void RenderPrint (int x, int y, int font, GLrgba color, const char *fmt, ...);
|
void RenderPrint (int x, int y, int font, GLrgba color, const char *fmt, ...);
|
||||||
|
void RenderPrint (int line, const char *fmt, ...);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
2
Win.cpp
2
Win.cpp
|
@ -389,7 +389,7 @@ void AppQuit ()
|
||||||
void AppInit (void)
|
void AppInit (void)
|
||||||
{
|
{
|
||||||
|
|
||||||
RandomInit (1);
|
RandomInit (time (NULL));
|
||||||
CameraInit ();
|
CameraInit ();
|
||||||
RenderInit ();
|
RenderInit ();
|
||||||
TextureInit ();
|
TextureInit ();
|
||||||
|
|
|
@ -212,7 +212,6 @@ static void build_road (int x1, int y1, int width, int depth)
|
||||||
claim (x1 + sidewalk, y1, lanes, depth, CLAIM_ROAD | MAP_ROAD_SOUTH);
|
claim (x1 + sidewalk, y1, lanes, depth, CLAIM_ROAD | MAP_ROAD_SOUTH);
|
||||||
claim (x1 + sidewalk + lanes + divider, y1, lanes, depth, CLAIM_ROAD | MAP_ROAD_NORTH);
|
claim (x1 + sidewalk + lanes + divider, y1, lanes, depth, CLAIM_ROAD | MAP_ROAD_NORTH);
|
||||||
}
|
}
|
||||||
//new CStreet (x1, y1, width, depth);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -401,6 +400,7 @@ static void do_reset (void)
|
||||||
GLrgba building_color;
|
GLrgba building_color;
|
||||||
float west_street, north_street, east_street, south_street;
|
float west_street, north_street, east_street, south_street;
|
||||||
|
|
||||||
|
//Re-init Random to make the same city each time. Good for debugging.
|
||||||
//RandomInit (6);
|
//RandomInit (6);
|
||||||
reset_needed = false;
|
reset_needed = false;
|
||||||
broadway_done = false;
|
broadway_done = false;
|
||||||
|
|
|
@ -74,12 +74,6 @@
|
||||||
#define EulOrdXYZr EulOrd(Z,EulParOdd,EulRepNo,EulFrmR)
|
#define EulOrdXYZr EulOrd(Z,EulParOdd,EulRepNo,EulFrmR)
|
||||||
#define EulOrdZYZr EulOrd(Z,EulParOdd,EulRepYes,EulFrmR)
|
#define EulOrdZYZr EulOrd(Z,EulParOdd,EulRepYes,EulFrmR)
|
||||||
|
|
||||||
//EulerAngles Eul_(float ai, float aj, float ah, int order);
|
|
||||||
//Quat Eul_ToQuat(EulerAngles ea);
|
|
||||||
//void Eul_ToHMatrix(EulerAngles ea, HMatrix M);
|
|
||||||
//EulerAngles Eul_FromHMatrix(HMatrix M, int order);
|
|
||||||
//EulerAngles Eul_FromQuat(Quat q, int order);
|
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <float.h>
|
#include <float.h>
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,6 @@ GLvector glVectorReflect (GLvector3 ray, GLvector3 normal)
|
||||||
float dot;
|
float dot;
|
||||||
|
|
||||||
dot = glVectorDotProduct (ray, normal);
|
dot = glVectorDotProduct (ray, normal);
|
||||||
//return glVectorSubtract (ray, glVectorScale (normal, 2.0f * dot));
|
|
||||||
return ray - (normal * (2.0f * dot));
|
return ray - (normal * (2.0f * dot));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue