Types
Expand description
This file has compression/decompression functions used for compressed visibility data, bigmap data, and
joint animations (not the joint-anim-compressed stuff, an outer layer of lzo compression of those)
It also has the update-vis! method of level, which handles the details of decompression.
Luckily for us, the IOP ramdisk vis stuff from Jak 1 is gone!
It's not super clear to me why they ditched this system. Maybe the visibility data is a lot smaller in jak 2.
Types
Functions
pack-comp-rle(arg0: pointer, arg1: pointer, arg2: int, arg3: int) => pointersource
unpack-comp-huf(arg0: pointer, arg1: pointer, arg2: uint, arg3: huf-dictionary-node) => nonesource
unpack-comp-lzo(arg0: pointer, arg1: pointer) => nonesource
unpack-comp-rle(arg0: pointer, arg1: pointer) => pointersource
Expand description
GOAL File I/O
This is mostly not used in the retail game and was more for loading stuff during development.
The file-stream is an inefficient way to load data, but is flexible and can load
from the CD, or over the network in development.
The file-info type is used in actual game data for checking versions.
represents a file that can be read/written, similar to FILE* in C.
NOTE: this is a special type in three ways:
1). It is used in the C runtime. This must be kept in sync with kmachine.h's FileStream
2). This type is built-in to the compiler (see TypeSystem.cpp, add_builtin_types)
It must be kept up to date with that definition as well.
3). The C runtime constructs this type before anything is loaded. The sizes
must be kept up to date there as well.
Types
file-info: basicsource
Fields
type: type
file-type: pointer
file-name: basic
major-version: uint32
minor-version: uint32
maya-file-name: basic
tool-debug: basic
mdb-file-name: basic
Functions
file-info-correct-version?(arg0: file-info, arg1: file-kind, arg2: int) => symbolsource
Check if the version and kind in the info is valid. The version-override can specify a
non-default version, or set to 0 for the default version
file-stream-read-string(arg0: file-stream, arg1: string) => stringsource
Fill a string with data from a file stream.
Note: this function does not work.
make-file-name(arg0: file-kind, arg1: string, arg2: int, arg3: symbol) => stringsource
Get a file name to open a file with the given kind and name.
The art-group-version argument can be used to override the version
of the art-group. Set it to 0 or less to use the default version
Similar to MakeFileName in C.
Note: file type enum is different between C and GOAL.
File versions should match those in versions.h.
Uses a single file-temp-string buffer, shared with make-vfile-name.
arg3 is unused.
make-vfile-name(arg0: file-kind, arg1: string) => stringsource
Make virtual? file name. This makes a name that the kernel knows how to
handle in a specific way. This function is not used.