![]() |
Routines |
| Prev: 6958 | Up: Map | Next: 6972 |
|
Used by the routine at ActionKill.
Flip the scenic-event bit selected by the caller.
|
||||||||
| HandlerToggleScenicFlag | 695E | PUSH BC | Remember the caller's registers. | |||||
| 695F | LD C,$01 | Start with the bit for scenic event zero. | ||||||
| 6961 | LD B,A | |||||||
| 6962 | AND A | Event zero uses that bit as it stands. | ||||||
| 6963 | JR Z,HandlerToggleScenicFlag_Step1 | |||||||
| HandlerToggleScenicFlag_Loop1 | 6965 | RLC C | Line the bit up with this scenic event. | |||||
| 6967 | DJNZ HandlerToggleScenicFlag_Loop1 | Repeat until the bit matches that event. | ||||||
| HandlerToggleScenicFlag_Step1 | 6969 | LD A,($6222) | Fetch the scenic-event flags. | |||||
| 696C | XOR C | Flip this scenic event's bit. | ||||||
| 696D | LD ($6222),A | Store the scenic-event flags. | ||||||
| 6970 | POP BC | Restore the registers the caller needs from the stack. | ||||||
| 6971 | RET | Return. | ||||||
| Prev: 6958 | Up: Map | Next: 6972 |