diff peluce/sprites.c @ 65:c6ecac58120a

Clean up some warnings.
author Matti Hamalainen <ccr@tnsp.org>
date Sat, 06 Aug 2011 10:41:57 +0300
parents acb5694e93d9
children
line wrap: on
line diff
--- a/peluce/sprites.c	Sat Aug 06 10:41:08 2011 +0300
+++ b/peluce/sprites.c	Sat Aug 06 10:41:57 2011 +0300
@@ -1,15 +1,5 @@
-#include <stdio.h>
-#include <stdlib.h>
-
 #include "pwpdemo.h"
 
-typedef struct
-{
-   int width,height;
-   u8*pict;
-   u8*mask;
-}sprite;
-
 #include "sprites.h"
 
 /*
@@ -69,7 +59,7 @@
 void zoomsprite(int x0,int y0,sprite*sp,int xzoom,int yzoom)
 {
    int xdim,ydim,
-       xo0=0,yo0=0,x,y,ptr;
+       xo0=0,yo0=0,x,y;
 
    if(xzoom<=32 && yzoom<=32)return;
    
@@ -111,15 +101,14 @@
    {
       int linebase=(yo0>>8)*sp->width;
       int xo=xo0;
-
-      {u8*dd=d;
+      u8*dd=d;
       for(x=xdim;x;x--)
       {
          int a=*dd,z=linebase+(xo>>8);
          *dd=(a&sp->mask[z])|sp->pict[z];
          xo+=xzoom;
          dd++;
-      }}
+      }
       yo0+=yzoom;
       d+=pwplib.videobuf.width;
    }}
@@ -137,9 +126,8 @@
 
 void metsae(int t,int mode)
 {
-   int i,x;
-
-  const sprite*mo[]={&kuusi};
+  int i;
+  sprite*mo[]={&kuusi};
   const int mosiz[]={128};
   const int mostep[]={64};
 
@@ -186,11 +174,13 @@
 
 void pelubounce(int t,int bouncemode)
 {
+/*
    const unsigned char bfunc[32]={
        32,32,32,36,38,40,42,44,50,60,61,62,62,63,63,63,
        63,63,63,62,61,60,50,40,32,33,34,35,34,33,32,32
    };
-   const sprite*poo[3]={&peluface0,&peluface1,&peluface2};
+*/
+   sprite*poo[3]={&peluface0,&peluface1,&peluface2};
    
    zoomsprite_gen(0,0,bouncemode?&sieni:poo[(t>>6)%3],40+((t-2560)&63));
 }