diff --git a/.gitignore b/.gitignore index bdac641..a7a8883 100644 --- a/.gitignore +++ b/.gitignore @@ -2,9 +2,9 @@ ################## *.exe -# Binary # -########## -/bin +# Linux Binary # +################ +Trololo # Windows scripts # ################### diff --git a/images/ttf/CaviarDreams.ttf b/bin/CaviarDreams.ttf similarity index 100% rename from images/ttf/CaviarDreams.ttf rename to bin/CaviarDreams.ttf diff --git a/images/characters.bmp b/bin/characters.bmp similarity index 100% rename from images/characters.bmp rename to bin/characters.bmp diff --git a/images/stage1.bmp b/bin/stage1.bmp similarity index 100% rename from images/stage1.bmp rename to bin/stage1.bmp diff --git a/commonSDL.h b/commonSDL.h deleted file mode 100644 index d5807dc..0000000 --- a/commonSDL.h +++ /dev/null @@ -1,104 +0,0 @@ -// SDL + Extensions -#include "SDL/SDL.h" -#include "SDL/SDL_image.h" -#include "SDL/SDL_ttf.h" - -// Standard -#include - -SDL_Surface *StartUp(const char *title, int x, int y) -{ - SDL_Surface *screen; - SDL_Surface *vid_init; - int init; - - init = SDL_Init(SDL_INIT_VIDEO); - - // SDL failed to initiate - if(init < 0) - { - fprintf(stderr, "Unable to initiate SDL: %s\n", SDL_GetError()); - return NULL; - } - - vid_init = SDL_SetVideoMode(x, y, 32, SDL_SWSURFACE); - - // Video failed to be set - if(vid_init == NULL) - { - fprintf(stderr, "Video initialization failed: %s", SDL_GetError()); - return NULL; - } - - screen = SDL_GetVideoSurface(); - - if(screen == NULL) - { - fprintf(stderr, "Failed to get video surface: %s", SDL_GetError()); - return NULL; - } - - SDL_WM_SetCaption(title, NULL); - - //Initialize SDL_ttf - if(TTF_Init() == -1) - { - fprintf(stderr, "True Type Font initialization failed: %s", SDL_GetError()); - return NULL; - } - - // Success: return video surface - return screen; -} - -// Optimize image on load to reduce processing. -SDL_Surface *load_image(const char *file) -{ - SDL_Surface *image_format; - SDL_Surface *screen_format; - - // Load image - image_format = IMG_Load(file); - - /* - DOES THE FILE EVEN EXIST? - */ - - if(image_format != NULL) - { - // Optimize - screen_format = SDL_DisplayFormat(image_format); - - // Release old image - SDL_FreeSurface(image_format); - } - - return screen_format; -} - -void apply_image(int x, int y, SDL_Surface* source, SDL_Surface* destination, SDL_Rect* clip = NULL) -{ - SDL_Rect pos; - - pos.x = x; - pos.y = y; - - SDL_BlitSurface(source, clip, destination, &pos); -} - -// Removes color from an image. -bool RemoveColor(SDL_Surface* image, Uint8 R, Uint8 G, Uint8 B) -{ - int result; - - // Map color on the image - Uint32 color = SDL_MapRGB(image->format, R, G, B); - - // Remove color from the image. - result = SDL_SetColorKey(image, SDL_SRCCOLORKEY, color); - - if(!result) - return true; - else - return false; -} \ No newline at end of file diff --git a/images/Originals/1-12645025581iOw.jpg b/images/Originals/1-12645025581iOw.jpg deleted file mode 100644 index c25515a..0000000 Binary files a/images/Originals/1-12645025581iOw.jpg and /dev/null differ diff --git a/images/Originals/200px-Trollface.svg.png b/images/Originals/200px-Trollface.svg.png deleted file mode 100644 index a28f703..0000000 Binary files a/images/Originals/200px-Trollface.svg.png and /dev/null differ diff --git a/images/Originals/animals-30828_640.png b/images/Originals/animals-30828_640.png deleted file mode 100644 index 6024888..0000000 Binary files a/images/Originals/animals-30828_640.png and /dev/null differ diff --git a/images/Reference.txt b/images/Reference.txt deleted file mode 100644 index cb4d886..0000000 --- a/images/Reference.txt +++ /dev/null @@ -1,3 +0,0 @@ -http://www.freestockphotos.biz/stockphoto/10674 -http://upload.wikimedia.org/wikipedia/en/thumb/7/78/Trollface.svg/200px-Trollface.svg.png -http://www.publicdomainpictures.net/view-image.php?image=5182&picture=pool-tiles-underwater \ No newline at end of file diff --git a/images/characters.psd b/images/characters.psd deleted file mode 100644 index 6a8b714..0000000 Binary files a/images/characters.psd and /dev/null differ