Indentation errors
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -10,4 +10,5 @@ PSX.Dev-README.md
|
|||||||
.cache/
|
.cache/
|
||||||
.vscode/
|
.vscode/
|
||||||
.editorconfig
|
.editorconfig
|
||||||
|
.clang-format
|
||||||
compile_commands.json
|
compile_commands.json
|
||||||
|
|||||||
@@ -14,4 +14,4 @@ namespace psxsplash {
|
|||||||
Mesh m_mesh;
|
Mesh m_mesh;
|
||||||
bool m_is_static;
|
bool m_is_static;
|
||||||
};
|
};
|
||||||
}
|
} // namespace psxsplash
|
||||||
10
src/main.cpp
10
src/main.cpp
@@ -24,17 +24,13 @@ class PSXSplash final : public psyqo::Application {
|
|||||||
|
|
||||||
class MainScene final : public psyqo::Scene {
|
class MainScene final : public psyqo::Scene {
|
||||||
void frame() override;
|
void frame() override;
|
||||||
|
|
||||||
uint8_t m_anim = 0;
|
|
||||||
bool m_direction = true;
|
|
||||||
|
|
||||||
eastl::array<psxsplash::GameObject> objects;
|
eastl::array<psxsplash::GameObject> objects;
|
||||||
};
|
};
|
||||||
|
|
||||||
PSXSplash psxSplash;
|
PSXSplash psxSplash;
|
||||||
MainScene mainScene;
|
MainScene mainScene;
|
||||||
|
|
||||||
}
|
} // namespace
|
||||||
|
|
||||||
void PSXSplash::prepare() {
|
void PSXSplash::prepare() {
|
||||||
psyqo::GPU::Configuration config;
|
psyqo::GPU::Configuration config;
|
||||||
@@ -51,8 +47,6 @@ void PSXSplash::createScene() {
|
|||||||
pushScene(&mainScene);
|
pushScene(&mainScene);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainScene::frame() {
|
void MainScene::frame() { psxSplash.m_renderer.render(objects); }
|
||||||
psxSplash.m_renderer.render(objects);
|
|
||||||
}
|
|
||||||
|
|
||||||
int main() { return psxSplash.run(); }
|
int main() { return psxSplash.run(); }
|
||||||
|
|||||||
@@ -21,4 +21,4 @@ class Mesh final {
|
|||||||
Texture m_texture;
|
Texture m_texture;
|
||||||
eastl::array<Tri> m_polygons;
|
eastl::array<Tri> m_polygons;
|
||||||
};
|
};
|
||||||
}
|
} // namespace psxsplash
|
||||||
@@ -11,13 +11,17 @@ void psxsplash::Renderer::initialize() {
|
|||||||
psyqo::GTE::clear<psyqo::GTE::Register::TRY, psyqo::GTE::Unsafe>();
|
psyqo::GTE::clear<psyqo::GTE::Register::TRY, psyqo::GTE::Unsafe>();
|
||||||
psyqo::GTE::clear<psyqo::GTE::Register::TRZ, 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::OFX, psyqo::GTE::Unsafe>(
|
||||||
psyqo::GTE::write<psyqo::GTE::Register::OFY, psyqo::GTE::Unsafe>(psyqo::FixedPoint<16>(120.0).raw());
|
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::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::ZSF3, psyqo::GTE::Unsafe>(
|
||||||
psyqo::GTE::write<psyqo::GTE::Register::ZSF4, psyqo::GTE::Unsafe>(ORDERING_TABLE_SIZE / 4);
|
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) {
|
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::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) {
|
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::SXY1>(&projected[2].packed);
|
||||||
psyqo::GTE::read<psyqo::GTE::Register::SXY2>(&projected[3].packed);
|
psyqo::GTE::read<psyqo::GTE::Register::SXY2>(&projected[3].packed);
|
||||||
|
|
||||||
auto &prim = balloc.allocate<
|
auto &prim = balloc.allocate<psyqo::Fragments::SimpleFragment<
|
||||||
psyqo::Fragments::SimpleFragment<psyqo::Prim::TexturedTriangle>>();
|
psyqo::Prim::TexturedTriangle>>();
|
||||||
|
|
||||||
prim.primitive.pointA = projected[0];
|
prim.primitive.pointA = projected[0];
|
||||||
prim.primitive.pointB = projected[1];
|
prim.primitive.pointB = projected[1];
|
||||||
|
|||||||
@@ -2,12 +2,12 @@
|
|||||||
|
|
||||||
#include "EASTL/array.h"
|
#include "EASTL/array.h"
|
||||||
#include "gameobject.hh"
|
#include "gameobject.hh"
|
||||||
|
#include "psyqo/bump-allocator.hh"
|
||||||
#include "psyqo/fragments.hh"
|
#include "psyqo/fragments.hh"
|
||||||
#include "psyqo/gpu.hh"
|
#include "psyqo/gpu.hh"
|
||||||
#include "psyqo/ordering-table.hh"
|
#include "psyqo/ordering-table.hh"
|
||||||
#include "psyqo/primitives/common.hh"
|
#include "psyqo/primitives/common.hh"
|
||||||
#include "psyqo/primitives/misc.hh"
|
#include "psyqo/primitives/misc.hh"
|
||||||
#include "psyqo/bump-allocator.hh"
|
|
||||||
#include "psyqo/trigonometry.hh"
|
#include "psyqo/trigonometry.hh"
|
||||||
|
|
||||||
namespace psxsplash {
|
namespace psxsplash {
|
||||||
@@ -30,4 +30,4 @@ class Renderer final {
|
|||||||
void render(eastl::array<GameObject> &objects);
|
void render(eastl::array<GameObject> &objects);
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
} // namespace psxsplash
|
||||||
@@ -11,4 +11,4 @@ class Texture final {
|
|||||||
psyqo::PrimPieces::TPageAttr m_tpage;
|
psyqo::PrimPieces::TPageAttr m_tpage;
|
||||||
uint8_t m_width, m_height;
|
uint8_t m_width, m_height;
|
||||||
};
|
};
|
||||||
}
|
} // namespace psxsplash
|
||||||
Reference in New Issue
Block a user