Indentation errors

This commit is contained in:
2025-03-19 02:07:35 +01:00
parent 4b37731a97
commit 4b7389da8d
7 changed files with 93 additions and 93 deletions

1
.gitignore vendored
View File

@@ -10,4 +10,5 @@ PSX.Dev-README.md
.cache/
.vscode/
.editorconfig
.clang-format
compile_commands.json

View File

@@ -14,4 +14,4 @@ namespace psxsplash {
Mesh m_mesh;
bool m_is_static;
};
}
} // namespace psxsplash

View File

@@ -24,17 +24,13 @@ class PSXSplash final : public psyqo::Application {
class MainScene final : public psyqo::Scene {
void frame() override;
uint8_t m_anim = 0;
bool m_direction = true;
eastl::array<psxsplash::GameObject> objects;
};
PSXSplash psxSplash;
MainScene mainScene;
}
} // namespace
void PSXSplash::prepare() {
psyqo::GPU::Configuration config;
@@ -51,8 +47,6 @@ void PSXSplash::createScene() {
pushScene(&mainScene);
}
void MainScene::frame() {
psxSplash.m_renderer.render(objects);
}
void MainScene::frame() { psxSplash.m_renderer.render(objects); }
int main() { return psxSplash.run(); }

View File

@@ -21,4 +21,4 @@ class Mesh final {
Texture m_texture;
eastl::array<Tri> m_polygons;
};
}
} // namespace psxsplash

View File

@@ -11,13 +11,17 @@ void psxsplash::Renderer::initialize() {
psyqo::GTE::clear<psyqo::GTE::Register::TRY, psyqo::GTE::Unsafe>();
psyqo::GTE::clear<psyqo::GTE::Register::TRZ, psyqo::GTE::Unsafe>();
psyqo::GTE::write<psyqo::GTE::Register::OFX, psyqo::GTE::Unsafe>(psyqo::FixedPoint<16>(160.0).raw());
psyqo::GTE::write<psyqo::GTE::Register::OFY, psyqo::GTE::Unsafe>(psyqo::FixedPoint<16>(120.0).raw());
psyqo::GTE::write<psyqo::GTE::Register::OFX, psyqo::GTE::Unsafe>(
psyqo::FixedPoint<16>(160.0).raw());
psyqo::GTE::write<psyqo::GTE::Register::OFY, psyqo::GTE::Unsafe>(
psyqo::FixedPoint<16>(120.0).raw());
psyqo::GTE::write<psyqo::GTE::Register::H, psyqo::GTE::Unsafe>(120);
psyqo::GTE::write<psyqo::GTE::Register::ZSF3, psyqo::GTE::Unsafe>(ORDERING_TABLE_SIZE / 3);
psyqo::GTE::write<psyqo::GTE::Register::ZSF4, psyqo::GTE::Unsafe>(ORDERING_TABLE_SIZE / 4);
psyqo::GTE::write<psyqo::GTE::Register::ZSF3, psyqo::GTE::Unsafe>(
ORDERING_TABLE_SIZE / 3);
psyqo::GTE::write<psyqo::GTE::Register::ZSF4, psyqo::GTE::Unsafe>(
ORDERING_TABLE_SIZE / 4);
}
void psxsplash::Renderer::render(eastl::array<GameObject> &objects) {
@@ -58,7 +62,8 @@ void psxsplash::Renderer::render(eastl::array<GameObject> &objects) {
psyqo::SoftMath::multiplyMatrix33(transform, rotZ, &transform);
psyqo::GTE::writeUnsafe<psyqo::GTE::PseudoRegister::Rotation>(transform);
psyqo::GTE::writeUnsafe<psyqo::GTE::PseudoRegister::Rotation>(
transform);
for (auto &tri : mesh.m_polygons) {
@@ -86,8 +91,8 @@ void psxsplash::Renderer::render(eastl::array<GameObject> &objects) {
psyqo::GTE::read<psyqo::GTE::Register::SXY1>(&projected[2].packed);
psyqo::GTE::read<psyqo::GTE::Register::SXY2>(&projected[3].packed);
auto &prim = balloc.allocate<
psyqo::Fragments::SimpleFragment<psyqo::Prim::TexturedTriangle>>();
auto &prim = balloc.allocate<psyqo::Fragments::SimpleFragment<
psyqo::Prim::TexturedTriangle>>();
prim.primitive.pointA = projected[0];
prim.primitive.pointB = projected[1];

View File

@@ -2,12 +2,12 @@
#include "EASTL/array.h"
#include "gameobject.hh"
#include "psyqo/bump-allocator.hh"
#include "psyqo/fragments.hh"
#include "psyqo/gpu.hh"
#include "psyqo/ordering-table.hh"
#include "psyqo/primitives/common.hh"
#include "psyqo/primitives/misc.hh"
#include "psyqo/bump-allocator.hh"
#include "psyqo/trigonometry.hh"
namespace psxsplash {
@@ -30,4 +30,4 @@ class Renderer final {
void render(eastl::array<GameObject> &objects);
};
}
} // namespace psxsplash

View File

@@ -11,4 +11,4 @@ class Texture final {
psyqo::PrimPieces::TPageAttr m_tpage;
uint8_t m_width, m_height;
};
}
} // namespace psxsplash