# Configuration file for MegaZeux 2.91j
# February 20th, 2019

# Comments begin with #. Whitespace is ignored. Empty lines are
# ignored as well.
# Options are set in the following format:
# option = value
# If value is not given, then it is assumed to be 1.
# You can include spaces in values by escaping them with \s.
# (see the default macros for examples)
# For directories, use forward slashes (/) instead of back-slashes,
# as they work more reliably.
# Note that even if the option is given to change the values
# in MZX, this text file will NOT be modified, and hence the
# values will revert to what they are here when you restart MZX.

# NOTE: All of the options below have sane defaults. Changes to
# these options will only take effect if you uncomment them.

# In many cases, the current default value has been written in,
# but this is not guaranteed (for example with video_output).

### Video options ###

# Rendering engine to use to display MegaZeux. The simplest (but not
# necessarily fastest) renderer is "software". Due to MegaZeux's strange
# default resolution (640x350), many video cards have difficulty
# supporting it correctly in fullscreen mode.
#
# The software renderer is the fallback renderer if another renderer fails
# to initialize, and has generally adequate performance. Additionally, it
# supports 8 bit indexed color and requires no overlay or 3D hardware support.
# If you're on a slow computer or a handheld portable, definitely use this.
# To use it, uncomment the line below.

# video_output = software

# A much faster option for almost anything with a graphics card is the
# "softscale" renderer. This renderer uses SDL2's built-in rendering API
# to stream the output of the software renderer to a hardware-accelerated
# texture (if available) for extremely fast scaling and display.
#
# Either 32 bit or 16 bit rendering can be enabled (see force_bpp), but
# 32 bit is recommended. Nearest neighbor or linear scaling will be chosen
# automatically based on the scaling ratio and size of the window. This
# renderer is a replacement for the YUV overlay renderer.

# video_output = softscale

# If you built MegaZeux yourself with SDL 1.2 support enabled, the YUV overlay
# renderer is available instead of softscale. This renderer is good if you
# want scaling and can't use OpenGL. The quality of scaling is hardware
# dependent and often looks bad at non-integer scaling.
#
# Uncomment either of the lines below (but not both) if you want to try it.
# The "overlay2" mode is cheaper, but will be less accurate due to the use
# of chroma subsampling instead of a full YUV encode. The "overlay2" mode
# also does not support newer graphical features such as unbound sprites.
# If uncommented for SDL2 builds, these lines will enable softscale instead.

# video_output = overlay1
# video_output = overlay2

# An OpenGL renderer is a good choice if you want a configurable, cheap
# renderer and have a video card. This method provides the highest quality
# scaler and should work on all platforms with OpenGL or OpenGL ES support.
#
# MegaZeux provides two fixed-function scalers. The first renders the whole
# screen to a texture and uses OpenGL to stretch it. This method is generally
# fast but may be slow on very old PCs. This renderer is called "opengl1".
#
# The second fixed-function scaler draws entirely in OpenGL by remapping the
# character sets to a texture. This yields a performance increase for some
# games, but at the cost of compatibility. This renderer is called "opengl2".
#
# MegaZeux also provides a scaler for programmable hardware. If you have
# OpenGL 2.0 or OpenGL ES 2.0 capable hardware, you should use this renderer.
# This renderer uses GLSL shaders to render and scale the screen, and several
# different scaling shaders can be selected at runtime using the settings menu.
# This renderer is called "glsl". It is the highest quality and best performing
# renderer for most PCs and games, and is enabled by default.
#
# Uncomment ONE of the lines below:

# video_output = opengl1
# video_output = opengl2
# video_output = glsl

# The scaling renderers can be configured to preserve aspect ratio where
# possible in window and fullscreen modes. The supported ratios are
# "classic" (4:3) and "modern" (64:35). The ratio type "stretch" disables
# any aspect ratio preservation. The default is "modern".

# video_ratio = modern

# OpenGL will, by default, linearly interpolate pixels as it upscales
# to your requested resolution. This creates an output with more "blur",
# which some people dislike. If you are using a sufficiently high target
# resolution, preferably an integer multiple of 640x350, you may find
# "nearest" more pleasing, which will have no "blur". The default
# setting is "linear".

# gl_filter_method = nearest

# The GLSL renderer uses scaling shaders to determine the scaling method
# instead of gl_filter_method. The default shader to be loaded when MZX
# starts is assets/glsl/scalers/semisoft.frag.
# Change this config option to specify a different shader to load on startup.
# For a list of valid options, see the F2 menu or the GLSL scalers folder.
# Do not include an extension.

# gl_scaling_shader = semisoft

# Some OpenGL driver settings may default vertical sync on, which looks
# visually better on CRTs but can cause "speed 1" to run noticably slower.
# For consistency with other renderers, and for correctness, MegaZeux will
# attempt to disable vsync when gl_vsync is the default value of 0.
# Conversely, a value of 1 forces MegaZeux to override the driver settings
# and enable vsync, which decreases tearing. A value of -1 can be used to
# tell MegaZeux to obey the driver default, which is unlikely to be useful.

# gl_vsync = 1

# Resolution MZX uses for fullscreen. With the software renderer, this
# will center MZX on the screen, and will not scale it. All other renderers
# listed above will attempt to scale the screen to match this resolution.
# Best results are obtained by using your current desktop resolution or a
# well-supported resolution (like 1280,720) in conjunction with the modern
# aspect ratio.
#
# Give in x,y format. Use this if the defaults are giving you problems,
# especially in the software renderer.
# The current desktop resolution is the default for all scalable renderers;
# "640,480" is the default for the software renderer.

# fullscreen_resolution = 640,480

# If this setting is enabled, instead of regular fullscreen MZX will create
# a borderless window with the current desktop resolution when fullscreen
# is enabled. This overrides fullscreen_resolution. Disabled by default.

# fullscreen_windowed = 0

# The resolution MZX uses in a window. If you renderer supports
# it, MZX will be scaled to fit this specification. Otherwise
# the setting is ignored.

# window_resolution = 640,350

# Use this to toggle whether MZX can be scaled while in window
# mode, if your renderer supports it. If you use a renderer which
# supports scaling, but don't want to accidentally scale it (which
# may distort the image), you can switch this off here.

# enable_resizing = 1

# MZX is limited internally to 8bit colour, but it can upmix its
# rendering to 32bit if your video card has difficulty with 8bit
# resolutions. Using 32bit colour is slower, but not by much.
# NOTE: This option may be ignored by one or more of the above
# renderers, but it is guaranteed to apply to "software". Valid
# settings are usually '8', '16', or '32'. Default is '32'.

# force_bpp = 32

# Whether MZX should start up in fullscreen or not.
# Press ctrl-alt-enter to toggle fullscreen as MZX runs.

# fullscreen = 1

# Whether MZX should allow a screenshot to be taken when F12 is pressed.
# Defaults to enabled.

# allow_screenshots = 1

### Audio options ###

# Sampling rate to output audio at. Higher values will sound
# better but use more resources and may not be supported by
# your audio card/drivers. Typical values include 22050, 44100,
# and 48000. If your card supports it you might get away with
# 96000, or even 192000.

# audio_sample_rate = 44100

# Audio buffer size in samples. Setting this to lower can improve
# latency, so audio will be heard sooner after it is set to be
# changed. It is also possible to change PC speaker effects more
# rapidly with lower values. Lower buffer sizes need more CPU power
# to process. 2048 is adequete for PC speaker playback every
# command at speed 4.

# audio_buffer_samples = 1024

# Allow music to be sampled at higher precision. Increases CPU
# usage but increases audio quality as well.

# enable_oversampling = 0

# Set master resample mode. This affects how OGGs and
# frequency shifted modules sound. Choices are:
# none (fastest, poor quality)
# linear (fast, good quality)
# cubic (slow, great quality)

# resample_mode = linear

# Set resample mode for modplug. This affects how modules
# and WAVs sound. Choices are:
# none (fastest, poor quality)
# linear (fast, good quality)
# cubic (slow, great quality)
# fir (very slow, excellent quality)

# modplug_resample_mode = linear

# Whether music/samples should be played or not.
# Does not include PC speaker effects.

# music_on = 1

# Whether PC speaker effects should be played or not.

# pc_speaker_on = 1

# Volume music plays at (0 through 10)

# music_volume = 8

# Volume samples play at (0 through 10)

# sample_volume = 8

# Volume PC speaker SFX play at (0 through 10)

# pc_speaker_volume = 8

# The maximum number of samples that can be played simultaneously.
# Set to -1 for an unlimited number of samples.

# max_simultaneous_samples = -1


### Game options ###

# Name of the directory where MegaZeux should start.

# startup_path = /home/username/MegaZeux

# Name of world file that should be loaded when MZX starts.

# startup_file = caverns.mzx

# Default save file name given when you first try to save.

# save_file = saved.sav

# Speed MZX should start at (1 through 16)

# mzx_speed = 4

# Start in the editor by default

# startup_editor = 1

# Allow the use of editing cheats in regular gameplay. Set to 1
# to enable the cheats for either executable, "mzxrun" to enable
# them for MZXRun only, or to 0 to disable them for both. This
# feature is disabled by default.

# allow_cheats = 0

# Enable standalone mode. This is a game mode meant to be used
# for packaged standalone MegaZeux games. In standalone mode:
# - ENTER_MENU, ESCAPE_MENU, HELP_MENU, F2_MENU and LOAD_MENU
#   can be used on the title screen to disable these menus.
# - HELP_MENU prevents the help menu from being opened even
#   when other builtin dialogs are open
# - EXIT_GAME can be used on the title screen to exit MegaZeux
# - The default title screen message does not appear
# - PLAY_GAME can be set to 1 to start a game
# - Using ALT-F4, closing the window or using other OS-specific
#   ways of closing an application will exit MZX entirely,
#   without asking for confirmation first
# Standalone mode can only be used from MZXRun.

# standalone_mode = 1

# Enable no titlescreen mode. This mode only works if standalone
# mode is enabled and causes the following:
# - The title screen is skipped and the game begins on the first
#   board.
# - Exiting to the title screen exits MegaZeux

# no_titlescreen = 1

### Board editor options ###

# Whether or not the spacebar can be used to toggle between
# your active buffer and the meta character "SPACE". If you
# set this, it will behave like older MegaZeux versions, but it
# will allow you to overwrite robots, for instance.
#
# If the setting is disabled (the default), replacing params
# will your new buffer will not require a toggle, and robots
# can only be deleted with the Delete key.

# editor_space_toggles = 1

# Whether or not the editor should center the viewport on the
# cursor in tab draw mode. Disabled by default; uncomment the
# following line to enable.

# editor_tab_focuses_view = 1

# Whether or not the editor will load board char sets and
# palettes when the board is changed. Disabled by default.

# editor_load_board_assets = 1

# Whether or not the thing menus (F3-F10) will place an object on
# the board when that object is selected. Enabled by default.

# editor_thing_menu_places = 1

# If this is set to 1 (the default), enter can be used to split
# a line in the robot editor. However, the classic behaviour is
# that enter moves the cursor down a line. If you would like to
# restore the old behaviour, please set this to 0.

# editor_enter_splits = 1

# Set to 0 if you want the board editor to show the hotkey help
# by default.

# board_editor_hide_help = 1

# Set to 1 if you want the palette editor to hide the hotkey help
# when MegaZeux starts (default: don't hide).

# palette_editor_hide_help = 0

# The size of the board, overlay, vlayer, and char editor undo history
# stacks. Valid values are between 0 and 1000. Defaults to 100.

# undo_history_size = 100

# Defaults for new boards. Put these in [filename].editor.cnf to customize
# for each individual game, E.G. caverns.editor.cnf.  Viewport width/height
# must be set before offset, and board width/height must be set before any
# viewport vars.

# Options for the majority of these are 0 or 1, for off and on.
# Options for explosions_leave: space, ash, fire
# Options for saving: enabled, disabled, sensoronly
# Options for overlay: enabled, disabled, static, transparent

# board_default_width = 100
# board_default_height = 100
# board_default_viewport_w = 80
# board_default_viewport_h = 25
# board_default_viewport_x = 0
# board_default_viewport_y = 0
# board_default_can_shoot = 1
# board_default_can_bomb = 1
# board_default_fire_burns_spaces = 0
# board_default_fire_burns_fakes = 1
# board_default_fire_burns_trees = 1
# board_default_fire_burns_brown = 0
# board_default_fire_burns_forever = 0
# board_default_forest_to_floor = 0
# board_default_collect_bombs = 0
# board_default_restart_if_hurt = 0
# board_default_reset_on_entry = 0
# board_default_player_locked_ns = 0
# board_default_player_locked_ew = 0
# board_default_player_locked_att = 0
# board_default_time_limit = 0
# board_default_explosions_leave = ash
# board_default_saving = enabled
# board_default_overlay = enabled
# board_default_charset_path =
# board_default_palette_path =


### Robot editor options ###

# Enable or disable color coding in the editor.
# If color coding is off, ccode_string is used for the entire
# line.

# color_coding_on = 0

# Color codes for various types.
# For colors, use 255 to show a color box.

# ccode_colors = 255
# ccode_commands = 15
# ccode_conditions = 15
# ccode_current_line = 11
# ccode_directions = 3
# ccode_equalities = 0
# ccode_extras = 7
# ccode_immediates = 10
# ccode_items = 11
# ccode_params = 2
# ccode_strings = 14
# ccode_things = 11

# Whether or not "extra words" should be displayed.
# For instance, if turned on, a line like "wait 1" will
# become "wait for 1."

# disassemble_extras = 0

# The base numbers should be displayed as. Valid options
# are 10 and 16 (decimal and hexidecimal). Hex numbers are
# prefixed with a dollar sign ($).

# disassemble_base = 16

# Changing this will allow invalid comments to automatically
# be marked to "delete" or "comment" instead of "ignore".
# Don't change this unless you know what you're doing.

# default_invalid_status = ignore

# Single line macros
# These are the traditional MZX macros; they may only
# occupy one line in their definition in this file. They
# correspond to parameter-less macros: when you press
# F6 through F10 the following strings are printed to
# the editor, verbatim. For instance if you set macro_1 to
# * "hello", * "hello" will be inserted every time you
# press F6 in the robot editor.
# The following are the default singe-line macros.

# macro_1 = char\s
# macro_2 = color\s
# macro_3 = goto\s
# macro_4 = send\s
# macro_5 = :\splayershot^

# Extended macros:
# See macro.txt.

# The following is an example extended macro.
# It sets up a sprite. If you find it useful, remove the #'s.

#macro_sprite = Sprite\sSetup
# (number255 spr_num)
# (number255 w, h, rx, ry)
# (number255 cx, cy, cw, ch)
# (number255 x, y)
# set spr!spr_num!_width !w!
# set spr!spr_num!_height !h!
# set spr!spr_num!_refx !rx!
# set spr!spr_num!_refy !ry!
# set spr!spr_num!_cwidth !cw!
# set spr!spr_num!_cheight !ch!
# set spr!spr_num!_cx !cx!
# set spr!spr_num!_cy !cy!
# put !x1! sprite p!#spr_num! !x! !y!

# Whether or not the palette should be reverted to default
# when the robot editor is load. If set, SMZX mode 0 will
# also be enforced.

# robot_editor_default_palette = 0

# Set to 0 if you want the robot editor to show the hotkey help
# and horizontal border by default.

# robot_editor_hide_help = 1


# Backup options

# Backups are save files made in the editor. They will only be made
# while in the main editor, not while in a sub-editor or a dialogue
# box of sorts. Note that this can cause slight pauses while editing,
# as the game saves.
# If you have multiple backups you should check the modified date in
# a console or file properties to determine which was most recently
# modified. The number will not indicate most recently saved.

# How many backups to be made. Set to zero to disable backups.

# backup_count = 3

# How often (in seconds) backups should be made

# backup_interval = 60

# The name of the backup file. If you choose "backup" with 3 backups
# the backups will be named backup1.mzx, backup2.mzx, and backup3.mzx.

# backup_name = backup

# The extension of backup files (keep this .mzx if you want to be able
# to easily load them)

# backup_ext = .mzx


# Joystick options

# It is possible to emulate key presses using a joystick. This can be
# achieved with the following config options globally or (for options
# starting with "joyX" only) on a per-game basis. To configure joysticks
# for a particular game, place the applicable settings in a file called
# [game].cnf (e.g. "caverns.cnf" is the settings file for "caverns.mzx").
# This will configure joysticks for that world and all saves loaded from
# that world only. Games utilizing swaps may require multiple .cnf files.

# Each joystick in MegaZeux is assigned a number between 1 and 16. When
# a joystick is detected, it is given the lowest available number, so
# typically the joystick you are using is joystick 1. When multiple
# joysticks are plugged in, you may have to experiment to determine which
# joystick is which.

# You can currently map three joystick input methods: axes, buttons,
# and one POV hat. Axes/buttons/hats are mapped to keys using a number
# corresponding to the a given key. This number is the same as the
# KEY_PRESSED value for that key (see keycodes.html or mzx_help.html).

# The option to map a joystick axis is

# joyXaxisY = A, B

# where X is the number of the joystick, Y is the number of the axis
# (1 is typically left/right, 2 is typically up/down), A is the key
# for one extreme (such as left) and B is the key for the other
# (such as right). An example of an axis is an analog stick or a
# pressure-sensitive trigger button. The threshold to trigger a
# joystick axis press can be globally defined with the setting

# joy_axis_threshold = 10000

# where lower values (0 minimum) will press the mapped key with less
# movement and higher values (32767 maximum) will press the mapped key
# with more movement.

# The option to map a joystick button is

# joyXbuttonY = A

# where X is the number of the joystick, Y is the number of the button,
# and A is the key whose press is emulated when this button is pressed.
# You may have to experiment to find the number of a given button.

# The option to map a joystick hat is

# joyXhat = U, D, L, R

# where X is the number of the joystick, U is the key for the up direction,
# D is the key for the down direction, L is the key for the left direction,
# and R is the key for the right direction. Currently, only one POV hat per
# joystick is supported. An example of a POV hat is the directional pad on
# some controllers.

# As of MegaZeux 2.92, it is also possible to bind joystick controls to
# generic "joystick actions". These actions are more UI-friendly than using
# keycodes directly, they have default gameplay keys pre-assigned, and these
# gameplay keys can be changed to different values without altering UI behavior.

# To use a joystick action, replace the key in one of the settings above with
# "act_X", where X is an action name from the table below. Examples:

# joyXhat = act_up, act_down, act_left, act_right
# joyXaxisY = act_l_left, act_l_right
# joyXbuttonY = act_shoot

# The available joystick actions and their typical behaviors are:

#  Action         Title screen    Window          Game key (default)
# -------------  --------------  --------------  ----------------------
#  up                             Cursor up       Up (move)
#  down                           Cursor down     Down (move)
#  left                           Cursor left     Left (move)
#  right                          Cursor right    Right (move)
#  a / shoot      Play game       Select          Space (shoot)
#  b / bomb       Main menu       Cancel          Delete (lay bomb)
#  c / switch     Settings        Next element    Insert (switch bombs)
#  x              Help            Select char     S (Caverns: spells)
#  y              Updater         Backspace       P (Caverns: altar)
#  settings       Settings        Settings[1]     F2 (settings)
#  escape         Exit            Cancel          Escape (exit[2])
#  menu           Play game       Select          Enter (game menu)
#  save           Load world      Page up         F3 (save game)
#  load           Reload save     Page down       F4 (load save)
#  lstick                         Home
#  rstick                         End

# Actions "up"/"down"/"left"/"right" are intended for a digital pad. Actions
# "l_up"/"l_down"/"l_left"/"l_right" and "r_up"/"r_down"/"r_left"/"r_right"
# also exist, which are similar and intended for analog stick mapping on
# controllers that possess both a digital pad and analog sticks.

# [1] Works on the main menu and game menu. May not work on other windows
# currently.

# [2] This behavior will always override other bindings unless the
# exit dialog has been disabled.

# To map a joystick action to a different key for gameplay, use the setting

# joyX.act_Y = A

# where X is the number of the joystick, Y is the name of the joystick action
# (e.g. "shoot"), and A is the number of the key to assign to that action.

# For platforms MegaZeux supports via SDL 2, joystick mapping can be automated
# for the numerous controllers recognized by SDL 2. This means that, if your
# device is supported, you can plug in your joystick/gamepad/etc. and it will
# just work. This automatic mapping will not overwrite mapping values specified
# in config by the above settings.

# This setting can be used to globally disable the automatic mapping feature
# entirely. If 1, it will be enabled (default). If 0, it will be disabled.

# gamecontroller_enable = 1

# This feature uses SDL 2 gamecontroller mappings to assign the above joystick
# actions to axes/buttons/hats. The following settings can be used to customize
# the default mapping from SDL to MZX actions/keys globally:

# gamecontroller.a = act_shoot
# gamecontroller.b = act_bomb
# gamecontroller.x = act_x
# gamecontroller.y = act_y
# gamecontroller.back = act_escape
# gamecontroller.start = act_menu
# gamecontroller.leftstick = act_lstick
# gamecontroller.rightstick = act_rstick
# gamecontroller.leftshoulder = act_switch
# gamecontroller.rightshoulder = act_settings
# gamecontroller.dpup = act_up
# gamecontroller.dpdown = act_down
# gamecontroller.dpleft = act_left
# gamecontroller.dpright = act_right
# gamecontroller.-leftx = act_l_left
# gamecontroller.+leftx = act_l_right
# gamecontroller.-lefty = act_l_up
# gamecontroller.+lefty = act_l_down
# gamecontroller.-rightx = act_r_left
# gamecontroller.+rightx = act_r_right
# gamecontroller.-righty = act_r_up
# gamecontroller.+righty = act_r_down
# gamecontroller.lefttrigger = act_save
# gamecontroller.righttrigger = act_load

# If your controller isn't currently supported by SDL or gamecontrollerdb.txt,
# it is possible to add or override an SDL mapping string directly. Use one of
# the tools on the following website to generate a mapping string for your
# controller.
#
# https://github.com/gabomdq/SDL_GameControllerDB
#
# You can use the following setting to add your mapping to MegaZeux. Copy the
# string generated by the mapping tool and paste it on the right side of the
# equals sign:

# gamecontroller_add =

# You should test your new mapping to make sure every button/axis works
# correctly and then report it to a MegaZeux developer or SDL_GameControllerDB
# so it can be added to the database. This option may be specified multiple
# times; each time, it will add or replace a different mapping. Each instance
# should be on a single line.


# Misc Options

# Set to 1 if you want MZX to pause when key focus is lost. Useful for
# when another app (such as someone IM'ing you) steals the screen. This
# might cause MZX to lock up sometimes on some machines - if you have
# problems with it don't enable it.

# pause_on_unfocus = 0

# Set to 0 if you want input boxes and strings in the robot editor
# to use the game set for characters 32-126, as opposed to the protected
# GUI set.

# mask_midchars = 1

# Set to 1 if you would rather MZX's mouse pointer used the
# system mouse cursor.

# system_mouse = 0

###################
# NETWORK OPTIONS #
###################

# If networking is enabled, MZX is permitted to bind ports and connect
# out to the network or Internet. This option is a global kill switch
# for the paranoid and allows the entire network layer to be disabled.

# network_enabled = 1

# MegaZeux can support connections via a SOCKS4/5 proxy to punch through
# connections that would otherwise require some sort of pipe intermediary.

# socks_host = localhost
# socks_port = 1080

# The update host is an HTTP server containing all data and metadata
# associated with updates for MegaZeux. You normally won't want to
# change this, but it may be useful if you are a third party distributing
# unofficial updates. You may specify this up to times 16; connections will
# be attempted in the order they are defined. Please note, this is not a
# URL and should not contain protocol specifiers such as http://

# By default, MZX will attempt to connect to updates.digitalmzx.net,
# followed by updates.megazeux.org and updates.megazeux.net.

# update_host = updates.digitalmzx.net
# update_host = updates.megazeux.org
# update_host = updates.megazeux.net

# The update "branch" is consulted each time the updater runs. Typically,
# there are only two branches, "Stable" and "Unstable". Please note, this
# option is case sensitive. The "Stable" branch is the default, but if
# you are interested in helping find bugs in the latest development
# version, or are instructed to follow development, you will need to
# change this to "Unstable". Third parties may use different branch names.

# update_branch_pin = Stable

# By default, MZX will check for updates on startup. There are three modes:
# "on", which will display most messages; "silent", which will only display
# certain errors and a message in the window caption; and "off", which disables
# this feature altogether. The default setting is "silent". If you start MZX
# in fullscreen, "on" is recommended.

# update_auto_check = silent

include pad.config
