Difference between revisions of "Defines"

From ScummVM :: Wiki
Jump to navigation Jump to search
(New section with defines, which might be useful for release builds. Also move the NDEBUG define to that section since it actually disables assertions, thus it did not realy belong to the debug section)
 
(15 intermediate revisions by 6 users not shown)
Line 18: Line 18:
|-
|-
| AUDIO_REVERSE_STEREO
| AUDIO_REVERSE_STEREO
|
| configure
|
| audio/mixer.cpp
|
| Normally, Audio::Mixer produces 16bit signed interleaved (left before right) stereo data. With this define set, it changes the channel order (first right channel, then left).
|-
| BACKEND_8BIT
|
|
|
|-
|-
| DATA_PATH
| DATA_PATH
|
|
|
|-
| MIXER_DOUBLE_BUFFERING
|
|
|
|
Line 39: Line 29:
| OUTPUT_UNSIGNED_AUDIO
| OUTPUT_UNSIGNED_AUDIO
|
|
|
| audio/rate.h
|
| Normally, Audio::Mixer produces 16bit signed interleaved (left before right) stereo data. With this define set, it produces unsigned data instead.
|-
|-
| SCUMM_BIG_ENDIAN
| SCUMM_BIG_ENDIAN
Line 77: Line 67:
|-
|-
| LEGACY_FLAC
| LEGACY_FLAC
|
| audio/decoders/flac.cpp:
| Enable source compatibility with ancient versions of the FLAC library.
|-
| USE_A52
|
|
|
|
|
|
|-
|-
| USE_FLAC
| USE_FAAD
|
|
|
|
|
|
|-
|-
| USE_MAD
| USE_FLAC
|
|
|
|
|
| Enable support for FLAC audio data, using libflac.
|-
|-
| USE_MPEG2
| USE_ICONV
|
|
|
|
|
|
|-
|-
| USE_MPEG2_0_3_1
| USE_MAD
|
|
|
|
|
| Enable support for MP3 audio data, using libmad.
|-
|-
| USE_READLINE
| USE_READLINE
Line 162: Line 157:


==Defines to enable engines or parts of them==
==Defines to enable engines or parts of them==
The following all are typically defined by config.mak, which is created by running the configure script. They are then used by the build system to enable / disable support for the various engines.
{| border="1" cellspacing="0" cellpadding="2"
{| border="1" cellspacing="0" cellpadding="2"
|-
|-
Line 193: Line 190:
|
|
|
|
|-
| ENABLE_CSTIME
| configure
| build system, Mohawk engine
| Enables support for [[Where in Time is Carmen Sandiego?]] in the [[Mohawk]] engine
|-
|-
| ENABLE_DRACI
| ENABLE_DRACI
Line 220: Line 222:
|-
|-
| ENABLE_HE
| ENABLE_HE
| configure
| build system, SCUMM engine
| Enables support for [[Humongous Entertainment]] games in the [[SCUMM]] engine
|-
| ENABLE_HUGO
|
|
|
|
|
|
|-
|-
| ENABLE_HUGO
| ENABLE_IHNM
|
|
|
|
|
|
|-
|-
| ENABLE_IHNM
| ENABLE_KYRA
|
|
|
|
|
|
|-
|-
| ENABLE_KYRA
| ENABLE_LASTEXPRESS
|
|
|
|
Line 263: Line 270:
|
|
|
|
|-
| ENABLE_MYST
| configure
| build system, Mohawk engine
| Enables support for [[Myst]] in the [[Mohawk]] engine
|-
|-
| ENABLE_PARALLACTION
| ENABLE_PARALLACTION
Line 273: Line 285:
|
|
|
|
|-
| ENABLE_RIVEN
| configure
| build system, Mohawk engine
| Enables support for [[Riven: The Sequel to Myst]] in the [[Mohawk]] engine
|-
|-
| ENABLE_SAGA
| ENABLE_SAGA
Line 290: Line 307:
|-
|-
| ENABLE_SCI32
| ENABLE_SCI32
|
|
|
|-
| ENABLE_SCI3_GAMES
|
|
|
|
Line 320: Line 332:
|-
|-
| ENABLE_SWORD2
| ENABLE_SWORD2
|
|
|
|-
| ENABLE_SWORD25
|
|
|
|
Line 335: Line 352:
|-
|-
| ENABLE_TINSEL
| ENABLE_TINSEL
|
|
|
|-
| ENABLE_TOON
|
|
|
|
Line 340: Line 362:
|-
|-
| ENABLE_TOUCHE
| ENABLE_TOUCHE
|
|
|
|-
| ENABLE_TSAGE
|
|
|
|
Line 361: Line 388:
|
|
|
|
|Makes ScummVM return to the launcher instead of exiting (ideal for ports that take a long while to load)
|Makes ScummVM return to the launcher instead of exiting (ideal for ports that take a long while to load). Note that this is a big HACK, in particular, it allows one to return to the launcher from engines / games which do not support this normally for a good reason (such as not being reentrant).
|-
|-
| LURE_CLICKABLE_MENUS
| LURE_CLICKABLE_MENUS
|
|
|
|
|Makes the Lure of the Temptress' menus clickable instead of hoverable (making them more usable for touchscreens)
|Makes the [[Lure of the Temptress]]' menus clickable instead of hoverable (making them more usable for touchscreens).
|}
|}


Line 396: Line 423:
|
|
|
|
|-
| DISABLE_SAVELOADCHOOSER_GRID
|DISABLE_FANCY_THEMES
|GUI
|Disable the thumbnail grid based save/load chooser. This chooser requires a resolution of at least 640x400 and more memory than the list based one.
|-
|-
| DISABLE_HELP
| DISABLE_HELP
Line 443: Line 475:
|-
|-
| USE_TRANSLATION
| USE_TRANSLATION
|
|
|
|-
| USE_TTS
|
|
| Enable Test-to-Speech feature.
|-
| USE_BINK
|
|
|
|
Line 525: Line 567:
|-
|-
| USE_SEQ_MIDI
| USE_SEQ_MIDI
|
|
|
|-
| USE_SNDIO
|
|
|
|-
| USE_TIMIDITY
|
|
|
|
Line 1,256: Line 1,308:
|
|
|
|
|-
| WEBOS
| Build system
|
| [[WebOS]] port
|-
|-
| WIN32
| WIN32

Latest revision as of 23:01, 24 February 2020

This is a list of all the tokens that are being used in a #ifdef or #ifndef in a .cpp or .h file, except for .h files, where tokens used as #ifndef FOO_H or #ifndef FOO_H_ are excluded, as these are almost certainly just include guards. The list is current as of r52922.

No additional filtering has been performed as of yet; some tokens are defined by a platform, while others may not actually be used. Additionally, defined symbols not used in #ifndef or #ifdef are not included at all here.

Defines to be set by/for backends

The following defines are meant to be defined by backend authors, typically in configure (or a custom Makefile). Usually these enable or disable certain features in ScummVM. E.g. a low-powered port might turn off some features that won't work on the target device anyway, to free up some memory.

Defines to configure the backend

Token Defined by Used in Purpose
AUDIO_REVERSE_STEREO configure audio/mixer.cpp Normally, Audio::Mixer produces 16bit signed interleaved (left before right) stereo data. With this define set, it changes the channel order (first right channel, then left).
DATA_PATH
OUTPUT_UNSIGNED_AUDIO audio/rate.h Normally, Audio::Mixer produces 16bit signed interleaved (left before right) stereo data. With this define set, it produces unsigned data instead.
SCUMM_BIG_ENDIAN
SCUMM_LITTLE_ENDIAN
SCUMM_NEED_ALIGNMENT
SCUMMVM_DONT_DEFINE_TYPES
SMALL_SCREEN_DEVICE

Defines to enable usage of external dependencies

Token Defined by Used in Purpose
LEGACY_FLAC audio/decoders/flac.cpp: Enable source compatibility with ancient versions of the FLAC library.
USE_A52
USE_FAAD
USE_FLAC Enable support for FLAC audio data, using libflac.
USE_ICONV
USE_MAD Enable support for MP3 audio data, using libmad.
USE_READLINE
USE_TREMOLO
USE_TREMOR
USE_VORBIS
USE_ZLIB

Defines to configure plugin handling

Token Defined by Used in Purpose
DYNAMIC_MODULES
PLUGIN_DIRECTORY
PLUGIN_EXPORT
PLUGIN_PREFIX
PLUGIN_SUFFIX

Defines to enable engines or parts of them

The following all are typically defined by config.mak, which is created by running the configure script. They are then used by the build system to enable / disable support for the various engines.

Token Defined by Used in Purpose
ENABLE_AGI
ENABLE_AGOS
ENABLE_AGOS2
ENABLE_CINE
ENABLE_CRUISE
ENABLE_CSTIME configure build system, Mohawk engine Enables support for Where in Time is Carmen Sandiego? in the Mohawk engine
ENABLE_DRACI
ENABLE_DRASCULA
ENABLE_GOB
ENABLE_GROOVIE
ENABLE_GROOVIE2
ENABLE_HE configure build system, SCUMM engine Enables support for Humongous Entertainment games in the SCUMM engine
ENABLE_HUGO
ENABLE_IHNM
ENABLE_KYRA
ENABLE_LASTEXPRESS
ENABLE_LOL
ENABLE_LURE
ENABLE_M4
ENABLE_MADE
ENABLE_MOHAWK
ENABLE_MYST configure build system, Mohawk engine Enables support for Myst in the Mohawk engine
ENABLE_PARALLACTION
ENABLE_QUEEN
ENABLE_RIVEN configure build system, Mohawk engine Enables support for Riven: The Sequel to Myst in the Mohawk engine
ENABLE_SAGA
ENABLE_SAGA2
ENABLE_SCI
ENABLE_SCI32
ENABLE_SCUMM
ENABLE_SCUMM_7_8
ENABLE_SKY
ENABLE_SWORD1
ENABLE_SWORD2
ENABLE_SWORD25
ENABLE_TEENAGENT
ENABLE_TESTBED
ENABLE_TINSEL
ENABLE_TOON
ENABLE_TOUCHE
ENABLE_TSAGE
ENABLE_TUCKER

Defines to change user-visible default behaviours

Token Defined by Used in Purpose
FORCE_RTL Makes ScummVM return to the launcher instead of exiting (ideal for ports that take a long while to load). Note that this is a big HACK, in particular, it allows one to return to the launcher from engines / games which do not support this normally for a good reason (such as not being reentrant).
LURE_CLICKABLE_MENUS Makes the Lure of the Temptress' menus clickable instead of hoverable (making them more usable for touchscreens).

Defines to enable common optional features

Token Defined by Used in Purpose
ENABLE_KEYMAPPER
ENABLE_VKEYBD
DISABLE_COMMAND_LINE
DISABLE_FANCY_THEMES
DISABLE_SAVELOADCHOOSER_GRID DISABLE_FANCY_THEMES GUI Disable the thumbnail grid based save/load chooser. This chooser requires a resolution of at least 640x400 and more memory than the list based one.
DISABLE_HELP
DISABLE_TEXT_CONSOLE
DISABLE_TOWNS_DUAL_LAYER_MODE SCUMM FM-Towns games Reduces binary size by removing the FM-Towns dual layer emulation. This removes support for SCUMM v5 FM-Towns games and it might add some glitches to SCUMM v3 FM-Towns games.
USE_HQ_SCALERS
USE_INDEO3
USE_OSD
USE_RGB_COLOR
USE_SCALERS
USE_TEXT_CONSOLE
USE_TRANSLATION
USE_TTS Enable Test-to-Speech feature.
USE_BINK

Defines to enable platform specific optional features

Token Defined by Used in Purpose
DISABLE_PSP_MP3
USE_DETECTLANG Enables the detection of the system language (supported on POSIX systems, Windows)

Defines to enable emulation of audio devices

Token Defined by Used in Purpose
DISABLE_DOSBOX_OPL
DISABLE_NES_APU
DISABLE_PC98_RHYTHM_CHANNEL PC-98 versions of Legend of Kyrandia 2 and Lands of Lore Reduces binary size by disabling the rhythm channel when emulating certain PC-98 sound cards
DISABLE_SID
ENABLE_FASCIN_ADLIB strangerke Fascination Enable the MDY/TBR player used by Fascination (Dos Floppy).
USE_MT32EMU

Defines to enable platform specific MIDI drivers

Token Defined by Used in Purpose
USE_ALSA
USE_FLUIDSYNTH
USE_SEQ_MIDI
USE_SNDIO
USE_TIMIDITY

Defines to enable common optimizations

Token Defined by Used in Purpose
DISABLE_GUI_BUILTIN_THEME Disables embedding the default theme into the executable (reduces the binary size)
DISABLE_SAVEGAME_SORTING
REDUCE_MEMORY_USAGE
STREAM_AUDIO_FROM_DISK

Defines to enable platform specific optimizations

Token Defined by Used in Purpose
MT32EMU_HAVE_X86
USE_ARM_COSTUME_ASM
USE_ARM_GFX_ASM
USE_ARM_SCALER_ASM
USE_ARM_SMUSH_ASM
USE_NASM Enables x86 optimized versions of the HQ scalers

Defines to enable debugging and testing facilities

Token Defined by Used in Purpose
DEBUG
DEBUG_ADLIB
DEBUG_EXTRACTION_TABLES
DEBUG_HASH_COLLISIONS
DEBUG_PARSER
DEBUG_RATECONV
DEBUG_SPRITE_MASK
DEBUG_WII_GDB
DEBUG_WII_MEMSTATS
DETECTOR_TESTING_HACK
DL_DEBUG
DUMP_OBJECT
DUMP_SCRIPT
DUMP_SCRIPTS
DUMP_STDOUT
ENABLE_PROFILING
FUNCTION_DEBUG
INTRO_TEST
LAYOUT_DEBUG_DIALOG
PSP_ENABLE_SPEED_TESTS
PSP_ENABLE_UNIT_TESTS
SAGA_DEBUG
SCENE_DEBUG
SCI_DEBUG_PARSE_TREE_AUGMENTATION
SCI_VERBOSE_RESMAN
SCRIPT_DEBUG
SCRIPT_TEST
SWORD2_DEBUG
TEST_MEMORY_COPY
USE_PROFILER
VM_DEBUG_SEND
__PS2_DEBUG__
__PS2_FILE_DEBUG__
__PSP_DEBUG_FUNCS__
__PSP_DEBUG_PRINT__
__PSP_PRINT_TO_FILE__


Defines useful for release builds

Token Defined by Used in Purpose
RELEASE_BUILD The build system. This is (and should be) defined for all release builds.
NDEBUG This define disables all assertions. We usually do not set this, i.e. ship releases with assertions.

Unsorted

The following defines have not yet put into any category. Many of them might also be inappropriate for this page.

Token Defined by Used in Purpose
COREAUDIO_DISABLE_REVERB
DETECT_BRODERBUND_TITLES
DISABLE_MD5
DISC_CACHE
DITHER
DRAW_GRAPHICS
DW2_EXACT_SIZE
DXA_EXPERIMENT_MAXD
ENABLE_RENDER_MEASURE
EPOC_AS_APP
FILE_TIME_SUPPORT
FORCEINLINE
FORCE_SLIDY
GUI_THEME_EVAL
HEAVY_LOGGING
INADDR_NONE
INCLUDED_FROM_BASE_VERSION_CPP
JAPAN
JOY_ANALOG
JOY_INVERT_Y
LIMIT_FPS
LIMIT_FRAME_RATE
MAC_OPTIONS
MAXPATHLEN
MAXTRAX_HAS_MICROTONAL
MAXTRAX_HAS_MODULATION
MAX_INT
MIN
NORETURN_POST
NORETURN_PRE
NOSERIAL
NO_ADAPTOR
PATH_MAX
PERFECT_5_TO_4_RESCALING
PRINT_BUFFERS
PSP_KB_SHELL
REG_EXEMEMCNT
REG_EXMEMCNT
RONIN_TIMER_ACCESS
SAMPLES_PER_SEC_8000
SCALER_PROFILE
SCI_CONSOLE
SCUMMVM_SVN_REVISION The build system. Appends the specified revision number to the version string.
SCUMM_IMUSE_INTERNAL
SKIP_INTRO
SLOW_RINCE_DOWN
SCUMMVM_IPC_INCLUDE
SNPRINTF_LONGLONG_SUPPORT
SOUND_CROP_CHANNELS
STRINGBUFLEN
SYSEX_CALLBACK_FUNCTION
TIMIDITY_LOW_DELAY
UNICODE
UNZ_BUFSIZE
UNZ_MAXFILENAMEINZIP
UPGRADE_ALL_TARGETS_HACK
USERSPACE_ONLY
USE_HASHMAP_MEMORY_POOL
WAVE_PRECISION
WIN32_PLATFORM_WFSP
WRAP_MALLOC
__FRAMFS_SAVE_MANAGER__
__MINGW32CE__
__MMX__
__N64_PORTDEFS__
__PAKFS_SAVE_MANAGER__
__PS2FILE_IO__
__PS2_FILE_SEMA__
__SSE__
__USE_INLINE__
__USE_LIBMC__

Defines used to determine the target platform/OS

Token Defined by Used in Purpose
ANDROID
ARM
GAMECUBE
IPHONE
IPHONE_OFFICIAL
LINUPY
LINUXMOTO_SDL
MACOSX
MOTOEZX
MOTOMAGX
NDS
QTOPIA
S60
UIQ
UNIX
WEBOS Build system WebOS port
WIN32
__DC__
__DS__
__N64__
__OS2__
__PLAYSTATION2__
__PSP__
__sgi
__SYMBIAN32__
__WII__