generated from rpuzonas/raylib-cpp-template
remove raylib-cpp dependency
This commit is contained in:
parent
43d09a64ca
commit
f6780a1a29
3
.gitmodules
vendored
3
.gitmodules
vendored
@ -1,6 +1,3 @@
|
|||||||
[submodule "depends/raylib-cpp"]
|
|
||||||
path = depends/raylib-cpp
|
|
||||||
url = https://github.com/robloach/raylib-cpp
|
|
||||||
[submodule "depends/raylib"]
|
[submodule "depends/raylib"]
|
||||||
path = depends/raylib
|
path = depends/raylib
|
||||||
url = https://github.com/raysan5/raylib
|
url = https://github.com/raysan5/raylib
|
||||||
|
3
Makefile
3
Makefile
@ -14,7 +14,7 @@ WEB_HEAP_SIZE := 335544320
|
|||||||
WEB_STACK_SIZE := 196608
|
WEB_STACK_SIZE := 196608
|
||||||
WEB_SHELL := src/shell.html
|
WEB_SHELL := src/shell.html
|
||||||
|
|
||||||
DEBUG_MODE := no
|
DEBUG_MODE := yes
|
||||||
|
|
||||||
COMPILER_FLAGS := -std=c++17 -Wno-enum-compare -O3 -flto -msse4.2 -mavx
|
COMPILER_FLAGS := -std=c++17 -Wno-enum-compare -O3 -flto -msse4.2 -mavx
|
||||||
COMPILER_FLAGS += -DRPROF_IMPLEMENTATION
|
COMPILER_FLAGS += -DRPROF_IMPLEMENTATION
|
||||||
@ -40,7 +40,6 @@ EMSDK_PATH := $(SUBMODULES_PATH)/emsdk
|
|||||||
RAYLIB_PLATFORM := PLATFORM_DESKTOP
|
RAYLIB_PLATFORM := PLATFORM_DESKTOP
|
||||||
|
|
||||||
COMPILER_FLAGS += -I$(SUBMODULES_PATH)/raylib/src
|
COMPILER_FLAGS += -I$(SUBMODULES_PATH)/raylib/src
|
||||||
COMPILER_FLAGS += -I$(SUBMODULES_PATH)/raylib-cpp/include
|
|
||||||
|
|
||||||
ifeq ($(OS), Windows_NT)
|
ifeq ($(OS), Windows_NT)
|
||||||
CXX ?= g++
|
CXX ?= g++
|
||||||
|
@ -1 +0,0 @@
|
|||||||
Subproject commit 3f2b428211ad04b2a3acefd65a9621a116678108
|
|
@ -19,16 +19,13 @@
|
|||||||
|
|
||||||
static App g_app;
|
static App g_app;
|
||||||
|
|
||||||
|
// TODO: Use compute shaders/multithreading to speed up performance
|
||||||
// TODO: Repeat visuals in looping walls mode
|
// TODO: Repeat visuals in looping walls mode
|
||||||
|
|
||||||
// TODO: Make WASM canvas resizable
|
// TODO: Make WASM canvas resizable
|
||||||
|
|
||||||
// TODO: Add prompt for restarting program in WASM on crash
|
// TODO: Add prompt for restarting program in WASM on crash
|
||||||
|
|
||||||
// TODO: Add controls window
|
// TODO: Add controls window
|
||||||
|
|
||||||
// TODO: Make boids form specific shapes defined by user, options:
|
// TODO: Make boids form specific shapes defined by user, options:
|
||||||
// Circles, triangles, by image, text.
|
// Circles, triangles, by image, text.
|
||||||
|
|
||||||
void UpdateDrawFrame();
|
void UpdateDrawFrame();
|
||||||
static void profiling_test();
|
static void profiling_test();
|
||||||
@ -109,7 +106,7 @@ void UpdateDrawFrame() {
|
|||||||
// If user goes to another tab and comes back, the time that the user was gone needs to be ignored.
|
// If user goes to another tab and comes back, the time that the user was gone needs to be ignored.
|
||||||
// So boids wouldn't tunnel through walls and do other shenanigans.
|
// So boids wouldn't tunnel through walls and do other shenanigans.
|
||||||
if (dt <= 5*TIME_PER_FRAME) {
|
if (dt <= 5*TIME_PER_FRAME) {
|
||||||
world_update(&g_world, dt);
|
world_update(&g_app.world, dt);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
world_update(&g_app.world, dt);
|
world_update(&g_app.world, dt);
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#include "raycast.hpp"
|
#include "raycast.hpp"
|
||||||
#include "raymath.hpp"
|
#include "raymath.h"
|
||||||
|
|
||||||
static float get_intersect_point(Vector2 ray_origin, Vector2 ray_dir, Vector2 line1, Vector2 line2) {
|
static float get_intersect_point(Vector2 ray_origin, Vector2 ray_dir, Vector2 line1, Vector2 line2) {
|
||||||
Vector2 line_dir = Vector2Subtract(line2, line1);
|
Vector2 line_dir = Vector2Subtract(line2, line1);
|
||||||
|
@ -40,7 +40,7 @@ static void ui_draw(World *world, Visuals *visuals, UI *ui) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
float panel_height = 335;
|
float panel_height = 315;
|
||||||
ui->show_panel = !GuiWindowBox({ 20, 20, 660, panel_height }, "Control panel");
|
ui->show_panel = !GuiWindowBox({ 20, 20, 660, panel_height }, "Control panel");
|
||||||
|
|
||||||
float group_height = panel_height - 45;
|
float group_height = panel_height - 45;
|
||||||
@ -54,7 +54,8 @@ static void ui_draw(World *world, Visuals *visuals, UI *ui) {
|
|||||||
GuiCheckBox(next_in_layout(&layout, 15, 15), "Show view cone", &visuals->draw_view_cone);
|
GuiCheckBox(next_in_layout(&layout, 15, 15), "Show view cone", &visuals->draw_view_cone);
|
||||||
GuiCheckBox(next_in_layout(&layout, 15, 15), "Show separation radius", &visuals->draw_separation_radius);
|
GuiCheckBox(next_in_layout(&layout, 15, 15), "Show separation radius", &visuals->draw_separation_radius);
|
||||||
GuiCheckBox(next_in_layout(&layout, 15, 15), "Show collision rays", &visuals->draw_collision_avoidance_rays);
|
GuiCheckBox(next_in_layout(&layout, 15, 15), "Show collision rays", &visuals->draw_collision_avoidance_rays);
|
||||||
GuiCheckBox(next_in_layout(&layout, 15, 15), "Show pulling forces", &visuals->draw_pulling_forces);
|
// TODO: Visualize cohesion, alignment and separation forces
|
||||||
|
// GuiCheckBox(next_in_layout(&layout, 15, 15), "Show pulling forces", &visuals->draw_pulling_forces);
|
||||||
GuiSlider(next_in_layout(&layout, 100, 15), NULL, "Boid size", &visuals->boid_edge_size, 2.5, 50);
|
GuiSlider(next_in_layout(&layout, 100, 15), NULL, "Boid size", &visuals->boid_edge_size, 2.5, 50);
|
||||||
|
|
||||||
Rectangle boid_color_rect = next_in_layout(&layout, 50, 50);
|
Rectangle boid_color_rect = next_in_layout(&layout, 50, 50);
|
||||||
|
Loading…
Reference in New Issue
Block a user