X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fmain.cpp;h=dc4c669caadb90d8da52837680bf030b534c3d5d;hb=e518ac67cf94e244df16078dcbc536e6b659e758;hp=59348338391daea0d5c6ea5fdb1578fdd4f32fe3;hpb=e1edc92c4fb834c8061118e89c0d7e239742b030;p=l2e.git diff --git a/src/main.cpp b/src/main.cpp index 5934833..dc4c669 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -7,6 +7,7 @@ #include "battle/Monster.h" #include "battle/PartyLayout.h" #include "battle/Resources.h" +#include "common/Capsule.h" #include "common/GameConfig.h" #include "common/GameState.h" #include "common/Hero.h" @@ -17,6 +18,7 @@ #include "common/Spell.h" #include "common/Stats.h" #include "geometry/Vector.h" +#include "graphics/CharSelect.h" #include "graphics/ComplexAnimation.h" #include "graphics/Font.h" #include "graphics/Frame.h" @@ -54,9 +56,9 @@ using app::Application; using app::Arguments; using app::Input; using battle::BattleState; -using battle::Capsule; using battle::Monster; using battle::PartyLayout; +using common::Capsule; using common::GameConfig; using common::GameState; using common::Hero; @@ -101,6 +103,7 @@ int main(int argc, char **argv) { battle::Monster::CreateTypeDescription(); battle::PartyLayout::CreateTypeDescription(); + common::Capsule::CreateTypeDescription(); common::Hero::CreateTypeDescription(); common::Ikari::CreateTypeDescription(); common::Item::CreateTypeDescription(); @@ -109,6 +112,7 @@ int main(int argc, char **argv) { common::TargetingMode::CreateTypeDescription(); graphics::Animation::CreateTypeDescription(); + graphics::CharSelect::CreateTypeDescription(); graphics::ComplexAnimation::CreateTypeDescription(); graphics::Font::CreateTypeDescription(); graphics::Frame::CreateTypeDescription(); @@ -192,6 +196,13 @@ int main(int argc, char **argv) { gameState.party[3] = &gameState.heroes[3]; gameState.partySize = 4; + gameState.capsules[1] = *caster.GetCapsule("flash"); + gameState.capsules[1].UpgradeClass(); + gameState.capsules[1].UpgradeClass(); + gameState.capsules[1].UpgradeClass(); + gameState.capsules[1].UpgradeClass(); + gameState.capsule = 1; + GameConfig gameConfig; gameConfig.state = &gameState; gameConfig.heroesLayout = caster.GetPartyLayout("heroesLayout"); @@ -222,7 +233,7 @@ int main(int argc, char **argv) { gameState.heroes[0].AddSpell(valorSpell); gameState.heroes[1].AddSpell(valorSpell); - gameState.inventory.Add(caster.GetItem("zirconPlateItem")); + gameState.inventory.Add(caster.GetItem("zirconPlateItem"), 32); gameState.inventory.Add(caster.GetItem("antidoteItem"), 9); gameState.inventory.Add(caster.GetItem("powerRingItem")); gameState.inventory.Add(caster.GetItem("magicJarItem"), 4); @@ -284,18 +295,12 @@ int main(int argc, char **argv) { app::State *state(0); if (battle) { - graphics::Sprite flashSprite(IMG_Load("test-data/flash.png"), 96, 96); - Capsule capsule; - capsule.SetName("Flash"); - capsule.SetHealth(13, 13); - capsule.SetBattleSprite(&flashSprite); - BattleState *battleState(new BattleState(&gameConfig, bg, &monstersLayout)); battleState->AddMonster(monster); battleState->AddMonster(monster); battleState->AddMonster(monster); battleState->AddMonster(monster); - battleState->SetCapsule(capsule); + battleState->SetCapsule(caster.GetCapsule("flash")); battleState->AddHero(gameState.heroes[0]); battleState->AddHero(gameState.heroes[1]); battleState->AddHero(gameState.heroes[2]);