]> git.lizzy.rs Git - shadowclad.git/blob - level.c
Only render axis indicator on the positive side of that axis
[shadowclad.git] / level.c
1 #include <GL/gl.h>
2 #include <stdlib.h>
3
4 #include "level.h"
5 #include "tga.h"
6
7 TGAimage* level_image = NULL;
8
9 Block get_block(GLushort x, GLushort y) {
10         if (level_image == NULL) {
11                 return BLOCK_EMPTY;
12         }
13         return ((Block*) (*level_image).bytes)[x * (*level_image).header.image_width + y];
14 }
15
16 void set_image(TGAimage* image) {
17         level_image = image;
18 }