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 <iostream> | |
| #include <vector> | |
| #include <unordered_map> | |
| #include <random> | |
| #include <chrono> | |
| #include <cstdint> | |
| #include <limits> | |
| #include <cstring> | |
| #include <cstdlib> | |
| #include <cstdio> |
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 <SDL3/SDL.h> | |
| #include <SDL3/SDL_main.h> | |
| #include <iostream> | |
| #include <cmath> | |
| #include <vector> | |
| #include <random> | |
| // Linearly interpolate between two points | |
| inline SDL_FPoint lerp(const SDL_FPoint& a, const SDL_FPoint& b, float t) { | |
| return SDL_FPoint{ |
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 <SDL3/SDL.h> | |
| #include <SDL3/SDL_main.h> | |
| #include <cmath> | |
| #include <vector> | |
| // Calculates the X and Y screen coordinates for a circle centered anywhere | |
| void get_arbitrary_circle_point_trig( | |
| float centerX, float centerY, |
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 <SDL3/SDL.h> | |
| #include <SDL3/SDL_main.h> | |
| #include <cmath> | |
| struct Vec3 { | |
| float x, y, z; | |
| }; | |
| typedef struct { | |
| Vec3 position; |
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 <SDL3/SDL.h> | |
| #include <SDL3/SDL_main.h> | |
| #include <cmath> | |
| // Calculates the X and Y screen coordinates for a circle centered anywhere | |
| void get_arbitrary_circle_point_trig( | |
| float centerX, float centerY, | |
| float radius, float angle_radians, | |
| float* out_x, float* out_y | |
| ) { |
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 <SDL3/SDL.h> | |
| #include <SDL3/SDL_main.h> | |
| typedef struct { | |
| SDL_FPoint position; | |
| SDL_FColor color; | |
| } LocalVertex; | |
| // 3d cube shape | |
| static constexpr LocalVertex BLUEPRINT[] = { |
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 <SDL3/SDL.h> | |
| #include <iostream> | |
| #include <cstdint> | |
| #include <cassert> | |
| #include <cmath> | |
| #include <cstdlib> | |
| #include <cstring> | |
| #include <vector> | |
| #include <utility> | |
| #include <algorithm> |
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 <SDL3/SDL.h> | |
| #include <SDL3/SDL_main.h> | |
| #include <cmath> | |
| #include <iostream> | |
| #include <cstdlib> // For rand() | |
| // Global settings | |
| const float SAMPLE_RATE = 48000.0f; | |
| const float PI = 3.14159265f; |
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 <SDL3/SDL.h> | |
| #include <iostream> | |
| #include <cstdint> | |
| #include <cassert> | |
| #include <cmath> | |
| #include <cstdlib> | |
| #include <cstring> | |
| #include <vector> | |
| #include <utility> | |
| #include <algorithm> |
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 <SDL3/SDL.h> | |
| #include <iostream> | |
| #include <cstdint> | |
| #include <cassert> | |
| #include <cmath> | |
| #include <cstdlib> | |
| #include <cstring> | |
| #include <vector> | |
| #include <utility> | |
| #include <algorithm> |
NewerOlder