Core: Array is now module
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#import "raylib.core"
|
||||
A :: #load "array.core"
|
||||
#import "LibC.core"
|
||||
A :: #import "array.core"
|
||||
MAP :: #load "map.core"
|
||||
sqrtf :: #foreign (value: F32): F32
|
||||
|
||||
@@ -54,6 +55,11 @@ main :: (): int
|
||||
target_color := RED
|
||||
target_color.a = 255/2
|
||||
|
||||
COLOR_SelectionBox := GREEN
|
||||
COLOR_SelectionBox.a = 255/2
|
||||
|
||||
COLOR_Selected := COLOR_SelectionBox
|
||||
|
||||
testing := 0
|
||||
for !WindowShouldClose()
|
||||
defer ;; testing += 1
|
||||
@@ -200,7 +206,7 @@ main :: (): int
|
||||
for actor_i := 0, actor_i < MouseSelectedActors.len, actor_i += 1
|
||||
actor_it := MouseSelectedActors.data[actor_i]
|
||||
actor_box := MAP.Rect(actor_it.p)
|
||||
DrawRectangleRec(actor_box, GREEN)
|
||||
DrawRectangleRec(actor_box, COLOR_Selected)
|
||||
|
||||
if IsMouseButtonPressed(MOUSE_BUTTON_RIGHT)
|
||||
p := MAP.ScreenToMap(MouseP)
|
||||
@@ -208,8 +214,6 @@ main :: (): int
|
||||
|
||||
if MouseSelecting
|
||||
A.Reset(&MouseSelectedActors)
|
||||
COLOR_SelectionBox := GREEN
|
||||
COLOR_SelectionBox.a = 255/2
|
||||
|
||||
for actor_i := 0, actor_i < map.actors.len, actor_i += 1
|
||||
actor_it := map.actors.data + actor_i
|
||||
|
||||
Reference in New Issue
Block a user