INITIAL COMMIT
Simple hello world in raylib
This commit is contained in:
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
*.o
|
||||
*.out
|
||||
20
Makefile
Normal file
20
Makefile
Normal file
@@ -0,0 +1,20 @@
|
||||
CC=gcc
|
||||
CFLAGS=-Wall -Wextra -Wpedantic -ggdb -fsanitize=address -std=c11
|
||||
LIBS=-lm -lraylib
|
||||
OBJECTS=main.o
|
||||
OUT=simulation.out
|
||||
ARGS=
|
||||
|
||||
%.o: %.c
|
||||
$(CC) $(CFLAGS) -c $^ -o $@ $(LIBS)
|
||||
|
||||
$(OUT): $(OBJECTS)
|
||||
$(CC) $(CFLAGS) $^ -o $@ $(LIBS)
|
||||
|
||||
.PHONY:
|
||||
clean:
|
||||
rm -rfv $(OUT) $(OBJECTS)
|
||||
|
||||
.PHONY: run
|
||||
run: $(OUT)
|
||||
./$^ $(ARGS)
|
||||
29
main.c
Normal file
29
main.c
Normal file
@@ -0,0 +1,29 @@
|
||||
/* main.c
|
||||
* Created: 2023-09-02
|
||||
* Author: Aryadev Chavali
|
||||
* Description: Entrypoint of program
|
||||
*/
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <raylib.h>
|
||||
#include <raymath.h>
|
||||
|
||||
#define WIDTH 512
|
||||
#define HEIGHT 512
|
||||
|
||||
int main(void)
|
||||
{
|
||||
InitWindow(WIDTH, HEIGHT, "Mandelbrot simulation");
|
||||
for (size_t ticks = 0; !WindowShouldClose(); ++ticks)
|
||||
{
|
||||
BeginDrawing();
|
||||
ClearBackground(BLACK);
|
||||
DrawText("Hello, world!", 100, 100, 50, RAYWHITE);
|
||||
EndDrawing();
|
||||
}
|
||||
CloseWindow();
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user