From 0da5c5e530c3b30e75bebfe136a7ae902b318082 Mon Sep 17 00:00:00 2001 From: Relintai Date: Tue, 19 Dec 2023 19:39:36 +0100 Subject: [PATCH] Added more classes to the build. --- compile_linux.sh | 7 ++++++- sfw/application/object_2d.h | 2 +- sfw/application/tile_map.cpp | 8 ++++---- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/compile_linux.sh b/compile_linux.sh index 0551acb..d9e3374 100755 --- a/compile_linux.sh +++ b/compile_linux.sh @@ -48,6 +48,10 @@ ccache g++ -Wall -D_REENTRANT -g -Isfw -Isfw/application -c sfw/application/shad ccache g++ -Wall -D_REENTRANT -g -Isfw -Isfw/application -c sfw/application/material.cpp -o sfw/application/material.o ccache g++ -Wall -D_REENTRANT -g -Isfw -Isfw/application -c sfw/application/mesh.cpp -o sfw/application/mesh.o ccache g++ -Wall -D_REENTRANT -g -Isfw -Isfw/application -c sfw/application/camera.cpp -o sfw/application/camera.o +ccache g++ -Wall -D_REENTRANT -g -Isfw -Isfw/application -c sfw/application/mesh_instance.cpp -o sfw/application/mesh_instance.o +ccache g++ -Wall -D_REENTRANT -g -Isfw -Isfw/application -c sfw/application/object_2d.cpp -o sfw/application/object_2d.o +ccache g++ -Wall -D_REENTRANT -g -Isfw -Isfw/application -c sfw/application/sprite.cpp -o sfw/application/sprite.o +ccache g++ -Wall -D_REENTRANT -g -Isfw -Isfw/application -c sfw/application/tile_map.cpp -o sfw/application/tile_map.o ccache g++ -Wall -D_REENTRANT -g -Isfw -Isfw/application -c game_scene.cpp -o game_scene.o ccache g++ -Wall -D_REENTRANT -g -Isfw -Isfw/application -c main.cpp -o main.o @@ -60,7 +64,8 @@ ccache g++ -Wall -lm -ldl -lpthread -lX11 -D_REENTRANT -g sfw/aabb.o sfw/basis. sfw/pool_vector.o sfw/pool_allocator.o sfw/mutex.o sfw/stime.o \ sfw/application/application.o sfw/application/scene.o sfw/application/window.o \ sfw/application/shader.o sfw/application/material.o sfw/application/mesh.o \ - sfw/application/camera.o \ + sfw/application/camera.o sfw/application/mesh_instance.o sfw/application/object_2d.o \ + sfw/application/sprite.o sfw/application/tile_map.o \ game_scene.o main.o \ -o game diff --git a/sfw/application/object_2d.h b/sfw/application/object_2d.h index 27c3685..2370ef8 100644 --- a/sfw/application/object_2d.h +++ b/sfw/application/object_2d.h @@ -1,7 +1,7 @@ #ifndef OBJECT_2D_H #define OBJECT_2D_H -#include "./libs/glm/vec2.hpp" +#include "../../libs/glm/vec2.hpp" class Object2D { public: diff --git a/sfw/application/tile_map.cpp b/sfw/application/tile_map.cpp index f02d147..c8a03f1 100644 --- a/sfw/application/tile_map.cpp +++ b/sfw/application/tile_map.cpp @@ -1,8 +1,8 @@ #include "tile_map.h" -#include "./glm/gtc/matrix_transform.hpp" -#include "./glm/matrix.hpp" -#include "./glm/vec3.hpp" +#include "../../libs/glm/gtc/matrix_transform.hpp" +#include "../../libs/glm/matrix.hpp" +#include "../../libs/glm/vec3.hpp" #include "camera.h" @@ -73,7 +73,7 @@ void TileMap::allocate_data() { } void TileMap::add_rect(const int x, const int y, const float uv_x, const float uv_y, const float uv_size_x, const float uv_size_y) { - int vc = static_cast(mesh->vertices.size() / mesh->vertex_dimensions); + int vc = static_cast(mesh->vertices.size() / mesh->vertex_dimesions); mesh->add_uv(uv_x, uv_y); mesh->add_vertex2(x, y + 1);