mirror of
https://github.com/halpz/re3.git
synced 2025-06-26 20:46:21 +00:00
41
src/render/TexList.cpp
Normal file
41
src/render/TexList.cpp
Normal file
@ -0,0 +1,41 @@
|
||||
#include "common.h"
|
||||
#include "TexList.h"
|
||||
#include "rtbmp.h"
|
||||
#include "FileMgr.h"
|
||||
|
||||
bool CTexList::ms_nTexUsed[MAX_TEXUSED];
|
||||
|
||||
void
|
||||
CTexList::Initialise()
|
||||
{}
|
||||
|
||||
void
|
||||
CTexList::Shutdown()
|
||||
{}
|
||||
|
||||
RwTexture *
|
||||
CTexList::SetTexture(int32 slot, char *name)
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
int32
|
||||
CTexList::GetFirstFreeTexture()
|
||||
{
|
||||
for (int32 i = 0; i < MAX_TEXUSED; i++)
|
||||
if (!ms_nTexUsed[i])
|
||||
return i;
|
||||
return -1;
|
||||
}
|
||||
|
||||
RwTexture *
|
||||
CTexList::LoadFileNameTexture(char *name)
|
||||
{
|
||||
return SetTexture(GetFirstFreeTexture(), name);
|
||||
}
|
||||
|
||||
void
|
||||
CTexList::LoadGlobalTextureList()
|
||||
{
|
||||
CFileMgr::SetDir("TEXTURES");
|
||||
}
|
14
src/render/TexList.h
Normal file
14
src/render/TexList.h
Normal file
@ -0,0 +1,14 @@
|
||||
#pragma once
|
||||
|
||||
class CTexList
|
||||
{
|
||||
enum { MAX_TEXUSED = 400, };
|
||||
static bool ms_nTexUsed[MAX_TEXUSED];
|
||||
public:
|
||||
static void Initialise();
|
||||
static void Shutdown();
|
||||
static RwTexture *SetTexture(int32 slot, char *name);
|
||||
static int32 GetFirstFreeTexture();
|
||||
static RwTexture *LoadFileNameTexture(char *name);
|
||||
static void LoadGlobalTextureList();
|
||||
};
|
Reference in New Issue
Block a user