Add the Johto and Kanto atlas to the Map tab
The Map tab draws the region's Town Map from the ROM with the player's landmark, the visited flypoints as Fly destinations and the landmarks whose maps are ported. Kanto opens with the Fly map's Indigo Plateau rule. Landmark positions and flypoints are compared with the pinned PRET source. Closes #36 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
cdee576818
commit
29248172bd
13 files changed
+536
-30
No files matched your search
@@ -33,6 +33,7 @@ export class CrystalAssets {
|
||||
private tilesets = new Map<string, Tileset>();
|
||||
private sprites = new Map<number, Sprite>();
|
||||
private spawnFlags?: Map<number, number>;
|
||||
private openLandmarks?: Set<number>;
|
||||
private sceneOwners?: Map<string, string>;
|
||||
constructor(bytes: Uint8Array) {
|
||||
this.reader = new RomReader(bytes);
|
||||
@@ -439,6 +440,13 @@ export class CrystalAssets {
|
||||
}
|
||||
/** The engine flag (ENGINE_FLYPOINT_*) of a wVisitedSpawns bit, from the
|
||||
* ROM's EngineFlags; undefined for spawn points without one. */
|
||||
/** The landmarks with at least one ported map. */
|
||||
portedLandmarks(): ReadonlySet<number> {
|
||||
this.openLandmarks ??= new Set(
|
||||
Object.keys(NATIVE_MAPS).map((id) => this.map(id).landmark),
|
||||
);
|
||||
return this.openLandmarks;
|
||||
}
|
||||
spawnEngineFlag(spawn: number): number | undefined {
|
||||
if (!this.spawnFlags) {
|
||||
const r = this.reader;
|
||||
|
||||
Reference in new issue
Block a user