From 70641f2eb3f9fce8c89dcbf345e202050609a142 Mon Sep 17 00:00:00 2001 From: Daniel Karbach Date: Sat, 25 Aug 2012 20:14:08 +0200 Subject: [PATCH] moved TODOs to tracker see: http://luke.redirectme.net/redmine/projects/l2e/issues --- src/battle/BattleState.cpp | 5 ----- src/battle/states/RunState.cpp | 1 - src/battle/states/SelectItem.cpp | 1 - src/battle/states/SelectTarget.cpp | 1 - src/common/Ikari.h | 2 -- src/common/Spell.h | 2 -- src/graphics/Menu.h | 1 - src/main.cpp | 11 +++++------ 8 files changed, 5 insertions(+), 19 deletions(-) diff --git a/src/battle/BattleState.cpp b/src/battle/BattleState.cpp index f548f2d..5ba60d6 100644 --- a/src/battle/BattleState.cpp +++ b/src/battle/BattleState.cpp @@ -138,12 +138,10 @@ void BattleState::ResumeState(Application &ctrl, SDL_Surface *screen) { return; } if (Victory()) { - // TODO: push victory state ctrl.PopState(); return; } if (Defeat()) { - // TODO: push defeat state ctrl.PopState(); return; } @@ -227,7 +225,6 @@ void BattleState::CalculateDamage() { if (ac.GetType() == AttackChoice::DEFEND) return; TargetSelection &ts(ac.Selection()); - // TODO: this only evaluates SWORD type attacks if (CurrentAttack().isMonster) { const Stats &attackerStats(MonsterAt(CurrentAttack().index).GetStats()); CalculateDamage(attackerStats, ts); @@ -241,7 +238,6 @@ void BattleState::DecideMonsterAttack(Monster &m) const { AttackChoice &ac(m.GetAttackChoice()); TargetSelection &ts(ac.Selection()); ac.Reset(); - // TODO: run monster's attack script int target(rand() % NumHeroes()); while (!HeroPositionOccupied(target)) { target = rand() % NumHeroes(); @@ -302,7 +298,6 @@ void BattleState::CalculateDamage(const Stats &attackerStats, TargetSelection &t } Uint16 BattleState::CalculateDamage(const Stats &attacker, const Stats &defender) const { - // TODO: find out real formula and add some randomness return attacker.Attack() / 2 - defender.Defense() / 4; } diff --git a/src/battle/states/RunState.cpp b/src/battle/states/RunState.cpp index e1f6f4b..c75255c 100644 --- a/src/battle/states/RunState.cpp +++ b/src/battle/states/RunState.cpp @@ -24,7 +24,6 @@ namespace battle { void RunState::EnterState(Application &c, SDL_Surface *screen) { ctrl = &c; - // TODO: push battle animation if enemy is faster } void RunState::ExitState(Application &c, SDL_Surface *screen) { diff --git a/src/battle/states/SelectItem.cpp b/src/battle/states/SelectItem.cpp index 68f844f..e0f6aeb 100644 --- a/src/battle/states/SelectItem.cpp +++ b/src/battle/states/SelectItem.cpp @@ -62,7 +62,6 @@ void SelectItem::HandleEvents(const Input &input) { } if (item->GetTargetingMode().TargetsAll()) { ac.SetType(AttackChoice::ITEM); - // TODO: remove item from inventory ac.SetItem(item); battle->NextHero(); ctrl->PopState(); diff --git a/src/battle/states/SelectTarget.cpp b/src/battle/states/SelectTarget.cpp index f15f455..e857288 100644 --- a/src/battle/states/SelectTarget.cpp +++ b/src/battle/states/SelectTarget.cpp @@ -86,7 +86,6 @@ void SelectTarget::Render(SDL_Surface *screen) { } void SelectTarget::RenderCursors(SDL_Surface *screen, const geometry::Vector &offset) { - // TODO: this should be related to the enemy's width Vector cursorOffset(cursorIcon->Width() / -2, cursorIcon->Height()); // offset the indicator by 1/8th to the right and top Vector indicatorOffset(cursorOffset + Vector(cursorIcon->Width() / 8, cursorIcon->Height() / -8)); diff --git a/src/common/Ikari.h b/src/common/Ikari.h index a575106..2999538 100644 --- a/src/common/Ikari.h +++ b/src/common/Ikari.h @@ -28,8 +28,6 @@ public: bool IsMagical() const { return !isPhysical; } bool IsPhysical() const { return isPhysical; } - // TODO: add missing ikari properties - // temporary setters public: void SetName(const char *n) { name = n; } diff --git a/src/common/Spell.h b/src/common/Spell.h index 38d2395..d32de46 100644 --- a/src/common/Spell.h +++ b/src/common/Spell.h @@ -32,8 +32,6 @@ public: HeroGroup &UsableBy() { return usableBy; } const HeroGroup &UsableBy() const { return usableBy; } - // TODO: add missing spell properties - // temporary setters public: void SetName(const char *n) { name = n; } diff --git a/src/graphics/Menu.h b/src/graphics/Menu.h index f1a6d25..02a88c0 100644 --- a/src/graphics/Menu.h +++ b/src/graphics/Menu.h @@ -19,7 +19,6 @@ namespace graphics { class Sprite; -// TODO: animation when top row changes template class Menu { diff --git a/src/main.cpp b/src/main.cpp index bebeed1..3dc37d8 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -123,8 +123,7 @@ int main(int argc, char **argv) { maxim.SetIP(0); maxim.SetStats(Stats(28, 22, 28, 17, 14, 100, 10)); ComplexAnimation maximAttackAnimation(&maximSprite, framerate); - // TODO: cross check double frames; could be related to differences in framerates - maximAttackAnimation.AddFrames(1, 0, Vector(0, 0), 7); // TODO: maybe this could also be a pause before the battle animation + maximAttackAnimation.AddFrames(1, 0, Vector(0, 0), 7); maximAttackAnimation.AddFrames(1, 0, Vector(4, -1), 2); maximAttackAnimation.AddFrames(2, 0, Vector(4, -2), 2); maximAttackAnimation.AddFrames(2, 0, Vector(6, -2), 2); @@ -133,7 +132,7 @@ int main(int argc, char **argv) { maximAttackAnimation.AddFrames(2, 1, Vector(0, 0), 1); maximAttackAnimation.AddFrames(2, 2, Vector(0, 0), 2); maximAttackAnimation.AddFrames(2, 2, Vector(2, 0), 1); - maximAttackAnimation.AddFrames(1, 0, Vector(0, 0), 7); // TODO: maybe this could also be a pause between two animations + maximAttackAnimation.AddFrames(1, 0, Vector(0, 0), 7); maxim.SetAttackAnimation(&maximAttackAnimation); ComplexAnimation maximSpellAnimation(&maximSprite, 5 * framerate); maximSpellAnimation.AddFrames(3, 0, Vector(), 2); @@ -508,7 +507,7 @@ int main(int argc, char **argv) { Ikari lightGuard; lightGuard.SetName("Light guard"); lightGuard.SetCost(128); - lightGuard.GetTargetingMode().TargetAllAllies(); // FIXME: actually only targets self + lightGuard.GetTargetingMode().TargetAllAllies(); // actually only targets self lightGuard.SetMagical(); holyShield.SetIkari(&lightGuard); maxim.SetShield(&holyShield); @@ -518,7 +517,7 @@ int main(int argc, char **argv) { Ikari boomerang; boomerang.SetName("Boomerang"); boomerang.SetCost(164); - boomerang.GetTargetingMode().TargetAllAllies(); // FIXME: actually only targets self + boomerang.GetTargetingMode().TargetAllAllies(); // actually only targets self boomerang.SetMagical(); legendHelm.SetIkari(&boomerang); maxim.SetHelmet(&legendHelm); @@ -623,7 +622,7 @@ int main(int argc, char **argv) { Ikari ironBarrier; ironBarrier.SetName("Iron barrier"); ironBarrier.SetCost(255); - ironBarrier.GetTargetingMode().TargetAllAllies(); // FIXME: actually only targets self + ironBarrier.GetTargetingMode().TargetAllAllies(); // actually only targets self ironBarrier.SetMagical(); megaShield.SetIkari(&ironBarrier); guy.SetShield(&megaShield); -- 2.39.2