![]() |
Routines |
Prev: 50411 | Up: Map | Next: 50518 |
Used by the routine at 61268.
|
||||
50464 | LD C,A | C=A. | ||
50465 | LD A,(48432) | B=*Count_ScenicEvents. | ||
50468 | LD B,A | |||
50469 | LD A,(48331) | A=*CurrentRoom. | ||
50472 | LD HL,48248 | HL=Table_ScenicEventLocations. | ||
50475 | JR 50478 | Jump to 50478. | ||
50477 | INC HL | Increment HL by one. | ||
50478 | CP (HL) | Jump to 50482 if A is not equal to *HL. | ||
50479 | JR NZ,50482 | |||
50481 | LD (HL),C | Write C to *HL. | ||
50482 | DJNZ 50477 | Decrease counter by one and loop back to 50477 until counter is zero. | ||
50484 | LD A,C | A=C. | ||
50485 | LD (48331),A | Write A to *CurrentRoom. | ||
50488 | LD A,(48239) | A=*Flag_EventState. | ||
50491 | AND A | Jump to 50517 if A is zero. | ||
50492 | JR Z,50517 | |||
50494 | LD B,8 | B=8. | ||
50496 | LD HL,48240 | HL=48240. | ||
50499 | LD C,A | C=A. | ||
50500 | JR 50503 | Jump to 50503. | ||
50502 | INC HL | Increment HL by one. | ||
50503 | SRL C | Shift C right. | ||
50505 | JR NC,50515 | Jump to 50515 if HL is greater than or equal to A. | ||
50507 | LD A,(HL) | A=*HL. | ||
50508 | PUSH HL | Stash HL and BC on the stack. | ||
50509 | PUSH BC | |||
50510 | CALL Handler_UpdateItemEventCurrentRoom | Call Handler_UpdateItemEventCurrentRoom. | ||
50513 | POP BC | Restore BC and HL from the stack. | ||
50514 | POP HL | |||
50515 | DJNZ 50502 | Decrease counter by one and loop back to 50502 until counter is zero. | ||
50517 | RET | Return. |
Prev: 50411 | Up: Map | Next: 50518 |