MCPcopy Create free account
hub / github.com/doldecomp/mkdd / LANSelectMode

Method LANSelectMode

src/Osako/LANSelectMode.cpp:502–639  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

500};
501
502LANSelectMode::LANSelectMode(JKRArchive *pArchive) : mBackground(pArchive) {
503 mState = 1;
504 mItemIdx = 0;
505 mItemMask = 0;
506 mScreen.setPriority("LANSelectMode.blo", 0x20000, pArchive);
507
508 void *bck = JKRGetNameResource("LANSelectMode.bck", pArchive);
509 void *btk = JKRGetNameResource("LANSelectMode.btk", pArchive);
510 void *brk = JKRGetNameResource("LANSelectMode.brk", pArchive);
511
512 mAnm = J2DAnmLoaderDataBase::load(bck);
513 mAnmFrame = 0;
514
515 char buf[0x40];
516 for (int i = 0; i < 3; i++) {
517 snprintf(buf, sizeof(buf), "timg/%s.bti", cpaGameModeTex[i]);
518 mGameModeImg[i] = (ResTIMG *)pArchive->getResource(buf);
519 }
520
521 for (int i = 0; i < 4; i++) {
522 snprintf(buf, sizeof(buf), "timg/Power_Mozi.%d.bti", i + 1);
523 mPowerImg[i] = (ResTIMG*)pArchive->getResource(buf);
524 }
525
526 for (int i = 0; i < 2; i++) {
527 snprintf(buf, sizeof(buf), "timg/Mozi_Order%s01.bti", cpaLabelNameTex[i]);
528 mOrderImg[i] = (ResTIMG*)pArchive->getResource(buf);
529 }
530
531 for (int i = 0; i < 7; i++) {
532 snprintf(buf, sizeof(buf), "timg/%s.bti", cpaCrsOrderTex[i]);
533 mCrsOrderImg[i] = (ResTIMG*)pArchive->getResource(buf);
534 }
535
536 _2d8 = mCrsOrderImg[0];
537
538 snprintf(buf, sizeof(buf), "timg/%s.bti", cpaStageOrderTex[0]);
539 mStageOrderImg[0] = (ResTIMG*)pArchive->getResource(buf);
540
541 snprintf(buf, sizeof(buf), "timg/%s.bti", cpaStageOrderTex[1]);
542 mStageOrderImg[1] = (ResTIMG*)pArchive->getResource(buf);
543
544 for (int i = 0; i < 2; i++) {
545 snprintf(buf, sizeof(buf), "timg/Mozi_%sSelect01.bti", cpaLabelNameTex[i]);
546 mSelectImg[i] = (ResTIMG*)pArchive->getResource(buf);
547 }
548
549 for (int i = 0; i < 0x10; i++) {
550 snprintf(buf, sizeof(buf), "timg/CoName_%s.bti", cpaCrsNameTex[i]);
551 mCrsNameImg[i] = (ResTIMG*)pArchive->getResource(buf);
552 }
553
554 for (int i = 0; i < 6; i++) {
555 snprintf(buf, sizeof(buf), "timg/Mozi_Map%d.bti", i + 1);
556 mMapImg[i] = (ResTIMG*)pArchive->getResource(buf);
557 }
558
559 std::swap(mMapImg[5], mMapImg[4]);

Callers

nothing calls this directly

Calls 13

JKRGetNameResourceFunction · 0.85
snprintfFunction · 0.85
changeColorMethod · 0.80
get12ecMethod · 0.80
setMaskMethod · 0.80
getValueModeMethod · 0.80
setMaskSwMethod · 0.80
setPriorityMethod · 0.45
getResourceMethod · 0.45
searchMethod · 0.45
getTypeIDMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected