Prev: B8BD Up: Map Next: BA75
B8DD: routine35
Used by the routine at COUNTL.
routine35 B8DD LD A,$43
B8DF LD ($5C8F),A
B8E2 CALL ZRDR_P
B8E5 LD A,$44
B8E7 LD ($5C8F),A
B8EA LD BC,$1600
B8ED LD A,$3B
B8EF CALL MPRINT
B8F2 LD A,$46
B8F4 LD ($5C8F),A
B8F7 LD A,(unknown13)
B8FA ADD A,$30
B8FC CALL DH_P
B8FF LD BC,(cursor_coordinates)
B903 LD (unknown19),BC
B907 LD HL,sound_effect_10
B90A CALL play_sound_effect_in_HL
B90D EI
B90E LD A,(computer_player_flag)
B911 OR A
B912 JR Z,routine35_0
B914 CALL FIREON
routine35_0 B917 CALL wait_no_key_seed
B91A CALL wait_key_seed
B91D LD HL,cursorsprite2
B920 LD ($5C7B),HL
routine35_1 B923 LD A,(computer_player_flag)
B926 OR A
B927 JR Z,routine35_2
B929 CALL routine67_0
B92C JR routine35_3
routine35_2 B92E CALL routine41
B931 CALL $02BF
routine35_3 B934 CP $4B
B936 JR NZ,routine35_4
B938 LD A,$41
B93A LD ($5C8F),A
B93D CALL ZRDR_P
B940 CALL clear_bottom_row
B943 LD HL,sound_effect_18
B946 CALL play_sound_effect_in_HL
B949 EI
B94A RET
routine35_4 B94B CP $53
B94D JR NZ,routine35_1
B94F XOR A
B950 LD HL,(unknown19)
B953 LD BC,(cursor_coordinates)
B957 SBC HL,BC
B959 JR Z,routine35_1
B95B LD BC,(unknown19)
B95F LD (unknown75),BC
B963 LD BC,(cursor_coordinates)
B967 LD (unknown76),BC
B96B LD A,(unknown13)
B96E SLA A
B970 CALL calculate_distance
B973 JP P,routine35_5
B976 LD A,$45
B978 LD ($5C8F),A
B97B LD A,$35
B97D LD BC,$1600
B980 CALL MPRINT
B983 CALL wait_no_key_seed
B986 CALL wait_key_seed
B989 JR routine35_1
routine35_5 B98B XOR A
B98C LD (LOF_D),A
B98F LD (unknown48),A
B992 CALL TEMP_C
B995 CALL routine28
B998 CALL routine49
B99B HALT
B99C LD A,(LOF_D)
B99F OR A
B9A0 JR Z,routine35_6
B9A2 LD A,$45
B9A4 LD ($5C8F),A
B9A7 CALL clear_bottom_row
B9AA LD A,$3C
B9AC LD BC,$1600
B9AF CALL MPRINT
B9B2 CALL wait_no_key_seed
B9B5 CALL wait_key_seed
B9B8 JP routine35_1
routine35_6 B9BB LD HL,sound_effect_13
B9BE LD (sound_effect_pointer),HL
B9C1 LD HL,(D_ADD)
B9C4 LD A,(HL)
B9C5 CP $17
B9C7 JP M,routine35_7
B9CA CP $1A
B9CC JP P,routine35_7
B9CF LD A,$04
B9D1 LD HL,sound_effect_12
B9D4 LD (sound_effect_pointer),HL
B9D7 JR routine35_9
routine35_7 B9D9 LD A,(HL)
B9DA CP $15
B9DC JR NZ,routine35_8
B9DE LD A,$02
B9E0 JR routine35_9
routine35_8 B9E2 LD A,$01
routine35_9 B9E4 LD (unknown48),A
B9E7 CALL play_sound_effect_pointer
B9EA CALL routine28
B9ED CALL routine50
B9F0 HALT
B9F1 DI
B9F2 LD HL,S10
B9F5 LD (sound_effect_pointer),HL
B9F8 LD HL,(object_table_entry_pointer)
B9FB LD (temp_entry_pointer),HL
B9FE CALL address_to_coordinate
BA01 LD (LC_POS),HL
BA04 LD HL,WOOP_D
BA07 LD A,$47
BA09 LD ($5C8F),A
BA0C LD A,(unknown48)
BA0F CP $04
BA11 JR NZ,routine35_10
BA13 LD HL,sound_effect_08
BA16 LD (sound_effect_pointer),HL
BA19 LD HL,dragon_breath_sprites
BA1C LD A,$46
BA1E LD ($5C8F),A
routine35_10 BA21 PUSH HL
BA22 CALL play_sound_effect_pointer
BA25 POP HL
BA26 LD DE,$0020
BA29 LD B,$09
routine35_11 BA2B PUSH BC
BA2C PUSH HL
BA2D PUSH DE
BA2E LD (C_DATA),HL
BA31 CALL P_CHAR
BA34 CALL sound_effect_playback
BA37 POP DE
BA38 POP HL
BA39 POP BC
BA3A ADD HL,DE
BA3B DJNZ routine35_11
BA3D LD BC,(unknown19)
BA41 LD (cursor_coordinates),BC
BA45 EI
BA46 LD HL,(object_table_entry_pointer)
BA49 LD A,(HL)
BA4A OR A
BA4B RET Z
BA4C LD DE,$00A1
BA4F ADD HL,DE
BA50 LD (HL),$01
BA52 LD DE,$00A0
BA55 ADD HL,DE
BA56 LD A,(HL)
BA57 CP $04
BA59 JR NZ,routine35_12
BA5B BIT 3,A
BA5D RET Z
routine35_12 BA5E LD HL,(object_table_entry_pointer)
BA61 LD A,(HL)
BA62 CP $24
BA64 JR Z,routine35_13
BA66 CP $25
BA68 JR Z,routine35_13
BA6A CP $29
BA6C JP P,routine35_13
BA6F CP $23
BA71 RET P
routine35_13 BA72 JP routine25
Prev: B8BD Up: Map Next: BA75