From 5c03d9199ecd695010d60a46df542963339031f4 Mon Sep 17 00:00:00 2001 From: meep-eep Date: Thu, 20 Feb 2003 17:03:47 +0000 Subject: [PATCH] Some changes I still had lying around. git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@791 8092fc87-c524-0410-9efc-e669fe64eaf9 --- sc2/doc/devel/pkgformat | 12 ++++++++++-- sc2/doc/devel/resources | 4 ++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/sc2/doc/devel/pkgformat b/sc2/doc/devel/pkgformat index 970c40dd6..50df1297b 100644 --- a/sc2/doc/devel/pkgformat +++ b/sc2/doc/devel/pkgformat @@ -28,11 +28,11 @@ position length meaning bits 21-31: index in file_list_offs of the file name for this resource (only for packaged files) 4 p.flags_and_data_loc - (MSB is flags, rest is data_loc, + MSB is flags, rest is data_loc, if MSB == 0, then of the data_loc only the low 16 bits are used as a MEM_HANDLE (only in memory), if MSB == 0xff, then the data_loc is an offset in the - file) + file to the actual data 0x16+8*num_packages Type information 2*num_types t.instance_count @@ -82,6 +82,14 @@ file_list_offs (should be directly after the path list) 8 filename (8 chars or null-terminated) 3 extension (3 chars or null-terminated) +For each package p: +p.data_loc for each type p.t: + for each instance p.t.i: + p.t.i.length + the data for the resource + As the length always is a multiple of 4, the last + few bytes may not belong to the resource itself. + Their content is unspecified. Resources with type 'resource index' (type 4 in the 3DO sc2 starcon.pkg file) diff --git a/sc2/doc/devel/resources b/sc2/doc/devel/resources index a37a165b9..b8ac59adb 100644 --- a/sc2/doc/devel/resources +++ b/sc2/doc/devel/resources @@ -26,7 +26,7 @@ STRTAB (2) - string table MUSICRES (3) - music and sound data RES_INDEX (4) - a resource 'file' CODE (5) - identifies code to use (the resouce file itself does not - contain any code) + contain any code) In the current Urquan Masters, the following types are used: KEY_CONFIG (1) - keyboard configuration (not used in the 3do packages) @@ -37,7 +37,7 @@ SNDRES (5) - waveform audio MUSICRES (6) - music RES_INDEX (7) - a resource 'file' CODE (8) - identifies code to use (the resouce file itself does not - contain any code) + contain any code) The resource files, resinst.h, restypes.h, and respkg.h files were originally generated from information from the .res and .typ files. The