summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorblaise <blaise@macbook-ubuntu.(none)>2011-06-20 18:45:55 -0700
committerblaise <blaise@macbook-ubuntu.(none)>2011-06-20 18:45:55 -0700
commitb47e29de698bafd1447a7da1a17603d543a5f702 (patch)
tree78e1b78723ea9cf43583a3e49bc1e5732c825d38
parentc7a8ffe01cf955e53b87491e49b4e05cf0ebf496 (diff)
downloadnyancat-b47e29de698bafd1447a7da1a17603d543a5f702.tar.gz
nyancat-b47e29de698bafd1447a7da1a17603d543a5f702.tar.bz2
nyancat-b47e29de698bafd1447a7da1a17603d543a5f702.zip
Made frame04 the same width as the other frames, then changed the stretchimage function to make all the canvases have the format of the images rather than the screen
-rw-r--r--nyan.c3
-rw-r--r--res/frame04.pngbin1104 -> 1095 bytes
2 files changed, 1 insertions, 2 deletions
diff --git a/nyan.c b/nyan.c
index fc12d8f..d34dc2d 100644
--- a/nyan.c
+++ b/nyan.c
@@ -7,7 +7,6 @@
/* This program is licensed under the GPLv3 and in support of Free and Open Source */
/* Software in general. The full license can be found at http://www.gnu.org/licenses/gpl.html */
/* ============================================================================================ */
-
#include <SDL/SDL.h>
#include <SDL/SDL_image.h>
#include <SDL/SDL_mixer.h>
@@ -372,7 +371,7 @@ stretch_images(void) {
stretchto.w = screen->w - screen->w * .1;
stretchto.h = stretchto.w * cat_img[0]->h / cat_img[0]->w;
- SDL_PixelFormat fmt = *(screen->format);
+ SDL_PixelFormat fmt = *(cat_img[0]->format);
for(int i=0; i<=4; i++) {
stretch_cat[i] = SDL_CreateRGBSurface(SURF_TYPE,stretchto.w,stretchto.h,SCREEN_BPP,fmt.Rmask,fmt.Gmask,fmt.Bmask,fmt.Amask);
SDL_SoftStretch(cat_img[i],NULL,stretch_cat[i],NULL);
diff --git a/res/frame04.png b/res/frame04.png
index da14316..4385710 100644
--- a/res/frame04.png
+++ b/res/frame04.png
Binary files differ