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 proc: game_use_dynamite
17 ; can we use an dynamite?
18 bsr get_tile_at_dy, -2
19 jne game_no_no, FTILE_EMPTY
21 set pos_ty, -12, [prof_item]
22 set frozen, 1, [prof_item]
28 mul [.dx], [prof_dir], [.t]
29 set pos_tx, [.t], [prof_item]
32 set [spr_num], PSPR_USING
34 jle .mrloop, [.dx], 20
36 set [spr_num], PSPR_STANDING
37 add [pos_x], [prof_dir], [.t]
38 set pos_x, [.t], [prof_item]
40 set pos_y, [.t], [prof_item]
41 set pos_tx, 0, [prof_item]
42 set pos_ty, 0, [prof_item]
43 set frozen, 0, [prof_item]
44 set activated, 1, [prof_item]
45 set item_id, ITEM_DYNAMITE, [prof_item]
47 bsr set_item_name_vars, 0
50 endp: game_use_dynamite