Daggerfall Mod:DFRemake/DFEGetNextDungeonBlock
The UESPWiki – Your source for The Elder Scrolls since 1995
< Mod / Daggerfall: Daggerfall Mod: DFRemake(Redirected from Daggerfall:DFRemake/DFEGetNextDungeonBlock)
integer DFEGetNextDungeonBlock ( DWORD MemblockPtr )[edit]
Inputs[edit]
- MemblockPtr: Pointer to the memblock (from GET MEMBLOCK POINTER) to receive the dungeon block data. The memblock should be allocated with at least 256 bytes
Outputs[edit]
Returns 1 on success or 0 if there are no more dungeon blocks in the current dungeon.
Description[edit]
This function continues to retrieve dungeon block data from the currently selected dungeon from maps.bsa after an initial call to DFEGetFirstDungeonBlock. The given memblock is filled with the block data in the following format:
Field | Type | Byte Pos | Description |
---|---|---|---|
BlockChar | BYTE | 0 | The initial block filename character. |
BlockIndex | DWORD | 1 | The block filename index (0-999). |
XPos | float | 5 | The block's x-position in the dungeon in world coordinates. |
YPos | float | 9 | The block's y-position in the dungeon in world coordinates. |
The complete dungeon block filename can be generated in DB with the RMMakeDungeonBlockFilename function.
Example[edit]
Local Result as integer make memblock 17, 256 Result = DFEGetFirstDungeonBlock(get memblock ptr(17)) while (Result) BlockChar = memblock Byte(17, 0) BlockIndex = memblock DWORD(17, 1) XPos = memblock Float(17, 5) YPos = memblock Float(17, 9) Result = DFEGetNextDungeonBlock(get memblock ptr(17)) Endwhile