Dynablaster
Jump to navigation
Jump to search
Dynablaster
There is no image of a modified version of this game — upload one!
File formats
The IMG files in the GFX directory are sprite sheets in LBM Format with most having a corrupt header.
The following C# program will create corrected copies of them as .LBM files:
using System.Buffers.Binary;
using System.Text;
var paths = Directory.GetFiles(Environment.CurrentDirectory, "*.img");
foreach (var path in paths)
{
using var src = File.OpenRead(path);
using var tgt = File.Create(Path.ChangeExtension(path, ".lbm"));
src.CopyTo(tgt);
tgt.Position = default;
using var writer = new BinaryWriter(tgt, Encoding.Default, true);
var length = (int)src.Length - 8;
if (BitConverter.IsLittleEndian)
{
length = BinaryPrimitives.ReverseEndianness(length);
}
writer.Write(Encoding.ASCII.GetBytes("FORM"));
writer.Write(length);
writer.Write(Encoding.ASCII.GetBytes("ILBM"));
writer.Write(Encoding.ASCII.GetBytes("BMHD"));
}