cast ints to floats in terrain gen
This commit is contained in:
		| @@ -96,17 +96,17 @@ static void ingame_tick(struct state *state) { | ||||
|             float d3 = stb_perlin_noise3((float)x       * TERRAIN_FREQUENCY, (float)(y - 1) * TERRAIN_FREQUENCY, 0, 0, 0, 0) * 10 - 6; | ||||
|  | ||||
|             unfurl_triangle("/assets/grass.gif", | ||||
|                             (t_fvec3){ x, d0, y }, | ||||
|                             (t_fvec3){ x + 1, d1, y }, | ||||
|                             (t_fvec3){ x, d3, y - 1 }, | ||||
|                             (t_fvec3){ (float)x,     d0, (float)y }, | ||||
|                             (t_fvec3){ (float)x + 1, d1, (float)y }, | ||||
|                             (t_fvec3){ (float)x,     d3, (float)y - 1 }, | ||||
|                             (t_shvec2){ 0, 768 }, | ||||
|                             (t_shvec2){ 1024, 768 }, | ||||
|                             (t_shvec2){ 1024, 0 }); | ||||
|  | ||||
|             unfurl_triangle("/assets/grass.gif", | ||||
|                             (t_fvec3){ x + 1, d1, y }, | ||||
|                             (t_fvec3){ x + 1, d2, y - 1 }, | ||||
|                             (t_fvec3){ x, d3, y - 1 }, | ||||
|                             (t_fvec3){ (float)x + 1, d1, (float)y }, | ||||
|                             (t_fvec3){ (float)x + 1, d2, (float)y - 1 }, | ||||
|                             (t_fvec3){ (float)x,     d3, (float)y - 1 }, | ||||
|                             (t_shvec2){ 1024, 0 }, | ||||
|                             (t_shvec2){ 0, 0 }, | ||||
|                             (t_shvec2){ 0, 768 }); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user