Skip to content

Commit

Permalink
Improve setTextBoxInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
NerduMiner authored and EpochFlame committed Jan 8, 2025
1 parent 7257c30 commit bcf2df5
Showing 1 changed file with 38 additions and 4 deletions.
42 changes: 38 additions & 4 deletions src/sysGCU/messageRendering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2743,14 +2743,18 @@ void TRenderingProcessor::setTextBoxInfo(J2DPane* pane)

J2DTextBoxEx* text = static_cast<J2DTextBoxEx*>(pane);

JUtility::TColor black = text->getBlack();
JUtility::TColor white = text->getWhite();
// Target is going extra with all the byte assignments, so maybe
// There is more to this than what we have right now.
JUtility::TColor chrcolor = text->mCharColor;
JUtility::TColor gradcolor = text->mGradientColor;
JUtility::TColor something = JUtility::TColor(255, 255, 255, 255);
JUtility::TColor black = JUtility::TColor(255, 255, 255, 255);
black = text->getBlack();
JUtility::TColor white = text->getWhite();

mBaseAlphaModifier = (f32)text->mColorAlpha / 255.0f;
mImageColorB = black;
mImageColorA = white;
mImageColorB = white;
mImageColorA = black;
mDefaultCharColor = chrcolor;
mDefaultGradColor = gradcolor;
mDefaultWhite = white;
Expand All @@ -2766,6 +2770,36 @@ void TRenderingProcessor::setTextBoxInfo(J2DPane* pane)
mFontWidth = text->mFontSize.x / mMainFont->getWidth();
mFontHeight = text->mFontSize.y / mMainFont->getHeight();


switch((text->mFlags) >> 2 & 3) {
case 1:
mFlags.typeView &= ~0x700;
mFlags.typeView |= 0x40;
break;
case 0:
mFlags.typeView &= ~0x700;
mFlags.typeView |= 0x20;
break;
case 2:
mFlags.typeView &= ~0x700;
mFlags.typeView |= 0x10;
break;
}
switch ((text->mFlags) & 3)
{
case 1:
mFlags.typeView &= ~0x700;
mFlags.typeView |= 0x400;
break;
case 0:
mFlags.typeView &= ~0x700;
mFlags.typeView |= 0x200;
break;
case 2:
mFlags.typeView &= ~0x700;
mFlags.typeView |= 0x100;
break;
}
/*
stwu r1, -0x90(r1)
mflr r0
Expand Down

0 comments on commit bcf2df5

Please sign in to comment.