Page 1 of 1

Posted: Sun Jun 23, 2002 4:35 pm
by BackupUser
Restored from previous forum. Originally posted by halo.

For the next version of Cartography Shop, I am moving all the geometry creation functions, modifiers, importers, and exporters into external .dll's. This allows users to add new primitives or modifiers at any time.

I don't have PB, but will be buying it in the next couple of days. I have the editor set up to accept mesh data via banks, and would like some help getting the first .dll set up. All it has to do is write some data to memory and return it to my program. Can anyone provide a basic template to do this?

The data would be something like this:
writebyte 2;version
writebyte 0;countmaterials
writeint 1;countgeometry
writestring "";name
writeint 6;subobjects
writeint 4;vertices
writefloat 1;vertexx
writefloat 1;vertexy
writefloat 1;vertex

..and so on.

More complex geometry would have controls for number of sides, etc., but a simple box just needs to return the mesh data.

Posted: Mon Jun 24, 2002 12:20 am
by BackupUser
Restored from previous forum. Originally posted by halo.

http://www.leadwerks.com/cshop/shots/shot03.jpg

Posted: Mon Jun 24, 2002 4:16 am
by BackupUser
Restored from previous forum. Originally posted by Danilo.

AllocateMemory(), FreeMemory() <<--- Memory Library
PokeB(), PokeW(), PokeL(), PokeF() <<--- Misc Library
PeekB(), PeekW(), PeekL(), PeekF()

For Files:
ReadByte(), ReadWord(), ReadLong(), ReadData()
WriteByte(), WriteWord(), WriteLong(), WriteData()


All Functions you need are there...

cya,
...Danilo

(registered PureBasic user)