removed some unused labels
[awish.git] / asm / game / use / gloves.awa
blobeeaec6d94fb098cf4f80af5fe1193342030c1971
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_gloves
16 locals: .t, .tile
17   ; have something to strike?
18   bsr get_tile_at_dy, -2
19   pop [retval]
20   set [.tile], [retval]
21   jeq game_no_no, [.tile], FTILE_STEEL ; can't strike steel
22   jeq .dostrike, [.tile], FTILE_EMPTY ; empty strike
23   ; have place to move the tile?
24   bsr get_tile_at_dx_dy, [prof_dir], -2
25   jne game_no_no, FTILE_EMPTY
26   ;
27 .dostrike:
28   set spr_dir, [spr_dir], [prof_item]
29   set pos_ty, -12, [prof_item]
30   set frozen, 1, [prof_item]
31   res [prof_item]
32   ;
33   mul 12, [prof_dir], [.t]
34   set pos_tx, [.t], [prof_item]
35   set [spr_num], PSPR_USING
36   bsr game_next_frame
37   bsr game_next_frame
38   ;
39   jeq .done, [.tile], FTILE_EMPTY
40   rst FRST_PLAY_SOUND, SND_PROF_HITS_BRICK
41   psh [.tile]
42   bsr set_tile_at_dx_dy, [prof_dir], -2
43   bsr set_tile_at_dy, -2, FTILE_EMPTY
44   ;
45 .done:
46   bsr game_next_frame
47   bsr game_next_frame
48   set pos_tx, 0, [prof_item]
49   sus [prof_item]
50   set [spr_num], PSPR_STANDING
51   bsr game_next_frame
52   bsr game_next_frame
53   bsr game_next_frame
54   bsr game_next_frame
55   ;
56   set spr_dir, 0, [prof_item]
57   set pos_tx, 0, [prof_item]
58   set pos_ty, 0, [prof_item]
59   set frozen, 0, [prof_item]
60   sus [prof_item]
61 ;.quit:
62   ret
63 endp: game_use_gloves