Daggerfall Mod:DFRemake/DFEGetFirst3dMemblock
The UESPWiki – Your source for The Elder Scrolls since 1995
< Mod / Daggerfall: Daggerfall Mod: DFRemake(Redirected from Daggerfall:DFRemake/DFEGetFirst3dMemblock)
integer DFEGetFirst3dMemblock ( DWORD MemblockPtr )[edit]
Inputs[edit]
- MemblockPtr: The pointer to a memblock from the GET MEMBLOCK PTR command.
Outputs[edit]
Returns -1 if there are no objects to iterate through. On success the result is a combination of the texture and image indices:
Bytes 0-1: ImageIndex Bytes 2-3: TextureIndex
Description[edit]
Use this function to start iterating through all faces with the same texture in the current 3d object. On success, the given memblock will contain object data for all faces with the same texture image. Memblocks should be allocated with the DFEGet3dSize() function (which will over-allocate which is fine). See DFEGetNext3dMemblock for more information.
Example[edit]
Local ErrResult as integer Local Size as DWORD local TexValue as integer Local TexIndex as DWORD Local ImageIndex as DWORD Size = DFEGet3dObjectSize() make memblock 1, Size TexValue = DFEGetFirst3dMemblock(get memblock ptr(1)) if (TexValue = 1) then End TexIndex = TexValue >> 16 ImageIndex = TexValue && 65535