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.

Code Snippets / [DBP-reading DBO files-uses IanM's Matrix1Utils]

Bored of the Rings
Years of Service
User Offline
Joined: 25th Feb 2005
Location: Middle Earth
Posted: 3rd Oct 2018 12:18 Edited at: 9th Oct 2018 13:12
Here is example code on how my reWIP / enhanced DBO2X (and OBJ) app reads in DBO files and grabs the information needed to rebuild X/OBJ formats. Note: not all codes have been implemented here as it's still being tested / debugged thoroughly.
The idea is you grab an embedded DBO code and validate it. If it's a valid code then grab the data by advancing the pBuffer forward. The DBOPTR is the pointer to the DBO in memory. So you can use ALLOC, memblocks or banks. ALLOC memory is quite slow when having to read in the DBO data and "POKE" each byte to allocated memory. As far as I know there is no make memory from file, but I could be wrong (hmmm will double check just so I'm not going crazy).

NOTE: the code below is subject to change as I progress with the enhanced code.

The attached debug output was produced using the "hummer_dynamic" DBO found in the Desert Storm FPSC pack (pack 75 I believe).

This DBO contains multi-materials and textures and you actually have to write the code to generate the X format to handle multi mats / textures correctly.
My DBO2X (v1.4) can be found here if you want to try it --> OR here for direct download from my GMAIL account
Professional Programmer, languages: SAS, C++, SQL, PL-SQL, DBPro, Purebasic, JavaScript, others


Login to view attachments

Login to post a reply

Server time is: 2018-10-21 08:54:08
Your offset time is: 2018-10-21 08:54:08