Skip to content

Commit

Permalink
[Chores] Format code
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasnoble authored Oct 23, 2024
1 parent e9dc935 commit 2f65e36
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions src/mips/psyqo/bump-allocator.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@ namespace psyqo {
template <size_t N>
class BumpAllocator {
public:
template <Primitive P, typename ...Args>
Fragments::SimpleFragment<P> &allocateFragment(Args ...args) {
template <Primitive P, typename... Args>
Fragments::SimpleFragment<P> &allocateFragment(Args... args) {
static constexpr size_t size = sizeof(Fragments::SimpleFragment<P>);
uint8_t *ptr = m_current;
m_current += size;
return *new (ptr) Fragments::SimpleFragment<P>(args...);
}
template <typename T, typename ...Args>
T &allocate(Args ...args) {
template <typename T, typename... Args>
T &allocate(Args... args) {
size_t size = sizeof(T);
uint8_t *ptr = m_current;
if constexpr (alignof(T) > 1) {
Expand Down
4 changes: 2 additions & 2 deletions src/mips/psyqo/examples/cube/cube.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ void CubeScene::frame() {

// Read the result of nclip and skip rendering this face if it's not facing us
int32_t mac0 = 0;
psyqo::GTE::read<psyqo::GTE::Register::MAC0>(reinterpret_cast<uint32_t *>(&mac0));
psyqo::GTE::read<psyqo::GTE::Register::MAC0>(reinterpret_cast<uint32_t*>(&mac0));
if (mac0 <= 0) continue;

// Since the GTE can only handle 3 vertices at a time, we need to store our first vertex
Expand All @@ -191,7 +191,7 @@ void CubeScene::frame() {
// Calculate the average Z for the z-Index to be put in the ordering table
psyqo::GTE::Kernels::avsz4();
int32_t zIndex = 0;
psyqo::GTE::read<psyqo::GTE::Register::OTZ>(reinterpret_cast<uint32_t *>(&zIndex));
psyqo::GTE::read<psyqo::GTE::Register::OTZ>(reinterpret_cast<uint32_t*>(&zIndex));

// If the Z-index is out of bounds for our ordering table, we skip rendering this face.
if (zIndex < 0 || zIndex >= ORDERING_TABLE_SIZE) continue;
Expand Down
2 changes: 1 addition & 1 deletion src/mips/psyqo/primitives/common.hh
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ enum ColorMode { Tex4Bits, Tex8Bits, Tex16Bits };
} // namespace Prim::TPageAttr

namespace Prim {
enum class Transparency { Auto, Opaque, SemiTransparent };
enum class Transparency { Auto, Opaque, SemiTransparent };
}

namespace PrimPieces {
Expand Down

0 comments on commit 2f65e36

Please sign in to comment.