Prev: 28072 Up: Map Next: 28483
28184: Remove Sprite?
Used by the routine at 27648.
28184 CALL RemoveSprite Call RemoveSprite.
28187 LD HL,(30778) HL=*30778.
28190 LD A,(HL) A=*HL.
28191 CP 240 Jump to 28247 if A is higher than 240.
28193 JR NC,28247
28195 LD (30772),A Write A to *30772.
28198 INC HL Increment HL by one.
28199 LD A,(HL) A=*HL.
28200 AND %00001111 Keep only bits 0-3.
28202 LD (30746),A Write A to *30746.
28205 LD A,(HL) A=*HL.
28206 INC HL Increment HL by one.
28207 LD (30778),HL Write HL to *30778.
28210 LD HL,30771 HL=30771.
28213 RLCA RLCA.
28214 JR NC,28217 Jump to 28217 if {} is higher.
28216 DEC (HL) Decrease *HL by one.
28217 RLCA RLCA.
28218 JR NC,28221 Jump to 28221 if {} is higher.
28220 INC (HL) Increment *HL by one.
28221 RLCA RLCA.
28222 JR NC,28232 Jump to 28232 if {} is higher.
28224 CALL 26012 Call 26012.
28227 CALL Controller_ScrollPlayarea Call Controller_ScrollPlayarea.
28230 JR 28241 Jump to 28241.
28232 RLCA RLCA.
28233 JR NC,28241 Jump to 28241 if {} is higher.
28235 CALL 26192 Call 26192.
28238 CALL Controller_ScrollPlayarea Call Controller_ScrollPlayarea.
28241 CALL 27437 Call 27437.
28244 CALL 27984 Call 27984.
28247 PUSH AF Stash AF on the stack.
28248 NOP No operation.
28249 NOP
28250 NOP
28251 NOP
28252 NOP
28253 NOP
28254 CALL 27437 Call 27437.
28257 POP AF Restore AF from the stack.
28258 AND %00001111 Keep only bits 0-3.
28260 SUB 8 A-=8.
28262 LD B,A B=A.
28263 LD A,(30754) A=*Speed.
28266 BIT 7,A Test bit 7 of A.
28268 LD A,18 A=18.
28270 JR Z,28274 Jump to 28274 if {} is zero.
28272 LD A,13 A=13.
28274 ADD A,B A+=B.
28275 LD L,A L=A.
28276 LD A,(30771) A=*30771.
28279 SUB 2 A-=2.
28281 LD H,64 H=64.
28283 CP 8 Jump to 28289 if A is lower than 8.
28285 JR C,28289
28287 LD H,72 H=72.
28289 AND %00000111 Keep only bits 0-2.
28291 RRCA RRCA.
28292 RRCA
28293 RRCA
28294 ADD A,L A+=L.
28295 LD L,A L=A.
28296 PUSH HL Stash HL on the stack.
28297 DEC L Decrease L by two.
28298 DEC L
28299 LD DE,30944 DE=30944.
28302 LD C,40 C=40.
28304 EX DE,HL Exchange the DE and HL registers.
28305 LD B,4 B=4.
28307 LDI LDI.
28309 DJNZ 28307 Decrease counter by one and loop back to 28307 until counter is zero.
28311 LD A,E A=E.
28312 SUB 4 A-=4.
28314 LD E,A E=A.
28315 INC D Increment D by one.
28316 DEC C Decrease C by one.
28317 JR NZ,28305 Jump to 28305 until C is zero.
28319 LD A,D A=D.
28320 SUB 73 A-=73.
28322 SBC A,A A-=A.
28323 ADD A,89 A+=89.
28325 LD D,A D=A.
28326 LD B,4 B=4.
28328 LD A,6 A=6.
28330 LD (DE),A Write A to *DE.
28331 INC E Increment E by one.
28332 DJNZ 28330 Decrease counter by one and loop back to 28330 until counter is zero.
28334 POP HL Restore HL from the stack.
Play the "player dead" audio.
28335 LD B,20 B=20 (counter; 20 loops).
Handler_PlayerDead 28337 PUSH BC Stash BC and HL on the stack.
28338 PUSH HL
28339 LD A,B A=B.
28340 AND %00000111 Keep only bits 0-2.
28342 LD D,0 D=0.
PlayAudioDead 28344 OUT (254),A Send to the speaker.
28346 XOR %00010000 Flip the speaker (bit 4) on/ off.
28348 LD B,D B=D.
AudioDead_Loop 28349 DJNZ AudioDead_Loop Decrease counter by one and loop back to AudioDead_Loop until counter is zero.
28351 DEC D Decrease D by one.
28352 JR NZ,PlayAudioDead Jump to PlayAudioDead until D is zero.
28354 LD B,8 B=8 (counter; height of the carousel).
Carousel_Loop 28356 XOR A A=0.
28357 RLD RLD.
28359 DEC L Decrease L by one.
28360 RLD RLD.
28362 INC L Increment L by one.
28363 OR (HL) Set the bits from *HL.
28364 LD (HL),A Write A to *HL.
28365 INC H Increment H by one.
28366 DJNZ Carousel_Loop Decrease counter by one and loop back to Carousel_Loop until counter is zero.
28368 POP HL Restore HL and BC from the stack.
28369 POP BC
28370 DJNZ Handler_PlayerDead Decrease counter by one and loop back to Handler_PlayerDead until counter is zero.
This entry point is used by the routines at 29025 and 30423.
28372 CALL RemoveSprite Call RemoveSprite.
28375 LD A,(30776) A=*30776.
28378 BIT 7,A Test bit 7 of A.
28380 LD HL,47872 HL=47872.
28383 LD A,128 A=128.
28385 JR Z,28390 Jump to 28390 if {} is zero.
28387 DEC A Decrease A by one.
28388 LD L,4 L=4.
28390 LD (30769),HL Write HL to *30769.
28393 LD HL,30768 HL=30768.
28396 LD (HL),3 Write 3 to *HL.
28398 JR Z,28401 Jump to 28401 if {} is zero.
28400 INC (HL) Increment *HL by one.
28401 LD L,33 L=33.
28403 LD B,3 B=3.
28405 LD (HL),A Write A to *HL.
28406 INC L Increment L by one.
28407 DJNZ 28405 Decrease counter by one and loop back to 28405 until counter is zero.
28409 LD B,8 B=8.
28411 LD (HL),0 Write 0 to *HL.
28413 INC L Increment L by one.
28414 DJNZ 28411 Decrease counter by one and loop back to 28411 until counter is zero.
28416 LD L,26 L=26.
28418 LD (HL),1 Write 1 to *HL.
28420 LD HL,0 HL=0000.
28423 LD (30740),HL Write HL to *30740.
28426 LD HL,(30774) HL=*30774.
28429 LD (30766),HL Write HL to *30766.
28432 BIT 7,A Test bit 7 of A.
28434 LD B,3 B=3.
28436 JR NZ,28439 Jump to 28439 if {} is not zero.
28438 INC B Increment B by one.
28439 LD A,H A=H.
28440 SUB 153 A-=153.
28442 SUB 5 A-=5.
28444 JR NC,28442 Jump to 28442 if {} is higher.
28446 ADD A,5 A+=5.
28448 ADD A,A A+=A.
28449 ADD A,A A+=A.
28450 DEC A Decrease A by one.
28451 LD (30771),A Write A to *30771.
28454 LD A,158 A=158.
28456 ADD A,5 A+=5.
28458 CP H Jump to 28456 if A is lower than H.
28459 JR C,28456
28461 SUB 5 A-=5.
28463 LD H,A H=A.
28464 LD A,L L-=B.
28465 SUB B
28466 LD L,A
28467 JR NC,28473 Jump to 28473 if {} is higher.
28469 LD A,H H-=5.
28470 SUB 5
28472 LD H,A
28473 XOR A A=0.
28474 CALL 26624 Call 26624.
28477 CALL SpendLife Call SpendLife.
28480 CALL GameInitialisation_6 Call GameInitialisation_6.
Prev: 28072 Up: Map Next: 28483