Files
ss/include/d/lyt/d_textbox.h
T
robojumper d3d4bd253c Some large functions in d_tag_processor (#86)
* d_tag_processor WIP

* Progress

* Unconst

* Fix switch command (thanks Roeming!)

* Match a random text related file instead

* More progress

* More progress

* No missing breaks

* Some repair

* Some repair and shuffling

* More repair

* a bit better

* a bit better 2

* what a switch order

* Closer unrolling

* Minor cleanup

* Fix accidental cases

* More fixes

* even better

* More fixes

* Down to regswaps

* Some renames

* Review feedback

* cleanup more sdata2 values and eventFlowTextProcessingRelated match

---------

Co-authored-by: elijah-thomas774 <elijahthomas774@gmail.com>
2024-11-06 17:19:40 -05:00

67 lines
1.6 KiB
C++

#ifndef D_LYT_TEXTBOX_H
#define D_LYT_TEXTBOX_H
#include "d/lyt/d2d.h"
#include "nw4r/lyt/lyt_textBox.h"
extern "C" void *lbl_805753B0;
class dTextBox_c : public nw4r::lyt::TextBox {
friend class dWindow_c;
public:
dTextBox_c(const nw4r::lyt::res::TextBox *pBlock, const nw4r::lyt::ResBlockSet &ResBlockSet);
f32 GetLineWidth(f32 *pOutSpacing);
void setLytBase(d2d::LytBase_c *lytBase) {
mpLytBase = lytBase;
}
void SetScale(float scale) {
nw4r::math::VEC2 value = GetScale();
value.x = GetScale().x * scale;
value.y = GetScale().y * scale;
mScale = scale;
MySetScale(value);
nw4r::lyt::TextBox::SetScale(value);
}
void set0x1F8(u8 val) {
field_0x1F8 = val;
}
f32 getMyScale() const {
return mScale;
}
static inline f32 GetTranslateX1() {
if (lbl_805753B0 != nullptr) {
return GetTranslateX1_();
} else {
return 0.0f;
}
}
void fn_800E0A60(const char *area, ...) {
// TODO
}
static f32 GetTranslateX1_();
// @bug: This does not implement UT's RTTI, so casts to dTextBox_c will
// succeed even if all you have is a lyt::TextBox
private:
void MySetScale(const nw4r::math::VEC2 &value);
/* 0x104 */ d2d::LytBase_c *mpLytBase;
/* 0x108 */ u8 field_0x108[0x118 - 0x108];
/* 0x118 */ nw4r::math::VEC2 mTextScale;
/* 0x120 */ f32 mScale;
/* 0x124 */ u8 field_0x124[0x1F8 - 0x124];
/* 0x1F8 */ u8 field_0x1F8;
/* 0x1F9 */ u8 field_0x1F9[0x204 - 0x1F9];
};
#endif