Thanks a lot for pointing the error.
I was too focus on the fact that my bitmap was equal to me screen, this lead me to the error I made.
Regards
working code below :
#include "DarkSDK.h"
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
int width = 800, height = 600 , depth = 32; // screen resolution
char * scrollingdatas = "Scrolling content scrolling content.....";
char * currentscrolldatas = (char *) malloc(41);
char index = 40;
char * temp;
void LoadFont(void) {
char *font = "Tahoma";
dbSetTextFont ( font );
int fontsize = 14;
dbSetTextSize ( fontsize );
}
void initscroll(void) {
strncpy( currentscrolldatas, scrollingdatas, 40);
temp = currentscrolldatas + index;
(*temp) = '\0';
dbCreateBitmap ( 5, 620, 16 );
dbText ( 0, 0, currentscrolldatas);
dbGetImage ( 5, 0, 0, 620, 16, 1); //last param mean no effect
}
void scrolling(void) {
dbSetCurrentBitmap(0);
dbText (112, 200, "This text is displayed why not the image content of the other?");
dbPasteImage ( 5, 112, 440, 0 );
}
void DarkSDK ( void )
{
dbSyncOn ( );
dbSyncRate ( 60 );
dbSetDisplayMode ( width, height, depth );
dbHideMouse ( );
LoadFont();
initscroll();
while ( LoopSDK ( ) )
{
if ( dbEscapeKey ( ) )
return;
dbCLS ();
scrolling();
dbSync ( );
}
free (currentscrolldatas); //if the esc key is pressed the mem is not released!!!
}
/kml