Compare commits

...

1 Commits

Author SHA1 Message Date
devin
bd197ab294 Link scene/memoryCard/iplMemoryCardBase (clean subset)
Gate Rect.~Rect and RuntimeTypeInfo.DynamicCast behind
IPL_MEMORYCARD_BASE_CPP so this TU emits the weak destructors and the
out-of-line dynamic cast the original object contains.

Co-Authored-By: coah80 <usernamecole7@gmail.com>
Co-Authored-By: wch <usernamecole7@gmail.com>
2026-10-01 14:02:48 +00:00
4 changed files with 6 additions and 5 deletions

View File

@@ -813,7 +813,7 @@ config.libs = [
),
IPLSection("memoryCard", [
Object(Matching, "scene/memoryCard/iplMemoryCard.cpp"),
Object(NonMatching, "scene/memoryCard/iplMemoryCardBase.cpp"),
Object(Matching, "scene/memoryCard/iplMemoryCardBase.cpp"),
Object(NonMatching, "scene/memoryCard/iplMemoryCardManager.cpp"),
Object(Matching, "scene/memoryCard/iplGCSaveData.cpp"),
Object(NonMatching, "scene/memoryCard/iplGCWindow.cpp"),

View File

@@ -20,7 +20,7 @@ namespace nw4r {
Rect(f32 l, f32 t, f32 r, f32 b) : left(l), top(t), right(r), bottom(b) {}
#endif
#ifndef IPL_CONTROLLER_TRIVIAL_RECT_DTOR
#if !defined(IPL_CONTROLLER_TRIVIAL_RECT_DTOR) && !defined(IPL_MEMORYCARD_BASE_CPP)
~Rect() {}
#endif

View File

@@ -37,7 +37,7 @@ namespace nw4r {
} // namespace detail
template <typename TDerived, typename TBase>
#ifdef IPL_BOARD_OBJECT_EXTERNAL_DYNAMIC_CAST
#if defined(IPL_BOARD_OBJECT_EXTERNAL_DYNAMIC_CAST) || defined(IPL_MEMORYCARD_BASE_CPP)
TDerived DynamicCast(TBase* pPtr);
#else
inline TDerived DynamicCast(TBase* pPtr) {

View File

@@ -1,4 +1,5 @@
#define IPL_MEMORYCARD_BASE_IMPLEMENTATION
#define IPL_MEMORYCARD_BASE_CPP
#include "scene/memoryCard/iplMemoryCardBase.h"
#include "scene/settingSelect/iplSettingSelect.h"
#include "scene/settingSelect/iplSettingButton.h"
@@ -130,7 +131,7 @@ void MemoryBase::set_textbox(const char* paneName, u32 message) {
void MemoryBase::set_textbox(const char* paneName, u32 message, int animationIndex, int frame) {
Anm* animation = get_animation(animationIndex);
if (animation->mAnim->getCurrentFrame() >= frame) {
if (animation->mAnim->getCurrentFrame() >= (f32)frame) {
set_textbox(paneName, message);
}
}
@@ -141,7 +142,7 @@ void MemoryBase::set_textbox(const char* paneName, const wchar_t* text, f32 widt
while (length != 0) {
textBox->SetString(text, 0, length);
textBox->CalculateMtx(*mpLayout->getDrawInfo());
nw4r::ut::Rect bounds = textBox->GetTextDrawRect(*mpLayout->getDrawInfo());
const nw4r::ut::Rect& bounds = textBox->GetTextDrawRect(*mpLayout->getDrawInfo());
if (bounds.right - bounds.left < width &&
-1.0f * (bounds.bottom - bounds.top) < height) {
break;