View previous topic :: View next topic |
Author |
Message |
hpesoj DeleD PRO user
Joined: 16 Oct 2004 Posts: 184
|
Posted: Tue Apr 26, 2005 7:32 pm Post subject: DeleD Delphi Header 1.0 |
|
|
I made one. Hope it helps some people with their projects. I've tested on several maps, and it seems to work nicely. Here is the download link for the header, with example. If anyone finds anything wrong with it, please post here and I will correct whatever is wrong. Jeroen, if you want to upload it to your webspace I'd be much obliged . Plus, there seems to be an extra parameter just before the name of the lights, and I'm not sure what it is (can't find it in the help file). Does anyone know what it is?
http://www.prodigygames.co.uk/downloads/DelphiDeleDHeader.rar
Here is a sample of how it works.
Code: |
MyScene := TDMF_Scene.Create;
tmp := MyScene.Load('scene.dmf');
//Edit stuff here
MyScene.Name := 'Blah blah blah';
//.......
tmp := MyScene.Save('newscene.dmf'); |
|
|
Back to top |
|
|
Paul-Jan Site Admin
Joined: 08 Aug 2004 Posts: 3066 Location: Lage Zwaluwe
|
Posted: Tue Apr 26, 2005 7:43 pm Post subject: |
|
|
Quote: |
Does anyone know what it is? |
Oooooh, I do, I do I do! Now what did I win? ........ It's the light id. Your reader probably won't need it. |
|
Back to top |
|
|
hpesoj DeleD PRO user
Joined: 16 Oct 2004 Posts: 184
|
Posted: Tue Apr 26, 2005 7:54 pm Post subject: |
|
|
Ok, I've renamed it, may as well to prevent confusion . And it probably will need it if you're planning to use the save function . |
|
Back to top |
|
|
Jeroen Site Admin
Joined: 07 Aug 2004 Posts: 5332 Location: The Netherlands
|
Posted: Tue Apr 26, 2005 8:17 pm Post subject: |
|
|
Good job joseph! I'll check it out and will put it online somewhere this week. So if you have any updates to take care off, please do so before that time. |
|
Back to top |
|
|
hpesoj DeleD PRO user
Joined: 16 Oct 2004 Posts: 184
|
Posted: Tue Apr 26, 2005 8:47 pm Post subject: |
|
|
Well, I can't think of any updates I want to make soon, apart from maybe adding some more constants for the various types and modes. Can you tell me what values are used for these properties?
SnapMethod
ObjectType
And also, just out of curiosity, what are "Flash" and "GroupID" for lights and objects respectively. |
|
Back to top |
|
|
Jeroen Site Admin
Joined: 07 Aug 2004 Posts: 5332 Location: The Netherlands
|
Posted: Tue Apr 26, 2005 8:56 pm Post subject: |
|
|
hpesoj wrote: |
Well, I can't think of any updates I want to make soon, apart from maybe adding some more constants for the various types and modes. Can you tell me what values are used for these properties?
SnapMethod
ObjectType
And also, just out of curiosity, what are "Flash" and "GroupID" for lights and objects respectively. |
Snapmethod:
smNone=0
smVertices=1
smCenter=2
smLocation=3
Objecttype (starting with 0 and going up from there):
otRectangle,
otCube,
otPyramid,
otCylinder,
otPolyline,
otVertice,
otSphere,
otTorus,
otPlane,
otUserdefined,
otPrefab,
otUndefined,
otGrid,
otPointlight,
otDirectionalLight,
otSpotlight,
otPrimitive, // general primitive type
otLight, // general light type
otEllipse,
otText
Flash was introduced to represent the number of milliseconds between the light going on and off. Never really used though.
GroupID is used to group objects. Simply select a bunch of objects, group them and then save your scene and inspect that property in the file. You'll see what I mean. |
|
Back to top |
|
|
Paul-Jan Site Admin
Joined: 08 Aug 2004 Posts: 3066 Location: Lage Zwaluwe
|
Posted: Wed Apr 27, 2005 6:28 am Post subject: |
|
|
I think flash is still useful for end-user projects... which is what it was introduced for in the first place |
|
Back to top |
|
|
Jeroen Site Admin
Joined: 07 Aug 2004 Posts: 5332 Location: The Netherlands
|
Posted: Wed Apr 27, 2005 6:52 am Post subject: |
|
|
That is correct. Initially, flash was intended to be used with Delgine 3D engine (made by Jim Haga a few years ago). I just never took it out and it can still be used for whatever purpose you want. DeleD just won't do anything with that info itself. |
|
Back to top |
|
|
Mr.Fletcher DeleD PRO user
Joined: 07 Aug 2004 Posts: 1772 Location: Germany
|
Posted: Wed Apr 27, 2005 2:31 pm Post subject: |
|
|
Hi, what about a rendering method? And loading and applying textures? _________________ Behold! The DeleD Wiki! Please help us expanding it
DeleD on IRC |
|
Back to top |
|
|
hpesoj DeleD PRO user
Joined: 16 Oct 2004 Posts: 184
|
Posted: Wed Apr 27, 2005 3:47 pm Post subject: |
|
|
I think you're missing the point. This is merely a class used to manipulate the dmf files in Delphi. It takes the strings in the DMF file and converts it into a user friendly record structure, or vice-verca. If you want to render the scene, then make your own engine (or find an existing one) and use this unit to convert the DMF format into your internal formats. For me to make a full rendering engine would be far more work, and a completely different situation all together.
Anyway, I've added the constants, so I'm done with editing the file now. |
|
Back to top |
|
|
Mr.Fletcher DeleD PRO user
Joined: 07 Aug 2004 Posts: 1772 Location: Germany
|
Posted: Wed Apr 27, 2005 5:08 pm Post subject: |
|
|
Yeah, you're probably right.
Sorry, i was thinking of something different _________________ Behold! The DeleD Wiki! Please help us expanding it
DeleD on IRC |
|
Back to top |
|
|
Alloc Member
Joined: 08 Feb 2006 Posts: 1 Location: Germany
|
Posted: Wed Feb 08, 2006 9:57 pm Post subject: |
|
|
Hi joseph, just looked at your Delphi Header files and saw that the constants for the snapmethods are all set to be 0 instead of what jeroen said ... just as a note
But a that lib looks like a really good work to me, thanks
Regards, Alloc
Jeroen wrote: |
Snapmethod:
smNone=0
smVertices=1
smCenter=2
smLocation=3
|
|
|
Back to top |
|
|
hpesoj DeleD PRO user
Joined: 16 Oct 2004 Posts: 184
|
Posted: Thu Feb 16, 2006 11:04 pm Post subject: |
|
|
Ok, corrected. I'll send it to Jeroen. |
|
Back to top |
|
|
|