Compare commits
2 Commits
bad48a8396
...
b79dd8e472
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b79dd8e472 | ||
|
|
7fac933066 |
3
init.lua
3
init.lua
@@ -126,7 +126,7 @@ end
|
||||
function render(ctx)
|
||||
engine.render.clear_color(engine.render.rgb(20, 20, 30))
|
||||
camera.begin()
|
||||
r_lib.draw_map()
|
||||
maps.draw_map_pre_entities()
|
||||
-- draw sign on top of map
|
||||
engine.render.draw_rect(sign.x - 6, sign.y - 6, 12, 12,
|
||||
engine.render.rgb(SIGN_R, SIGN_G, SIGN_B))
|
||||
@@ -142,6 +142,7 @@ function render(ctx)
|
||||
engine.render.rgb(PLAYER_R, PLAYER_G, PLAYER_B))
|
||||
-- P.3.6: highlights over selected entities (world-space)
|
||||
selection.render_highlights()
|
||||
maps.draw_map_post_entities()
|
||||
camera.finish()
|
||||
-- P.3.6: drag-box overlay (screen-space, after camera.finish)
|
||||
selection.render_drag_box()
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
"ci_frames": 30,
|
||||
"entry_point": "init.lua",
|
||||
"deps": [
|
||||
{"id":"lib-core.maps","version":"0.1.2"},
|
||||
{"id":"lib-core.maps","version":"0.2.0"},
|
||||
{"id":"lib-core.render","version":"0.1.0"},
|
||||
{"id":"lib-core.camera","version":"0.3.0"},
|
||||
{"id":"lib-core.selection","version":"0.1.0"},
|
||||
@@ -15,4 +15,4 @@
|
||||
{"id":"lib-core.interaction","version":"0.1.0"},
|
||||
{"id":"lib-core.command","version":"0.1.0"}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,23 +1,48 @@
|
||||
{
|
||||
"schema_version": 2,
|
||||
"id": "demo",
|
||||
"tilemap": "demo_tilemap",
|
||||
"size": {"w": 16, "h": 16},
|
||||
"tiles": [
|
||||
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
|
||||
2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,
|
||||
2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,
|
||||
2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,
|
||||
2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,
|
||||
2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,
|
||||
2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,
|
||||
2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,
|
||||
2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,
|
||||
2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,
|
||||
2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,
|
||||
2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,
|
||||
2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,
|
||||
2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,
|
||||
2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,
|
||||
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2
|
||||
]
|
||||
"size": { "w": 16, "h": 16 },
|
||||
"atlases": ["demo_tilemap"],
|
||||
"layers": {
|
||||
"surface": {
|
||||
"tiles": [
|
||||
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
||||
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
||||
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
||||
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
||||
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
||||
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
||||
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
||||
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
||||
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
||||
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
||||
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
||||
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
||||
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
||||
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
||||
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
|
||||
16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16
|
||||
]
|
||||
},
|
||||
"wall": {
|
||||
"tiles": [
|
||||
32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,
|
||||
32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,32,
|
||||
32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,32,
|
||||
32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,32,
|
||||
32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,32,
|
||||
32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,32,
|
||||
32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,32,
|
||||
32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,32,
|
||||
32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,32,
|
||||
32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,32,
|
||||
32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,32,
|
||||
32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,32,
|
||||
32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,32,
|
||||
32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,32,
|
||||
32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,32,
|
||||
32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user