try it !
#include "DarkGDK.h"
#define M_PI 3.14159265358979323846
void DarkGDK ( void )
{
dbSyncOn ( );
dbSyncRate ( 60 );
::dbBackdropColor(::dbRgb(255, 255, 255)); // backdrop in white
::dbBackdropOn();
::dbSync();
// create the sprite and his image
::dbInk(::dbRgb(255, 0, 0), ::dbRgb(255, 0, 0));
::dbBox(0, 0, 50, 10);
::dbGetImage(1, 0, 0, 50, 10, 1);
::dbSprite(1, 50, 50, 1);
float a = 0.0f;
while ( LoopGDK ( ) )
{
dbRotateImage(1, (int) (180.0f*a / M_PI)); // doesn't work?
// update the sprite 1
dbSprite(1, 50, 50, 1);
// new angle
a += 0.05f; // in radians
// update the screen
dbSync ( );
}
return;
}
If there is an error in this code, tell me but on my screen there is just a rectangle which doesn't rotate.
Do you get the solution ? Please!