Helloes!
I've gotten further with messageboxes blitting, however I have gotten stuck again. ;/
This was done quickly so don't mind the little silly/stupid mistakes or too-much-extra work in it which could have done better or more effecient. :P
Here is the .cpp file;
http://pastie.textmate.org/private/4qtemnq8f4sybftjrcf4og
Here is the .h file;
(Its actually the text module, but I removed functions and things irrelevant to this topic. ;p
http://pastie.textmate.org/private/jffbf2tp6d1xb01rxcynew
The result is this:
http://i28.tinypic.com/2nv9gnt.jpg
(The exact same box as my old method, except far more optimized. Everything gets blit'd onto a surface, and that surface can be used anytime, so no more directly blitting onto the screen and re-calculating everything every frame. This one works VERY well, except there is something wrong with the transparency?
While the result should have been exactly this:
http://i30.tinypic.com/2i0zzux.jpg
(The look of this box works, but it uses my old method which blits directly onto the screen, and has to re-calculate and blit the whole image-sequence of the messagebox every frame, so uses far too much CPU)
Now, I am probably doing something wrong, Surfaces that have just been created I've noticed have a black background, so I set a black colorkey to make the surface transparrent, but it just doesn't work, it still gets a some kind of black background. ;/
All images except the background of the text are all transparrent, so it should have worked properly.
Any help, tips or explanations would be useful~
Thanks in advance everyone!
~Auriya
[Edited by - Auriya on February 22, 2008 7:28:48 PM]
------Future C.A.R.D. Game Technologies-----