Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Updated intro-graphics.

  • Loading branch information...
commit 286aeff638794957229b17d7e2f8400f190a3397 1 parent dce9e43
@DusteDdk authored
View
2  credits.c
@@ -129,6 +129,7 @@ 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));
@@ -136,7 +137,6 @@ void initCredits(SDL_Surface* 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
BIN  data/menu/intro.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  data/menu/intromask.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  data/menu/introoverlay.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  srcgfx/intro2.xcf
Binary file not shown
View
13 waveimg.c
@@ -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
1  waveimg.h
@@ -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;
Please sign in to comment.
Something went wrong with that request. Please try again.