Free Hero Mesh

Changes To SQL functions
Login
This is a mirror of the main repository for Free Hero Mesh. New tickets and changes will not be accepted at this mirror.

Changes to "SQL functions" between 2018-04-27 20:38:13 and 2018-04-28 04:42:25

1
2
3
4


5
6
7
8
9
10
11
1
2
3
4
5
6
7
8
9
10
11
12
13




+
+







This document is a list of the available SQL functions that you can use in the customization of Free Hero Mesh. In addition to the ones listed here, you can also use the [http://sqlite.org/lang_corefunc.html|core functions], [http://sqlite.org/lang_datefunc.html|date/time functions], and [http://sqlite.org/lang_aggfunc.html|aggregate functions], of SQLite. See also: [SQL tables].

(Note: This is only a draft and is likely to change in future.)

Asterisks in the headings indicate aggregate functions.

<h2>BASENAME()</h2>
Returns the base name, which is a copy of the first command-line argument (other than switches).

<h2>KEYSTATE(key)</h2>
Given a string with a key name (the same key names used in [keybindings]), return 1 if the key is pushed or 0 if it is not pushed.

<h2>LEVEL()</h2>
23
24
25
26
27
28
29









25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40







+
+
+
+
+
+
+
+
+
  *  0x0100: Left alt
  *  0x0200: Right alt
  *  0x0400: Left meta
  *  0x0800: Right meta
  *  0x1000: Num lock
  *  0x2000: Caps lock
  *  0x4000: Mode

<h2>MOVENUMBER()</h2>
Tells you how many moves have been played so far since it has been reset.

<h2>SIGN_EXTEND(num)</h2>
Sign-extend a 32-bit integer to 64-bits. The 32-bit user variables in Free Hero Mesh might or might not be signed, so when accessing them in SQL (which uses 64-bit numbers) you must use this if you want to treat it as a signed number.

<h2>SOLUTION_REPLAY()</h2>
Returns 1 if replaying the solution or 0 for the normal game.