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/>.
16 deflvar: .dx, .t ; don't change to locals!
18 set frozen, 1, [prof_item]
19 set spr_dir, [spr_dir], [prof_item]
20 set pos_ty, -12, [prof_item]
21 mul [prof_dir], 8, [.dx]
26 set pos_tx, [.dx], [prof_item]
29 set [spr_num], PSPR_USING
32 set pos_tx, [.dx], [prof_item]
37 set pos_tx, [.dx], [prof_item]
42 set pos_tx, [.dx], [prof_item]
45 ; check and open the door
54 jne .notdoor, BTILE_DOOR_LOCK
63 jne .notdoor, FTILE_EMPTY
74 jlt .skip, [.t], BTILE_DOORS_CS
75 jgt .skip, [.t], BTILE_DOORS_CE
83 add [.t], BTILE_DOOR_ADD_TO_OPEN
87 jlt .openloop, [.dx], 0
88 ; key should disappear now
91 bsr set_item_name_vars, 0
92 set [spr_num], PSPR_STANDING
99 set pos_tx, [.dx], [prof_item]
102 sub [.dx], [prof_dir]
103 sub [.dx], [prof_dir]
104 set pos_tx, [.dx], [prof_item]
106 set [spr_num], PSPR_STANDING
108 sub [.dx], [prof_dir]
109 sub [.dx], [prof_dir]
110 set pos_tx, [.dx], [prof_item]
113 set pos_tx, 0, [prof_item]
114 set pos_ty, 0, [prof_item]
115 set spr_dir, 0, [prof_item]
116 set frozen, 0, [prof_item]