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

Method initCharShadowModelData

src/Sato/ItemObjMgr.cpp:1003–1030  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1001}
1002
1003void ItemObjMgr::initCharShadowModelData()
1004{
1005 mpMdlData = nullptr;
1006 if (mpMdlData == nullptr) // it just got set to null, so yeah it definitely has to be checked if it's null
1007 {
1008 mpMdlData = J3DModelLoaderDataBase::load(ObjUtility::getPtrMainArc("/Item/driver_shadow1.bmd"), 0x19210010);
1009 ExModel::patchModelData(mpMdlData);
1010 mpMdlData->newSharedDisplayList(0x40000);
1011 }
1012
1013 for (u8 i = 0; i < 2; i++)
1014 {
1015 mpShadowMdl[i] = new ShadowModel(0xf, ShadowModel::cShadowKind_Geo, 0xff);
1016 mpShadowMdl[i]->setModelData(mpMdlData);
1017 }
1018
1019 if (RCMGetManager()->isLANMode())
1020 {
1021 for (int i = 0; i < RCMGetManager()->getKartNumber(); i++)
1022 {
1023 if (KartInfo::KartCharacter::convPlayerKind(RCMGetManager()->getKartInfo(i)->getPad(0)) == 1)
1024 {
1025 _824 = i;
1026 break;
1027 }
1028 }
1029 }
1030}
1031
1032void ItemObjMgr::createCharShadowModel(JKRSolidHeap *heap, u32 camera_index)
1033{

Callers

nothing calls this directly

Calls 6

RCMGetManagerFunction · 0.85
setModelDataMethod · 0.80
isLANModeMethod · 0.45
getKartNumberMethod · 0.45
getPadMethod · 0.45
getKartInfoMethod · 0.45

Tested by

no test coverage detected