Members
(constant) ICONJS_CBS_RC4_KEY :Uint8Array
The RC4 key used for ciphering CodeBreaker Saves.
Type:
- Uint8Array
(constant) ICONJS_VERSION :string
The current version of the library.
Type:
- string
Methods
convertBGR5A1toRGB5A1(bgrData) → (non-null) {Uint16Array}
Converts a BGR5A1 texture to a RGB5A1 texture
Parameters:
Name | Type | Description |
---|---|---|
bgrData |
Uint16Array | texture |
Returns:
converted texture
- Type
- Uint16Array
decodeLzari(input) → {Uint8Array}
Decompresses LZARI-formatted data.
Parameters:
Name | Type | Description |
---|---|---|
input |
Uint8Array | source data |
Returns:
output - uncompressed data
- Type
- Uint8Array
(protected) getTextureFormat(i) → {string}
Converts a texture format to a generalized texture type character.
Parameters:
Name | Type | Description |
---|---|---|
i |
number | texture format |
Returns:
U: uncompressed, N: none, C: compressed
- Type
- string
(protected) rc4Cipher(key, target) → (non-null) {Uint8Array}
Implements an RC4 cipher.
Parameters:
Name | Type | Description |
---|---|---|
key |
TypedArray | Uint8Array | 256-byte key |
target |
TypedArray | Uint8Array | n-length data to cipher |
Returns:
target ciphered by key
- Type
- Uint8Array
(protected) readCodeBreakerCbsDirectory(input) → {Object}
Read a CodeBreaker Save (CBS) file's directory structure
Parameters:
Name | Type | Description |
---|---|---|
input |
ArrayBuffer | Uncompressed, unciphered input |
Returns:
(user didn't write a description)
- Type
- Object
readCodeBreakerCbsFile(input, inflator) → {Object}
Read a CodeBreaker Save (CBS) file.
Parameters:
Name | Type | Default | Description |
---|---|---|---|
input |
ArrayBuffer | CBS formatted file | |
inflator |
function | null | a function which provides a zlib-compatible inflate function. |
Returns:
(user didn't write a description)
- Type
- Object
readEmsPsuFile(input) → {Object}
Read a EMS Memory Adapter export file (PSU format)
Parameters:
Name | Type | Description |
---|---|---|
input |
ArrayBuffer | PSU formatted file |
Returns:
(user didn't write a description)
- Type
- Object
(protected) readEntryBlock(input) → {Object}
Read a 512-byte file descriptor that is used on Memory Cards or PSU files.
Parameters:
Name | Type | Description |
---|---|---|
input |
ArrayBuffer | File descriptor segment. |
Returns:
(user didn't write a description)
- Type
- Object
readIconFile(input) → {Object}
Read a Model file ({*}, usually ICN or ICO, however)
Parameters:
Name | Type | Description |
---|---|---|
input |
ArrayBuffer | icon model file |
Returns:
(user didn't write a description)
- Type
- Object
(protected) readMaxPwsDirectory(input) → {Object}
Read a Max Drive (MAX) or PowerSave (PWS) file's directory structure.
Parameters:
Name | Type | Description |
---|---|---|
input |
ArrayBuffer | Uncompressed input |
Returns:
(user didn't write a description)
- Type
- Object
readMaxPwsFile(input, unlzari) → {Object}
Read a Max Drive (MAX) or PowerSave (PWS) file.
Parameters:
Name | Type | Description |
---|---|---|
input |
ArrayBuffer | MAX/PWS formatted file |
unlzari |
function | a function which provides a LZARI-compatible decompression function. |
Returns:
(user didn't write a description)
- Type
- Object
readPS2D(input) → {Object}
Read a PS2D format file (icon.sys)
Parameters:
Name | Type | Description |
---|---|---|
input |
ArrayBuffer | icon.sys formatted file |
Returns:
(user didn't write a description)
- Type
- Object
readPsvFile(input) → {Object}
Read a PS3 save export file (PSV format)
Parameters:
Name | Type | Description |
---|---|---|
input |
ArrayBuffer | PSV formatted file |
Returns:
(user didn't write a description)
- Type
- Object
readSharkXPortSxpsFile(input) → {Object}
Read a SharkPort or X-Port export file (SPS or XPS format)
Parameters:
Name | Type | Description |
---|---|---|
input |
ArrayBuffer | SPS|XPS formatted file |
Returns:
(user didn't write a description)
- Type
- Object
(protected) readSxpsDescriptor(input) → {Object}
Read a SPS or XPS file descriptor.
Parameters:
Name | Type | Description |
---|---|---|
input |
ArrayBuffer | File descriptor segment. |
Returns:
(user didn't write a description)
- Type
- Object
setDebug(value)
Enable or disable use of debugging information in console via console.debug()
Parameters:
Name | Type | Description |
---|---|---|
value |
boolean | Enable/disable this feature |
setStrictness(value)
Select if invalid characters in titles should be replaced with either spaces or nulls
Parameters:
Name | Type | Description |
---|---|---|
value |
boolean | true: with nulls, false: with spaces |
- Deprecated:
- Hasn't been needed for a while. Dropping support by ESM transition.
- Default Value:
- true
- Source:
(protected) stringScrubber(dirty) → {string}
Takes a string and returns the first part before a null character.
Parameters:
Name | Type | Description |
---|---|---|
dirty |
string | String to slice from first null character. |
Returns:
Substring of dirty before first null character.
- Type
- string
uncompressTexture(input) → (non-null) {Uint16Array}
Decompress a compressed texture using RLE.
Parameters:
Name | Type | Description |
---|---|---|
input |
ArrayBuffer | texture |
Returns:
decompressed texture, equivalent to an uncompressed texture
- Type
- Uint16Array