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
|
#include "d/dolzel.h" // IWYU pragma: keep
#include "JSystem/JHostIO/JORFile.h"
#include "JSystem/JHostIO/JORServer.h"
#include "JSystem/JUtility/JUTTexture.h"
#include "SSystem/SComponent/c_math.h"
#include "d/d_com_inf_game.h"
#include "d/d_debug_viewer.h"
#include "d/d_menu_fmap_map.h"
#include "m_Do/m_Do_graphic.h"
static u8 twoValueLineInterpolation(u8 i_value1, u8 i_value2, f32 i_param) {
return (u8)((f32)i_value1 + i_param * ((f32)i_value2 - (f32)i_value1));
}
static void twoColorLineInterporation(GXColor const& i_color1, GXColor const& i_color2,
f32 i_param, GXColor& o_color) {
o_color.r = twoValueLineInterpolation(i_color1.r, i_color2.r, i_param);
o_color.g = twoValueLineInterpolation(i_color1.g, i_color2.g, i_param);
o_color.b = twoValueLineInterpolation(i_color1.b, i_color2.b, i_param);
o_color.a = twoValueLineInterpolation(i_color1.a, i_color2.a, i_param);
}
void renderingFmap_c::init(u8* param_0, u16 i_texWidth, u16 i_texHeight, u16 param_3, u16 param_4) {
field_0x4 = param_0;
mTexWidth = i_texWidth;
mTexHeight = i_texHeight;
field_0x20 = param_3;
field_0x22 = param_4;
mPosX = 0.0f;
mPosZ = 0.0f;
mDrawEnable = false;
}
void renderingFmap_c::entry(dMenu_Fmap_world_data_c* i_worldData, int i_startStageNo,
f32 i_posX, f32 i_posY, f32 i_scale) {
mpWorldData = i_worldData;
mStartStageNo = i_startStageNo;
mPosX = i_posX;
mPosZ = i_posY;
mCmPerTexel = i_scale;
field_0x8 = mCmPerTexel * field_0x20 * mDoGph_gInf_c::getScale();
field_0xc = mCmPerTexel * field_0x22;
dComIfGd_setCopy2D(this);
}
bool renderingFmap_c::isSwitchSpecialOff(int i_swbit) {
return !strcmp(dComIfGp_getStartStageName(), "F_SP121") && i_swbit == 0xb2;
}
bool renderingFmap_c::isSwitch(dDrawPath_c::group_class const* i_group) {
if (i_group->mSwbit == 0xff) {
return true;
}
if (i_group->field_0x1 == 0) {
if (isSwitchSpecialOff(i_group->mSwbit)) {
return true;
}
} else {
if (isSwitchSpecialOff(i_group->mSwbit)) {
return false;
}
}
if (mRegionNo == dComIfGp_getNowLevel() && mStageNo == mStartStageNo) {
if (i_group->field_0x1 == 0) {
return !dComIfGs_isSwitch(i_group->mSwbit, mRoomNo);
} else {
return dComIfGs_isSwitch(i_group->mSwbit, mRoomNo) ? true : false;
}
} else {
if (i_group->mSwbit < 0x80) {
if (i_group->field_0x1 != 0) {
return dComIfGs_isStageSwitch(mSaveTableNo, i_group->mSwbit) ? true : false;
} else {
return !dComIfGs_isStageSwitch(mSaveTableNo, i_group->mSwbit);
}
} else {
return i_group->field_0x1 == 0;
}
}
}
int renderingFmap_c::getPointStagePathInnerNo(dMenu_Fmap_region_data_c* i_regionData,
f32 i_offsetX, f32 i_offsetY, int i_stageNo,
int* o_stageNo, int* o_roomNo) {
f32 f31 = mPosX + i_offsetX * mCmPerTexel;
f32 f30 = mPosZ + i_offsetY * mCmPerTexel;
int result = i_regionData->getPointStagePathInnerNo(f31, f30, i_stageNo, o_stageNo, o_roomNo);
#if DEBUG
if (o_stageNo) {
dDbVw_Report(48, 72, "stNo%d", *o_stageNo);
}
if (o_roomNo) {
dDbVw_Report(48, 84, "rmNo%d", *o_roomNo);
}
#endif
return result;
}
void renderingFmap_c::preDrawPath() {
mEye.x = mPosX;
mEye.y = mPosZ;
mEye.z = -5000.0f;
mCenter.x = mPosX;
mCenter.y = mPosZ;
mCenter.z = 5000.0f;
mUp.x = 0.0f;
mUp.y = -1.0f;
mUp.z = 0.0f;
mDoMtx_lookAt(mViewMtx, &mEye, &mCenter, &mUp, 0);
GXLoadPosMtxImm(mViewMtx, GX_PNMTX0);
GXClearVtxDesc();
GXSetVtxDesc(GX_VA_POS, GX_INDEX16);
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_CLR_RGB, GX_F32, 0);
GXSetMisc(GX_MT_XF_FLUSH, 8);
}
bool renderingFmap_c::isDrawPath() {
return true;
}
bool renderingFmap_c::isDrawRoom() {
return (bool)((mRegionNo == dComIfGp_getNowLevel() && mStageNo == mStartStageNo
&& mRoomNo == dComIfGp_roomControl_getStayNo())
|| mpRoomData->isArrival());
}
void renderingFmap_c::postDrawPath() {
GXSetMisc(GX_MT_XF_FLUSH, 0);
mDoMtx_lookAt(mViewMtx, &mEye, &mCenter, &mUp, 0);
GXLoadPosMtxImm(mViewMtx, GX_PNMTX0);
}
void renderingFmap_c::postRenderingMap() {
dRenderingFDAmap_c::postRenderingMap();
mDrawEnable = true;
}
void renderingFmap_c::roomSetteing() {
mRegionOffsetX = mpRegionData->getRegionOffsetX();
mRegionOffsetZ = mpRegionData->getRegionOffsetZ();
mStageOffsetX = mRegionOffsetX + mpStageData->getOffsetX();
mStageOffsetZ = mRegionOffsetZ + mpStageData->getOffsetZ();
f32 offset_z = mStageOffsetZ;
cXyz eye, center;
eye.x = mPosX - mStageOffsetX;
eye.y = mPosZ - offset_z;
eye.z = mEye.z;
center.x = eye.x;
center.y = eye.y;
center.z = mCenter.z;
Mtx viewMtx;
mDoMtx_lookAt(viewMtx, &eye, ¢er, &mUp, 0);
GXLoadPosMtxImm(viewMtx, GX_PNMTX0);
}
dDrawPath_c::room_class* renderingFmap_c::getFirstRoomPointer() {
dDrawPath_c::room_class* room = NULL;
getFirstRegion();
if (mpRoomData != NULL) {
if (mpFmapData != NULL) {
room = mpFmapData->getMapPath();
}
while (mpRoomData != NULL && (room == NULL || !isDrawRoom())) {
if (mpFmapData != NULL) {
room = getNextRoomPointer();
}
}
if (room != NULL) {
roomSetteing();
}
}
return room;
}
void renderingFmap_c::getFirstRegion() {
mpStageData = NULL;
mpRegionData = mpWorldData->getMenuFmapRegionTop();
if (mpRegionData != NULL) {
mRegionNo = mpRegionData->getRegionNo();
mRegionIndex = 0;
getFirstStage();
}
}
void renderingFmap_c::getFirstStage() {
mpRoomData = NULL;
mpStageData = mpRegionData->getMenuFmapStageDataTop();
if (mpStageData != NULL) {
mpStageArc = mpStageData->getStageArc();
mSaveTableNo = mpStageArc->getSaveTableNo();
mVisitedRoomSaveTableNo = mpStageArc->getVisitedRoomSaveTableNo();
mStageNo = 0;
getFirstRoom();
}
}
void renderingFmap_c::getFirstRoom() {
mpFmapData = NULL;
mpRoomData = mpStageData->getFmapRoomDataTop();
if (mpRoomData != NULL) {
mRoomIndex = 0;
mRoomNo = mpRoomData->getRoomNo();
mpFmapData = mpRoomData->getFmapData();
}
}
bool renderingFmap_c::getNextRoom() {
bool ret = false;
mpRoomData = mpRoomData->getNextData();
if (mpRoomData == NULL) {
ret = getNextStage();
} else {
mRoomIndex++;
mpFmapData = mpRoomData->getFmapData();
mRoomNo = mpRoomData->getRoomNo();
}
return ret;
}
bool renderingFmap_c::getNextStage() {
bool ret = false;
mpStageData = mpStageData->getNextData();
if (mpStageData == NULL) {
ret = getNextRegion();
} else {
mStageNo++;
mpStageArc = mpStageData->getStageArc();
mSaveTableNo = mpStageArc->getSaveTableNo();
mVisitedRoomSaveTableNo = mpStageArc->getVisitedRoomSaveTableNo();
getFirstRoom();
}
return ret;
}
bool renderingFmap_c::getNextRegion() {
bool ret = false;
mpRegionData = mpRegionData->getNextData();
if (mpRegionData == NULL) {
ret = true;
} else {
mRegionIndex++;
mRegionNo = mpRegionData->getRegionNo();
getFirstStage();
}
return ret;
}
dDrawPath_c::room_class* renderingFmap_c::getNextRoomPointer() {
room_class* room;
do {
room = NULL;
if (getNextRoom()) {
return NULL;
}
if (mpRoomData != NULL) {
room = mpFmapData->getMapPath();
}
} while (mpRoomData != NULL && (room == NULL || !isDrawRoom()));
if (room != NULL) {
roomSetteing();
}
return room;
}
#if DEBUG
dMfm_HIO_c g_mfmHIO;
dMfm_HIO_c::dMfm_HIO_c() {
mMySelfPointer = this;
field_0xc.set(l_list);
field_0x18 = 0;
}
void dMfm_HIO_c::genMessage(JORMContext* mctx) {
// DEBUG NONMATCHING
mctx->genLabel("フィールドマップ パスマップ 調整項目", 0, 0, NULL, -1, -1, 512, 24);
mctx->genButton("初期化", 0x4000005, 0, NULL, -1, -1, 512, 24);
mctx->genButton("HOSTIO順テキストファイル書き出し", 0x4000006, 0, NULL, -1, -1, 512, 24);
mctx->genButton("バイナリ順テキスト書き出し", 0x4000007, 0, NULL, -1, -1, 512, 24);
mctx->genButton("バイナリファイル書き出し", 0x4000008, 0, NULL, -1, -1, 512, 24);
mctx->genButton("バイナリファイル読み込み", 0x4000009, 0, NULL, -1, -1, 512, 24);
mctx->genButton("バイナリダンプ", 0x400000a, 0, NULL, -1, -1, 512, 24);
mctx->genLabel("■■リソースに入らない調整項目■■", 0, 0, NULL, -1, -1, 512, 24);
field_0xc.gen(mctx);
}
void dMfm_HIO_c::listenPropertyEvent(const JORPropertyEvent* property) {
// DEBUG NONMATCHING
JORReflexible::listenPropertyEvent(property);
if (field_0x18) {
return;
}
if (!dMfm_HIO_prm_res_dst_s::m_res) {
field_0x18 = 1;
JORMessageBox("フィールドマップを開けた状態で操作して下さい","注意!",0x10);
field_0x18 = 0;
return;
}
JORFile file;
JORMContext* mctx;
switch (reinterpret_cast<u32>(property->id)) {
case 0x4000002: {
int i = 0;
if (!field_0x8) {
return;
}
dMenu_Fmap_world_data_c* worldData = field_0x8->getWorldData();
if (!worldData) {
return;
}
for (dMenu_Fmap_region_data_c* regionData = worldData->getMenuFmapRegionTop(); regionData; regionData = regionData->getNextData()) {
int j = 0;
for (dMenu_Fmap_stage_data_c* stageData = regionData->getMenuFmapStageDataTop(); stageData; stageData = stageData->getNextData()) {
dMenu_Fmap_stage_arc_data_c* stageArc = stageData->getStageArc();
if (stageArc) {
OSReport("R<%2d>S<%2d> SaveTable<%2d>ArriveSaveTable<%2d>\n", i, j, stageArc->getSaveTableNo(), stageArc->getVisitedRoomSaveTableNo());
}
dMenu_Fmap_room_data_c* roomData = stageData->getFmapRoomDataTop();
for (int k = 0; roomData; k++) {
roomData = roomData->getNextData();
}
j++;
}
i++;
}
break;
}
case 0x4000006:
writeHostioTextFile(NULL);
break;
case 0x4000007:
writeBinaryTextFile(NULL);
break;
case 0x4000008:
writeBinaryFile(NULL);
break;
case 0x4000009:
readBinaryFile(NULL);
mctx = attachJORMContext(8);
mctx->startUpdateNode(this);
field_0xc.update(mctx);
mctx->endUpdateNode();
releaseJORMContext(mctx);
break;
case 0x4000005:
field_0xc.copySrcToHio();
mctx = attachJORMContext(8);
mctx->startUpdateNode(this);
field_0xc.update(mctx);
mctx->endUpdateNode();
releaseJORMContext(mctx);
break;
case 0x400000a:
binaryDump(dMfm_HIO_prm_res_dst_s::m_res, 366);
break;
}
field_0xc.copyHioToDst();
}
void dMfm_HIO_list_c::copySrcToHio() {
// DEBUG NONMATCHING
}
void dMfm_HIO_list_c::copyHioToDst() {
// DEBUG NONMATCHING
}
void dMfm_HIO_list_c::copyBufToHio(const char*) {
// DEBUG NONMATCHING
}
#endif
void dMenu_FmapMap_c::setFmapPaletteColor(renderingFmap_c::palette_e i_palette, u8 i_r,
u8 i_g, u8 i_b, u8 i_a) {
int color;
JUT_ASSERT(1835, m_palette != NULL);
if (i_a >= 0xe0) {
color = ((i_r & 0xf8) << 7) | ((i_g & 0xf8) << 2) | (i_b >> 3) | (1 << 15);
} else {
color = ((i_r & 0xf0) << 4) | (i_g & 0xf0) | (i_b >> 4) | ((i_a & 0xe0) << 7);
}
dMpath_RGB5A3_palDt_s* palette_entry = &m_palette[i_palette];
palette_entry->field_0x0.color = color;
palette_entry->field_0x2.color = color;
palette_entry->field_0x4.color = color;
palette_entry->field_0x6.color = color;
DCStoreRange(&m_palette[i_palette], 8);
}
void dMenu_FmapMap_c::setFmapPaletteColor(renderingFmap_c::palette_e i_palette,
GXColor const& i_color) {
setFmapPaletteColor(i_palette, i_color.r, i_color.g, i_color.b, i_color.a);
}
bool dMenu_FmapMap_c::isFlashRoomNoCheck(int i_roomNo) const {
JUT_ASSERT(1874, mp_roomList != NULL);
JUT_ASSERT(1875, m_roomListNumber != NULL);
bool ret = false;
u8* ptr = mp_roomList;
for (int i = 0; i < m_roomListNumber; i++) {
if (*ptr == i_roomNo) {
ret = true;
break;
}
ptr++;
}
return ret;
}
void dMenu_FmapMap_c::setPointColor(f32 i_param) {
static const palette_e palNo[8] = {
PALETTE_11,
PALETTE_12,
PALETTE_13,
PALETTE_14,
PALETTE_15,
PALETTE_16,
PALETTE_17,
PALETTE_18,
};
GXColor color;
if (mFlash && mRegionCursor == dComIfGp_getNowLevel() && mStartStageNo == mStageCursor) {
for (int i = 0; i < 8; i++) {
twoColorLineInterporation(m_res->field_0xe8[i], m_res->field_0x108[i], i_param, color);
setFmapPaletteColor(palNo[i], color);
}
} else {
for (int i = 0; i < 8; i++) {
twoColorLineInterporation(m_res->field_0x128[i], m_res->field_0x148[i], i_param, color);
setFmapPaletteColor(palNo[i], color);
}
}
}
dMenu_FmapMap_c::dMenu_FmapMap_c() {
mResTIMG = NULL;
mMapImage_p = NULL;
m_res = NULL;
m_palette = NULL;
field_0xcc = 0;
mZoomRate = 0.0f;
mLineNo = 0;
mFlash = false;
mLastFlash = false;
mStageCursor = 0;
mLastStageCursor = 0;
mRegionCursor = 0;
mFlashTimer = 0;
mp_roomList = NULL;
m_roomListNumber = 0;
#if DEBUG
dMfm_HIO_prm_res_dst_s::m_res = NULL;
mMySelfPointer = this;
#endif
}
dMenu_FmapMap_c::~dMenu_FmapMap_c() {
_delete();
}
void dMenu_FmapMap_c::_create(u16 i_texWidth, u16 i_texHeight, u16 param_2, u16 param_3, void* i_res) {
m_res = (dMfm_prm_res_s*)i_res;
m_palette = m_res->palette_data;
field_0xcc = 0x6c;
mFlash = false;
mStageCursor = 0;
mLastStageCursor = -1;
mLastFlash = mFlash;
mFlashTimer = 0;
setTexture(i_texWidth, i_texHeight, param_2, param_3);
}
void dMenu_FmapMap_c::_delete() {
if (mResTIMG != NULL) {
delete mResTIMG;
mResTIMG = NULL;
}
if (mMapImage_p != NULL) {
delete[] mMapImage_p;
mMapImage_p = NULL;
}
}
const dMfm_HIO_prm_res_src_s dMfm_HIO_prm_res_src_s::m_other = {30};
void dMenu_FmapMap_c::draw() {
{ int unused; }
f32 f30 = 0.0f;
if (mFlashTimer < dMfm_HIO_prm_res_src_s::m_other.mFlashDuration / 2) {
f30 =
(int)(dMfm_HIO_prm_res_src_s::m_other.mFlashDuration / 2 - mFlashTimer) /
(f32)(int)(dMfm_HIO_prm_res_src_s::m_other.mFlashDuration / 2);
} else {
f30 =
(int)(mFlashTimer - dMfm_HIO_prm_res_src_s::m_other.mFlashDuration / 2) /
(f32)(int)(dMfm_HIO_prm_res_src_s::m_other.mFlashDuration / 2);
}
setPointColor(1.0f - f30);
GXColor color;
f32 f31;
f31 = getRateWithFrameCount(m_res->field_0x168);
f31 = cM_ssin(f31 * 0x10000 - 0x8000) * 0.5f + 0.5f;
twoColorLineInterporation(m_res->field_0xd8, m_res->field_0xdc, f31, color);
setFmapPaletteColor(PALETTE_19, color);
f31 = getRateWithFrameCount(m_res->field_0x16a);
f31 = cM_ssin(f31 * 0x10000 - 0x8000) * 0.5f + 0.5f;
twoColorLineInterporation(m_res->field_0xe0, m_res->field_0xe4, f31, color);
setFmapPaletteColor(PALETTE_1A, color);
renderingMap();
}
void dMenu_FmapMap_c::rendering(dDrawPath_c::line_class const* i_line) {
if (i_line->field_0x1 == 4) {
for (mLineNo = 0; mLineNo < 2; mLineNo++) {
renderingDecoration(i_line);
}
} else {
dDrawPath_c::rendering(i_line);
}
}
int dMenu_FmapMap_c::getLineWidth(int param_0) {
static u8 const l_lineWidthPatData[5] = {0, 6, 12, 0, 0};
static u8 const l_lineWidthPatData2[5] = {0, 0, 6, 0, 0};
int iVar2 = 0;
if (param_0 == 4) {
switch (mLineNo) {
case 0:
case 1:
iVar2 = m_res->field_0x16d;
}
if (mZoomRate > 1.0f) {
return (int)((f32)iVar2 * (mZoomRate - 1.0f));
} else {
return 0;
}
} else if (mZoomRate > 1.5f) {
return l_lineWidthPatData[param_0];
} else {
return l_lineWidthPatData2[param_0];
}
}
bool dMenu_FmapMap_c::isDrawType(int param_0) {
return (param_0 >> 6) & 1 ? false : true;
}
void dMenu_FmapMap_c::setFlashOn(int i_regionNo, int i_stageNo, u8* i_rooms, int i_roomCount) {
mLastFlash = mFlash;
mFlash = true;
mRegionCursor = i_regionNo;
mStageCursor = (u8)i_stageNo;
mp_roomList = i_rooms;
m_roomListNumber = i_roomCount;
}
const GXColor* dMenu_FmapMap_c::getLineColor(int param_0, int param_1) {
static GXColor black = {0, 0, 0, 0};
static const GXColor borderColor0 = {0x64, 0, 0, 0};
static const GXColor borderColor1 = {0x68, 0, 0, 0};
GXColor* color = &black;
if (param_1 == 4) {
switch (mLineNo) {
case 0:
return &borderColor0;
case 1:
return &borderColor1;
}
} else {
*color = *getColor(param_0);
}
return color;
}
const GXColor* dMenu_FmapMap_c::getBackColor() const {
static const GXColor l_mapBaseColor = {0, 0, 0, 0};
return &l_mapBaseColor;
}
const GXColor* dMenu_FmapMap_c::getColor(int param_0) {
static const GXColor l_dungeon_onColor[9] = {
{0x04, 0, 0, 0},
{0x08, 0, 0, 0},
{0x0C, 0, 0, 0},
{0x00, 0, 0, 0},
{0x10, 0, 0, 0},
{0x14, 0, 0, 0},
{0x18, 0, 0, 0},
{0x1C, 0, 0, 0},
{0x20, 0, 0, 0},
};
static const GXColor l_dungeon_stayColor[9] = {
{0x24, 0, 0, 0},
{0x28, 0, 0, 0},
{0x2C, 0, 0, 0},
{0x00, 0, 0, 0},
{0x30, 0, 0, 0},
{0x34, 0, 0, 0},
{0x38, 0, 0, 0},
{0x3C, 0, 0, 0},
{0x40, 0, 0, 0},
};
static const GXColor l_dungeon_pointColor[9] = {
{0x44, 0, 0, 0},
{0x48, 0, 0, 0},
{0x4C, 0, 0, 0},
{0x00, 0, 0, 0},
{0x50, 0, 0, 0},
{0x54, 0, 0, 0},
{0x58, 0, 0, 0},
{0x5C, 0, 0, 0},
{0x60, 0, 0, 0},
};
const GXColor* list = l_dungeon_onColor;
if (mFlash && mRegionCursor == getNowDrawRegionNo() && mStageNo == mStageCursor) {
if (mp_roomList == NULL) {
list = l_dungeon_pointColor;
} else if (isFlashRoomNoCheck(mRoomNo)) {
list = l_dungeon_pointColor;
} else if (getNowDrawRegionNo() == dComIfGp_getNowLevel() && mStageNo == mStartStageNo) {
list = l_dungeon_stayColor;
}
} else {
if (getNowDrawRegionNo() == dComIfGp_getNowLevel() && mStageNo == mStartStageNo) {
list = l_dungeon_stayColor;
}
}
return &list[param_0];
}
void dMenu_FmapMap_c::setTexture(u16 i_width, u16 i_height, u16 param_2, u16 param_3) {
mMapImage_p = NULL;
mResTIMG = NULL;
int size = GXGetTexBufferSize(i_width, i_height, GX_TF_C8, 0, 0);
mMapImage_p = new (0x20) u8[size];
init(mMapImage_p, i_width, i_height, param_2, param_3);
mResTIMG = new (0x20) ResTIMG();
makeResTIMG(mResTIMG, i_width, i_height, mMapImage_p, (u8*)m_palette, 0x1b);
}
void dMenu_FmapMap_c::setRendering(dMenu_Fmap_world_data_c* i_worldData, int i_startStageNo,
f32 i_posX, f32 i_posY, f32 i_scale, f32 i_zoomRate) {
mZoomRate = i_zoomRate;
if (mFlash != mLastFlash || mStageCursor != mLastStageCursor) {
mFlashTimer = dMfm_HIO_prm_res_src_s::m_other.mFlashDuration;
mLastFlash = mFlash;
mLastStageCursor = mStageCursor;
} else {
if (mFlashTimer != 0) {
mFlashTimer--;
} else {
mFlashTimer = dMfm_HIO_prm_res_src_s::m_other.mFlashDuration;
}
}
entry(i_worldData, i_startStageNo, i_posX, i_posY, i_scale);
}
|