1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2025-08-19 13:09:55 +00:00

added partial VFS support - enough to read static data from any source

This commit is contained in:
fgenesis 2011-09-15 18:33:13 +02:00
parent 0951283b31
commit fa3e9e7329
56 changed files with 4021 additions and 606 deletions

View file

@ -24,6 +24,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "ScriptedEntity.h"
#include "AutoMap.h"
#include "GridRender.h"
#include <VFSFile.h>
#include "tinyxml.h"
@ -870,7 +871,7 @@ void Continuity::loadTreasureData()
std::string line, gfx;
int num, use;
float sz;
std::ifstream in2("data/treasures.txt");
VFSTextStdStreamIn in2("data/treasures.txt");
while (std::getline(in2, line))
{
std::istringstream is(line);
@ -903,7 +904,7 @@ void Continuity::loadIngredientData()
/*
int num;
std::ifstream in2("data/ingredientdescriptions.txt");
VFSTextStreamIn in2("data/ingredientdescriptions.txt");
while (std::getline(in2, line))
{
IngredientDescription desc;
@ -916,7 +917,7 @@ void Continuity::loadIngredientData()
clearIngredientData();
recipes.clear();
std::ifstream in("data/ingredients.txt");
VFSTextStdStreamIn in("data/ingredients.txt");
bool recipes = false;
while (std::getline(in, line))
@ -1241,7 +1242,7 @@ void Continuity::loadEatBank()
{
eats.clear();
std::ifstream inf("data/eats.txt");
VFSTextStdStreamIn inf("data/eats.txt");
EatData curData;
std::string read;
@ -2181,7 +2182,7 @@ void Continuity::setActivePet(int flag)
void Continuity::loadPetData()
{
petData.clear();
std::ifstream in("data/pets.txt");
VFSTextStdStreamIn in("data/pets.txt");
std::string read;
while (std::getline(in, read))
{
@ -3259,7 +3260,7 @@ void Continuity::reset()
health = maxHealth;
speedTypes.clear();
std::ifstream inFile("data/speedtypes.txt");
VFSTextStreamIn inFile("data/speedtypes.txt");
int n, spd;
while (inFile >> n)
{