Skip to content
Merged
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: 1 addition & 0 deletions config/SOME01/splits.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3032,6 +3032,7 @@ GameUtil/FaderFlash.cpp:
GameUtil/Layout.cpp:
.text start:0x801D85BC end:0x801D9E40
.ctors start:0x801F7568 end:0x801F756C
.rodata start:0x802E4C20 end:0x802E4C38
.data start:0x803162F8 end:0x803163E0
.sbss start:0x80320FA0 end:0x80320FA8
.sdata2 start:0x80329590 end:0x803295A8
Expand Down
18 changes: 9 additions & 9 deletions config/SOME01/symbols.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6522,7 +6522,7 @@ __dt__Q34nw4r3lyt4PaneFv = .text:0x8019B890; // type:function size:0x13C
AppendChild__Q34nw4r3lyt4PaneFPQ34nw4r3lyt4Pane = .text:0x8019B9D0; // type:function size:0x50
PrependChild__Q34nw4r3lyt4PaneFPQ34nw4r3lyt4Pane = .text:0x8019BA20; // type:function size:0x50
RemoveChild__Q34nw4r3lyt4PaneFPQ34nw4r3lyt4Pane = .text:0x8019BA70; // type:function size:0x3C
GetPaneRect__Q34nw4r3lyt4PaneCFv = .text:0x8019BAB0; // type:function size:0x110
GetPaneRect__Q34nw4r3lyt4PaneCFRCQ34nw4r3lyt8DrawInfo = .text:0x8019BAB0; // type:function size:0x110
GetVtxColor__Q34nw4r3lyt4PaneCFUl = .text:0x8019BBC0; // type:function size:0xC
SetVtxColor__Q34nw4r3lyt4PaneFUlQ34nw4r2ut5Color = .text:0x8019BBD0; // type:function size:0x4
GetColorElement__Q34nw4r3lyt4PaneCFUl = .text:0x8019BBE0; // type:function size:0x24
Expand Down Expand Up @@ -7875,14 +7875,14 @@ fn_801D8578__6CSceneFv = .text:0x801D8578; // type:function size:0x1C
_24__6CSceneFv = .text:0x801D8594; // type:function size:0x8
fn_801D859C__11CFaderFlashFv = .text:0x801D859C; // type:function size:0x20
fn_801D85BC__8CBtnPaneFPQ34nw4r3lyt4PanePQ34nw4r3lyt8DrawInfo = .text:0x801D85BC; // type:function size:0x114
fn_801D86D0 = .text:0x801D86D0; // type:function size:0x1AC
fn_801D887C = .text:0x801D887C; // type:function size:0x1E0
fn_801D8A5C = .text:0x801D8A5C; // type:function size:0x5A0
fn_801D8FFC = .text:0x801D8FFC; // type:function size:0x94
fn_801D9090 = .text:0x801D9090; // type:function size:0x610
fn_801D96A0 = .text:0x801D96A0; // type:function size:0x26C
fn_801D990C = .text:0x801D990C; // type:function size:0x68
fn_801D9974 = .text:0x801D9974; // type:function size:0xB8
fn_801D86D0__8CBtnPaneFPQ34nw4r3lyt4PanePQ34nw4r3lyt8DrawInfo = .text:0x801D86D0; // type:function size:0x1AC
fn_801D887C__8CBtnPaneFPQ34nw4r3lyt4PanePQ34nw4r3lyt8DrawInfo = .text:0x801D887C; // type:function size:0x1E0
fn_801D8A5C__FPQ34nw4r3lyt7TextBoxff = .text:0x801D8A5C; // type:function size:0x5A0
fn_801D8FFC__10CExBtnPaneFPQ34nw4r3lyt4Pane = .text:0x801D8FFC; // type:function size:0x94
fn_801D9090__10CExBtnPaneFPQ34nw4r4math4VEC2bPQ34nw4r3lyt8DrawInfo = .text:0x801D9090; // type:function size:0x610
_10__10CExBtnPaneF9EBtnStateb = .text:0x801D96A0; // type:function size:0x26C
_14__10CExBtnPaneFv = .text:0x801D990C; // type:function size:0x68
fn_801D9974__10CExBtnPaneFv = .text:0x801D9974; // type:function size:0xB8
__ct__7CLayoutFv = .text:0x801D9A2C; // type:function size:0x20
_0C__7CLayoutFv = .text:0x801D9A4C; // type:function size:0x84
__dt__16CLayoutAnimationFv = .text:0x801D9AD0; // type:function size:0x40
Expand Down
11 changes: 11 additions & 0 deletions include/nw4r/lyt/pane.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ class Pane : public detail::PaneBase {
virtual Material *GetMaterial() const;
virtual Material *GetMaterial(u32 idx) const;

ut::Rect GetPaneRect() const;
ut::Rect GetPaneRect(const DrawInfo &) const;

bool IsVisible() const {
return detail::TestBit(mFlag, 0);
}
Expand Down Expand Up @@ -100,13 +103,21 @@ class Pane : public detail::PaneBase {
mScale = value;
}

const Size &GetSize() const {
return mSize;
}

void SetSize(const Size &value) {
mSize = value;
}

Pane *GetParent() const {
return mpParent;
}

ut::LinkList<Pane, offsetof(detail::PaneBase, mLink)> &GetChildList() {
return mChildList;
}

protected:
virtual void LoadMtx(const DrawInfo &drawInfo);
Expand Down
1 change: 1 addition & 0 deletions include/nw4r/ut/LinkList.h
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,7 @@ namespace nw4r { namespace ut

static LinkListNode *GetNodeFromPointer(T *p)
{
NW4R_ASSERT_PTR_NULL(p, 563);
return reinterpret_cast<LinkListNode *>(reinterpret_cast<u32>(p)
+ I);
}
Expand Down
6 changes: 6 additions & 0 deletions include/nw4r/ut/TextWriterBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,12 @@ template <typename T> class TextWriterBase : public CharWriter {
f32 CalcStringWidth(const T* pStr, int len) const;
void CalcStringRect(Rect* pRect, const T* pStr, int len) const;

f32 CalcStringWidth(const T* str) const {
NW4R_ASSERT_PTR(this, 212);
NW4R_ASSERT_PTR(str, 213);
return CalcStringWidth(str, StrLen(str));
}

void CalcStringRect(Rect* pRect, const T* str) const {
NW4R_ASSERT_PTR(this, 233);
NW4R_ASSERT_PTR(pRect, 234);
Expand Down
6 changes: 1 addition & 5 deletions src/Game/CursorLayout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ void CCursorLayout::_10(void) {
}
}

extern Vec2 lbl_80320FA0;

void CCursorLayout::_18(nw4r::lyt::DrawInfo *drawInfo) {
for (s32 i = 0; i < CURSOR_COUNT; i++) {
if (mPaneTrans[i]->IsVisible()) {
Expand All @@ -65,9 +63,7 @@ void CCursorLayout::_18(nw4r::lyt::DrawInfo *drawInfo) {
));
}
else {
mPaneTrans[i]->SetTranslate(nw4r::math::VEC2(
lbl_80320FA0.x, lbl_80320FA0.y
));
mPaneTrans[i]->SetTranslate(lbl_80320FA0);
}
}

Expand Down
3 changes: 0 additions & 3 deletions src/Game/Epilogue/MyLayout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@

#include <cstdio>

// TODO
extern "C" void fn_801D8A5C(nw4r::lyt::TextBox *, f32, f32);

static const char layoutFile_epilogue[] = "epilogue.brlyt";

DECL_SECTION(".sdata") static const char *layoutFileTable[] = { layoutFile_epilogue, NULL };
Expand Down
8 changes: 3 additions & 5 deletions src/Game/Error/MyLayout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,17 +208,15 @@ void Error::CMyLayout::_10(void) {
mUnkF8 = false;
}

extern Vec2 lbl_80320FA0;

void Error::CMyLayout::_18(nw4r::lyt::DrawInfo *drawInfo) {
CController *controller = gControllerManager->fn_801D5FF0(0);

Vec2 vec = (Vec2) {
nw4r::math::VEC2 vec (
controller->fn_801D523C(this).x,
controller->fn_801D523C(this).y
};
);

if (!mUnkF8 || !controller->fn_801D52D4()) {
if (mUnkF8 || !controller->fn_801D52D4()) {
vec.x = lbl_80320FA0.x;
vec.y = lbl_80320FA0.y;
}
Expand Down
3 changes: 0 additions & 3 deletions src/Game/Perfect/MyLayout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
#include "GameTable.hpp"
#include "GiftTable.hpp"

// TODO
extern "C" void fn_801D8A5C(nw4r::lyt::TextBox *, f32, f32);


const char layoutFile_perfect[] = "perfect.brlyt";

Expand Down
Loading
Loading