TileSetImportDialog.h file
Namespaces
- namespace Jazz2
- Root namespace of Jazz² Resurrection.
- namespace Jazz2::Formats
- The game's own level and tile set formats.
- namespace Jazz2::Editor
Functions
- void ShowImportTileSetDialog(IEditorContext& session)
- Asks for an image and makes a new tile set of it, in the user content.
-
void ImportTileSetImage(IEditorContext& session,
Death::
Containers:: StringView path, Death:: Containers:: StringView name, bool addToLevel, bool asDefault, Death:: Containers:: StringView colors = {}, bool dither = false) - Makes a new tile set of an image as ShowImportTileSetDialog() does, for testing.
- void ShowNewTileSetDialog(IEditorContext& session)
- Asks for a name and a number of tiles and makes a new tile set of empty tiles, in the user content.
-
auto CreateEmptyTileSet(IEditorContext& session,
Death::
Containers:: StringView name, std:: int32_t tileCount, bool addToLevel, bool asDefault) -> bool - Makes a new tile set of empty tiles as ShowNewTileSetDialog() does, returns
falseif it can't be. - void ShowImportTileSetFileDialog(IEditorContext& session)
- Asks for a tile set file and saves it into the user content as a new tile set.
-
auto ReadTileSetFile(Death::
Containers:: StringView path, Formats::TileSetData& data, bool& original) -> bool - Reads a whole tile set file of the original game or of this game, see ShowImportTileSetFileDialog().
-
auto ImportTileSetFile(IEditorContext& session,
const Formats::TileSetData& data,
Death::
Containers:: StringView name, bool addToLevel, bool asDefault) -> bool - Saves a tile set into the user content as ShowImportTileSetFileDialog() does, returns
falseif it can't be.
Function documentation
void ShowImportTileSetDialog(IEditorContext& session)
Asks for an image and makes a new tile set of it, in the user content.
The image is cut into tiles of 32 × 32 pixels row by row, an image of the masks next to it (.mask.png, as the editor exports them) gives their masks, otherwise they're solid where they aren't transparent. The new tile set can be added to the level right away.
void ImportTileSetImage(IEditorContext& session,
Death:: Containers:: StringView path,
Death:: Containers:: StringView name,
bool addToLevel,
bool asDefault,
Death:: Containers:: StringView colors = {},
bool dither = false)
Makes a new tile set of an image as ShowImportTileSetDialog() does, for testing.
colors is own, true, match or reduce, empty keeps the colors as they are.
void ShowNewTileSetDialog(IEditorContext& session)
Asks for a name and a number of tiles and makes a new tile set of empty tiles, in the user content.
It has the palette of the level. Its tiles are painted as tiles changed in the level (see ShowTileEditor()) and saved into it then (see ShowApplyTileChangesDialog()).
void ShowImportTileSetFileDialog(IEditorContext& session)
Asks for a tile set file and saves it into the user content as a new tile set.
A tile set of the original game (.j2t) is converted, as the game converts it, one of this game is copied. It opens in the folder of the original game, any other place can be browsed too. The new tile set can be added to the level right away.
bool ReadTileSetFile(Death:: Containers:: StringView path,
Formats::TileSetData& data,
bool& original)
Reads a whole tile set file of the original game or of this game, see ShowImportTileSetFileDialog().
original is set if it's one of the original game. Returns false if the file isn't a tile set of either.