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 / Problem Showing Sprites

Author
Message
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 4th Sep 2006 03:42
Problem with Sprites Showing when i uncomment these lines of code which just copies some bitmaps

//dbCreateBitmap(20,800,600);
//dbCreateBitmap(21,800,600);
//dbCopyBitmap(0,21);dbSync();
//dbLoadBitmap("Graphics/Credits.jpg",20);
//dbCopyBitmap(20,0);dbSync();
[/code}

In the Following Code function

void credits(void){
//freememory();dbSync();
dbSetCurrentBitmap(0);
//dbCreateBitmap(20,800,600);
//dbCreateBitmap(21,800,600);
//dbCopyBitmap(0,21);dbSync();
//dbLoadBitmap("Graphics/Credits.jpg",20);
//dbCopyBitmap(20,0);dbSync();
dbLoadImage("graphics/Logos.jpg",22,1);
dbLoadImage("graphics/Logos.jpg",23,1);
dbSprite(22,0,178,22);dbShowSprite(22);
dbSprite(23,799,178,23);dbShowSprite(23);
dbSetSpritePriority(22,0);
dbSetSpritePriority(23,0);
dbDrawSpritesLast();
dbWait(100);
while (dbMouseClick()!=1){
for (int t=799;t>0;t--){
dbSprite(22,t,178,22);
dbSprite(23,t-799,178,23);
if (dbMouseClick()==1){break;}
dbSync();
}
}
dbCopyBitmap(21,0);dbDeleteBitmap(20);dbSync();
dbHideSprite(20);dbHideSprite(21);dbDeleteBitmap(21);
dbDeleteBitmap(22);dbDeleteBitmap(23);
dbDeleteSprite(22);dbDeleteSprite(23);
blob_effect_setup();blob_effect_show();dbSync();
dbWait(100);
}

fubar
OSX Using Happy Dude
21
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 4th Sep 2006 18:09
Looks like you dont set the display back to the screen after using CreateBitmap

Come to the last Unofficial DBPro Convention - register interest by Saturday 2/9/06 (http://convention.logicstudios.net/)
Demoing at the last Chichester Convention : Humans On A Planet
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 5th Sep 2006 11:00
thanks didnt know i had to do that, i certainly didnt with dbpro but now it works because previous screen was done in 3d i had to make a plain object to display the bitmap background otherwise it flashed on and off.

The completed function is below


fubar

Login to post a reply

Server time is: 2024-11-19 08:33:49
Your offset time is: 2024-11-19 08:33:49