summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorjussi2023-02-06 23:03:39 +0200
committerjussi2023-02-06 23:03:39 +0200
commitdb957a8181497a25e52328882e6e0f98d6551d0b (patch)
tree583aa051b304c04457d8eba4e7ec238c04b5dcd7 /examples
parent7e61bffe5f313599423ad3cf88b0e44329de7dd2 (diff)
downloadreilua-enhanced-db957a8181497a25e52328882e6e0f98d6551d0b.tar.gz
reilua-enhanced-db957a8181497a25e52328882e6e0f98d6551d0b.tar.bz2
reilua-enhanced-db957a8181497a25e52328882e6e0f98d6551d0b.zip
RL_LoadFontEx.
Diffstat (limited to 'examples')
-rw-r--r--examples/dungeon_crawler/main.lua19
-rw-r--r--examples/resources/images/ui_border.pngbin1170 -> 6014 bytes
2 files changed, 10 insertions, 9 deletions
diff --git a/examples/dungeon_crawler/main.lua b/examples/dungeon_crawler/main.lua
index 546c8ef..bfc98e1 100644
--- a/examples/dungeon_crawler/main.lua
+++ b/examples/dungeon_crawler/main.lua
@@ -9,6 +9,7 @@ local winScale = 4
local framebuffer = -1
local TILE_SIZE = 32
+local TILE_VERTEX_COLORS = { WHITE, WHITE, WHITE, WHITE }
local FLOOR = 1
local CEILING = 2
@@ -105,22 +106,22 @@ function draw()
-- Floor and ceiling.
for x = 0, 3 do
for y = 0, 10 do
- RL_DrawQuad3DTexture( texture, getTileVer( x, y, FLOOR ), getTexCoords( 1, 0 ), WHITE )
- RL_DrawQuad3DTexture( texture, getTileVer( x, y, CEILING ), getTexCoords( 2, 0 ), WHITE )
+ RL_DrawQuad3DTexture( texture, getTileVer( x, y, FLOOR ), getTexCoords( 1, 0 ), TILE_VERTEX_COLORS )
+ RL_DrawQuad3DTexture( texture, getTileVer( x, y, CEILING ), getTexCoords( 2, 0 ), TILE_VERTEX_COLORS )
end
end
-- Walls.
- RL_DrawQuad3DTexture( texture, getTileVer( 0, 0, WALL_N ), getTexCoords( 0, 0 ), WHITE )
- RL_DrawQuad3DTexture( texture, getTileVer( 1, 0, WALL_N ), getTexCoords( 0, 2 ), WHITE )
- RL_DrawQuad3DTexture( texture, getTileVer( 2, 0, WALL_N ), getTexCoords( 2, 2 ), WHITE )
- RL_DrawQuad3DTexture( texture, getTileVer( 3, 0, WALL_N ), getTexCoords( 0, 0 ), WHITE )
+ RL_DrawQuad3DTexture( texture, getTileVer( 0, 0, WALL_N ), getTexCoords( 0, 0 ), TILE_VERTEX_COLORS )
+ RL_DrawQuad3DTexture( texture, getTileVer( 1, 0, WALL_N ), getTexCoords( 0, 2 ), TILE_VERTEX_COLORS )
+ RL_DrawQuad3DTexture( texture, getTileVer( 2, 0, WALL_N ), getTexCoords( 2, 2 ), TILE_VERTEX_COLORS )
+ RL_DrawQuad3DTexture( texture, getTileVer( 3, 0, WALL_N ), getTexCoords( 0, 0 ), TILE_VERTEX_COLORS )
for x = 0, 3 do
- RL_DrawQuad3DTexture( texture, getTileVer( x, 10, WALL_S ), getTexCoords( 0, 0 ), WHITE )
+ RL_DrawQuad3DTexture( texture, getTileVer( x, 10, WALL_S ), getTexCoords( 0, 0 ), TILE_VERTEX_COLORS )
end
for y = 0, 10 do
- RL_DrawQuad3DTexture( texture, getTileVer( 0, y, WALL_W ), getTexCoords( 0, 0 ), WHITE )
- RL_DrawQuad3DTexture( texture, getTileVer( 3, y, WALL_E ), getTexCoords( 0, 0 ), WHITE )
+ RL_DrawQuad3DTexture( texture, getTileVer( 0, y, WALL_W ), getTexCoords( 0, 0 ), TILE_VERTEX_COLORS )
+ RL_DrawQuad3DTexture( texture, getTileVer( 3, y, WALL_E ), getTexCoords( 0, 0 ), TILE_VERTEX_COLORS )
end
drawSprites()
diff --git a/examples/resources/images/ui_border.png b/examples/resources/images/ui_border.png
index 85936fc..785a8f5 100644
--- a/examples/resources/images/ui_border.png
+++ b/examples/resources/images/ui_border.png
Binary files differ