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

Method update

src/Sato/ItemObjMgr.cpp:1408–1435  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1406}
1407
1408void ItemObjMgr::update(ItemObjMgr::eDrawSimplModelItemType type, int id) {
1409
1410 for(int i = 0; i < 15; i++) {
1411 for (JSUListIterator<ItemObj> it(_3e8[sJ3DUpdateItemKind[i]].getFirst()); it.isAvailable(); ++it) {
1412 bool doUpdate = true;
1413 switch(type) {
1414 case ItemType_1: {
1415 if (it->IsState1or5AndSameOwner(id))
1416 doUpdate = false;
1417 break;
1418 }
1419 case ItemType_2: {
1420 doUpdate = false;
1421 int state = it->getState();
1422 if (state != 1 && state != 5)
1423 doUpdate = true;
1424 break;
1425 }
1426 }
1427
1428 if (doUpdate) {
1429 it->setLightMask();
1430 it->setTevColor();
1431 it->update();
1432 }
1433 }
1434 }
1435}
1436
1437void ItemObjMgr::viewCalc(u32 viewNo) {
1438 J3DUClipper *clipper = GetKartCtrl()->getKartCam(viewNo)->GetClipper();

Callers

nothing calls this directly

Calls 6

getFirstMethod · 0.45
isAvailableMethod · 0.45
getStateMethod · 0.45
setLightMaskMethod · 0.45
setTevColorMethod · 0.45

Tested by

no test coverage detected