22 #ifndef NUVIE_CORE_NUVIE_DEFS_H 23 #define NUVIE_CORE_NUVIE_DEFS_H 25 #include "common/scummsys.h" 26 #include "ultima/nuvie/misc/sdl_compat.h" 35 #define USE_BUTTON Shared::BUTTON_LEFT 36 #define WALK_BUTTON Shared::BUTTON_RIGHT 37 #define ACTION_BUTTON Shared::BUTTON_RIGHT 38 #define DRAG_BUTTON Shared::BUTTON_LEFT 40 typedef uint8 nuvie_game_t;
42 #define NUVIE_GAME_NONE 0 43 #define NUVIE_GAME_U6 1 44 #define NUVIE_GAME_MD 2 45 #define NUVIE_GAME_SE 4 47 #define NUVIE_CONFIG_NAME_U6 "ultima6" 48 #define NUVIE_CONFIG_NAME_MD "martian" 49 #define NUVIE_CONFIG_NAME_SE "savage" 51 #define NUVIE_STYLE_ORIG 0 52 #define NUVIE_STYLE_NEW 1 53 #define NUVIE_STYLE_ORIG_PLUS_CUTOFF_MAP 2 54 #define NUVIE_STYLE_ORIG_PLUS_FULL_MAP 3 56 #define clamp_min(v, c) (((v) < (c)) ? (c) : (v)) 57 #define clamp_max(v, c) (((v) > (c)) ? (c) : (v)) 58 #define clamp(v, c1, c2) ( ((v) < (c1)) ? (c1) : (((v) > (c2)) ? (c2) : (v)) ) 61 #define INT_MAX 0x7fffffff 64 #define UCHAR_MAX 0xff 67 #define SHRT_MAX 0x7fff 71 #define WRAPPED_COORD(c,level) ((c)&((level)?255:1023)) 72 #define WRAP_COORD(c,level) ((c)&=((level)?255:1023)) 74 #define MAP_SIDE_LENGTH(map_level) ((map_level > 0 && map_level < 6) ? 256 : 1024) 100 #define TRAMMEL_PHASE 1.75 101 #define FELUCCA_PHASE 1.1666666666666667 103 enum DebugLevelType {
114 enum ConverseGumpType {
115 CONVERSE_GUMP_DEFAULT = 0,
116 CONVERSE_GUMP_U7_STYLE = 1,
117 CONVERSE_GUMP_WOU_STYLE = 2,
121 inline void u6debug(
bool no_header,
const DebugLevelType level,
const char *format, ...) {}
123 extern void u6debug(
bool no_header,
const DebugLevelType level,
const char *format, ...);
129 #define DEBUG u6debug 131 #define U6PATH_DELIMITER '/' 133 #define NUVIE_RAND_MAX 0x7fffffff // POSIX: 2^(31)-1 134 #define NUVIE_RAND() getRandom(NUVIE_RAND_MAX) Definition: detection.h:27