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 / GDK Transparency

Author
Message
ketchup mustard
16
Years of Service
User Offline
Joined: 31st Jan 2008
Location:
Posted: 10th Apr 2009 23:16
heya, I'm working on a program that displays an extensive animation. It might be a sprite or bitmap. However, I want the black (or blue) program-run screen to disappear only showing the animation. How?

Don't Clap, Just Throw Money!
stevebrit
15
Years of Service
User Offline
Joined: 6th Jan 2009
Location: Florida USA
Posted: 10th Apr 2009 23:43
not sure if this helps any but it will make image fade away

void fadeimage( void )
{
int count = 0;

for ( int count = 255; count >= 0; count -- )
{
dbSetSpriteAlpha( myimageidnumber, count );
dbSync( );
}
}

regards :- Steve

AMD Athlon64x2 3.1Ghz - Ram 4Gb DDR2 800Mhz - 500Gb HD
Ndivia 9600GT SLI - 24in LCD - WIN 7 - 64 bit BETA
ketchup mustard
16
Years of Service
User Offline
Joined: 31st Jan 2008
Location:
Posted: 10th Apr 2009 23:56
yo steve

I have seen your replies all over these boards. I think your doing a great job!

The code is not really fading my background away; as far as the black / blank program screen. I have not loaded an image yet for the imageId variable. Keep up the good work, steve

Don't Clap, Just Throw Money!
ketchup mustard
16
Years of Service
User Offline
Joined: 31st Jan 2008
Location:
Posted: 10th Apr 2009 23:57
Say, is the extra dbSync(); really necessary? I notice my program is running smoother though... Thanks lol

Don't Clap, Just Throw Money!
stevebrit
15
Years of Service
User Offline
Joined: 6th Jan 2009
Location: Florida USA
Posted: 11th Apr 2009 00:11
umm good question !!!! i guess cos it was in a loop i added that but may not be needed...

Thanks for your nice words my thinking is its cool if you can help out with some code cos we have all been there scratching our heads on how to do stuff so why not share code if its gonna make somones day ??? Lots of people helping on here so really thanks to
everyone.

I was not sure it would help out too much with getting rid of your background but hoped it may be of use to you, maybe give you ideas or something....

Regards :- Steve

AMD Athlon64x2 3.1Ghz - Ram 4Gb DDR2 800Mhz - 500Gb HD
Ndivia 9600GT SLI - 24in LCD - WIN 7 - 64 bit BETA
Murloc
15
Years of Service
User Offline
Joined: 28th Dec 2008
Location: Utena,Lithuania
Posted: 11th Apr 2009 09:54 Edited at: 11th Apr 2009 10:16
By the way Steve why are you initializing int count twice? It already initialises in for() loop

So it may look like:


And for you to know ketchup mustard dbSync(); acts as a screen refresher, something like dbCLS();

Edit: ohh I wrote different thing that you want xD
you may try:


Theory-When you know everything,but nothing works.
Practice-When everything works,but you don't know why.
Programming merges these two-Nothing works,and you don't know why.
stevebrit
15
Years of Service
User Offline
Joined: 6th Jan 2009
Location: Florida USA
Posted: 11th Apr 2009 11:54
Hi there Murloc, many thanks for your comments and your idea to make that function a bit more flexable.
Regarding initializing count twice i will tell you the reason.
A while back i read a book on c++ and it was mentioned in there to
do that. I think it said something like do not make assumptions about local variables in functions. So give them a value !!!
Thats how i ended up doing that well it may be totally wrong so thanks for the comment there.

Regards :- Steve

AMD Athlon64x2 3.1Ghz - Ram 4Gb DDR2 800Mhz - 500Gb HD
Ndivia 9600GT SLI - 24in LCD - WIN 7 - 64 bit BETA

Login to post a reply

Server time is: 2024-09-30 23:24:27
Your offset time is: 2024-09-30 23:24:27