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 / Nuclear Glory and DarkGDK questions !!!

Author
Message
Hotline
15
Years of Service
User Offline
Joined: 22nd Aug 2008
Location:
Posted: 26th Jun 2010 06:00 Edited at: 26th Jun 2010 06:07
Hi all ! I started a new project just for testing the NGC dll in GDK , but after a while i have found some really confusing incompatible variable-type functions in both GDK and NGC. I hope someone can help me :

1 dbLoadDLL uses a DWORD as filename ? (well i have fixed this simply changing DWORD to char* as type in DarkSDKSystem.h and it seems now works fine)

2 dbGetMemblockPtr returns a DWORD instead of a pointer ?

after this i decided not using the GDK's dll functions so i started searching for a c++ solution.Finally i found a this code



Another confusing code ...
whats interesting in the code above is the last 2 typedefs :
Anywhere in the code where a function returns an object number ,returns a DWORD instead of an int as GDK uses int as object numbers... also some functions return DWORD instead of a float...

and the last typedef passes a structure to the dll (NGCPfl_VEC3)
but in the dbpro version (NGCollision.dba) it passes 3 floats as 3 different parameters...

Anyway i have implemented the whole NGC dll in a class CCollision
following exacly the NGCollision.dba functions and i can compile it without any errors
Which is again a littlebit confusing... the NGC function returns a DWORD as object number then i use this DWORD for dbObjectExist() where is an int expected instead of a DWORD , nevertheless the exe runs fine without any errors. ???

So i wrapped one of the NGC examples to test it , the exe runs fine but there's no collision detection at all.I`m pretty shure the problem is somewhere in this "DWORD or not DWORD" nonsense but i can`t find any good starting point anywhere to resolve this or find out the exact variable types returned by the NGC DLL functions .

If enyone have any experience with NGC in c++ and would be kind enough to help me (and others too) , please post here youre code/experience or idea .Any help appreciated .
Thanks in advance! Regards
Serial Velocity
15
Years of Service
User Offline
Joined: 24th Aug 2008
Location:
Posted: 26th Jun 2010 13:01
For dbGetMemblockPtr you could simply cast it to the correct pointer type, like for example if it is a string, do the following:



GDKUtilities, a utility library for DarkGDK, avaliable here

Login to post a reply

Server time is: 2024-07-04 10:18:57
Your offset time is: 2024-07-04 10:18:57