diff --git a/Makefile b/Makefile index ab24b88..3f6956d 100644 --- a/Makefile +++ b/Makefile @@ -183,8 +183,9 @@ macos_release: pack_tool resources.pack # Linux Release .PHONY: linux_release -linux_release: +linux_release: pack_tool resources.pack @echo "Creating Linux release - Version: $(VERSION)" + @echo "Note: SDL3 must be installed on the target system (libsdl3-dev)" # Clean previous @$(RMDIR) "$(RELEASE_FOLDER)" @@ -194,7 +195,7 @@ linux_release: @$(MKDIR) "$(RELEASE_FOLDER)" # Copy resources - @cp -r resources "$(RELEASE_FOLDER)/" + @cp resources.pack "$(RELEASE_FOLDER)/" @cp LICENSE "$(RELEASE_FOLDER)/" 2>/dev/null || echo "Warning: LICENSE not found" @cp README.md "$(RELEASE_FOLDER)/" 2>/dev/null || echo "Warning: README.md not found" diff --git a/reports/math-report.txt b/reports/math-report.txt deleted file mode 100644 index 6273104..0000000 --- a/reports/math-report.txt +++ /dev/null @@ -1,86 +0,0 @@ -21 warnings generated. -/Users/sergio/orni/source/core/math/easing.hpp:11:14: error: invalid case style for function 'ease_out_quad' [readability-identifier-naming,-warnings-as-errors] - 11 | inline float ease_out_quad(float t) { - | ^~~~~~~~~~~~~ - | easeOutQuad -/Users/sergio/orni/source/core/math/easing.hpp:12:12: error: floating point literal has suffix 'f', which is not uppercase [readability-uppercase-literal-suffix,-warnings-as-errors] - 12 | return 1.0f - (1.0f - t) * (1.0f - t); - | ^ ~ - | F -/Users/sergio/orni/source/core/math/easing.hpp:12:19: error: '*' has higher precedence than '-'; add parentheses to explicitly specify the order of operations [readability-math-missing-parentheses,-warnings-as-errors] - 12 | return 1.0f - (1.0f - t) * (1.0f - t); - | ^~~~~~~~~~~~~~~~~~~~~~~~ - | ( ) -/Users/sergio/orni/source/core/math/easing.hpp:12:20: error: floating point literal has suffix 'f', which is not uppercase [readability-uppercase-literal-suffix,-warnings-as-errors] - 12 | return 1.0f - (1.0f - t) * (1.0f - t); - | ^ ~ - | F -/Users/sergio/orni/source/core/math/easing.hpp:12:33: error: floating point literal has suffix 'f', which is not uppercase [readability-uppercase-literal-suffix,-warnings-as-errors] - 12 | return 1.0f - (1.0f - t) * (1.0f - t); - | ^ ~ - | F -/Users/sergio/orni/source/core/math/easing.hpp:18:14: error: invalid case style for function 'ease_in_quad' [readability-identifier-naming,-warnings-as-errors] - 18 | inline float ease_in_quad(float t) { - | ^~~~~~~~~~~~ - | easeInQuad -/Users/sergio/orni/source/core/math/easing.hpp:25:14: error: invalid case style for function 'ease_in_out_quad' [readability-identifier-naming,-warnings-as-errors] - 25 | inline float ease_in_out_quad(float t) { - | ^~~~~~~~~~~~~~~~ - | easeInOutQuad -/Users/sergio/orni/source/core/math/easing.hpp:26:17: error: floating point literal has suffix 'f', which is not uppercase [readability-uppercase-literal-suffix,-warnings-as-errors] - 26 | return (t < 0.5f) - | ^ ~ - | F -/Users/sergio/orni/source/core/math/easing.hpp:27:11: error: floating point literal has suffix 'f', which is not uppercase [readability-uppercase-literal-suffix,-warnings-as-errors] - 27 | ? 2.0f * t * t - | ^ ~ - | F -/Users/sergio/orni/source/core/math/easing.hpp:28:11: error: floating point literal has suffix 'f', which is not uppercase [readability-uppercase-literal-suffix,-warnings-as-errors] - 28 | : 1.0f - (-2.0f * t + 2.0f) * (-2.0f * t + 2.0f) / 2.0f; - | ^ ~ - | F -/Users/sergio/orni/source/core/math/easing.hpp:28:18: error: '/' has higher precedence than '-'; add parentheses to explicitly specify the order of operations [readability-math-missing-parentheses,-warnings-as-errors] - 28 | : 1.0f - (-2.0f * t + 2.0f) * (-2.0f * t + 2.0f) / 2.0f; - | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - | ( ) -/Users/sergio/orni/source/core/math/easing.hpp:28:20: error: floating point literal has suffix 'f', which is not uppercase [readability-uppercase-literal-suffix,-warnings-as-errors] - 28 | : 1.0f - (-2.0f * t + 2.0f) * (-2.0f * t + 2.0f) / 2.0f; - | ^ ~ - | F -/Users/sergio/orni/source/core/math/easing.hpp:28:31: error: floating point literal has suffix 'f', which is not uppercase [readability-uppercase-literal-suffix,-warnings-as-errors] - 28 | : 1.0f - (-2.0f * t + 2.0f) * (-2.0f * t + 2.0f) / 2.0f; - | ^ ~ - | F -/Users/sergio/orni/source/core/math/easing.hpp:28:41: error: floating point literal has suffix 'f', which is not uppercase [readability-uppercase-literal-suffix,-warnings-as-errors] - 28 | : 1.0f - (-2.0f * t + 2.0f) * (-2.0f * t + 2.0f) / 2.0f; - | ^ ~ - | F -/Users/sergio/orni/source/core/math/easing.hpp:28:52: error: floating point literal has suffix 'f', which is not uppercase [readability-uppercase-literal-suffix,-warnings-as-errors] - 28 | : 1.0f - (-2.0f * t + 2.0f) * (-2.0f * t + 2.0f) / 2.0f; - | ^ ~ - | F -/Users/sergio/orni/source/core/math/easing.hpp:28:60: error: floating point literal has suffix 'f', which is not uppercase [readability-uppercase-literal-suffix,-warnings-as-errors] - 28 | : 1.0f - (-2.0f * t + 2.0f) * (-2.0f * t + 2.0f) / 2.0f; - | ^ ~ - | F -/Users/sergio/orni/source/core/math/easing.hpp:34:14: error: invalid case style for function 'ease_out_cubic' [readability-identifier-naming,-warnings-as-errors] - 34 | inline float ease_out_cubic(float t) { - | ^~~~~~~~~~~~~~ - | easeOutCubic -/Users/sergio/orni/source/core/math/easing.hpp:35:16: error: floating point literal has suffix 'f', which is not uppercase [readability-uppercase-literal-suffix,-warnings-as-errors] - 35 | float t1 = 1.0f - t; - | ^ ~ - | F -/Users/sergio/orni/source/core/math/easing.hpp:36:12: error: floating point literal has suffix 'f', which is not uppercase [readability-uppercase-literal-suffix,-warnings-as-errors] - 36 | return 1.0f - t1 * t1 * t1; - | ^ ~ - | F -/Users/sergio/orni/source/core/math/easing.hpp:36:19: error: '*' has higher precedence than '-'; add parentheses to explicitly specify the order of operations [readability-math-missing-parentheses,-warnings-as-errors] - 36 | return 1.0f - t1 * t1 * t1; - | ^~~~~~~~~~~~~ - | ( ) -/Users/sergio/orni/source/core/math/easing.hpp:41:20: error: '*' has higher precedence than '+'; add parentheses to explicitly specify the order of operations [readability-math-missing-parentheses,-warnings-as-errors] - 41 | return start + (end - start) * t; - | ^~~~~~~~~~~~~~~~~~ - | ( ) -21 warnings treated as errors diff --git a/source/game/entities/enemic.cpp b/source/game/entities/enemic.cpp index 4d28f11..022f688 100644 --- a/source/game/entities/enemic.cpp +++ b/source/game/entities/enemic.cpp @@ -65,6 +65,16 @@ void Enemic::inicialitzar(TipusEnemic tipus, const Punt* ship_pos) { drotacio_min = Defaults::Enemies::Molinillo::DROTACIO_MIN; drotacio_max = Defaults::Enemies::Molinillo::DROTACIO_MAX; break; + + default: + // Fallback segur: usar valors de PENTAGON + std::cerr << "[Enemic] Error: tipus desconegut (" + << static_cast(tipus_) << "), utilitzant PENTAGON\n"; + shape_file = Defaults::Enemies::Pentagon::SHAPE_FILE; + velocitat_ = Defaults::Enemies::Pentagon::VELOCITAT; + drotacio_min = Defaults::Enemies::Pentagon::DROTACIO_MIN; + drotacio_max = Defaults::Enemies::Pentagon::DROTACIO_MAX; + break; } // Carregar forma @@ -191,6 +201,10 @@ void Enemic::mou(float delta_time) { case TipusEnemic::MOLINILLO: comportament_molinillo(delta_time); break; + default: + // Fallback: comportament bàsic (Pentagon) + comportament_pentagon(delta_time); + break; } } @@ -491,8 +505,9 @@ float Enemic::get_base_velocity() const { return Defaults::Enemies::Quadrat::VELOCITAT; case TipusEnemic::MOLINILLO: return Defaults::Enemies::Molinillo::VELOCITAT; + default: + return Defaults::Enemies::Pentagon::VELOCITAT; // Fallback segur } - return 0.0F; } float Enemic::get_base_rotation() const {