awasm, assembler: report unused labels
[awish.git] / asm / game / use / rocket.awa
blobe8f7342e43b6c21f625c35cb532d92ac62c6d38c
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 proc: game_use_rocket
16 deflvar: .dx, .t  ; don't change to locals
17   ;
18   psh [pos_x]
19   psh [prof_dir]
20   add
21   psh [pos_y]
22   sub 3
23   mgf
24   jne game_no_no, 0
25   ;
26   set pos_ty, -12, [prof_item]
27   set frozen, 1, [prof_item]
28   res [prof_item]
29   ;
30   set [.dx], 8
31 .mrloop:
32   add [.dx], 2
33   set [.t], [.dx]
34   mul [.t], [prof_dir]
35   set pos_tx, [.t], [prof_item]
36   bsr game_next_frame
37   ;
38   jne .nor15, [.dx], 12
39   set [spr_num], PSPR_USING
40 .nor15:
41   ;
42   jle .mrloop, [.dx], 20
43   ;
44   set [spr_num], PSPR_STANDING
45   ;
46   add [pos_x], [prof_dir], [.t]
47   set pos_x, [.t], [prof_item]
48   sub [pos_y], 1, [.t]
49   set pos_y, [.t], [prof_item]
50   set pos_tx, 0, [prof_item]
51   set pos_ty, 0, [prof_item]
52   set frozen, 0, [prof_item]
53   set activated, 1, [prof_item]
54   set item_id, ITEM_ROCKET, [prof_item]
55   set [prof_item], 0
56   psh [pos_x]
57   add [prof_dir]
58   psh -666
59   msb 1
60 ;;;.quit:
61   ret
62 endp: game_use_rocket