avp_mod is an open source project powered by Assembla

Assembla offers free public and private SVN/Git repositories and project hosting with bug/issue tracking and collaboration tools.

Commitebd360ec63ec976c0...
/c++include
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#ifndef _included_chunkpal_hpp_
#define _included_chunkpal_hpp_

#include "bmpnames.hpp"
#include <cstring>
class Environment_Data_Chunk;
class Environment_TLT_Chunk : public Chunk
{
public:
    Environment_TLT_Chunk (Chunk_With_Children * parent, const char * sdata, size_t ssize);

    ~Environment_TLT_Chunk ();

    virtual size_t size_chunk ();
    virtual void fill_data_block (char * data_start);

    int width; // should be == palette size, though may well have to be 256 due to the way 3dc lookup works
    int num_levels; // usually 256, for 256 "different" shades of each colour

    #define ChunkTLT_NumReserved 5
    int reserved[ ChunkTLT_NumReserved ];

    int flags; // either expect filename or table
    #define ChunkTLTFlag_ExternalFile   0x00000001

    std::string filename; // either a filename

    uint8_t * table; // or an actual table in memory

private:
    friend class Environment_Data_Chunk;
    friend class Environment_Game_Mode_Chunk;
};

class Environment_Game_Mode_Header_Chunk : public Chunk
{
public:
    Environment_Game_Mode_Header_Chunk (Chunk_With_Children * const parent, const char * pdata, size_t const psize);
    virtual size_t size_chunk ();

    virtual void fill_data_block (char * data_start);

    int id_equals(const char * s)
    {
        return !strcasecmp(s, mode_identifier.c_str());
    }

    int flags;
    std::string mode_identifier;

private:

    friend class Environment_Game_Mode_Chunk;

    std::list<std::string> rif_files; // where the game mode goes to or comes from

    #define ChunkGMod_NumReserved 3
    int reserved[ChunkGMod_NumReserved];

    int version_num;
};

class Environment_Game_Mode_Chunk : public Chunk_With_Children
{
public:
    Environment_Game_Mode_Chunk (Chunk_With_Children * const parent, const char * sdata, size_t const ssize);

    ~Environment_Game_Mode_Chunk(){}
    Environment_Game_Mode_Header_Chunk * header;
    Environment_Data_Chunk * const envd_parent;

    int id_equals(const char * s) const { return header->id_equals(s); }

private:
    friend class Environment_Data_Chunk;
};
#endif
Ajax-loader Loading, please wait...