tavli

changeset 8:464c45a0bc24

mesgen stats
author John Tsiombikas <nuclear@member.fsf.org>
date Fri, 26 Jun 2015 05:33:38 +0300
parents f1ecc2439802
children 8a167149985d
files src/board.cc src/game.cc
diffstat 2 files changed, 11 insertions(+), 2 deletions(-) [+]
line diff
     1.1 --- a/src/board.cc	Fri Jun 26 05:23:46 2015 +0300
     1.2 +++ b/src/board.cc	Fri Jun 26 05:33:38 2015 +0300
     1.3 @@ -183,6 +183,15 @@
     1.4  	obj.push_back(dbgobj);
     1.5  	*/
     1.6  
     1.7 +	// meshgen stats
     1.8 +	printf("Generated board:\n  %u meshes\n", (unsigned int)obj.size());
     1.9 +	unsigned int polycount = 0;
    1.10 +	for(size_t i=0; i<obj.size(); i++) {
    1.11 +		const Mesh *m = obj[i]->get_mesh();
    1.12 +		polycount += m->get_poly_count();
    1.13 +	}
    1.14 +	printf("  %u polygons\n", polycount);
    1.15 +
    1.16  	return true;
    1.17  }
    1.18  
    1.19 @@ -249,7 +258,7 @@
    1.20  	static const Vector3 wcol2 = Vector3(0.53, 0.32, 0.1);
    1.21  	static const Vector3 wcol3 = Vector3(0.38, 0.25, 0.08);
    1.22  
    1.23 -	img_field.create(512, 1024);
    1.24 +	img_field.create(1024, 1024);
    1.25  	unsigned char *pptr = img_field.pixels;
    1.26  	for(int i=0; i<img_field.height; i++) {
    1.27  		float v = (float)i / (float)img_field.height;
     2.1 --- a/src/game.cc	Fri Jun 26 05:23:46 2015 +0300
     2.2 +++ b/src/game.cc	Fri Jun 26 05:33:38 2015 +0300
     2.3 @@ -9,7 +9,7 @@
     2.4  
     2.5  static Board board;
     2.6  
     2.7 -static float cam_theta, cam_phi = 25, cam_dist = 3;
     2.8 +static float cam_theta, cam_phi = 45, cam_dist = 3;
     2.9  static bool bnstate[8];
    2.10  static int prev_x, prev_y;
    2.11