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.

DarkBASIC Professional Discussion / LOAD OBJECT in DBPro vs. DB, detecting the DB version

Author
Message
EddieRay
23
Years of Service
User Offline
Joined: 28th Feb 2003
Location: USA
Posted: 7th Mar 2003 18:20
When I load an object into DBPro, the OBJECT SIZE X() is exactly half the size returned by DB (same goes for Y and Z). What is the reason for this?

Is there any way in DB and DBPro to tell which version of DB the program is running in?
EddieRay
23
Years of Service
User Offline
Joined: 28th Feb 2003
Location: USA
Posted: 7th Mar 2003 18:27
Here's a test program and some files:

http://udel.edu/~ed/db/objtest

test1.dba displays a matrix that is wireframed and is 2000 by 2000 centered at the origin. Each tile in the matrix is 100 by 100. The test object (10unitcube.x) is loaded and positioned at 0,0,0.

Key commands are:

UP/DOWN = move object along the world X axis
LEFT/RIGHT = move object along the world Z axis
SHIFT = increase object scale
CTRL = decrease object scale

Use the mouse to pan around the object.

Thanks,

Ed

EddieRay
23
Years of Service
User Offline
Joined: 28th Feb 2003
Location: USA
Posted: 7th Mar 2003 18:28
Another note: I'm comparing the results of this program using DBLite and DBPro demo.

Rob K
Retired Moderator
23
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 7th Mar 2003 21:56
Yes, it seems that DBC and DBPro 3D units are different, this often means that you will need to rescale 3D objects and so on.

Also, if you have scaled the object then OBJECT SIZE X only returns the ORIGINAL size (before scalling). This has been fixed in Patch 4.

Current Project: Retro Compo. Entry.
EddieRay
23
Years of Service
User Offline
Joined: 28th Feb 2003
Location: USA
Posted: 8th Mar 2003 03:28
Okay... well the units being different is the main problem.

I don't really have a problem with OBJECT SIZE returning the original size of the object (before scaling)... that's the way it works in DBC.

Rob K
Retired Moderator
23
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 8th Mar 2003 20:56
If you wanted to check which version of a program it had been compiled on then you could check for the DBP runtime DLLs in the temp folder.

Current Project: Retro Compo. Entry.
EddieRay
23
Years of Service
User Offline
Joined: 28th Feb 2003
Location: USA
Posted: 8th Mar 2003 23:29
Actually, I wanted to be able to call "GET DB VERSION()" or something that would return "0" (for DBLite or DB without the Enhancement Pack), "1" (for DBv1.13 Enhanced" or "2" (for DBPro)... then you could make decisions in the code and make a program that would compile and work on either DBC or DBPro... assuming you knew the differences and could code for the specific nuances of either one (like the LOAD OBJECT is half size in DBPro thing).

Just a thought...

IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 9th Mar 2003 00:10
There is a bug in DB Classic that doesn't exist in DBPro that you can use to work out which compiler you are using at runtime.

Everytime you use the POINT() function in DB Classic it forces a sync. Here's the code:

Login to post a reply

Server time is: 2026-07-11 08:46:53
Your offset time is: 2026-07-11 08:46:53