mirror of
https://github.com/BluTac10/Xbox-Neo.git
synced 2026-06-01 07:44:38 +00:00
Replace the ArchiveFile-based media asset loading system with a new FolderFile implementation that reads files directly from a folder structure instead of from compressed .arc archives. This change simplifies asset management and eliminates the need for pre-packaged media archives. Key changes: - Added FolderFile class that indexes and reads files from a folder - Updated Consoles_App to use FolderFile instead of ArchiveFile - Modified CMake asset copy configuration to exclude platform-specific media folders instead of .arc files - Updated platform-specific media path references to point to folders instead of .arc files This enables easier development and debugging by allowing direct access to media files without requiring archive extraction or repackaging.
28 lines
559 B
C++
28 lines
559 B
C++
#pragma once
|
|
|
|
#include <vector>
|
|
#include <unordered_map>
|
|
#include <windows.h>
|
|
|
|
#include "../Minecraft.World/ArrayWithLength.h"
|
|
|
|
using namespace std;
|
|
|
|
class FolderFile
|
|
{
|
|
private:
|
|
wstring m_folderPath;
|
|
unordered_map<wstring, wstring> m_filePaths; // filename -> full path
|
|
|
|
void _buildFileIndex();
|
|
|
|
public:
|
|
FolderFile(wstring folderPath);
|
|
~FolderFile();
|
|
|
|
vector<wstring>* getFileList();
|
|
bool hasFile(const wstring &filename);
|
|
int getFileSize(const wstring &filename);
|
|
byteArray getFile(const wstring &filename);
|
|
};
|