summaryrefslogtreecommitdiff
path: root/src/gui/equipmentwindow.cpp
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2011-06-02 00:32:53 +0200
committerThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2011-06-02 16:41:47 +0200
commit4e27937924766948d7ff9200f04a37fe4d59018c (patch)
treec1f5c255192c85a82c77c2f8f916984e2b863c44 /src/gui/equipmentwindow.cpp
parentc2eab288ecc7d7c5e26d02ccecf285cbc0c218ed (diff)
downloadMana-4e27937924766948d7ff9200f04a37fe4d59018c.tar.gz
Mana-4e27937924766948d7ff9200f04a37fe4d59018c.tar.bz2
Mana-4e27937924766948d7ff9200f04a37fe4d59018c.tar.xz
Mana-4e27937924766948d7ff9200f04a37fe4d59018c.zip
Arbitrary code cleanups
Just some stuff that piles up while "looking" at the code, which eventually gets annoying to ignore while staging real changes. * Replaced a few NULL occurrences with 0 * Rely on default parameter for std::vector::resize. * Replaced a few "" with std::string() * Prefer .empty() to == "" * Removed a few comparisons with NULL * Don't check pointers before deleting them * Removed a bunch of redundant semicolons * Made some global variables static (local to their compilation unit) * Prefer prefix ++/-- operators to postfix versions when possible * Corrected location of a comment
Diffstat (limited to 'src/gui/equipmentwindow.cpp')
-rw-r--r--src/gui/equipmentwindow.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/gui/equipmentwindow.cpp b/src/gui/equipmentwindow.cpp
index 339cf717..c17b5e04 100644
--- a/src/gui/equipmentwindow.cpp
+++ b/src/gui/equipmentwindow.cpp
@@ -50,21 +50,6 @@
static const int BOX_WIDTH = 36;
static const int BOX_HEIGHT = 36;
-// Positions of the boxes, 2nd dimension is X and Y respectively.
-static const int boxPosition[][2] = {
- { 90, 40 }, // EQUIP_TORSO_SLOT
- { 8, 78 }, // EQUIP_GLOVES_SLOT
- { 70, 0 }, // EQUIP_HEAD_SLOT
- { 50, 208 }, // EQUIP_LEGS_SLOT
- { 90, 208 }, // EQUIP_FEET_SLOT
- { 8, 168 }, // EQUIP_RING1_SLOT
- { 129, 168 }, // EQUIP_RING2_SLOT
- { 50, 40 }, // EQUIP_NECK_SLOT
- { 8, 123 }, // EQUIP_FIGHT1_SLOT
- { 129, 123 }, // EQUIP_FIGHT2_SLOT
- { 129, 78 } // EQUIP_PROJECTILE_SLOT
-};
-
EquipmentWindow::EquipmentWindow(Equipment *equipment):
Window(_("Equipment")),
mEquipBox(0),
@@ -210,6 +195,21 @@ namespace TmwAthena {
TaEquipmentWindow::TaEquipmentWindow(Equipment *equipment):
EquipmentWindow(equipment)
{
+ // Positions of the boxes, 2nd dimension is X and Y respectively.
+ const int boxPosition[][2] = {
+ { 90, 40 }, // EQUIP_TORSO_SLOT
+ { 8, 78 }, // EQUIP_GLOVES_SLOT
+ { 70, 0 }, // EQUIP_HEAD_SLOT
+ { 50, 208 }, // EQUIP_LEGS_SLOT
+ { 90, 208 }, // EQUIP_FEET_SLOT
+ { 8, 168 }, // EQUIP_RING1_SLOT
+ { 129, 168 }, // EQUIP_RING2_SLOT
+ { 50, 40 }, // EQUIP_NECK_SLOT
+ { 8, 123 }, // EQUIP_FIGHT1_SLOT
+ { 129, 123 }, // EQUIP_FIGHT2_SLOT
+ { 129, 78 } // EQUIP_PROJECTILE_SLOT
+ };
+
// Load equipment boxes.
mEquipBox = new EquipBox[TmwAthena::EQUIP_VECTOR_END];
@@ -271,4 +271,4 @@ void TaEquipmentWindow::draw(gcn::Graphics *graphics)
}
}
-};
+} // namespace TmwAthena