]> git.localhorst.tv Git - l2e.git/commitdiff
added small hero tags (used in battle animation and run state)
authorDaniel Karbach <daniel.karbach@localhorst.tv>
Sat, 11 Aug 2012 17:09:19 +0000 (19:09 +0200)
committerDaniel Karbach <daniel.karbach@localhorst.tv>
Sat, 11 Aug 2012 17:09:19 +0000 (19:09 +0200)
12 files changed:
Debug/src/battle/subdir.mk
Release/src/battle/subdir.mk
src/battle/BattleState.cpp
src/battle/BattleState.h
src/battle/HeroTag.cpp
src/battle/Resources.h
src/battle/SmallHeroTag.cpp [new file with mode: 0644]
src/battle/SmallHeroTag.h [new file with mode: 0644]
src/battle/states/PerformAttacks.cpp
src/battle/states/RunState.cpp
src/main.cpp
test-data/small-tag-frame.png [new file with mode: 0644]

index c459c3e20b5dd083de284c8c7dafe74355120e35..20dd9c3ac6217f13cfa7963e95559db2f031ceee 100644 (file)
@@ -12,6 +12,7 @@ CPP_SRCS += \
 ../src/battle/Monster.cpp \
 ../src/battle/MoveMenu.cpp \
 ../src/battle/PartyLayout.cpp \
+../src/battle/SmallHeroTag.cpp \
 ../src/battle/TargetSelection.cpp 
 
 OBJS += \
@@ -23,6 +24,7 @@ OBJS += \
 ./src/battle/Monster.o \
 ./src/battle/MoveMenu.o \
 ./src/battle/PartyLayout.o \
+./src/battle/SmallHeroTag.o \
 ./src/battle/TargetSelection.o 
 
 CPP_DEPS += \
@@ -34,6 +36,7 @@ CPP_DEPS += \
 ./src/battle/Monster.d \
 ./src/battle/MoveMenu.d \
 ./src/battle/PartyLayout.d \
+./src/battle/SmallHeroTag.d \
 ./src/battle/TargetSelection.d 
 
 
index 65a66230ff4dd3584b56ee18493dfcc8d804322a..d25e980ec5f62a5ca3b9b7527e728f1ea64abd0f 100644 (file)
@@ -12,6 +12,7 @@ CPP_SRCS += \
 ../src/battle/Monster.cpp \
 ../src/battle/MoveMenu.cpp \
 ../src/battle/PartyLayout.cpp \
+../src/battle/SmallHeroTag.cpp \
 ../src/battle/TargetSelection.cpp 
 
 OBJS += \
@@ -23,6 +24,7 @@ OBJS += \
 ./src/battle/Monster.o \
 ./src/battle/MoveMenu.o \
 ./src/battle/PartyLayout.o \
+./src/battle/SmallHeroTag.o \
 ./src/battle/TargetSelection.o 
 
 CPP_DEPS += \
@@ -34,6 +36,7 @@ CPP_DEPS += \
 ./src/battle/Monster.d \
 ./src/battle/MoveMenu.d \
 ./src/battle/PartyLayout.d \
+./src/battle/SmallHeroTag.d \
 ./src/battle/TargetSelection.d 
 
 
index 0f3fad94838f56e88a16bda2b6efbce8a788b624..6fac152e64b87e94acc7d132b29c1e2878012de8 100644 (file)
@@ -17,6 +17,7 @@
 #include "../common/Item.h"
 #include "../common/Spell.h"
 #include "../geometry/operators.h"
+#include "../graphics/Frame.h"
 #include "../graphics/Sprite.h"
 
 #include <algorithm>
@@ -70,6 +71,7 @@ void BattleState::EnterState(Application &ctrl, SDL_Surface *screen) {
                ikariMenus[i] = res->ikariMenuPrototype;
                LoadIkariMenu(i);
                heroTags[i] = HeroTag(this, i);
+               smallHeroTags[i] = SmallHeroTag(this, i);
        }
 
        int tagHeight(attackTypeMenu.Height());
@@ -80,6 +82,15 @@ void BattleState::EnterState(Application &ctrl, SDL_Surface *screen) {
        heroTagPositions[2] = Point<int>(xOffset, BackgroundHeight() - tagHeight);
        heroTagPositions[3] = Point<int>(xOffset + tagWidth, BackgroundHeight() - tagHeight);
 
+       tagHeight = res->normalFont->CharHeight() * 4 + res->smallHeroTagFrame->BorderHeight() * 2;
+       tagWidth = res->normalFont->CharWidth() * 6 + res->smallHeroTagFrame->BorderWidth() * 2;
+       xOffset = (BackgroundWidth() - 4 * tagWidth) / 2;
+       int yOffset(BackgroundHeight() - tagHeight);
+       smallHeroTagPositions[0] = Point<int>(xOffset, yOffset);
+       smallHeroTagPositions[1] = Point<int>(xOffset + 2 * tagWidth, yOffset);
+       smallHeroTagPositions[2] = Point<int>(xOffset + tagWidth, yOffset);
+       smallHeroTagPositions[3] = Point<int>(xOffset + 3 * tagWidth, yOffset);
+
        itemMenu = res->itemMenuPrototype;
        LoadInventory();
 }
@@ -225,11 +236,8 @@ void BattleState::UpdateWorld(float deltaT) {
 
 void BattleState::Render(SDL_Surface *screen) {
        Vector<int> offset(CalculateScreenOffset(screen));
-
        RenderBackground(screen, offset);
        RenderMonsters(screen, offset);
-//     RenderHeroes(screen, offset);
-       RenderHeroTags(screen, offset);
 }
 
 void BattleState::RenderBackground(SDL_Surface *screen, const Vector<int> &offset) {
@@ -264,4 +272,23 @@ void BattleState::RenderHeroTags(SDL_Surface *screen, const Vector<int> &offset)
        }
 }
 
+void BattleState::RenderSmallHeroTags(SDL_Surface *screen, const Vector<int> &offset) {
+       int tagHeight(res->normalFont->CharHeight() * 4 + res->smallHeroTagFrame->BorderHeight() * 2);
+       int tagWidth(res->normalFont->CharWidth() * 6 + res->smallHeroTagFrame->BorderWidth() * 2);
+
+       SDL_Rect rect;
+       rect.x = offset.X();
+       rect.y = offset.Y() + BackgroundHeight() - tagHeight;
+       rect.w = BackgroundWidth();
+       rect.h = tagHeight;
+       SDL_FillRect(screen, &rect, SDL_MapRGB(screen->format, 0, 0, 0));
+       rect.y += res->normalFont->CharHeight() / 8;
+       rect.h -= res->normalFont->CharHeight() / 4;
+       SDL_FillRect(screen, &rect, res->heroesBgColor);
+
+       for (int i(0); i < numHeroes; ++i) {
+               smallHeroTags[i].Render(screen, tagWidth, tagHeight, smallHeroTagPositions[i] + offset);
+       }
+}
+
 }
index f5bf9cb1b915ee9e60de2a3516104adac9842052..a901c63f68ccf028063fec9ebc8a21d3313376be 100644 (file)
@@ -15,6 +15,7 @@
 #include "Monster.h"
 #include "MoveMenu.h"
 #include "Resources.h"
+#include "SmallHeroTag.h"
 #include "../app/State.h"
 #include "../geometry/Point.h"
 #include "../geometry/Vector.h"
@@ -106,12 +107,13 @@ public:
        bool AttackSelectionDone() const { return activeHero >= numHeroes; }
 
        int NumHeroes() const { return numHeroes; }
+       int MaxHeroes() const { return 4; }
        int MaxMonsters() const { return monsters.size(); }
 
        const std::vector<geometry::Point<int> > &MonsterPositions() const { return monsterPositions; }
        bool MonsterPositionOccupied(int index) { return index >= 0 && index < int(monsters.size()) && monsters[index].Health() > 0; }
        const std::vector<geometry::Point<int> > &HeroesPositions() const { return heroesPositions; }
-       bool HeroPositionOccupied(int index) { return index >= 0 && index < numHeroes; }
+       bool HeroPositionOccupied(int index) const { return index >= 0 && index < numHeroes; }
 
        void SetRunaway() { ranAway = true; }
        void ClearAllAttacks();
@@ -129,6 +131,7 @@ public:
        void RenderMonsters(SDL_Surface *screen, const geometry::Vector<int> &offset);
        void RenderHeroes(SDL_Surface *screen, const geometry::Vector<int> &offset);
        void RenderHeroTags(SDL_Surface *screen, const geometry::Vector<int> &offset);
+       void RenderSmallHeroTags(SDL_Surface *screen, const geometry::Vector<int> &offset);
 
 private:
        void LoadSpellMenu(std::vector<Hero>::size_type heroIndex);
@@ -151,7 +154,9 @@ private:
        graphics::Menu<const common::Item *> itemMenu;
        graphics::Menu<const common::Item *> ikariMenus[4];
        HeroTag heroTags[4];
+       SmallHeroTag smallHeroTags[4];
        geometry::Point<int> heroTagPositions[4];
+       geometry::Point<int> smallHeroTagPositions[4];
        AttackChoice attackChoices[4];
        int numHeroes;
        int activeHero;
index 6212f36a5c87bdadf3b3832df02bef94909ae2e2..d50b4132d85860f7556041794eac260793c92480 100644 (file)
@@ -29,65 +29,67 @@ const graphics::Sprite *HeroTag::HeroSprite() const {
 }
 
 void HeroTag::Render(SDL_Surface *screen, int width, int height, Point<int> position, bool active) const {
+       const Resources &r(battle->Res());
+
        // frame
-       const Frame *frame(active ? battle->Res().activeHeroTagFrame : battle->Res().heroTagFrame);
+       const Frame *frame(active ? r.activeHeroTagFrame : r.heroTagFrame);
        Vector<int> frameOffset(frame->BorderWidth(), frame->BorderHeight());
-       Vector<int> alignOffset((index % 2) ? 4 * battle->Res().heroTagFont->CharWidth() : 0, 0);
+       Vector<int> alignOffset((index % 2) ? 4 * r.heroTagFont->CharWidth() : 0, 0);
        frame->Draw(screen, position, width, height);
 
        const Hero &hero(battle->HeroAt(index));
 
        // gauges
        // NOTE: assuming frame border is unit size until charsets are impemented
-       int gaugeX(((index % 2) ? 10 : 6) * battle->Res().heroTagFont->CharWidth());
+       int gaugeX(((index % 2) ? 10 : 6) * r.heroTagFont->CharWidth());
        // 4 units reserved for hero, gaugeX already includes frame offset
-       int gaugeWidth(width - gaugeX - ((index % 2) ? 1 : 5) * battle->Res().heroTagFont->CharWidth());
+       int gaugeWidth(width - gaugeX - ((index % 2) ? 1 : 5) * r.heroTagFont->CharWidth());
        // health gauge, second line
-       Vector<int> healthGaugeOffset(gaugeX, frameOffset.Y() + battle->Res().heroTagFont->CharHeight());
-       battle->Res().healthGauge->Draw(screen, position + healthGaugeOffset, gaugeWidth, hero.RelativeHealth(255));
+       Vector<int> healthGaugeOffset(gaugeX, frameOffset.Y() + r.heroTagFont->CharHeight());
+       r.healthGauge->Draw(screen, position + healthGaugeOffset, gaugeWidth, hero.RelativeHealth(255));
        // mana gauge, third line
-       Vector<int> manaGaugeOffset(gaugeX, frameOffset.Y() + 2 * battle->Res().heroTagFont->CharHeight());
-       battle->Res().manaGauge->Draw(screen, position + manaGaugeOffset, gaugeWidth, hero.RelativeMana(255));
+       Vector<int> manaGaugeOffset(gaugeX, frameOffset.Y() + 2 * r.heroTagFont->CharHeight());
+       r.manaGauge->Draw(screen, position + manaGaugeOffset, gaugeWidth, hero.RelativeMana(255));
        // ikari gauge, fourth line
-       Vector<int> ikariGaugeOffset(gaugeX, frameOffset.Y() + 3 * battle->Res().heroTagFont->CharHeight());
-       battle->Res().ikariGauge->Draw(screen, position + ikariGaugeOffset, gaugeWidth, hero.RelativeIP(255));
+       Vector<int> ikariGaugeOffset(gaugeX, frameOffset.Y() + 3 * r.heroTagFont->CharHeight());
+       r.ikariGauge->Draw(screen, position + ikariGaugeOffset, gaugeWidth, hero.RelativeIP(255));
 
        // labels
-       int labelX(((index % 2) ? 5 : 1) * battle->Res().heroTagFont->CharWidth());
+       int labelX(((index % 2) ? 5 : 1) * r.heroTagFont->CharWidth());
        // level
        Vector<int> levelLabelOffset(gaugeX, frameOffset.Y());
-       battle->Res().heroTagLabels->Draw(screen, position + levelLabelOffset, 0, 0);
+       r.heroTagLabels->Draw(screen, position + levelLabelOffset, r.levelLabelCol, r.levelLabelRow);
        // hp
-       Vector<int> healthLabelOffset(labelX, frameOffset.Y() + battle->Res().heroTagFont->CharHeight());
-       battle->Res().heroTagLabels->Draw(screen, position + healthLabelOffset, 0, 1);
+       Vector<int> healthLabelOffset(labelX, frameOffset.Y() + r.heroTagFont->CharHeight());
+       r.heroTagLabels->Draw(screen, position + healthLabelOffset, r.healthLabelCol, r.healthLabelRow);
        // mp
-       Vector<int> manaLabelOffset(labelX, frameOffset.Y() + 2 * battle->Res().heroTagFont->CharHeight());
-       battle->Res().heroTagLabels->Draw(screen, position + manaLabelOffset, 0, 2);
+       Vector<int> manaLabelOffset(labelX, frameOffset.Y() + 2 * r.heroTagFont->CharHeight());
+       r.heroTagLabels->Draw(screen, position + manaLabelOffset, r.manaLabelCol, r.manaLabelRow);
        // cm
-       Vector<int> moveLabelOffset(labelX, frameOffset.Y() + 3 * battle->Res().heroTagFont->CharHeight());
-       battle->Res().heroTagLabels->Draw(screen, position + moveLabelOffset, 0, 3);
+       Vector<int> moveLabelOffset(labelX, frameOffset.Y() + 3 * r.heroTagFont->CharHeight());
+       r.heroTagLabels->Draw(screen, position + moveLabelOffset, r.moveLabelCol, r.moveLabelRow);
        // ip
-       Vector<int> ikariLabelOffset(labelX + 3 * battle->Res().heroTagFont->CharWidth(), frameOffset.Y() + 3 * battle->Res().heroTagFont->CharHeight());
-       battle->Res().heroTagLabels->Draw(screen, position + ikariLabelOffset, 0, 4);
+       Vector<int> ikariLabelOffset(labelX + 3 * r.heroTagFont->CharWidth(), frameOffset.Y() + 3 * r.heroTagFont->CharHeight());
+       r.heroTagLabels->Draw(screen, position + ikariLabelOffset, r.ikariLabelCol, r.ikariLabelRow);
 
        // numbers
        // level
-       Vector<int> levelNumberOffset(gaugeX + battle->Res().heroTagLabels->Width(), levelLabelOffset.Y());
-       battle->Res().heroTagFont->DrawNumber(hero.Level(), screen, position + levelNumberOffset, 2);
+       Vector<int> levelNumberOffset(gaugeX + r.heroTagLabels->Width(), levelLabelOffset.Y());
+       r.heroTagFont->DrawNumber(hero.Level(), screen, position + levelNumberOffset, 2);
        // health
-       Vector<int> healthNumberOffset(labelX + battle->Res().heroTagLabels->Width(), healthLabelOffset.Y());
-       battle->Res().heroTagFont->DrawNumber(hero.Health(), screen, position + healthNumberOffset, 3);
+       Vector<int> healthNumberOffset(labelX + r.heroTagLabels->Width(), healthLabelOffset.Y());
+       r.heroTagFont->DrawNumber(hero.Health(), screen, position + healthNumberOffset, 3);
        //mana
-       Vector<int> manaNumberOffset(labelX + battle->Res().heroTagLabels->Width(), manaLabelOffset.Y());
-       battle->Res().heroTagFont->DrawNumber(hero.Mana(), screen, position + manaNumberOffset, 3);
+       Vector<int> manaNumberOffset(labelX + r.heroTagLabels->Width(), manaLabelOffset.Y());
+       r.heroTagFont->DrawNumber(hero.Mana(), screen, position + manaNumberOffset, 3);
 
        // name
-       battle->Res().normalFont->DrawString(hero.Name(), screen, position + frameOffset + alignOffset, 5);
+       r.normalFont->DrawString(hero.Name(), screen, position + frameOffset + alignOffset, 5);
 
        // attack icon
        if (battle->AttackChoiceAt(index).GetType() != AttackChoice::UNDECIDED) {
-               Vector<int> attackIconOffset(labelX + battle->Res().heroTagLabels->Width(), frameOffset.Y() + 3 * battle->Res().heroTagFont->CharHeight());
-               battle->Res().attackChoiceIcons->Draw(screen, position + attackIconOffset, 0, battle->AttackChoiceAt(index).GetType());
+               Vector<int> attackIconOffset(labelX + r.heroTagLabels->Width(), frameOffset.Y() + 3 * r.heroTagFont->CharHeight());
+               r.attackChoiceIcons->Draw(screen, position + attackIconOffset, 0, battle->AttackChoiceAt(index).GetType());
        }
 
        // hero
index 5cc8903131f84a7f625f2820a08f2da5f5b0166b..73b2a8f15f3a801c387925b9ce3b4bc583dd7359 100644 (file)
@@ -10,6 +10,8 @@
 
 #include "../graphics/Menu.h"
 
+#include <SDL.h>
+
 namespace common {
        class Inventory;
        class Item;
@@ -36,6 +38,8 @@ struct Resources {
 
        graphics::Frame *heroTagFrame;
        graphics::Frame *activeHeroTagFrame;
+       graphics::Frame *smallHeroTagFrame;
+       graphics::Frame *lastSmallHeroTagFrame;
 
        graphics::Font *heroTagFont;
        graphics::Sprite *heroTagLabels;
@@ -74,6 +78,19 @@ struct Resources {
        graphics::Sprite *ringMenuIcon;
        graphics::Sprite *jewelMenuIcon;
 
+       int levelLabelCol;
+       int levelLabelRow;
+       int healthLabelCol;
+       int healthLabelRow;
+       int manaLabelCol;
+       int manaLabelRow;
+       int moveLabelCol;
+       int moveLabelRow;
+       int ikariLabelCol;
+       int ikariLabelRow;
+
+       Uint32 heroesBgColor;
+
 
        Resources()
        : swapCursor(0)
@@ -86,6 +103,8 @@ struct Resources {
 
        , heroTagFrame(0)
        , activeHeroTagFrame(0)
+       , smallHeroTagFrame(0)
+       , lastSmallHeroTagFrame(0)
 
        , heroTagFont(0)
        , heroTagLabels(0)
@@ -118,6 +137,19 @@ struct Resources {
        , helmetMenuIcon(0)
        , ringMenuIcon(0)
        , jewelMenuIcon(0)
+
+       , levelLabelCol(0)
+       , levelLabelRow(0)
+       , healthLabelCol(0)
+       , healthLabelRow(0)
+       , manaLabelCol(0)
+       , manaLabelRow(0)
+       , moveLabelCol(0)
+       , moveLabelRow(0)
+       , ikariLabelCol(0)
+       , ikariLabelRow(0)
+
+       , heroesBgColor(0)
        { }
 
 };
diff --git a/src/battle/SmallHeroTag.cpp b/src/battle/SmallHeroTag.cpp
new file mode 100644 (file)
index 0000000..7843cc0
--- /dev/null
@@ -0,0 +1,56 @@
+/*
+ * SmallHeroTag.cpp
+ *
+ *  Created on: Aug 11, 2012
+ *      Author: holy
+ */
+
+#include "SmallHeroTag.h"
+
+#include "BattleState.h"
+#include "../geometry/operators.h"
+#include "../geometry/Vector.h"
+#include "../graphics/Font.h"
+#include "../graphics/Frame.h"
+#include "../graphics/Gauge.h"
+
+using geometry::Point;
+using geometry::Vector;
+using graphics::Font;
+using graphics::Frame;
+using graphics::Sprite;
+
+namespace battle {
+
+void SmallHeroTag::Render(SDL_Surface *screen, int width, int height, geometry::Point<int> position) const {
+       const Resources &r(battle->Res());
+       const Frame *frame((index == battle->MaxHeroes() - 1) ? r.lastSmallHeroTagFrame : r.smallHeroTagFrame);
+       const Font *font(r.normalFont);
+       const Sprite *labels(r.heroTagLabels);
+
+       frame->Draw(screen, position, width, height);
+
+       if (battle->HeroPositionOccupied(index)) {
+               const Hero &hero(battle->HeroAt(index));
+
+               int gaugeWidth(width - 2 * frame->BorderWidth() - labels->Width());
+               Vector<int> nameOffset(frame->BorderWidth(), frame->BorderHeight());
+               Vector<int> hpLabelOffset(nameOffset.X(), nameOffset.Y() + font->CharHeight());
+               Vector<int> mpLabelOffset(hpLabelOffset.X(), hpLabelOffset.Y() + font->CharHeight());
+               Vector<int> ipLabelOffset(mpLabelOffset.X(), mpLabelOffset.Y() + font->CharHeight());
+               Vector<int> hpGaugeOffset(hpLabelOffset.X() + labels->Width(), hpLabelOffset.Y());
+               Vector<int> mpGaugeOffset(mpLabelOffset.X() + labels->Width(), mpLabelOffset.Y());
+               Vector<int> ipGaugeOffset(ipLabelOffset.X() + labels->Width(), ipLabelOffset.Y());
+
+               font->DrawString(hero.Name(), screen, position + nameOffset, 5);
+               labels->Draw(screen, position + hpLabelOffset, r.healthLabelCol, r.healthLabelRow);
+               labels->Draw(screen, position + mpLabelOffset, r.manaLabelCol, r.manaLabelRow);
+               labels->Draw(screen, position + ipLabelOffset, r.ikariLabelCol, r.ikariLabelRow);
+               r.healthGauge->Draw(screen, position + hpGaugeOffset, gaugeWidth, hero.RelativeHealth(255));
+               r.manaGauge->Draw(screen, position + mpGaugeOffset, gaugeWidth, hero.RelativeMana(255));
+               r.ikariGauge->Draw(screen, position + ipGaugeOffset, gaugeWidth, hero.RelativeIP(255));
+       }
+
+}
+
+}
diff --git a/src/battle/SmallHeroTag.h b/src/battle/SmallHeroTag.h
new file mode 100644 (file)
index 0000000..1f392c3
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+ * SmallHeroTag.h
+ *
+ *  Created on: Aug 11, 2012
+ *      Author: holy
+ */
+
+#ifndef BATTLE_SMALLHEROTAG_H_
+#define BATTLE_SMALLHEROTAG_H_
+
+#include "../geometry/Point.h"
+
+#include <SDL.h>
+
+namespace graphics {
+       class Font;
+       class Frame;
+       class Gauge;
+}
+
+namespace battle {
+
+class BattleState;
+
+class SmallHeroTag {
+
+public:
+       SmallHeroTag() : battle(0), index(0) { }
+       SmallHeroTag(const BattleState *battle, int heroIndex)
+       : battle(battle), index(heroIndex) { }
+
+       void Render(SDL_Surface *screen, int width, int height, geometry::Point<int> position) const;
+
+private:
+       const BattleState *battle;
+       int index;
+
+};
+
+}
+
+#endif /* BATTLE_SMALLHEROTAG_H_ */
index f5a8c87334af8e064170b6b7771cfb7aca47703e..5906650e0418a42949ed44bb26ffaf3e697bd821 100644 (file)
@@ -113,7 +113,7 @@ void PerformAttacks::Render(SDL_Surface *screen) {
        battle->RenderBackground(screen, offset);
        battle->RenderMonsters(screen, offset);
        battle->RenderHeroes(screen, offset);
-       // render small tags
+       battle->RenderSmallHeroTags(screen, offset);
        RenderTitleBar(screen, offset);
 }
 
index 6f4325a0b72d0f3850b334c83fe8fe321c771316..1a90e280f5f9af70c10478a22470fa9df0ddc825 100644 (file)
@@ -64,7 +64,7 @@ void RunState::Render(SDL_Surface *screen) {
        battle->RenderBackground(screen, offset);
        battle->RenderMonsters(screen, offset);
        battle->RenderHeroes(screen, offset);
-       // render small tags
+       battle->RenderSmallHeroTags(screen, offset);
        RenderTitleBar(screen, offset);
 }
 
index cb4ad91317aa4d311a6dba3fe133e7b62ee36ec1..4b4ca58f1f4475076d1b4d3186234b9247d53e72 100644 (file)
@@ -74,8 +74,8 @@ int main(int argc, char **argv) {
                monstersLayout.AddPosition(Point<Uint8>(208, 104));
                PartyLayout heroesLayout;
                heroesLayout.AddPosition(Point<Uint8>(48, 152));
-               heroesLayout.AddPosition(Point<Uint8>(80, 168));
                heroesLayout.AddPosition(Point<Uint8>(128, 152));
+               heroesLayout.AddPosition(Point<Uint8>(80, 168));
                heroesLayout.AddPosition(Point<Uint8>(160, 168));
 
                SDL_Surface *monsterImg(IMG_Load("test-data/monster.png"));
@@ -169,6 +169,17 @@ int main(int argc, char **argv) {
                SDL_Surface *heroTagImg(IMG_Load("test-data/hero-tag-sprites.png"));
                Sprite heroTagSprite(heroTagImg, 32, 16);
                battleRes.heroTagLabels = &heroTagSprite;
+               battleRes.levelLabelCol = 0;
+               battleRes.levelLabelRow = 0;
+               battleRes.healthLabelCol = 0;
+               battleRes.healthLabelRow = 1;
+               battleRes.manaLabelCol = 0;
+               battleRes.manaLabelRow = 2;
+               battleRes.moveLabelCol = 0;
+               battleRes.moveLabelRow = 3;
+               battleRes.ikariLabelCol = 0;
+               battleRes.ikariLabelRow = 4;
+
                SDL_Surface *numbersImg(IMG_Load("test-data/numbers.png"));
                Sprite numbersSprite(numbersImg, 16, 16);
                Font heroTagFont(&numbersSprite);
@@ -178,6 +189,12 @@ int main(int argc, char **argv) {
                battleRes.heroTagFrame = &heroTagFrame;
                Frame activeHeroTagFrame(tagFramesImg, 16, 16);
                battleRes.activeHeroTagFrame = &activeHeroTagFrame;
+               SDL_Surface *smallTagFrameImg(IMG_Load("test-data/small-tag-frame.png"));
+               Frame smallTagFrame(smallTagFrameImg, 8, 16);
+               battleRes.smallHeroTagFrame = &smallTagFrame;
+               Frame lastSmallTagFrame(smallTagFrameImg, 8, 16, 1, 1, 0, 33);
+               battleRes.lastSmallHeroTagFrame = &lastSmallTagFrame;
+               battleRes.heroesBgColor = SDL_MapRGB(screen.Screen()->format, 0x18, 0x28, 0x31);
 
                SDL_Surface *gauges(IMG_Load("test-data/gauges.png"));
                Gauge healthGauge(gauges, 0, 16, 0, 0, 16, 6, 1, 6);
diff --git a/test-data/small-tag-frame.png b/test-data/small-tag-frame.png
new file mode 100644 (file)
index 0000000..3d8fbfb
Binary files /dev/null and b/test-data/small-tag-frame.png differ