navik6459 / darkbasicpro

Automatically exported from code.google.com/p/darkbasicpro
0 stars 0 forks source link

dbPlayObject and dbLoopObject do not work #5

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Load object
2. Use dbPlayObject or dbLoopObject
3.

What is the expected output? What do you see instead?
An object animating, no animation.

What version of the product are you using? On what operating system?
Latest SVN, Windows 7 32 bit

Please provide any additional information below.
This is a confirmed bug discovered by the DarkGDK board. While there is an 
alternate way of animating using dbSetObjectFrame, it would be so very much 
appreciated if this could be fixed. 

Original issue reported on code.google.com by techno1...@gmail.com on 8 Jun 2012 at 6:37

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Automatic object animation functionality was broken just prior to the 2010 
release of DarkGDK. You can search the source-code for this comment tag (U75 - 
080410) to see how and where it was broken. Basically a function 
UpdateAnimationCycle() needs to be called every time it syncs, but the call to 
it was overlooked with the changes.

To fix this:
1. Open DarkSDKBasic3D.h from the includes folder.
2. Add the prototype:

void UpdateAnimationCycle (void);

Do this if you're wanting to correct it in the source code:
3. Open DBDLLExtCalls.cpp.
4. Find the function: SetDBDLLExtCalls().
5. From there, search down for "UpdateAnimationCycle". You'll find it within a 
block of code that falls within #ifndef DARKSDK_COMPILE.
6. Go down to the next block of code after the #else, and just after the 
g_Basic3D_PassCoreData is set, add the following line:

g_Basic3D_UpdateAnimationCycle = (RetVoidFunctionPointerPFN) 
UpdateAnimationCycle;

Or do this if you're just doing this within a DarkGDK project, if you don't 
have the source code:
3. Add this in the main loop just before calling dbSync().

UpdateAnimationCycle();

That's it. Automatic object animations are reinstated.

Original comment by pcowe...@yahoo.com on 14 Dec 2013 at 9:45

GoogleCodeExporter commented 8 years ago
These are now fixed as of r108.

Original comment by pcowe...@yahoo.com on 30 Dec 2013 at 2:54