Re: [Super-tux-devel] LevelEditor Progress...
Brought to you by:
wkendrick
From: Ricardo C. <ri...@ae...> - 2004-05-09 01:19:16
|
Well, I've just tried my idea... and guess what... It worked :D It looks like we don't need the 300 lines afterall ;) I'll extend that support for the others draw_part() and alike functions. But it seems to have this problem; when an image has an alpha value betwee= n 0=20 and 255, the colorkey also gets with alpha in that pixel and therefore it=20 blits that pixel into the screen. Not sure how this will be solved, anyway= =20 this is really a small issue (at least for now...). Just one thing, regarding the level editor, I think that bad guys (and eve= n=20 Tux) should get semi-transparent when Foreground and Background is selected= =2E=20 It shouldn't be also possible to apply them then. Ricardo Cruz Em S=C3=A1bado, 8 de Maio de 2004 00:07, o Ricardo Cruz escreveu: > Anyway, it was working, couldn't we just port it again? > > AFAIK, you just need to create another surface, blit the surface you want > to blit into the screen into this one, apply alpha to the temp surf and > then just blit the temp surf into the screen. It is nothing from another > world :) I have made the current code, and I dunno why it isn't working... > > In case it is too slow, we can allways get rid of it... > > And this code that can be found at draw_bg, draw_part or draw_stretched: > if(alpha !=3D 255) > SDL_SetAlpha(sdl_surface ,SDL_SRCALPHA,alpha); > will make the surface to have that alpha forever. This code should be > removed. > > Ricardo Cruz > > Em S=C3=A1bado, 8 de Maio de 2004 00:03, o Tobias Gl=C3=A4=C3=9Fer escrev= eu: > > Am Sa, den 08.05.2004 schrieb Tobias Gl=C3=A4=C3=9Fer um 0:57: > > > Am Sa, den 08.05.2004 schrieb Ricardo Cruz um 0:03: > > > > Those are great news. > > > > There is only this issue that I think that should get priority: > > > > - the SDL frontend doesn't seem to support Alpha when blitting > > > > surfaces. i think this worked before... anyway, when looking at > > > > Background, for instance, the Foreground and Active stuff just > > > > dissapears... > > > > > > > > Ricardo Cruz > > > > > > Actually, as I stated in another mail, SDL software rendering isn't > > > able to do alpha on alpha surface blitting. :( > > > For the same reason the minimap is a OpenGL only feature, too. > > > > > > Greetz... > > > > > > Tobias Gl=C3=A4=C3=9Fer > > > > Before another one comes up with it now. Yes, you could write your > > own blitting method for this purpose. But on the on hand it's pretty > > tough to write it. (Or wouldn't the SDL folks provide it in their > > renderer, if it was easy to implement?) And on the other hand the > > resulting blitting method would be a very slow one. > > > > Can someone think of an alternative solution for the editor? > > > > Greetz... > > > > Tobias Gl=C3=A4=C3=9Fer =2D-=20 "Yo baby yo baby yo." =2D- Eddie Murphy |