# Add inputs and outputs from these tool invocations to the build variables
CPP_SRCS += \
+../src/common/Ikari.cpp \
../src/common/Inventory.cpp \
../src/common/Item.cpp \
../src/common/Spell.cpp
OBJS += \
+./src/common/Ikari.o \
./src/common/Inventory.o \
./src/common/Item.o \
./src/common/Spell.o
CPP_DEPS += \
+./src/common/Ikari.d \
./src/common/Inventory.d \
./src/common/Item.d \
./src/common/Spell.d
# Add inputs and outputs from these tool invocations to the build variables
CPP_SRCS += \
+../src/common/Ikari.cpp \
../src/common/Inventory.cpp \
../src/common/Item.cpp \
../src/common/Spell.cpp
OBJS += \
+./src/common/Ikari.o \
./src/common/Inventory.o \
./src/common/Item.o \
./src/common/Spell.o
CPP_DEPS += \
+./src/common/Ikari.d \
./src/common/Inventory.d \
./src/common/Item.d \
./src/common/Spell.d
--- /dev/null
+/*
+ * Ikari.cpp
+ *
+ * Created on: Aug 10, 2012
+ * Author: holy
+ */
+
+#include "Ikari.h"
+
+namespace common {
+
+Ikari::Ikari()
+: name("")
+, cost(0) {
+
+}
+
+}
--- /dev/null
+/*
+ * Ikari.h
+ *
+ * Created on: Aug 10, 2012
+ * Author: holy
+ */
+
+#ifndef COMMON_IKARI_H_
+#define COMMON_IKARI_H_
+
+#include "TargetingMode.h"
+
+namespace common {
+
+// TODO: looks like Ikari and Spell have _quite_ a lot in common…
+class Ikari {
+
+public:
+ Ikari();
+
+public:
+ const char *Name() const { return name; }
+ Uint8 Cost() const { return cost; }
+
+ TargetingMode &GetTargetingMode() { return targetingMode; }
+ const TargetingMode &GetTargetingMode() const { return targetingMode; }
+
+ // TODO: add missing ikari properties
+
+// temporary setters
+public:
+ void SetName(const char *n) { name = n; }
+ void SetCost(Uint8 c) { cost = c; }
+
+private:
+ const char *name;
+
+ Uint8 cost;
+ TargetingMode targetingMode;
+
+};
+
+}
+
+#endif /* COMMON_IKARI_H_ */
: name("")
, menuIcon(0)
, chestIcon(0)
+, ikari(0)
, value(0)
, properties(0)
namespace common {
+class Ikari;
+
class Item {
public:
bool HasChestIcon() const { return chestIcon; }
const graphics::Sprite *ChestIcon() const { return chestIcon; }
+ bool HasIkari() const { return ikari; }
+ const Ikari *GetIkari() const { return ikari; }
+
Uint16 Value() const { return value; }
bool CanEquipWeapon() const { return equipable & EQUIPPABLE_WEAPON; }
void SetName(const char *n) { name = n; }
void SetMenuIcon(const graphics::Sprite *icon) { menuIcon = icon; }
void SetUsableInBattle() { usability |= USABILITY_BATTLE; }
+ void SetIkari(const Ikari *i) { ikari = i; }
private:
enum Usability {
const char *name;
const graphics::Sprite *menuIcon;
const graphics::Sprite *chestIcon;
+ const Ikari *ikari;
Uint16 value;
Uint16 properties;