summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorjussi2025-09-18 15:30:12 +0300
committerjussi2025-09-18 15:30:12 +0300
commit77ba40f97e6176e5bdeccf632ea17cb3121a0333 (patch)
tree149d054950d8d7b8612a76c5e6090a99b13c485b /examples
parent3f27d9037d860dd0c9f1a06d76a60fd0e2142de9 (diff)
downloadreilua-enhanced-77ba40f97e6176e5bdeccf632ea17cb3121a0333.tar.gz
reilua-enhanced-77ba40f97e6176e5bdeccf632ea17cb3121a0333.tar.bz2
reilua-enhanced-77ba40f97e6176e5bdeccf632ea17cb3121a0333.zip
Fixed fast_tilemap and texture_atlas_repeat examples.
Diffstat (limited to 'examples')
-rw-r--r--examples/fast_tilemap/main.lua2
-rw-r--r--examples/texture_atlas_repeat/main.lua4
2 files changed, 3 insertions, 3 deletions
diff --git a/examples/fast_tilemap/main.lua b/examples/fast_tilemap/main.lua
index da7fdbf..4ba209c 100644
--- a/examples/fast_tilemap/main.lua
+++ b/examples/fast_tilemap/main.lua
@@ -39,7 +39,7 @@ local function setTile( meshData, pos, texcoord )
local texelSize = Vector2:new( 1 / tilemap.texSize.x, 1 / tilemap.texSize.y )
for i, v in ipairs( QUAD.VERTICES ) do
- table.insert( meshData.vertices, ( pos + v ):scale( tilemap.tileSize ) )
+ table.insert( meshData.vertices, ( Vector3:temp( pos.x + v.x, pos.y + v.y, 0 ) ):scale( tilemap.tileSize ) )
table.insert( meshData.texcoords, ( QUAD.TEXCOORDS[i] + texcoord ) * texelSize:scale( tilemap.tileSize ) )
table.insert( meshData.colors, RL.WHITE )
end
diff --git a/examples/texture_atlas_repeat/main.lua b/examples/texture_atlas_repeat/main.lua
index 6056e71..b0b9499 100644
--- a/examples/texture_atlas_repeat/main.lua
+++ b/examples/texture_atlas_repeat/main.lua
@@ -28,8 +28,8 @@ function RL.draw()
RL.ClearBackground( RL.RAYWHITE )
RL.BeginShaderMode( shader )
- RL.DrawTexturePro( atlas, { 0, 0, 32, 32 }, { 0, 0, 64, 64 }, { 0.0 }, 0.0, RL.WHITE )
- RL.DrawTexturePro( atlas, { 32, 0, 32, 32 }, { 0, 64, 128, 64 }, { 0.0 }, 0.0, RL.WHITE )
+ RL.DrawTexturePro( atlas, { 0, 0, 32, 32 }, { 0, 0, 64, 64 }, { 0.0, 0.0 }, 0.0, RL.WHITE )
+ RL.DrawTexturePro( atlas, { 32, 0, 32, 32 }, { 0, 64, 128, 64 }, { 0.0, 0.0 }, 0.0, RL.WHITE )
RL.DrawTriangle( { 32, 200 }, { 128, 400 }, { 320, 240 }, RL.WHITE )
RL.EndShaderMode()
end