DDDengine structures, and functions
Consts
Types
Functions

bool __stdcall InitD3D(void)

x  

bool __stdcall InitD3DHWND(HWND *hWnd,int sizex,int sizey,bool resizeable,bool* exist,int FSAA)

x  

void* __stdcall GetD3DMsgProc()

x  

void __stdcall StartFrame()

x  

bool __stdcall BeginRender()

x  

bool __stdcall BeginRenderClear(bool clear)

x  

bool __stdcall RenderHWND(HWND hwnd)

x  

bool __stdcall RenderMainWindow(void)

x  

bool __stdcall RenderWindow(HWND hwnd,int xsize,int ysize)

x  

bool __stdcall RenderRect(HWND hwnd,RECT srcrect)

x  

void __stdcall ClearTarget(int target,DWORD color,float z,DWORD stencil)

x  

bool __stdcall BeginRenderTargetClear(bool clear)

x  

bool __stdcall RenderTarget()

x  

void __stdcall FullScreen(bool fullscreen)

x  

bool __stdcall InitDDDengine()

x  

void __stdcall SetObjCoders(codeptr Encode,codeptr Decode)

x  
Object function

int __stdcall loadobj(char* name)

x  

bool __stdcall DeleteObj(int obj)

x  

int __stdcall loadmorphobj(char* name)

x  

int __stdcall cloneobjfromfilebynormal(char* name,float normalsize,bool morphed)

x  

int __stdcall cloneobjfromfile(char* name,bool morphed)

x  

bool __stdcall saveobj(char* name,int obj)

x  

void __stdcall LockHardware()

x  

void __stdcall UnlockHardware()

x  

void __stdcall putclipobj(int obj)

x  

bool __stdcall putlightobj(int obj)

x  

void __stdcall SetCameraPos(float *camera)

x  

void __stdcall SetVisiblityMatrix(float *camera)

x  

void __stdcall SetObjectCarrier(float *obj)

x  

void __stdcall SetSpriteCarrier(float *obj)

x  

void __stdcall GetMouseMatrix(float *matrix)

x  

void __stdcall GetMouseMapMatrix(float *matrix)

x  

void __stdcall GetWorldMatrix(float *matrix)

x  

void __stdcall SetMouseMatrix(float *matrix)

x  

void __stdcall GetMouseMapTranslationMatrix(float *matrix)

x  

void __stdcall SetMouseMapTranslationMatrix(float *matrix)

x  
object

int __stdcall AddLightVertex(vect3d v,vect3d norm,float tu,float tv,DWORD color)

x  

int __stdcall AddLightVertex2(vect3d v,vect3d norm,float tu,float tv,float tu2,float tv2,DWORD color)

x  

int __stdcall AddPolyIndexes(int v1,int v2,int v3)

x  

bool __stdcall AddMesh(int obj,int mesh)

x  

bool __stdcall InitObj(int obj,int _type)

x  

bool __stdcall CloseObj(int obj,int mesh)

x  

bool __stdcall ModifyStaticVertex(int obj,int index,DDDvertex* vertex)

x  

bool __stdcall ModifyLayerVertex(int index,vect3d vertex,float tu,float tv,DWORD color)

x  

bool __stdcall ModifyStaticVertexX(int index,vect3d v,vect3d norm,float tu,float tv,float tu2,float tv2,DWORD color)

x  

bool __stdcall GetStaticVertex(int obj,int index,DDDvertex* vertex)

x  

int __stdcall GetIndex(int vertex)

x  

bool __stdcall ModifyIndex(int vertex,int index)

x  

void __stdcall SetObjsNumber(int obj)

x  

void __stdcall SetMeshesNumber(int mesh)

x  

int __stdcall GetObjsNumber()

x  

int __stdcall GetMeshesNumber()

x  

void __stdcall SetMeshMaterial(int mesh,int text1,int text2,int effect,DWORD ambient,float amount,bool u1,bool v1,bool u2,bool v2,float alpha)

x  

void __stdcall GetMeshMaterial(int mesh,int* text1,int* text2,int* effect,DWORD* ambient,float* amount,bool* u1,bool* v1,bool* u2,bool* v2,float* alpha)

x  
Light

void __stdcall SetDefaultLight(DWORD specularambientcolor,float at0,float at1,float at2,float falloff)

x  

void __stdcall SetupSpecularLight(int index,DWORD backgroundcolor,DWORD lightcolor)

x  

void __stdcall SetupDiffuseLight(int index,DWORD backgroundcolor,DWORD lightcolor)

x  

void __stdcall LightsOff()

x  

void __stdcall SetAmbientColor(DWORD color)

x  

void __stdcall SetSunDirection(vect3d v)

x  

void __stdcall SetupPointLight(int index,vect3d v,DWORD backgroundcolor,DWORD lightcolor,float dia)

x  

void __stdcall LightOff(int index)

x  

void __stdcall SetLight(int index,bool light)

x  

void __stdcall SetLightMode(bool ambient,bool vertexcolor)

x  
Render modes

void __stdcall SetLightObjRender()

x  

void __stdcall SetLayerRender()

x  

void __stdcall SetFillMode(int filltype)

x  

void __stdcall SetAlphaMode()

x  

void __stdcall SetNoAlphaMode()

x  

void __stdcall SetClampMode()

x  

void __stdcall SetWrapMode()

x  

void __stdcall SetPolyClip()

x  

void __stdcall SetPolyNoClip()

x  

void __stdcall EnableFog(float start,float _end,DWORD color)

x  

void __stdcall DisableFog()

x  

void __stdcall SetAlphaBlendMode(int alphablend,int alpharef)

x  

void __stdcall SetBlendMode(int blend)

x  

void __stdcall SetFrameBlendMode(int blend)

x  

void __stdcall SetZBIAS(float z)

x  

void __stdcall SetViewParameters(float x1,float y1,float x2,float y2,float z1,float z2)

x  

void __stdcall SetViewportParameters(float x1,float y1,float x2,float y2,float fov,float aspect,float nearz,float farz)

x  

void __stdcall SetProjectParameters(float fov,float aspect,float nearz,float farz,vect3d vEyePt,vect3d vLookatPt,vect3d vUpVec)

x  

void __stdcall SetAxViewportParameters(float x1,float y1,float x2,float y2,float zoom,float aspect,float nearz,float farz)

x  

void __stdcall SetAxProjectParameters(float zoom,float aspect,float nearz,float farz,vect3d vEyePt,vect3d vLookatPt,vect3d vUpVec)

x  

void __stdcall Setviewmatrix(float *b)

x  

void __stdcall Setprojectionmatrix(float *b)

x  

void __stdcall SetNormalizeNormals(bool normalizenormals)

x  

bool __stdcall SetLightMap(int texture)

x  

void __stdcall grCullMode(int mode)

x  

void __stdcall grDepthBufferMode(int mode)

x  

void __stdcall grDepthMask(bool mask)

x  

void __stdcall grDepthBufferFunction(int _function)

x  
Texts

bool __stdcall CreateD3DXTextMesh(LPD3DXMESH* m_pMesh3DText,char* str,char* font,float size,float strike,float x,float y,float xalign,float yalign)

x  

bool __stdcall Draw3Dtext(LPD3DXMESH mesh,DWORD ambientcolor)

x  

bool __stdcall Drawtextin3D(char* str,DWORD lightcolor,float x,float y,float z,float xalign,float yalign)

x  

bool __stdcall Drawtext(char* str,DWORD color,float x,float y,float xalign,float yalign,bool scaled)

x  

bool __stdcall SetFont(char* font,float size,int _type)

x  

bool __stdcall SetFontByTexture(int texture,float size,float u,float v,char* sample)

x  
Stencil

void __stdcall RenderScene(worldrenderfunc renderworld,worldrenderfunc renderalphaworld,worldrenderfunc rendershadow,lightrenderfunc renderlight,bool _renderlight )

x  

void __stdcall InitDepthComplexity()

x  

void __stdcall ShowDepthComplexity()

x  
Capture

bool __stdcall savetga(char* Str,int buffer,int xsize,int ysize)

x  

bool __stdcall dumptga(char* Str,BYTE* src_buffer,int xsize,int ysize,int _type)

x  

bool __stdcall savebmp(char* Str,int buffer,int xsize,int ysize)

x  

bool __stdcall savejpg(char* filename,int buffer,int xsize,int ysize,float quality)

x  

bool __stdcall CreateAvi(HWND hwnd,char* FileName,int xsize,int ysize,int fps,int freq,int bits,int channels)

x  

bool __stdcall AddFrameToAvi()

x  

bool __stdcall AddWaveToAvi(void* wavebuffer,DWORD numbytes)

x  

void __stdcall EndAvi()

x  

HRESULT __stdcall InitDShowTextureRenderer()

x  

void __stdcall CleanupDShow(void)

x  
Textures

void __stdcall guTexMemReset()

x  

int __stdcall textureload(char* name,int _type)

x  

int __stdcall textureloadEx(char* name,loadtexturestruct* txt)

x  

int __stdcall AddTextureToList(char* name,LPDIRECT3DTEXTURE8 texture)

x  

int __stdcall CreateTexture(char* name,int xsize,int ysize,int _type)

x  

bool __stdcall ReloadTexture(int texture,int surface,void* texturemem,D3DFORMAT format,int pitch,int filter)

x  

bool __stdcall ReloadTextureEx(int texture,int surface,void* texturemem,D3DFORMAT format,int x,int y,int pitch,int filter)

x  

bool __stdcall CopyScreencopyTexture(int texture)

x  

void __stdcall SetCurrentTexture(int texture)

x  

bool __stdcall SetCurrentTextureByRenderTarget()

x  

void __stdcall SetTextureFiltering(int anisotropic,bool mipmap,int filtering)

x  

void __stdcall SetDefaultrenderStates()

x  

void __stdcall SetDefaultTexture(int texture)

x  

bool __stdcall gettextureprops(int texture,int surface,texturepropertystruct* txprop)

x  

int __stdcall downloadtexture(int texture,int surface,void* pointer,int sizelimit)

x  

bool __stdcall SaveSurface(int texture,int surface,char* fname,int _type)

x  
Tests

bool __stdcall TestPointVisibility(vect3d v)

x  

bool __stdcall TestIntersection(float* objmatrix,int obj,vect3d pos,vect3d dir,float max_dis,intersectionstruct* out)

x  

float __stdcall IntersectionOverMouse(int obj)

x  

float __stdcall IntersectionOverPoint(int obj,int x,int y)

x  

int __stdcall IntersectionWorlObjectOverMouse(worldobjstruct* worldobj)

x  

int __stdcall IntersectionWorlObjectOverPoint(worldobjstruct* worldobj,int x,int y)

x  

void __stdcall ProjectPoint(vect3d* v)

x  

void __stdcall TransformPoint(vect3d* v)

x  

void __stdcall DDD_TransformPoint(vect3d* v,float* matrix)

x  

void __stdcall TransformPointRHW(vect3d* v,float* w)

x  

void __stdcall PixelTransform(vect3d* v)

x  

void __stdcall PixelTransformByMouse(vect3d* v)

x  

void __stdcall GetAvailableMem(int* total,int* free,int* freetexture)

x  

void __stdcall GetMaxTextureSize(int* xsize,int* ysize)

x  
Lines

linearraystruct* __stdcall CreateLinearray(int maxpoints,int ttype)

x  

bool __stdcall DeleteLinearray(linearraystruct* linearray)

x  

void __stdcall ResetLineArray(linearraystruct* linearray)

x  

int __stdcall AddLineVertex(linearraystruct* linearray,bool newline,vect3d v,DWORD color)

x  

int __stdcall AddLineVertexPoint(linearraystruct* linearray,bool newline,vect3d v,DWORD color,int _type)

x  

void __stdcall SetLineRender(linearraystruct* linearray)

x  

void __stdcall SetWideLineRender(linearraystruct* linearray,int texture,float wide,float zvis)

x  

void __stdcall DrawWideLines(linearraystruct* inlinearray,int start,int count)

x  

void __stdcall DrawLines(linearraystruct* linearray,int start,int count)

x  

void __stdcall SetNormalsonWideline(linearraystruct* linearray,int start,int count)

x  
Shadow

bool __stdcall ResetRenderTargetSize(int sizex,int sizey)

x  

bool __stdcall ResetMaxRenderTargetSize(int sizex,int sizey)

x  

void __stdcall SetShadowColor(DWORD color)

x  

bool __stdcall SWShadow()

x  

int __stdcall SWShadowSizeFromObj(int obj)

x  

bool __stdcall RenderShadowToTexture(int obj,float* b,int texture,swshadowmapstruct* swshadowmap)

x  

swshadowstruct* __stdcall SWShadowBuildFromObj(int obj,float* b,float* shadowobjmatrix,swshadowmapstruct* shadowmap,swshadowstruct* located)

x  

bool __stdcall SWDrawShadow(swshadowstruct* shadowobj,swshadowmapstruct* shadowmap)

x  

shadowstruct* __stdcall ShadowBuildFromObj(int obj,float distance,shadowstruct* located)

x  

bool __stdcall DrawShadow(shadowstruct* shadowobj)

x  

bool __stdcall GlobalRenderShadow()

x  

void __stdcall SwitchRenderPhase(int phase)

x  

int __stdcall ShadowSizeFromObj(int obj)

x  
helpers

int __stdcall GetHelperCount(int obj)

x  

Thelperstruct __stdcall GetHelper(int obj,int index)

x  
Dynamic buffer

void __stdcall SetDynamicBufferRender()

x  

void __stdcall ResetDynamicVertexBuffer()

x  

int __stdcall AddDynamicVertex(vect3d v,vect3d norm,float tu,float tv,DWORD color)

x  

void __stdcall DrawDynamicPolys(int start,int count)

x  

void __stdcall DrawDynamicArrayPolys(LPDIRECT3DVERTEXBUFFER8 dyn,int start,int count)

x  

void __stdcall SetDynamicArrayRender(LPDIRECT3DVERTEXBUFFER8 dyn)

x  

int __stdcall AddDynamicVertexArray(dynamicarraystruct* dyn,vect3d v,vect3d norm,float tu,float tv,DWORD color)

x  

void __stdcall DrawPrimitiveUp(int count,void* data )

x  
Dots

void __stdcall DrawDynamicDots(int start,int count)

x  

void __stdcall PutDot(vect3d indot,DWORD color)

x  

void __stdcall SetDotSize(float size,float sizea,float sizec,bool scaled)

x  
Layers

void __stdcall ResetLayerVertexBuffer()

x  

int __stdcall AddLayerVertex(vect3d v,float tu,float tv,DWORD color)

x  

void __stdcall DrawLayerPolys(int start,int count)

x  

void __stdcall PutWorldObjMax(worldobjstruct* worldobj,int objnum,int _type,DWORD maxobjdb,bool viewalltime)

x  

void __stdcall PutWorldObj(worldobjstruct* worldobj,int _type)

x  

void __stdcall putminimenu()

x  

void __stdcall SetDDDengineMemory(int maxvertex,int maxcindex,int maxsprite,int maxhelpers,int maxstaticobjects,int maxstaticmeshes)

x  

void __stdcall SetTexturePaths(char* TextureSearchTopDir,char* TextureSearchPath,bool bmpload,bool skiptexture,bool EnableUncodedLoading)

x  

void __stdcall ResizeMainWindow(int Xsize,int Ysize)

x  

void __stdcall CloseDDDengine()

x  
Display

void __stdcall PutFPS()

x  
scene functions

int __stdcall loadworldobject(char* filein,LPworldobjstruct* wobjs)

x  
input

bool __stdcall GetMouseLB()

x  

bool __stdcall GetMouseLBdown()

x  

bool __stdcall TestMouseonButton(int x,int y,int xs,int ys)

x  

bool __stdcall ClearMouseLBdown()

x  
Matrix functions

void __stdcall DDD_matscale4x4(float *a,float xs,float ys,float zs)

x  

void __stdcall DDD_matrix4x4(float* Igi_mat2,float rx,float ry,float rz,float trx,float tryy,float trz)

x  

void __stdcall DDD_matinv4x4(float *a,float *out)

x  

void __stdcall DDD_matcpy4x4(float *dst,float *src)

x  

void __stdcall DDD_matmul4x4(float *a,float *b,float *dst)

x  

void __stdcall DDD_matmul3x3(float *a,float *b,float *dst)

x  

void __stdcall DDD_mattrans4x4(float* matrix,vect3d vc,vect3d* vecout)

x  

void __stdcall DDD_matrot4x4(float* matrix,vect3d vc,vect3d* vecout)

x  

void __stdcall DDD_setmatrix4x4(float* Igi_mat2,float trx,float tryy,float trz,float sclx,float scly,float sclz)

x  
Map

void __stdcall RenderMapLayer(maplayerstruct* maplayer)

x  

void __stdcall RenderMapLayerSign(maplayerstruct* maplayer)

x  

bool __stdcall CreateMapLayer(char* pathname,maplayerstruct* maplayer)

x  

bool __stdcall DeleteMapLayer(maplayerstruct* maplayer)

x  

bool __stdcall CreateMapLayerEx(char* pathname,maplayerstruct* maplayer,int texture,float offsetx,float offsety,float scx,float scy)

x  

void __stdcall ResetMapMatrix(float x1,float y1,float x2,float y2)

x  

void __stdcall SetMarker(int symbolid,float sx,float sy,float tu1,float tv1,float tu2,float tv2,int color)

x  

void __stdcall SetMapMarker(int symbolid,float sx,float sy)

x  

void __stdcall PutMarker()

x  

void __stdcall SetSprite(int sprite,int texture,float sx,float sy,float tu1,float tv1,float tu2,float tv2,int color)

x  

void __stdcall PutSprite(int textureid)

x  

bool __stdcall SaveMif(char* path,maplayerstruct* maplayer)

x  

bool __stdcall InitMapLayer(maplayerstruct* maplayer)

x  
Voxel

void __stdcall VoxelInit()

x  

void __stdcall LoadVoxel(char* dir,voxelstruct *voxelinfo)

x  

void __stdcall VoxelHlsSampling(voxelstruct *voxelinfo)

x  

void __stdcall VoxelBlur()

x  

bool __stdcall loadHeightMap(char* name)

x  

bool __stdcall saveHeightMap(char* name)

x  

void __stdcall RenderVoxel()

x  

void __stdcall DDD_log(const char* format, ...)

x  
Input

bool __stdcall InitKeyBuff(HINSTANCE hInstance)

x  

bool __stdcall RefreshKeyBuff()

x  
Color

void __stdcall SWAPRGB(DWORD* color)

x  

DWORD __stdcall PUTSWAPRGB(DWORD color)

x  

float __stdcall ToHLS(float c_blue,float c_green,float c_red)

x  

DWORD __stdcall ARGBBrightness(DWORD color, float bright,bool onalpha)

x  
Tools

int __stdcall CreateSky(char* path,int SKYSIZE,char* file1,char* file2,char* file3,char* file4,char* file5,DWORD col)

x  

int __stdcall CreateWaterSurface(DWORD color)

x  

void __stdcall SetWaterMode(bool water)

x  

void __stdcall DrawObjNormals(int obj1,float len,DWORD _color,bool normals,bool boundingbox,bool gridboundingbox)

x  

void __stdcall PutWorldObjNormal(worldobjstruct* worldobj,int _type,bool normals,bool boundingbox,bool gridboundingbox,float length,DWORD color)

x  

void __stdcall InitSceneObject(worldobjstruct* wobj)

x  

void __stdcall InitParticle(particlesstruct* particle)

x  

void __stdcall InitLightObject(lightobjectstruct* particles)

x  

void __stdcall InitConditionObject(conditionobjectstruct* condy)

x  

int __stdcall AddSceneObject(worldobjstruct* wobj,int lastsceneobj,int maxobj,int objid,float* matrix,vect3d* speed,int lifetime,worldobjstruct* link)

x  

int __stdcall AddSceneSprite(worldobjstruct* wobj,int lastsceneobj,int maxobj,int objid,float* matrix,vect3d* speed,int lifetime,worldobjstruct* link)

x  

void __stdcall AddParticleToObject(worldobjstruct* wobj,int texture,int lifetime,int borntime,float size,float mass,float power,float growe)

x  

void __stdcall AddConditionToObject(worldobjstruct* wobj)

x  

void __stdcall AddLightToObject(worldobjstruct* wobj,int type,DWORD ambientcolor,DWORD diffusecolor)

x  

void __stdcall CloseSceneObject(worldobjstruct* wobj,int lastsceneobj)

x  
Particles

void __stdcall InitRenderParticles()

x  

void __stdcall RenderParticles()

x  

void __stdcall InitRenderEnvironment()

x  

void __stdcall PutRain(int strong)

x  
Collosion

bool __stdcall CollosionWithWorldObject(worldobjstruct* worldobj,int srcobj,float* srcmatrix,int maxdb)

x  
Animations

void __stdcall PlayAnim(worldobjstruct* wobj,float speed)

x  

void __stdcall StopAnim(worldobjstruct* wobj)

x  

void __stdcall CreateSelfAnim(worldobjstruct* wobj)

x  
Morphs

void __stdcall SetMorph(int obj,int objsrc,float tween)

x  

bool __stdcall UpdateMorph(int objtrg,int objsrc)

x  
Nurbs, and Splines

void __stdcall SetNurb(int _alksrn,int _srn)

x  

void __stdcall bazerpost(float *x,float *y,float *z,DWORD bl,float t)

x  

int __stdcall alkfileinit(int alkcnt,char* filein,float fsx,float fsy,float fsz)

x  

void __stdcall CalculateNurbPos(float *x,float *y,float *z,float t_long,float t_wide)

x  
X86

int __stdcall loadworldobjectfromSZR(char* filein,worldobjstruct &wobjs)

x  

void __stdcall guDrawTriangleWithClip(const GrVertex *a,const GrVertex *b,const GrVertex *c)

x  

void __stdcall PartRender()

x  

vect3d __stdcall DDDengineVect(float x,float y,float z)

x