Files
firestorm/Gameleap/code/mw4/Libraries/Compost/TexturePool.hpp
T
Cyd 2b8ca921cb Initial full mirror of c:\VWE (source + assets + toolchain + outputs) via Git LFS
Complete disaster-recovery snapshot: engine/game source, game data assets,
VC6 toolchain + DX SDKs, build outputs, deployed game, and _UNUSED archive.
Large binaries in Git LFS; text preserved byte-for-byte (core.autocrlf=false,
no eol attributes). See RECOVERY.md for the one-clone rebuild procedure.
2026-06-24 21:28:16 -05:00

116 lines
1.9 KiB
C++

#pragma once
#define TEXTUREPOOL_HPP
#include "Compost.hpp"
namespace Compost
{
class TexturePool
{
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Constructors/Destructors
//
public:
TexturePool();
~TexturePool();
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Image handling
//
public:
int
Add(
Stuff::MString name,
int width,
int height,
Feature_Texture::TextureMode type
);
int
Add(
int index,
int width,
int height,
Feature_Texture::TextureMode type
);
Feature_Texture*
Get(const char* imageName);
Feature_Texture*
Get(int index);
int
GetIndex(Feature_Texture*);
bool
Load(const char* , int=0);
bool
Load(int index , int=0);
bool
Load(Feature_Texture *);
void
Remove(Feature_Texture *image);
void
Remove(const char* name);
void
Remove(int index);
void
LoadIndex();
void
LoadIndex(const char*);
void
LoadIndex(Stuff::NotationFile*);
bool
SaveIndex(const char*);
const char*
GetTexturePath()
{ Check_Pointer(this); return texturePath; }
void
SetTexturePath(const char *pName);
void
SetTexturePath(const char *pName, const char *tcf_filename);
Stuff::TableOf<Feature_Texture*, int>*
GetImageTable()
{ return &imageTable; }
static TexturePool *Instance;
bool
IsChanged()
{ Check_Pointer(this); return changed; }
void
IsChanged(bool b)
{ Check_Pointer(this); changed = b; }
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Testing
//
public:
void
TestInstance() const
{}
protected:
int
GetMask(int);
char*
texturePath;
Stuff::TableOf<Feature_Texture*, int>
imageTable;
int fill[16];
bool
changed;
};
}