]> git.localhorst.tv Git - l2e.git/blobdiff - src/menu/Resources.cpp
added fallback for string resources
[l2e.git] / src / menu / Resources.cpp
index 14158f3b9ae2ce14dca093f3b41ea15d5a5637cf..f7df71e61ee31264f6393d6e456a06e6e114e7cc 100644 (file)
@@ -1,66 +1,79 @@
-/*
- * Resources.cpp
- *
- *  Created on: Oct 21, 2012
- *      Author: holy
- */
-
 #include "Resources.h"
 
+#include "../graphics/CharSelect.h"
+#include "../graphics/Font.h"
+#include "../graphics/Frame.h"
+#include "../graphics/Menu.h"
+#include "../graphics/Sprite.h"
+#include "../graphics/Texture.h"
+#include "../loader/Interpreter.h"
+#include "../loader/TypeDescription.h"
+
+using graphics::CharSelect;
+using graphics::Font;
+using graphics::Frame;
+using graphics::MenuProperties;
+using graphics::Sprite;
+using graphics::Texture;
+using loader::FieldDescription;
+using loader::Interpreter;
+using loader::TypeDescription;
+
 namespace menu {
 
 Resources::Resources()
 : menubg(0)
 , normalFont(0)
+, inactiveFont(0)
 , statusFont(0)
 
-, menuCursor(0)
-, menuActiveCursor(0)
-
 , statusLabels(0)
 , statusFrame(0)
 
 , mainMenuProperties(0)
-, mainMenuItemText(0)
-, mainMenuSpellText(0)
-, mainMenuCapsuleText(0)
-, mainMenuEquipmentText(0)
-, mainMenuStatusText(0)
-, mainMenuChangeText(0)
-, mainMenuConfigText(0)
-, mainMenuScenarioText(0)
-
-, mainMenuTimeText(0)
-, mainMenuGoldText(0)
+, mainMenuItemText("MISSING TRANSLATION")
+, mainMenuSpellText("MISSING TRANSLATION")
+, mainMenuCapsuleText("MISSING TRANSLATION")
+, mainMenuEquipmentText("MISSING TRANSLATION")
+, mainMenuStatusText("MISSING TRANSLATION")
+, mainMenuChangeText("MISSING TRANSLATION")
+, mainMenuConfigText("MISSING TRANSLATION")
+, mainMenuScenarioText("MISSING TRANSLATION")
+
+, mainMenuTimeText("MISSING TRANSLATION")
+, mainMenuGoldText("MISSING TRANSLATION")
 
 , heroCursor(0)
 , heroCursorBlinkTime(0)
 
-, noEquipmentText(0)
+, noEquipmentText("MISSING TRANSLATION")
 
 , shoulderNav(0)
 
-, atpLabel(0)
-, dfpLabel(0)
-, strLabel(0)
-, aglLabel(0)
-, intLabel(0)
-, gutLabel(0)
-, mgrLabel(0)
+, atpLabel("MISSING TRANSLATION")
+, dfpLabel("MISSING TRANSLATION")
+, strLabel("MISSING TRANSLATION")
+, aglLabel("MISSING TRANSLATION")
+, intLabel("MISSING TRANSLATION")
+, gutLabel("MISSING TRANSLATION")
+, mgrLabel("MISSING TRANSLATION")
 
-, ipLabel(0)
-, experienceLabel(0)
-, nextLevelLabel(0)
+, hpLabel("MISSING TRANSLATION")
+, ipLabel("MISSING TRANSLATION")
+, levelLabel("MISSING TRANSLATION")
+, experienceLabel("MISSING TRANSLATION")
+, nextLevelLabel("MISSING TRANSLATION")
 
 , statusMenuProperties(0)
 
-, nextLabel(0)
-, returnLabel(0)
+, nextLabel("MISSING TRANSLATION")
+, returnLabel("MISSING TRANSLATION")
 
 , itemMenuProperties(0)
-, itemMenuUseText(0)
-, itemMenuSortText(0)
-, itemMenuDropText(0)
+, itemMenuUseText("MISSING TRANSLATION")
+, itemMenuSortText("MISSING TRANSLATION")
+, itemMenuDropText("MISSING TRANSLATION")
+, itemMenuSelectText("MISSING TRANSLATION")
 
 , inventoryMenuProperties(0)
 
@@ -68,25 +81,196 @@ Resources::Resources()
 
 , equipmentActionMenuProperties(0)
 , equipmentMenuProperties(0)
-, equipMenuEquipLabel(0)
-, equipMenuStrongestLabel(0)
-, equipMenuRemoveLabel(0)
-, equipMenuRemoveAllLabel(0)
-, equipMenuDropLabel(0)
+, equipMenuEquipLabel("MISSING TRANSLATION")
+, equipMenuStrongestLabel("MISSING TRANSLATION")
+, equipMenuRemoveLabel("MISSING TRANSLATION")
+, equipMenuRemoveAllLabel("MISSING TRANSLATION")
+, equipMenuDropLabel("MISSING TRANSLATION")
 
 , configMenuProperties(0)
-, configMessageSpeedLabel(0)
-, configMessageSpeedFast(0)
-, configMessageSpeedNormal(0)
-, configMessageSpeedSlow(0)
-, configBattleCursorLabel(0)
-, configStatusCursorLabel(0)
-, configCursorClear(0)
-, configCursorMemory(0)
-, configMusicLabel(0)
-, configMusicStereo(0)
-, configMusicMono(0) {
+, configMessageSpeedLabel("MISSING TRANSLATION")
+, configMessageSpeedFast("MISSING TRANSLATION")
+, configMessageSpeedNormal("MISSING TRANSLATION")
+, configMessageSpeedSlow("MISSING TRANSLATION")
+, configBattleCursorLabel("MISSING TRANSLATION")
+, configStatusCursorLabel("MISSING TRANSLATION")
+, configCursorClear("MISSING TRANSLATION")
+, configCursorMemory("MISSING TRANSLATION")
+, configMusicLabel("MISSING TRANSLATION")
+, configMusicStereo("MISSING TRANSLATION")
+, configMusicMono("MISSING TRANSLATION")
+
+, scenarioMenuProperties(0)
+, scenarioMenuHeadline("MISSING TRANSLATION")
+
+, capsulebg(0)
+
+, capsuleMenuProperties(0)
+, capsuleFeedMenuProperties(0)
+
+, capsuleFeedLabel("MISSING TRANSLATION")
+, capsuleChangeLabel("MISSING TRANSLATION")
+, capsuleNameLabel("MISSING TRANSLATION")
+, capsuleClassLabel("MISSING TRANSLATION")
+, capsuleAlignmentLabel("MISSING TRANSLATION")
+, capsuleTribeLabel("MISSING TRANSLATION")
+, capsuleAttack1Label("MISSING TRANSLATION")
+, capsuleAttack2Label("MISSING TRANSLATION")
+, capsuleAttack3Label("MISSING TRANSLATION")
+, capsuleNoAttackText("MISSING TRANSLATION")
+, capsuleNotHungryText("MISSING TRANSLATION")
+
+, capsuleNameCharSelectTemplate(0)
+
+, capsuleSelectTopLeft(0)
+, capsuleSelectTopRight(0)
+, capsuleSelectTopRepeat(0)
+, capsuleSelectBottomLeft(0)
+, capsuleSelectBottomRight(0)
+, capsuleSelectBottomRepeat(0)
+, capsuleSelectLeftRepeat(0)
+, capsuleSelectRightRepeat(0)
+, capsuleSelectLadder(0)
+, capsuleSelectCursor(0)
+
+, capsuleAlignmentWheel(0)
+, capsuleAlignmentCursor(0)
+
+, capsuleGrowthLabel(0)
+, capsuleGrowthBar(0)
+, capsuleGrowthBarFilled(0)
+
+{ }
+
+
+void Resources::CreateTypeDescription() {
+       Resources r;
+
+       TypeDescription &td(TypeDescription::Create(TYPE_ID, "MenuResources"));
+       td.SetConstructor(&Construct);
+       td.SetSize(sizeof(Resources));
+
+       td.AddField("menubg", FieldDescription(((char *)&r.menubg) - ((char *)&r), Texture::TYPE_ID).SetReferenced().SetDescription("background texture for menus"));
+
+       td.AddField("normalFont", FieldDescription(((char *)&r.normalFont) - ((char *)&r), Font::TYPE_ID).SetReferenced().SetDescription("normal menu font"));
+       td.AddField("inactiveFont", FieldDescription(((char *)&r.inactiveFont) - ((char *)&r), Font::TYPE_ID).SetReferenced().SetDescription("inactive menu font"));
+       td.AddField("statusFont", FieldDescription(((char *)&r.statusFont) - ((char *)&r), Font::TYPE_ID).SetReferenced().SetDescription("status font"));
+
+       td.AddField("statusLabels", FieldDescription(((char *)&r.statusLabels) - ((char *)&r), Sprite::TYPE_ID).SetReferenced().SetDescription("labels for the hero status"));
+       td.AddField("statusFrame", FieldDescription(((char *)&r.statusFrame) - ((char *)&r), Frame::TYPE_ID).SetReferenced().SetDescription("frame for almost every menu"));
+
+       td.AddField("mainMenu", FieldDescription(((char *)&r.mainMenuProperties) - ((char *)&r), MenuProperties::TYPE_ID).SetReferenced().SetDescription("properties of the main menu"));
+       td.AddField("mainMenuItemText", FieldDescription(((char *)&r.mainMenuItemText) - ((char *)&r), Interpreter::STRING_ID).SetReferenced());
+       td.AddField("mainMenuSpellText", FieldDescription(((char *)&r.mainMenuSpellText) - ((char *)&r), Interpreter::STRING_ID).SetReferenced());
+       td.AddField("mainMenuCapsuleText", FieldDescription(((char *)&r.mainMenuCapsuleText) - ((char *)&r), Interpreter::STRING_ID).SetReferenced());
+       td.AddField("mainMenuEquipmentText", FieldDescription(((char *)&r.mainMenuEquipmentText) - ((char *)&r), Interpreter::STRING_ID).SetReferenced());
+       td.AddField("mainMenuStatusText", FieldDescription(((char *)&r.mainMenuStatusText) - ((char *)&r), Interpreter::STRING_ID).SetReferenced());
+       td.AddField("mainMenuChangeText", FieldDescription(((char *)&r.mainMenuChangeText) - ((char *)&r), Interpreter::STRING_ID).SetReferenced());
+       td.AddField("mainMenuConfigText", FieldDescription(((char *)&r.mainMenuConfigText) - ((char *)&r), Interpreter::STRING_ID).SetReferenced());
+       td.AddField("mainMenuScenarioText", FieldDescription(((char *)&r.mainMenuScenarioText) - ((char *)&r), Interpreter::STRING_ID).SetReferenced());
+
+       td.AddField("mainMenuTimeText", FieldDescription(((char *)&r.mainMenuTimeText) - ((char *)&r), Interpreter::STRING_ID).SetReferenced());
+       td.AddField("mainMenuGoldText", FieldDescription(((char *)&r.mainMenuGoldText) - ((char *)&r), Interpreter::STRING_ID).SetReferenced());
+
+       td.AddField("heroCursor", FieldDescription(((char *)&r.heroCursor) - ((char *)&r), Sprite::TYPE_ID).SetReferenced().SetDescription("cursor for selecting a hero"));
+       td.AddField("heroCursorBlinkTime", FieldDescription(((char *)&r.heroCursorBlinkTime) - ((char *)&r), Interpreter::NUMBER_ID).SetReferenced().SetDescription("blinking interval (half) for the hero cursor"));
+
+       td.AddField("noEquipmentText", FieldDescription(((char *)&r.noEquipmentText) - ((char *)&r), Interpreter::STRING_ID).SetReferenced());
+
+       td.AddField("shoulderNav", FieldDescription(((char *)&r.shoulderNav) - ((char *)&r), Sprite::TYPE_ID).SetReferenced().SetDescription("visual aid for the hero navigation via shoulder buttons in some sub menus"));
+
+       td.AddField("atpLabel", FieldDescription(((char *)&r.atpLabel) - ((char *)&r), Interpreter::STRING_ID).SetReferenced());
+       td.AddField("dfpLabel", FieldDescription(((char *)&r.dfpLabel) - ((char *)&r), Interpreter::STRING_ID).SetReferenced());
+       td.AddField("strLabel", FieldDescription(((char *)&r.strLabel) - ((char *)&r), Interpreter::STRING_ID).SetReferenced());
+       td.AddField("aglLabel", FieldDescription(((char *)&r.aglLabel) - ((char *)&r), Interpreter::STRING_ID).SetReferenced());
+       td.AddField("intLabel", FieldDescription(((char *)&r.intLabel) - ((char *)&r), Interpreter::STRING_ID).SetReferenced());
+       td.AddField("gutLabel", FieldDescription(((char *)&r.gutLabel) - ((char *)&r), Interpreter::STRING_ID).SetReferenced());
+       td.AddField("mgrLabel", FieldDescription(((char *)&r.mgrLabel) - ((char *)&r), Interpreter::STRING_ID).SetReferenced());
+
+       td.AddField("hpLabel", FieldDescription(((char *)&r.hpLabel) - ((char *)&r), Interpreter::STRING_ID).SetReferenced());
+       td.AddField("ipLabel", FieldDescription(((char *)&r.ipLabel) - ((char *)&r), Interpreter::STRING_ID).SetReferenced());
+       td.AddField("levelLabel", FieldDescription(((char *)&r.levelLabel) - ((char *)&r), Interpreter::STRING_ID).SetReferenced());
+       td.AddField("experienceLabel", FieldDescription(((char *)&r.experienceLabel) - ((char *)&r), Interpreter::STRING_ID).SetReferenced());
+       td.AddField("nextLevelLabel", FieldDescription(((char *)&r.nextLevelLabel) - ((char *)&r), Interpreter::STRING_ID).SetReferenced());
+
+       td.AddField("statusMenu", FieldDescription(((char *)&r.statusMenuProperties) - ((char *)&r), MenuProperties::TYPE_ID).SetReferenced().SetDescription("properties of the status menu"));
+
+       td.AddField("nextLabel", FieldDescription(((char *)&r.nextLabel) - ((char *)&r), Interpreter::STRING_ID).SetReferenced());
+       td.AddField("returnLabel", FieldDescription(((char *)&r.returnLabel) - ((char *)&r), Interpreter::STRING_ID).SetReferenced());
+
+       td.AddField("itemMenu", FieldDescription(((char *)&r.itemMenuProperties) - ((char *)&r), MenuProperties::TYPE_ID).SetReferenced().SetDescription("properties of the item menu"));
+       td.AddField("itemMenuUseText", FieldDescription(((char *)&r.itemMenuUseText) - ((char *)&r), Interpreter::STRING_ID).SetReferenced());
+       td.AddField("itemMenuSortText", FieldDescription(((char *)&r.itemMenuSortText) - ((char *)&r), Interpreter::STRING_ID).SetReferenced());
+       td.AddField("itemMenuDropText", FieldDescription(((char *)&r.itemMenuDropText) - ((char *)&r), Interpreter::STRING_ID).SetReferenced());
+       td.AddField("itemMenuSelectText", FieldDescription(((char *)&r.itemMenuSelectText) - ((char *)&r), Interpreter::STRING_ID).SetReferenced());
+
+       td.AddField("inventoryMenu", FieldDescription(((char *)&r.inventoryMenuProperties) - ((char *)&r), MenuProperties::TYPE_ID).SetReferenced().SetDescription("properties of the inventory menu"));
+       td.AddField("spellMenu", FieldDescription(((char *)&r.spellMenuProperties) - ((char *)&r), MenuProperties::TYPE_ID).SetReferenced().SetDescription("properties of the spell menu"));
+
+       td.AddField("equipmentActionMenu", FieldDescription(((char *)&r.equipmentActionMenuProperties) - ((char *)&r), MenuProperties::TYPE_ID).SetReferenced().SetDescription("properties of the equipment action menu (the lower one)"));
+       td.AddField("equipmentMenu", FieldDescription(((char *)&r.equipmentMenuProperties) - ((char *)&r), MenuProperties::TYPE_ID).SetReferenced().SetDescription("properties of the equipment menu (the one with the equipped items)"));
+       td.AddField("equipMenuEquipLabel", FieldDescription(((char *)&r.equipMenuEquipLabel) - ((char *)&r), Interpreter::STRING_ID).SetReferenced());
+       td.AddField("equipMenuStrongestLabel", FieldDescription(((char *)&r.equipMenuStrongestLabel) - ((char *)&r), Interpreter::STRING_ID).SetReferenced());
+       td.AddField("equipMenuRemoveLabel", FieldDescription(((char *)&r.equipMenuRemoveLabel) - ((char *)&r), Interpreter::STRING_ID).SetReferenced());
+       td.AddField("equipMenuRemoveAllLabel", FieldDescription(((char *)&r.equipMenuRemoveAllLabel) - ((char *)&r), Interpreter::STRING_ID).SetReferenced());
+       td.AddField("equipMenuDropLabel", FieldDescription(((char *)&r.equipMenuDropLabel) - ((char *)&r), Interpreter::STRING_ID).SetReferenced());
+
+       td.AddField("configMenu", FieldDescription(((char *)&r.configMenuProperties) - ((char *)&r), MenuProperties::TYPE_ID).SetReferenced().SetDescription("properties of the configuration menu"));
+       td.AddField("configMessageSpeedLabel", FieldDescription(((char *)&r.configMessageSpeedLabel) - ((char *)&r), Interpreter::STRING_ID).SetReferenced());
+       td.AddField("configMessageSpeedFast", FieldDescription(((char *)&r.configMessageSpeedFast) - ((char *)&r), Interpreter::STRING_ID).SetReferenced());
+       td.AddField("configMessageSpeedNormal", FieldDescription(((char *)&r.configMessageSpeedNormal) - ((char *)&r), Interpreter::STRING_ID).SetReferenced());
+       td.AddField("configMessageSpeedSlow", FieldDescription(((char *)&r.configMessageSpeedSlow) - ((char *)&r), Interpreter::STRING_ID).SetReferenced());
+       td.AddField("configBattleCursorLabel", FieldDescription(((char *)&r.configBattleCursorLabel) - ((char *)&r), Interpreter::STRING_ID).SetReferenced());
+       td.AddField("configStatusCursorLabel", FieldDescription(((char *)&r.configStatusCursorLabel) - ((char *)&r), Interpreter::STRING_ID).SetReferenced());
+       td.AddField("configCursorClear", FieldDescription(((char *)&r.configCursorClear) - ((char *)&r), Interpreter::STRING_ID).SetReferenced());
+       td.AddField("configCursorMemory", FieldDescription(((char *)&r.configCursorMemory) - ((char *)&r), Interpreter::STRING_ID).SetReferenced());
+       td.AddField("configMusicLabel", FieldDescription(((char *)&r.configMusicLabel) - ((char *)&r), Interpreter::STRING_ID).SetReferenced());
+       td.AddField("configMusicStereo", FieldDescription(((char *)&r.configMusicStereo) - ((char *)&r), Interpreter::STRING_ID).SetReferenced());
+       td.AddField("configMusicMono", FieldDescription(((char *)&r.configMusicMono) - ((char *)&r), Interpreter::STRING_ID).SetReferenced());
+
+       td.AddField("scenarioMenu", FieldDescription(((char *)&r.scenarioMenuProperties) - ((char *)&r), MenuProperties::TYPE_ID).SetReferenced().SetDescription("properties of the scenario menu"));
+       td.AddField("scenarioMenuHeadline", FieldDescription(((char *)&r.scenarioMenuHeadline) - ((char *)&r), Interpreter::STRING_ID).SetReferenced());
+
+       td.AddField("capsulebg", FieldDescription(((char *)&r.capsulebg) - ((char *)&r), Texture::TYPE_ID).SetReferenced().SetDescription("background texture for the capsule menus"));
+
+       td.AddField("capsuleMenu", FieldDescription(((char *)&r.capsuleMenuProperties) - ((char *)&r), MenuProperties::TYPE_ID).SetReferenced().SetDescription("properties of the capsule main menu (the bottom bar)"));
+       td.AddField("capsuleFeedMenu", FieldDescription(((char *)&r.capsuleFeedMenuProperties) - ((char *)&r), MenuProperties::TYPE_ID).SetReferenced().SetDescription("properties of the capsule feed menu (above the inventory)"));
+
+       td.AddField("capsuleFeedLabel", FieldDescription(((char *)&r.capsuleFeedLabel) - ((char *)&r), Interpreter::STRING_ID).SetReferenced());
+       td.AddField("capsuleChangeLabel", FieldDescription(((char *)&r.capsuleChangeLabel) - ((char *)&r), Interpreter::STRING_ID).SetReferenced());
+       td.AddField("capsuleNameLabel", FieldDescription(((char *)&r.capsuleNameLabel) - ((char *)&r), Interpreter::STRING_ID).SetReferenced());
+       td.AddField("capsuleClassLabel", FieldDescription(((char *)&r.capsuleClassLabel) - ((char *)&r), Interpreter::STRING_ID).SetReferenced());
+       td.AddField("capsuleAlignmentLabel", FieldDescription(((char *)&r.capsuleAlignmentLabel) - ((char *)&r), Interpreter::STRING_ID).SetReferenced());
+       td.AddField("capsuleTribeLabel", FieldDescription(((char *)&r.capsuleTribeLabel) - ((char *)&r), Interpreter::STRING_ID).SetReferenced());
+       td.AddField("capsuleAttack1Label", FieldDescription(((char *)&r.capsuleAttack1Label) - ((char *)&r), Interpreter::STRING_ID).SetReferenced());
+       td.AddField("capsuleAttack2Label", FieldDescription(((char *)&r.capsuleAttack2Label) - ((char *)&r), Interpreter::STRING_ID).SetReferenced());
+       td.AddField("capsuleAttack3Label", FieldDescription(((char *)&r.capsuleAttack3Label) - ((char *)&r), Interpreter::STRING_ID).SetReferenced());
+       td.AddField("capsuleNoAttackText", FieldDescription(((char *)&r.capsuleNoAttackText) - ((char *)&r), Interpreter::STRING_ID).SetReferenced());
+       td.AddField("capsuleNotHungryText", FieldDescription(((char *)&r.capsuleNotHungryText) - ((char *)&r), Interpreter::STRING_ID).SetReferenced());
+
+       td.AddField("capsuleNameSelect", FieldDescription(((char *)&r.capsuleNameCharSelectTemplate) - ((char *)&r), CharSelect::TYPE_ID).SetReferenced().SetDescription("properties of the letter array for changing the capsule name"));
+
+       td.AddField("capsuleSelectTopLeft", FieldDescription(((char *)&r.capsuleSelectTopLeft) - ((char *)&r), Sprite::TYPE_ID).SetReferenced());
+       td.AddField("capsuleSelectTopRight", FieldDescription(((char *)&r.capsuleSelectTopRight) - ((char *)&r), Sprite::TYPE_ID).SetReferenced());
+       td.AddField("capsuleSelectTopRepeat", FieldDescription(((char *)&r.capsuleSelectTopRepeat) - ((char *)&r), Sprite::TYPE_ID).SetReferenced());
+       td.AddField("capsuleSelectBottomLeft", FieldDescription(((char *)&r.capsuleSelectBottomLeft) - ((char *)&r), Sprite::TYPE_ID).SetReferenced());
+       td.AddField("capsuleSelectBottomRight", FieldDescription(((char *)&r.capsuleSelectBottomRight) - ((char *)&r), Sprite::TYPE_ID).SetReferenced());
+       td.AddField("capsuleSelectBottomRepeat", FieldDescription(((char *)&r.capsuleSelectBottomRepeat) - ((char *)&r), Sprite::TYPE_ID).SetReferenced());
+       td.AddField("capsuleSelectLeftRepeat", FieldDescription(((char *)&r.capsuleSelectLeftRepeat) - ((char *)&r), Texture::TYPE_ID).SetReferenced());
+       td.AddField("capsuleSelectRightRepeat", FieldDescription(((char *)&r.capsuleSelectRightRepeat) - ((char *)&r), Texture::TYPE_ID).SetReferenced());
+       td.AddField("capsuleSelectLadder", FieldDescription(((char *)&r.capsuleSelectLadder) - ((char *)&r), Sprite::TYPE_ID).SetReferenced());
+       td.AddField("capsuleSelectCursor", FieldDescription(((char *)&r.capsuleSelectCursor) - ((char *)&r), Sprite::TYPE_ID).SetReferenced());
+
+       td.AddField("capsuleAlignmentWheel", FieldDescription(((char *)&r.capsuleAlignmentWheel) - ((char *)&r), Sprite::TYPE_ID).SetReferenced());
+       td.AddField("capsuleAlignmentCursor", FieldDescription(((char *)&r.capsuleAlignmentCursor) - ((char *)&r), Sprite::TYPE_ID).SetReferenced());
+
+       td.AddField("capsuleGrowthLabel", FieldDescription(((char *)&r.capsuleGrowthLabel) - ((char *)&r), Sprite::TYPE_ID).SetReferenced());
+       td.AddField("capsuleGrowthBar", FieldDescription(((char *)&r.capsuleGrowthBar) - ((char *)&r), Sprite::TYPE_ID).SetReferenced());
+       td.AddField("capsuleGrowthBarFilled", FieldDescription(((char *)&r.capsuleGrowthBarFilled) - ((char *)&r), Sprite::TYPE_ID).SetReferenced());
+}
 
+void Resources::Construct(void *data) {
+       new (data) Resources;
 }
 
 }