◆ idMan()
Ultima::Ultima8::idMan::idMan |
( |
uint16 |
begin, |
|
|
uint16 |
max_end, |
|
|
uint16 |
startcount = 0 |
|
) |
| |
- Parameters
-
begin | start of the range of available IDs |
max_end | end of the range of available IDs |
startcount | number of IDs to make available initially (0 = all) |
◆ getNewID()
uint16 Ultima::Ultima8::idMan::getNewID |
( |
| ) |
|
get a free ID
- Returns
- a free ID, or 0 if none are available
◆ reserveID()
bool Ultima::Ultima8::idMan::reserveID |
( |
uint16 |
id | ) |
|
mark a given ID as used, expanding if necessary. Note: reserveID is O(n), so don't use too often.
- Returns
- false if the ID was already used or is out of range
◆ setNewMax()
void Ultima::Ultima8::idMan::setNewMax |
( |
uint16 |
maxEnd | ) |
|
|
inline |
increase the maximum size Note: this shouldn't be used in normal circumstances. It exists for dumpMap currently. If that is rewritten not to need more than 32768 object IDs, this function should be deleted.
The documentation for this class was generated from the following file: