Esempio n. 1
0
TilesetPtr TilesetType_CComic::create(stream::inout_sptr psGraphics,
	SuppData& suppData) const
{
	psGraphics->seekp(0, stream::start);
	// Zero tiles, 0x0
	return TilesetPtr(new Tileset_CComic(psGraphics, NUMPLANES_TILES));
}
Esempio n. 2
0
TilesetPtr CComicSpriteType::create(stream::inout_sptr psGraphics,
	SuppData& suppData) const
{
	psGraphics->seekp(0, stream::start);
	// Zero tiles, 0x0
	return TilesetPtr(new Tileset_CComic(psGraphics, NUMPLANES_SPRITE));
}
Esempio n. 3
0
TilesetPtr TilesetType_Zone66::create(stream::inout_sptr psTileset,
	SuppData& suppData) const
{
	psTileset->truncate(4);
	psTileset->seekp(0, stream::start);
	psTileset << u32le(0);

	PaletteTablePtr pal;
	// Only load the palette if one was given
	if (suppData.find(SuppItem::Palette) != suppData.end()) {
		ImagePtr palFile(new Palette_VGA(suppData[SuppItem::Palette], 6));
		pal = palFile->getPalette();
		pal->at(Z66_TRANSPARENT_COLOUR).alpha = 0;
	}
	return TilesetPtr(new Tileset_Zone66(psTileset, pal));
}
Esempio n. 4
0
TilesetPtr TilesetType_HarryCHR::create(stream::inout_sptr psTileset,
	SuppData& suppData) const
{
	psTileset->truncate(CHR_WIDTH * CHR_HEIGHT * 256);
	psTileset->seekp(0, stream::start);
	char empty[CHR_WIDTH * CHR_HEIGHT];
	memset(empty, 0x00, CHR_WIDTH * CHR_HEIGHT);
	for (int i = 0; i < 256; i++) psTileset->write(empty, CHR_WIDTH * CHR_HEIGHT);

	PaletteTablePtr pal;
	if (suppData.find(SuppItem::Palette) != suppData.end()) {
		ImagePtr palFile(new Palette_VGA(suppData[SuppItem::Palette], 6));
		pal = palFile->getPalette();
	} else {
		throw stream::error("no palette specified (missing supplementary item)");
	}
	return TilesetPtr(new Tileset_HarryCHR(psTileset, pal));
}
Esempio n. 5
0
ArchivePtr ArchiveType_DAT_Sango::newArchive(stream::inout_sptr psArchive, SuppData& suppData) const
{
	psArchive->seekp(0, stream::start);
	psArchive->write("\x04\0\0\0", 4);
	return ArchivePtr(new Archive_DAT_Sango(psArchive));
}