2 * This program is free software: you can redistribute it and/or modify
3 * it under the terms of the GNU General Public License as published by
4 * the Free Software Foundation, either version 3 of the License, or
5 * (at your option) any later version.
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
12 * You should have received a copy of the GNU General Public License
13 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 /* RST function identifiers */
16 const: FRST_RESERVED = 0
18 econst: FRST_ML_TITLE = 1 ; mainloop: title
19 econst: FRST_ML_GAME = 2 ; mainloop: game
20 econst: FRST_MINIMAP = 3 ; enter 'minimap' mode
22 ; FRST_OPEN_LEVEL_FILE: calls unload callbacks, closes previous level, opens new, loads level scripts
23 econst: FRST_OPEN_LEVEL_FILE = 10 ; arg: level number (0..max); rst_result: success flag (>0: success; level file size)
24 econst: FRST_GET_LEVEL_DATA_SIZE = 11 ; rst_result: -1 or size of level data
25 econst: FRST_GET_LEVEL_LOADER = 12 ; rst_result: -1 or address of custom loader
26 econst: FRST_GET_LEVEL_INITER = 13 ; rst_result: -1 or address of custom loader
27 econst: FRST_GET_LEVEL_FILE_BYTE = 14 ; arg: offset; unsigned
28 econst: FRST_GET_LEVEL_FILE_WORD = 15 ; arg: offset; signed
29 econst: FRST_SET_LEVEL_SIZE = 16 ; arg1: width, arg2: height (call this before setting tiles)
30 econst: FRST_SET_LEVEL_NAME = 17 ; arg1: pos(<0: in level data; pos=(-pos)-1); arg2 (if present) name length, else asiiz
31 econst: FRST_SET_LEVEL_CODE = 18 ; arg1: pos(<0: in level data; pos=(-pos)-1); arg2 (if present) name length, else asiiz
32 econst: FRST_SET_ITEM_NAME = 19 ; arg1: pos(<0: in level data; pos=(-pos)-1); arg2 (if present) name length, else asiiz
34 //econst: FRST_NEW_LEVEL_FILE = 30 ; arg1: pos(<0: in level data; pos=(-pos)-1); arg2 (if present) name length, else asiiz
36 econst: FRST_PLAY_SOUND = 50 ; arg1: sound index; arg2 (if present) channel; rst_result: -1 or channel
37 econst: FRST_STOP_CHANNEL = 51 ; arg1: channel (-1: all)
38 econst: FRST_IS_CHANNEL_PLAYING = 52 ; arg1: channel; rst_result: bool (-1: how many channels are playing)
39 econst: FRST_LOAD_SOUND = 53 ; arg1: sound index; rst_result: bool
40 econst: FRST_UNLOAD_SOUND = 54 ; arg1: sound index; rst_result: bool
41 econst: FRST_IS_SOUND_LOADED = 55 ; arg1: sound index; rst_result: bool
43 econst: FRST_GET_MAX_THREADS = 100
44 econst: FRST_GET_MAX_THREAD_ID = 101
46 econst: FRST_GET_RAND = 200 ; no args: 0..32767; 1 arg: [0..arg); 2 args: [arg1..arg2]
47 econst: FRST_GET_SEED_H = 201
48 econst: FRST_GET_SEED_L = 202
49 econst: FRST_SET_SEED_H = 203
50 econst: FRST_SET_SEED_L = 204
53 econst: FRST_DEBUG_PRINT_STR = 600 ; arg1: string offset (arg2: length, else asciiz)
54 econst: FRST_DEBUG_PRINT_NUM = 601 ; arg1..arg2: num
55 econst: FRST_DEBUG_ABORT = 666