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
|
||||
|
||||
@@ -7,7 +7,6 @@ Features
|
||||
- for i: int = 0, i < 10, i+=1
|
||||
- for diff: array
|
||||
- iterator how to do this without function poly ? for it := iter_begin(), iter_valid(), iter_advance()
|
||||
- Defer
|
||||
- Expand macros
|
||||
|
||||
- Using directive to bring symbols into local scope
|
||||
@@ -168,11 +167,9 @@ int main(int argument_count, char **arguments) {
|
||||
}
|
||||
}
|
||||
printf("End of program\n");
|
||||
#if 1
|
||||
if (IsDebuggerPresent()) {
|
||||
Breakpoint;
|
||||
}
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user