Drag[en]gine Script Module DragonScript 1.35
Loading...
Searching...
No Matches
Dragengine.Preloading.UniqueIDRemapper Class Reference

Remap UniqueIDs to use multiple GameWorld resources simulatanously. More...

Inheritance diagram for Dragengine.Preloading.UniqueIDRemapper:

Classes

class  RemapEntry
 Immutable remap entry. More...

Public Member Functions

RemapEntry add (UniqueID firstID, UniqueID lastID, UniqueID target)
 Add remap entry.
void forEach (Block ablock)
 Visit remap entries with block with parameter RemapEntry.
RemapEntry getAt (int index)
 Remap entry at index.
RemapEntry getContaining (UniqueID id)
 Remap entry containing ID or null if absent.
int getCount ()
 Number of remap entries.
UniqueIDRemapper new ()
 Create unique id mapper.
UniqueID remap (UniqueID id)
 Remap ID if falling into a remap range.
void removeAll ()
 Remove all remap entries.
void writeToFile (FileWriter writer)
 Write to file.

Public Attributes

Array pRemapEntries
 Array of RemapEntry.

Detailed Description

Remap UniqueIDs to use multiple GameWorld resources simulatanously.

Member Function Documentation

◆ add()

RemapEntry Dragengine.Preloading.UniqueIDRemapper.add ( UniqueID firstID,
UniqueID lastID,
UniqueID target )

Add remap entry.

Entry remaps IDs from range (firstID..lastID) to (target..target+(lastID-firstID)).

Returns
Added entry.

Referenced by writeToFile().

◆ forEach()

void Dragengine.Preloading.UniqueIDRemapper.forEach ( Block ablock)

Visit remap entries with block with parameter RemapEntry.

Referenced by writeToFile().

◆ getAt()

RemapEntry Dragengine.Preloading.UniqueIDRemapper.getAt ( int index)

Remap entry at index.

Referenced by writeToFile().

◆ getContaining()

RemapEntry Dragengine.Preloading.UniqueIDRemapper.getContaining ( UniqueID id)

Remap entry containing ID or null if absent.

Referenced by writeToFile().

◆ getCount()

int Dragengine.Preloading.UniqueIDRemapper.getCount ( )

Number of remap entries.

Referenced by writeToFile().

◆ new()

UniqueIDRemapper Dragengine.Preloading.UniqueIDRemapper.new ( )

Create unique id mapper.

◆ remap()

UniqueID Dragengine.Preloading.UniqueIDRemapper.remap ( UniqueID id)

Remap ID if falling into a remap range.

Returns
Offset ID if falling into a remap range otherwise id.

Referenced by writeToFile().

◆ removeAll()

void Dragengine.Preloading.UniqueIDRemapper.removeAll ( )

Remove all remap entries.

Referenced by writeToFile().

◆ writeToFile()

void Dragengine.Preloading.UniqueIDRemapper.writeToFile ( FileWriter writer)

Member Data Documentation

◆ pRemapEntries

Array Dragengine.Preloading.UniqueIDRemapper.pRemapEntries

Array of RemapEntry.

Referenced by writeToFile().


The documentation for this class was generated from the following file: