diff options
Diffstat (limited to '')
-rw-r--r-- | src/koopatlas/map.cpp | 90 |
1 files changed, 46 insertions, 44 deletions
diff --git a/src/koopatlas/map.cpp b/src/koopatlas/map.cpp index bca294c..9a04e65 100644 --- a/src/koopatlas/map.cpp +++ b/src/koopatlas/map.cpp @@ -300,19 +300,20 @@ void dWMMap_c::renderer_c::renderDoodadLayer(dKPLayer_s *layer) { for (int j = 0; j < doodad->animationCount; j++) { dKPDoodad_s::animation_s *anim = &doodad->animations[j]; - if (anim->delayOffset == 0) { + // FORWARDS COMPATIBILITY: (has a ***) + // *** if (anim->delayOffset == 0) { u32 baseTick = anim->baseTick; if (baseTick == 0) { anim->baseTick = baseTick = GlobalTickCount; } u32 elapsed = GlobalTickCount - baseTick; - u32 elapsedAdjusted = elapsed; + // *** u32 elapsedAdjusted = elapsed; if (anim->isReversed) elapsed = anim->frameCount - 1 - elapsed; if (elapsed >= anim->frameCount) { - if (elapsed >= (anim->frameCount + anim->delay)) { + // *** if (elapsed >= (anim->frameCount + anim->delay)) { // we've reached the end switch (anim->loop) { @@ -334,12 +335,13 @@ void dWMMap_c::renderer_c::renderDoodadLayer(dKPLayer_s *layer) { anim->baseTick = GlobalTickCount; break; } - } - elapsedAdjusted = anim->frameCount; + // *** } + // *** elapsedAdjusted = anim->frameCount; } // now calculate the thing - float progress = elapsedAdjusted / (float)anim->frameCount; + // *** float progress = elapsedAdjusted / (float)anim->frameCount; + float progress = elapsed / (float)anim->frameCount; float value; switch (anim->curve) { @@ -383,10 +385,10 @@ void dWMMap_c::renderer_c::renderDoodadLayer(dKPLayer_s *layer) { // TODO break; } - } - else { - anim->delayOffset -= 1; - } + // *** } + // *** else { + // *** anim->delayOffset -= 1; + // *** } } } @@ -421,50 +423,50 @@ void dWMMap_c::renderer_c::renderDoodadLayer(dKPLayer_s *layer) { void dWMMap_c::renderer_c::renderPathLayer(dKPLayer_s *layer) { return; - for (int i = 0; i < layer->nodeCount; i++) { - dKPNode_s *node = layer->nodes[i]; + // for (int i = 0; i < layer->nodeCount; i++) { + // dKPNode_s *node = layer->nodes[i]; - int world = node->levelNumber[0]; - int level = node->levelNumber[1]; + // int world = node->levelNumber[0]; + // int level = node->levelNumber[1]; - SaveBlock *save = GetSaveFile()->GetBlock(-1); - u32 conds = save->GetLevelCondition(world-1, level-1); + // SaveBlock *save = GetSaveFile()->GetBlock(-1); + // u32 conds = save->GetLevelCondition(world-1, level-1); - bool isUnlocked = true; - bool exitComplete = false; - bool secretComplete = false; + // bool isUnlocked = true; + // bool exitComplete = false; + // bool secretComplete = false; - if (conds & 0x10) - exitComplete = true; - if (conds & 0x20) - secretComplete = true; + // if (conds & 0x10) + // exitComplete = true; + // if (conds & 0x20) + // secretComplete = true; - // Is it unlocked? - if (!isUnlocked) - node->color.setCurrentFrame(0); // Black + // // Is it unlocked? + // if (!isUnlocked) + // node->color.setCurrentFrame(0); // Black - // Is it complete? - else if ((exitComplete) || (secretComplete)) - // Does it have two exits? - if ((node->hasSecret) && ((!exitComplete) || (!secretComplete))) - node->color.setCurrentFrame(2); // Yellow + // // Is it complete? + // else if ((exitComplete) || (secretComplete)) + // // Does it have two exits? + // if ((node->hasSecret) && ((!exitComplete) || (!secretComplete))) + // node->color.setCurrentFrame(2); // Yellow - // All exits are complete - else - node->color.setCurrentFrame(1); // Blue + // // All exits are complete + // else + // node->color.setCurrentFrame(1); // Blue - // Not complete after all - else - node->color.setCurrentFrame(3); // Red + // // Not complete after all + // else + // node->color.setCurrentFrame(3); // Red - node->matrix.translation(node->x, node->y, 500.0); - node->matrix.applyRotationYXZ(0, 0, 0); - node->model.setDrawMatrix(node->matrix); - node->model.setScale(1.0f, 1.0f, 1.0f); - node->model.calcWorld(false); + // node->matrix.translation(node->x, node->y, 500.0); + // node->matrix.applyRotationYXZ(0, 0, 0); + // node->model.setDrawMatrix(node->matrix); + // node->model.setScale(1.0f, 1.0f, 1.0f); + // node->model.calcWorld(false); - node->model.scheduleForDrawing(); - } + // node->model.scheduleForDrawing(); + // } } |