| 1 |
/* |
| 2 |
* Portions of this file are copyright Rebirth contributors and licensed as |
| 3 |
* described in COPYING.txt. |
| 4 |
* Portions of this file are copyright Parallax Software and licensed |
| 5 |
* according to the Parallax license below. |
| 6 |
* See COPYING.txt for license details. |
| 7 |
|
| 8 |
THE COMPUTER CODE CONTAINED HEREIN IS THE SOLE PROPERTY OF PARALLAX |
| 9 |
SOFTWARE CORPORATION ("PARALLAX"). PARALLAX, IN DISTRIBUTING THE CODE TO |
| 10 |
END-USERS, AND SUBJECT TO ALL OF THE TERMS AND CONDITIONS HEREIN, GRANTS A |
| 11 |
ROYALTY-FREE, PERPETUAL LICENSE TO SUCH END-USERS FOR USE BY SUCH END-USERS |
| 12 |
IN USING, DISPLAYING, AND CREATING DERIVATIVE WORKS THEREOF, SO LONG AS |
| 13 |
SUCH USE, DISPLAY OR CREATION IS FOR NON-COMMERCIAL, ROYALTY OR REVENUE |
| 14 |
FREE PURPOSES. IN NO EVENT SHALL THE END-USER USE THE COMPUTER CODE |
| 15 |
CONTAINED HEREIN FOR REVENUE-BEARING PURPOSES. THE END-USER UNDERSTANDS |
| 16 |
AND AGREES TO THE TERMS HEREIN AND ACCEPTS THE SAME BY USE OF THIS FILE. |
| 17 |
COPYRIGHT 1993-1999 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED. |
| 18 |
*/ |
| 19 |
|
| 20 |
/* |
| 21 |
* |
| 22 |
* Header for gamepal.c |
| 23 |
* |
| 24 |
*/ |
| 25 |
|
| 26 |
#pragma once |
| 27 |
#include <array> |
| 28 |
#include <cstddef> |
| 29 |
|
| 30 |
namespace dcx { |
| 31 |
template <std::size_t> |
| 32 |
struct PHYSFSX_gets_line_t; |
| 33 |
} |
| 34 |
|
| 35 |
#ifdef DXX_BUILD_DESCENT |
| 36 |
#if DXX_BUILD_DESCENT == 2 |
| 37 |
#include <span> |
| 38 |
#include "inferno.h" |
| 39 |
|
| 40 |
namespace dsx { |
| 41 |
|
| 42 |
enum class load_palette_use : bool |
| 43 |
{ |
| 44 |
background, |
| 45 |
level, |
| 46 |
}; |
| 47 |
|
| 48 |
enum class load_palette_change_screen : bool |
| 49 |
{ |
| 50 |
immediate, |
| 51 |
delayed, |
| 52 |
}; |
| 53 |
|
| 54 |
#define D2_DEFAULT_PALETTE "default.256" |
| 55 |
#define MENU_PALETTE "default.256" |
| 56 |
|
| 57 |
extern char last_palette_loaded[FILENAME_LEN]; |
| 58 |
extern PHYSFSX_gets_line_t<FILENAME_LEN> Current_level_palette; |
| 59 |
extern std::array<char, FILENAME_LEN> last_palette_loaded_pig; |
| 60 |
|
| 61 |
// load a palette by name. returns 1 if new palette loaded, else 0 |
| 62 |
// if used_for_level is set, load pig, etc. |
| 63 |
// if no_change_screen is set, the current screen does not get |
| 64 |
// remapped, and the hardware palette does not get changed |
| 65 |
int load_palette(std::span<const char> name, load_palette_use used_for_level, load_palette_change_screen change_screen); |
| 66 |
void load_palette_for_pig(std::span<const char> name); |
| 67 |
|
| 68 |
} |
| 69 |
#endif |
| 70 |
#endif |