diff options
| author | Rebellion Developments <rebellion@nomail> | 2000-03-16 11:25:00 +0100 |
|---|---|---|
| committer | Patryk Obara <dreamer.tan@gmail.com> | 2019-08-19 05:45:17 +0200 |
| commit | 218ca90543758a20ac326e444ca0643174ca7384 (patch) | |
| tree | 16bfe3e5307f9f515489000f28728224291a0e3b /3dc/win95/ENUMSCH.HPP | |
Import Aliens vs Predator - Gold (Build 116)
Source code release, imported from:
https://www.gamefront.com/games/aliens-vs-predator-3/file/avp-gold-complete-source-code
All text files were converted to Unix format.
Diffstat (limited to '3dc/win95/ENUMSCH.HPP')
| -rw-r--r-- | 3dc/win95/ENUMSCH.HPP | 91 |
1 files changed, 91 insertions, 0 deletions
diff --git a/3dc/win95/ENUMSCH.HPP b/3dc/win95/ENUMSCH.HPP new file mode 100644 index 0000000..a332b84 --- /dev/null +++ b/3dc/win95/ENUMSCH.HPP @@ -0,0 +1,91 @@ +#ifndef _included_enumsch_hpp_ +#define _included_enumsch_hpp_ + +#include "chunk.hpp" + +class Enum_Constant +{ +public: + char * cname; + int value; + int reserved; + + Enum_Constant() : cname(0), value(0), reserved(0) {} + + ~Enum_Constant() + { + if (cname) delete[] cname; + } + + Enum_Constant(char const * const _cname, int const _value); + Enum_Constant(Enum_Constant const & ec2); + + Enum_Constant & operator = (Enum_Constant const & ec2); + + BOOL operator == (Enum_Constant const & ec2) const; + BOOL operator != (Enum_Constant const & ec2) const; + BOOL operator < (Enum_Constant const & ec2) const; + +private: + + friend class BMP_Enums_Chunk; + + // constructor from buffer + Enum_Constant(char const * sdata); + + size_t size_chunk() const; + + void fill_data_block(char * data_start); +}; + + +class Enum_Const_List +{ +public: + List<Enum_Constant> enums; + + virtual ~Enum_Const_List(){} +#if cencon + int lowest_free_index(void); + void Sort_By_Name(void); +#endif +}; + + +class BMP_Enums_Chunk : public Chunk, public Enum_Const_List +{ +public: + // constructor from buffer + BMP_Enums_Chunk (Chunk_With_Children * const parent, char const * sdata, size_t const ssize); + +#if cencon + // empty constructor + BMP_Enums_Chunk (Chunk_With_Children * const parent) + : Chunk(parent,"BMPENUMS") + , ctype(0) + , reserved1(0) + , reserved2(0) + {} +#endif + + ~BMP_Enums_Chunk () + { + if (ctype) delete[] ctype; + } + + virtual size_t size_chunk (); + virtual void fill_data_block (char * data_start); + + char * ctype; + int reserved1; + int reserved2; + // List<Enum_Constant> enums; + +private: + + friend class Enum_Chunk; + +}; + + +#endif // !_included_enumsch_hpp_ |
