level index of the ROM ($D2D3), which is also our level number from $14 on private const TARGETS = ['125,26' => 0x15, '125,1' => 0x14, '1,60' => 0x18, '1,2' => 0x19, '20,15' => 0x1A]; private ?int $target; public function __construct(Gfx $sdl, int $tileX, int $tileY) { parent::__construct($sdl, 0x13, 'Warp door', $tileX * 32, $tileY * 32, 0x1E, 0x60); $this->target = self::TARGETS["$tileX,$tileY"] ?? null; $this->visible = false; } protected function tick(array $player): void { } /** Our level number to load when Sonic enters it, null if the ROM table has no entry for it. */ public function getTargetLevel(): ?int { return $this->target; } }