22#ifndef MADS_CORE_PAL_H
23#define MADS_CORE_PAL_H
25#include "mads/core/general.h"
26#include "mads/core/color.h"
32#define PAL_MAP_BACKGROUND 0x8000
33#define PAL_MAP_RESERVED 0x4000
34#define PAL_MAP_ANY_TO_CLOSEST 0x2000
35#define PAL_MAP_ALL_TO_CLOSEST 0x1000
36#define PAL_MAP_TOP_COLORS 0x0800
37#define PAL_MAP_DEFINE_RESERVED 0x0400
39#define PAL_MAP_MASK 0xfc00
47#define PAL_FORCE_SHADOW 240
51#define PAL_MAXFLAGS 0x20
53#define PAL_RESERVED 0x0001
54#define PAL_CYCLE 0x0002
59#define PAL_ERR_BADFLAG -1
60#define PAL_ERR_FLAGNOTUSED -2
65#define PAL_ERR_OUTOFFLAGS -10
66#define PAL_ERR_OUTOFCOLORS -11
72extern ShadowListPtr master_shadow;
74extern dword color_status[256];
75extern int flag_used[PAL_MAXFLAGS];
77extern int palette_locked;
79extern int palette_low_search_limit;
80extern int palette_high_search_limit;
82extern void (*pal_manager_update)();
83extern int pal_manager_active;
84extern int pal_manager_colors;
92extern void pal_init(
int reserve_bottom,
int reserve_top);
94extern void pal_lock();
95extern void pal_unlock();
122extern int pal_allocate(ColorListPtr new_list, ShadowListPtr shadow_list,
int pal_flags);
133extern int pal_deallocate(
int use_flag);
139extern void pal_compact(int16 master_handle,
int num_slaves, int16 *slave);
144extern int pal_get_hash(RGBcolor *one, RGBcolor *two);
149extern void pal_shadow_sort(ShadowListPtr shadow, ColorListPtr list);
154extern void pal_init_shadow(ShadowListPtr shadow, ColorListPtr new_list);
155extern void pal_activate_shadow(ShadowListPtr shadow);
160extern int pal_get_flags();
165extern int pal_get_colors();
166extern void pal_interface(
Palette &fixpal);
167extern void pal_white(
Palette &fixpal);
168extern void pal_grey(
Palette &fixpal,
int base_color,
int num_colors,
169 int low_grey,
int high_grey);
170extern int pal_get_color(RGBcolor color,
int color_handle,
171 int override_reserved,
int *color_number);
172extern void pal_change_color(
int color,
int r,
int g,
int b);
174extern void init_pal();
180extern int pal_alloc_color(
int slot,
int allow_shared,
int *out_index,
const RGBcolor *color);
Definition: atari-screen.h:42