This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| void carve_file(const char *input_file, const char *output_file, size_t start_byte, size_t end_byte){ | |
| FILE *file_in = NULL; | |
| FILE *file_out = NULL; | |
| file_in = fopen(input_file, "rb"); | |
| if (!file_in) { | |
| printf("Failed to open input file - %s\n", input_file); | |
| goto defer; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #define NOB_IMPLEMENTATION | |
| // #define NOB_STRIP_PREFIX | |
| #define NOB_WARN_DEPRECATED | |
| #include "nob.h" // https://github.com/tsoding/nob.h | |
| #include <stdio.h> | |
| #include <string.h> | |
| #define PROJECT_NAME "NoBuild_Raylib" | |
| #define BUILD_FOLDER "build/" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #ifdef _WIN32 | |
| #include <windows.h> | |
| #else | |
| #include <time.h> | |
| #endif | |
| static double timer_start = 0.0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cmake_minimum_required(VERSION 3.12) | |
| include(FetchContent) | |
| set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) | |
| set(CMAKE_CXX_STANDARD 17) | |
| # SDL3 ______________________________________________ | |
| FetchContent_Declare( | |
| sdl3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cmake_minimum_required(VERSION 3.28) | |
| include(FetchContent) | |
| set(ProjectName RaylibTemplate) | |
| project(${ProjectName} LANGUAGES C CXX) | |
| # Raylib _______________________________________ | |
| FetchContent_Declare( | |
| raylib | |
| DOWNLOAD_EXTRACT_TIMESTAMP OFF |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cmake_minimum_required(VERSION 3.12) | |
| include(FetchContent) | |
| set(PROJECT_NAME Sdl3Template) | |
| project(${PROJECT_NAME}) | |
| # ? | |
| set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) | |
| set(CMAKE_CXX_STANDARD 17) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cmake_minimum_required(VERSION 3.12) | |
| include(FetchContent) | |
| set(PROJECT_NAME SfmlTemplate) | |
| project(${PROJECT_NAME} VERSION 1.0.0 LANGUAGES CXX) | |
| set(CMAKE_CXX_STANDARD 17) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cmake_minimum_required(VERSION 3.28) | |
| include(FetchContent) | |
| # NAME | |
| set(PROJECT_NAME RaylibTemplate) | |
| project(${PROJECT_NAME} LANGUAGES C) | |
| set(CMAKE_C_STANDARD 99) | |
| # set(CMAKE_CXX_STANDARD 17) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## Translated from EgoMoose tutorial of deriving formula for Unity | |
| ## https://youtu.be/FZekwtIO0I4 | |
| ## https://gist.github.com/EgoMoose/777ed827e89b69d479ea407e79261b97 | |
| class_name SpringMath | |
| extends Node | |
| ## zeta = damping ratio | |
| ## omega = angular frequency | |
| static func vec1(value:float, target:float, velocity:float, delta:float, zeta:float = 0.3, omega:float = 20.0)->Array[float]: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # https://youtu.be/IOe1aGY6hXA | |
| extends KinematicBody2D | |
| export var move_speed = 200.0 | |
| var velocity := Vector2.ZERO | |
| export var jump_height : float | |
| export var jump_time_to_peak : float | |
| export var jump_time_to_descent : float |
NewerOlder