mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-08-08 23:30:06 +00:00
move StringBank to BBGE
This commit is contained in:
parent
3a96c775db
commit
ce4f6a7d3e
26 changed files with 196 additions and 168 deletions
|
@ -61,7 +61,7 @@ AquariaSaveSlot::AquariaSaveSlot(int slot) : AquariaGuiQuad()
|
||||||
if (description.length() > 0)
|
if (description.length() > 0)
|
||||||
{
|
{
|
||||||
std::ostringstream os;
|
std::ostringstream os;
|
||||||
os << dsq->continuity.stringBank.get(2002) << " " << (slot+1) << " - " << description;
|
os << stringbank.get(2002) << " " << (slot+1) << " - " << description;
|
||||||
text1->setText(os.str());
|
text1->setText(os.str());
|
||||||
glowText->setText(os.str());
|
glowText->setText(os.str());
|
||||||
|
|
||||||
|
@ -70,7 +70,7 @@ AquariaSaveSlot::AquariaSaveSlot(int slot) : AquariaGuiQuad()
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
std::ostringstream os;
|
std::ostringstream os;
|
||||||
os << dsq->continuity.stringBank.get(2002) << " " << (slot+1) << " - " << dsq->continuity.stringBank.get(2003);
|
os << stringbank.get(2002) << " " << (slot+1) << " - " << stringbank.get(2003);
|
||||||
text1->setText(os.str());
|
text1->setText(os.str());
|
||||||
glowText->setText(os.str());
|
glowText->setText(os.str());
|
||||||
empty = true;
|
empty = true;
|
||||||
|
@ -278,104 +278,104 @@ static std::string getPrettySceneName_internal(const XMLElement *startData)
|
||||||
stringToLower(location);
|
stringToLower(location);
|
||||||
if (location.find("boilerroom")!=std::string::npos)
|
if (location.find("boilerroom")!=std::string::npos)
|
||||||
{
|
{
|
||||||
location = dsq->continuity.stringBank.get(1000);
|
location = stringbank.get(1000);
|
||||||
}
|
}
|
||||||
else if (location.find("seahorse")!=std::string::npos)
|
else if (location.find("seahorse")!=std::string::npos)
|
||||||
{
|
{
|
||||||
location = dsq->continuity.stringBank.get(1028);
|
location = stringbank.get(1028);
|
||||||
}
|
}
|
||||||
else if (location.find("whale")!=std::string::npos)
|
else if (location.find("whale")!=std::string::npos)
|
||||||
{
|
{
|
||||||
location = dsq->continuity.stringBank.get(1001);
|
location = stringbank.get(1001);
|
||||||
}
|
}
|
||||||
else if (location.find("frozenveil")!=std::string::npos)
|
else if (location.find("frozenveil")!=std::string::npos)
|
||||||
{
|
{
|
||||||
location = dsq->continuity.stringBank.get(1002);
|
location = stringbank.get(1002);
|
||||||
}
|
}
|
||||||
else if (location.find("bubblecave")!=std::string::npos)
|
else if (location.find("bubblecave")!=std::string::npos)
|
||||||
{
|
{
|
||||||
location = dsq->continuity.stringBank.get(1003);
|
location = stringbank.get(1003);
|
||||||
}
|
}
|
||||||
else if (location.find("energytemple")!=std::string::npos)
|
else if (location.find("energytemple")!=std::string::npos)
|
||||||
{
|
{
|
||||||
location = dsq->continuity.stringBank.get(1004);
|
location = stringbank.get(1004);
|
||||||
}
|
}
|
||||||
else if (location.find("trainingcave")!=std::string::npos)
|
else if (location.find("trainingcave")!=std::string::npos)
|
||||||
{
|
{
|
||||||
location = dsq->continuity.stringBank.get(1023);
|
location = stringbank.get(1023);
|
||||||
}
|
}
|
||||||
else if (location.find("vedhacave")!=std::string::npos)
|
else if (location.find("vedhacave")!=std::string::npos)
|
||||||
{
|
{
|
||||||
location = dsq->continuity.stringBank.get(1005);
|
location = stringbank.get(1005);
|
||||||
}
|
}
|
||||||
else if (location.find("naijacave")!=std::string::npos)
|
else if (location.find("naijacave")!=std::string::npos)
|
||||||
{
|
{
|
||||||
location = dsq->continuity.stringBank.get(1006);
|
location = stringbank.get(1006);
|
||||||
}
|
}
|
||||||
else if (location.find("songcave")!=std::string::npos)
|
else if (location.find("songcave")!=std::string::npos)
|
||||||
{
|
{
|
||||||
location = dsq->continuity.stringBank.get(1007);
|
location = stringbank.get(1007);
|
||||||
}
|
}
|
||||||
else if (location.find("mainarea")!=std::string::npos)
|
else if (location.find("mainarea")!=std::string::npos)
|
||||||
{
|
{
|
||||||
location = dsq->continuity.stringBank.get(1008);
|
location = stringbank.get(1008);
|
||||||
}
|
}
|
||||||
else if (location.find("openwater")!=std::string::npos)
|
else if (location.find("openwater")!=std::string::npos)
|
||||||
{
|
{
|
||||||
location = dsq->continuity.stringBank.get(1009);
|
location = stringbank.get(1009);
|
||||||
}
|
}
|
||||||
else if (location.find("forest")!=std::string::npos
|
else if (location.find("forest")!=std::string::npos
|
||||||
|| location.find("tree")!=std::string::npos)
|
|| location.find("tree")!=std::string::npos)
|
||||||
{
|
{
|
||||||
location = dsq->continuity.stringBank.get(1010);
|
location = stringbank.get(1010);
|
||||||
}
|
}
|
||||||
else if (location.find("mithalas")!=std::string::npos)
|
else if (location.find("mithalas")!=std::string::npos)
|
||||||
{
|
{
|
||||||
location = dsq->continuity.stringBank.get(1011);
|
location = stringbank.get(1011);
|
||||||
}
|
}
|
||||||
else if (location.find("cathedral")!=std::string::npos)
|
else if (location.find("cathedral")!=std::string::npos)
|
||||||
{
|
{
|
||||||
location = dsq->continuity.stringBank.get(1012);
|
location = stringbank.get(1012);
|
||||||
}
|
}
|
||||||
else if (location.find("suntemple")!=std::string::npos || location.find("sunworm")!=std::string::npos)
|
else if (location.find("suntemple")!=std::string::npos || location.find("sunworm")!=std::string::npos)
|
||||||
{
|
{
|
||||||
location = dsq->continuity.stringBank.get(1013);
|
location = stringbank.get(1013);
|
||||||
}
|
}
|
||||||
else if (location.find("veil")!=std::string::npos)
|
else if (location.find("veil")!=std::string::npos)
|
||||||
{
|
{
|
||||||
location = dsq->continuity.stringBank.get(1014);
|
location = stringbank.get(1014);
|
||||||
}
|
}
|
||||||
else if (location.find("abyss")!=std::string::npos)
|
else if (location.find("abyss")!=std::string::npos)
|
||||||
{
|
{
|
||||||
location = dsq->continuity.stringBank.get(1015);
|
location = stringbank.get(1015);
|
||||||
}
|
}
|
||||||
else if (location.find("sunkencity")!=std::string::npos)
|
else if (location.find("sunkencity")!=std::string::npos)
|
||||||
{
|
{
|
||||||
location = dsq->continuity.stringBank.get(1016);
|
location = stringbank.get(1016);
|
||||||
}
|
}
|
||||||
else if (location.find("fishcave")!=std::string::npos)
|
else if (location.find("fishcave")!=std::string::npos)
|
||||||
{
|
{
|
||||||
location = dsq->continuity.stringBank.get(1017);
|
location = stringbank.get(1017);
|
||||||
}
|
}
|
||||||
else if (location.find("octocave")!=std::string::npos)
|
else if (location.find("octocave")!=std::string::npos)
|
||||||
{
|
{
|
||||||
location = dsq->continuity.stringBank.get(1018);
|
location = stringbank.get(1018);
|
||||||
}
|
}
|
||||||
else if (location.find("icecave")!=std::string::npos)
|
else if (location.find("icecave")!=std::string::npos)
|
||||||
{
|
{
|
||||||
location = dsq->continuity.stringBank.get(1019);
|
location = stringbank.get(1019);
|
||||||
}
|
}
|
||||||
else if (location.find("secret")!=std::string::npos)
|
else if (location.find("secret")!=std::string::npos)
|
||||||
{
|
{
|
||||||
location = dsq->continuity.stringBank.get(1020);
|
location = stringbank.get(1020);
|
||||||
}
|
}
|
||||||
else if (location.find("final")!=std::string::npos)
|
else if (location.find("final")!=std::string::npos)
|
||||||
{
|
{
|
||||||
location = dsq->continuity.stringBank.get(1021);
|
location = stringbank.get(1021);
|
||||||
}
|
}
|
||||||
else if (location.find("licave")!=std::string::npos)
|
else if (location.find("licave")!=std::string::npos)
|
||||||
{
|
{
|
||||||
location = dsq->continuity.stringBank.get(1029);
|
location = stringbank.get(1029);
|
||||||
}
|
}
|
||||||
return location;
|
return location;
|
||||||
}
|
}
|
||||||
|
|
|
@ -3379,7 +3379,7 @@ void Avatar::lockToWall()
|
||||||
|
|
||||||
if (!dsq->game->isControlHint()){
|
if (!dsq->game->isControlHint()){
|
||||||
dsq->continuity.setFlag("lockedToWall", 1);
|
dsq->continuity.setFlag("lockedToWall", 1);
|
||||||
dsq->game->setControlHint(dsq->continuity.stringBank.get(13), 1, 0, 0, 6, "", true);
|
dsq->game->setControlHint(stringbank.get(13), 1, 0, 0, 6, "", true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -460,95 +460,95 @@ std::string Continuity::getIEString(IngredientData *data, size_t i)
|
||||||
if (fx.magnitude > 0)
|
if (fx.magnitude > 0)
|
||||||
{
|
{
|
||||||
std::ostringstream os;
|
std::ostringstream os;
|
||||||
os << dsq->continuity.stringBank.get(200) << " ";
|
os << stringbank.get(200) << " ";
|
||||||
os << dsq->continuity.stringBank.get(100) << " ";
|
os << stringbank.get(100) << " ";
|
||||||
os << fx.magnitude;
|
os << fx.magnitude;
|
||||||
return os.str();
|
return os.str();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
std::ostringstream os;
|
std::ostringstream os;
|
||||||
os << dsq->continuity.stringBank.get(200) << " ";
|
os << stringbank.get(200) << " ";
|
||||||
os << dsq->continuity.stringBank.get(101) << " ";
|
os << stringbank.get(101) << " ";
|
||||||
os << fabsf(fx.magnitude);
|
os << fabsf(fx.magnitude);
|
||||||
return os.str();
|
return os.str();
|
||||||
}
|
}
|
||||||
// break;
|
// break;
|
||||||
case IET_MAXHP:
|
case IET_MAXHP:
|
||||||
return dsq->continuity.stringBank.get(201);
|
return stringbank.get(201);
|
||||||
// break;
|
// break;
|
||||||
case IET_DEFENSE:
|
case IET_DEFENSE:
|
||||||
os << dsq->continuity.stringBank.get(202);
|
os << stringbank.get(202);
|
||||||
os << " " << fx.magnitude << " " << dsq->continuity.stringBank.get(205) << " " << defenseTime << " " << dsq->continuity.stringBank.get(203);
|
os << " " << fx.magnitude << " " << stringbank.get(205) << " " << defenseTime << " " << stringbank.get(203);
|
||||||
return os.str();
|
return os.str();
|
||||||
// break;
|
// break;
|
||||||
case IET_SPEED:
|
case IET_SPEED:
|
||||||
os << dsq->continuity.stringBank.get(204) << " " << fx.magnitude;
|
os << stringbank.get(204) << " " << fx.magnitude;
|
||||||
os << " " << dsq->continuity.stringBank.get(205) << " " << speedTime << " " << dsq->continuity.stringBank.get(203);
|
os << " " << stringbank.get(205) << " " << speedTime << " " << stringbank.get(203);
|
||||||
return os.str();
|
return os.str();
|
||||||
// break;
|
// break;
|
||||||
case IET_REGEN:
|
case IET_REGEN:
|
||||||
os << dsq->continuity.stringBank.get(206) << " " << fx.magnitude;
|
os << stringbank.get(206) << " " << fx.magnitude;
|
||||||
return os.str();
|
return os.str();
|
||||||
// break;
|
// break;
|
||||||
case IET_TRIP:
|
case IET_TRIP:
|
||||||
return dsq->continuity.stringBank.get(207);
|
return stringbank.get(207);
|
||||||
// break;
|
// break;
|
||||||
case IET_EAT:
|
case IET_EAT:
|
||||||
return dsq->continuity.stringBank.get(208);
|
return stringbank.get(208);
|
||||||
// break;
|
// break;
|
||||||
case IET_BITE:
|
case IET_BITE:
|
||||||
os << dsq->continuity.stringBank.get(209);
|
os << stringbank.get(209);
|
||||||
os << " " << dsq->continuity.stringBank.get(205) << " " << biteTime << " " << dsq->continuity.stringBank.get(203);
|
os << " " << stringbank.get(205) << " " << biteTime << " " << stringbank.get(203);
|
||||||
return os.str();
|
return os.str();
|
||||||
// break;
|
// break;
|
||||||
case IET_FISHPOISON:
|
case IET_FISHPOISON:
|
||||||
os << dsq->continuity.stringBank.get(217);
|
os << stringbank.get(217);
|
||||||
os << " " << dsq->continuity.stringBank.get(205) << " " << fishPoisonTime << " " << dsq->continuity.stringBank.get(203);
|
os << " " << stringbank.get(205) << " " << fishPoisonTime << " " << stringbank.get(203);
|
||||||
return os.str();
|
return os.str();
|
||||||
// break;
|
// break;
|
||||||
case IET_INVINCIBLE:
|
case IET_INVINCIBLE:
|
||||||
os << dsq->continuity.stringBank.get(210);
|
os << stringbank.get(210);
|
||||||
os << " " << dsq->continuity.stringBank.get(205) << " " << (fx.magnitude*5) << " " << dsq->continuity.stringBank.get(203);
|
os << " " << stringbank.get(205) << " " << (fx.magnitude*5) << " " << stringbank.get(203);
|
||||||
return os.str();
|
return os.str();
|
||||||
// break;
|
// break;
|
||||||
case IET_ENERGY:
|
case IET_ENERGY:
|
||||||
os << dsq->continuity.stringBank.get(211) << " " << fx.magnitude;
|
os << stringbank.get(211) << " " << fx.magnitude;
|
||||||
os << " " << dsq->continuity.stringBank.get(205) << " " << energyTime << " " << dsq->continuity.stringBank.get(203);
|
os << " " << stringbank.get(205) << " " << energyTime << " " << stringbank.get(203);
|
||||||
return os.str();
|
return os.str();
|
||||||
// break;
|
// break;
|
||||||
case IET_BLIND:
|
case IET_BLIND:
|
||||||
return dsq->continuity.stringBank.get(212);
|
return stringbank.get(212);
|
||||||
// break;
|
// break;
|
||||||
case IET_POISON:
|
case IET_POISON:
|
||||||
if (fx.magnitude < 0)
|
if (fx.magnitude < 0)
|
||||||
return dsq->continuity.stringBank.get(213);
|
return stringbank.get(213);
|
||||||
else
|
else
|
||||||
return dsq->continuity.stringBank.get(214);
|
return stringbank.get(214);
|
||||||
// break;
|
// break;
|
||||||
case IET_YUM:
|
case IET_YUM:
|
||||||
return dsq->continuity.stringBank.get(215);
|
return stringbank.get(215);
|
||||||
// break;
|
// break;
|
||||||
case IET_WEB:
|
case IET_WEB:
|
||||||
os << dsq->continuity.stringBank.get(219);
|
os << stringbank.get(219);
|
||||||
os << " " << dsq->continuity.stringBank.get(205) << " " << webTime << " " << dsq->continuity.stringBank.get(203);
|
os << " " << stringbank.get(205) << " " << webTime << " " << stringbank.get(203);
|
||||||
return os.str();
|
return os.str();
|
||||||
// break;
|
// break;
|
||||||
case IET_ALLSTATUS:
|
case IET_ALLSTATUS:
|
||||||
return dsq->continuity.stringBank.get(218);
|
return stringbank.get(218);
|
||||||
// break;
|
// break;
|
||||||
case IET_PETPOWER:
|
case IET_PETPOWER:
|
||||||
os << dsq->continuity.stringBank.get(216);
|
os << stringbank.get(216);
|
||||||
os << " " << dsq->continuity.stringBank.get(205) << " " << petPowerTime << " " << dsq->continuity.stringBank.get(203);
|
os << " " << stringbank.get(205) << " " << petPowerTime << " " << stringbank.get(203);
|
||||||
return os.str();
|
return os.str();
|
||||||
// break;
|
// break;
|
||||||
case IET_LIGHT:
|
case IET_LIGHT:
|
||||||
os << dsq->continuity.stringBank.get(220);
|
os << stringbank.get(220);
|
||||||
os << " " << dsq->continuity.stringBank.get(205) << " " << lightTime << " " << dsq->continuity.stringBank.get(203);
|
os << " " << stringbank.get(205) << " " << lightTime << " " << stringbank.get(203);
|
||||||
return os.str();
|
return os.str();
|
||||||
// break;
|
// break;
|
||||||
case IET_LI:
|
case IET_LI:
|
||||||
return dsq->continuity.stringBank.get(227);
|
return stringbank.get(227);
|
||||||
// break;
|
// break;
|
||||||
case IET_SCRIPT:
|
case IET_SCRIPT:
|
||||||
if(dsq->game->cookingScript)
|
if(dsq->game->cookingScript)
|
||||||
|
@ -3389,7 +3389,7 @@ GemData *Continuity::pickupGem(std::string name, bool effects)
|
||||||
if (!getFlag("tokenHint"))
|
if (!getFlag("tokenHint"))
|
||||||
{
|
{
|
||||||
setFlag("tokenHint", 1);
|
setFlag("tokenHint", 1);
|
||||||
dsq->game->setControlHint(dsq->continuity.stringBank.get(4), false, false, false, 8);
|
dsq->game->setControlHint(stringbank.get(4), false, false, false, 8);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -3466,7 +3466,7 @@ void Continuity::reset()
|
||||||
|
|
||||||
loadTreasureData();
|
loadTreasureData();
|
||||||
|
|
||||||
stringBank.load();
|
dsq->loadStringBank();
|
||||||
|
|
||||||
gems.clear();
|
gems.clear();
|
||||||
beacons.clear();
|
beacons.clear();
|
||||||
|
|
|
@ -7,7 +7,6 @@
|
||||||
#include "StatsAndAchievements.h"
|
#include "StatsAndAchievements.h"
|
||||||
#include "GameEnums.h"
|
#include "GameEnums.h"
|
||||||
#include "WorldMap.h"
|
#include "WorldMap.h"
|
||||||
#include "StringBank.h"
|
|
||||||
|
|
||||||
namespace tinyxml2 { class XMLDocument; }
|
namespace tinyxml2 { class XMLDocument; }
|
||||||
|
|
||||||
|
@ -258,8 +257,6 @@ public:
|
||||||
|
|
||||||
WorldMap worldMap;
|
WorldMap worldMap;
|
||||||
|
|
||||||
StringBank stringBank;
|
|
||||||
|
|
||||||
TreasureData treasureData;
|
TreasureData treasureData;
|
||||||
|
|
||||||
void loadTreasureData();
|
void loadTreasureData();
|
||||||
|
|
|
@ -502,7 +502,7 @@ void DSQ::debugMenu()
|
||||||
{
|
{
|
||||||
core->frameOutputMode = false;
|
core->frameOutputMode = false;
|
||||||
dsq->game->togglePause(true);
|
dsq->game->togglePause(true);
|
||||||
std::string s = dsq->getUserInputString(dsq->continuity.stringBank.get(2012), "");
|
std::string s = dsq->getUserInputString(stringbank.get(2012), "");
|
||||||
stringToUpper(s);
|
stringToUpper(s);
|
||||||
|
|
||||||
|
|
||||||
|
@ -658,7 +658,7 @@ void DSQ::debugMenu()
|
||||||
{
|
{
|
||||||
std::ostringstream os;
|
std::ostringstream os;
|
||||||
os << dsq->game->avatar->health;
|
os << dsq->game->avatar->health;
|
||||||
std::istringstream is(dsq->getUserInputString(dsq->continuity.stringBank.get(2013), os.str()));
|
std::istringstream is(dsq->getUserInputString(stringbank.get(2013), os.str()));
|
||||||
float h = 0;
|
float h = 0;
|
||||||
is >> h;
|
is >> h;
|
||||||
dsq->game->avatar->health = h;
|
dsq->game->avatar->health = h;
|
||||||
|
@ -743,7 +743,7 @@ void DSQ::setVersionLabelText()
|
||||||
#ifdef AQUARIA_OVERRIDE_VERSION_STRING
|
#ifdef AQUARIA_OVERRIDE_VERSION_STRING
|
||||||
std::string overrideText = AQUARIA_OVERRIDE_VERSION_STRING;
|
std::string overrideText = AQUARIA_OVERRIDE_VERSION_STRING;
|
||||||
if(user.system.allowDangerousScriptFunctions)
|
if(user.system.allowDangerousScriptFunctions)
|
||||||
overrideText += continuity.stringBank.get(2050);
|
overrideText += stringbank.get(2050);
|
||||||
versionLabel->setText(overrideText);
|
versionLabel->setText(overrideText);
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
|
@ -780,7 +780,7 @@ void DSQ::setVersionLabelText()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if(user.system.allowDangerousScriptFunctions)
|
if(user.system.allowDangerousScriptFunctions)
|
||||||
os << continuity.stringBank.get(2050);
|
os << stringbank.get(2050);
|
||||||
|
|
||||||
versionLabel->setText(os.str());
|
versionLabel->setText(os.str());
|
||||||
}
|
}
|
||||||
|
@ -838,7 +838,7 @@ This build is not yet final, and as such there are a couple things lacking. They
|
||||||
// steam gets inited in here
|
// steam gets inited in here
|
||||||
Core::init();
|
Core::init();
|
||||||
|
|
||||||
continuity.stringBank.load();
|
loadStringBank();
|
||||||
|
|
||||||
vars = &v;
|
vars = &v;
|
||||||
v.load();
|
v.load();
|
||||||
|
@ -1036,8 +1036,6 @@ This build is not yet final, and as such there are a couple things lacking. They
|
||||||
|
|
||||||
loadBit(LOAD_FONTS);
|
loadBit(LOAD_FONTS);
|
||||||
|
|
||||||
dsq->continuity.stringBank.load();
|
|
||||||
|
|
||||||
setTexturePointers();
|
setTexturePointers();
|
||||||
|
|
||||||
cursor = new Quad;
|
cursor = new Quad;
|
||||||
|
@ -1158,14 +1156,14 @@ This build is not yet final, and as such there are a couple things lacking. They
|
||||||
addRenderObject(cutscene_bg, LR_SUBTITLES);
|
addRenderObject(cutscene_bg, LR_SUBTITLES);
|
||||||
|
|
||||||
cutscene_text = new BitmapText(&dsq->font);
|
cutscene_text = new BitmapText(&dsq->font);
|
||||||
cutscene_text->setText(dsq->continuity.stringBank.get(2004));
|
cutscene_text->setText(stringbank.get(2004));
|
||||||
cutscene_text->position = Vector(400,300-16);
|
cutscene_text->position = Vector(400,300-16);
|
||||||
cutscene_text->alpha.x = 0;
|
cutscene_text->alpha.x = 0;
|
||||||
cutscene_text->followCamera = 1;
|
cutscene_text->followCamera = 1;
|
||||||
addRenderObject(cutscene_text, LR_SUBTITLES);
|
addRenderObject(cutscene_text, LR_SUBTITLES);
|
||||||
|
|
||||||
cutscene_text2 = new BitmapText(&dsq->smallFont);
|
cutscene_text2 = new BitmapText(&dsq->smallFont);
|
||||||
cutscene_text2->setText(dsq->continuity.stringBank.get(2005));
|
cutscene_text2->setText(stringbank.get(2005));
|
||||||
cutscene_text2->position = Vector(400,300+10);
|
cutscene_text2->position = Vector(400,300+10);
|
||||||
cutscene_text2->alpha.x = 0;
|
cutscene_text2->alpha.x = 0;
|
||||||
cutscene_text2->followCamera = 1;
|
cutscene_text2->followCamera = 1;
|
||||||
|
@ -1567,7 +1565,7 @@ int DSQ::getEntityLayerToLayer(int lcode)
|
||||||
|
|
||||||
void DSQ::setStory()
|
void DSQ::setStory()
|
||||||
{
|
{
|
||||||
std::string flagString = getUserInputString(dsq->continuity.stringBank.get(2014), "0");
|
std::string flagString = getUserInputString(stringbank.get(2014), "0");
|
||||||
int flag = 0;
|
int flag = 0;
|
||||||
std::istringstream is(flagString);
|
std::istringstream is(flagString);
|
||||||
is >> flag;
|
is >> flag;
|
||||||
|
@ -1575,7 +1573,7 @@ void DSQ::setStory()
|
||||||
core->run(0.2f);
|
core->run(0.2f);
|
||||||
std::ostringstream os;
|
std::ostringstream os;
|
||||||
os << dsq->continuity.getFlag(flag);
|
os << dsq->continuity.getFlag(flag);
|
||||||
flagString = getUserInputString(dsq->continuity.stringBank.get(2015), os.str());
|
flagString = getUserInputString(stringbank.get(2015), os.str());
|
||||||
int value = 0;
|
int value = 0;
|
||||||
std::istringstream is2(flagString);
|
std::istringstream is2(flagString);
|
||||||
is2 >> value;
|
is2 >> value;
|
||||||
|
@ -2574,7 +2572,7 @@ void DSQ::clearModSelector()
|
||||||
void DSQ::updateSaveSlotPageCount()
|
void DSQ::updateSaveSlotPageCount()
|
||||||
{
|
{
|
||||||
std::ostringstream os;
|
std::ostringstream os;
|
||||||
os << dsq->continuity.stringBank.get(2006) << " " << user.data.savePage+1 << "/" << maxPages+1;
|
os << stringbank.get(2006) << " " << user.data.savePage+1 << "/" << maxPages+1;
|
||||||
saveSlotPageCount->setText(os.str());
|
saveSlotPageCount->setText(os.str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2667,9 +2665,9 @@ void DSQ::createSaveSlots(SaveSlotMode ssm)
|
||||||
|
|
||||||
BitmapText *txt = new BitmapText(&dsq->font);
|
BitmapText *txt = new BitmapText(&dsq->font);
|
||||||
if (ssm == SSM_LOAD)
|
if (ssm == SSM_LOAD)
|
||||||
txt->setText(continuity.stringBank.get(2001));
|
txt->setText(stringbank.get(2001));
|
||||||
else
|
else
|
||||||
txt->setText(continuity.stringBank.get(2000));
|
txt->setText(stringbank.get(2000));
|
||||||
txt->position = Vector(230, 68);
|
txt->position = Vector(230, 68);
|
||||||
txt->followCamera = 1;
|
txt->followCamera = 1;
|
||||||
addRenderObject(txt, LR_MENU);
|
addRenderObject(txt, LR_MENU);
|
||||||
|
@ -4539,3 +4537,30 @@ void DSQ::importActionButtons()
|
||||||
abs->import(as);
|
abs->import(as);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DSQ::loadStringBank()
|
||||||
|
{
|
||||||
|
stringbank.clear();
|
||||||
|
|
||||||
|
// First, load the default string banks
|
||||||
|
stringbank.load("data/stringbank.txt");
|
||||||
|
if (mod.isActive())
|
||||||
|
stringbank.load(mod.getPath() + "stringbank.txt");
|
||||||
|
|
||||||
|
// Then, load localized ones. If some entries in these are missing, the default for each is taken.
|
||||||
|
std::string fname = localisePath("data/stringbank.txt");
|
||||||
|
stringbank.load(fname);
|
||||||
|
|
||||||
|
if (mod.isActive()) {
|
||||||
|
fname = localisePath(mod.getPath() + "stringbank.txt", mod.getPath());
|
||||||
|
stringbank.load(fname);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(stringbank.empty())
|
||||||
|
exit_error("Failed to load data/stringbank.txt");
|
||||||
|
|
||||||
|
|
||||||
|
// ADD DEFAULTS
|
||||||
|
|
||||||
|
stringbank.addDefault(2153, "--");
|
||||||
|
}
|
||||||
|
|
|
@ -402,6 +402,7 @@ public:
|
||||||
|
|
||||||
Mod mod;
|
Mod mod;
|
||||||
|
|
||||||
|
void loadStringBank();
|
||||||
void loadMods();
|
void loadMods();
|
||||||
void applyPatches();
|
void applyPatches();
|
||||||
void refreshResourcesForPatch(const std::string& name);
|
void refreshResourcesForPatch(const std::string& name);
|
||||||
|
|
|
@ -126,7 +126,7 @@ void Demo::update(float dt)
|
||||||
if (getQuitKey())
|
if (getQuitKey())
|
||||||
{
|
{
|
||||||
toggleRecord(false);
|
toggleRecord(false);
|
||||||
dsq->centerMessage(dsq->continuity.stringBank.get(2010));
|
dsq->centerMessage(stringbank.get(2010));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (mode == DEMOMODE_PLAYBACK)
|
else if (mode == DEMOMODE_PLAYBACK)
|
||||||
|
@ -159,7 +159,7 @@ void Demo::update(float dt)
|
||||||
|
|
||||||
if (getQuitKey() || (!frames.empty() && frame >= frames.size())) {
|
if (getQuitKey() || (!frames.empty() && frame >= frames.size())) {
|
||||||
togglePlayback(false);
|
togglePlayback(false);
|
||||||
dsq->centerMessage(dsq->continuity.stringBank.get(2011));
|
dsq->centerMessage(stringbank.get(2011));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -82,7 +82,7 @@ Ingredient *Game::getNearestIngredient(const Vector &pos, float radius)
|
||||||
return returnIngredient;
|
return returnIngredient;
|
||||||
}
|
}
|
||||||
|
|
||||||
Entity *Game::getNearestEntity(const Vector &pos, float radius, Entity *ignore, EntityType et, DamageType dt, unsigned lrStart, unsigned lrEnd)
|
Entity *Game::getNearestEntity(const Vector &pos, float radius, Entity *ignore, EntityType et, DamageType dt, int lrStart, int lrEnd)
|
||||||
{
|
{
|
||||||
int sqrRadius = radius*radius;
|
int sqrRadius = radius*radius;
|
||||||
Entity *closest = 0;
|
Entity *closest = 0;
|
||||||
|
@ -833,7 +833,7 @@ void Game::loadEntityTypeList()
|
||||||
std::string line;
|
std::string line;
|
||||||
if(!in)
|
if(!in)
|
||||||
{
|
{
|
||||||
exit_error(dsq->continuity.stringBank.get(2008).c_str());
|
exit_error(stringbank.get(2008).c_str());
|
||||||
}
|
}
|
||||||
while (std::getline(in, line))
|
while (std::getline(in, line))
|
||||||
{
|
{
|
||||||
|
@ -3609,7 +3609,7 @@ void Game::toggleHelpScreen(bool on, const std::string &label)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// !!! FIXME: this is such a hack.
|
// !!! FIXME: this is such a hack.
|
||||||
data += "\n\n" + dsq->continuity.stringBank.get(2032) + "\n\n";
|
data += "\n\n" + stringbank.get(2032) + "\n\n";
|
||||||
dsq->continuity.statsAndAchievements->appendStringData(data);
|
dsq->continuity.statsAndAchievements->appendStringData(data);
|
||||||
|
|
||||||
helpBG = new Quad;
|
helpBG = new Quad;
|
||||||
|
@ -5253,7 +5253,7 @@ void Game::learnedRecipe(Recipe *r, bool effects)
|
||||||
if (nocasecmp(dsq->getTopStateData()->name,"Game")==0 && !applyingState)
|
if (nocasecmp(dsq->getTopStateData()->name,"Game")==0 && !applyingState)
|
||||||
{
|
{
|
||||||
std::ostringstream os;
|
std::ostringstream os;
|
||||||
os << dsq->continuity.stringBank.get(23) << " " << r->resultDisplayName << " " << dsq->continuity.stringBank.get(24);
|
os << stringbank.get(23) << " " << r->resultDisplayName << " " << stringbank.get(24);
|
||||||
IngredientData *data = dsq->continuity.getIngredientDataByName(r->result);
|
IngredientData *data = dsq->continuity.getIngredientDataByName(r->result);
|
||||||
if (data)
|
if (data)
|
||||||
{
|
{
|
||||||
|
|
|
@ -229,7 +229,7 @@ public:
|
||||||
void spawnIngredientFromEntity(Entity *ent, IngredientData *data);
|
void spawnIngredientFromEntity(Entity *ent, IngredientData *data);
|
||||||
|
|
||||||
Ingredient *getNearestIngredient(const Vector &pos, float radius);
|
Ingredient *getNearestIngredient(const Vector &pos, float radius);
|
||||||
Entity *getNearestEntity(const Vector &pos, float radius, Entity *ignore = 0, EntityType et=ET_NOTYPE, DamageType dt=DT_NONE, unsigned lrStart=-1, unsigned lrEnd=-1);
|
Entity *getNearestEntity(const Vector &pos, float radius, Entity *ignore = 0, EntityType et=ET_NOTYPE, DamageType dt=DT_NONE, int lrStart=-1, int lrEnd=-1);
|
||||||
|
|
||||||
Script *cookingScript;
|
Script *cookingScript;
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@ void GameplayVariables::load()
|
||||||
InStream inFile("data/variables.txt");
|
InStream inFile("data/variables.txt");
|
||||||
if(!inFile)
|
if(!inFile)
|
||||||
{
|
{
|
||||||
exit_error(dsq->continuity.stringBank.get(2017));
|
exit_error(stringbank.get(2017));
|
||||||
}
|
}
|
||||||
std::string s;
|
std::string s;
|
||||||
inFile >> s >> maxSlowSwimSpeed;
|
inFile >> s >> maxSlowSwimSpeed;
|
||||||
|
|
|
@ -867,7 +867,7 @@ void TreasureSlot::refresh()
|
||||||
|
|
||||||
setWidthHeight(w*scl, h*scl);
|
setWidthHeight(w*scl, h*scl);
|
||||||
|
|
||||||
std::string parse = dsq->continuity.stringBank.get(flag);
|
std::string parse = stringbank.get(flag);
|
||||||
|
|
||||||
int p1 = parse.find_first_of('[');
|
int p1 = parse.find_first_of('[');
|
||||||
if (p1 != std::string::npos)
|
if (p1 != std::string::npos)
|
||||||
|
@ -1691,7 +1691,7 @@ static std::string screenModeStr(const ScreenMode& m)
|
||||||
std::ostringstream os;
|
std::ostringstream os;
|
||||||
if(!m.x && !m.y)
|
if(!m.x && !m.y)
|
||||||
{
|
{
|
||||||
os << dsq->continuity.stringBank.get(2142);
|
os << stringbank.get(2142);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1931,7 +1931,7 @@ void InGameMenu::create()
|
||||||
tip = new ToolTip;
|
tip = new ToolTip;
|
||||||
tip->alpha = 0;
|
tip->alpha = 0;
|
||||||
tip->setCircularAreaFromCenter(worldLeftCenter, 240);
|
tip->setCircularAreaFromCenter(worldLeftCenter, 240);
|
||||||
tip->setText(dsq->continuity.stringBank.get(0), Vector(200,450), 350);
|
tip->setText(stringbank.get(0), Vector(200,450), 350);
|
||||||
game->addRenderObject(tip, LR_HUD);
|
game->addRenderObject(tip, LR_HUD);
|
||||||
foodTips.push_back(tip);
|
foodTips.push_back(tip);
|
||||||
|
|
||||||
|
@ -1939,7 +1939,7 @@ void InGameMenu::create()
|
||||||
tip = new ToolTip;
|
tip = new ToolTip;
|
||||||
tip->alpha = 0;
|
tip->alpha = 0;
|
||||||
tip->setCircularAreaFromCenter(worldRightCenter, 240);
|
tip->setCircularAreaFromCenter(worldRightCenter, 240);
|
||||||
tip->setText(dsq->continuity.stringBank.get(1), Vector(600,450), 350);
|
tip->setText(stringbank.get(1), Vector(600,450), 350);
|
||||||
game->addRenderObject(tip, LR_HUD);
|
game->addRenderObject(tip, LR_HUD);
|
||||||
foodTips.push_back(tip);
|
foodTips.push_back(tip);
|
||||||
|
|
||||||
|
@ -1948,7 +1948,7 @@ void InGameMenu::create()
|
||||||
tip = new ToolTip;
|
tip = new ToolTip;
|
||||||
tip->alpha = 0;
|
tip->alpha = 0;
|
||||||
tip->setCircularAreaFromCenter(worldLeftCenter, 240);
|
tip->setCircularAreaFromCenter(worldLeftCenter, 240);
|
||||||
tip->setText(dsq->continuity.stringBank.get(14), Vector(200,450), 350);
|
tip->setText(stringbank.get(14), Vector(200,450), 350);
|
||||||
game->addRenderObject(tip, LR_HUD);
|
game->addRenderObject(tip, LR_HUD);
|
||||||
songTips.push_back(tip);
|
songTips.push_back(tip);
|
||||||
|
|
||||||
|
@ -1957,7 +1957,7 @@ void InGameMenu::create()
|
||||||
tip = new ToolTip;
|
tip = new ToolTip;
|
||||||
tip->alpha = 0;
|
tip->alpha = 0;
|
||||||
tip->setAreaFromCenter(Vector(400,300), 800, 600);
|
tip->setAreaFromCenter(Vector(400,300), 800, 600);
|
||||||
tip->setText(dsq->continuity.stringBank.get(16), Vector(400,300), 400);
|
tip->setText(stringbank.get(16), Vector(400,300), 400);
|
||||||
game->addRenderObject(tip, LR_HUD);
|
game->addRenderObject(tip, LR_HUD);
|
||||||
petTips.push_back(tip);
|
petTips.push_back(tip);
|
||||||
*/
|
*/
|
||||||
|
@ -1965,14 +1965,14 @@ void InGameMenu::create()
|
||||||
tip = new ToolTip;
|
tip = new ToolTip;
|
||||||
tip->alpha = 0;
|
tip->alpha = 0;
|
||||||
tip->setCircularAreaFromCenter(worldLeftCenter, 240);
|
tip->setCircularAreaFromCenter(worldLeftCenter, 240);
|
||||||
tip->setText(dsq->continuity.stringBank.get(17), Vector(200,450), 350);
|
tip->setText(stringbank.get(17), Vector(200,450), 350);
|
||||||
game->addRenderObject(tip, LR_HUD);
|
game->addRenderObject(tip, LR_HUD);
|
||||||
petTips.push_back(tip);
|
petTips.push_back(tip);
|
||||||
|
|
||||||
tip = new ToolTip;
|
tip = new ToolTip;
|
||||||
tip->alpha = 0;
|
tip->alpha = 0;
|
||||||
tip->setAreaFromCenter(Vector(400,350), 150, 50);
|
tip->setAreaFromCenter(Vector(400,350), 150, 50);
|
||||||
tip->setText(dsq->continuity.stringBank.get(15), Vector(400,450), 450);
|
tip->setText(stringbank.get(15), Vector(400,450), 450);
|
||||||
game->addRenderObject(tip, LR_HUD);
|
game->addRenderObject(tip, LR_HUD);
|
||||||
songTips.push_back(tip);
|
songTips.push_back(tip);
|
||||||
foodTips.push_back(tip);
|
foodTips.push_back(tip);
|
||||||
|
@ -1993,7 +1993,7 @@ void InGameMenu::create()
|
||||||
game->addRenderObject(keyConfigButton, LR_MENU);
|
game->addRenderObject(keyConfigButton, LR_MENU);
|
||||||
|
|
||||||
|
|
||||||
#define SB(x) dsq->continuity.stringBank.get(x)
|
#define SB(x) stringbank.get(x)
|
||||||
|
|
||||||
keyConfigBg = new RoundedRect();
|
keyConfigBg = new RoundedRect();
|
||||||
keyConfigBg->position = Vector(400,276 - 10 - 40);
|
keyConfigBg->position = Vector(400,276 - 10 - 40);
|
||||||
|
@ -2327,7 +2327,7 @@ void InGameMenu::create()
|
||||||
recipeMenu.header = new BitmapText(&dsq->font);
|
recipeMenu.header = new BitmapText(&dsq->font);
|
||||||
recipeMenu.header->color = 0;
|
recipeMenu.header->color = 0;
|
||||||
recipeMenu.header->followCamera = 1;
|
recipeMenu.header->followCamera = 1;
|
||||||
recipeMenu.header->setText(dsq->continuity.stringBank.get(2007));
|
recipeMenu.header->setText(stringbank.get(2007));
|
||||||
recipeMenu.header->alpha = 0;
|
recipeMenu.header->alpha = 0;
|
||||||
recipeMenu.header->position = Vector(scrollx, 5); //10
|
recipeMenu.header->position = Vector(scrollx, 5); //10
|
||||||
game->addRenderObject(recipeMenu.header, LR_RECIPES);
|
game->addRenderObject(recipeMenu.header, LR_RECIPES);
|
||||||
|
@ -2336,7 +2336,7 @@ void InGameMenu::create()
|
||||||
recipeMenu.page->color = 0;
|
recipeMenu.page->color = 0;
|
||||||
recipeMenu.page->followCamera = 1;
|
recipeMenu.page->followCamera = 1;
|
||||||
recipeMenu.page->position = Vector(scrollx, 400);
|
recipeMenu.page->position = Vector(scrollx, 400);
|
||||||
recipeMenu.page->setText(dsq->continuity.stringBank.get(2006));
|
recipeMenu.page->setText(stringbank.get(2006));
|
||||||
recipeMenu.page->alpha = 0;
|
recipeMenu.page->alpha = 0;
|
||||||
game->addRenderObject(recipeMenu.page, LR_RECIPES);
|
game->addRenderObject(recipeMenu.page, LR_RECIPES);
|
||||||
|
|
||||||
|
@ -3158,7 +3158,7 @@ void InGameMenu::onCook()
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dsq->sound->playSfx("Denied");
|
dsq->sound->playSfx("Denied");
|
||||||
dsq->centerMessage(dsq->continuity.stringBank.get(27));
|
dsq->centerMessage(stringbank.get(27));
|
||||||
}
|
}
|
||||||
refreshFoodSlots(true);
|
refreshFoodSlots(true);
|
||||||
|
|
||||||
|
@ -4237,14 +4237,14 @@ void InGameMenu::updateJoystickText()
|
||||||
else if(as.joystickID == ACTIONSET_REASSIGN_JOYSTICK)
|
else if(as.joystickID == ACTIONSET_REASSIGN_JOYSTICK)
|
||||||
{
|
{
|
||||||
std::string s = "(";
|
std::string s = "(";
|
||||||
s += dsq->continuity.stringBank.get(2141);
|
s += stringbank.get(2141);
|
||||||
s += " ";
|
s += " ";
|
||||||
s += as.joystickName;
|
s += as.joystickName;
|
||||||
s += ")";
|
s += ")";
|
||||||
joystickNameText->setText(s);
|
joystickNameText->setText(s);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
joystickNameText->setText(dsq->continuity.stringBank.get(2139));
|
joystickNameText->setText(stringbank.get(2139));
|
||||||
|
|
||||||
if(j && as.joystickID >= 0)
|
if(j && as.joystickID >= 0)
|
||||||
joystickGUIDText->setText(as.joystickGUID);
|
joystickGUIDText->setText(as.joystickGUID);
|
||||||
|
|
|
@ -189,7 +189,7 @@ void ModDL::GetModlist(const std::string& url, bool allowChaining, bool first)
|
||||||
{
|
{
|
||||||
scr->globeIcon->quad->color.interpolateTo(Vector(1,1,1), 0.3f);
|
scr->globeIcon->quad->color.interpolateTo(Vector(1,1,1), 0.3f);
|
||||||
scr->globeIcon->alpha.interpolateTo(0.5f, 0.2f, -1, true, true);
|
scr->globeIcon->alpha.interpolateTo(0.5f, 0.2f, -1, true, true);
|
||||||
scr->dlText.setText(dsq->continuity.stringBank.get(2033));
|
scr->dlText.setText(stringbank.get(2033));
|
||||||
scr->dlText.alpha.stopPath();
|
scr->dlText.alpha.stopPath();
|
||||||
scr->dlText.alpha.interpolateTo(1, 0.1f);
|
scr->dlText.alpha.interpolateTo(1, 0.1f);
|
||||||
}
|
}
|
||||||
|
@ -210,7 +210,7 @@ void ModDL::NotifyModlist(ModlistRequest *rq, NetEvent ev, size_t recvd, size_t
|
||||||
scr->globeIcon->alpha.stop();
|
scr->globeIcon->alpha.stop();
|
||||||
scr->globeIcon->alpha.interpolateTo(1, 0.5f, 0, false, true);
|
scr->globeIcon->alpha.interpolateTo(1, 0.5f, 0, false, true);
|
||||||
scr->globeIcon->quad->color.interpolateTo(Vector(0.5f, 0.5f, 0.5f), 0.3f);
|
scr->globeIcon->quad->color.interpolateTo(Vector(0.5f, 0.5f, 0.5f), 0.3f);
|
||||||
scr->dlText.setText(dsq->continuity.stringBank.get(2021));
|
scr->dlText.setText(stringbank.get(2021));
|
||||||
scr->dlText.alpha = 0;
|
scr->dlText.alpha = 0;
|
||||||
scr->dlText.alpha.ensureData();
|
scr->dlText.alpha.ensureData();
|
||||||
scr->dlText.alpha.data->path.addPathNode(0, 0);
|
scr->dlText.alpha.data->path.addPathNode(0, 0);
|
||||||
|
@ -243,7 +243,7 @@ void ModDL::NotifyModlist(ModlistRequest *rq, NetEvent ev, size_t recvd, size_t
|
||||||
{
|
{
|
||||||
scr->dlText.alpha.stopPath();
|
scr->dlText.alpha.stopPath();
|
||||||
scr->dlText.alpha.interpolateTo(1, 0.5f);
|
scr->dlText.alpha.interpolateTo(1, 0.5f);
|
||||||
scr->dlText.setText(dsq->continuity.stringBank.get(2022) + " " + rq->url);
|
scr->dlText.setText(stringbank.get(2022) + " " + rq->url);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -477,7 +477,7 @@ void ModDL::NotifyMod(ModRequest *rq, NetEvent ev, size_t recvd, size_t total)
|
||||||
if(!ico)
|
if(!ico)
|
||||||
{
|
{
|
||||||
if(ev == NE_FINISH)
|
if(ev == NE_FINISH)
|
||||||
dsq->centerMessage(dsq->continuity.stringBank.get(2023) + " " + rq->modname, 420);
|
dsq->centerMessage(stringbank.get(2023) + " " + rq->modname, 420);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -575,7 +575,7 @@ void ModIcon::loadEntry(const ModEntry& entry)
|
||||||
|
|
||||||
dsq->mod.loadModXML(&d, entry.path);
|
dsq->mod.loadModXML(&d, entry.path);
|
||||||
|
|
||||||
std::string ds = dsq->continuity.stringBank.get(2009);
|
std::string ds = stringbank.get(2009);
|
||||||
|
|
||||||
XMLElement *top = d.FirstChildElement("AquariaMod");
|
XMLElement *top = d.FirstChildElement("AquariaMod");
|
||||||
if (top)
|
if (top)
|
||||||
|
@ -748,13 +748,13 @@ void ModIconOnline::onClick()
|
||||||
if(hasPkgOnDisk())
|
if(hasPkgOnDisk())
|
||||||
{
|
{
|
||||||
if(hasUpdate)
|
if(hasUpdate)
|
||||||
proceed = dsq->confirm(dsq->continuity.stringBank.get(2024));
|
proceed = dsq->confirm(stringbank.get(2024));
|
||||||
else
|
else
|
||||||
proceed = dsq->confirm(dsq->continuity.stringBank.get(2025));
|
proceed = dsq->confirm(stringbank.get(2025));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dsq->confirm(dsq->continuity.stringBank.get(2026), "", true);
|
dsq->confirm(stringbank.get(2026), "", true);
|
||||||
proceed = false;
|
proceed = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -780,7 +780,7 @@ void ModIconOnline::onClick()
|
||||||
else if(pkgtype == MPT_WEBLINK)
|
else if(pkgtype == MPT_WEBLINK)
|
||||||
{
|
{
|
||||||
mouseDown = false;
|
mouseDown = false;
|
||||||
proceed = dsq->confirm(dsq->continuity.stringBank.get(2034));
|
proceed = dsq->confirm(stringbank.get(2034));
|
||||||
if(proceed)
|
if(proceed)
|
||||||
{
|
{
|
||||||
openURL(packageUrl);
|
openURL(packageUrl);
|
||||||
|
@ -847,7 +847,7 @@ void MenuIconBar::init()
|
||||||
|
|
||||||
|
|
||||||
ico = new MenuIcon(0);
|
ico = new MenuIcon(0);
|
||||||
ico->label = dsq->continuity.stringBank.get(2027);
|
ico->label = stringbank.get(2027);
|
||||||
ico->useQuad("modselect/installed");
|
ico->useQuad("modselect/installed");
|
||||||
y += ico->quad->height;
|
y += ico->quad->height;
|
||||||
ico->position = Vector(0, y);
|
ico->position = Vector(0, y);
|
||||||
|
@ -856,7 +856,7 @@ void MenuIconBar::init()
|
||||||
|
|
||||||
MenuIcon *prev = ico;
|
MenuIcon *prev = ico;
|
||||||
ico = new MenuIcon(1);
|
ico = new MenuIcon(1);
|
||||||
ico->label = dsq->continuity.stringBank.get(2028);
|
ico->label = stringbank.get(2028);
|
||||||
ico->useQuad("modselect/patches");
|
ico->useQuad("modselect/patches");
|
||||||
y += ico->quad->height;
|
y += ico->quad->height;
|
||||||
ico->position = Vector(0, y);
|
ico->position = Vector(0, y);
|
||||||
|
@ -866,7 +866,7 @@ void MenuIconBar::init()
|
||||||
|
|
||||||
prev = ico;
|
prev = ico;
|
||||||
ico = new MenuIcon(2);
|
ico = new MenuIcon(2);
|
||||||
ico->label = dsq->continuity.stringBank.get(2029);
|
ico->label = stringbank.get(2029);
|
||||||
ico->useQuad("modselect/download");
|
ico->useQuad("modselect/download");
|
||||||
y += ico->quad->height;
|
y += ico->quad->height;
|
||||||
ico->position = Vector(0, y);
|
ico->position = Vector(0, y);
|
||||||
|
@ -877,7 +877,7 @@ void MenuIconBar::init()
|
||||||
|
|
||||||
prev = ico;
|
prev = ico;
|
||||||
ico = new MenuIcon(3);
|
ico = new MenuIcon(3);
|
||||||
ico->label = dsq->continuity.stringBank.get(2030);
|
ico->label = stringbank.get(2030);
|
||||||
ico->useQuad("modselect/exit");
|
ico->useQuad("modselect/exit");
|
||||||
ico->repeatTextureToFill(false);
|
ico->repeatTextureToFill(false);
|
||||||
y += ico->quad->height;
|
y += ico->quad->height;
|
||||||
|
|
|
@ -132,7 +132,7 @@ void ParticleEditor::load()
|
||||||
{
|
{
|
||||||
particleManager->loadParticleBank(dsq->particleBank1, dsq->particleBank2);
|
particleManager->loadParticleBank(dsq->particleBank1, dsq->particleBank2);
|
||||||
emitter->stop();
|
emitter->stop();
|
||||||
std::string pname = dsq->getUserInputString(dsq->continuity.stringBank.get(2018));
|
std::string pname = dsq->getUserInputString(stringbank.get(2018));
|
||||||
lastLoadedParticle = pname;
|
lastLoadedParticle = pname;
|
||||||
emitter->load(pname);
|
emitter->load(pname);
|
||||||
emitter->start();
|
emitter->start();
|
||||||
|
|
|
@ -138,7 +138,7 @@ RecipeMenuEntry::RecipeMenuEntry(Recipe *recipe) : RenderObject(), recipe(recipe
|
||||||
std::string typeName = dsq->continuity.getIngredientDisplayName(recipe->types[i].typeName);
|
std::string typeName = dsq->continuity.getIngredientDisplayName(recipe->types[i].typeName);
|
||||||
|
|
||||||
if (recipe->types[i].type != IT_ANYTHING)
|
if (recipe->types[i].type != IT_ANYTHING)
|
||||||
typeName = dsq->continuity.stringBank.get(2031) + "\n" + typeName;
|
typeName = stringbank.get(2031) + "\n" + typeName;
|
||||||
else
|
else
|
||||||
typeName = std::string("\n") + typeName;
|
typeName = std::string("\n") + typeName;
|
||||||
|
|
||||||
|
@ -430,7 +430,7 @@ void RecipeMenu::createPage(int p)
|
||||||
dsq->game->addRenderObject(description, scroll->layer);
|
dsq->game->addRenderObject(description, scroll->layer);
|
||||||
|
|
||||||
std::ostringstream os2;
|
std::ostringstream os2;
|
||||||
os2 << dsq->continuity.stringBank.get(2006) << " " << currentPage+1 << "/" << getNumPages()+1;
|
os2 << stringbank.get(2006) << " " << currentPage+1 << "/" << getNumPages()+1;
|
||||||
page->setText(os2.str());
|
page->setText(os2.str());
|
||||||
|
|
||||||
debugLog("done: " + os2.str());
|
debugLog("done: " + os2.str());
|
||||||
|
|
|
@ -2051,7 +2051,7 @@ void SceneEditor::loadScene()
|
||||||
dsq->game->loadEntityTypeList();
|
dsq->game->loadEntityTypeList();
|
||||||
dsq->loadElementEffects();
|
dsq->loadElementEffects();
|
||||||
dsq->continuity.loadSongBank();
|
dsq->continuity.loadSongBank();
|
||||||
dsq->continuity.stringBank.load();
|
dsq->loadStringBank();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SceneEditor::saveScene()
|
void SceneEditor::saveScene()
|
||||||
|
|
|
@ -2243,7 +2243,7 @@ luaFunc(foundLostMemory)
|
||||||
if (dsq->continuity.getFlag(FLAG_SECRET03)) num++;
|
if (dsq->continuity.getFlag(FLAG_SECRET03)) num++;
|
||||||
|
|
||||||
int sbank = 800+(num-1);
|
int sbank = 800+(num-1);
|
||||||
dsq->game->setControlHint(dsq->continuity.stringBank.get(sbank), 0, 0, 0, 4, "13/face");
|
dsq->game->setControlHint(stringbank.get(sbank), 0, 0, 0, 4, "13/face");
|
||||||
|
|
||||||
dsq->sound->playSfx("memory-found");
|
dsq->sound->playSfx("memory-found");
|
||||||
|
|
||||||
|
@ -4733,7 +4733,7 @@ luaFunc(beam_getEndPos)
|
||||||
|
|
||||||
luaFunc(getStringBank)
|
luaFunc(getStringBank)
|
||||||
{
|
{
|
||||||
luaReturnStr(dsq->continuity.stringBank.get(lua_tointeger(L, 1)).c_str());
|
luaReturnStr(stringbank.get(lua_tointeger(L, 1)).c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
luaFunc(isPlat)
|
luaFunc(isPlat)
|
||||||
|
|
|
@ -746,7 +746,7 @@ WorldMapRender::WorldMapRender() : RenderObject(), ActionMapper()
|
||||||
|
|
||||||
if (activeTile)
|
if (activeTile)
|
||||||
{
|
{
|
||||||
areaLabel2->setText(dsq->continuity.stringBank.get(activeTile->stringIndex));
|
areaLabel2->setText(stringbank.get(activeTile->stringIndex));
|
||||||
}
|
}
|
||||||
|
|
||||||
originalActiveTile = activeTile;
|
originalActiveTile = activeTile;
|
||||||
|
@ -918,12 +918,12 @@ void WorldMapRender::onUpdate(float dt)
|
||||||
{
|
{
|
||||||
if (activeTile)
|
if (activeTile)
|
||||||
{
|
{
|
||||||
areaLabel3->setText(dsq->continuity.stringBank.get(activeTile->stringIndex));
|
areaLabel3->setText(stringbank.get(activeTile->stringIndex));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (selectedTile)
|
if (selectedTile)
|
||||||
{
|
{
|
||||||
areaLabel->setText(dsq->continuity.stringBank.get(selectedTile->stringIndex));
|
areaLabel->setText(stringbank.get(selectedTile->stringIndex));
|
||||||
|
|
||||||
if (activeTile && !mover && !dsq->isNested() && isCursorOffHud())
|
if (activeTile && !mover && !dsq->isNested() && isCursorOffHud())
|
||||||
{
|
{
|
||||||
|
@ -1476,7 +1476,7 @@ void WorldMapRender::toggle(bool turnON)
|
||||||
|
|
||||||
void WorldMapRender::createGemHint(const std::string &gfx)
|
void WorldMapRender::createGemHint(const std::string &gfx)
|
||||||
{
|
{
|
||||||
std::string useString = dsq->getUserInputString(dsq->continuity.stringBank.get(860), "", true);
|
std::string useString = dsq->getUserInputString(stringbank.get(860), "", true);
|
||||||
if (!useString.empty())
|
if (!useString.empty())
|
||||||
{
|
{
|
||||||
doubleClickTimer = 0;
|
doubleClickTimer = 0;
|
||||||
|
|
|
@ -287,11 +287,11 @@ void WorldMap::save()
|
||||||
WorldMapTile *t = &worldMapTiles[i];
|
WorldMapTile *t = &worldMapTiles[i];
|
||||||
out << t->index << " " << t->stringIndex << " " << t->name << " " << t->layer << " " << t->scale << " " << t->gridPos.x << " " << t->gridPos.y << " " << t->prerevealed << " " << t->scale2 << std::endl;
|
out << t->index << " " << t->stringIndex << " " << t->name << " " << t->layer << " " << t->scale << " " << t->gridPos.x << " " << t->gridPos.y << " " << t->prerevealed << " " << t->scale2 << std::endl;
|
||||||
}
|
}
|
||||||
dsq->screenMessage(dsq->continuity.stringBank.get(2019) + " " + fn);
|
dsq->screenMessage(stringbank.get(2019) + " " + fn);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dsq->screenMessage(dsq->continuity.stringBank.get(2020) + " " + fn);
|
dsq->screenMessage(stringbank.get(2020) + " " + fn);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,6 +24,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
#include "Core.h"
|
#include "Core.h"
|
||||||
#include "SDL.h"
|
#include "SDL.h"
|
||||||
#include "GameKeyNames.h"
|
#include "GameKeyNames.h"
|
||||||
|
#include "StringBank.h"
|
||||||
|
|
||||||
|
|
||||||
static std::string inputcode2string(int k)
|
static std::string inputcode2string(int k)
|
||||||
|
@ -142,10 +143,7 @@ std::string getInputCodeToUserString(unsigned int k, size_t joystickID)
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string s = inputcode2string(k);
|
std::string s = inputcode2string(k);
|
||||||
return s.empty() ? "•" : s; // Ø •
|
return s.empty() ? stringbank.get(2153) : s;
|
||||||
// Actually, • looks interesting.
|
|
||||||
// It shows up as a box, presumably because the font doesn't have that character.
|
|
||||||
// I'll leave this as it is, because those boxes are kinda cool. -- fg
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int checkInp(const char *s, int category, int limit, const char *err)
|
static int checkInp(const char *s, int category, int limit, const char *err)
|
||||||
|
|
|
@ -19,40 +19,30 @@ along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
#include "StringBank.h"
|
#include "StringBank.h"
|
||||||
#include "DSQ.h"
|
|
||||||
#include "ttvfs_stdio.h"
|
#include "ttvfs_stdio.h"
|
||||||
|
|
||||||
|
StringBank stringbank;
|
||||||
|
static const std::string emptyStr;
|
||||||
|
|
||||||
StringBank::StringBank()
|
StringBank::StringBank()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void StringBank::load()
|
void StringBank::clear()
|
||||||
{
|
{
|
||||||
stringMap.clear();
|
stringMap.clear();
|
||||||
|
|
||||||
// First, load the default string banks
|
|
||||||
_load("data/stringbank.txt");
|
|
||||||
if (dsq->mod.isActive())
|
|
||||||
_load(dsq->mod.getPath() + "stringbank.txt");
|
|
||||||
|
|
||||||
// Then, load localized ones. If some entries in these are missing, the default for each is taken.
|
|
||||||
std::string fname = localisePath("data/stringbank.txt");
|
|
||||||
_load(fname);
|
|
||||||
|
|
||||||
if (dsq->mod.isActive()) {
|
|
||||||
fname = localisePath(dsq->mod.getPath() + "stringbank.txt", dsq->mod.getPath());
|
|
||||||
_load(fname);
|
|
||||||
}
|
|
||||||
|
|
||||||
if(stringMap.empty())
|
|
||||||
exit_error("Failed to load data/stringbank.txt");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void StringBank::_load(const std::string &file)
|
bool StringBank::empty() const
|
||||||
{
|
{
|
||||||
|
return stringMap.empty();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool StringBank::load(const std::string &file)
|
||||||
|
{
|
||||||
InStream in(file.c_str());
|
InStream in(file.c_str());
|
||||||
|
if(!in)
|
||||||
|
return false;
|
||||||
|
|
||||||
std::string line;
|
std::string line;
|
||||||
int idx;
|
int idx;
|
||||||
|
@ -61,8 +51,6 @@ void StringBank::_load(const std::string &file)
|
||||||
{
|
{
|
||||||
std::getline(in, line);
|
std::getline(in, line);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (!line.empty() && line[0] == ' ')
|
if (!line.empty() && line[0] == ' ')
|
||||||
line = line.substr(1, line.size());
|
line = line.substr(1, line.size());
|
||||||
for (size_t i = 0; i < line.size(); i++)
|
for (size_t i = 0; i < line.size(); i++)
|
||||||
|
@ -72,10 +60,18 @@ void StringBank::_load(const std::string &file)
|
||||||
}
|
}
|
||||||
stringMap[idx] = line;
|
stringMap[idx] = line;
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::string& StringBank::get(int idx)
|
const std::string& StringBank::get(int idx) const
|
||||||
{
|
{
|
||||||
return stringMap[idx];
|
StringMap::const_iterator it = stringMap.find(idx);
|
||||||
|
return it != stringMap.end() ? it->second : emptyStr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void StringBank::addDefault(int idx, const char *str)
|
||||||
|
{
|
||||||
|
StringMap::iterator it = stringMap.find(idx);
|
||||||
|
if(it == stringMap.end())
|
||||||
|
stringMap[idx] = str;
|
||||||
|
}
|
|
@ -8,14 +8,18 @@ class StringBank
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
StringBank();
|
StringBank();
|
||||||
void load();
|
bool load(const std::string &file);
|
||||||
|
void clear();
|
||||||
|
bool empty() const;
|
||||||
|
void addDefault(int idx, const char *str);
|
||||||
|
|
||||||
const std::string& get(int idx);
|
const std::string& get(int idx) const;
|
||||||
protected:
|
protected:
|
||||||
void _load(const std::string &file);
|
|
||||||
|
|
||||||
typedef std::map<int, std::string> StringMap;
|
typedef std::map<int, std::string> StringMap;
|
||||||
StringMap stringMap;
|
StringMap stringMap;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
extern StringBank stringbank;
|
||||||
|
|
||||||
#endif
|
#endif
|
|
@ -463,7 +463,6 @@ SET(AQUARIA_SRCS
|
||||||
${SRCDIR}/StatsAndAchievements.cpp
|
${SRCDIR}/StatsAndAchievements.cpp
|
||||||
${SRCDIR}/SteamRender.cpp
|
${SRCDIR}/SteamRender.cpp
|
||||||
${SRCDIR}/Strand.cpp
|
${SRCDIR}/Strand.cpp
|
||||||
${SRCDIR}/StringBank.cpp
|
|
||||||
${SRCDIR}/SubtitlePlayer.cpp
|
${SRCDIR}/SubtitlePlayer.cpp
|
||||||
${SRCDIR}/ToolTip.cpp
|
${SRCDIR}/ToolTip.cpp
|
||||||
${SRCDIR}/UserSettings.cpp
|
${SRCDIR}/UserSettings.cpp
|
||||||
|
@ -533,6 +532,7 @@ SET(BBGE_SRCS
|
||||||
${BBGEDIR}/SpawnParticleData.cpp
|
${BBGEDIR}/SpawnParticleData.cpp
|
||||||
${BBGEDIR}/StateMachine.cpp
|
${BBGEDIR}/StateMachine.cpp
|
||||||
${BBGEDIR}/StateManager.cpp
|
${BBGEDIR}/StateManager.cpp
|
||||||
|
${BBGEDIR}/StringBank.cpp
|
||||||
${BBGEDIR}/Texture.cpp
|
${BBGEDIR}/Texture.cpp
|
||||||
${BBGEDIR}/TTFFont.cpp
|
${BBGEDIR}/TTFFont.cpp
|
||||||
${BBGEDIR}/Vector.cpp
|
${BBGEDIR}/Vector.cpp
|
||||||
|
@ -804,5 +804,11 @@ ADD_EXECUTABLE(aquaria ${EXETYPE}
|
||||||
)
|
)
|
||||||
TARGET_LINK_LIBRARIES(aquaria ${OPTIONAL_LIBS})
|
TARGET_LINK_LIBRARIES(aquaria ${OPTIONAL_LIBS})
|
||||||
|
|
||||||
|
IF(WIN32)
|
||||||
|
SET(RC_DEFINES "" FORCE)
|
||||||
|
SET(RC_INCLUDES "" FORCE)
|
||||||
|
SET(RC_FLAGS "" FORCE)
|
||||||
|
endif(WIN32)
|
||||||
|
|
||||||
# end of CMakeLists.txt ...
|
# end of CMakeLists.txt ...
|
||||||
|
|
||||||
|
|
|
@ -254,4 +254,5 @@
|
||||||
2142 Desktop
|
2142 Desktop
|
||||||
2150 Movement
|
2150 Movement
|
||||||
2151 Menu
|
2151 Menu
|
||||||
2152 Quick Keys
|
2152 Quick Keys
|
||||||
|
2153 --
|
|
@ -707,14 +707,6 @@
|
||||||
RelativePath="..\..\Aquaria\Strand.cpp"
|
RelativePath="..\..\Aquaria\Strand.cpp"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
<File
|
|
||||||
RelativePath="..\..\Aquaria\StringBank.cpp"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
|
||||||
RelativePath="..\..\Aquaria\StringBank.h"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\Aquaria\SubtitlePlayer.cpp"
|
RelativePath="..\..\Aquaria\SubtitlePlayer.cpp"
|
||||||
>
|
>
|
||||||
|
|
|
@ -677,6 +677,14 @@
|
||||||
RelativePath="..\..\BBGE\StateManager.h"
|
RelativePath="..\..\BBGE\StateManager.h"
|
||||||
>
|
>
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\BBGE\StringBank.cpp"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\BBGE\StringBank.h"
|
||||||
|
>
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\BBGE\Texture.cpp"
|
RelativePath="..\..\BBGE\Texture.cpp"
|
||||||
>
|
>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue