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 / Is there a dbDeleteObjectTerrain command - or similar?

Author
Message
ralthan
14
Years of Service
User Offline
Joined: 23rd Nov 2009
Location:
Posted: 1st Jan 2010 00:06
I am trying to convert a DBP project to GDK and have been doing ok up till now. The problem I have is that I am trying to implement code to handle ALT-TABs gracefully. this requires delete/reloading all objects. I was able to do this with my DBP project, but with GDK, I can't get the terrain code to work. I have code to delete all my objects and images, but it seems like the terrain code has some separate objects that are not deletable so that when I make a call to dbMakeObjectTerrain, my code crashes (even though I have created the new object to sent to this function. In DBP, we have a DESTROY TERRAIN command, but no corresponding dbDeleteObjectTerrain. from reading the header file, it looks like they rely on using the dbDeleteObject command, but this doesn't work for me (it deletes the object, but not the terrain).

Anyone else had such an issue?

Thanks,
Tony
marlou
15
Years of Service
User Offline
Joined: 17th Jan 2009
Location:
Posted: 1st Jan 2010 08:59 Edited at: 1st Jan 2010 08:59
Just add dbDeleteObjectTerrain in the header..

Add this.


The function is defined in the libs but not simply declared in the header. To be able to call it. Simply add the declaration to the header..

The same goes with..


You can also add undocumented functions as long as they are defined in the libs.

When a person has nothing but a dream, can he dare to dream.
ralthan
14
Years of Service
User Offline
Joined: 23rd Nov 2009
Location:
Posted: 1st Jan 2010 20:21
Thanks for the help.

I tried adding this reference to the DarkSDKTerrain.h file and got a linker error (I assume the return value is void).

Error 1 error LNK2019: unresolved external symbol "void __cdecl dbDeleteObjectTerrain(int)" (?dbDeleteObjectTerrain@@YAXH@Z) referenced in function "void __cdecl Cleanup(int)" (?Cleanup@@YAXH@Z) Utilities.obj

I tried including the header directly into my code.. no luck.

Why aren't issues like this fixed? Seems stupid that I have to go in and tweak the files with undocumented fixes.. What other undocumented functions are there? Are these defined anywhere?
Sorry if I seem perturbed, but I have spent the last two days trying to fix a bug in my code that is not my code!

Tony
marlou
15
Years of Service
User Offline
Joined: 17th Jan 2009
Location:
Posted: 4th Jan 2010 03:55 Edited at: 4th Jan 2010 03:56
sorry i messed up,it should be...


When a person has nothing but a dream, can he dare to dream.
Taoie
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 14th Jan 2010 06:05
it's not work for me.

Login to post a reply

Server time is: 2024-11-20 07:21:24
Your offset time is: 2024-11-20 07:21:24