Author SHA1 Message Date
BrSh31 7259b8efb5 otto 2025-11-10 16:15:34 +01:00
straetemansbe94095 65cb29a65a gamecube verbesserungen 2025-11-09 21:33:22 +01:00
straetemansbe94095 08ded96060 Merge remote-tracking branch 'origin/master' 2025-11-09 21:15:07 +01:00
straetemansbe94095 ce97b7454a 9.11 2025-11-09 21:12:16 +01:00
8 changed files with 1912 additions and 90 deletions

No files matched your search

-31
View File
@@ -1,31 +0,0 @@
# Ignore CMake build folders
cmake-build-debug/
build/
# CLion project files
.idea/
*.iml
# Executables
*.exe
*.out
*.app
# Object files and libraries
*.o
*.obj
*.a
*.lib
*.so
*.dll
*.dylib
# CMake generated files
CMakeCache.txt
CMakeFiles/
cmake_install.cmake
compile_commands.json
# Temporary files
*.log
*.tmp
+176
View File
@@ -0,0 +1,176 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="AutoImportSettings">
<option name="autoReloadType" value="SELECTIVE" />
</component>
<component name="BackendCodeEditorMiscSettings">
<option name="/Default/RiderDebugger/RiderRestoreDecompile/RestoreDecompileSetting/@EntryValue" value="false" type="bool" />
<option name="/Default/Housekeeping/GlobalSettingsUpgraded/IsUpgraded/@EntryValue" value="true" type="bool" />
<option name="/Default/Housekeeping/FeatureSuggestion/FeatureSuggestionManager/DisabledSuggesters/=SwitchToGoToActionSuggester/@EntryIndexedValue" value="true" type="bool" />
</component>
<component name="CMakePresetLoader">{
&quot;useNewFormat&quot;: true
}</component>
<component name="CMakeProjectFlavorService">
<option name="flavorId" value="CMakePlainProjectFlavor" />
</component>
<component name="CMakeReloadState">
<option name="reloaded" value="true" />
</component>
<component name="CMakeRunConfigurationManager">
<generated>
<config projectName="Prog3B" targetName="Prog3B" />
</generated>
</component>
<component name="CMakeSettings">
<configurations>
<configuration PROFILE_NAME="Debug" ENABLED="true" CONFIG_NAME="Debug" />
</configurations>
</component>
<component name="ChangeListManager">
<list default="true" id="bc14ea44-6152-4afc-90d0-07644981c8ca" name="Changes" comment="">
<change beforePath="$PROJECT_DIR$/cmake-build-debug/.cmake/api/v1/query/cache-v2" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/cmake-build-debug/.cmake/api/v1/query/cmakeFiles-v1" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/cmake-build-debug/.cmake/api/v1/query/codemodel-v2" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/cmake-build-debug/.cmake/api/v1/query/toolchains-v1" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/cmake-build-debug/.cmake/api/v1/reply/cache-v2-26fadb9308b8155ab863.json" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/cmake-build-debug/.cmake/api/v1/reply/cache-v2-fbf4a2b9ca92fc7ef85d.json" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/cmake-build-debug/.cmake/api/v1/reply/cmakeFiles-v1-02c2dc126835d6afc55e.json" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/cmake-build-debug/.cmake/api/v1/reply/cmakeFiles-v1-308a5d6da17c4de0a89b.json" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/cmake-build-debug/.cmake/api/v1/reply/codemodel-v2-798b7ea5b88f6efe1e96.json" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/cmake-build-debug/.cmake/api/v1/reply/codemodel-v2-9dea2b442e0ec6147017.json" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/cmake-build-debug/.cmake/api/v1/reply/directory-.-Debug-d0094a50bb2071803777.json" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/cmake-build-debug/.cmake/api/v1/reply/directory-.-Debug-f5ebdc15457944623624.json" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/cmake-build-debug/.cmake/api/v1/reply/index-2025-10-26T17-41-38-0649.json" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/cmake-build-debug/.cmake/api/v1/reply/index-2025-10-27T15-44-42-0976.json" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/cmake-build-debug/.cmake/api/v1/reply/target-Prog3B-Debug-5b953e9dac460ea09172.json" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/cmake-build-debug/.cmake/api/v1/reply/target-Prog3B-Debug-792d125264c5420d6d10.json" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/cmake-build-debug/.cmake/api/v1/reply/toolchains-v1-2f427dcd6919a7ef66e5.json" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/cmake-build-debug/.cmake/api/v1/reply/toolchains-v1-6082f31f4c46160119db.json" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/cmake-build-debug/.ninja_deps" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/cmake-build-debug/.ninja_log" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/cmake-build-debug/CMakeCache.txt" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/cmake-build-debug/CMakeFiles/3.30.5/CMakeCCompiler.cmake" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/cmake-build-debug/CMakeFiles/3.30.5/CMakeCXXCompiler.cmake" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/cmake-build-debug/CMakeFiles/3.30.5/CMakeDetermineCompilerABI_C.bin" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/cmake-build-debug/CMakeFiles/3.30.5/CMakeDetermineCompilerABI_CXX.bin" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/cmake-build-debug/CMakeFiles/3.30.5/CMakeRCCompiler.cmake" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/cmake-build-debug/CMakeFiles/3.30.5/CMakeSystem.cmake" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/cmake-build-debug/CMakeFiles/3.30.5/CompilerIdC/CMakeCCompilerId.c" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/cmake-build-debug/CMakeFiles/3.30.5/CompilerIdC/CMakeCCompilerId.o" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/cmake-build-debug/CMakeFiles/3.30.5/CompilerIdC/a.exe" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/cmake-build-debug/CMakeFiles/3.30.5/CompilerIdCXX/CMakeCXXCompilerId.cpp" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/cmake-build-debug/CMakeFiles/3.30.5/CompilerIdCXX/CMakeCXXCompilerId.o" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/cmake-build-debug/CMakeFiles/3.30.5/CompilerIdCXX/a.exe" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/cmake-build-debug/CMakeFiles/CMakeConfigureLog.yaml" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/cmake-build-debug/CMakeFiles/Prog3B.dir/main.cpp.o" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/cmake-build-debug/CMakeFiles/TargetDirectories.txt" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/cmake-build-debug/CMakeFiles/clion-Debug-log.txt" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/cmake-build-debug/CMakeFiles/clion-environment.txt" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/cmake-build-debug/CMakeFiles/cmake.check_cache" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/cmake-build-debug/CMakeFiles/rules.ninja" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/cmake-build-debug/Prog3B" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/cmake-build-debug/Testing/Temporary/LastTest.log" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/cmake-build-debug/build.ninja" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/cmake-build-debug/cmake_install.cmake" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/cmake-build-debug/compile_commands.json" beforeDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="ClangdSettings">
<option name="formatViaClangd" value="false" />
</component>
<component name="ExecutionTargetManager" SELECTED_TARGET="CMakeBuildProfile:Debug" />
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
<component name="ProjectApplicationVersion">
<option name="ide" value="CLion" />
<option name="majorVersion" value="2024" />
<option name="minorVersion" value="3.5" />
<option name="productBranch" value="Classic" />
</component>
<component name="ProjectColorInfo">{
&quot;associatedIndex&quot;: 4
}</component>
<component name="ProjectId" id="34ehK54dp6OU0qNeW3IKWIrbM5O" />
<component name="ProjectViewState">
<option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" />
</component>
<component name="PropertiesComponent">{
&quot;keyToString&quot;: {
&quot;CMake Application.Prog3B.executor&quot;: &quot;Run&quot;,
&quot;RunOnceActivity.RadMigrateCodeStyle&quot;: &quot;true&quot;,
&quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;,
&quot;RunOnceActivity.cidr.known.project.marker&quot;: &quot;true&quot;,
&quot;RunOnceActivity.git.unshallow&quot;: &quot;true&quot;,
&quot;RunOnceActivity.readMode.enableVisualFormatting&quot;: &quot;true&quot;,
&quot;RunOnceActivity.west.config.association.type.startup.service&quot;: &quot;true&quot;,
&quot;SHARE_PROJECT_CONFIGURATION_FILES&quot;: &quot;true&quot;,
&quot;cf.first.check.clang-format&quot;: &quot;false&quot;,
&quot;cidr.known.project.marker&quot;: &quot;true&quot;,
&quot;git-widget-placeholder&quot;: &quot;master&quot;,
&quot;last_opened_file_path&quot;: &quot;/Users/bendit.str/Desktop/CLION/PROG_3B&quot;,
&quot;node.js.detected.package.eslint&quot;: &quot;true&quot;,
&quot;node.js.detected.package.tslint&quot;: &quot;true&quot;,
&quot;node.js.selected.package.eslint&quot;: &quot;(autodetect)&quot;,
&quot;node.js.selected.package.tslint&quot;: &quot;(autodetect)&quot;,
&quot;nodejs_package_manager_path&quot;: &quot;npm&quot;,
&quot;vue.rearranger.settings.migration&quot;: &quot;true&quot;
}
}</component>
<component name="RunManager">
<configuration name="Prog3B" type="CMakeRunConfiguration" factoryName="Application" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" EMULATE_TERMINAL="false" PASS_PARENT_ENVS_2="true" PROJECT_NAME="Prog3B" TARGET_NAME="Prog3B" CONFIG_NAME="Debug" RUN_TARGET_PROJECT_NAME="Prog3B" RUN_TARGET_NAME="Prog3B">
<method v="2">
<option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
</method>
</configuration>
</component>
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="bc14ea44-6152-4afc-90d0-07644981c8ca" name="Changes" comment="" />
<created>1761579877481</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1761579877481</updated>
<workItem from="1761579878668" duration="1151000" />
<workItem from="1761659218955" duration="52000" />
<workItem from="1762719029166" duration="1000" />
</task>
<task id="LOCAL-00001" summary="otto">
<option name="closed" value="true" />
<created>1761580147769</created>
<option name="number" value="00001" />
<option name="presentableId" value="LOCAL-00001" />
<option name="project" value="LOCAL" />
<updated>1761580147769</updated>
</task>
<task id="LOCAL-00002" summary="otto">
<option name="closed" value="true" />
<created>1761580176311</created>
<option name="number" value="00002" />
<option name="presentableId" value="LOCAL-00002" />
<option name="project" value="LOCAL" />
<updated>1761580176311</updated>
</task>
<option name="localTasksCounter" value="3" />
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
<option name="version" value="3" />
</component>
<component name="VCPKGProject">
<isAutomaticCheckingOnLaunch value="false" />
<isAutomaticFoundErrors value="true" />
<isAutomaticReloadCMake value="true" />
</component>
<component name="VcsManagerConfiguration">
<MESSAGE value="otto" />
<option name="LAST_COMMIT_MESSAGE" value="" />
</component>
</project>
+22 -54
View File
@@ -1,71 +1,39 @@
cmake_minimum_required(VERSION 3.28)
project(Prog3B)
# Set C++ standard to C++20
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(EXECUTABLE_NAME Prog3B)
set(OS_NAME windows)
# Generate compile_commands.json
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(CMAKE_CXX_STANDARD 20)
# Set the default build type if not specified
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release CACHE STRING "Build type" FORCE)
endif()
# --- Sources & Include directories ---
# Automatically include all .cpp files in the src/ folder
file(GLOB SRC_FILES "src/*.cpp")
# Include directories for header files
set(INCLUDE_DIRS
${CMAKE_CURRENT_LIST_DIR}/includes
${CMAKE_CURRENT_LIST_DIR}/raylib
set(SRC_FILES
${CMAKE_CURRENT_LIST_DIR}/main.cpp
${CMAKE_CURRENT_LIST_DIR}/gamecube.cpp
)
# Create the executable target
add_executable(${PROJECT_NAME} ${SRC_FILES})
set(INCLUDE_DIRS
${CMAKE_CURRENT_LIST_DIR}/linux
)
# Add include directories to the target
target_include_directories(${PROJECT_NAME} PRIVATE ${INCLUDE_DIRS})
# --- Automatic platform detection ---
add_executable(${EXECUTABLE_NAME} ${SRC_FILES})
target_include_directories(${EXECUTABLE_NAME} PRIVATE ${INCLUDE_DIRS})
target_link_libraries(${EXECUTABLE_NAME} PRIVATE
${CMAKE_CURRENT_LIST_DIR}/${OS_NAME}/libgamematrix.a
${CMAKE_CURRENT_LIST_DIR}/${OS_NAME}/libraylib.a
)
if (WIN32)
# Windows build
message(STATUS "Building for Windows...")
target_link_libraries(${PROJECT_NAME} PRIVATE
${CMAKE_CURRENT_LIST_DIR}/windows/libgamematrix.a
${CMAKE_CURRENT_LIST_DIR}/windows/libraylib.a
winmm # Windows multimedia library required by Raylib
)
target_link_libraries(Prog3B PRIVATE winmm)
endif()
elseif(APPLE)
# macOS build
message(STATUS "Building for macOS...")
if(CMAKE_SYSTEM_PROCESSOR MATCHES "arm64")
set(OS_FOLDER "mac_arm")
else()
set(OS_FOLDER "mac_x86")
endif()
target_link_libraries(${PROJECT_NAME} PRIVATE
${CMAKE_CURRENT_LIST_DIR}/${OS_FOLDER}/libgamematrix.a
${CMAKE_CURRENT_LIST_DIR}/${OS_FOLDER}/libraylib.a
"-framework IOKit" # For device input
"-framework Cocoa" # For windows/UI
"-framework OpenGL" # For rendering
)
elseif(UNIX)
# Linux build
message(STATUS "Building for Linux...")
target_link_libraries(${PROJECT_NAME} PRIVATE
${CMAKE_CURRENT_LIST_DIR}/linux/libgamematrix.a
${CMAKE_CURRENT_LIST_DIR}/linux/libraylib.a
m pthread dl # Standard Linux libraries
)
else()
# Unsupported OS
message(FATAL_ERROR "Unsupported operating system.")
# Checks if OSX and links appropriate frameworks (Only required on MacOS)
if (APPLE)
target_link_libraries(Prog3B "-framework IOKit")
target_link_libraries(Prog3B "-framework Cocoa")
target_link_libraries(Prog3B "-framework OpenGL")
endif()
View File
File renamed without changes.
+5 -4
View File
@@ -1,9 +1,9 @@
#pragma once
#include "gamematrix.h"
#include "raylib.h"
#include "rlgl.h"
#include <rlgl.h>
struct Vec3
struct Vec3 //anisch unnötig weil rylib schon vec3 hat
{
float x, y, z;
};
@@ -22,7 +22,7 @@ public:
Vec3 GetPosition() const;
float GetRotationY() const;
Color GetColor() const { return color; }
//zustände klarer abbikden bzw weniger bools = klarare Logik
private:
Vec3 position;
Color color;
@@ -31,4 +31,5 @@ private:
bool flippingForward = false;
bool flippingBackward = false;
float rotation = 0.0f;
};
};
// braucht bessere trennung von logik & darstellung
File renamed without changes.
+1 -1
View File
@@ -1,4 +1,4 @@
#include "../../prog_3/includes/gamecube.h"
#include "gamecube.h"
#include <algorithm>
#include <ctime>
+1708
View File
File diff suppressed because it is too large. Load diff