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/>.
17 ; have something to strike?
18 bsr get_tile_at_dy, -2
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
28 set spr_dir, [spr_dir], [prof_item]
29 set pos_ty, -12, [prof_item]
30 set frozen, 1, [prof_item]
33 mul 12, [prof_dir], [.t]
34 set pos_tx, [.t], [prof_item]
35 set [spr_num], PSPR_USING
39 jeq .done, [.tile], FTILE_EMPTY
40 rst FRST_PLAY_SOUND, SND_PROF_HITS_BRICK
42 bsr set_tile_at_dx_dy, [prof_dir], -2
43 bsr set_tile_at_dy, -2, FTILE_EMPTY
48 set pos_tx, 0, [prof_item]
50 set [spr_num], PSPR_STANDING
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]