mirror of
https://github.com/rwengine/openrw.git
synced 2024-11-22 10:22:52 +01:00
Remove GameData::openFile
The openFile API is not useful for implementing the correct behaviour, so the underlying FileIndex method will be removed soon.
This commit is contained in:
parent
0be8586135
commit
0abfc695fb
@ -383,7 +383,7 @@ void GameData::loadDFF(const std::string& name, bool async)
|
||||
|
||||
void GameData::loadIFP(const std::string &name)
|
||||
{
|
||||
auto f = openFile(name);
|
||||
auto f = index.openFile(name);
|
||||
|
||||
if(f)
|
||||
{
|
||||
@ -458,16 +458,6 @@ void GameData::loadSplash(const std::string &name)
|
||||
engine->state->currentSplash = lower;
|
||||
}
|
||||
|
||||
FileHandle GameData::openFile(const std::string &name)
|
||||
{
|
||||
auto file = index.openFile(name);
|
||||
if( file == nullptr )
|
||||
{
|
||||
logger->error("Data", "Unable to open file: " + name);
|
||||
}
|
||||
return file;
|
||||
}
|
||||
|
||||
int GameData::getWaterIndexAt(const glm::vec3 &ws) const
|
||||
{
|
||||
auto wX = (int) ((ws.x + WATER_WORLD_SIZE/2.f) / (WATER_WORLD_SIZE/WATER_HQ_DATA_SIZE));
|
||||
|
@ -147,8 +147,6 @@ public:
|
||||
|
||||
void loadSplash(const std::string& name);
|
||||
|
||||
FileHandle openFile(const std::string& name);
|
||||
|
||||
TextureData::Handle findTexture( const std::string& name, const std::string& alpha = "" )
|
||||
{
|
||||
return textures[{name, alpha}];
|
||||
|
@ -844,7 +844,7 @@ void GameWorld::loadCutscene(const std::string &name)
|
||||
std::string lowerName(name);
|
||||
std::transform(lowerName.begin(), lowerName.end(), lowerName.begin(), ::tolower);
|
||||
|
||||
auto datfile = data->openFile(lowerName + ".dat");
|
||||
auto datfile = data->index.openFile(lowerName + ".dat");
|
||||
|
||||
CutsceneData* cutscene = new CutsceneData;
|
||||
|
||||
|
@ -9,7 +9,7 @@ BOOST_AUTO_TEST_SUITE(CutsceneTests)
|
||||
BOOST_AUTO_TEST_CASE(test_load)
|
||||
{
|
||||
{
|
||||
auto d = Global::get().e->data->openFile("intro.dat");
|
||||
auto d = Global::get().e->data->index.openFile("intro.dat");
|
||||
|
||||
CutsceneTracks tracks;
|
||||
|
||||
|
@ -10,7 +10,7 @@ BOOST_AUTO_TEST_SUITE(LoaderDFFTests)
|
||||
BOOST_AUTO_TEST_CASE(test_load_dff)
|
||||
{
|
||||
{
|
||||
auto d = Global::get().e->data->openFile("landstal.dff");
|
||||
auto d = Global::get().e->data->index.openFile("landstal.dff");
|
||||
|
||||
LoaderDFF loader;
|
||||
|
||||
|
@ -8,7 +8,7 @@ BOOST_AUTO_TEST_SUITE(RWBStreamTests)
|
||||
BOOST_AUTO_TEST_CASE(iterate_stream_test)
|
||||
{
|
||||
{
|
||||
auto d = Global::get().e->data->openFile("landstal.dff");
|
||||
auto d = Global::get().e->data->index.openFile("landstal.dff");
|
||||
|
||||
RWBStream stream(d->data, d->length);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user