fallout2-ce/src/color.h

49 lines
1.7 KiB
C
Raw Normal View History

2022-05-19 01:51:26 -07:00
#ifndef COLOR_H
#define COLOR_H
#include "memory_defs.h"
2022-09-23 05:43:44 -07:00
namespace fallout {
2022-12-27 04:51:43 -08:00
typedef unsigned char Color;
typedef const char*(ColorFileNameManger)(const char*);
2022-05-19 01:51:26 -07:00
typedef void(ColorTransitionCallback)();
typedef int(ColorPaletteFileOpenProc)(const char* path, int mode);
typedef int(ColorPaletteFileReadProc)(int fd, void* buffer, size_t size);
typedef int(ColorPaletteCloseProc)(int fd);
extern unsigned char _cmap[768];
extern unsigned char _systemCmap[256 * 3];
extern unsigned char _currentGammaTable[64];
extern unsigned char* _blendTable[256];
extern unsigned char _mappedColor[256];
2022-12-27 04:51:43 -08:00
extern Color colorMixAddTable[256][256];
extern Color intensityColorTable[256][256];
extern Color colorMixMulTable[256][256];
2022-05-19 01:51:26 -07:00
extern unsigned char _colorTable[32768];
void colorPaletteSetFileIO(ColorPaletteFileOpenProc* openProc, ColorPaletteFileReadProc* readProc, ColorPaletteCloseProc* closeProc);
2022-12-27 04:51:43 -08:00
int _calculateColor(int intensity, Color color);
2022-05-19 01:51:26 -07:00
int _Color2RGB_(int a1);
void colorPaletteFadeBetween(unsigned char* oldPalette, unsigned char* newPalette, int steps);
void colorPaletteSetTransitionCallback(ColorTransitionCallback* callback);
void _setSystemPalette(unsigned char* palette);
unsigned char* _getSystemPalette();
void _setSystemPaletteEntries(unsigned char* a1, int a2, int a3);
bool colorPaletteLoad(const char* path);
2022-05-19 01:51:26 -07:00
char* _colorError();
unsigned char* _getColorBlendTable(int ch);
void _freeColorBlendTable(int a1);
void colorPaletteSetMemoryProcs(MallocProc* mallocProc, ReallocProc* reallocProc, FreeProc* freeProc);
void colorSetBrightness(double value);
bool colorPushColorPalette();
bool colorPopColorPalette();
2022-05-19 01:51:26 -07:00
bool _initColors();
void _colorsClose();
2022-09-23 05:43:44 -07:00
} // namespace fallout
2022-05-19 01:51:26 -07:00
#endif /* COLOR_H */