From: Daniel Karbach Date: Sat, 1 Sep 2012 18:59:12 +0000 (+0200) Subject: moved most of the remaining data from main to test.l2s X-Git-Url: https://git.localhorst.tv/?a=commitdiff_plain;h=7f5b06f80ee58a220a235084aac384227ba87d85;p=l2e.git moved most of the remaining data from main to test.l2s now only menu prototypes and battle resources are missing --- diff --git a/src/main.cpp b/src/main.cpp index 662e5b9..803977a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -74,8 +74,6 @@ int main(int argc, char **argv) { const int width = 800; const int height = 480; - const int framerate = 33; - // std::srand(std::time(0)); try { @@ -185,10 +183,6 @@ int main(int argc, char **argv) { battleRes.itemMenuHeadline = intp.GetString("itemMenuHeadline"); battleRes.itemMenuPrototype = Menu(intp.GetFont("normalFont"), intp.GetFont("disabledFont"), intp.GetSprite("handCursor"), 15, 6, 8, 16, 1, 32, 2, ':'); - SDL_Surface *swordAttackImg(IMG_Load("test-data/attack-sword.png")); - Sprite swordAttackSprite(swordAttackImg, 96, 96); - SimpleAnimation swordAttackAnimation(&swordAttackSprite, 2 * framerate, 4); - maxim.SetWeapon(intp.GetItem("zircoSwordItem")); maxim.SetArmor(intp.GetItem("zirconArmorItem")); maxim.SetShield(intp.GetItem("holyShieldItem")); @@ -218,11 +212,10 @@ int main(int argc, char **argv) { dekar.SetRing(intp.GetItem("rocketRingItem")); dekar.SetJewel(intp.GetItem("krakenRockItem")); - battleRes.ikariMenuHeadline = "Please choose equipment."; - battleRes.noEquipmentText = "No equip"; + battleRes.ikariMenuHeadline = intp.GetString("ikariMenuHeadline"); + battleRes.noEquipmentText = intp.GetString("noEquipmentText"); battleRes.ikariMenuPrototype = Menu(intp.GetFont("normalFont"), intp.GetFont("disabledFont"), intp.GetSprite("handCursor"), 12, 6, intp.GetFont("normalFont")->CharHeight() / 2, intp.GetFont("normalFont")->CharWidth(), 1, intp.GetFont("normalFont")->CharWidth() * 2, 0, ':', 12, intp.GetFont("normalFont")->CharWidth()); - - battleRes.escapeText = "Escapes."; + battleRes.escapeText = intp.GetString("escapeText"); BattleState *battleState(new BattleState(bg, monstersLayout, heroesLayout, &battleRes)); battleState->AddMonster(monster); diff --git a/test-data/test.l2s b/test-data/test.l2s index 1547c8f..dd039e8 100644 --- a/test-data/test.l2s +++ b/test-data/test.l2s @@ -1,3 +1,7 @@ +include "ikaris.l2s" +include "items.l2s" +include "spells.l2s" + Number frameTime 33 Number twoFramesTime 66 Number fourFramesTime 132 @@ -509,11 +513,8 @@ export Sprite itemTargetCursor { offset: <0,64> } -include "spells.l2s" - export String spellMenuHeadline "Please choose a spell." - -include "ikaris.l2s" -include "items.l2s" - export String itemMenuHeadline "Please choose an item." +export String ikariMenuHeadline "Please choose equipment." +export String noEquipmentText "No equip" +export String escapeText "Escapes."