Games/Apps Products Web Downloads Contact/About
DDD Engine - Functions

DDDengine structures, and functions

Consts
Types
Functions

bool __stdcall InitD3D(void)

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

void* __stdcall GetD3DMsgProc()

void __stdcall StartFrame()

bool __stdcall BeginRender()

bool __stdcall BeginRenderClear(bool clear)

bool __stdcall RenderHWND(HWND hwnd)

bool __stdcall RenderMainWindow(void)

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

bool __stdcall RenderRect(HWND hwnd,RECT srcrect)

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

bool __stdcall BeginRenderTargetClear(bool clear)

bool __stdcall RenderTarget()

void __stdcall FullScreen(bool fullscreen)

bool __stdcall InitDDDengine()

void __stdcall SetObjCoders(codeptr Encode,codeptr Decode)

Object function

int __stdcall loadobj(char* name)

bool __stdcall DeleteObj(int obj)

int __stdcall loadmorphobj(char* name)

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

int __stdcall cloneobjfromfile(char* name,bool morphed)

bool __stdcall saveobj(char* name,int obj)

void __stdcall LockHardware()

void __stdcall UnlockHardware()

void __stdcall putclipobj(int obj)

bool __stdcall putlightobj(int obj)

void __stdcall SetCameraPos(float *camera)

void __stdcall SetVisiblityMatrix(float *camera)

void __stdcall SetObjectCarrier(float *obj)

void __stdcall SetSpriteCarrier(float *obj)

void __stdcall GetMouseMatrix(float *matrix)

void __stdcall GetMouseMapMatrix(float *matrix)

void __stdcall GetWorldMatrix(float *matrix)

void __stdcall SetMouseMatrix(float *matrix)

void __stdcall GetMouseMapTranslationMatrix(float *matrix)

void __stdcall SetMouseMapTranslationMatrix(float *matrix)

object

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

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

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

bool __stdcall AddMesh(int obj,int mesh)

bool __stdcall InitObj(int obj,int _type)

bool __stdcall CloseObj(int obj,int mesh)

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

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

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

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

int __stdcall GetIndex(int vertex)

bool __stdcall ModifyIndex(int vertex,int index)

void __stdcall SetObjsNumber(int obj)

void __stdcall SetMeshesNumber(int mesh)

int __stdcall GetObjsNumber()

int __stdcall GetMeshesNumber()

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)

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)

Light

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

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

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

void __stdcall LightsOff()

void __stdcall SetAmbientColor(DWORD color)

void __stdcall SetSunDirection(vect3d v)

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

void __stdcall LightOff(int index)

void __stdcall SetLight(int index,bool light)

void __stdcall SetLightMode(bool ambient,bool vertexcolor)

Render modes

void __stdcall SetLightObjRender()

void __stdcall SetLayerRender()

void __stdcall SetFillMode(int filltype)

void __stdcall SetAlphaMode()

void __stdcall SetNoAlphaMode()

void __stdcall SetClampMode()

void __stdcall SetWrapMode()

void __stdcall SetPolyClip()

void __stdcall SetPolyNoClip()

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

void __stdcall DisableFog()

void __stdcall SetAlphaBlendMode(int alphablend,int alpharef)

void __stdcall SetBlendMode(int blend)

void __stdcall SetFrameBlendMode(int blend)

void __stdcall SetZBIAS(float z)

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

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

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

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

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

void __stdcall Setviewmatrix(float *b)

void __stdcall Setprojectionmatrix(float *b)

void __stdcall SetNormalizeNormals(bool normalizenormals)

bool __stdcall SetLightMap(int texture)

void __stdcall grCullMode(int mode)

void __stdcall grDepthBufferMode(int mode)

void __stdcall grDepthMask(bool mask)

void __stdcall grDepthBufferFunction(int _function)

Texts

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

bool __stdcall Draw3Dtext(LPD3DXMESH mesh,DWORD ambientcolor)

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

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

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

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

Stencil

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

void __stdcall InitDepthComplexity()

void __stdcall ShowDepthComplexity()

Capture

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

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

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

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

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

bool __stdcall AddFrameToAvi()

bool __stdcall AddWaveToAvi(void* wavebuffer,DWORD numbytes)

void __stdcall EndAvi()

HRESULT __stdcall InitDShowTextureRenderer()

void __stdcall CleanupDShow(void)

Textures

void __stdcall guTexMemReset()

int __stdcall textureload(char* name,int _type)

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

int __stdcall AddTextureToList(char* name,LPDIRECT3DTEXTURE8 texture)

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

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

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

bool __stdcall CopyScreencopyTexture(int texture)

void __stdcall SetCurrentTexture(int texture)

bool __stdcall SetCurrentTextureByRenderTarget()

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

void __stdcall SetDefaultrenderStates()

void __stdcall SetDefaultTexture(int texture)

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

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

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

Tests

bool __stdcall TestPointVisibility(vect3d v)

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

float __stdcall IntersectionOverMouse(int obj)

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

int __stdcall IntersectionWorlObjectOverMouse(worldobjstruct* worldobj)

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

void __stdcall ProjectPoint(vect3d* v)

void __stdcall TransformPoint(vect3d* v)

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

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

void __stdcall PixelTransform(vect3d* v)

void __stdcall PixelTransformByMouse(vect3d* v)

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

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

Lines

linearraystruct* __stdcall CreateLinearray(int maxpoints,int ttype)

bool __stdcall DeleteLinearray(linearraystruct* linearray)

void __stdcall ResetLineArray(linearraystruct* linearray)

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

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

void __stdcall SetLineRender(linearraystruct* linearray)

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

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

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

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

Shadow

bool __stdcall ResetRenderTargetSize(int sizex,int sizey)

bool __stdcall ResetMaxRenderTargetSize(int sizex,int sizey)

void __stdcall SetShadowColor(DWORD color)

bool __stdcall SWShadow()

int __stdcall SWShadowSizeFromObj(int obj)

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

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

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

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

bool __stdcall DrawShadow(shadowstruct* shadowobj)

bool __stdcall GlobalRenderShadow()

void __stdcall SwitchRenderPhase(int phase)

int __stdcall ShadowSizeFromObj(int obj)

helpers

int __stdcall GetHelperCount(int obj)

Thelperstruct __stdcall GetHelper(int obj,int index)

Dynamic buffer

void __stdcall SetDynamicBufferRender()

void __stdcall ResetDynamicVertexBuffer()

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

void __stdcall DrawDynamicPolys(int start,int count)

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

void __stdcall SetDynamicArrayRender(LPDIRECT3DVERTEXBUFFER8 dyn)

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

void __stdcall DrawPrimitiveUp(int count,void* data )

Dots

void __stdcall DrawDynamicDots(int start,int count)

void __stdcall PutDot(vect3d indot,DWORD color)

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

Layers

void __stdcall ResetLayerVertexBuffer()

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

void __stdcall DrawLayerPolys(int start,int count)

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

void __stdcall PutWorldObj(worldobjstruct* worldobj,int _type)

void __stdcall putminimenu()

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

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

void __stdcall ResizeMainWindow(int Xsize,int Ysize)

void __stdcall CloseDDDengine()

Display

void __stdcall PutFPS()

scene functions

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

input

bool __stdcall GetMouseLB()

bool __stdcall GetMouseLBdown()

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

bool __stdcall ClearMouseLBdown()

Matrix functions

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

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

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

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

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

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

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

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

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

Map

void __stdcall RenderMapLayer(maplayerstruct* maplayer)

void __stdcall RenderMapLayerSign(maplayerstruct* maplayer)

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

bool __stdcall DeleteMapLayer(maplayerstruct* maplayer)

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

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

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

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

void __stdcall PutMarker()

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

void __stdcall PutSprite(int textureid)

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

bool __stdcall InitMapLayer(maplayerstruct* maplayer)

Voxel

void __stdcall VoxelInit()

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

void __stdcall VoxelHlsSampling(voxelstruct *voxelinfo)

void __stdcall VoxelBlur()

bool __stdcall loadHeightMap(char* name)

bool __stdcall saveHeightMap(char* name)

void __stdcall RenderVoxel()

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

Input

bool __stdcall InitKeyBuff(HINSTANCE hInstance)

bool __stdcall RefreshKeyBuff()

Color

void __stdcall SWAPRGB(DWORD* color)

DWORD __stdcall PUTSWAPRGB(DWORD color)

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

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

Tools

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

int __stdcall CreateWaterSurface(DWORD color)

void __stdcall SetWaterMode(bool water)

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

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

void __stdcall InitSceneObject(worldobjstruct* wobj)

void __stdcall InitParticle(particlesstruct* particle)

void __stdcall InitLightObject(lightobjectstruct* particles)

void __stdcall InitConditionObject(conditionobjectstruct* condy)

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

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

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

void __stdcall AddConditionToObject(worldobjstruct* wobj)

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

void __stdcall CloseSceneObject(worldobjstruct* wobj,int lastsceneobj)

Particles

void __stdcall InitRenderParticles()

void __stdcall RenderParticles()

void __stdcall InitRenderEnvironment()

void __stdcall PutRain(int strong)

Collosion

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

Animations

void __stdcall PlayAnim(worldobjstruct* wobj,float speed)

void __stdcall StopAnim(worldobjstruct* wobj)

void __stdcall CreateSelfAnim(worldobjstruct* wobj)

Morphs

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

bool __stdcall UpdateMorph(int objtrg,int objsrc)

Nurbs, and Splines

void __stdcall SetNurb(int _alksrn,int _srn)

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

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

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

X86

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

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

void __stdcall PartRender()

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





























































































































<iframe id="CloseObj" src=