summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorrealtradam <[email protected]>2023-07-30 20:20:11 -0400
committerrealtradam <[email protected]>2023-07-30 20:20:11 -0400
commit82229540666b12588d5452b4f8a40ed7fc233dea (patch)
treec7a5cbecb79dfbf6b164d41bb887540a3e8185f4
downloadkobold_sample-82229540666b12588d5452b4f8a40ed7fc233dea.tar.gz
kobold_sample-82229540666b12588d5452b4f8a40ed7fc233dea.zip
init
-rw-r--r--.gitignore3
-rw-r--r--.kobold12
-rw-r--r--Makefile16
-rw-r--r--main.c69
4 files changed, 100 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..94e44ef
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+game
+raygui
+raylib
diff --git a/.kobold b/.kobold
new file mode 100644
index 0000000..53d7068
--- /dev/null
+++ b/.kobold
@@ -0,0 +1,12 @@
+[kobold_config]
+format_version = 0.1.0
+
+[raysan5/raylib]
+source = https://github.com
+commit = 'd3ea64983212f7451a9cfbf644da8a5c43dbc706'
+dir = ./
+
+[raysan5/raygui]
+source = https://github.com
+commit = '3d20f06bf29cc764afdc40ad773031e57030fe34'
+dir = ./
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..f87b1e9
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,16 @@
+
+.PHONY: all build run raylib
+
+all: build run
+
+pull:
+ kobold
+
+raylib: pull
+ (cd raylib/src; make)
+
+build: raylib
+ cc main.c -Iraygui/src -Lraylib/src/raylib -lraylib -lGL -lm -lpthread -ldl -lrt -lX11 -o game
+
+run:
+ ./game
diff --git a/main.c b/main.c
new file mode 100644
index 0000000..ac7540b
--- /dev/null
+++ b/main.c
@@ -0,0 +1,69 @@
+/*******************************************************************************************
+*
+* raylib [core] example - Basic window
+*
+* Welcome to raylib!
+*
+* To test examples, just press F6 and execute raylib_compile_execute script
+* Note that compiled executable is placed in the same folder as .c file
+*
+* You can find all basic examples on C:\raylib\raylib\examples folder or
+* raylib official webpage: www.raylib.com
+*
+* Enjoy using raylib. :)
+*
+* Example originally created with raylib 1.0, last time updated with raylib 1.0
+*
+* Example licensed under an unmodified zlib/libpng license, which is an OSI-certified,
+* BSD-like license that allows static linking with closed source software
+*
+* Copyright (c) 2013-2023 Ramon Santamaria (@raysan5)
+*
+********************************************************************************************/
+
+#include "raylib.h"
+#define RAYGUI_IMPLEMENTATION
+#include "raygui.h"
+
+//------------------------------------------------------------------------------------
+// Program main entry point
+//------------------------------------------------------------------------------------
+int main(void)
+{
+ // Initialization
+ //--------------------------------------------------------------------------------------
+ const int screenWidth = 800;
+ const int screenHeight = 450;
+
+ InitWindow(screenWidth, screenHeight, "raylib [core] example - basic window");
+
+ SetTargetFPS(60); // Set our game to run at 60 frames-per-second
+ //--------------------------------------------------------------------------------------
+ // Main game loop
+ while (!WindowShouldClose()) // Detect window close button or ESC key
+ {
+ // Update
+ //----------------------------------------------------------------------------------
+ // TODO: Update your variables here
+ //----------------------------------------------------------------------------------
+
+ // Draw
+ //----------------------------------------------------------------------------------
+ BeginDrawing();
+ ClearBackground(GetColor(GuiGetStyle(DEFAULT, BACKGROUND_COLOR)));
+
+ GuiWindowBox((Rectangle){100, 100, 600, 300},"Sample Kobold Project");
+
+ DrawText("Congrats! You created your first window!", 190, 200, 20, LIGHTGRAY);
+
+ EndDrawing();
+ //----------------------------------------------------------------------------------
+ }
+
+ // De-Initialization
+ //--------------------------------------------------------------------------------------
+ CloseWindow(); // Close window and OpenGL context
+ //--------------------------------------------------------------------------------------
+
+ return 0;
+}