alot of code changed; first try to move level loader out of C engine; not working yet
[awish.git] / asm / defs / rst.awa
blobad8d74d677b002668a4c74973ff30366e0650aa8
1 /*
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.
6  *
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.
11  *
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/>.
14  */
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
32 econst: FRST_GET_MAX_THREADS   = 100
33 econst: FRST_GET_MAX_THREAD_ID = 101
35 econst: FRST_GET_RAND   = 200  ; no args: 0..32767; 1 arg: [0..arg); 2 args: [arg1..arg2]
36 econst: FRST_GET_SEED_H = 201
37 econst: FRST_GET_SEED_L = 202
38 econst: FRST_SET_SEED_H = 203
39 econst: FRST_SET_SEED_L = 204
42 econst: FRST_DEBUG_PRINT_STR = 600  ; arg1: string offset (arg2: length, else asciiz)
43 econst: FRST_DEBUG_PRINT_NUM = 601  ; arg1..arg2: num