Core: New unique_name scheme, more human friendly

This commit is contained in:
Krzosa Karol
2023-04-21 14:44:13 +02:00
parent 2578a2a31a
commit 32cda2b59e
12 changed files with 109 additions and 59 deletions

View File

@@ -45,17 +45,9 @@ guys: Array(Guy)
Add(&guys, {100, 100})
*/
/* @language_todo: Namespacing
this requires parent_decl in scopes, we use first namespace(main module has precedence) declaration to
prefix all functions, globals etc. in a given file / module.
*/
#import "raylib.core"
#load "array.core"
MAP :: #load "map.core"
sqrtf :: #foreign (value: F32): F32
V2I :: struct

View File

@@ -75,7 +75,7 @@ SetTargetP :: (s: *Actor, p: V2I)
Reset(&s.close_paths)
GetRandomP :: (m: *Map): V2I
result := V2I{GetRandomValue(0, CurrentMap.x - 1), GetRandomValue(0, CurrentMap.y - 1)}
result: V2I = {GetRandomValue(0, CurrentMap.x - 1), GetRandomValue(0, CurrentMap.y - 1)}
return result
GetRandomUnblockedP :: (m: *Map): V2I