- enhancement: add raylib to autolinks

- enhancement: distribute raylib with integrated gcc
This commit is contained in:
Roy Qu 2022-01-09 19:33:34 +08:00
parent 7f3aea5940
commit 6a7789ff77
5 changed files with 101 additions and 1 deletions

View File

@ -4,6 +4,8 @@ Red Panda C++ Version 0.13.1
- fix: .rc file shouldn't be syntax checked - fix: .rc file shouldn't be syntax checked
- enhancement: auto save/restore size of the new project dialog - enhancement: auto save/restore size of the new project dialog
- fix: new project dialog's tab bar should fill all empty spaces - fix: new project dialog's tab bar should fill all empty spaces
- enhancement: add raylib to autolinks
- enhancement: distribute raylib with integrated gcc
Red Panda C++ Version 0.12.7 Red Panda C++ Version 0.12.7
- change: make current build system follow FHS specifications - change: make current build system follow FHS specifications

View File

@ -29,7 +29,7 @@
}, },
{ {
"header": "raylib.h", "header": "raylib.h",
"links": "-lraylib -lglfw3 -lopengl32 -lgdi32 -lopenal -lwinmm" "links": "-lraylib -lopengl32 -lgdi32 -lwinmm"
}, },
{ {
"header": "turtle.h", "header": "turtle.h",

BIN
templates/raylib.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

20
templates/raylib.template Normal file
View File

@ -0,0 +1,20 @@
[Template]
ver=2
Name=raylib
Name[zh_CN]=raylib
Icon=CL_Turtle.ico
Description=A simple program using raylib ( https://raylib.com )
Description[zh_CN]=简单的raylib程序 ( https://raylib.com )
Category=Multimedia
Category[zh_CN]=多媒体
[Unit0]
CName=main.c
C=raylib_c.txt
[Project]
UnitCount=1
Type=0
IsCpp=0
linker=-lraylib -lopengl32 -lgdi32 -lwinmm_@@__@@_

78
templates/raylib_c.txt Normal file
View File

@ -0,0 +1,78 @@
/*******************************************************************************************
*
* raylib [shapes] example - Draw basic shapes 2d (rectangle, circle, line...)
*
* This example has been created using raylib 1.0 (www.raylib.com)
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
*
* Copyright (c) 2014 Ramon Santamaria (@raysan5)
*
********************************************************************************************/
#include <raylib.h>
int main(void)
{
// Initialization
//--------------------------------------------------------------------------------------
const int screenWidth = 800;
const int screenHeight = 450;
InitWindow(screenWidth, screenHeight, "raylib [shapes] example - basic shapes drawing");
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(RAYWHITE);
DrawText("some basic shapes available on raylib", 20, 20, 20, DARKGRAY);
// Circle shapes and lines
DrawCircle(screenWidth/5, 120, 35, DARKBLUE);
DrawCircleGradient(screenWidth/5, 220, 60, GREEN, SKYBLUE);
DrawCircleLines(screenWidth/5, 340, 80, DARKBLUE);
// Rectangle shapes and ines
DrawRectangle(screenWidth/4*2 - 60, 100, 120, 60, RED);
DrawRectangleGradientH(screenWidth/4*2 - 90, 170, 180, 130, MAROON, GOLD);
DrawRectangleLines(screenWidth/4*2 - 40, 320, 80, 60, ORANGE); // NOTE: Uses QUADS internally, not lines
// Triangle shapes and lines
DrawTriangle((Vector2){screenWidth/4.0f *3.0f, 80.0f},
(Vector2){screenWidth/4.0f *3.0f - 60.0f, 150.0f},
(Vector2){screenWidth/4.0f *3.0f + 60.0f, 150.0f}, VIOLET);
DrawTriangleLines((Vector2){screenWidth/4.0f*3.0f, 160.0f},
(Vector2){screenWidth/4.0f*3.0f - 20.0f, 230.0f},
(Vector2){screenWidth/4.0f*3.0f + 20.0f, 230.0f}, DARKBLUE);
// Polygon shapes and lines
DrawPoly((Vector2){screenWidth/4.0f*3, 320}, 6, 80, 0, BROWN);
DrawPolyLinesEx((Vector2){screenWidth/4.0f*3, 320}, 6, 80, 0, 6, BEIGE);
// NOTE: We draw all LINES based shapes together to optimize internal drawing,
// this way, all LINES are rendered in a single draw pass
DrawLine(18, 42, screenWidth - 18, 42, BLACK);
EndDrawing();
//----------------------------------------------------------------------------------
}
// De-Initialization
//--------------------------------------------------------------------------------------
CloseWindow(); // Close window and OpenGL context
//--------------------------------------------------------------------------------------
return 0;
}