1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
|
//
// Generated By: dol2asm
// Translation Unit: J2DTextBoxEx
//
#include "JSystem/J2DGraph/J2DTextBoxEx.h"
#include "JSystem/J2DGraph/J2DPrint.h"
#include "JSystem/JSupport/JSURandomInputStream.h"
#include "JSystem/JUtility/JUTResFont.h"
#include "dol2asm.h"
#include "dolphin/types.h"
//
// Forward References:
//
extern "C" void __ct__12J2DTextBoxExFP7J2DPaneP20JSURandomInputStreamUlP11J2DMaterial();
extern "C" void __dt__12J2DTextBoxExFv();
extern "C" void drawSelf__12J2DTextBoxExFffPA3_A4_f();
extern "C" void draw__12J2DTextBoxExFff();
extern "C" void draw__12J2DTextBoxExFfff18J2DTextBoxHBinding();
extern "C" void setFont__12J2DTextBoxExFP7JUTFont();
extern "C" void getFont__12J2DTextBoxExCFv();
extern "C" void setTevOrder__12J2DTextBoxExFb();
extern "C" void setTevStage__12J2DTextBoxExFb();
extern "C" void setStage__12J2DTextBoxExFP11J2DTevStageQ212J2DTextBoxEx10stage_enum();
extern "C" void setBlack__12J2DTextBoxExFQ28JUtility6TColor();
extern "C" void setWhite__12J2DTextBoxExFQ28JUtility6TColor();
extern "C" void setBlackWhite__12J2DTextBoxExFQ28JUtility6TColorQ28JUtility6TColor();
extern "C" void getBlackWhite__12J2DTextBoxExCFPQ28JUtility6TColorPQ28JUtility6TColor();
extern "C" void isSetBlackWhite__12J2DTextBoxExCFQ28JUtility6TColorQ28JUtility6TColor();
extern "C" void getBlack__12J2DTextBoxExCFv();
extern "C" void getWhite__12J2DTextBoxExCFv();
extern "C" void setAlpha__12J2DTextBoxExFUc();
extern "C" void setCullBack__12J2DTextBoxExF11_GXCullMode();
extern "C" void rewriteAlpha__12J2DTextBoxExFv();
extern "C" void isUsed__12J2DTextBoxExFPC7ResFONT();
extern "C" void setAnimation__12J2DTextBoxExFP11J2DAnmColor();
extern "C" void setAnimation__12J2DTextBoxExFP19J2DAnmTextureSRTKey();
extern "C" void setAnimation__12J2DTextBoxExFP16J2DAnmTexPattern();
extern "C" void setAnimation__12J2DTextBoxExFP15J2DAnmTevRegKey();
extern "C" void setAnimation__12J2DTextBoxExFP20J2DAnmVisibilityFull();
extern "C" void animationPane__12J2DTextBoxExFPC15J2DAnmTransform();
extern "C" void setCullBack__12J2DTextBoxExFb();
extern "C" void isUsed__12J2DTextBoxExFPC7ResTIMG();
extern "C" void setAnimation__12J2DTextBoxExFP14J2DAnmVtxColor();
extern "C" void setAnimation__12J2DTextBoxExFP10J2DAnmBase();
extern "C" extern char const* const J2DTextBoxEx__stringBase0;
//
// External References:
//
extern "C" void calcMtx__7J2DPaneFv();
extern "C" void makeMatrix__7J2DPaneFff();
extern "C" void getMaterial__12J2DTextBoxExCFv();
extern "C" void setAnimation__12J2DTextBoxExFP15J2DAnmTransform();
extern "C" void* __nwa__FUl();
extern "C" void __dl__FPv();
extern "C" void read__14JSUInputStreamFPvl();
extern "C" void peek__20JSURandomInputStreamFPvl();
extern "C" void seek__20JSURandomInputStreamFl17JSUStreamSeekFrom();
extern "C" void setGX__11J2DMaterialFv();
extern "C" void setAnimation__11J2DMaterialFP11J2DAnmColor();
extern "C" void setAnimation__11J2DMaterialFP19J2DAnmTextureSRTKey();
extern "C" void setAnimation__11J2DMaterialFP16J2DAnmTexPattern();
extern "C" void setAnimation__11J2DMaterialFP15J2DAnmTevRegKey();
extern "C" void
__ct__8J2DPrintFP7JUTFontffQ28JUtility6TColorQ28JUtility6TColorQ28JUtility6TColorQ28JUtility6TColor();
extern "C" void __dt__8J2DPrintFv();
extern "C" void locate__8J2DPrintFff();
extern "C" void print__8J2DPrintFffUcPCce();
extern "C" void printReturn__8J2DPrintFPCcff18J2DTextBoxHBinding18J2DTextBoxVBindingffUc();
extern "C" void move__7J2DPaneFff();
extern "C" void add__7J2DPaneFff();
extern "C" void search__7J2DPaneFUx();
extern "C" void searchUserInfo__7J2DPaneFUx();
extern "C" void isUsed__7J2DPaneFPC7ResTIMG();
extern "C" void isUsed__7J2DPaneFPC7ResFONT();
extern "C" void makeMatrix__7J2DPaneFffff();
extern "C" void setCullBack__7J2DPaneF11_GXCullMode();
extern "C" void makePaneExStream__7J2DPaneFP7J2DPaneP20JSURandomInputStream();
extern "C" void setAnimation__7J2DPaneFP10J2DAnmBase();
extern "C" void clearAnmTransform__7J2DPaneFv();
extern "C" void animationTransform__7J2DPaneFPC15J2DAnmTransform();
extern "C" void setVisibileAnimation__7J2DPaneFP20J2DAnmVisibilityFull();
extern "C" void setVtxColorAnimation__7J2DPaneFP14J2DAnmVtxColor();
extern "C" void animationPane__7J2DPaneFPC15J2DAnmTransform();
extern "C" void setAnimationVF__7J2DPaneFP20J2DAnmVisibilityFull();
extern "C" void setAnimationVC__7J2DPaneFP14J2DAnmVtxColor();
extern "C" void update__7J2DPaneFv();
extern "C" void __ct__10J2DTextBoxFv();
extern "C" void __dt__10J2DTextBoxFv();
extern "C" void setConnectParent__10J2DTextBoxFb();
extern "C" void drawSelf__10J2DTextBoxFff();
extern "C" void resize__10J2DTextBoxFff();
extern "C" s32 getTypeID__10J2DTextBoxCFv();
extern "C" void getVisibility__20J2DAnmVisibilityFullCFUsPUc();
extern "C" void _savegpr_25();
extern "C" void _savegpr_28();
extern "C" void _restgpr_25();
extern "C" void _restgpr_28();
//
// Declarations:
//
/* 803071E4-8030751C 301B24 0338+00 0/0 1/1 0/0 .text
* __ct__12J2DTextBoxExFP7J2DPaneP20JSURandomInputStreamUlP11J2DMaterial */
J2DTextBoxEx::J2DTextBoxEx(J2DPane* p_pane, JSURandomInputStream* p_stream, u32 param_2,
J2DMaterial* p_material) {
J2DTextBoxInfo info;
mVisibilityAnm = NULL;
int startPos = p_stream->getPosition();
J2DTbxBlockHeader header;
p_stream->read(&header, 8);
mKind = header.mTag;
int panHeaderPos = p_stream->getPosition();
J2DTbxBlockHeader panHeader;
p_stream->peek(&panHeader, 8);
makePaneExStream(p_pane, p_stream);
p_stream->seek(panHeaderPos + panHeader.mSize, JSUStreamSeekFrom_SET);
p_stream->read(&info, 0x20);
field_0x13c = info.field_0x2;
field_0x13e = info.mMaterialNum;
mMaterial = NULL;
if (field_0x13e != 0xFFFF) {
mMaterial = &p_material[field_0x13e];
p_material[field_0x13e].field_0x4 = this;
rewriteAlpha();
if (mMaterial != NULL) {
if (mMaterial->getTevBlock() != NULL) {
mFont = mMaterial->getTevBlock()->getFont();
}
}
}
mCharSpacing = info.mCharSpace;
mLineSpacing = info.mLineSpace;
mFontSizeX = info.mFontSizeX;
mFontSizeY = info.mFontSizeY;
mFlags = (info.mHBind << 2) | info.mVBind;
mCharColor = JUtility::TColor(info.mCharColor);
mGradientColor = JUtility::TColor(info.mGradColor);
setConnectParent(info.mConnected);
u16 strLength = 0;
if (!(param_2 & 0x2000000)) {
strLength = info.field_0x1c;
if ((s16)info.field_0x1c == -1) {
strLength = info.field_0x1e + 1;
}
}
mStringLength = 0;
mStringPtr = NULL;
if (strLength != 0) {
mStringPtr = new char[strLength];
}
if (mStringPtr != NULL) {
mStringLength = strLength;
int temp_r0 = (u16)strLength - 1;
u16 var_r26_2 = info.field_0x1e;
if (temp_r0 < var_r26_2) {
var_r26_2 = (u16)temp_r0;
}
p_stream->peek(mStringPtr, var_r26_2);
mStringPtr[var_r26_2] = 0;
}
p_stream->skip(info.field_0x1e);
p_stream->seek(startPos + header.mSize, JSUStreamSeekFrom_SET);
field_0x10c = 0.0f;
field_0x110 = 0.0f;
mTextFontOwned = false;
field_0x140 = 0;
}
/* 8030751C-803075AC 301E5C 0090+00 1/0 0/0 0/0 .text __dt__12J2DTextBoxExFv */
J2DTextBoxEx::~J2DTextBoxEx() {
if (field_0x140 != 0) {
delete mMaterial;
}
}
/* 803075AC-803078AC 301EEC 0300+00 1/0 0/0 0/0 .text drawSelf__12J2DTextBoxExFffPA3_A4_f
*/
void J2DTextBoxEx::drawSelf(f32 param_0, f32 param_1, Mtx* p_mtx) {
Mtx m;
JUTFont* font = NULL;
if (mMaterial != NULL && mMaterial->getTevBlock() != NULL) {
font = mMaterial->getTevBlock()->getFont();
}
J2DPrint print(font, (int)mCharSpacing, (int)mLineSpacing, mCharColor, mGradientColor, mBlackColor,
mWhiteColor);
print.setFontSize((int)mFontSizeX, (int)mFontSizeY);
if (mMaterial != NULL) {
mMaterial->setGX();
MTXConcat(*p_mtx, mGlobalMtx, m);
GXLoadPosMtxImm(m, GX_PNMTX0);
GXClearVtxDesc();
GXSetVtxDesc(GX_VA_POS, GX_DIRECT);
GXSetVtxDesc(GX_VA_CLR0, GX_DIRECT);
GXSetVtxDesc(GX_VA_TEX0, GX_DIRECT);
print.locate(param_0 + mBounds.i.x, param_1 + mBounds.i.y);
if (mMaterial->isVisible() && mStringPtr != NULL) {
u8 alpha = 255;
if (mMaterial->getColorBlock()->getColorChan(1)->getMatSrc() == 1) {
if (mMaterial->getMaterialAlphaCalc() == 1) {
alpha = mColorAlpha;
}
} else if (mIsInfluencedAlpha) {
GXSetChanMatColor(GX_ALPHA0, JUtility::TColor(mColorAlpha));
}
print.printReturn(mStringPtr, (int)(mBounds.getWidth() + 0.0001f), (int)mBounds.getHeight(),
getHBinding(), getVBinding(), field_0x10c, field_0x110, alpha);
}
}
}
/* 803078AC-80307AF0 3021EC 0244+00 1/0 0/0 0/0 .text draw__12J2DTextBoxExFff */
void J2DTextBoxEx::draw(f32 posX, f32 posY) {
Mtx m;
if (isVisible()) {
JUTFont* font = NULL;
if (mMaterial != NULL && mMaterial->getTevBlock() != NULL) {
font = mMaterial->getTevBlock()->getFont();
}
J2DPrint print(font, mCharSpacing, mLineSpacing, mCharColor, mGradientColor, mBlackColor,
mWhiteColor);
print.setFontSize(mFontSizeX, mFontSizeY);
mColorAlpha = mAlpha;
if (mMaterial != NULL) {
mMaterial->setGX();
makeMatrix(posX, posY, 0.0f, 0.0f);
GXLoadPosMtxImm(mPositionMtx, GX_PNMTX0);
GXSetCurrentMtx(0);
if (!mMaterial->isVisible()) {
return;
}
GXClearVtxDesc();
GXSetVtxDesc(GX_VA_POS, GX_DIRECT);
GXSetVtxDesc(GX_VA_CLR0, GX_DIRECT);
GXSetVtxDesc(GX_VA_TEX0, GX_DIRECT);
if (mStringPtr != NULL) {
u8 alpha = 255;
if (mMaterial->getMaterialAlphaCalc() == 1) {
alpha = mColorAlpha;
}
print.print(0.0f, 0.0f, alpha, "%s", mStringPtr);
}
for (int i = 0; i < 4; i++) {
GXSetTevSwapModeTable((GXTevSwapSel)i, GX_CH_RED, GX_CH_GREEN, GX_CH_BLUE, GX_CH_ALPHA);
}
GXSetNumIndStages(0);
for (int i = 0; i < 16; i++) {
GXSetTevDirect((GXTevStageID)i);
}
MTXIdentity(m);
GXLoadPosMtxImm(m, 0);
}
}
}
/* 80307AF0-80307D5C 302430 026C+00 1/0 0/0 0/0 .text draw__12J2DTextBoxExFfff18J2DTextBoxHBinding
*/
void J2DTextBoxEx::draw(f32 posX, f32 posY, f32 param_2, J2DTextBoxHBinding hBind) {
Mtx m;
if (isVisible()) {
JUTFont* font = NULL;
if (mMaterial != NULL && mMaterial->getTevBlock() != NULL) {
font = mMaterial->getTevBlock()->getFont();
}
J2DPrint print(font, mCharSpacing, mLineSpacing, mCharColor, mGradientColor, mBlackColor,
mWhiteColor);
print.setFontSize(mFontSizeX, mFontSizeY);
mColorAlpha = mAlpha;
if (mMaterial != NULL) {
mMaterial->setGX();
makeMatrix(posX, posY, 0.0f, 0.0f);
GXLoadPosMtxImm(mPositionMtx, GX_PNMTX0);
GXSetCurrentMtx(0);
if (!mMaterial->isVisible()) {
return;
}
GXClearVtxDesc();
GXSetVtxDesc(GX_VA_POS, GX_DIRECT);
GXSetVtxDesc(GX_VA_CLR0, GX_DIRECT);
GXSetVtxDesc(GX_VA_TEX0, GX_DIRECT);
if (mStringPtr != NULL) {
u8 alpha = 255;
if (mMaterial->getMaterialAlphaCalc() == 1) {
alpha = mColorAlpha;
}
print.printReturn(mStringPtr, param_2, 0.0f, hBind, VBIND_TOP, 0.0f, -mFontSizeY,
alpha);
}
for (int i = 0; i < 4; i++) {
GXSetTevSwapModeTable((GXTevSwapSel)i, GX_CH_RED, GX_CH_GREEN, GX_CH_BLUE, GX_CH_ALPHA);
}
GXSetNumIndStages(0);
for (int i = 0; i < 16; i++) {
GXSetTevDirect((GXTevStageID)i);
}
MTXIdentity(m);
GXLoadPosMtxImm(m, 0);
}
}
}
/* 80307D5C-80307DC0 30269C 0064+00 1/0 0/0 0/0 .text setFont__12J2DTextBoxExFP7JUTFont
*/
void J2DTextBoxEx::setFont(JUTFont* p_font) {
if (p_font != NULL && mMaterial != NULL && mMaterial->getTevBlock() != NULL) {
mMaterial->getTevBlock()->setFont(p_font);
mFont = p_font;
}
}
/* 80307DC0-80307E0C 302700 004C+00 1/0 0/0 0/0 .text getFont__12J2DTextBoxExCFv */
JUTFont* J2DTextBoxEx::getFont() const {
if (mMaterial != NULL && mMaterial->getTevBlock() != NULL) {
return mMaterial->getTevBlock()->getFont();
}
return NULL;
}
/* 80307E0C-80307EF0 30274C 00E4+00 1/1 0/0 0/0 .text setTevOrder__12J2DTextBoxExFb */
// Stack issue
#ifdef NONMATCHING
void J2DTextBoxEx::setTevOrder(bool param_0) {
u16 local_18[2];
if (!param_0) {
local_18[0] = 4;
local_18[1] = 0xffff;
} else {
local_18[0] = 0xff;
local_18[1] = 0xff04;
}
for (u8 i = 0; i < 2; i++) {
if (mMaterial->getTevBlock()->getMaxStage() > i) {
J2DTevOrderInfo info;
info.mTexCoord = (local_18[i]) >> 8;
info.mTexMap = (local_18[i]) >> 8;
info.mColor = local_18[i] & 0xff;
mMaterial->getTevBlock()->setTevOrder(i, J2DTevOrder(info));
}
}
}
#else
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm void J2DTextBoxEx::setTevOrder(bool param_0) {
nofralloc
#include "asm/JSystem/J2DGraph/J2DTextBoxEx/setTevOrder__12J2DTextBoxExFb.s"
}
#pragma pop
#endif
/* 80307EF0-80307F94 302830 00A4+00 1/1 0/0 0/0 .text setTevStage__12J2DTextBoxExFb */
void J2DTextBoxEx::setTevStage(bool param_0) {
J2DTevStage* stage = mMaterial->getTevBlock()->getTevStage(0);
if (!param_0) {
setStage(stage, STAGE_0);
} else {
setStage(stage, STAGE_1);
setStage(mMaterial->getTevBlock()->getTevStage(1), STAGE_2);
}
}
/* ############################################################################################## */
/* 803A1DB8-803A1DC4 02E418 000C+00 1/1 0/0 0/0 .rodata @1953 */
SECTION_RODATA static u8 const lit_1953[12] = {
0x0F, 0x08, 0x0A, 0x0F, 0x02, 0x04, 0x08, 0x0F, 0x0F, 0x0A, 0x00, 0x0F,
};
COMPILER_STRIP_GATE(0x803A1DB8, &lit_1953);
/* 803A1DC4-803A1DD0 02E424 000C+00 0/1 0/0 0/0 .rodata @1954 */
#pragma push
#pragma force_active on
SECTION_RODATA static u8 const lit_1954[12] = {
0x07, 0x04, 0x05, 0x07, 0x01, 0x02, 0x04, 0x07, 0x07, 0x05, 0x00, 0x07,
};
COMPILER_STRIP_GATE(0x803A1DC4, &lit_1954);
#pragma pop
/* 803A1DD0-803A1DE0 02E430 000F+01 0/1 0/0 0/0 .rodata @1955 */
#pragma push
#pragma force_active on
SECTION_RODATA static u8 const lit_1955[15 + 1 /* padding */] = {
0x00,
0x00,
0x00,
0x01,
0x00,
0x00,
0x00,
0x00,
0x01,
0x00,
0x00,
0x00,
0x00,
0x01,
0x00,
/* padding */
0x00,
};
COMPILER_STRIP_GATE(0x803A1DD0, &lit_1955);
#pragma pop
/* 803A1DE0-803A1DF0 02E440 000F+01 0/1 0/0 0/0 .rodata @1956 */
#pragma push
#pragma force_active on
SECTION_RODATA static u8 const lit_1956[15 + 1 /* padding */] = {
0x00,
0x00,
0x00,
0x01,
0x00,
0x00,
0x00,
0x00,
0x01,
0x00,
0x00,
0x00,
0x00,
0x01,
0x00,
/* padding */
0x00,
};
COMPILER_STRIP_GATE(0x803A1DE0, &lit_1956);
#pragma pop
/* 80307F94-8030823C 3028D4 02A8+00 1/1 0/0 0/0 .text
* setStage__12J2DTextBoxExFP11J2DTevStageQ212J2DTextBoxEx10stage_enum */
#pragma push
#pragma optimization_level 0
#pragma optimizewithasm off
asm void J2DTextBoxEx::setStage(J2DTevStage* param_0, J2DTextBoxEx::stage_enum param_1) {
nofralloc
#include "asm/JSystem/J2DGraph/J2DTextBoxEx/setStage__12J2DTextBoxExFP11J2DTevStageQ212J2DTextBoxEx10stage_enum.s"
}
#pragma pop
/* 8030823C-803082C4 302B7C 0088+00 1/0 0/0 0/0 .text setBlack__12J2DTextBoxExFQ28JUtility6TColor
*/
bool J2DTextBoxEx::setBlack(JUtility::TColor black) {
JUtility::TColor tevBlack;
JUtility::TColor tevWhite;
if (!getBlackWhite(&tevBlack, &tevWhite)) {
return false;
} else {
return setBlackWhite(black, tevWhite);
}
}
/* 803082C4-8030834C 302C04 0088+00 1/0 0/0 0/0 .text setWhite__12J2DTextBoxExFQ28JUtility6TColor
*/
bool J2DTextBoxEx::setWhite(JUtility::TColor white) {
JUtility::TColor tevBlack;
JUtility::TColor tevWhite;
if (!getBlackWhite(&tevBlack, &tevWhite)) {
return false;
} else {
return setBlackWhite(tevBlack, white);
}
}
/* 8030834C-803084CC 302C8C 0180+00 1/0 0/0 0/0 .text
* setBlackWhite__12J2DTextBoxExFQ28JUtility6TColorQ28JUtility6TColor */
bool J2DTextBoxEx::setBlackWhite(JUtility::TColor param_0, JUtility::TColor param_1) {
if (mMaterial == NULL) {
return false;
}
if (mMaterial->getTevBlock() == NULL) {
return false;
}
if (!isSetBlackWhite(param_0, param_1)) {
return false;
}
bool bvar = false;
if (param_0 != 0 || param_1 != -1) {
bvar = true;
}
mMaterial->getTevBlock()->setTevStageNum(bvar ? 2 : 1);
setTevOrder(bvar);
setTevStage(bvar);
if (bvar) {
J2DGXColorS10 color;
color.r = param_0.r;
color.g = param_0.g;
color.b = param_0.b;
color.a = param_0.a;
mMaterial->getTevBlock()->setTevColor(0, color);
color.r = param_1.r;
color.g = param_1.g;
color.b = param_1.b;
color.a = param_1.a;
mMaterial->getTevBlock()->setTevColor(1, color);
}
return true;
}
/* 803084CC-80308668 302E0C 019C+00 4/4 0/0 0/0 .text
* getBlackWhite__12J2DTextBoxExCFPQ28JUtility6TColorPQ28JUtility6TColor */
bool J2DTextBoxEx::getBlackWhite(JUtility::TColor* param_0, JUtility::TColor* param_1) const {
if (mMaterial == NULL) {
return false;
}
if (mMaterial->getTevBlock() == NULL) {
return false;
}
bool tevStageNum = mMaterial->getTevBlock()->getTevStageNum() != 1;
*param_0 = JUtility::TColor(0);
*param_1 = JUtility::TColor(0xffffffff);
if (tevStageNum) {
J2DGXColorS10* local_30 = mMaterial->getTevBlock()->getTevColor(0);
s16 color0r = local_30->r;
s16 color0g = local_30->g;
s16 color0b = local_30->b;
s16 color0a = local_30->a;
J2DGXColorS10* local_38 = mMaterial->getTevBlock()->getTevColor(1);
s16 color1r = local_38->r;
s16 color1g = local_38->g;
s16 color1b = local_38->b;
s16 color1a = local_38->a;
*param_0 = JUtility::TColor(
(((u8)color0r) << 24) | (((u8)color0g) << 16) | (((u8)color0b) << 8) |
((u8)color0a));
*param_1 = JUtility::TColor(
(((u8)color1r) << 24) | (((u8)color1g) << 16) | (((u8)color1b) << 8) |
((u8)color1a));
}
return true;
}
/* 80308668-803086FC 302FA8 0094+00 1/1 0/0 0/0 .text
* isSetBlackWhite__12J2DTextBoxExCFQ28JUtility6TColorQ28JUtility6TColor */
bool J2DTextBoxEx::isSetBlackWhite(JUtility::TColor param_0, JUtility::TColor param_1) const {
if ((u32)param_0 == 0 && (u32)param_1 == 0xffffffff) {
return 1;
}
mMaterial->getTevBlock()->getTevStageNum();
if (mMaterial->getTevBlock()->getMaxStage() == 1) {
return 0;
}
return 1;
}
/* 803086FC-8030875C 30303C 0060+00 1/0 0/0 0/0 .text getBlack__12J2DTextBoxExCFv */
JUtility::TColor J2DTextBoxEx::getBlack() const {
JUtility::TColor black;
JUtility::TColor white;
if (getBlackWhite(&black, &white) == 0) {
return JUtility::TColor(0);
}
return black;
}
/* 8030875C-803087BC 30309C 0060+00 1/0 0/0 0/0 .text getWhite__12J2DTextBoxExCFv */
JUtility::TColor J2DTextBoxEx::getWhite() const {
JUtility::TColor black;
JUtility::TColor white;
if (getBlackWhite(&black, &white) == 0) {
return JUtility::TColor(0xffffffff);
}
return white;
}
/* 803087BC-803087DC 3030FC 0020+00 1/0 0/0 0/0 .text setAlpha__12J2DTextBoxExFUc */
void J2DTextBoxEx::setAlpha(u8 alpha) {
mAlpha = alpha;
if (mMaterial == NULL) {
return;
}
if (mMaterial->getColorBlock()->getMatColor(0) == NULL) {
return;
}
mMaterial->getColorBlock()->getMatColor(0)->a = alpha;
}
/* 803087DC-80308810 30311C 0034+00 1/0 0/0 0/0 .text setCullBack__12J2DTextBoxExF11_GXCullMode */
void J2DTextBoxEx::setCullBack(GXCullMode mode) {
mCullMode = mode;
if (mMaterial != NULL) {
mMaterial->getColorBlock()->setCullMode(mode);
}
J2DPane::setCullBack(mode);
}
/* 80308810-80308828 303150 0018+00 1/0 0/0 0/0 .text rewriteAlpha__12J2DTextBoxExFv */
void J2DTextBoxEx::rewriteAlpha() {
if (mMaterial == NULL) {
return;
}
mAlpha = mMaterial->getColorBlock()->getMatColor(0)->a;
}
/* 80308828-803088B4 303168 008C+00 1/0 0/0 0/0 .text isUsed__12J2DTextBoxExFPC7ResFONT
*/
bool J2DTextBoxEx::isUsed(ResFONT const* p_font) {
if (getFont() != NULL && getFont()->getResFont() == p_font) {
return true;
}
return J2DPane::isUsed(p_font);
}
/* 803088B4-803088E0 3031F4 002C+00 1/0 0/0 0/0 .text setAnimation__12J2DTextBoxExFP11J2DAnmColor
*/
void J2DTextBoxEx::setAnimation(J2DAnmColor* anm) {
if (mMaterial != NULL) {
mMaterial->setAnimation(anm);
}
}
/* 803088E0-8030890C 303220 002C+00 1/0 0/0 0/0 .text
* setAnimation__12J2DTextBoxExFP19J2DAnmTextureSRTKey */
void J2DTextBoxEx::setAnimation(J2DAnmTextureSRTKey* anm) {
if (mMaterial != NULL) {
mMaterial->setAnimation(anm);
}
}
/* 8030890C-80308938 30324C 002C+00 1/0 0/0 0/0 .text
* setAnimation__12J2DTextBoxExFP16J2DAnmTexPattern */
void J2DTextBoxEx::setAnimation(J2DAnmTexPattern* anm) {
if (mMaterial != NULL) {
mMaterial->setAnimation(anm);
}
}
/* 80308938-80308964 303278 002C+00 1/0 0/0 0/0 .text
* setAnimation__12J2DTextBoxExFP15J2DAnmTevRegKey */
void J2DTextBoxEx::setAnimation(J2DAnmTevRegKey* anm) {
if (mMaterial != NULL) {
mMaterial->setAnimation(anm);
}
}
/* 80308964-8030896C -00001 0008+00 0/0 0/0 0/0 .text
* setAnimation__12J2DTextBoxExFP20J2DAnmVisibilityFull */
void J2DTextBoxEx::setAnimation(J2DAnmVisibilityFull* anm) {
mVisibilityAnm = anm;
}
/* 8030896C-803089EC 3032AC 0080+00 1/0 0/0 0/0 .text
* animationPane__12J2DTextBoxExFPC15J2DAnmTransform */
const J2DAnmTransform* J2DTextBoxEx::animationPane(J2DAnmTransform const* param_0) {
if (mVisibilityAnm != NULL && field_0x13c != 0xffff) {
u8 visibility;
mVisibilityAnm->getVisibility(field_0x13c, &visibility);
if (visibility != 0) {
show();
} else {
hide();
}
}
return J2DPane::animationPane(param_0);
}
/* 803089EC-80308A28 30332C 003C+00 1/0 0/0 0/0 .text setCullBack__12J2DTextBoxExFb */
void J2DTextBoxEx::setCullBack(bool param_0) {
setCullBack(param_0 ? GX_CULL_BACK : GX_CULL_NONE);
}
/* 80308A28-80308A48 303368 0020+00 1/0 0/0 0/0 .text isUsed__12J2DTextBoxExFPC7ResTIMG
*/
bool J2DTextBoxEx::isUsed(ResTIMG const* p_timg) {
return J2DPane::isUsed(p_timg);
}
/* 80308A48-80308A4C 303388 0004+00 1/0 0/0 0/0 .text
* setAnimation__12J2DTextBoxExFP14J2DAnmVtxColor */
void J2DTextBoxEx::setAnimation(J2DAnmVtxColor* param_0) {
/* empty function */
}
/* 80308A4C-80308A6C 30338C 0020+00 1/0 0/0 0/0 .text setAnimation__12J2DTextBoxExFP10J2DAnmBase
*/
void J2DTextBoxEx::setAnimation(J2DAnmBase* anm) {
J2DPane::setAnimation(anm);
}
/* 803A1DF0-803A1DF0 02E450 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */
|