Add support for Heroes of Might and Magic 1 to fheroes2 engine
Status: Beta
Brought to you by:
afletdinov
Add Heroes of Might and Magic 1 support to fheroes 2 engine. The agg format is the same format except for:
typedef struct
{
std::string name;
u32 offset;
u32 size;
} aggfat_t;
becomes:
typedef struct
{
std::string name;
u32 offset;
u32 size;
u32 size2;
} aggfat_t;
Most of the code needed for Heroes 1 support already exists in Heroes 2, most units/balancing etc is the same. Just needs to have the Necromancer/Wizard code stubbed out when building for Heroes 1, and some additional format tweaks added. An alternative would be to fork fheroes2 into an fheroes1 port.
Hello
I was looking into the homm1 agg file and noticed that it has some deviations from the homm2 version. When researching this I came across this feature request. It helped me in the right direction but it is not correct/complete.
The "fat" for homm1 is actually like:
u16 crc,
u32 offset,
u32 size,
u32 size2
not sure what size2 is for as it always equals size.
Also another difference is in sound (the .82m files). In homm2 the bytes in them can be attached to a wave header (8 bit 22050) as the values are 8 bit unsigned as required by Microsoft wave. However the values in the homm1 82m files are 8 bit signed. Before adding them to the wave header you would have to add 128 to every byte to get proper unsigned values or you get one big messy wav file. Also I note this conversion is only needed when exporting to wav files. Audacity can import raw signed 8 bit audio and SDL (AUDIO_S8) can play it.
I have not found any other differences yet but i thought I would note this, it might be useful as is.