Skip to content

Map editor for the Gen 1 and Gen 2 Pokémon games

Notifications You must be signed in to change notification settings

themaks/map-editor

 
 

Repository files navigation

Gen 1/2 Map Editor

This is a map editor for Pokémon R/G/B/Y and Pokémon G/S/C.

I needed a solution that would open arbitrary tileset, cell, and map files, so I went and made one myself.

Building

This program requies libglfw. Below are building instructions for various operating systems.

Linux

Debian/Ubuntu:

apt-get install libglfw-dev
make

Fedora/CentOS/Red Hat:

yum -y install mesa-libGL-devel glfw-devel
make

Note: CentOS may require the Fedora EPEL repository, which you can add by running the following command:

yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

Arch Linux (X11):

pacman -S glfw-x11
make

Note: If your version of Arch Linux uses Wayland instead of X11, run the following command instead:

pacman -S glfw-wayland
make

Mac

brew install glfw
make

MSYS2

pacman -S --noconfirm --needed mingw-w64-x86_64-toolchain mingw-w64-x86_64-glfw
mingw32-make.exe

Visual Studio or whatever

(just run build_win32.bat)

Usage

When you first start the program, you'll be presented with this screen:
main window

Clicking on each checkbox shows the associated window, and clicking the button switches what editing mode you're currently in, all of which are covered below.

change mode

Windows

Tileset Window

The Tileset window is for modifying the current tileset, which controls all of the available tiles.
tileset_window

You can load existing tilesets via image file, assembly file, or binary file.

When saving the tileset, the compressed tile data will be saved as an assembly file.

When in Tile Editing Mode, you can draw on the tileset using the 4 available colors.
edit_tiles

Note: When editing the tileset, the cells and map update with the new tile(s) automatically.

Palette Window

The Palette window is for modifying the current palette for Gen II games.
palette

You can load existing tilesets via assembly file or binary file.

When saving the palette, the palette indices (two per byte) will be saved as an assembly file.

Palette editing works in any mode, and the available palette colors are as follows:

  • Grey
  • Red
  • Green
  • Blue
  • Yellow
  • Brown
  • Roof color (dynamic)
  • Message color (text)

edit_palette

Note: When editing the palette, the tileset, cells, and map all update with the new color(s) automatically.

Cells Window

The Cells window is for modifying the map cells, which are the building blocks of the map.
cells_window

You can load existing cells via assembly file or binary file.

When saving the cells, the tiles indices that make up the cell will be saved as an assembly file.

When in Cell Editing Mode, you can select a tile by clicking in the Tileset window, then place the selected tile in a cell by clicking in the Cells window.
edit_cells

Note: When editing the cells, the map updates with the new cells automatically.

Map Window

The map window is for modifying, you guessed it, the map.
map_window

You can load an existing map via assembly file or binary file.

When saving the map, the cell indices that make up the map will be saved as an assembly file.

When in Map Editing Mode, you can select a cell by clicking in the Cells window, then place the selected cell in the map by clicking in the Map window.
edit_map

Supported Formats

While only the Tileset window supports opening image formats, all of the windows support opening both assembly and binary files.

Assembly Format ($xx syntax):

        db      $01,$23,$45,$67,$89,$AB,$CD,$EF
        db      $13,$37,$FA,$CA,$DE,$C0,$DE,$69
        ...

Assembly Format (0xxh syntax):

        db      001h,023h,045h,067h,089h,0abh,0cdh,0efh
        db      013h,037h,0fah,0cah,0deh,0c0h,0deh,069h
        ...

Check out FORMATS.md if you want a better understanding of how each file works.

About

Map editor for the Gen 1 and Gen 2 Pokémon games

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 62.4%
  • C 36.0%
  • Other 1.6%