Routines |
Prev: 62236 | Up: Map | Next: 62410 |
|
||||
62290 | CALL Monster_CalculatePosition | Call Monster_CalculatePosition. | ||
62293 | LD HL,(53796) | HL=*53796. | ||
62296 | LD (HL),B | Write B to *HL. | ||
62297 | INC HL | Increment HL by one. | ||
62298 | LD (HL),C | Write C to *HL. | ||
62299 | INC HL | Increment HL by one. | ||
62300 | LD A,(53830) | A=*Flag_MonsterClimbing. | ||
62303 | LD (HL),A | Write A to *HL. | ||
62304 | INC HL | Increment HL by one. | ||
62305 | LD A,(53832) | A=*Flag_MonsterJumping. | ||
62308 | LD (HL),A | Write A to *HL. | ||
62309 | INC HL | Increment HL by one. | ||
62310 | LD A,(53828) | A=*JumpTable_Pointer. | ||
62313 | LD (HL),A | Write A to *HL. | ||
62314 | INC HL | Increment HL by one. | ||
62315 | LD A,(53831) | A=*Flag_Orientation. | ||
62318 | LD (HL),A | Write A to *HL. | ||
62319 | INC HL | Increment HL by one. | ||
62320 | LD (53796),HL | Write HL to *53796. | ||
This entry point is used by the routines at 62447 and 62490.
|
||||
62323 | CALL GetSpriteID | Call GetSpriteID. | ||
62326 | LD B,A | B=A. | ||
62327 | LD C,0 | C=0. | ||
62329 | LD A,(HL) | A=*HL. | ||
62330 | CP 193 | Jump to 62347 if A is higher than 193. | ||
62332 | JR NC,62347 | |||
62334 | AND %00111111 | Keep only bits 0-5. | ||
62336 | CP 50 | Jump to 62347 if A is higher than 50. | ||
62338 | JR NC,62347 | |||
62340 | LD A,(HL) | A=*HL. | ||
62341 | AND %11000000 | Keep only bits 6-7. | ||
62343 | RLCA | Rotate A left two positions (bits 6 to 7 are now in positions 0 to 1). | ||
62344 | RLCA | |||
62345 | INC A | Increment A by one. | ||
62346 | LD C,A | C=A. | ||
62347 | CALL 62383 | Call 62383. | ||
62350 | INC HL | Increment HL by one. | ||
62351 | CALL 62383 | Call 62383. | ||
62354 | LD E,31 | E=31. | ||
62356 | ADD HL,DE | HL+=DE. | ||
62357 | CALL 62383 | Call 62383. | ||
62360 | INC HL | Increment HL by one. | ||
62361 | CALL 62383 | Call 62383. | ||
62364 | LD A,(54267) | Return if *54267 is not zero. | ||
62367 | AND A | |||
62368 | RET NZ | |||
62369 | LD HL,(53798) | HL=*53798. | ||
62372 | LD (HL),B | Write B to *HL. | ||
62373 | INC HL | Increment HL by one. | ||
62374 | LD (53798),HL | Write HL to *53798. | ||
62377 | LD A,1 | Write 1 to *53784. | ||
62379 | LD (53784),A | |||
62382 | RET | Return. | ||
62383 | LD A,(HL) | Jump to 62405 if *HL is zero. | ||
62384 | AND A | |||
62385 | JR Z,62405 | |||
62387 | CP 255 | Jump to 62405 if A is equal to 255. | ||
62389 | JR Z,62405 | |||
62391 | CP B | Return if A is equal to B. | ||
62392 | RET Z | |||
62393 | LD A,C | Jump to 62405 if C is zero. | ||
62394 | AND A | |||
62395 | JR Z,62405 | |||
62397 | LD A,(HL) | A=*HL. | ||
62398 | AND %11000000 | Keep only bits 6-7. | ||
62400 | RLCA | Rotate A left two positions (bits 6 to 7 are now in positions 0 to 1). | ||
62401 | RLCA | |||
62402 | INC A | Increment A by one. | ||
62403 | CP C | Return if A is equal to C. | ||
62404 | RET Z | |||
62405 | POP DE | Restore DE from the stack. | ||
62406 | LD B,0 | B=0. | ||
62408 | JR 62364 | Jump to 62364. |
Prev: 62236 | Up: Map | Next: 62410 |