Updated the extractor program again. This time it ignores duplicate entries instead of printing all of them. This also exports the player color masks as BMPs, since it was the simplest and most similar format to the raw data. Instead of flipping the image (since BMP files are reverse scanline order) I just gave it a negative height. I don't know if the images are actually greyscale or what, but I gave it a greyscale palette just in case.
If I have time this weekend maybe I'll make it have a UI instead of just dumping everything, that way it could potentially show individual frames or extract individual frames of a selected image or something. Or I'll just release the source once I figure out the frames format.
Here's the format in a pseudo-C format:
struct header{
unsigned int magic; // "ANIM"
unsigned short version; // Version? 0x0101 for SD, 0x0202 for HD2, 0x0204 for HD
unsigned short unk2; // 0 -- more bytes for version?
unsigned short layers;
unsigned short entries;
char layerstrs[10][32];
// The following value is only present in Version 0x0101
entry* images[entries]; // one pointer per entry
};
struct entry {
unsigned short frames; // if frames == 0, it's an entryref and not this struct
unsigned short unk2; // always 0xFFFF?
unsigned short width; // width and height are 0 in SD images, and should be retrieved from the appropriate GRP file.
unsigned short height;
frame* frameptr; // pointer to an array of size [frames]
entryimg img[header.layers];
};
struct entryimg{
DDS* ptr; // NULL if this layer does not exist
unsigned int size;
unsigned short width;
unsigned short height;
};
// In version 0x0101, the player color mask is in a bitmap format, which is just "BMP " followed by width*height bytes, either 0x00 or 0xFF in a top-to-bottom row order. version 0x0202 uses only DDS files.
struct entryref{
unsigned short frames; // necessarily 0 for this struct
// These probably aren't ints, but w/e
unsigned int refid; // image ID to refer to
unsigned int unk1; // always 0?
unsigned int unk2; // unknown values -- who knows
};
struct frame{
unsigned short x; // Coordinates of the top-left pixel of the frame
unsigned short y;
unsigned short xoff; // X,Y offsets from the top left of the GRP frame -- value seems directly copied from each GRP
unsigned short yoff;
unsigned short width; // Dimensions, relative to the top-left pixel, of the frame
unsigned short height;
unsigned short unk1; // always 0? or 1?
unsigned short unk2; // always 0?
};
EDIT:
the GRP x,y frame offsets were misidentified as midx and midy coordinates. ... I have no idea howo to tell where the center of the frame is.
EDIT2:
1.19 has a slightly adjusted format for the new graphics. See latest post for download.
EDIT3:
Identified image width/height value -- it just is not present in SD graphics.
Post has been edited 9 time(s), last time on Nov 13 2020, 2:27 am by FaRTy1billion.
TinyMap2 - Latest in map compression! ( 7/09/14 - New build! )
EUD Action Enabler - Lightweight EUD/EPD support! (ChaosLauncher/MPQDraft support!)
EUDDB -
topic - Help out by adding your EUDs! Or Submit reference files in the References tab!
MapSketch - New image->map generator!
EUDTrig -
topic - Quickly and easily convert offsets to EUDs! (extended players supported)
SC2 Map Texture Mask Importer/Exporter - Edit texture placement in an image editor!
This page has been viewed [img]http://farty1billion.dyndns.org/Clicky.php?img.gif[/img] times!