Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ add_library(sead OBJECT
include/devenv/seadGameConfig.h
include/devenv/seadStackTrace.h
modules/src/devenv/seadAssertConfig.cpp
modules/src/devenv/seadFontMgr.cpp
modules/src/devenv/seadGameConfig.cpp
modules/src/devenv/seadStackTrace.cpp

Expand Down
2 changes: 1 addition & 1 deletion include/devenv/seadFontMgr.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class UniformBlockBuffer
class FontBase
{
public:
virtual ~FontBase();
virtual ~FontBase() = default;

virtual float getHeight() const = 0;
virtual float getWidth() const = 0;
Expand Down
2 changes: 1 addition & 1 deletion include/gfx/seadFrameBuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class LogicalFrameBuffer
mPhysicalArea(physical_x, physical_y, physical_x + physical_w, physical_y + physical_h)
{
}
virtual ~LogicalFrameBuffer();
virtual ~LogicalFrameBuffer() = default;

const Vector2f& getVirtualSize() const { return mVirtualSize; }
const BoundBox2f& getPhysicalArea() const { return mPhysicalArea; }
Expand Down
4 changes: 2 additions & 2 deletions include/gfx/seadProjection.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class Projection

public:
Projection();
virtual ~Projection() = default;
virtual ~Projection();

virtual f32 getNear() const = 0;
virtual f32 getFar() const = 0;
Expand Down Expand Up @@ -72,7 +72,7 @@ class PerspectiveProjection : public Projection
public:
PerspectiveProjection();
PerspectiveProjection(f32 near, f32 far, f32 fovy_rad, f32 aspect);
~PerspectiveProjection() override;
~PerspectiveProjection() override = default;

f32 getNear() const override;
f32 getFar() const override;
Expand Down
26 changes: 26 additions & 0 deletions include/prim/seadStringBuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,32 @@ class StringBuilderBase
template <typename OtherType>
s32 convertFromOtherType_(const OtherType* src, s32 src_size);

s32 copyImpl_(const T* src, s32 copy_length);
bool endsWithImpl_(const T* suffix) const;
s32 copyAtImpl_(s32 at, const T* src, s32 copy_length);
s32 cutOffCopyImpl_(const T* src, s32 copy_length);
s32 cutOffCopyAtImpl_(s32 at, const T* src, s32 copy_length);
s32 copyAtWithTerminateImpl_(s32 at, const T* src, s32 copy_length);
s32 appendImpl_(const T* str, s32 append_length);
s32 appendImpl_(T* buffer, s32* length_, const s32 buffer_size, T c, s32 num);
s32 chopImpl_(s32 chop_num);
s32 chopMatchedCharImpl_(T c);
s32 chopMatchedCharImpl_(const T* characters);
s32 chopUnprintableAsciiCharImpl_();
s32 rstripImpl_(const T* characters);
s32 rstripUnprintableAsciiCharsImpl_();
s32 trimImpl_(s32 trim_length);
s32 trimMatchedStringImpl_(const T* str);
s32 replaceCharImpl_(T old_char, T new_char);
inline s32 replaceCharListImpl_(const SafeStringBase<T>& old_chars,
const SafeStringBase<T>& new_chars);
s32 convertFromMultiByteStringImpl_(const char* str, s32 str_length);
s32 convertFromWideCharStringImpl_(const char16* str, s32 str_length);
s32 cutOffAppendImpl_(const T* str, s32 append_length);
s32 cutOffAppendImpl_(T c, s32 num);
s32 prependImpl_(const T* str, s32 prepend_length);
s32 prependImpl_(T c, s32 num);

T* getMutableStringTop_() const { return mBuffer; }

T* mBuffer;
Expand Down
1 change: 1 addition & 0 deletions include/resource/seadResource.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ class IndirectResource : public Resource

public:
IndirectResource();
~IndirectResource() override;

void create(sead::ReadStream* stream, u32 size, sead::Heap* heap);

Expand Down
6 changes: 0 additions & 6 deletions modules/src/devenv/seadFontMgr.cpp

This file was deleted.

2 changes: 0 additions & 2 deletions modules/src/gfx/seadFrameBuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

namespace sead
{
LogicalFrameBuffer::~LogicalFrameBuffer() = default;

FrameBuffer::~FrameBuffer() = default;

void FrameBuffer::clearMRT(DrawContext*, u32, const Color4f&) const {}
Expand Down
2 changes: 2 additions & 0 deletions modules/src/gfx/seadProjection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ Projection::Projection()
mDeviceZOffset = Graphics::sDefaultDeviceZOffset;
}

Projection::~Projection() = default;

void Projection::updateAttributesForDirectProjection() {}

const Matrix44f& Projection::getProjectionMatrix() const
Expand Down
61 changes: 49 additions & 12 deletions modules/src/math/seadMathCalcCommon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -608,9 +608,8 @@ const MathCalcCommon<f32>::LogSample MathCalcCommon<f32>::cLogTbl[256 + 1]{
{0.6911921501159668, 0.0019550349097698927},
{0.6931471824645996, 0.0019512200960889459},
};

template <typename T>
T MathCalcCommon<T>::gcd(T x, T y)
T gcdImpl_(T x, T y)
{
if (x == 0 || y == 0)
return 0;
Expand All @@ -627,17 +626,36 @@ T MathCalcCommon<T>::gcd(T x, T y)
}

template <typename T>
T MathCalcCommon<T>::lcm(T x, T y)
T lcmImpl_(T x, T y)
{
if (x == 0 || y == 0)
return 0;
return x / gcd(x, y) * y;
return x / gcdImpl_(x, y) * y;
}

template <>
s32 MathCalcCommon<s32>::gcd(s32 x, s32 y)
{
return gcdImpl_(x, y);
}

template <>
s32 MathCalcCommon<s32>::lcm(s32 x, s32 y)
{
return lcmImpl_(x, y);
}

template <>
u32 MathCalcCommon<u32>::gcd(u32 x, u32 y)
{
return gcdImpl_(x, y);
}

template s32 MathCalcCommon<s32>::gcd(s32 x, s32 y);
template s32 MathCalcCommon<s32>::lcm(s32 x, s32 y);
template u32 MathCalcCommon<u32>::gcd(u32 x, u32 y);
template u32 MathCalcCommon<u32>::lcm(u32 x, u32 y);
template <>
u32 MathCalcCommon<u32>::lcm(u32 x, u32 y)
{
return lcmImpl_(x, y);
}

template <>
u32 MathCalcCommon<f32>::atanIdx_(f32 t)
Expand Down Expand Up @@ -684,9 +702,28 @@ f32 MathCalcCommon<f32>::logTable(f32 x)
return cLogTbl[index].log_val + (cLogTbl[index].log_delta * rest) + (more * ln2());
}

template s64 MathCalcCommon<s64>::gcd(s64 x, s64 y);
template s64 MathCalcCommon<s64>::lcm(s64 x, s64 y);
template u64 MathCalcCommon<u64>::gcd(u64 x, u64 y);
template u64 MathCalcCommon<u64>::lcm(u64 x, u64 y);
template <>
s64 MathCalcCommon<s64>::gcd(s64 x, s64 y)
{
return gcdImpl_(x, y);
}

template <>
s64 MathCalcCommon<s64>::lcm(s64 x, s64 y)
{
return lcmImpl_(x, y);
}

template <>
u64 MathCalcCommon<u64>::gcd(u64 x, u64 y)
{
return gcdImpl_(x, y);
}

template <>
u64 MathCalcCommon<u64>::lcm(u64 x, u64 y)
{
return lcmImpl_(x, y);
}

} // namespace sead
Loading
Loading