mirror of https://github.com/PrimeDecomp/prime.git
parent
beefef812b
commit
9488e643e5
|
@ -3,8 +3,8 @@
|
|||
.section .data
|
||||
.balign 8
|
||||
|
||||
.global lbl_803ED610
|
||||
lbl_803ED610:
|
||||
.global __vt__26CLineExtraSpaceInstruction
|
||||
__vt__26CLineExtraSpaceInstruction:
|
||||
# ROM: 0x3EA610
|
||||
.4byte 0
|
||||
.4byte 0
|
||||
|
@ -25,8 +25,8 @@ __dt__26CLineExtraSpaceInstructionFv:
|
|||
/* 802FF818 002FC778 93 E1 00 0C */ stw r31, 0xc(r1)
|
||||
/* 802FF81C 002FC77C 7C 7F 1B 79 */ or. r31, r3, r3
|
||||
/* 802FF820 002FC780 41 82 00 30 */ beq lbl_802FF850
|
||||
/* 802FF824 002FC784 3C 60 80 3F */ lis r3, lbl_803ED610@ha
|
||||
/* 802FF828 002FC788 38 03 D6 10 */ addi r0, r3, lbl_803ED610@l
|
||||
/* 802FF824 002FC784 3C 60 80 3F */ lis r3, __vt__26CLineExtraSpaceInstruction@ha
|
||||
/* 802FF828 002FC788 38 03 D6 10 */ addi r0, r3, __vt__26CLineExtraSpaceInstruction@l
|
||||
/* 802FF82C 002FC78C 90 1F 00 00 */ stw r0, 0(r31)
|
||||
/* 802FF830 002FC790 41 82 00 10 */ beq lbl_802FF840
|
||||
/* 802FF834 002FC794 3C 60 80 3E */ lis r3, __vt__12CInstruction@ha
|
||||
|
|
|
@ -1634,10 +1634,10 @@ __ct__26CLineExtraSpaceInstructionFi:
|
|||
/* 803031DC 0030013C 7C 7F 1B 79 */ or. r31, r3, r3
|
||||
/* 803031E0 00300140 41 82 00 20 */ beq lbl_80303200
|
||||
/* 803031E4 00300144 3C 80 80 3E */ lis r4, __vt__12CInstruction@ha
|
||||
/* 803031E8 00300148 3C 60 80 3F */ lis r3, lbl_803ED610@ha
|
||||
/* 803031E8 00300148 3C 60 80 3F */ lis r3, __vt__26CLineExtraSpaceInstruction@ha
|
||||
/* 803031EC 0030014C 38 04 9A 6C */ addi r0, r4, __vt__12CInstruction@l
|
||||
/* 803031F0 00300150 90 1F 00 00 */ stw r0, 0(r31)
|
||||
/* 803031F4 00300154 38 03 D6 10 */ addi r0, r3, lbl_803ED610@l
|
||||
/* 803031F4 00300154 38 03 D6 10 */ addi r0, r3, __vt__26CLineExtraSpaceInstruction@l
|
||||
/* 803031F8 00300158 90 1F 00 00 */ stw r0, 0(r31)
|
||||
/* 803031FC 0030015C 93 DF 00 04 */ stw r30, 4(r31)
|
||||
lbl_80303200:
|
||||
|
|
|
@ -539,7 +539,7 @@ LIBS = [
|
|||
["Kyoto/Text/CDrawStringOptions", True],
|
||||
"Kyoto/Text/CFontInstruction",
|
||||
"Kyoto/Text/CFontRenderState",
|
||||
"Kyoto/Text/CLineExtraSpaceInstruction",
|
||||
["Kyoto/Text/CLineExtraSpaceInstruction", True],
|
||||
"Kyoto/Text/CLineInstruction",
|
||||
["Kyoto/Text/CLineSpacingInstruction", True],
|
||||
"Kyoto/Text/CPopStateInstruction",
|
||||
|
|
|
@ -9,6 +9,7 @@ class CBlockInstruction;
|
|||
class CFontRenderState : private CSaveableState {
|
||||
public:
|
||||
void SetLineSpacing(float spacing) { CSaveableState::SetLineSpacing(spacing); }
|
||||
void SetExtraLineSpace(int spacing) { CSaveableState::SetLineExtraSpace(spacing); }
|
||||
|
||||
private:
|
||||
CBlockInstruction* x88_curBlock;
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
#ifndef _CLINEEXTRASPACINGINSTRUCTION
|
||||
#define _CLINEEXTRASPACINGINSTRUCTION
|
||||
|
||||
#include "Kyoto/Text/CInstruction.hpp"
|
||||
|
||||
class CLineExtraSpaceInstruction : public CInstruction {
|
||||
public:
|
||||
CLineExtraSpaceInstruction(int spacing) : x4_spacing(spacing) {}
|
||||
~CLineExtraSpaceInstruction() {}
|
||||
|
||||
void Invoke(CFontRenderState& state, CTextRenderBuffer* buf) const;
|
||||
void PageInvoke(CFontRenderState& state, CTextRenderBuffer* buf) const;
|
||||
private:
|
||||
int x4_spacing;
|
||||
};
|
||||
|
||||
#endif // _CLINEEXTRASPACINGINSTRUCTION
|
|
@ -15,6 +15,7 @@ public:
|
|||
bool IsFinishedLoading();
|
||||
|
||||
void SetLineSpacing(float spacing) { x74_lineSpacing = spacing; }
|
||||
void SetLineExtraSpace(int spacing) { x78_extraLineSpacing = spacing; }
|
||||
|
||||
private:
|
||||
CDrawStringOptions x0_drawStringOptions;
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
#include "Kyoto/Text/CLineExtraSpaceInstruction.hpp"
|
||||
|
||||
#include "Kyoto/Text/CFontRenderState.hpp"
|
||||
|
||||
void CLineExtraSpaceInstruction::Invoke(CFontRenderState& state, CTextRenderBuffer* buf) const {
|
||||
state.SetExtraLineSpace(x4_spacing);
|
||||
}
|
||||
|
||||
void CLineExtraSpaceInstruction::PageInvoke(CFontRenderState& state, CTextRenderBuffer* buf) const {
|
||||
Invoke(state, buf);
|
||||
}
|
Loading…
Reference in New Issue