Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / How do you convert this to DGSDK???

Author
Message
roujesky
19
Years of Service
User Offline
Joined: 4th Jun 2004
Location:
Posted: 2nd Jan 2005 13:28
Well, as a little project, I am converting the viewer that comes with Darkmatter2 to C using DGSDK. I have made the first pass converting it but I have aslight sticking point. The problems center around the file system and arrays. First off, I am not good at DB, and I am a MFC guy. If I could use the MFC, I would be done.... Anyway I need to get the list of .x files from the directory and put the filenames into an array.
Does anyone have any c code to stuff the filenames in a directory into an array?

thanx
Azh321
20
Years of Service
User Offline
Joined: 28th Oct 2003
Location:
Posted: 2nd Jan 2005 14:13
First off...read the EULA, your not allowed to make anything but a game with DarkSDK! So, I doubt we can help you with that...
Second, that is some of the most basic C, go learn C and it will be easy! Just simple I/O

Hallo Weibchen
PearsoE
19
Years of Service
User Offline
Joined: 2nd Sep 2004
Location:
Posted: 2nd Jan 2005 14:48
Well yeah you could write something in pure C++ to read filenames and put them into an array but we're talking about using the Dark SDK here so why not use one of the built int functions like dbCheckListForFiles which loads filenames in to the built in Checklist automatically.
And I don't think his question necessarily violates the EULA if he were writing a viewer that was to possible be used in a game. Think of all the "viewers" that are used in games; text, image, 3D model, directory (eg. Load/Save your game).
roujesky
19
Years of Service
User Offline
Joined: 4th Jun 2004
Location:
Posted: 2nd Jan 2005 23:42
Thanx for the help. dbCheckListForFiles looks interesting, but it does not appear in the help file, or any examples I found. The include file just has:

void dbCheckListForFiles ( void );

Does anyone have a code snippet I can look at?

thanx
OSX Using Happy Dude
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 2nd Jan 2005 23:52
It would be much better to use Windows FindFirstFile & FindNextFile.

Visit http://homepages.nildram.co.uk/~nickk/
I have no signature.
PearsoE
19
Years of Service
User Offline
Joined: 2nd Sep 2004
Location:
Posted: 8th Jan 2005 03:38
Here's a snippet to read files in the current directory.

Login to post a reply

Server time is: 2024-04-19 17:57:28
Your offset time is: 2024-04-19 17:57:28