Commits

Anonymous committed a10c107 Draft

Move hardcoded UI strings to stringbank.txt. Patch by Henrik Holst.

  • Participants
  • Parent commits 5216de2

Comments (0)

Files changed (11)

File Aquaria/AquariaSaveSlot.cpp

 	if (description.length() > 0)
 	{
 		std::ostringstream os;
-		os << "Slot ";
+		os << dsq->continuity.stringBank.get(2002) << " ";
 		if (dsq->isDeveloperKeys())
 			os << slot;
 		else
 	else
 	{
 		std::ostringstream os;
-		os << "Slot " << (slot+1) << " - Empty";
+		os << dsq->continuity.stringBank.get(2002) << " " << (slot+1) << " - " << dsq->continuity.stringBank.get(2003);
 		text1->setText(os.str());
 		glowText->setText(os.str());
 		empty = true;
 				else if ((!core->mouse.buttons.left && !core->mouse.buttons.right) && mbDown)
 				{
 					mbDown = false;
-					if (text1->getText().find("Empty")!=std::string::npos && dsq->saveSlotMode == SSM_LOAD)
+					if (text1->getText().find(dsq->continuity.stringBank.get(2003))!=std::string::npos && dsq->saveSlotMode == SSM_LOAD)
 					{
 					
 					}

File Aquaria/DSQ.cpp

 		{
 			core->frameOutputMode = false;
 			dsq->game->togglePause(true);
-			std::string s = dsq->getUserInputString("1: Refresh\n2: Heal\n3: Reset Cont.\n5: Set Invincible\n6: Set Flag\n8: All Songs\n9: All Ups\nS: learn song #\nF: Find Entity\nC: Set Costume\n0: Learn MArea Songs\nR: Record Demo\nP: Playback Demo\nT: Rewind Demo\nU: Ouput Demo Frames\nB: Unload Resources\nA: Reload Resources\nM: AutoMap\nJ: JumpState\nQ: QuitNestedMain", "");
+			std::string s = dsq->getUserInputString(dsq->continuity.stringBank.get(2012), "");
 			stringToUpper(s);
 
 			/*
 				{
 					std::ostringstream os;
 					os << dsq->game->avatar->health;
-					std::istringstream is(dsq->getUserInputString("health", os.str()));
+					std::istringstream is(dsq->getUserInputString(dsq->continuity.stringBank.get(2013), os.str()));
 					float h = 0;
 					is >> h;
 					dsq->game->avatar->health = h;
 
 	loadBit(LOAD_FONTS);
 
+	dsq->continuity.stringBank.load();
+
 	setTexturePointers();
 
 	cursor = new Quad;
 	addRenderObject(cutscene_bg, LR_SUBTITLES);
 
 	cutscene_text = new BitmapText(&dsq->font);
-	cutscene_text->setText("~Paused~");
+	cutscene_text->setText(dsq->continuity.stringBank.get(2004));
 	cutscene_text->position = Vector(400,300-16);
 	cutscene_text->alpha.x = 0;
 	cutscene_text->followCamera = 1;
 	addRenderObject(cutscene_text, LR_SUBTITLES);
 
 	cutscene_text2 = new BitmapText(&dsq->smallFont);
-	cutscene_text2->setText("Press 'S' to Skip");
+	cutscene_text2->setText(dsq->continuity.stringBank.get(2005));
 	cutscene_text2->position = Vector(400,300+10);
 	cutscene_text2->alpha.x = 0;
 	cutscene_text2->followCamera = 1;
 
 void DSQ::setStory()
 {
-	std::string flagString = getUserInputString("Enter Flag to Set", "0");
+	std::string flagString = getUserInputString(dsq->continuity.stringBank.get(2014), "0");
 	int flag = 0;
 	std::istringstream is(flagString);
 	is >> flag;
 	core->main(0.2);
 	std::ostringstream os;
 	os << dsq->continuity.getFlag(flag);
-	flagString = getUserInputString("Enter Value to Set Flag To", os.str());
+	flagString = getUserInputString(dsq->continuity.stringBank.get(2015), os.str());
 	int value = 0;
 	std::istringstream is2(flagString);
 	is2 >> value;
 void DSQ::updateSaveSlotPageCount()
 {
 	std::ostringstream os;
-	os << "Page " << user.data.savePage+1 << "/" << maxPages+1;
+	os << dsq->continuity.stringBank.get(2006) << " " << user.data.savePage+1 << "/" << maxPages+1;
 	saveSlotPageCount->setText(os.str());
 }
 

File Aquaria/Demo.cpp

 		if (getQuitKey())
 		{
 			toggleRecord(false);
-			dsq->centerMessage("Stopped Recording");
+			dsq->centerMessage(dsq->continuity.stringBank.get(2010));
 		}
 	}
 	else if (mode == DEMOMODE_PLAYBACK)
 
 		if (getQuitKey() || (!frames.empty() && frame >= frames.size())) {	
 			togglePlayback(false);
-			dsq->centerMessage("Stopped Playback");
+			dsq->centerMessage(dsq->continuity.stringBank.get(2011));
 		}
 
 		

File Aquaria/Game.cpp

 	std::string line;
 	if(!in)
 	{
-		core->messageBox("error", "Entity data not found! Aborting...");
+		core->messageBox(dsq->continuity.stringBank.get(2008), dsq->continuity.stringBank.get(2016));
 		exit(1);
 	}
 	while (std::getline(in, line))
 	recipeMenu.header = new BitmapText(&dsq->font);
 	recipeMenu.header->color = 0;
 	recipeMenu.header->followCamera = 1;
-	recipeMenu.header->setText("Recipes");
+	recipeMenu.header->setText(dsq->continuity.stringBank.get(2007));
 	recipeMenu.header->alpha = 0;
 	recipeMenu.header->position = Vector(scrollx, 5); //10
 	addRenderObject(recipeMenu.header, LR_RECIPES);
 	recipeMenu.page->color = 0;
 	recipeMenu.page->followCamera = 1;
 	recipeMenu.page->position = Vector(scrollx, 400);
-	recipeMenu.page->setText("Page");
+	recipeMenu.page->setText(dsq->continuity.stringBank.get(2006));
 	recipeMenu.page->alpha = 0;
 	addRenderObject(recipeMenu.page, LR_RECIPES);
 	

File Aquaria/GameplayVariables.cpp

 	InStream inFile("data/variables.txt");
 	if(!inFile)
 	{
-		core->messageBox("error", "Variables data not found! Aborting...");
+		core->messageBox(dsq->continuity.stringBank.get(2008), dsq->continuity.stringBank.get(2017));
 		exit(1);
 	}
 	std::string s;

File Aquaria/ModDownloader.cpp

 			scr->globeIcon->alpha.stop();
 			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->dlText.setText("Unable to retrieve online mod list.\nCheck your connection and try again."); // TODO: put into stringbank
+			scr->dlText.setText(dsq->continuity.stringBank.get(2021));
 			scr->dlText.alpha = 0;
 			scr->dlText.alpha.ensureData();
 			scr->dlText.alpha.data->path.addPathNode(0, 0);
 		{
 			scr->dlText.alpha.stopPath();
 			scr->dlText.alpha.interpolateTo(1, 0.5f);
-			scr->dlText.setText("Server error!\nBad XML, please contact server admin.\nURL: " + rq->url); // TODO: -> stringbank
+			scr->dlText.setText(dsq->continuity.stringBank.get(2022) + " " + rq->url);
 		}
 	}
 }
 	if(!ico)
 	{
 		if(ev == NE_FINISH)
-			dsq->centerMessage("Finished downloading mod " + rq->modname, 420); // TODO: -> stringbank
+			dsq->centerMessage(dsq->continuity.stringBank.get(2023) + " " + rq->modname, 420);
 		return;
 	}
 

File Aquaria/ModSelector.cpp

 
 	dsq->mod.loadModXML(&d, entry.path);
 
-	std::string ds = "No Description";
+	std::string ds = dsq->continuity.stringBank.get(2009);
 
 	TiXmlElement *top = d.FirstChildElement("AquariaMod");
 	if (top)
 			if(hasPkgOnDisk())
 			{
 				if(hasUpdate)
-					proceed = dsq->confirm("Download update?"); // TODO: -> stringbank
+					proceed = dsq->confirm(dsq->continuity.stringBank.get(2024));
 				else
-					proceed = dsq->confirm("Mod already exists. Re-download?");
+					proceed = dsq->confirm(dsq->continuity.stringBank.get(2025));
 			}
 			else
 			{
-				dsq->confirm("This mod was installed manually,\nnot messing with it.", "", true);
+				dsq->confirm(dsq->continuity.stringBank.get(2026), "", true);
 				proceed = false;
 			}
 
 
 	
 	ico = new MenuIcon(0);
-	ico->label = "\nBrowse installed mods"; // TODO: -> stringbank
+	ico->label = dsq->continuity.stringBank.get(2027);
 	ico->useQuad("modselect/hdd");
 	y += ico->quad->height;
 	ico->position = Vector(0, y);
 
 	MenuIcon *prev = ico;
 	ico = new MenuIcon(1);
-	ico->label = "\nBrowse & enable/disable installed patches";
+	ico->label = dsq->continuity.stringBank.get(2028);
 	ico->useQuad("modselect/patch");
 	y += ico->quad->height;
 	ico->position = Vector(0, y);
 
 	prev = ico;
 	ico = new MenuIcon(2);
-	ico->label = "\nBrowse mods online";
+	ico->label = dsq->continuity.stringBank.get(2029);
 	ico->useQuad("modselect/globe");
 	y += ico->quad->height;
 	ico->position = Vector(0, y);
 
 	prev = ico;
 	ico = new MenuIcon(3);
-	ico->label = "\nReturn to title";
+	ico->label = dsq->continuity.stringBank.get(2030);
 	ico->useQuad("gui/wok-drop");
 	ico->repeatTextureToFill(false);
 	y += ico->quad->height;

File Aquaria/ParticleEditor.cpp

 {
 	particleManager->loadParticleBank(dsq->particleBank1, dsq->particleBank2);
 	emitter->stop();
-	std::string pname = dsq->getUserInputString("Particle Name:");
+	std::string pname = dsq->getUserInputString(dsq->continuity.stringBank.get(2018));
 	lastLoadedParticle = pname;
 	emitter->load(pname);
 	emitter->start();

File Aquaria/RecipeMenuEntry.cpp

 	dsq->game->addRenderObject(description, scroll->layer);
 
 	std::ostringstream os2;
-	os2 << "Page " << currentPage+1 << "/" << getNumPages()+1;
+	os2 << dsq->continuity.stringBank.get(2006) << " " << currentPage+1 << "/" << getNumPages()+1;
 	page->setText(os2.str());
 
 	debugLog("done: " + os2.str());

File Aquaria/WorldMapTiles.cpp

 			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;
 		}
-		dsq->screenMessage("Saved worldmap data to " + fn);
+		dsq->screenMessage(dsq->continuity.stringBank.get(2019) + " " + fn);
 	}
 	else
 	{
-		dsq->screenMessage("Unable to save worldmap to " + fn);
+		dsq->screenMessage(dsq->continuity.stringBank.get(2020) + " " + fn);
 	}
 }
 

File files/data/stringbank.txt

+0 Double click on the food or drag the food to Naija's mouth to eat. 
+1 Drag two or three ingredients over and press the Cook button to combine them. Drag food onto the 'X' to throw it away. When in a kitchen, you will have access to three slots.
+2 Use the minimap in the corner to get your bearings. White circles represent new areas. Naija's home is nearby - marked in gold.
+3 Boost towards enemies in Beast Form to bite them.
+4 You've found a new Map Token!|Double Click the Mini Map in the corner of the screen to view the World Map.
+6 You've learned Li's song. Sing it to draw Li towards you if he has wandered off. Interact with Li's helmet if you'd like to leave him here.
+7 Sing Li's Song when he is Near to Toggle his Combat Mode.
+8 Congratulations, you've reached the end of the current Aquaria IGF demo! Look for more updates in the upcoming months.
+9 Absorb blue plants to heal Naija's wounds.
+11 Naija can combine ingredients to create special food items.
+12 Some enemies allow you to fire new shots when devoured...
+13 Click on Naija to Let Go, Click Far Away to Jump
+14 The songs that Naija has learned are displayed here. Hover the cursor over them to see how they are sung. Click them to hear Naija's description.
+15 Click these icons to switch between menu pages.
+16 This page seems to be blank for now. Perhaps later...
+17 Naija's pets are displayed here. Click to select the active pet.
+19 UNUSED
+20 Change into Energy Form to Pass the Next Barrier
+21 Sing the same color note as the Song Plant to Open it
+22 Sing the same color note as the Verse Egg to Open it
+23 Learned the
+24 Recipe!
+26 You Have Gained the Power to Cook with Three Slots at Any Time
+27 Too Many
+28 Spin the Cursor around Naija to Switch Sides in Dual Form
+29 Charge Up Naija's Attack by Killing Enemies with Li's Side
+30 You've discovered a Blaster Pet Egg!
+31 You've discovered a Pirhana Pet Egg!
+32 You've discovered a Dumbo Octopus Pet Egg!
+33 You've discovered a Nautilus Pet Egg!
+34 Creatures' shells can be removed with the bind song.
+35 The Shield Song - Press ESC for Song Menu
+36 Learned the Bind Song
+37 Learned the Energy Form Song
+38 Learned the Beast Form Song
+39 Learned the Fish Form Song
+40 Learned the Nature Form Song
+41 Learned the Sun Form Song
+42 Learned Li's Song
+43 Learned the Dual Form Song
+44 Learned the Spirit Form Song
+50 Use the Bind Song to Lift Rocks and Pull Up Plants
+51 Use the Bind Song to Move the Bloated Mermen
+60 ===WINDOWS/LINUX HINTS START===
+61 Hold Left Mouse Button or Space Bar to Swim
+62 Hold Right on Naija to Sing
+63 Hold Right on Enemies to Target them in Energy Form.
+64 Press or Hold Right to Create Seeds in Nature Form.
+65 Hold Left and Move the Cursor Around Naija to Roll
+66 Tap Left and Right on Naija to Revert and Pass Through
+67 Hold Middle Mouse Button or Left Shift to Look Around
+68 Right Click to Interact
+69 Hold Right to Charge in Energy Form
+70 Click Right to Attack in Energy Form
+71 Click and Hold Left Mouse Button Far from Naija
+80 ===MAC HINTS START===
+81 Hold Left Mouse Button or Space Bar to Swim
+82 Hold Ctrl on Naija to Sing
+83 Hold Ctrl on Enemies to Target them in Energy Form.
+84 Press or Hold Ctrl to Create Seeds in Nature Form.
+85 Hold the Mouse Button and Move the Cursor Around Naija to Roll
+86 Tap Both Buttons on Naija, or X key, to Revert and Pass Through
+87 Hold Left Shift or Middle Mouse Button to Look Around
+88 Press Ctrl to Interact
+89 Hold Ctrl to Charge in Energy Form
+90 Press Ctrl to Attack in Energy Form
+91 Click and Hold Left Mouse Button Far from Naija
+100 +
+101 -
+200 Heal
+201 Full Health
+202 Defense +
+203 Seconds
+204 Speed +
+205 for
+206 Regeneration x
+207 Trippy
+208 Beast Shot
+209 Bite Power Up
+210 Invincible
+211 Energy Shot +
+212 Blindness Cured
+213 Poison Cured
+214 Poisoned
+215 Tasty!
+216 Pet Power Up
+217 Fish Form Poison
+218 All Status Cured
+219 Web Ability
+220 Sun Ability Up
+221 ???
+222 You've found a lost treasure! Many are hidden throughout the waters of Aquaria. Once collected, they will modify Naija's home cave in unique ways.
+223 A treasure has been added to your home cave.
+224 You've found a new costume! You can use the treasure menu to wear it.
+225 You must find another Ancient Turtle before you can travel with them.
+226 Ride the Ancient Turtles to travel quickly through regions of Aquaria.
+227 Li Will Eat
+500 [Jelly Beacon] [This odd plant seemed to draw small Jelly Fish towards it.]
+501 [Krotite Armor] [I recovered this ancient battle armor worn by the Krotites, from a secret entrance to the Energy Temple.]
+502 [Energy Idol] [A small statuette that burned with the power of the Krotites.]
+503 [Tooth] [In the rush of victory, I pulled this large tooth from the Energy God's jaw. I decided to keep it, as a reminder...]
+504 [Big Seed] [I discovered a giant seed in my sanctuary. When I brought it home and planted it, it sprouted into a colorful garden.]
+505 [Crab Armor] [I fashioned this armor from the shell of the Giant Crab. It would provide me with extra defense when worn.]
+506 [Glowing Plant] [Its twin bulbs drew jellyfish up from the deep.]
+507 [Mithalas Pot] [This pot never seemed to run out of meat for my kitchen.]
+508 [Arnassi Armor] [I won this armor by completing the Arnassi gauntlet in record time. When worn, I could ride seahorses more effectively.]
+509 [Odd Container] [The bubbles trapped inside this container amused me.]
+510 [Mithalan Banner] [I took a blue banner from Mithalas, to remind me of the time spent in its waters.]
+511 [Mithala Doll] [I imagined that this doll belonged to a young girl who had lived in Mithalas long before it was destroyed.]
+512 [Walker Baby] [Perhaps one day it would grow up to be as magnificent as the Walkers in the Kelp Forest.]
+513 [Seed Bag] [I spread these seeds around the foresty area of my cave. Soon small leafy sprouts appeared.]
+514 [Arnassi Statue] [An Arnassi statue I scavenged from the ruins of the civilization.]
+515 [Gear] [I thought that it might be fun to have one of these in my cave.]
+516 [Sun Key] [A strange shiny object... I had no idea what it was for, but I decided to keep it.]
+517 [Urchin Costume] [A spiny costume fashioned from shells of sea urchins. Creatures that touched it would take damage from its sharp spikes.]
+518 [Girl's Costume] [A rather revealing costume...]
+519 [Mutant Costume] [Why did they look so much like me...]
+520 [Jelly Costume] [I won this costume by defeating King Jellyfish. When worn, it would heal me if my wounds became critical.]
+521 [Mithalan Dress] [A ceremonial costume worn by the Princess of Mithalas.]
+522 [Anemone Seed] [When planted, this seed sprouted a garden of anemones in my cave.]
+523 [Glowing Seed] [When planted, this seed sprouted a garden of glowing plants in my cave.]
+524 [Turtle Egg] [I found this egg in the Turtle Cave.]
+525 [King's Skull] [How did he end up in such a terrible place, I wondered?]
+526 [Drask's Trident] [This belonged on the end of a Prince's weapon.]
+527 [Song Plant Spore] [The spores from the song plant reacted strongly to the Verse.]
+528 [Jelly Egg] [An egg from an upside-down jelly.]
+529 [Stone Head] [I wondered if this stone's crude face was the product of nature or something else?]
+530 [Golden Starfish] [A special starfish infused with Sun's power.]
+531 [Black Pearl] [A beautiful black pearl I found hidden away in a deep cave.]
+532 [Baby Crib] [This baby's crib brought powerful memories rushing to the surface.]
+600 Pets
+601 [Nautilus] [Bashes itself into nearby creatures.]
+602 [Dumbo] [Creates a glow of light around Naija.]
+603 [Blaster] [Fires on nearby creatures.]
+604 [Piranha] [Bites and devours nearby creatures.]
+799 Secret Error
+800 Found One of Naija's Lost Memories
+801 Found Two of Naija's Lost Memories
+802 Found All of Naija's Lost Memories - A New Ending
+850 End of Demo
+851 Wrong Way!
+852 Lap
+853 Complete!
+860 Enter Map Marker Name:
+1000 Boiler Room
+1001 Whale
+1002 Frozen Veil
+1003 Bubble Cave
+1004 The Energy Temple
+1005 Naija's Home
+1006 Verse Cave
+1007 The Song Cave
+1008 Home Waters
+1009 Open Waters
+1010 The Kelp Forest
+1011 Mithalas City
+1012 Mithalas Cathedral
+1013 The Sun Temple
+1014 The Veil
+1015 The Abyss
+1016 The Sunken City
+1017 Fish Cave
+1018 Octopus Cave
+1019 Ice Cavern
+1020 ???
+1021 The Body
+1022
+1023 Secret Cave Passage
+1024 Mermog Cave
+1025 Forest Sprite Cave
+1026 The Fish Cave
+1027 The Turtle Cave
+1028 The Arnassi Ruins
+1029 Li's Cave
+1030 King Jellyfish Cave
+2000 Save Game
+2001 Load Game
+2002 Slot
+2003 Empty
+2004 ~Paused~
+2005 Press 'S' to Skip
+2006 Page
+2007 Recipes
+2008 error
+2009 No Description
+2010 Stopped Recording
+2011 Stopped Playback
+2012 1: Refresh|2: Heal|3: Reset Cont.|5: Set Invincible|6: Set Flag|8: All Songs|9: All Ups|S: learn song #|F: Find Entity|C: Set Costume|0: Learn MArea Songs|R: Record Demo|P: Playback Demo|T: Rewind Demo|U: Ouput Demo Frames|B: Unload Resources|A: Reload Resources|M: AutoMap|J: JumpState|Q: QuitNestedMain
+2013 health
+2014 Enter Flag to Set
+2015 Enter Value to Set Flag To
+2016 Entity data not found! Aborting...
+2017 Variables data not found! Aborting...
+2018 Particle Name:
+2019 Saved worldmap data to
+2020 Unable to save worldmap to
+2021 Unable to retrieve online mod list.|Check your connection and try again.
+2022 Server error!|Bad XML, please contact server admin.|URL:
+2023 Finished downloading mod
+2024 Download update?
+2025 Mod already exists. Re-download?
+2026 This mod was installed manually,|not messing with it.
+2027 |Browse installed mods
+2028 |Browse & enable/disable installed patches
+2029 |Browse mods online
+2030 |Return to title