wolf: add minimap
This commit is contained in:
parent
834b40e932
commit
3d0bb789de
1 changed files with 8 additions and 2 deletions
|
|
@ -1,3 +1,4 @@
|
|||
--[[pod_format="raw",created="2026-02-10 12:09:44",modified="2026-02-10 12:27:08",revision=2]]
|
||||
player = {
|
||||
origin = {
|
||||
x= nil,
|
||||
|
|
@ -25,7 +26,12 @@ function _init()
|
|||
end
|
||||
|
||||
function cast_ray(origin, angle)
|
||||
|
||||
|
||||
end
|
||||
|
||||
function draw_minimap()
|
||||
local tile_size = 4
|
||||
map(0, 0, 20, 20, 31, 31, 0x0000, tile_size, tile_size)
|
||||
end
|
||||
|
||||
function _draw()
|
||||
|
|
@ -37,5 +43,5 @@ function _draw()
|
|||
local angle = (player.dir-(fov/2) + x * angle_step) % (2 * math.pi)
|
||||
local bloc, dist = cast_ray(player.origin, angle)
|
||||
end
|
||||
-- map()
|
||||
draw_minimap()
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue