This is a pretty half assed function but I made it in like 15 minutes. This will mirror the object across a certain axis and culls it b/c when the faces are mirrored the back of the plains will be facing out. There's a faster way to do it just by locking the vertex data I believe, but I didn't feel like venturing that far.
//////////////////////////////////////////////////////////////////
//Function Name: Mirror Object //
//////////////////////////////////////////////////////////////////
//Description: Mirrors an object across a specified axis //
//Variables: //
// ObjNum=Object number that is being mirrored //
// MeshNum=Mesh number that will transfer object data to a //
// memblock //
// OldMem=Memblock number that will hold the original object //
// data //
// NewMem=Memblock number that will hold the mirrored object //
// data //
// Stage=Which axis the object is being mirrored on (0 = X , //
// 1 = Y , and 2 = Z ) //
// ImgNum=Image number that original object was textured with //
//////////////////////////////////////////////////////////////////
Function MirrorObject( ObjNum as Integer , MeshNum as Integer , OldMem as Integer , NewMem as Integer , Stage as Integer , ImgNum as Integer )
// Initial Checks to Help Prevent the Function from Failing
// Exits the Function if the Object Already Exists
If Object Exist( ObjNum ) = 0 then ExitFunction "This Object does not exist"
// Exits the Function if the Mesh Already Exists
If Mesh Exist( MeshNum ) = 1 then ExitFunction "This Mesh ID is Already in Use"
// Exits the Function if the Memblock Already Exists
If Memblock Exist( OldMem ) = 1 then ExitFunction "This Memblock ID is Already in Use"
// Exits the Function if the Memblock Already Exists
If Memblock Exist( NewMem ) = 1 then ExitFunction "This Memblock ID is Already in Use"
// Makes a mesh from the original object
Make Mesh from Object MeshNum , ObjNum
// Deletes the original object
Delete Object ObjNum
// Creates the memblock to hold the data for the mirroring
Make Memblock from Mesh OldMem , MeshNum
// Deletes the mesh used to make the memblock
Delete Mesh MeshNum
// Holds the total memblock size
TMS = Get Memblock Size( OldMem )
// Holds the data per vertex
DpV = Memblock Dword( OldMem , 4 )
// Holds the number of vertice
NoV = Memblock Dword( OldMem , 8 )
// Create the Memblock
Make Memblock NewMem , TMS
// Copy all the data from the first memblock into the second
Copy Memblock OldMem , NewMem , 0 , 0 , TMS
// Start the for loop to go through and mirror all the vertices
For Vert = 0 to NoV - 1
// This checks if we are mirroring across the X axis and if so writes the new X Position of this Vertice
If Stage = 0 then Write Memblock Float NewMem , ( Vert * DpV ) + 12 , Memblock Float( OldMem , ( Vert * DpV ) + 12 ) * -1
// This checks if we are mirroring across the Y axis and if so writes the new Y Position of this Vertice
If Stage = 1 then Write Memblock Float NewMem , ( Vert * DpV ) + 16 , Memblock Float( OldMem , ( Vert * DpV ) + 16 ) * -1
// This checks if we are mirroring across the Z axis and if so writes the new Z Position of this Vertice
If Stage = 2 then Write Memblock Float NewMem , ( Vert * DpV ) + 20 , Memblock Float( OldMem , ( Vert * DpV ) + 20 ) * -1
Next Vert
// Delete the old memblock holding the original object information
Delete Memblock OldMem
// Create the Mesh that the Matrix will pull its data from
Make Mesh from Memblock MeshNum , NewMem
// Delete the new memblock holding the mirrored information now that a mesh has been made from it
Delete Memblock NewMem
// Create the Object from the Mesh
Make Object ObjNum , MeshNum , ImgNum
// Make sure the faces are culled b/c when the object is mirrored the backs of the faces will be facing out
Set Object Cull ObjNum , 0
// Delete the mesh used to create the object
Delete Mesh MeshNum
// Declare the End of the Function
EndFunction ""