mirror of
https://github.com/DrBeef/Raze.git
synced 2025-01-18 23:21:43 +00:00
- fixed compilation
This commit is contained in:
parent
bfd11f9cca
commit
53891004a0
3 changed files with 10 additions and 10 deletions
|
@ -539,7 +539,7 @@ static int32_t defsparser(scriptfile *script)
|
|||
break;
|
||||
}
|
||||
if (!check_tile("artfile", tile, script, cmdtokptr))
|
||||
TileFiles.LoadArtFile(fn, false, tile);
|
||||
TileFiles.LoadArtFile(fn, nullptr, tile);
|
||||
}
|
||||
break;
|
||||
case T_SETUPTILE:
|
||||
|
|
|
@ -145,7 +145,7 @@ void BuildTiles::AddTile(int tilenum, FTexture* tex, bool permap)
|
|||
//
|
||||
//===========================================================================
|
||||
|
||||
void BuildTiles::AddTiles (int firsttile, TArray<uint8_t>& RawData, bool permap)
|
||||
void BuildTiles::AddTiles (int firsttile, TArray<uint8_t>& RawData, const char *mapname)
|
||||
{
|
||||
|
||||
const uint8_t *tiles = RawData.Data();
|
||||
|
@ -362,7 +362,7 @@ void BuildTiles::MakeCanvas(int tilenum, int width, int height)
|
|||
//
|
||||
//===========================================================================
|
||||
|
||||
int BuildTiles::LoadArtFile(const char *fn, bool mapart, int firsttile)
|
||||
int BuildTiles::LoadArtFile(const char *fn, const char *mapname, int firsttile)
|
||||
{
|
||||
auto old = FindFile(fn);
|
||||
if (old >= ArtFiles.Size()) // Do not process if already loaded.
|
||||
|
@ -381,12 +381,12 @@ int BuildTiles::LoadArtFile(const char *fn, bool mapart, int firsttile)
|
|||
// Only load the data if the header is present
|
||||
if (CountTiles(fn, artptr) > 0)
|
||||
{
|
||||
auto& descs = mapart ? PerMapArtFiles : ArtFiles;
|
||||
auto& descs = mapname ? PerMapArtFiles : ArtFiles;
|
||||
auto file = new BuildArtFile;
|
||||
descs.Push(file);
|
||||
file->filename = fn;
|
||||
file->RawData = std::move(artdata);
|
||||
AddTiles(firsttile, file->RawData, mapart);
|
||||
AddTiles(firsttile, file->RawData, mapname);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -417,11 +417,11 @@ void BuildTiles::LoadArtSet(const char* filename)
|
|||
for (int index = 0; index < MAXARTFILES_BASE; index++)
|
||||
{
|
||||
FStringf fn(filename, index);
|
||||
LoadArtFile(fn, false);
|
||||
LoadArtFile(fn, nullptr);
|
||||
}
|
||||
for (auto& addart : addedArt)
|
||||
{
|
||||
LoadArtFile(addart, false);
|
||||
LoadArtFile(addart, nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -664,7 +664,7 @@ void artSetupMapArt(const char* filename)
|
|||
for (bssize_t i = 0; i < MAXARTFILES_TOTAL - MAXARTFILES_BASE; i++)
|
||||
{
|
||||
FStringf fullname("%s_%02d.art", filename, i);
|
||||
TileFiles.LoadArtFile(fullname, true);
|
||||
TileFiles.LoadArtFile(fullname, filename);
|
||||
}
|
||||
TileFiles.SetupReverseTileMap();
|
||||
}
|
||||
|
|
|
@ -293,7 +293,7 @@ struct BuildTiles
|
|||
|
||||
void AddTile(int tilenum, FTexture* tex, bool permap = false);
|
||||
|
||||
void AddTiles(int firsttile, TArray<uint8_t>& store, bool permap);
|
||||
void AddTiles(int firsttile, TArray<uint8_t>& store, const char *mapname);
|
||||
|
||||
void AddFile(BuildArtFile* bfd, bool permap)
|
||||
{
|
||||
|
@ -304,7 +304,7 @@ struct BuildTiles
|
|||
{
|
||||
return ArtFiles.FindEx([filename](const BuildArtFile* element) { return filename.CompareNoCase(element->filename) == 0; });
|
||||
}
|
||||
int LoadArtFile(const char* file, bool mapart = false, int firsttile = -1);
|
||||
int LoadArtFile(const char* file, const char *mapname = nullptr, int firsttile = -1);
|
||||
void CloseAllMapArt();
|
||||
void LoadArtSet(const char* filename);
|
||||
void AddArt(TArray<FString>& art)
|
||||
|
|
Loading…
Reference in a new issue