Prev: B166 Up: Map Next: B374
B168: routine25
Used by the routines at COUNTL and routine35.
routine25 B168 CALL clear_bottom_row
B16B LD HL,(object_table_entry_pointer)
B16E LD DE,$0321
B171 ADD HL,DE
B172 LD A,(HL)
B173 LD (unknown41),A
B176 XOR A
B177 LD (unknown35),A
B17A LD (unknown36),A
B17D LD (unknown37),A
B180 LD (unknown38),A
B183 LD HL,(D_ADD)
B186 LD A,(HL)
B187 LD (unknown25),A
B18A LD (unknown39),A
B18D CP $1C
B18F JP M,routine25_0
B192 CP $22
B194 JP P,routine25_0
B197 LD (unknown37),A
routine25_0 B19A LD HL,(D_ADD)
B19D LD DE,$01E1
B1A0 ADD HL,DE
B1A1 LD A,(HL)
B1A2 BIT 6,A
B1A4 JR Z,routine25_1
B1A6 LD (unknown37),A
routine25_1 B1A9 LD A,(unknown25)
B1AC SUB $29
B1AE JP M,routine25_3
B1B1 LD HL,unknown_table_3
B1B4 LD D,$00
B1B6 LD E,A
B1B7 ADD HL,DE
B1B8 RES 3,(HL)
B1BA PUSH HL
B1BB LD HL,nothing_pointer
B1BE LD A,(unknown25)
B1C1 DEC A
B1C2 SLA A
B1C4 LD D,$00
B1C6 LD E,A
B1C7 ADD HL,DE
B1C8 LD C,(HL)
B1C9 INC HL
B1CA LD B,(HL)
B1CB LD (unknown40),BC
B1CF LD IX,(unknown40)
B1D3 LD A,(IX+$19)
B1D6 LD (IX+$1C),A
B1D9 LD (IX+$22),A
B1DC POP HL
B1DD LD A,(HL)
B1DE AND $07
B1E0 OR A
B1E1 JR Z,routine25_2
B1E3 LD (unknown37),A
B1E6 LD (unknown35),A
routine25_2 B1E9 LD A,(unknown25)
B1EC LD D,A
B1ED LD E,$0E
B1EF CALL GETCHR
B1F2 OR A
B1F3 JR Z,routine25_3
B1F5 LD (unknown37),A
routine25_3 B1F8 LD HL,(object_table_entry_pointer)
B1FB LD A,(HL)
B1FC CP $1C
B1FE JP M,routine25_4
B201 CP $22
B203 JP P,routine25_4
B206 LD (unknown38),A
routine25_4 B209 LD DE,$01E1
B20C ADD HL,DE
B20D LD A,(HL)
B20E BIT 6,A
B210 JR Z,routine25_5
B212 LD (unknown38),A
routine25_5 B215 LD HL,(object_table_entry_pointer)
B218 LD A,(HL)
B219 SUB $29
B21B JP M,routine25_7
B21E LD HL,unknown_table_3
B221 LD D,$00
B223 LD E,A
B224 ADD HL,DE
B225 XOR A
B226 LD A,(HL)
B227 AND $C0
B229 RLCA
B22A RLCA
B22B OR A
B22C JR Z,routine25_6
B22E INC A
routine25_6 B22F LD (unknown36),A
B232 BIT 3,(HL)
B234 JR Z,routine25_7
B236 LD HL,unknown36
B239 LD A,$03
B23B ADD A,(HL)
B23C LD (HL),A
routine25_7 B23D LD A,(unknown38)
B240 OR A
B241 JR Z,routine25_8
B243 LD A,(unknown37)
B246 OR A
B247 JR NZ,routine25_8
B249 LD A,$45
B24B LD ($5C8F),A
B24E LD BC,$1600
B251 LD A,$39
B253 CALL MPRINT
B256 LD HL,sound_effect_22
B259 CALL play_sound_effect_in_HL
B25C EI
B25D CALL wait_no_key_seed
B260 CALL wait_key_seed
B263 CALL clear_bottom_row
B266 LD A,(unknown13)
B269 OR A
B26A RET NZ
B26B JP routine23_14
routine25_8 B26E LD A,(unknown25)
B271 LD D,A
B272 LD E,$0D
B274 LD A,(unknown13)
B277 OR A
B278 JR Z,routine25_9
B27A LD E,$0E
routine25_9 B27C CALL GETCHR
B27F LD HL,unknown35
B282 ADD A,(HL)
B283 LD E,A
B284 CALL get_random
B287 ADD A,E
B288 LD C,A
B289 PUSH BC
B28A LD HL,(object_table_entry_pointer)
B28D LD A,(HL)
B28E LD D,A
B28F LD E,$10
B291 CALL GETCHR
B294 LD HL,unknown36
B297 ADD A,(HL)
B298 LD E,A
B299 CALL wait_no_key_seed
B29C CALL get_random
B29F ADD A,E
B2A0 POP BC
B2A1 SUB C
B2A2 PUSH AF
B2A3 LD A,(unknown13)
B2A6 OR A
B2A7 JR NZ,routine25_10
B2A9 CALL routine26
routine25_10 B2AC POP AF
B2AD JP P,routine25_13
B2B0 LD HL,(object_table_entry_pointer)
B2B3 LD DE,$0281
B2B6 ADD HL,DE
B2B7 LD A,(HL)
B2B8 OR A
B2B9 JR NZ,routine25_11
B2BB LD HL,(object_table_entry_pointer)
B2BE LD A,(HL)
B2BF CP $29
B2C1 CALL P,WIZKIL
B2C4 CP $1C
B2C6 JP P,routine25_14
B2C9 LD DE,$01E1
B2CC ADD HL,DE
B2CD LD A,(HL)
B2CE BIT 4,A
B2D0 JP NZ,routine25_14
B2D3 BIT 6,A
B2D5 JP NZ,routine25_14
B2D8 LD A,$FF
B2DA LD (unknown39),A
B2DD JP routine25_14
routine25_11 B2E0 LD E,$00
B2E2 LD (HL),E
B2E3 LD HL,(object_table_entry_pointer)
B2E6 PUSH AF
B2E7 LD A,(HL)
B2E8 CP $22
B2EA JR NZ,routine25_12
B2EC LD DE,$0321
B2EF ADD HL,DE
B2F0 LD A,(HL)
B2F1 LD DE,$0140
B2F4 SBC HL,DE
B2F6 LD (HL),A
routine25_12 B2F7 LD HL,(object_table_entry_pointer)
B2FA POP AF
B2FB LD (HL),A
B2FC LD DE,$0321
B2FF ADD HL,DE
B300 LD (HL),$00
routine25_13 B302 LD HL,(D_ADD)
B305 LD (object_table_entry_pointer),HL
B308 LD A,(unknown13)
B30B OR A
B30C RET NZ
B30D JP COUNTL_13
routine25_14 B310 XOR A
B311 LD (unknown21),A
B314 LD (unknown17),A
B317 LD (unknown26),A
B31A LD HL,(object_table_entry_pointer)
B31D LD A,(unknown39)
B320 CP $FF
B322 JR NZ,routine25_15
B324 LD DE,$00A1
B327 ADD HL,DE
B328 LD (HL),$01
B32A LD DE,$00A0
B32D ADD HL,DE
B32E LD (HL),$04
B330 HALT
B331 LD HL,sound_effect_16
B334 CALL play_sound_effect_in_HL
B337 EI
B338 LD A,(unknown25)
B33B CP $25
B33D JR Z,routine25_13
B33F LD A,(unknown13)
B342 OR A
B343 RET NZ
B344 JP COUNTL_5
routine25_15 B347 LD A,(unknown41)
B34A OR A
B34B JR NZ,routine25_16
B34D LD HL,(object_table_entry_pointer)
B350 LD (HL),$01
B352 LD DE,$00A1
B355 ADD HL,DE
B356 LD (HL),$01
B358 JR routine25_17
routine25_16 B35A LD HL,(object_table_entry_pointer)
B35D LD (HL),A
B35E LD DE,$0141
B361 ADD HL,DE
B362 LD (HL),$04
routine25_17 B364 HALT
B365 LD A,(unknown25)
B368 CP $25
B36A JR Z,routine25_13
B36C LD A,(unknown13)
B36F OR A
B370 RET NZ
B371 JP COUNTL_5
Prev: B166 Up: Map Next: B374