R-PAGE
Resistance's Portable-Adventure-Game-Engine
color.h
Go to the documentation of this file.
1 /* Resistance's Portable-Adventure-Game-Engine (R-PAGE), Copyright (C) 2019 François Gutherz, Resistance.no
2  Released under MIT License, see license.txt for details.
3 */
4 
5 #ifdef LATTICE
6 #ifndef COLOR_ROUTINES
7 #define COLOR_ROUTINES
8 
10 #include "rpage/utils.h"
11 #include "rpage/aos/inc.prl"
12 #include <intuition/intuition.h>
13 #include <graphics/gfxbase.h>
14 
15 #define FADE_STEP_DEFAULT 16
16 
17 typedef UWORD color444;
18 typedef ULONG color888;
19 
20 #ifdef VGA_CAPABLE
21 typedef color888 amiga_color;
22 #else
23 typedef color444 amiga_color;
24 #endif
25 
26 color444 components_to_rgb4(UWORD r, UWORD g, UWORD b);
27 UWORD color_to_depth(UWORD colors);
28 UWORD mix_rgb4_colors(color444 A, color444 B, USHORT n);
29 void mix_rgb4_palette_to_black(struct ViewPort *vp, color444 *pal, UWORD pal_size, UWORD fade);
30 UWORD darken_rgb4_colors(UWORD A, USHORT n);
31 // void mix_rgb4_palette_to_black_as_rgb8(struct ViewPort *vp, color444 *pal, UWORD pal_size, color888 rgb8color, UWORD fade);
32 // void mix_rgb4_palettes(struct ViewPort *vp, amiga_color *source_palette, amiga_color *dest_palette, UWORD pal_size, UWORD fade);
33 color888 rgb4_to_rgb8(color444 A);
34 color444 rgb8_to_rgb4(color888 A);
35 color888 mix_rgb8_colors(color888 A, color888 B, UWORD n);
36 color888 add_rgb8_colors(color888 A, color888 B);
37 color888 divide_rgb8_colors(color888 A, UWORD n);
38 void set_palette_to_black(struct ViewPort *vp, UWORD first_color, UWORD last_color);
39 void set_palette_to_grey(struct ViewPort *vp, UWORD first_color, UWORD last_color);
40 void set_palette(struct ViewPort *vp, amiga_color **palette, UWORD first_color, UWORD last_color);
41 // void fadein_rgb4_palette(struct ViewPort *current_viewport, color444 *current_palette, UWORD pal_size, unsigned short steps);
42 // void fadeout_rgb4_palette(struct ViewPort *current_viewport, color444 *current_palette, UWORD pal_size, unsigned short steps);
43 // void fade_rgb4_palettes(struct ViewPort *current_viewport, color444 *source_palette, color444 *dest_palette, UWORD pal_size, unsigned short steps);
44 
45 #endif
46 #endif
unsigned short UWORD
Definition: utils.h:28
unsigned long ULONG
Definition: utils.h:24