Hwæt!

Fuþark ærs swingan!

Well, I have some excellent news. First off, I finally figured out the last two fields of the AMP header I never understood. Apparently AMP files contain two images: the actual picture and then a monochrome transparency mask. My previous method was not only eating the mask, but resulting in a useless, incompatible header.

Here’s the proper format of an AMP header:

0x0  - 13 bytes
       string "AMP_FILE V1.0"
0xd  - 1 byte
       int 0
0xe  - 4 bytes
       int imgwidth
0x12 - 4 bytes
       int imgheight
0x16 - 4 bytes
       int filesize1
0x1a - 4 bytes
       int filesize2

I now have things working perfect, and was finally able to do the Rune menu for the magic screen. It looks quite kick ass.

I’ve also moved the battle menu to using Elder Fuþark runes. Before everyone goes OMFGWTFICANNOTLEARN20LETTERS!!! look at the bottom, it gives a subtitle of what the option does. Besides, once you use the menu three times you’ll know all the options anyway.

I’m still working on the 8×16 font and adding runic there for sign posts in the game. I want to go all-out on the Scandinavian feel, and using Runic on signs doesn’t seem like a bad idea at all. Ultima always did it, and nobody bitched about that. And unlike Lord British’s rather modified Anglo-Saxon Fuþorc, I’m using standard runes. So nya.

Also, I wrote a new tool to build a new WT Package File from scratch. I noticed there was a considerable lag entering battle or the magic screen when I stored all images at the end. Now that they’re back in the middle, it seems to be much quicker. I’ll probably use an xdelta patch for this file to make everyone’s life easier.

In case anyone wants it, here’s the structure of WT Package Files used in Heroine Anthem I & II.

Structure of a WT Package File:

Pad all values with 0×00, all numerical data is little Endian

[header]
0x0  - 24 bytes
       string "WT_Package_File"
0x18 - 8 bytes
       int64 filecount
[pointers]
0x20 - 24 bytes
       string filename
0x38 - 128 bytes
       string sourcepath
0xb8 - 4 bytes
       int filesize
0xbc - 8 bytes
       int64 offset
[data]
...

Party on, Wayne.


About this entry