Core: Add continue keyword

This commit is contained in:
Krzosa Karol
2023-04-21 08:02:58 +02:00
parent e6bf6b680e
commit 200b5e4f9f
11 changed files with 33 additions and 11 deletions

View File

@@ -197,14 +197,11 @@ MAP_PathFindStep :: (s: *MAP_Actor, compute_history: bool = true): bool
Add(&s.close_paths, it)
// @language_todo: Add continue keyword
// if x == 0 && y == 0 ;; continue
for y := -1, y <= 1, y += 1
for x := -1, x <= 1, x += 1
if (x == 0 && y == 0) == false
p := V2I{it.p.x + x, it.p.y + y}
MAP_InsertOpenPath(s, p, it.p)
if x == 0 && y == 0 ;; continue
p := V2I{it.p.x + x, it.p.y + y}
MAP_InsertOpenPath(s, p, it.p)
if compute_history ;; MAP_RecomputeHistory(s)
return false