diff options
| author | ilotterytea <iltsu@alright.party> | 2024-12-10 17:24:57 +0500 |
|---|---|---|
| committer | ilotterytea <iltsu@alright.party> | 2024-12-10 17:24:57 +0500 |
| commit | 0a50b20f43c2abec41ba35c01f26ed5fa650e9f9 (patch) | |
| tree | 980d84a000c3a1cce18678cfacfa33b321fa2cbf /src/main.c | |
| parent | 6b7805045f943b92ca6d6239be600e6583bd982d (diff) | |
feat: init stars
Diffstat (limited to 'src/main.c')
| -rw-r--r-- | src/main.c | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -1,6 +1,15 @@ +#include "constants.h" #include "raylib.h" +#include "star.h" int main(int argc, char *argv[]) { + Star *stars[STAR_AMOUNT] = {}; + + for (int i = 0; i < STAR_AMOUNT; i++) { + Star star = {{0, 0, 0}, {20, 20}, 1.0, BLACK}; + stars[i] = ☆ + } + InitWindow(800, 600, "hyperspace (demo)"); SetTargetFPS(60); @@ -10,6 +19,14 @@ int main(int argc, char *argv[]) { ClearBackground(WHITE); DrawText("hi world!", GetScreenWidth() / 2.0 - 16 * 4, GetScreenHeight() / 2.0 - 16, 32, BLACK); + + for (int i = 0; i < sizeof(stars) / sizeof(stars[0]); i++) { + Star *star = stars[i]; + + DrawRectangle(star->position.x, star->position.y, star->size.x, + star->size.y, star->color); + } + EndDrawing(); } |
