mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 11:10:47 +00:00
Fixed stupid typo in class name
It should read BuildTiles, not BuildFiles. It's a tile manager, not a file manager!
This commit is contained in:
parent
0c4ffdea43
commit
1269a1715f
2 changed files with 23 additions and 23 deletions
|
@ -51,7 +51,7 @@ enum
|
||||||
|
|
||||||
extern char* palookup[];
|
extern char* palookup[];
|
||||||
|
|
||||||
BuildFiles TileFiles;
|
BuildTiles TileFiles;
|
||||||
|
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
//
|
//
|
||||||
|
@ -125,7 +125,7 @@ FArtTile* GetTileTexture(const char* name, const TArray<uint8_t>& backingstore,
|
||||||
//
|
//
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
||||||
void BuildFiles::AddTile(int tilenum, FTexture* tex, bool permap)
|
void BuildTiles::AddTile(int tilenum, FTexture* tex, bool permap)
|
||||||
{
|
{
|
||||||
assert(AllTiles.Find(tex) == AllTiles.Size() && AllMapTiles.Find(tex) == AllMapTiles.Size());
|
assert(AllTiles.Find(tex) == AllTiles.Size() && AllMapTiles.Find(tex) == AllMapTiles.Size());
|
||||||
auto& array = permap ? AllMapTiles : AllTiles;
|
auto& array = permap ? AllMapTiles : AllTiles;
|
||||||
|
@ -142,7 +142,7 @@ void BuildFiles::AddTile(int tilenum, FTexture* tex, bool permap)
|
||||||
//
|
//
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
|
|
||||||
void BuildFiles::AddTiles (int firsttile, TArray<uint8_t>& RawData, bool permap)
|
void BuildTiles::AddTiles (int firsttile, TArray<uint8_t>& RawData, bool permap)
|
||||||
{
|
{
|
||||||
|
|
||||||
const uint8_t *tiles = RawData.Data();
|
const uint8_t *tiles = RawData.Data();
|
||||||
|
@ -218,7 +218,7 @@ int CountTiles (const char *fn, const uint8_t *RawData)
|
||||||
//
|
//
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
|
|
||||||
void BuildFiles::CloseAllMapArt()
|
void BuildTiles::CloseAllMapArt()
|
||||||
{
|
{
|
||||||
AllMapTiles.DeleteAndClear();
|
AllMapTiles.DeleteAndClear();
|
||||||
PerMapArtFiles.DeleteAndClear();
|
PerMapArtFiles.DeleteAndClear();
|
||||||
|
@ -232,7 +232,7 @@ void BuildFiles::CloseAllMapArt()
|
||||||
//
|
//
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
|
|
||||||
void BuildFiles::ClearTextureCache(bool artonly)
|
void BuildTiles::ClearTextureCache(bool artonly)
|
||||||
{
|
{
|
||||||
for (auto tex : AllTiles)
|
for (auto tex : AllTiles)
|
||||||
{
|
{
|
||||||
|
@ -254,7 +254,7 @@ void BuildFiles::ClearTextureCache(bool artonly)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void BuildFiles::InvalidateTile(int num)
|
void BuildTiles::InvalidateTile(int num)
|
||||||
{
|
{
|
||||||
if ((unsigned) num < MAXTILES)
|
if ((unsigned) num < MAXTILES)
|
||||||
{
|
{
|
||||||
|
@ -282,7 +282,7 @@ void BuildFiles::InvalidateTile(int num)
|
||||||
//
|
//
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
|
|
||||||
int BuildFiles::LoadArtFile(const char *fn, bool mapart, int firsttile)
|
int BuildTiles::LoadArtFile(const char *fn, bool mapart, int firsttile)
|
||||||
{
|
{
|
||||||
auto old = FindFile(fn);
|
auto old = FindFile(fn);
|
||||||
if (old >= ArtFiles.Size()) // Do not process if already loaded.
|
if (old >= ArtFiles.Size()) // Do not process if already loaded.
|
||||||
|
@ -332,7 +332,7 @@ int BuildFiles::LoadArtFile(const char *fn, bool mapart, int firsttile)
|
||||||
//
|
//
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
||||||
void BuildFiles::LoadArtSet(const char* filename)
|
void BuildTiles::LoadArtSet(const char* filename)
|
||||||
{
|
{
|
||||||
for (int index = 0; index < MAXARTFILES_BASE; index++)
|
for (int index = 0; index < MAXARTFILES_BASE; index++)
|
||||||
{
|
{
|
||||||
|
@ -352,7 +352,7 @@ void BuildFiles::LoadArtSet(const char* filename)
|
||||||
//
|
//
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
||||||
FTexture* BuildFiles::ValidateCustomTile(int tilenum, int type)
|
FTexture* BuildTiles::ValidateCustomTile(int tilenum, int type)
|
||||||
{
|
{
|
||||||
if (tilenum < 0 || tilenum >= MAXTILES) return nullptr;
|
if (tilenum < 0 || tilenum >= MAXTILES) return nullptr;
|
||||||
if (tiles[tilenum] != tilesbak[tilenum]) return nullptr; // no mucking around with map tiles.
|
if (tiles[tilenum] != tilesbak[tilenum]) return nullptr; // no mucking around with map tiles.
|
||||||
|
@ -393,7 +393,7 @@ FTexture* BuildFiles::ValidateCustomTile(int tilenum, int type)
|
||||||
//
|
//
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
||||||
int32_t BuildFiles::artLoadFiles(const char* filename)
|
int32_t BuildTiles::artLoadFiles(const char* filename)
|
||||||
{
|
{
|
||||||
TileFiles.LoadArtSet(filename);
|
TileFiles.LoadArtSet(filename);
|
||||||
memset(gotpic, 0, sizeof(gotpic));
|
memset(gotpic, 0, sizeof(gotpic));
|
||||||
|
@ -407,7 +407,7 @@ int32_t BuildFiles::artLoadFiles(const char* filename)
|
||||||
//
|
//
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
||||||
uint8_t* BuildFiles::tileCreate(int tilenum, int width, int height)
|
uint8_t* BuildTiles::tileCreate(int tilenum, int width, int height)
|
||||||
{
|
{
|
||||||
if (width <= 0 || height <= 0) return nullptr;
|
if (width <= 0 || height <= 0) return nullptr;
|
||||||
auto tex = ValidateCustomTile(tilenum, FTexture::Writable);
|
auto tex = ValidateCustomTile(tilenum, FTexture::Writable);
|
||||||
|
@ -424,7 +424,7 @@ uint8_t* BuildFiles::tileCreate(int tilenum, int width, int height)
|
||||||
//
|
//
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
||||||
uint8_t * BuildFiles::tileMakeWritable(int num)
|
uint8_t * BuildTiles::tileMakeWritable(int num)
|
||||||
{
|
{
|
||||||
auto tex = ValidateCustomTile(num, FTexture::Restorable);
|
auto tex = ValidateCustomTile(num, FTexture::Restorable);
|
||||||
return tex ? tex->GetWritableBuffer() : nullptr;
|
return tex ? tex->GetWritableBuffer() : nullptr;
|
||||||
|
@ -440,7 +440,7 @@ uint8_t * BuildFiles::tileMakeWritable(int num)
|
||||||
//
|
//
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
||||||
void BuildFiles::tileSetExternal(int tilenum, int width, int height, uint8_t* data)
|
void BuildTiles::tileSetExternal(int tilenum, int width, int height, uint8_t* data)
|
||||||
{
|
{
|
||||||
uint8_t* buffer = tileCreate(tilenum, width, height);
|
uint8_t* buffer = tileCreate(tilenum, width, height);
|
||||||
if (buffer) memcpy(buffer, data, width * height);
|
if (buffer) memcpy(buffer, data, width * height);
|
||||||
|
@ -651,7 +651,7 @@ bool tileLoad(int tileNum)
|
||||||
//
|
//
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
||||||
int BuildFiles::findUnusedTile(void)
|
int BuildTiles::findUnusedTile(void)
|
||||||
{
|
{
|
||||||
static int lastUnusedTile = MAXUSERTILES - 1;
|
static int lastUnusedTile = MAXUSERTILES - 1;
|
||||||
|
|
||||||
|
@ -663,7 +663,7 @@ int BuildFiles::findUnusedTile(void)
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int BuildFiles::tileCreateRotated(int tileNum)
|
int BuildTiles::tileCreateRotated(int tileNum)
|
||||||
{
|
{
|
||||||
if ((unsigned)tileNum >= MAXTILES) return tileNum;
|
if ((unsigned)tileNum >= MAXTILES) return tileNum;
|
||||||
auto tex = TileFiles.tiles[tileNum];
|
auto tex = TileFiles.tiles[tileNum];
|
||||||
|
@ -704,7 +704,7 @@ void tileSetAnim(int tile, const picanm_t& anm)
|
||||||
//
|
//
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
||||||
FTexture* BuildFiles::GetTexture(const char* path)
|
FTexture* BuildTiles::GetTexture(const char* path)
|
||||||
{
|
{
|
||||||
auto res = textures.CheckKey(path);
|
auto res = textures.CheckKey(path);
|
||||||
if (res) return *res;
|
if (res) return *res;
|
||||||
|
@ -719,7 +719,7 @@ FTexture* BuildFiles::GetTexture(const char* path)
|
||||||
//
|
//
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
||||||
void BuildFiles::CloseAll()
|
void BuildTiles::CloseAll()
|
||||||
{
|
{
|
||||||
decltype(textures)::Iterator it(textures);
|
decltype(textures)::Iterator it(textures);
|
||||||
decltype(textures)::Pair* pair;
|
decltype(textures)::Pair* pair;
|
||||||
|
|
|
@ -193,7 +193,7 @@ struct FTextureBuffer
|
||||||
// Base texture class
|
// Base texture class
|
||||||
class FTexture
|
class FTexture
|
||||||
{
|
{
|
||||||
friend struct BuildFiles;
|
friend struct BuildTiles;
|
||||||
friend bool tileLoad(int tileNum);
|
friend bool tileLoad(int tileNum);
|
||||||
friend const uint8_t* tilePtr(int num);
|
friend const uint8_t* tilePtr(int num);
|
||||||
|
|
||||||
|
@ -310,7 +310,7 @@ protected:
|
||||||
TMap<int, FHardwareTexture*> HardwareTextures; // Note: These must be deleted by the backend. When the texture manager is taken down it may already be too late to delete them.
|
TMap<int, FHardwareTexture*> HardwareTextures; // Note: These must be deleted by the backend. When the texture manager is taken down it may already be too late to delete them.
|
||||||
|
|
||||||
FTexture (const char *name = NULL);
|
FTexture (const char *name = NULL);
|
||||||
friend struct BuildFiles;
|
friend struct BuildTiles;
|
||||||
};
|
};
|
||||||
|
|
||||||
class FTileTexture : public FTexture
|
class FTileTexture : public FTexture
|
||||||
|
@ -497,7 +497,7 @@ struct BuildArtFile
|
||||||
//
|
//
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
||||||
struct BuildFiles
|
struct BuildTiles
|
||||||
{
|
{
|
||||||
FTexture* Placeholder;
|
FTexture* Placeholder;
|
||||||
TDeletingArray<BuildArtFile*> ArtFiles;
|
TDeletingArray<BuildArtFile*> ArtFiles;
|
||||||
|
@ -508,13 +508,13 @@ struct BuildFiles
|
||||||
FTexture* tilesbak[MAXTILES];
|
FTexture* tilesbak[MAXTILES];
|
||||||
TMap<FString, FTexture*> textures;
|
TMap<FString, FTexture*> textures;
|
||||||
|
|
||||||
BuildFiles()
|
BuildTiles()
|
||||||
{
|
{
|
||||||
Placeholder = new FDummyTile(0, 0);
|
Placeholder = new FDummyTile(0, 0);
|
||||||
for (auto& tile : tiles) tile = Placeholder;
|
for (auto& tile : tiles) tile = Placeholder;
|
||||||
for (auto& tile : tilesbak) tile = Placeholder;
|
for (auto& tile : tilesbak) tile = Placeholder;
|
||||||
}
|
}
|
||||||
~BuildFiles()
|
~BuildTiles()
|
||||||
{
|
{
|
||||||
CloseAll();
|
CloseAll();
|
||||||
}
|
}
|
||||||
|
@ -563,7 +563,7 @@ int tileSetHightileReplacement(int picnum, int palnum, const char *filen, float
|
||||||
int tileSetSkybox(int picnum, int palnum, const char **facenames, int flags );
|
int tileSetSkybox(int picnum, int palnum, const char **facenames, int flags );
|
||||||
int tileDeleteReplacement(int picnum, int palnum);
|
int tileDeleteReplacement(int picnum, int palnum);
|
||||||
|
|
||||||
extern BuildFiles TileFiles;
|
extern BuildTiles TileFiles;
|
||||||
inline bool tileCheck(int num)
|
inline bool tileCheck(int num)
|
||||||
{
|
{
|
||||||
auto tex = TileFiles.tiles[num];
|
auto tex = TileFiles.tiles[num];
|
||||||
|
|
Loading…
Reference in a new issue