mirror of
https://github.com/redstrate/Novus.git
synced 2025-06-30 14:57:46 +00:00
17 lines
451 B
C++
17 lines
451 B
C++
// SPDX-FileCopyrightText: 2023 Joshua Goins <josh@redstrate.com>
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
#include "filecache.h"
|
|
|
|
#include <physis.hpp>
|
|
|
|
FileCache::FileCache(GameData& data) : data(data) {}
|
|
|
|
physis_Buffer& FileCache::lookupFile(const QString& path) {
|
|
if (!cachedBuffers.contains(path)) {
|
|
cachedBuffers[path] = physis_gamedata_extract_file(&data, path.toStdString().c_str());
|
|
}
|
|
|
|
return cachedBuffers[path];
|
|
}
|
|
|