Customised example executable for project
This commit is contained in:
parent
ea8aca10d3
commit
f2a478ddab
18
README.md
18
README.md
@ -14,11 +14,11 @@ I guess we just don't want the added headache. CMake is complex and sometimes fe
|
|||||||
So that being said, we hope that this repository finds you well and wholeheartedly enjoying the *simple things in life* (i.e. video games programming).
|
So that being said, we hope that this repository finds you well and wholeheartedly enjoying the *simple things in life* (i.e. video games programming).
|
||||||
|
|
||||||
### Current Compatibility
|
### Current Compatibility
|
||||||
| OS | Default Compiler | Last Built On | Status |
|
| OS | Default Compiler | Last Manual Build | Compile Status |
|
||||||
| ----------- | ---------------- | ------------------ | -------- |
|
| ----------- | ---------------- | ------------------- | ---------------- |
|
||||||
| **macOS** | Clang++ | `Big Sur 11.0.1` |  |
|
| **macOS** | Clang++ | `Big Sur 11.0.1` |  |
|
||||||
| **Linux** | G++ | `Ubuntu 20.04 LTS` |  |
|
| **Linux** | G++ | `Ubuntu 20.04 LTS` |  |
|
||||||
| **Windows** | MinGW (G++) | `Windows 10 19041` |  |
|
| **Windows** | MinGW (G++) | `Windows 10 19041` |  |
|
||||||
|
|
||||||
## Getting Started
|
## Getting Started
|
||||||
|
|
||||||
@ -70,14 +70,6 @@ Unfortunately **we do not yet have automated project setup configured for Window
|
|||||||
- It is recommended that your code should go into the `/src` directory, which is automatically included in the compile process when you run `make`.
|
- It is recommended that your code should go into the `/src` directory, which is automatically included in the compile process when you run `make`.
|
||||||
- If you wish to change the program entry point from `/src/main.cpp`, add more libraries, or really anything about your project, all build instructions are specified in the `Makefile` no smoke and mirrors!
|
- If you wish to change the program entry point from `/src/main.cpp`, add more libraries, or really anything about your project, all build instructions are specified in the `Makefile` no smoke and mirrors!
|
||||||
|
|
||||||
## Todo
|
|
||||||
- [x] Get static linking to work with C++ bindings
|
|
||||||
- [x] Setup for at least one compiler on each platform
|
|
||||||
- [x] Add raylib-cpp as vendor for procedural builds and auto-updating
|
|
||||||
- [x] Set up CI/CD with GitHub Actions and Make
|
|
||||||
- [ ] Test with multiple compilers on each platform
|
|
||||||
- [ ] Add compiler specification options
|
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
### How do I contribute?
|
### How do I contribute?
|
||||||
|
18
src/main.cpp
18
src/main.cpp
@ -1,34 +1,28 @@
|
|||||||
#include <raylib-cpp.hpp>
|
#include <raylib-cpp.hpp>
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
|
|
||||||
// Initialization
|
// Initialization
|
||||||
//--------------------------------------------------------------------------------------
|
|
||||||
int screenWidth = 800;
|
int screenWidth = 800;
|
||||||
int screenHeight = 450;
|
int screenHeight = 450;
|
||||||
raylib::Color textColor(LIGHTGRAY);
|
|
||||||
raylib::Window w(screenWidth, screenHeight, "raylib [core] example - basic window");
|
|
||||||
|
|
||||||
|
raylib::Color textColor(LIGHTGRAY);
|
||||||
|
raylib::Window w(screenWidth, screenHeight, "Raylib C++ Starter Kit Example");
|
||||||
|
|
||||||
SetTargetFPS(60);
|
SetTargetFPS(60);
|
||||||
//--------------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
// Main game loop
|
// Main game loop
|
||||||
while (!w.ShouldClose()) // Detect window close button or ESC key
|
while (!w.ShouldClose()) // Detect window close button or ESC key
|
||||||
{
|
{
|
||||||
// Update
|
// Update
|
||||||
//----------------------------------------------------------------------------------
|
|
||||||
// TODO: Update your variables here
|
// TODO: Update your variables here
|
||||||
//----------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
// Draw
|
// Draw
|
||||||
//----------------------------------------------------------------------------------
|
|
||||||
BeginDrawing();
|
BeginDrawing();
|
||||||
|
|
||||||
ClearBackground(RAYWHITE);
|
ClearBackground(RAYWHITE);
|
||||||
|
|
||||||
textColor.DrawText("Congrats! You created your first window!", 190, 200, 20);
|
textColor.DrawText("Congrats! You created your first window!", 190, 200, 20);
|
||||||
|
|
||||||
EndDrawing();
|
EndDrawing();
|
||||||
//----------------------------------------------------------------------------------
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user