Core RTS: Multiple actors

This commit is contained in:
Krzosa Karol
2023-04-19 10:35:57 +02:00
parent e1903a0331
commit 891221441e
2 changed files with 28 additions and 13 deletions

View File

@@ -155,11 +155,16 @@ main :: (): int
path_r := Rectangle{path_it.p.x->F32 * RectX, path_it.p.y->F32 * RectY, RectX, RectY}
DrawRectangleRec(path_r, ORANGE)
if actor_it.state == MAP_PATH_REACHED
for path_i := 0, path_i < actor_it.history.len, path_i += 1
path_it := actor_it.history.data + path_i
path_r := Rectangle{path_it.p.x->F32 * RectX, path_it.p.y->F32 * RectY, RectX, RectY}
DrawRectangleRec(path_r, BLACK)
for path_i := 0, path_i < actor_it.close_paths.len, path_i += 1
path_it := actor_it.close_paths.data + path_i
path_r := Rectangle{path_it.p.x->F32 * RectX, path_it.p.y->F32 * RectY, RectX, RectY}
DrawRectangleRec(path_r, BROWN)
MAP_RecomputeHistory(actor_it)
for path_i := 0, path_i < actor_it.history.len, path_i += 1
path_it := actor_it.history.data + path_i
path_r := Rectangle{path_it.p.x->F32 * RectX, path_it.p.y->F32 * RectY, RectX, RectY}
DrawRectangleRec(path_r, BLACK)
if Mode == 0 ;; DrawText("F1", 0, 0, 32, BLACK)