merge FileData and ResourceData.
This commit is contained in:
parent
d2cb44b1bf
commit
fe106d9bfe
38 changed files with 77 additions and 118 deletions
|
|
@ -165,7 +165,7 @@ unsigned FindModel(const char * path, const char * modelfile, bool silent)
|
|||
|
||||
int len = fileSystem.FileLength(lump);
|
||||
auto lumpd = fileSystem.ReadFile(lump);
|
||||
const char * buffer = lumpd.GetString();
|
||||
const char * buffer = lumpd.string();
|
||||
|
||||
if ( (size_t)fullname.LastIndexOf("_d.3d") == fullname.Len()-5 )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -274,7 +274,7 @@ void IQMModel::LoadGeometry()
|
|||
try
|
||||
{
|
||||
auto lumpdata = fileSystem.ReadFile(mLumpNum);
|
||||
IQMFileReader reader(lumpdata.GetMem(), (int)lumpdata.GetSize());
|
||||
IQMFileReader reader(lumpdata.data(), (int)lumpdata.size());
|
||||
|
||||
Vertices.Resize(NumVertices);
|
||||
for (IQMVertexArray& vertexArray : VertexArrays)
|
||||
|
|
|
|||
|
|
@ -178,7 +178,7 @@ void FDMDModel::LoadGeometry()
|
|||
{
|
||||
static int axis[3] = { VX, VY, VZ };
|
||||
auto lumpdata = fileSystem.ReadFile(mLumpNum);
|
||||
auto buffer = lumpdata.GetString();
|
||||
auto buffer = lumpdata.string();
|
||||
texCoords = new FTexCoord[info.numTexCoords];
|
||||
memcpy(texCoords, buffer + info.offsetTexCoords, info.numTexCoords * sizeof(FTexCoord));
|
||||
|
||||
|
|
@ -502,7 +502,7 @@ void FMD2Model::LoadGeometry()
|
|||
static int axis[3] = { VX, VY, VZ };
|
||||
uint8_t *md2_frames;
|
||||
auto lumpdata = fileSystem.ReadFile(mLumpNum);
|
||||
auto buffer = lumpdata.GetString();
|
||||
auto buffer = lumpdata.string();
|
||||
|
||||
texCoords = new FTexCoord[info.numTexCoords];
|
||||
memcpy(texCoords, (uint8_t*)buffer + info.offsetTexCoords, info.numTexCoords * sizeof(FTexCoord));
|
||||
|
|
|
|||
|
|
@ -190,7 +190,7 @@ bool FMD3Model::Load(const char * path, int lumpnum, const char * buffer, int le
|
|||
void FMD3Model::LoadGeometry()
|
||||
{
|
||||
auto lumpdata = fileSystem.ReadFile(mLumpNum);
|
||||
auto buffer = lumpdata.GetString();
|
||||
auto buffer = lumpdata.string();
|
||||
md3_header_t * hdr = (md3_header_t *)buffer;
|
||||
md3_surface_t * surf = (md3_surface_t*)(buffer + LittleLong(hdr->Ofs_Surfaces));
|
||||
|
||||
|
|
|
|||
|
|
@ -71,9 +71,9 @@ void FUE1Model::LoadGeometry()
|
|||
{
|
||||
const char *buffer, *buffer2;
|
||||
auto lump = fileSystem.ReadFile(mDataLump);
|
||||
buffer = lump.GetString();
|
||||
buffer = lump.string();
|
||||
auto lump2 = fileSystem.ReadFile(mAnivLump);
|
||||
buffer2 = lump2.GetString();
|
||||
buffer2 = lump2.string();
|
||||
// map structures
|
||||
dhead = (const d3dhead*)(buffer);
|
||||
dpolys = (const d3dpoly*)(buffer+sizeof(d3dhead));
|
||||
|
|
|
|||
|
|
@ -162,8 +162,8 @@ FVoxel *R_LoadKVX(int lumpnum)
|
|||
int i, j, n;
|
||||
|
||||
auto lump = fileSystem.ReadFile(lumpnum); // FileData adds an extra 0 byte to the end.
|
||||
auto rawvoxel = lump.GetBytes();
|
||||
int voxelsize = (int)(lump.GetSize());
|
||||
auto rawvoxel = lump.bytes();
|
||||
int voxelsize = (int)(lump.size());
|
||||
|
||||
// Oh, KVX, why couldn't you have a proper header? We'll just go through
|
||||
// and collect each MIP level, doing lots of range checking, and if the
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue