From fb34e07d7b23ba5353c02760bc0760c17aac17a8 Mon Sep 17 00:00:00 2001 From: meep-eep Date: Sat, 26 Oct 2002 19:19:21 +0000 Subject: [PATCH] More information git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@151 8092fc87-c524-0410-9efc-e669fe64eaf9 --- sc2/doc/devel/aniformat | 1 + sc2/doc/devel/gfxres | 25 +++++++++++++++---------- sc2/doc/devel/musicres | 18 ++++++++++++++++++ sc2/doc/devel/pkgformat | 13 ------------- sc2/doc/devel/strtab | 22 ++++++++++++++++++++++ 5 files changed, 56 insertions(+), 23 deletions(-) create mode 100644 sc2/doc/devel/musicres create mode 100644 sc2/doc/devel/strtab diff --git a/sc2/doc/devel/aniformat b/sc2/doc/devel/aniformat index 4c23ae211..ab6873d24 100644 --- a/sc2/doc/devel/aniformat +++ b/sc2/doc/devel/aniformat @@ -4,3 +4,4 @@ filename transparent_color colormap_index clip_x clip_y clip_w clip_h hotspot_x Filename is string, all others are ints, -1 means value not used. This information is parsed in libs/graphics/sdl/3do_getbody.c + diff --git a/sc2/doc/devel/gfxres b/sc2/doc/devel/gfxres index f41516885..bdf7127a1 100644 --- a/sc2/doc/devel/gfxres +++ b/sc2/doc/devel/gfxres @@ -1,11 +1,11 @@ This is the format for resources of type GFXRES (these have the extension .ani in the original source). -Everything is stored MSB first. +Everything is stored MSB first unless otherwise specified. position length meaning - 4 Unknown, (0xffffffff) - 4 Unknown, (0x00000000) + 4 Unknown, always 0xffffffff + 4 Unknown, always 0x00000000 4 FlagsAndIndex: bits 0-11: 1 less than the number of frames in this graphics resource @@ -16,7 +16,7 @@ position length meaning - bit 3: (DOUBLE_RES) bits 16-31: unknown (0x0000) -Frame info: +Frame descriptions: Then for all frames: 4 Type index and flags (TypeIndexAndFlags) Low 2 bytes: @@ -29,8 +29,8 @@ Then for all frames: - 3: (OVERLAY_DRAWABLE) High 2 bytes (frame flags): - bits 0-7: global PLUT to use - - bit 12: (DATA_HARDWARE) - - bit 13: (DATA_COPY) + - bit 12: Frame is in cel format (DATA_HARDWARE) + - bit 13: (DATA_COPY aka DATA_SCREEN) - bit 14: (DATA_PACKED) - bit 15: (X_FLIP) 4 Hot spot information (definition of (0, 0) in the image): @@ -39,14 +39,19 @@ Then for all frames: 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. + 4 Offset from beginning of the frame description for this + frame to the beginning of the frame. Frames: Then for all frames: + If DATA_HARDWARE is set in the flags for this frame: 4 Size of image data - ? image data - + ? .cel image data + If DATA_PACKED is set in the flags for this frame: (from 3do/imageint.c) + for every line in the image (bounds.height lines): + 2 number of bytes used to encode this line + a number of packets of this format: + Initial version 2002-10-22, by Serge van den Boom diff --git a/sc2/doc/devel/musicres b/sc2/doc/devel/musicres new file mode 100644 index 000000000..780ee2b04 --- /dev/null +++ b/sc2/doc/devel/musicres @@ -0,0 +1,18 @@ +This is the format for resources of type MUSICRES (these have the extension +.mod in the original source). + +If the first 3 characters are 'CDA', from the next character to the first +nul char, or 3 characters after the first period (whatever comes first) is +used as a filename with aif audio data to play. (CDA stands for CD-audio. +The source code mentions 'red book', but it's not (red book is the standard +for audio CD's)). The rest of the file (just a few more chars) seems to be +garbage. + +If the first 3 characters are something else, the entire file (including the +first 3 characters) are used as a MOD file. (As the mod file uses those char +as the title of the song, a mod file with the title beginning with 'CDA' +will go wrong). + + +Initial version of this file 2002-10-26 by Serge van den Boom. + diff --git a/sc2/doc/devel/pkgformat b/sc2/doc/devel/pkgformat index 617249aaf..970c40dd6 100644 --- a/sc2/doc/devel/pkgformat +++ b/sc2/doc/devel/pkgformat @@ -88,19 +88,6 @@ Resources with type 'resource index' (type 4 in the 3DO sc2 starcon.pkg file) are files with the same format as this .pkg file itself. -For music resources: (type 3 in the 3DO sc2 starcon.pkg file) -If the first 3 characters are 'CDA', from the next character to the first -nul char, or 3 characters after the first period (whatever comes first) is -used as a filename with aif audio data to play. (CDA stands for CD-audio. -The source code mentions 'red book', but it's not (red book is the standard -for audio CD's)). The rest of the file (just a few more chars) seems to be -garbage. -If the first 3 characters are something else, the entire file (including the -first 3 characters) are used as a MOD file. (As the mod file uses those char -as the title of the song, a mod file with the title beginning with 'CDA' -will go wrong). - - Initial version of this file 2002-10-10 by Serge van den Boom. diff --git a/sc2/doc/devel/strtab b/sc2/doc/devel/strtab new file mode 100644 index 000000000..94a56bd7d --- /dev/null +++ b/sc2/doc/devel/strtab @@ -0,0 +1,22 @@ +This is the format for resources of type STRTAB. It contains a number of +entries of unspecified data (not necessarilly strings). +This is used for game strings (extension .txt), colour tables (.ct), +and colour translation tables (.xlt). + +position length meaning + 4 Unknown, always 0xffffffff + 2 Unknown, always 0x0000 + 2 number of entries in the file (StringCount) + +Followed by: + In file: + 4 Placeholder, always 0x00000000 + numentries times: + 4 length of string + In memory: + numentries times: + 4 offset from &StringCount to the string + followed by: + 4 offset from &StringCount until one char past the end + of the last string. +