Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1 | pmbaty | 1 | Fixed bugs: |
2 | =========== |
||
3 | |||
4 | signed vs. unsigned |
||
5 | same thing with multiple names (kid_room vs. kid.room) |
||
6 | pop_main: break; |
||
7 | # Level selection: 10 meant 1 |
||
8 | + vs. - in draw_mid |
||
9 | # Wrong y-pos |
||
10 | draw_back_fore: which_table == 0 instead of 1 |
||
11 | # Foretable was not drawn |
||
12 | sub_B726/redraw_needed_tiles: --drawn_col should be ++drawn_col |
||
13 | # How did it work? |
||
14 | process_key: if (start_level == 0) was != |
||
15 | # Shift or enter restarted level |
||
16 | process_key: next_level = current_level + 1; was ++ |
||
17 | # Shift-L didn't work |
||
18 | play_level_2: if (next_level == current_level || check_sound_playing()) { was || ! check_... |
||
19 | draw_tile_fore: wall_pattern(1, 0); should be wall_pattern(1, 1); |
||
20 | # Badly drawn wall |
||
21 | load_lev_spr: release_dathandle(dathandle); was release_dathandle(); |
||
22 | # Guard.dat not released |
||
23 | add_drect: the loop |
||
24 | # Not redrawn |
||
25 | get_curr_tile: missing & 0x1F |
||
26 | check_spike_below: not_finished = 0; was outside do |
||
27 | # HANG |
||
28 | down_pressed: |
||
29 | bad: |
||
30 | distance_to_edge_weight(); |
||
31 | char_.x = char_dx_forward(9); |
||
32 | good: |
||
33 | char_.x = char_dx_forward(distance_to_edge_weight() - 9); |
||
34 | # Can't press button |
||
35 | load_frame_to_obj: |
||
36 | bad: |
||
37 | if ((cur_frame.flags ^ obj_direction) & 0x80) { |
||
38 | good: |
||
39 | if ((cur_frame.flags ^ obj_direction) >= 0) { |
||
40 | # Bad xpos |
||
41 | land: if (! tile_is_floor(get_tile_behind_char()) && was if(tile_... |
||
42 | leave_room: |
||
43 | bad: |
||
44 | if (curr_tile2 != tiles_7_doortop_with_floor && |
||
45 | curr_tile2 != tiles_12_doortop |
||
46 | ) { |
||
47 | if (char_x_right >= 201) { |
||
48 | good: |
||
49 | if (curr_tile2 != tiles_7_doortop_with_floor && |
||
50 | curr_tile2 != tiles_12_doortop && |
||
51 | char_x_right >= 201 |
||
52 | ) { |
||
53 | missing: |
||
54 | } else { |
||
55 | return -1; |
||
56 | } |
||
57 | sub_54A5: short var_A; was word |
||
58 | sub_55BD: char_.frame < 135 || char_.frame >= 149 => (char_.frame < 135 || char_.frame >= 149) |
||
59 | check_chomped: short was word |
||
60 | sub_5D9B/dist_from_wall_behind: - 13; was + |
||
61 | sub_562A: get_left_wall_xpos was get_right_wall_xpos |
||
62 | back_pressed: || dist... was && dist... |
||
63 | land: if (! take_hp(1)) { was if(take_... |
||
64 | # Kid died from two-row falls |
||
65 | do_paused: while (! process_key()); had no ! |
||
66 | leave_room: chary > -16 was 240 |
||
67 | down_pressed: ! tile_is_floor had no ! |
||
68 | else crouch2() |
||
69 | mob_down_a_row: missing - 1 |
||
70 | # Loose that fell out of room appeared at wrong place |
||
71 | read_keyb_control: control_shift = -(...) had no - |
||
72 | # didn't notice shift |
||
73 | get_some_tile: if (tile_type(tile) != 0) { was too long |
||
74 | control_hanging: char_.direction == dir_FF_left was != |
||
75 | action and wall were separate |
||
76 | hang_fall: ! missing (2*) |
||
77 | guard_notice: else missing |
||
78 | loose_land: case (0, BAD!) 1 missing |
||
79 | # loose |
||
80 | is_spike_harmful: short->byte |
||
81 | do_trigger_list: != was == |
||
82 | # buttons didn't work |
||
83 | trigger_1: missing result= |
||
84 | # buttons didn't work (?) |
||
85 | anim_door: array boundary |
||
86 | # gate didn't close |
||
87 | anim_guard: char_frame <= 150 -> >= |
||
88 | control_hanging: if (! tile_is_floor( had no ! |
||
89 | jump_up: } else if (! tile_is_floor( had no ! |
||
90 | SWAP left and right + dir_front/behind + get_tile_... |
||
91 | # VERY silly |
||
92 | draw_gate_fore: missing -2 |
||
93 | # Gate looks bad if kid is behind it |
||
94 | do_paused: && -> || |
||
95 | sub_5840: 2 ifs -> 1 if && |
||
96 | # Go through wall |
||
97 | sub_BAD5: missing == tiles_0_empty |
||
98 | redraw_at_char2: >= 80 was > |
||
99 | redraw_at_char: short was word |
||
100 | do_mobs: short was word |
||
101 | do_mobs: mobs[new_index++] = mobs[index]; was flipped |
||
102 | # If multiple loose floors were falling |
||
103 | level12_shadow_anim: if (can_guard_see_kid < 2 was >= |
||
104 | extern sbyte byte_1F00E; was byte |
||
105 | extern sbyte byte_1EFD2; was byte |
||
106 | leave_room: added (sbyte) cast |
||
107 | # Can't go up to other room |
||
108 | check_can_guard_see_kid: word -> short |
||
109 | extern short obj_x; was word |
||
110 | # When run-jumping out of a room, kid suddenly appears in the middle |
||
111 | do_control: very silly |
||
112 | do_control: if ((word)var_2 < (word)-6) { was var_2 < 6 |
||
113 | dx_weight: word -> sbyte |
||
114 | get_tile_div_mod_m7: missing return |
||
115 | check_action: missing else (or return) |
||
116 | # level 1: shift -> wants to grab (in_wall???) |
||
117 | clip_char: |
||
118 | bad: |
||
119 | if (action != actions_0_stand && (frame == 79 || frame == 81) || |
||
120 | get_tile(room, char_col_left, char_top_row) == tiles_20_wall || |
||
121 | tile_is_floor(curr_tile2) |
||
122 | ) { |
||
123 | good: |
||
124 | if (action == actions_0_stand && (frame == 79 || frame == 81) || |
||
125 | get_tile(room, char_col_right, char_top_row) == tiles_20_wall || |
||
126 | tile_is_floor(curr_tile2) |
||
127 | ) { |
||
128 | check_press: else return; |
||
129 | # Can't break loose floor from above (breaks 2 tiles to the right) |
||
130 | fell_on_your_head: frame < 5 || was && |
||
131 | # Landing loose won't hurt kid |
||
132 | play_seq: missing is_guard_notice = 1; |
||
133 | # Guard doesn't hear footsteps |
||
134 | dist_from_wall_forward: ! can_bump_into_gate() had no ! |
||
135 | # Kid wants to run towards gate instead of stepping (but he steps if it's open) + when he bumps into gate, pushed to wrong position |
||
136 | redraw_at_char: short was word |
||
137 | # Level 4 right: bump into gate, then turn around -> game hangs |
||
138 | set_clip_rect: ptr_scrninfo was surface |
||
139 | # no clipping at all |
||
140 | # When climbing up to floor: not overlaid (direction = right) |
||
141 | reset_clip_rect: ptr_scrninfo was surface |
||
142 | clip_char: |
||
143 | bad(?): |
||
144 | if ((get_tile(room, col, row) == tiles_7_doortop_with_floor || |
||
145 | curr_tile2 == tiles_12_doortop) && |
||
146 | action == actions_3_in_midair || |
||
147 | action == actions_4_in_freefall && frame == 106 || |
||
148 | action == actions_5_bumped && frame == 107 || |
||
149 | char_.direction < 0 && ( |
||
150 | action == actions_2_hang_climb || |
||
151 | action == actions_6_hang_straight || |
||
152 | action == actions_1_run_jump && |
||
153 | frame >= 137 && frame < 140 |
||
154 | ) |
||
155 | ) { |
||
156 | good(?): |
||
157 | if ((get_tile(room, col, row) != tiles_7_doortop_with_floor && |
||
158 | curr_tile2 != tiles_12_doortop) || |
||
159 | action == actions_3_in_midair || |
||
160 | action == actions_4_in_freefall && frame == 106 || |
||
161 | action == actions_5_bumped && frame == 107 || |
||
162 | char_.direction < 0 && ( |
||
163 | action == actions_2_hang_climb || |
||
164 | action == actions_6_hang_straight || |
||
165 | action == actions_1_run_jump && |
||
166 | frame >= 137 && frame < 140 |
||
167 | ) |
||
168 | ) { |
||
169 | # Kid can be seen through doortop |
||
170 | set_joy_mode: need_clear_kbdbuf = 1; |
||
171 | # Home/Page Up doesn't jump if I press it only shortly |
||
172 | method_3_blit_mono: , 0x10); was 0 |
||
173 | # potion bubbles have a black background |
||
174 | draw_image_2: |
||
175 | # title texts are grey |
||
176 | animate_chomper: modifier > 15 was >= |
||
177 | bad: |
||
178 | if ((trob.room != drawn_room || trob.tile / 10 != kid.curr_row) |
||
179 | && kid.alive >= 0 && var_2 == 0 && (curr_modifier & 0x7F) >= 6 |
||
180 | ) { |
||
181 | bad 2: |
||
182 | if ((trob.room != drawn_room || trob.tile / 10 != kid.curr_row) || |
||
183 | kid.alive >= 0 && var_2 == 0 && (curr_modifier & 0x7F) >= 6 |
||
184 | ) { |
||
185 | # Level 8: 2 chompers move even if kid is not in top row |
||
186 | # chompers don't stop if kid leaves their row |
||
187 | good: |
||
188 | if ((trob.room != drawn_room || trob.tile / 10 != kid.curr_row || |
||
189 | kid.alive >= 0 && var_2 == 0) && (curr_modifier & 0x7F) >= 6 |
||
190 | ) { |
||
191 | # chompers get stuck if kid leaves their row |
||
192 | start_chompers: if ((byte)char_.curr_row < 3) { was if(char_ |
||
193 | # Level 7 room 2: chomper moves weird ---- now it's stuck |
||
194 | load_lev_spr: |
||
195 | # guard1/2.dat not released |
||
196 | stand_flipped: if (control_forward < 0) { was > |
||
197 | # Guard turns away from kid (guard_notice: move_down_forw); anim_guard_2 ? do_control ? stand_flipped? |
||
198 | take_hp: dead = 1; missing from guard |
||
199 | # guard steps back before dying |
||
200 | sub_509A: |
||
201 | bad: |
||
202 | char_.fall_y = char_.y = y_land[char_.curr_row + 1]; |
||
203 | good: |
||
204 | char_.y = y_land[char_.curr_row + 1]; |
||
205 | char_.fall_y = 0; |
||
206 | # when guard bumps kid, kid flies out of room |
||
207 | get_some_tile: missing else branch of distance != 0 |
||
208 | hurt_by_sword: missing: |
||
209 | char_.y = y_land[char_.curr_row + 1]; |
||
210 | char_.fall_y = 0; |
||
211 | # When guard pokes kid when kid is jumping, kid dies in air. |
||
212 | anim_guard: missing return; after <50 |
||
213 | check_hurting: if (char_.frame == 154) { was char_frame |
||
214 | if (char_.frame == 154 && opp.frame != 161 was char_frame and opp_frame |
||
215 | control_with_sword: |
||
216 | if ((word)distance < (word)90) { had no (word) cast |
||
217 | if ((word)distance < (word)-4) { had no (word) cast |
||
218 | # kid/guard won't turn around if guard/kid is behind him; guard goes forward |
||
219 | show_time: rem_min != 0 was missing |
||
220 | rem_min % 5 == 0 was != |
||
221 | jump_up2: char_dx_forward(distance - 3); was (3); |
||
222 | # Level 2 room 4: When facing wall, press up. Kid should jump up. |
||
223 | forward_pressed: short was word |
||
224 | check_can_guard_see_kid: kid_frame was kid.frame |
||
225 | guard_follows_kid_down: parantheses after &&, !tile_... |
||
226 | sub_404B: if (tile... was if (!tile... |
||
227 | hof_read: .HOF was .SAV |
||
228 | # intro: empty hof is shown |
||
229 | do_wait was wrong |
||
230 | # now h/j/u/n work after second esc |
||
231 | added do_simple_wait, replaced do_wait with do_simple_wait in play_level_2 and sub_4B16 |
||
232 | # h,j,u,n doesn't work |
||
233 | # after pausing, first(second) esc is ignored |
||
234 | # first ESC is read by play_level_2/do_wait/idle, |
||
235 | # second by play_level_2/do_wait/do_paused/idle, |
||
236 | # next are read by play_level_2/play_frame/play_kid_frame/check_died/sub_7981/do_paused/idle |
||
237 | anim_guard: short was word |
||
238 | FIXED? # Game hangs if kid with sword is too far from guard |
||
239 | FIXED: # When looking left and climbing up/down, overlay is drawn at wrong position (level 4 room 17) |
||
240 | FIXED? # Hang against wall is positioned wrongly. |
||
241 | FIXED: # level 6: shadow doesn't step onto button |
||
242 | # Immediate shift-L on level 1: room = -1 (from collision) |
||
243 | worked around |
||
244 | also present in original, see: dos-debug-FF.txt |
||
245 | FIXED: # kid falls into spike in demo |
||
246 | FIXED: # kid/guard has no sword when looking right ; hflip does something weird with sword image |
||
247 | # most images use SDL_SRCCOLORKEY, sword uses SDL_SRCALPHA |
||
248 | # when the skeleton falls into other room, it disappears ... or just becomes invisible? |
||
249 | in_wall: short was word |
||
250 | distance_to_edge: short was word |
||
251 | sub_80A3: short was word |
||
252 | load_frame: short was word |
||
253 | check_action: short was word |
||
254 | do_wait and do_simple_wait: while was do-while |
||
255 | # when un-pausing with arrow (or home/pageup), arrow is not noticed (annoying with chompers) + hangs until key is released |
||
256 | control_with_sword: removed else |
||
257 | # Level 2 room 4, level 1 room 3: Guard won't attack if kid is too far (but sees him!) except if kid turns his back to the guard |
||
258 | FIXED: # intro: Jaffar disappears after turning |
||
259 | bumped_floor: return; was missing |
||
260 | start_game: missing else |
||
261 | check_action: ### |
||
262 | bad: |
||
263 | if (action == actions_6_hang_straight || |
||
264 | (action == actions_5_bumped && frame == 109) |
||
265 | ) { |
||
266 | // nothing |
||
267 | good: |
||
268 | if (action == actions_6_hang_straight || |
||
269 | action == actions_5_bumped |
||
270 | ) { |
||
271 | if (frame == 109) { |
||
272 | check_on_floor(); |
||
273 | } |
||
274 | FIXED: # Level 1 room 12, Level 7 room 9, Level 8 room 7, level 4 room 4, level 15 room 4: can jump/fall through single wall; step to wall and press up/down ; up fixed |
||
275 | # in_wall: get_tile_infrontof_char, curr_col is inside wall! -> infrontof is the other side of the wall! |
||
276 | # start_fall: row is immediately changed to 2 |
||
277 | # if gate (level 4): play_level_2/play_frame/play_kid_frame/check_bumped/check_bumped_look_left/is_obstacle_at_col/is_obstacle/can_bump_into_gate |
||
278 | # if wall (level 1): play_level_2/play_frame/play_kid_frame/check_bumped/check_bumped_look_left/is_obstacle_at_col/is_obstacle |
||
279 | FIXED: # level 2 room 5: When run-jumping to wall, kid is not hurt |
||
280 | FIXED: # level 1 room 1: after run-jumping to gate, kid falls too early (related to wall-jump?) |
||
281 | draw_hurt_splash: missing obj_dx_forward(5); |
||
282 | # when hurt by fall, hurt splash appears at wrong xpos (6 to the left) |
||
283 | compare_curr_objs: |
||
284 | bad: |
||
285 | if (objtable[obj_index1].obj_type != 0x80 || |
||
286 | objtable[obj_index2].obj_type != 0x80 |
||
287 | ) { |
||
288 | if (objtable[obj_index1].y >= objtable[obj_index2].y) return 0; |
||
289 | } else { |
||
290 | if (objtable[obj_index1].y <= objtable[obj_index2].y) return 0; |
||
291 | } |
||
292 | good: |
||
293 | if (objtable[obj_index1].obj_type == 0x80 && |
||
294 | objtable[obj_index2].obj_type == 0x80 |
||
295 | ) { |
||
296 | return (objtable[obj_index1].y < objtable[obj_index2].y); |
||
297 | } else { |
||
298 | return (objtable[obj_index1].y > objtable[obj_index2].y); |
||
299 | } |
||
300 | # kid appears in front of dead guards |
||
301 | show_time: leveldoor_open == 0 was != |
||
302 | # 1 HP does not blink on level 13 |
||
303 | animate_sword: if (curr_modifier == 0) { was if (curr_modifier) { |
||
304 | run_jump: (word)var_8 < (word)-8 was var_8 < -8 |
||
305 | FIXED: # shadow is invisible (wrong pos) on level 12 if kid enters from right ... until kid pokes shadow |
||
306 | # INVALID: shadow dies from one hit? |
||
307 | Some HPs [after third] disappear when going down. |
||
308 | method_1_blit_rect used SDL_FillRect |
||
309 | Gate does not stay open if a guard is killed on an open button. |
||
310 | died_on_button: missing tile = tiles_14_debris; |
||
311 | bug_chomper.PNG |
||
312 | caused by FIX_BIGPILLAR_CLIMB |
||
313 | bug_climb.PNG |
||
314 | caused by FIX_BIGPILLAR_CLIMB |
||
315 | --- after 20140524 --- |
||
316 | end_sequence: hof_index <= hof_count was hof_index < hof_count |
||
317 | FIXED?: # at the end of the game, no hall of fame? |
||
318 | # Crashes instead of demo level. (after HOF) even in 20140524 |
||
319 | release_title_images: free_near(xlat_title_40); |
||
320 | warning: Invalid Address specified to RtlFreeHeap ( 00A30000, 00DE23D8 ) |
||
321 | added some NULL checks |
||
322 | init_game(): free_screeninfo() hangs (?) |
||
323 | after loading kid.dat |
||
324 | added some more =NULL statements. |
||
325 | FIXED? |
||
326 | why was this not a problem before? |
||
327 | FIXED: # "Press button..." does not blink correctly. |
||
328 | FIXED: # HOF is not saved after adding myself. |
||
329 | PRINCE.HOF (and PRINCE.SAV) is read-only! |
||
330 | hof_write: missing ,0600 |
||
331 | FIXED: # Start level 14, press H until the ending is shown. HOF shows 60:xx instead of 59:xx. |
||
332 | show_hof: missing - 1 |
||
333 | FIXED: get_trob_right_above_pos_in_drawn_room, inside if(trob.room == room_B) : missing else{tile_pos = 30;} |
||
334 | draw_game_frame: var_2 = word_20C6A / 12; -> var_2 = word_20C6A % 12; |
||
335 | --- 2014-07-06 |
||
336 | FIXED: # fading bugs |
||
337 | * set_gr_mode: 24bit vs. 32bit |
||
338 | * make_offscreen_buffer: RGB vs. BGR |
||
339 | * fade_out_frame: missing "++off_pixel_ptr;" |
||
340 | FIXED: # Fading of cutscenes is too slow... unless I move the cursor over the window. |
||
341 | proc_cutscene_frame: where to put idle() ? |
||
342 | FIXED?: # Before the first frame of the level, the last frame (of the previous level or the cutscene) is drawn. |
||
343 | # draw_level_first() -> redraw_screen(0) -> remove_flash() |
||
344 | --- 2014-07-22 |
||
345 | FIXED: # Game is too fast for a short time after switching rooms. (Or restarting the level) |
||
346 | # was caused by the "COMPAT_TIMER" |
||
347 | FIXED: Cutscenes fade too fast without COMPAT_TIMER |
||
348 | # Changed 0 to 1 in the calls to make_pal_buffer_fade{in,out} (seg001.c) |
||
349 | FIXED: Andrew: "New rooms take quite some time to be drawn, with the screen being blank in-between" |
||
350 | # SDL_UpdateRect was called after each drawing. -- It is needed only if the target is the on-screen surface. |
||
351 | FIXED: If the mouse cursor leaves/enters the window, the game does as if the pressed keys were released. |
||
352 | # This should happen only if the game loses keyboard focus. |
||
353 | # Perhaps the game should also be paused in this case? |
||
354 | # idle(): There are many types of SDL_ACTIVEEVENT, losing SDL_APPINPUTFOCUS if just one of them. |
||
355 | --- 2014-07-23 |
||
356 | FIXED: Keys did not repeat themselves. |
||
357 | Needed for keys like "+" and "-". |
||
358 | Using SDL_EnableKeyRepeat(). |
||
359 | FIXED: # Starting a new game after winning a previous one makes all texts in the game blue instead of white. |
||
360 | draw_text_cursor(): added textstate.textcolor = 15; |
||
361 | --- 2014-07-24 |
||
362 | FIXED: # When the screen is flashing, there may be black rectangles around the moving objects. |
||
363 | Move the flashing after the redraws at two places: |
||
364 | 1. play_level_2() in seg003.c (through flash_if_hurt()) |
||
365 | 2. proc_cutscene_frame() in seg001.c |
||
366 | FIXED: start_fall(): distance_to_edge_weight() <= 7 was 6 (under seq_id = 82;) |
||
367 | FIXED: # Can't do level 7 trick: In room 24 bump into the right wall. Turn left, run left and immediately jump. |
||
368 | play_frame -> play_kid_frame -> check_bumped -> check_bumped_look_left -> bumped -> bumped_floor -> bumped_sound |
||
369 | bumped_floor(): |
||
370 | bad: if (char_.sword != 2 && y_land[char_.curr_row + 1] - char_.y >= 15) { |
||
371 | good: if (char_.sword != 2 && (word)(y_land[char_.curr_row + 1] - char_.y) >= (word)15) { |
||
372 | FIXED: check_hang(): |
||
373 | bad: y_land[char_.curr_row + 1] <= char_.y + 25 |
||
374 | good: (word)y_land[char_.curr_row + 1] <= (word)(char_.y + 25) |
||
375 | FIXED: do_fall(): |
||
376 | bad: if (y_land[char_.curr_row + 1] > char_.y) { |
||
377 | good: if ((word)y_land[char_.curr_row + 1] > (word)char_.y) { |
||
378 | --- 2014-08-04 |
||
379 | FIXED: # Can't interrupt fading of title screen. |
||
380 | The problem is that fade_in_2 does a zero-length wait, and expects keypresses to happen then. |
||
381 | fade_{in/out}_frame does a "simple wait", that is, keypresses are not processed then. |
||
382 | So I changed that to a "regular" wait. |
||
383 | FIXED: # (Micro Palace, level 12) If kid is on the very left (in bottom row), then shadow is in wrong direction (looking left), and is constantly turning around. |
||
384 | move_2_backward() is called from level12_shadow_anim() |
||
385 | Local variable xdiff might be used uninitialized! |
||
386 | Workaround: initialize xdiff with a big number. |
||
387 | This behavior matches the DOS version but not the Apple II source. (AUTO.S, part around "wait until kid gets close") |
||
388 | --- 2014-08-06 |
||
389 | FIXED: When using DAT files: some images are not loaded. (Example: pillar left, spike left) |
||
390 | load_more_opt_graf(): missing -1 |
||
391 | FIXED: # (Micro Palace, level 4) After kid enters exit door, chomper bites kid. |
||
392 | set_char_collision(): If current image is NULL then width=height=0. (Older version didn't set width/height in this case.) |
||
393 | FIXED: # shadow is partially green when he is looking to the right |
||
394 | hflip(): output surface should have no alpha |
||
395 | FIXED: replaced exit with quit at many places |
||
396 | FIXED: # When using DAT files: chomper blood is a rectangle. |
||
397 | "Extra" optional images were not set transparent. |
||
398 | method_3_blit_mono(): Added SDL_SetColorKey call. |
||
399 | FIXED: # (Prince of Wateria, level 5 room 3) (palace) Empty potion has red bubbles. |
||
400 | draw_tile_anim(): case 0x00: break; -> return; |
||
401 | --- 2014-08-07 |
||
402 | FIXED: parry(): char_charid == charid_0_kid -> char_charid != charid_0_kid |
||
403 | FIXED: parry(): var_6 = 1; } -> var_6 = 1; } else |
||
404 | FIXED: parry(): back_with_sword(); (the first) -> back_with_sword(); return; |
||
405 | --- 2014-08-08 |
||
406 | FIXED: Made compatible with 64-bit. |
||
407 | I replaced occurences of "short" and "long" with "Uint16" and "Uint32". |
||
408 | To be extra sure, I also added some compile time asserts about the sizes of all types that are used in the DAT files. |
||
409 | --- 2014-08-10 |
||
410 | FIXED: If color 0 of a palette was not black, then it was not transparent. |
||
411 | For example, in Lost In The Forest ( http://www.popot.org/custom_levels.php?mod=0000082 ). |
||
412 | FIXED: PNGs with alpha channel are drawn properly. |
||
413 | --- 2014-08-23 |
||
414 | FIXED: make_loose_fall(): |
||
415 | - if (curr_room_modif[curr_tile_pos] <= 0) { |
||
416 | + if ((sbyte)curr_room_modif[curr_tile_pos] <= 0) { |
||
417 | FIXED: # When fighting, parry-attack-parry-attack-... sequences stop when the guard attacks. |
||
418 | parry(): |
||
419 | - if (opp_frame != 167) return; |
||
420 | + if (char_frame != 167) return; |
||
421 | --- 2014-08-24 |
||
422 | FIXED: prandom(): initialize from current time |
||
423 | --- 2014-08-26 |
||
424 | FIXED: animate_leveldoor(): (seg007.c) |
||
425 | - !(sound_flags & sfDigi) && |
||
426 | + (sound_flags & sfDigi) && |
||
427 | FIXED: play_speaker_sound(): (seg009.c) |
||
428 | + speaker_sound_stop(); |
||
429 | --- 2014-08-28 |
||
430 | FIXED: Under Linux, the game hanged randomly, because the main timer sometimes didn't generate its event. |
||
431 | timer_callback() and sound_callback(): (in seg009.c) |
||
432 | Remove and NULL the timer handle before generating the event. |
||
433 | This also prevents the "SDL_RemoveTimer:" errors. |
||
434 | FIXED: Removed the "Would play sound", "length =", "set_char_collision" and "Loading chtab" messages. |
||
435 | Those were annoying and possibly slowed the game down. |
||
436 | FIXED: # Level 12: If I enter the last room while the music is still "playing", then the game does not advance to level 13. |
||
437 | # Tried to load cutscene for level 26, not in 0..15 |
||
438 | play_frame(): (in seg000.c) |
||
439 | + stop_sounds(); |
||
440 | FIXED: # Level 12->13 transition should not restore full HP or show level number. |
||
441 | play_frame(): (in seg000.c) |
||
442 | + seamless = 1; |
||
443 | FIXED: # Displaying text is visibly slow on some systems. |
||
444 | method_1_blit_rect(), method_5_rect(), blit_xor(), method_6_blit_img_to_scr(): (in seg009.c) |
||
445 | Update only the affected area instead of the whole screen. |
||
446 | - SDL_UpdateRect(onscreen_surface_, 0, 0, 0, 0); |
||
447 | + SDL_UpdateRects(onscreen_surface_, 1, &dest_rect); |
||
448 | --- 2014-09-05 |
||
449 | FIXED: Pressing "K" on a skeleton crashes the game. |
||
450 | add_midtable(): (in seg008.c) |
||
451 | + if (id > chtab_addrs[chtab_id]->n_images) { |
||
452 | + printf("add_midtable: Tried to use image %d of chtab %d, not in 1..%d\n", id, chtab_id, chtab_addrs[chtab_id]->n_images); |
||
453 | + return 0; |
||
454 | + } |
||
455 | FIXED: Added "return 0;" after the "*Table Overflow" messages. |
||
456 | --- 2014-09-22 |
||
457 | FIXED: blit_xor(): (in seg009.c) |
||
458 | - SDL_UpdateRects(onscreen_surface_, 1, &dest_rect); |
||
459 | + SDL_UpdateRects(onscreen_surface_, 1, /*&*/dest_rect); |
||
460 | FIXED: process_key(): (in seg000.c) |
||
461 | - turn_sound_on_off(!is_sound_on * 15); |
||
462 | + turn_sound_on_off((!is_sound_on) * 15); |
||
463 | FIXED: load_opt_sounds(): (in seg000.c) |
||
464 | - digi_dat = open_dat("DIGISND21.DAT", 0); |
||
465 | + digi_dat = open_dat("DIGISND2.DAT", 0); |
||
466 | FIXED: # Digi sounds hang the game for 1 second (or permanently). |
||
467 | Instead of opening and closing the audio device for each sound, keep it open (with a constant rate -> resampling is needed). |
||
468 | FIXED: # On windows, digi sounds are played with the wrong timing. You can hear this best when the kid is continuously running, or when a gate is opening/closing. |
||
469 | Sound buffer length is 5512 instead of the 512 I set. |
||
470 | With 22050 Hz samplerate, this means 0.25 seconds instead of 0.023 s. |
||
471 | On Linux, the length is 256, and the timing is good. |
||
472 | Fixed by replacing SDL.dll (1.14) with the newest version (1.2.15). |
||
473 | --- 2014-09-23 |
||
474 | FIXED: The game quits in the intro, when Jaffar opens the door. |
||
475 | play_digi_sound(): (in seg009.c) SDL_BuildAudioCVT() might also return 0 on success, but this is not documented in the docs of SDL 1.2. |
||
476 | --- 2014-09-25 |
||
477 | FIXED: Index overflow in get_tile_div_mod() is kid is far off left. |
||
478 | FIXED: # When doing the level 5 trick (backing through the gate), the kid appears in the room to the *right* instead of left. |
||
479 | FIXED: # Level 5: If you back out from the room where the guard is originally (but the screen is not switched), the kid might fall through the floor at the level door. |
||
480 | --- 2014-10-06 |
||
481 | FIXED: check_shadow(): (in seg002.c) |
||
482 | - if (leveldoor_open == 0x4D) { |
||
483 | + if (leveldoor_open != 0x4D) { |
||
484 | --- 2014-10-11 |
||
485 | FIXED: Made the game compatible with Mac OS X, based on the suggestions by StaticReturn (from the Princed forum). |
||
486 | (See also MAC_CHANGES.txt) |
||
487 | - Renamed wait() to pop_wait(). |
||
488 | - do_trigger_list: |
||
489 | - while (doorlink1_ad[index] != -1) { // these can't be equal! |
||
490 | + while (1) { |
||
491 | - Added typecasts to pointers (at malloc() calls for example). |
||
492 | FIXED: Fixed most things that caused compiler warnings. |
||
493 | - Changed some pointers from void* to a better type. |
||
494 | - Removed some unused variables. |
||
495 | - Removed some unused parameters. |
||
496 | - Changed the numbers in tile and frame tables from unsigned to signed where this was needed. |
||
497 | - Added const to some parameters. |
||
498 | CHANGE: Now cheats are disabled by default unless the game is compiled in debug mode. |
||
499 | CHANGE: Disambiguated tilepos and tiletype. |
||
500 | --- 2014-10-27 |
||
501 | CHANGE: Added a font inside the exe. (hc_font_data[]) |
||
502 | CHANGE: Changed project type to GUI. This means that the (empty) console window won't appear under Windows. |
||
503 | CHANGE: Changed project's name to "SDLPoP" (was "port"). |
||
504 | CHANGE: Changed the title to "Prince of Persia (SDLPoP) v1.11" (it used to say "... (SDL) v#.##") |
||
505 | --- 2014-12-03 |
||
506 | FIXED: When doing Trick 95, the kid might bounce back from the wall a bit. |
||
507 | start_fall(): (seg006.c) |
||
508 | seqtbl_offset_char(104); // start fall (when?) |
||
509 | + play_seq(); |
||
510 | --- 2014-12-20 |
||
511 | FIXED: Don't quit if there is no sound device available. |
||
512 | Instead, just disable digi sound. |
||
513 | This can happen, for example, on a Raspberry PI emulator (QEMU). |
||
514 | init_digi(): |
||
515 | - quit(1); |
||
516 | + digi_unavailable = 1; |
||
517 | + return; |
||
518 | play_digi_sound(): |
||
519 | + if (digi_unavailable) return; |
||
520 | --- 2015-02-16 |
||
521 | FIXED: Ctrl-S did not turn off mixer sounds. |
||
522 | play_chunk_sound(): |
||
523 | + //if (!is_sound_on) return; |
||
524 | Note: this is not good for sound-based timing! |
||
525 | FIXED: Ctrl-S did not stop currently playing sounds. |
||
526 | turn_sound_on_off(): |
||
527 | + //if (!is_sound_on) stop_sounds(); |
||
528 | Note: this is not good for sound-based timing! |
||
529 | + init_digi(); |
||
530 | + if (digi_unavailable) return; |
||
531 | + Mix_Volume(-1, is_sound_on ? MIX_MAX_VOLUME : 0); |
||
532 | Note: If digi is unavailable, then load_sound will load the speaker sounds, so sound-based timing will still work. |
||
533 | FIXED: # If the game is in full screen, and I switch away (alt-tab) and back, most of the screen will be black, until it is redrawn. |
||
534 | idle(): |
||
535 | + if ((event.active.state & SDL_APPACTIVE) && event.active.gain == 1) { |
||
536 | + SDL_UpdateRect(onscreen_surface_,0,0,0,0); |
||
537 | + } |
||
538 | Note: In this case, DOSBox switches to windowed mode. |
||
539 | |||
540 | # GNU/Linux: Full screen resolution is 640*480 instead of 320*200. |
||
541 | Also on Windows, depending on video card. |
||
542 | # GNU/Linux: After quitting (from full screen), the resolution is not restored, and an error message appears on the console. (X-error.txt) |
||
543 | It seems that this bug disappeared, even from the old versions. It was probably caused by something outside the game. |
||
544 | # "Shift" of Shift-L interrupts cutscene too soon. |
||
545 | # Keys other than Shift won't interrupt fading of cutscene. |
||
546 | |||
547 | Not fixed yet: |
||
548 | ============== |
||
549 | |||
550 | # game speed is a bit off (delay is longer than it should be) -- you can see this best with chompers |
||
551 | # Sometimes when jumping right to room 0: bounces back |
||
552 | # also present in original |
||
553 | # shadow is invisible on level 12 if kid enters from left, or starts in the left half ... until kid pokes shadow |
||
554 | Wrong ypos, you can see that when kid unites with shadow. |
||
555 | # "enters from left": could not reproduce |
||
556 | # "starts in the left half": also present in original |
||
557 | |||
558 | Leaks: |
||
559 | ====== |
||
560 | |||
561 | # LEAK: Going to new level allocates memory (~ 500 kB) that is never freed. |
||
562 | free_chtab(): free_far -> SDL_FreeSurface |
||
563 | # LEAK: Switching between playing and intro allocates memory that is never freed. (play->intro: ~ 500 kB, intro->play: ~ 1 MB) |
||
564 | clear_screen_and_sounds(): not freeing |
||
565 | # LEAK: still leaking |
||
566 | intro->play: ~ 1 MB |
||
567 | play->intro: ~ 340 kB, |
||
568 | offscreen_info = 192 kB, it is never freed! |
||
569 | Fixed |
||
570 | # LEAK: still leaking |
||
571 | intro->play: ~ 772 kB |
||
572 | play->intro: ~ 196 kB |
||
573 | Level 1->2->...->14->1 : ~ 80 kB |
||
574 | --- 2015-02-13 |
||
575 | FIXED: release_title_images is never called! |
||
576 | in start_game() added: |
||
577 | + release_title_images(); |
||
578 | + free_optsnd_chtab(); |
||
579 | Title: 44844 K |
||
580 | Level 1: 28184 K |
||
581 | Title: 45440 K |
||
582 | Level 1: 28188 K |
||
583 | Title: 45448 K |
||
584 | Level 1: 28204 K |
||
585 | 45440-44844 = 596 |
||
586 | 45448-45440 = 8 |
||
587 | 28188-28184 = 4 |
||
588 | 28204-28188 = 16 |
||
589 | Level 1->2->...->14->1 : 28188 -> 28296 -> 28304 ~ 108 or 8 |
||
590 | |||
591 | Formerly not implemented: |
||
592 | ========================= |
||
593 | |||
594 | DONE: # Coloring monochrome images (bubbles, chomper blood, story texts, gate top mask) and black blitter |
||
595 | FIXED: # Top of gate looks weird (mask is drawn) |
||
596 | DONE: # Cutscenes |
||
597 | DONE: # upside-down |
||
598 | FIXED # hangs / bad clip if kid drinks upside-down potion |
||
599 | DONE: # blitter 9 |
||
600 | FIXED # guard HP does not disappear if guard dies |
||
601 | DONE: # Flashing |
||
602 | DONE: # xor blitter (shadow needs this) |
||
603 | DONE: # Guard palettes (can't see guard's HP without this) |
||
604 | DONE: Full screen mode: use the "full" command line option. |
||
605 | --- after 20140524 --- |
||
606 | DONE: Made compatible with GNU/Linux. (2014 May 29) |
||
607 | DONE: # Texts (needs monochrome) (2014 June 2) |
||
608 | DONE: # Fading (almost perfect) (2014 July 6) |
||
609 | --- 2014-07-22 |
||
610 | DONE: # Hide cursor in fullscreen. |
||
611 | --- 2014-08-01 |
||
612 | DONE: # Support LEVELS.DAT |
||
613 | --- 2014-08-06 |
||
614 | DONE: # Use .DAT files |
||
615 | GNU/Linux: The names of the DAT files must be all-uppercase. |
||
616 | --- 2014-08-24 |
||
617 | DONE: # Sound timing (slow-fall and intro needs this) |
||
618 | DONE: # Background color of texts in intro and ending |
||
619 | --- 2014-09-22 |
||
620 | DONE: # Digi sounds (only from DAT) |
||
621 | --- 2014-09-28 |
||
622 | DONE: Added version number to the window title. |
||
623 | --- 2015-02-13 |
||
624 | DONE: Use mixer. |
||
625 | DONE: Added support for music. |
||
626 | --- 2015-02-16 |
||
627 | DONE: Toggle fullscreen with alt-enter. |
||
628 | |||
629 | Not (yet) implemented: |
||
630 | ====================== |
||
631 | |||
632 | # Digi sounds from wav files |
||
633 | # speaker and midi sounds |
||
634 | # stretch image to 2x, 3x (you can use fullscreen instead) |