Permalink
Browse files

Updated intro-graphics.

  • Loading branch information...
1 parent dce9e43 commit 286aeff638794957229b17d7e2f8400f190a3397 @DusteDdk committed Jul 28, 2012
View
@@ -129,14 +129,14 @@ void initCredits(SDL_Surface* screen)
listAddData(msgList, (void*)initMsg("Gfx","ViperMD", screen));
listAddData(msgList, (void*)initMsg("Music","Sean Hawk", screen));
+ listAddData(msgList, (void*)initMsg("Thx","Qubodup", screen));
listAddData(msgList, (void*)initMsg("Thx","Farox", screen));
listAddData(msgList, (void*)initMsg("Thx","bMan", screen));
listAddData(msgList, (void*)initMsg("Thx","KML", screen));
listAddData(msgList, (void*)initMsg("Thx","Neil L", screen));
listAddData(msgList, (void*)initMsg("Greetings","GP32X.com", screen));
listAddData(msgList, (void*)initMsg("Greetings","freegamedev.net", screen));
- listAddData(msgList, (void*)initMsg("Greetings","Qubodup", screen));
//Set current
currentMsgIndex=0;
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Binary file not shown.
View
@@ -31,6 +31,8 @@ void setWaving(wavingImage_t* wi, SDL_Surface* screen, SDL_Surface* img, int x,
wi->rotations=rots;
wi->amount=amount;
wi->speed=speed;
+
+ wi->jumpPos=0;
}
//void waveImg(SDL_Surface* screen, SDL_Surface* img, int xx, int yy, int rots, int amount, int speed)
@@ -52,6 +54,8 @@ void waveImg(wavingImage_t* wi)
if( wi->useOverlay )
{
wi->overlayPos += wi->overlaySpeed;
+ wi->jumpPos = wi->overlay->h/4 + cos(wi->privRotAmount/2)*wi->overlay->h/4;
+
}
for(x=0; x < wi->img->w; x++)
@@ -61,7 +65,6 @@ void waveImg(wavingImage_t* wi)
if(wi->useOverlay)
{
ox=(wi->overlayPos-x)%wi->overlay->w;
- if(ox < 0 ) { printf("Ox:%i\n",ox);}
}
for(y=0; y < wi->img->h; y++)
@@ -77,9 +80,11 @@ void waveImg(wavingImage_t* wi)
{
nx = x;
ny = y+yInc;
-
- if( wi->useOverlay && (freadPixel(wi->mask, x, y) == 0) )
- col = freadPixel(wi->overlay, ox, y);
+ //Cheap colorkey, basically, if the green component of the mask is = then we use the pixel.
+ if( wi->useOverlay && ( (freadPixel(wi->mask, x, y) & wi->mask->format->Gmask) >> wi->mask->format->Gshift == 0 ) )
+ {
+ col = freadPixel(wi->overlay, ox, wi->jumpPos+y);
+ }
plotPixel(wi->screen, nx+wi->x,ny+wi->y, col);
}
View
@@ -26,6 +26,7 @@ struct wavingImage_s
float privRotAmount; //Note: If this is not initialized properly it might be nan, in which case nothing will be shown.
int useOverlay, overlayPos, overlaySpeed;
+ int jumpPos;
SDL_Surface *overlay,*mask;
};
typedef struct wavingImage_s wavingImage_t;

0 comments on commit 286aeff

Please sign in to comment.