Core Compiler: Fix type incomplete polymorph, work on RTS
This commit is contained in:
24
build/rtsgame/map.core
Normal file
24
build/rtsgame/map.core
Normal file
@@ -0,0 +1,24 @@
|
||||
|
||||
MAP_CurrentMap: MAP_Map
|
||||
|
||||
|
||||
MAP_Tile :: int
|
||||
MAP_Map :: struct
|
||||
data: *MAP_Tile
|
||||
x: int
|
||||
y: int
|
||||
actors: Array(Actor)
|
||||
|
||||
Actor :: struct
|
||||
p: V2I
|
||||
target_p: V2I
|
||||
|
||||
|
||||
MAP_Init :: ()
|
||||
MAP_X :: 60
|
||||
MAP_Y :: 40
|
||||
|
||||
map_data: [MAP_X*MAP_Y]int
|
||||
MAP_CurrentMap = MAP_Map{data = &map_data[0], x = MAP_X, y = MAP_Y}
|
||||
Add(&MAP_CurrentMap.actors, {{4, 4}, {8, 8}})
|
||||
|
||||
Reference in New Issue
Block a user