Open main menu

UESPWiki β

Daggerfall Mod:DFRemake/DFEGetNextDungeonBlock

< Mod / Daggerfall: Daggerfall Mod: DFRemake(Redirected from Daggerfall:DFRemake/DFEGetNextDungeonBlock)

integer DFEGetNextDungeonBlock ( DWORD MemblockPtr )Edit

InputsEdit

  • 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

OutputsEdit

Returns 1 on success or 0 if there are no more dungeon blocks in the current dungeon.

DescriptionEdit

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.

ExampleEdit

  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

See AlsoEdit