![]() |
Routines |
| Prev: EFA4 | Up: Map | Next: F0D3 |
|
Used by the routine at JumpTable.
Jump-table target JumpTable_LocationGraphicSetup. Points CHARS at F128, draws the script for *LocationId, then restores the ROM font at 3C00.
|
||||
| LocationGraphicSetup | EFFB | LD A,$05 | Write 05 to *PrintState_Flags. | |
| EFFD | LD ($5BF6),A | |||
| F000 | LD HL,$F128 | Write F128 to *CHARS. | ||
| F003 | LD ($5C36),HL | |||
| F006 | CALL LocationGraphicSetup_SelectScript | Call LocationGraphicSetup_SelectScript. | ||
|
Restore the ROM font after LocationGraphicSetup_SelectScript returns.
|
||||
| F009 | LD HL,$3C00 | Write 3C00 to *CHARS. | ||
| F00C | LD ($5C36),HL | |||
| F00F | RET | Return. | ||
|
Match *LocationId to a location script and jump into PrintMessage.
|
||||
| LocationGraphicSetup_SelectScript | F010 | LD A,($5B01) | Fetch *LocationId. | |
| F013 | LD HL,$FE79 | Jump to PrintMessage if the id is 04 (dense forest). | ||
| F016 | CP $04 | |||
| F018 | JP Z,PrintMessage | |||
| F01B | LD HL,$FE97 | Jump to PrintMessage if the id is 12 (Carawood). | ||
| F01E | CP $12 | |||
| F020 | JP Z,PrintMessage | |||
| F023 | LD HL,$FEB8 | Jump to PrintMessage if the id is 13 (Carawood). | ||
| F026 | CP $13 | |||
| F028 | JP Z,PrintMessage | |||
| F02B | LD HL,$FED6 | Jump to PrintMessage if the id is 14 (Carawood). | ||
| F02E | CP $14 | |||
| F030 | JP Z,PrintMessage | |||
| F033 | LD HL,$FEF4 | Jump to PrintMessage if the id is 15 (Carawood). | ||
| F036 | CP $15 | |||
| F038 | JP Z,PrintMessage | |||
| F03B | LD HL,$FF12 | Jump to PrintMessage if the id is 16 (Carawood). | ||
| F03E | CP $16 | |||
| F040 | JP Z,PrintMessage | |||
| F043 | LD HL,$FF30 | Jump to PrintMessage if the id is 17 (Carawood). | ||
| F046 | CP $17 | |||
| F048 | JP Z,PrintMessage | |||
| F04B | LD HL,$FF45 | Jump to LocationGraphicSetup_PrintScript if the id is 18 (Carawood). | ||
| F04E | CP $18 | |||
| F050 | JR Z,LocationGraphicSetup_PrintScript | |||
| F052 | LD HL,$FF63 | Jump to LocationGraphicSetup_PrintScript if the id is 19 (Carawood). | ||
| F055 | CP $19 | |||
| F057 | JR Z,LocationGraphicSetup_PrintScript | |||
| F059 | LD HL,$FF7E | Jump to LocationGraphicSetup_PrintScript if the id is 1A (Carawood). | ||
| F05C | CP $1A | |||
| F05E | JR Z,LocationGraphicSetup_PrintScript | |||
| F060 | LD HL,$FF99 | Jump to LocationGraphicSetup_PrintScript if the id is 47 (at sea). | ||
| F063 | CP $47 | |||
| F065 | JR Z,LocationGraphicSetup_PrintScript | |||
| F067 | LD HL,$FFAA | Jump to LocationGraphicSetup_PrintScript if the id is 2F (water's edge). | ||
| F06A | CP $2F | |||
| F06C | JR Z,LocationGraphicSetup_PrintScript | |||
| F06E | LD HL,$FFCE | Jump to LocationGraphicSetup_PrintScript if the id is 2E (Serpent Sea beach). | ||
| F071 | CP $2E | |||
| F073 | JR Z,LocationGraphicSetup_PrintScript | |||
| F075 | LD HL,$F168 | Jump to LocationGraphicSetup_PrintScript if the id is 0F (high platform). | ||
| F078 | CP $0F | |||
| F07A | JR Z,LocationGraphicSetup_PrintScript | |||
| F07C | LD HL,$F1D0 | Jump to LocationGraphicSetup_PrintScript if the id is 06 (arid scrubland). | ||
| F07F | CP $06 | |||
| F081 | JR Z,LocationGraphicSetup_PrintScript | |||
| F083 | LD HL,$F1DE | Jump to LocationGraphicSetup_PrintScript if the id is 05 (scorched plains). | ||
| F086 | CP $05 | |||
| F088 | JR Z,LocationGraphicSetup_PrintScript | |||
| F08A | LD HL,$F744 | Jump to LocationGraphicSetup_PrintScript if the id is 1B (beside Tylon's castle). | ||
| F08D | CP $1B | |||
| F08F | JR Z,LocationGraphicSetup_PrintScript | |||
| F091 | LD HL,$F7AA | Jump to LocationGraphicSetup_PrintScript if the id is 0E (Cavezats cavern). | ||
| F094 | CP $0E | |||
| F096 | JR Z,LocationGraphicSetup_PrintScript | |||
| F098 | LD HL,$F80B | Jump to LocationGraphicSetup_PrintScript if the id is 01 (Ogeron's house). | ||
| F09B | CP $01 | |||
| F09D | JR Z,LocationGraphicSetup_PrintScript | |||
| F09F | LD HL,$F879 | Jump to LocationGraphicSetup_PrintScript if the id is 02 (edge of a large forest). | ||
| F0A2 | CP $02 | |||
| F0A4 | JR Z,LocationGraphicSetup_PrintScript | |||
| F0A6 | LD HL,$F8CA | Jump to LocationGraphicSetup_PrintScript if the id is 0B (Urga-Maul dungeon). | ||
| F0A9 | CP $0B | |||
| F0AB | JR Z,LocationGraphicSetup_PrintScript | |||
|
No graphic script. Print a row of asterisks instead.
|
||||
| F0AD | LD A,$18 | Write 18 to the line byte of S_POSN. | ||
| F0AF | LD ($5C89),A | |||
| F0B2 | LD A,$03 | Write 03 to *PrintState. | ||
| F0B4 | LD ($5BF5),A | |||
| F0B7 | LD HL,$0700 | Write row 07 and column 00 to *PrintState_Column. | ||
| F0BA | LD ($5BF7),HL | |||
| F0BD | LD B,$20 | B=20. | ||
| F0BF | LD A,$2A | Write * to *PrintState_Character. |
||
| F0C1 | LD ($5BF9),A | |||
| F0C4 | LD HL,$3C00 | Write 3C00 to *CHARS. | ||
| F0C7 | LD ($5C36),HL | |||
|
Print one row of asterisks.
|
||||
| LocationGraphicSetup_FillRow | F0CA | CALL PrintCharacter | Call PrintCharacter until the count is done. | |
| F0CD | DJNZ LocationGraphicSetup_FillRow | |||
| F0CF | RET | Return. | ||
|
The later id matches cannot relative-jump to PrintMessage.
|
||||
| LocationGraphicSetup_PrintScript | F0D0 | JP PrintMessage | Jump to PrintMessage. | |
| Prev: EFA4 | Up: Map | Next: F0D3 |