Okay, still some bugs, but everything builds again...

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%402629
This commit is contained in:
Sam Lantinga 2007-08-18 05:39:09 +00:00
parent 2e91636dda
commit cf548d0a6b
23 changed files with 604 additions and 676 deletions

View file

@ -253,7 +253,7 @@ void
MoveSprite(SDL_Surface * screen, SDL_Surface * light)
{
SDL_Rect updates[2];
int alpha;
Uint8 alpha;
/* Erase the sprite if it was visible */
if (sprite_visible) {
@ -290,10 +290,10 @@ MoveSprite(SDL_Surface * screen, SDL_Surface * light)
}
/* Update transparency (fade in and out) */
alpha = sprite->format->alpha;
if ((alpha + alpha_vel) < 0) {
SDL_GetSurfaceAlphaMod(sprite, &alpha);
if (((int) alpha + alpha_vel) < 0) {
alpha_vel = -alpha_vel;
} else if ((alpha + alpha_vel) > 255) {
} else if (((int) alpha + alpha_vel) > 255) {
alpha_vel = -alpha_vel;
}
SDL_SetAlpha(sprite, SDL_SRCALPHA, (Uint8) (alpha + alpha_vel));