Here, this was a vertex manipulation snippet that I made as an example for a friend that was for use in DBP, but it works in DBC ( but, for some reason DBC doesn't like it when I try to manipulate any other vertex other than number 2. Oh well. )
Sync On : Sync Rate 0
AutoCam Off
Position Camera -100,100,-100
Point Camera 0,0,0
Make Object Triangle 1,0,0,0,0,0,40,40,0,0
Make Mesh From Object 1,1
Make Memblock From Mesh 1,1
Do
If UpKey() = 1
_manipulate(1,1,1,2,0,1,0,0,2,0)
EndIf
If DownKey() = 1
_manipulate(1,1,1,2,0,1,0,0,-2,0)
EndIf
Yrotate Object 1,WrapValue(Object Angle Y(1) + 0.2)
Center Text Screen Width()/2,0,"Current Vertex = 2"
Text 0,0,Str$(Screen FPS())
Sync
Loop
End
Function _manipulate(obj,mesh,mem,vertex,newx,newy,newz,xrate,yrate,zrate)
`This will change the specified vertex's x, y & z co-ords depending upon:
`i. the value passed as the newx, newy & newz booleans; A one to change the position; A 0 to leave it
`ii. the value passed as the xrate, yrate & zrate floats; This value will be the current vertex position + xrate or yrate or zrate
`Changes the information in the memblock ( effectively changing the object when recreated )
If vertex < 4 And vertex > 0
`Changes the x value of the vertex.
If newx = 1 Then Write Memblock Float mem,(12 + (32 * (vertex - 1))) + 4,(Memblock Float(mem,(12 + (32 * (vertex - 1))) + 4) + xrate)
`Changes the y value of the vertex.
If newy = 1 Then Write Memblock Float mem,(12 + (32 * (vertex - 1))) + 4,(Memblock Float(mem,(12 + (32 * (vertex - 1))) + 4) + yrate)
`Changes the z value of the vertex.
If newz = 1 Then Write Memblock Float mem,(12 + (32 * (vertex - 1))) + 4,(Memblock Float(mem,(12 + (32 * (vertex - 1))) + 4) + zrate)
Else
`Simply an error message if you put in the wrong vertex number...
Set Text Size 20
Set Text To Bold
Cls
Center Text Screen Width()/2, Screen Height()/2, "Vertex " + Str$(vertex) + " not allowed"
Wait 500
Wait Key
ExitFunction
EndIf
`Makes the new object from the memblock
Change Mesh From Memblock mesh,mem
Change Mesh obj,0,mesh
Text 0,20,"Changed"
EndFunction
remstart
********** MEMBLOCK FORMAT ************
Make a Memblock of the right size (3 vertices, 32 bytes of data each)
make memblock 1,(polys*3*36)+12
Write FVF Header
write memblock dword 1,0,274
Write FVF Size
write memblock dword 1,4,32
Number of Vertices
write memblock dword 1,8,polys*3
Vertice Positions
write memblock float 1,12,x1#
write memblock float 1,16,y1#
write memblock float 1,20,z1#
Normals
write memblock float 1,24,0
write memblock float 1,28,0
write memblock float 1,32,-1.00
UV Coordinates
write memblock float 1,36,0.00
write memblock float 1,40,0.00
remend

Team EOD :: Programmer/Logical Engineer/All-Round Nice Guy