Files
firestorm/Gameleap/code/mw4/Libraries/3dsmax2/include/STACK3.H
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

40 lines
899 B
C++

#ifndef _STACK3_H_
#define _STACK3_H_
#include "matrix3.h"
#define STACK_DEPTH 32 // default stack depth
class Matrix3Stack {
public:
DllExport Matrix3Stack();
DllExport Matrix3Stack(int depth);
DllExport ~Matrix3Stack();
BOOL replace(const Matrix3 &m)
{ stk[index] = m; return TRUE; }
BOOL push(const Matrix3 &m)
{ stk[index++] = m; return index < maxDepth; }
BOOL dup(void)
{ stk[index+1] = stk[index]; return ++index < maxDepth; }
BOOL concat(const Matrix3 &m)
{ stk[index] = m * stk[index]; return TRUE; }
Matrix3 & get(void)
{ return stk[index]; }
Matrix3 & pop(void)
{ return stk[index--]; }
BOOL remove(void)
{ return --index >= 0; }
BOOL reset(void)
{ index = 0; stk[0].IdentityMatrix(); return TRUE; }
private:
int maxDepth;
int index;
Matrix3 * stk;
};
#endif // _STACK3_H_