Author Topic: Feature Request: add new map icon sequence into MAPICONS.BAM  (Read 6110 times)

Offline Miloch

  • Barbarian
  • Planewalker
  • *****
  • Posts: 1032
  • Gender: Male
Re: Feature Request: add new map icon sequence into MAPICONS.BAM
« Reply #25 on: May 10, 2010, 03:16:04 PM »
I just wanted a piece of code that patches BAM file with additional frame sequence because I don't want to overwrite original mapicons.bam, that's all.
Build a new BAM from mapicons.bam. Delete everything in it, but import the new sequence you want to add. The reason for this is that it needs the same palette as the existing BAM. Then save it to mymod/myicons.bam or whatever. Don't compress it but you can use RLE (IIRC this is how mapicons.bam is in the unmodded game).

Then it'd be something like:
Code: [Select]
COPY_EXISTING mapicons.bam override
  INSERT_FILE SOURCE_SIZE ~mymod/myicons.bam~
  WRITE_SHORT 0x8 (THIS + newframecount_whatever_that_is_in_the_new_bam)
  WRITE_BYTE 0xa (THIS + 1) //new sequence count
It won't be that easy, because we'll have to strip the header and palette data out of the new BAM and maybe mess with the frame lookup table too, but it's a start.

Offline sotona

  • Planewalker
  • *****
  • Posts: 20
Re: Feature Request: add new map icon sequence into MAPICONS.BAM
« Reply #26 on: May 11, 2010, 03:42:07 AM »
Build a new BAM from mapicons.bam. Delete everything in it, but import the new sequence you want to add. The reason for this is that it needs the same palette as the existing BAM. Then save it to mymod/myicons.bam or whatever. Don't compress it but you can use RLE (IIRC this is how mapicons.bam is in the unmodded game).

Then it'd be something like:
Code: [Select]
COPY_EXISTING mapicons.bam override
  INSERT_FILE SOURCE_SIZE ~mymod/myicons.bam~
  WRITE_SHORT 0x8 (THIS + newframecount_whatever_that_is_in_the_new_bam)
  WRITE_BYTE 0xa (THIS + 1) //new sequence count
It won't be that easy, because we'll have to strip the header and palette data out of the new BAM and maybe mess with the frame lookup table too, but it's a start.

Thanks! I'll look into it :)

 

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Name: Email:
Verification:
Type the letters shown in the picture
Listen to the letters / Request another image
Type the letters shown in the picture:
What color is grass?:
What is the seventh word in this sentence?:
What is five minus two (use the full word)?: