Skip to content
This repository has been archived by the owner on Nov 26, 2022. It is now read-only.

Palette and Tile size on Map Import #7

Closed
MetLob opened this issue May 21, 2015 · 2 comments
Closed

Palette and Tile size on Map Import #7

MetLob opened this issue May 21, 2015 · 2 comments

Comments

@MetLob
Copy link
Contributor

MetLob commented May 21, 2015

When imported new map, nPalette in NTFS structure always = 0
But palette number in Map Control window selected > 0, and palette replaced/swaped to this palette.

I see solution of this problem in next changes:

// Create a map file
if (isMap && checkMapCmp.Checked)
     map.Set_Map(Actions.Create_Map(ref tiles, image.BPP, image.TileSize, (byte)numPal.Value), map.CanEdit, bitmap.Width, bitmap.Height);
else if (isMap)
{
     int num_tiles = (tiles.Length * 8 / image.BPP) / (image.TileSize * image.TileSize);
      map.Set_Map(Actions.Create_BasicMap(num_tiles, 0, (byte)numPal.Value), map.CanEdit);
}

Also, in several lines tile_size used as constant 8. This is true?

@pleonex
Copy link
Owner

pleonex commented Aug 12, 2015

I will look into that.

The image plugin is not very generic and have some hard-coded constant like the tile width and height to 8. Sadly, this value can't be changed without testing and modifying the current algorithms. I have created the issue #15 to track this.

@pleonex pleonex added the plugin label Aug 12, 2015
@pleonex pleonex added this to the Version 0.9.1 milestone Aug 12, 2015
pleonex added a commit that referenced this issue Feb 28, 2016
Pull Request for issues #18, #19, #7, #8
@pleonex
Copy link
Owner

pleonex commented Feb 28, 2016

Fixed in #21 by @MetLob.

@pleonex pleonex closed this as completed Feb 28, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants