a-game

2D platformer written from scratch.
git clone git://git.amin.space/a-game.git
Log | Files | Refs | README | LICENSE

commit 353eccaa7d05e4545bb3d68ee59b3a4f0bdea0f9
parent 57ecaa4dadad18e18bf815bdf6c4a5138d490318
Author: amin <dev@aminmesbah.com>
Date:   Sat,  6 Jul 2019 02:23:41 +0000

Use hideous test texture on solid blocks

FossilOrigin-Name: a1237885b89cbba5ae62c468c3ced9c077f9fed6fdfe34e12059efed8b1f043b
Diffstat:
Msrc/game.c | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/game.c b/src/game.c @@ -589,9 +589,11 @@ void game_update_and_render(struct GameMemory *game_memory, struct GameInput *ga v3 color; bool solid = world_tile_in_room_is_solid(current_room->tiles, tile_pos); + f32 tex_interp = 0.0f; if (solid) { color = (v3) {0.4f, 0.4f, 0.4f}; + tex_interp = 1.0f; } else { @@ -604,6 +606,7 @@ void game_update_and_render(struct GameMemory *game_memory, struct GameInput *ga .ebo = game_state->renderer.quad_ebo, .color = color, .model = model, + .tex_interp = tex_interp, .layer = RENDER_LAYER_TILES, }); }