From c13b1bf14469d467e3da8f3cbf6da4bb9eb7ac62 Mon Sep 17 00:00:00 2001 From: meep-eep Date: Mon, 21 Oct 2002 22:14:31 +0000 Subject: [PATCH] First version git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@136 8092fc87-c524-0410-9efc-e669fe64eaf9 --- sc2/doc/devel/gfxres | 49 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 sc2/doc/devel/gfxres diff --git a/sc2/doc/devel/gfxres b/sc2/doc/devel/gfxres new file mode 100644 index 000000000..dada1efc0 --- /dev/null +++ b/sc2/doc/devel/gfxres @@ -0,0 +1,49 @@ +This is the format for resources of type GFXRES (these have the extension +.ani in the original source). + +Everything is stored MSB first. + +position length meaning + 4 Unknown, (0xffffffff) + 4 Unknown, (0x00000000) + 4 FlagsAndIndex: + bits 0-11: 1 less than the number of frames in this + graphics resource + bits 12-15: flags: + - bit 0: (WANT_MASK) + - bit 1: (WANT_PIXMAP) + - bit 2: (WANT_COMPRESSED) + - bit 3: (DOUBLE_RES) + bits 16-31: unknown (0x0000) + +Frame info: +Then for all frames: + 4 Type index and flags (TypeIndexAndFlags) + Low 2 bytes: + bits 0-11 is the index of this frame + bits 12-15 are the type flags: + - bit 12-13: + - 0: (ROM_DRAWABLE) + - 1: Direct drawable (RAM_DRAWABLE) + - 2: (SCREEN_DRAWABLE) + - 3: (OVERLAY_DRAWABLE) + High 2 bytes (frame flags): + - bits 0-7: global PLUT to use + - bit 12: (DATA_HARDWARE) + - bit 13: (DATA_COPY) + - bit 14: (DATA_PACKED) + - bit 15: (X_FLIP) + 4 Hot spot information (definition of (0, 0) in the image): + - low 2 byes: x location of hot spot + - high 2 bytes: y location of hot spot + 4 Image bounds: + - low 2 bytes: Image width + - low 2 bytes: Image height + 4 Offset from beginning of the frame info for this frame + to the beginning of the frame. + +Frames: +Then for all frames: + 4 Size of image data + ? image data +