Inheritance diagram for Doomwad::ColorMap:

COLORMAP wad entry.
COLORMAP is a list of 34 maps that relate colors to palette entries:
COLORMAP Maps: 0-31, brightness (0 brightest, 31 darkest)
32, status bar/display window
33, black, unknown
Using the first 32 maps allows the engine to show sector brightness levels, since the whole screen must use the same palette. COLORMAP also allows the same brightness relationships between different palettes, so brightness works if the player picks up e.g. a radiation suit.
Each map is 256 bytes, one for each palette entry. The engine references the desired color in the COLORMAP, which then tells it which color in the PLAYPAL to use.
Essentially, COLORMAP is a two-dimensional array of bytes, 34 by 256.
Definition at line 88 of file colormap.hpp.
Public Member Functions | |
| ColorMap (const Lump &) throw () | |
| Construct from a Lump. | |
| ColorMap (void) throw () | |
| Default constructor. | |
| virtual bool | setFromLump (const Lump &lump) throw () |
| Convert a Lump to this entry. | |
| virtual Lump | toLump (void) const throw () |
| Convert this entry to a Lump. | |
| virtual std::string | toString (void) const throw () |
| Convert this entry to a std::string. | |
| virtual | ~ColorMap (void) throw () |
| Destructor. | |
Public Attributes | |
| byte | map [34][256] |
| Raw data. | |
Static Public Attributes | |
| static const std::string | NAME = "COLORMAP" |
| Name of an entry. | |
|
|
Construct from a Lump.
Definition at line 61 of file colormap.cpp. References setFromLump(). |
|
|
Convert a Lump to this entry. Lumps should not know about specific data structures. Those structures know about Lumps, including how to convert from them. Setting from a Lump involves parsing that Lump's contents to see if they are valid. If they are, then this object will contain what you expect it to. If not, it will return false and the atomic operation will not succeed.
Implements Doomwad::WadEntry. Definition at line 75 of file colormap.cpp. Referenced by ColorMap(). |
|
|
Convert this entry to a Lump. Each subclass must be able to convert itself to a Lump for storage in a Wad.
Implements Doomwad::WadEntry. Definition at line 82 of file colormap.cpp. References NAME. |
|
|
Convert this entry to a std::string. The exact implementation varies by the exact concrete class, but the idea is to convert the entry into a summary to be displayed to the user. Please note that converting to a string may lose information. This is not serialization in the purest sense of the word, this is merely a quick and dirty user-readable summary of the entry. True serialization is achieved by converting a Lump object and using its stream I/O functions to read and write.
Implements Doomwad::WadEntry. Definition at line 89 of file colormap.cpp. |
1.4.0