| 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 file for Inferno. Should be included in all source files. |
| 23 |
* |
| 24 |
*/ |
| 25 |
|
| 26 |
#pragma once |
| 27 |
|
| 28 |
#include "dxxsconf.h" |
| 29 |
#include "fwd-inferno.h" |
| 30 |
#include "dsx-ns.h" |
| 31 |
#include "ntstring.h" |
| 32 |
#include "player-callsign.h" |
| 33 |
|
| 34 |
namespace dcx { |
| 35 |
|
| 36 |
#if defined(__APPLE__) || defined(macintosh) |
| 37 |
#define KEY_MAC(x) x |
| 38 |
#else |
| 39 |
// do not use MAC, it will break MSVC compilation somewhere in rpcdce.h |
| 40 |
#define KEY_MAC(x) |
| 41 |
#endif |
| 42 |
|
| 43 |
/** |
| 44 |
** Constants |
| 45 |
**/ |
| 46 |
|
| 47 |
// How close two points must be in all dimensions to be considered the same point. |
| 48 |
#define FIX_EPSILON 10 |
| 49 |
|
| 50 |
// a filename, useful for declaring arrays of filenames |
| 51 |
struct d_fname : ntstring<FILENAME_LEN - 1> |
| 52 |
{ |
| 53 |
d_fname() = default; |
| 54 |
d_fname(const d_fname &) = default; |
| 55 |
d_fname &operator=(const d_fname &) = default; |
| 56 |
template <std::size_t N> |
| 57 |
void operator=(char (&i)[N]) const = delete; |
| 58 |
template <std::size_t N> |
| 59 |
void operator=(const char (&i)[N]) |
| 60 |
{ |
| 61 |
copy_if(i); |
| 62 |
} |
| 63 |
}; |
| 64 |
|
| 65 |
struct d_interface_unique_state |
| 66 |
{ |
| 67 |
callsign_t PilotName; |
| 68 |
#if DXX_HAVE_POISON |
| 69 |
d_interface_unique_state(); |
| 70 |
#endif |
| 71 |
void update_window_title(); |
| 72 |
}; |
| 73 |
|
| 74 |
struct d_game_view_unique_state |
| 75 |
{ |
| 76 |
uint8_t Death_sequence_aborted; |
| 77 |
}; |
| 78 |
|
| 79 |
} |
| 80 |
|
| 81 |
#ifdef DXX_BUILD_DESCENT |
| 82 |
namespace dsx { |
| 83 |
|
| 84 |
/** |
| 85 |
** Global variables |
| 86 |
**/ |
| 87 |
|
| 88 |
extern int Screen_mode; // editor screen or game screen? |
| 89 |
#if DXX_BUILD_DESCENT == 1 |
| 90 |
extern int MacHog; |
| 91 |
#endif |
| 92 |
|
| 93 |
} |
| 94 |
#endif |