Format the code using clang-format

This commit is contained in:
brxxh 2025-05-31 23:01:17 +02:00
parent 80a0919c3f
commit b6805f7164

View file

@ -339,7 +339,8 @@ struct Plane {
// We'll make the size half the size of the texture.
// (If you want 1:1 size, you need to double the scale of the sprite.)
// We could use 'SCALE' here, but we'll keep this for clarity.
// (Although, now we no longer need 'SCALE' as a constant in this entire struct.)
// (Although, now we no longer need 'SCALE' as a constant in this entire
// struct.)
auto size = paradiso::Vector2<float>{
paradiso::Vector2<float>::make(SCALE_X, SCALE_Y)};
@ -550,16 +551,17 @@ struct App {
enum class WorldType { Dirt, Grass, Ice, Rock, Snow };
enum class PlaneType { Blue, Green, Red, Yellow };
static auto create(WorldType world_type = WorldType::Grass, PlaneType plane_type = PlaneType::Red) -> App {
static auto create(WorldType world_type = WorldType::Grass,
PlaneType plane_type = PlaneType::Red) -> App {
auto app = App{};
paradiso::BitmapIO::get().set_path(
paradiso::get_executable_path().parent_path().string() + "/assets");
// Yes, I'm lazy, how did you know?
const char *ground_filename = nullptr;
const char *rocks_top_filename = nullptr;
const char *rocks_bottom_filename = nullptr;
const char* ground_filename = nullptr;
const char* rocks_top_filename = nullptr;
const char* rocks_bottom_filename = nullptr;
switch (world_type) {
case WorldType::Dirt:
ground_filename = "PNG/groundDirt.png";
@ -590,9 +592,9 @@ struct App {
}
// Yes, I'm lazy, how did you know?
const char *plane_1_filename = nullptr;
const char *plane_2_filename = nullptr;
const char *plane_3_filename = nullptr;
const char* plane_1_filename = nullptr;
const char* plane_2_filename = nullptr;
const char* plane_3_filename = nullptr;
switch (plane_type) {
case PlaneType::Blue:
plane_1_filename = "PNG/Planes/planeBlue1.png";