pleonex / tinke

Viewer and editor for files of NDS games
GNU General Public License v3.0
360 stars 57 forks source link

Not supported map import where several map reference to 1 tileset #12

Open MetLob opened 9 years ago

MetLob commented 9 years ago

For example for solutions, i implement in my Map Editor additional import options:

Implementation not hard, but its problem looked in every second game...

pleonex commented 9 years ago

Can you give some file path that have that problem or upload an image?

MetLob commented 9 years ago

Hi, in Nitro formats i find this problem in Coraline game: http://www.coreline.ru/files/Multimap.zip

Also, in customs or raw formats in several games: Pokemon (Platinum etc), Magical Starsign, Ys I DS (JP). Example on Ys game, there all data in RAW nitro formats without headers:

  1. Select palette (also there problem from issue #11) sample1 - palette selected
  2. Select tiles sample2 - tiles selected
  3. First map (also other maps in files from options.chr_5 to options.chr_12) sample1 - first map
  4. Another map sample1 - another map
pleonex commented 9 years ago

I see the problem now, in fact it's another feature that I implemented in NinoImager. Since Tinke is user-interactive and we don't know how many image will be imported we can't implement the same algorithms as NinoImager (an automatic importer).

The quick algorithm I can think of is: for each tile we would search it in the current image, if it does not exist we add it. And in any case do not remove unused tiles. Maybe some tiles won't be used anymore, but we can't know that since we don't know what map file will use an image file.