Added MAX_GLOBAL_FROM_LOCAL constant and implemented skelChannelList_s::GlobalChannel and skelChannelList_s::LocalChannel

This commit is contained in:
smallmodel 2024-06-04 20:50:08 +02:00
parent 77de0b78ba
commit 2b66672d2d
No known key found for this signature in database
GPG key ID: 9F2D623CEDF08512
2 changed files with 17 additions and 4 deletions

View file

@ -71,6 +71,18 @@ int FileLength(FILE *pFile)
return iEnd;
}
int skelChannelList_s::GlobalChannel(int localchannel) const
{
assert(localchannel < MAX_GLOBAL_FROM_LOCAL);
return m_chanGlobalFromLocal[localchannel];
}
int skelChannelList_s::LocalChannel(int channel) const
{
return m_chanLocalFromGlobal[channel];
}
int skelChannelList_s::GetLocalFromGlobal(int globalChannel) const
{
if (m_chanLocalFromGlobal && globalChannel < m_numLocalFromGlobal) {

View file

@ -91,9 +91,10 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#define TIKI_SURF_NOMIPMAPS (1 << 8)
#define TIKI_SURF_NOPICMIP (1 << 9)
#define MAX_SKELMODELS 12
#define MAX_TIKI_SHADER 4
#define MAX_TIKI_ALIASES 4095
#define MAX_SKELMODELS 12
#define MAX_TIKI_SHADER 4
#define MAX_TIKI_ALIASES 4095
#define MAX_GLOBAL_FROM_LOCAL 200
typedef struct AliasList_s AliasList_t;
typedef struct AliasListNode_s AliasListNode_t;
@ -120,7 +121,7 @@ private:
short int *m_chanLocalFromGlobal;
public:
short int m_chanGlobalFromLocal[200];
short int m_chanGlobalFromLocal[MAX_GLOBAL_FROM_LOCAL];
int NumChannels(void) const;
void ZeroChannels(void);