render: tile size is now configurable
authorLukas Krickl <lukas@krickl.dev>
Thu, 26 Feb 2026 06:19:02 +0000 (07:19 +0100)
committerLukas Krickl <lukas@krickl.dev>
Thu, 26 Feb 2026 06:19:02 +0000 (07:19 +0100)
src/r_assets.c
src/r_assets.h
src/r_render.c

index e8c0c2bec698595a271a3f9ba9e3c2a14aa5c8f4..f407f757b3acfba63840974f2da8f098ef87b542 100644 (file)
@@ -15,7 +15,7 @@ void r_asset_init_fallback_tile(void) {
 
        LRTS_UNUSED(border_mask);
        
-       for (i = 0; i < 8; i++) {
+       for (i = 0; i < R_TILE_H/2; i++) {
                draw_end = 4 * (i + 1);
 
                /* top row */
index 986c3b6215e42e7b803b184a0586b54a2007c522..4b1a11a312ca93fe117fb3f5224c410aa40bb0a7 100644 (file)
@@ -1,8 +1,8 @@
 #ifndef R_ASSETS_H__
 #define R_ASSETS_H__
 
-#define R_TILE_W 32
-#define R_TILE_H 16
+#define R_TILE_W 64
+#define R_TILE_H 32
 
 /**
  * This module contains asset descriptions
index fd90d28fdb0613487c1bea0a598faf4701436e79..0e07d0c0ce962b173467196a572df88aaab5721e 100644 (file)
@@ -34,8 +34,8 @@ void r_render_frame() {
        /* draw test tile */
        t.type = T_TILE_TYPE_GRASS;
 
-       for (i = 0; i < 1; i++) {
-               for (j = 0; j < 1; j++) {
+       for (i = 0; i < 16; i++) {
+               for (j = 0; j < 16; j++) {
                        r_draw_tile(&t, i, j);
                }
        }