Resource information is now centralized in resources.csv.
The old scripts that trolled content/ and src/ for information have been retired, and the new script reads the CSV file and generates the resource files directly. Future changes to the resource indices or content should be done by modifying resources.csv and regenerating the data. git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@2925 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
+24
-19
@@ -1,23 +1,28 @@
|
||||
The resmap tool is a set of utilities for generating subsidiary resource
|
||||
index files based on the current system.
|
||||
The resources.csv file contains a master list of all resources in the
|
||||
game, as well as both integer and string names for each one. Running
|
||||
gen_resfiles.py will cause it to regenerate uqm.rmp, all the .ls2
|
||||
files, and the i*.h source headers that produce the #defines.
|
||||
|
||||
----
|
||||
The .csv file itself is a comma-separated-values list with nine
|
||||
fields:
|
||||
|
||||
Currently available runnable files:
|
||||
1. The header file that will define the constant, with "src/" as its
|
||||
base directory
|
||||
2. The resource index that will define the integer resource, with
|
||||
"content/" is its base directory
|
||||
3. The name of the #defined constant
|
||||
4. The integral resource package
|
||||
5. The integral resource instance
|
||||
6. The integral resource type
|
||||
7. The string resource id
|
||||
8. The string resource type
|
||||
9. The resource file that contains the content to be loaded
|
||||
|
||||
mastermap.py: Walks the content tree, finds all the .lst files, and
|
||||
produces a master resource map mapping IDs to each file.
|
||||
The integral resource type is mainly for backwards compatibility, but
|
||||
it is the index into the array defined by getres.c (so, MUSICRES is 6,
|
||||
for instance).
|
||||
|
||||
----
|
||||
|
||||
Currently available library files:
|
||||
|
||||
explorer.py: Provides routines for locating and parsing .lst files in
|
||||
the content tree.
|
||||
|
||||
stridgen.py: This does most of the grunt work. It provides the
|
||||
makeid() function, which, given a filename, produces a
|
||||
suitable Resource ID string. This is handled with a huge
|
||||
array of regular expressions at present; as the design
|
||||
of the resource tree evolves, this script may be kept in
|
||||
sync with it.
|
||||
If a resource is defined but has no associated content by default
|
||||
(i.e., for bonus material), the last two fields will be "--". They
|
||||
will not receive an entry in the .rmp file, but it will still be legal
|
||||
to refer to the #defined constant or the integral resource ID.
|
||||
|
||||
Reference in New Issue
Block a user