PatchTable
A patch table is a list of patch names used for Doom's composite texture system (see: PNAMES on the doom wiki).
Properties
Property | Type | Description |
---|---|---|
An array of all patch names in the table | ||
The parent archive of the patch table |
Constructors
Creates a new, empty patch table.
Functions
Overview
Patches
Read/Write
Patch
Gets the name of the patch at
Parameters
index (integer ): The patch index
Returns
string : The name of the patch atindex , or"INVALID PATCH"
if the index was out of bounds
PatchEntry (1)
Gets the associated
Parameters
index (integer ): The patch index
Returns
ArchiveEntry : The associatedArchiveEntry for the patch atindex , ornil
if no entry was found or the given index was out of bounds
Notes
When searching for the patch entry, the
PatchEntry (2)
Gets the associated
Parameters
name (string ): The patch name
Returns
ArchiveEntry The associatedArchiveEntry for the patch with the givenname , ornil
if no entry was found or the given name was not in the patch table
Notes
When searching for the patch entry, the
RemovePatch
Removes the patch at
Parameters
index (integer ): The patch index
Returns
boolean :false
if the given index was out of bounds
ReplacePatch
Replaces the patch at
Parameters
index (integer ): The patch indexname (string ): The new name for the patch
Returns
boolean :false
if the given index was out of bounds
AddPatch
Adds a new patch with
Parameters
name (string ): The name of the patch to addallowDuplicate (boolean ): Iffalse
, no new patch will be added if a patch already exists in the table with the given name
Returns
boolean :true
if a new patch was added
LoadPNAMES
Clears any existing patches in the table and loads in PNAMES data from the given entry
Parameters
pnames (ArchiveEntry ): The PNAMES entry to load
Returns
boolean :true
on success
Notes
This will set the table's
WritePNAMES
Writes the patch table to
Parameters
pnames (ArchiveEntry ): The entry to write PNAMES data to
Returns
boolean :true
on success