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/>.
18 ; can we use the vial?
19 bsr get_tile_at_dy, -2
20 jne game_no_no, FTILE_EMPTY
22 set spr_dir, [spr_dir], [prof_item]
23 set pos_ty, -12, [prof_item]
24 set frozen, 1, [prof_item]
25 mul 12, [prof_dir], [.f]
26 set pos_tx, [.f], [prof_item]
28 set [spr_num], PSPR_USING
32 set spr_num, [.f], [prof_item]
36 jle .down_loop, [.f], 47
38 set [spr_num], PSPR_STANDING
40 ; have brick at (y-1)?
41 bsr get_tile_at_dy, -1
42 jne .create_brick_m2, FTILE_EMPTY ; yes: create brick at (y-2)
45 jeq .create_brick_m0, FTILE_EMPTY ; no: create brick at (y)
46 ; create brick at (y-1)
47 bsr drop_fall_one_tile
48 bsr set_tile_at_dy, -1, FTILE_GREEN
52 bsr drop_fall_one_tile
53 bsr drop_fall_one_tile
54 bsr set_tile_at_dy, 0, FTILE_GREEN
56 ; create brick at (y-2)
58 bsr set_tile_at_dy, -2, FTILE_GREEN
63 bsr set_item_name_vars, 0
65 set spr_dir, DIR_LEFT, [prof_item]
66 set pos_ty, 0, [prof_item]
67 set frozen, 0, [prof_item]
68 set pos_tx, 0, [prof_item]
75 proc: drop_fall_one_tile
79 get [prof_item], pos_ty, [.ty]
81 set pos_ty, [.ty], [prof_item]
86 endp: drop_fall_one_tile