SRB2/src/r_translation.h

51 lines
1.8 KiB
C
Raw Normal View History

2023-10-29 23:33:49 +00:00
// SONIC ROBO BLAST 2
//-----------------------------------------------------------------------------
// Copyright (C) 2023 by Sonic Team Junior.
//
// This program is free software distributed under the
// terms of the GNU General Public License, version 2.
// See the 'LICENSE' file for more details.
//-----------------------------------------------------------------------------
/// \file r_translation.h
/// \brief Translations
2023-10-30 17:54:32 +00:00
#ifndef __R_TRANSLATION__
#define __R_TRANSLATION__
2023-10-29 23:33:49 +00:00
#include "doomdef.h"
typedef struct
{
UINT8 remap[256];
unsigned num_entries;
} remaptable_t;
void PaletteRemap_Init(void);
remaptable_t *PaletteRemap_New(void);
remaptable_t *PaletteRemap_Copy(remaptable_t *tr);
boolean PaletteRemap_Equal(remaptable_t *a, remaptable_t *b);
void PaletteRemap_SetIdentity(remaptable_t *tr);
boolean PaletteRemap_IsIdentity(remaptable_t *tr);
unsigned PaletteRemap_Add(remaptable_t *tr);
boolean PaletteRemap_AddIndexRange(remaptable_t *tr, int start, int end, int pal1, int pal2);
boolean PaletteRemap_AddColorRange(remaptable_t *tr, int start, int end, int _r1,int _g1, int _b1, int _r2, int _g2, int _b2);
boolean PaletteRemap_AddDesaturation(remaptable_t *tr, int start, int end, double r1, double g1, double b1, double r2, double g2, double b2);
boolean PaletteRemap_AddColourisation(remaptable_t *tr, int start, int end, int r, int g, int b);
boolean PaletteRemap_AddTint(remaptable_t *tr, int start, int end, int r, int g, int b, int amount);
struct PaletteRemapParseResult
{
char error[4096];
};
2023-10-30 17:54:32 +00:00
struct PaletteRemapParseResult *PaletteRemap_ParseTranslation(remaptable_t *tr, const char *translation);
2023-10-29 23:33:49 +00:00
int R_FindCustomTranslation(const char *name);
void R_AddCustomTranslation(const char *name, int trnum);
remaptable_t *R_GetTranslationByID(int id);
void R_LoadTrnslateLumps(void);
2023-10-30 17:54:32 +00:00
#endif