Free Hero Mesh

Update of ".heromeshrc"
Login
This is a mirror of the main repository for Free Hero Mesh. New tickets and changes will not be accepted at this mirror.
Overview

Artifact ID: 8e1792ea5bf2ea768d4ac05c280f907ca6912da7
Page Name:.heromeshrc
Date: 2020-11-16 22:53:38
Original User: anonymous
Parent: aa03732c71a4ed8e152ef90d322b089c4987250e (diff)
Next 10ab950b8a1ec4fa6ec30aae1f6885265debbdc4
Content

This document describes the current plan (part of which is implemented), and may be altered if it changes.

The .heromeshrc file is a file in X resource manager format, except that #include isn't (currently) implemented. It should be placed in your home directory. If the environment variable HOME is not set, the current directory is used. (Note: The X server is not queried for resources, nor are any other files queried; this resource database is entirely local to Free Hero Mesh.)

The first component if all resource settings is the puzzle set name, ignoring any directory path components (omit the first component when specifying a setting as a command-line argument). If the puzzle set includes a .name file, its contents are used as the puzzle set name for this purpose.

Some options are boolean. In this case, a true value is anything that starts with "t", "T", "y", "Y", or "1", while a false value is anything that starts with "f", "F", "n", "N", or "0". If neither is the case, the default setting is used.

altImage

A nonnegative integer (default zero). If more than one picture is available of the selected picture size, this is used to determine which one to load.

For example, it can be used to select which player character you want (e.g. male or female or monsters or whatever); however, other uses are possible (the puzzle set should hopefully include documentation to explain its meaning).

class

Define overrides for classes. The next component is the class name (without the initial $), and the next component after that is the option to set. So far the only option is:

editClick

Define mouse bindings for the level editor (only applies to clicks on the playfield). See keybindings.

editKey

Define key bindings for the level editor. See keybindings.

editTitle

Window title to display for editor. If it contains a tilde, the first tilde is replaced by the file base name.

Window titles are only displayed if supported by the window manager.

gameClick

Define mouse bindings for the game (only applies to clicks on the playfield). See keybindings.

gameKey

Define key bindings for the game. See keybindings.

gameTitle

Window title to display for game. If it contains a tilde, the first tilde is replaced by the file base name.

Window titles are only displayed if supported by the window manager.

gamma

If set, all colours in the palette are modified by raising them to the given exponent (which is a positive number given in decimal notation, which does not need to be an integer).

Numbers greater than 1.0 darken the colours while numbers less than 1.0 will lighten the colours.

imageSize

Specify picture size. This should be one to thirty-two integers in the range from 1 to 255. The pictures are always square. It tries to use the picture sizes with the first number given first priority. It will terminate with the puzzle set does not contain any pictures of the specified sizes and the pictures cannot be integer scaled to meet the given sizes either.

Sometimes a puzzle set may contain multiple pictures of the same size in a picture set. In this case, use the altImage setting to select which one you want.

level

Order number of the level to load. Is meant to be used as a command-line argument, rather than included in the configuration file.

margin

How much space (in pixels) is available to the left of the playfield, to display the move list, inventory, editor MRU, status, etc.

This should be at least 65 (which is the default setting). However, numbers less than 88 result in an abbreviated view, while 88 or more results in a full view.

maxObjects

Maximum number of objects that can be created. The default and maximum value is 4294901760. Puzzles with more than this many objects will not work; you will automatically lose if the game attempts to create more objects than that. (If there is a solution that does not require creating that many objects all existing at the same time, then you can still win.)

palette

If set, the name of a file to use as the palette instead of using the built-in palette. The file consists of 256 colours, separated by white space, where each colour is given as six hex digits (two each for red, green, and blue).

screenFlags

A list of zero or more of the following characters:

screenHeight

The height of the main window (a decimal number). Default is 800 pixels.

screenWidth

The width of the main window (a decimal number). Default is 600 pixels.

sqlCoveringIndexScan

Boolean; set true to enable covering index scans in SQLite. It is true by default.

sqlExtensions

A list of SQLite extensions, with spaces in between. They are loaded in the order given.

sqlFile

The file to use to store the user cache database. If this is set to :memory: then it is created in RAM and will not persist. The default setting is to use the file named .heromeshsession in your home directory.

sqlInit

Any number of SQL statements, which will be executed during initialization. If there are any result rows, the result rows are ignored.

Use this if you need any temporary tables/views/triggers, to set database connection options with pragmas, to configure any extensions that may have been loaded, to attach any additional databases you may be using, etc.

(Note: Recursive triggers are automatically enabled and you need not add commands to enable it in this resource setting.)

sqlMemStatus

Boolean; set true to collect memory statistics for SQLite. (Not all memory allocation in Free Hero Mesh uses SQLite, however.) Currently this does not do anything in Free Hero Mesh itself, although an extension might use it.

sqlSmallAllocations

Boolean; if true, SQLite tries to avoid large memory allocations. False by default.

stackProtection

Control stack overflow protection. If omitted or if a C compiler that does not support GNU extensions is used, then no stack protection is implemented. Otherwise, it may be one of the following:

Note: The stack overflow protection is only implemented for functions that may call themself recursively (either directly or indirectly). Also, some operating systems may try to implement stack protection automatically, but it has been found to not always work; this resource makes Free Hero Mesh to use its own implementation of stack protection (in addition to that of the operating system, if any).

tracePrefix

If message tracing is enabled, then many events within the game (including a Trace instruction) will write a line to stdout with the details of the event; this setting defines a prefix to add to each line of trace events.

You may then use external programs to filter the output by this prefix.