Mercurial > hg > forks > pwpunix
changeset 81:475342949dcd
Kill some warnings and dead code.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 19 Feb 2013 00:38:22 +0200 |
parents | d2121ed6e67e |
children | 1013256040d5 |
files | oldchsool/main.c oldchsool/pwpdemo.h oldchsool/sprites.c |
diffstat | 3 files changed, 16 insertions(+), 24 deletions(-) [+] |
line wrap: on
line diff
--- a/oldchsool/main.c Tue Aug 14 06:17:39 2012 +0300 +++ b/oldchsool/main.c Tue Feb 19 00:38:22 2013 +0200 @@ -1,14 +1,4 @@ -#if 0 -# include <stdio.h> -# include <stdlib.h> -# include <string.h> -# include <unistd.h> -#endif - -#include "pwplib.h" - -#define MAX(a,b) ((a)<(b)?(b):(a)) -#define MIN(a,b) ((a)>(b)?(b):(a)) +#include "pwpdemo.h" struct {
--- a/oldchsool/pwpdemo.h Tue Aug 14 06:17:39 2012 +0300 +++ b/oldchsool/pwpdemo.h Tue Feb 19 00:38:22 2013 +0200 @@ -1,4 +1,8 @@ #include "pwplib.h" + +#ifndef PWPDEMO_H +#define PWPDEMO_H + #define USE_SINTAB #define MAX(a,b) ((a)>(b)?(a):(b)) @@ -15,3 +19,9 @@ #define COS(a) sintab16[((a)+64)&255] #endif +void initplayer(); + +void decompress_allbmp(); +void scroller_do(int t,int hg); + +#endif
--- a/oldchsool/sprites.c Tue Aug 14 06:17:39 2012 +0300 +++ b/oldchsool/sprites.c Tue Feb 19 00:38:22 2013 +0200 @@ -1,6 +1,3 @@ -#include <stdio.h> -#include <stdlib.h> - #include "pwpdemo.h" typedef struct @@ -11,14 +8,9 @@ }sprite; #include "sprites.h" - #include "font.h" -#define INLINE - /* to pwplib.h -- #define INLINE inline */ - -INLINE void zoomsprite_loop - (mask, pict, xzoom, d, xo0, xdim, ydim, spwidth, yzoom, yo0, col) +void zoomsprite_loop(mask, pict, xzoom, d, xo0, xdim, ydim, spwidth, yzoom, yo0, col) register u8* mask, *pict; register int xzoom, col; u8* d; @@ -40,7 +32,8 @@ { register int z=xo>>8; - *dd++ = (*dd & m[z]) | (p[z]&col); + *dd = (*dd & m[z]) | (p[z]&col); + dd++; xo += xzoom; } @@ -53,7 +46,7 @@ void zoomsprite(int x0,int y0,sprite*sp,int xzoom,int yzoom, int col) { int xdim,ydim, - xo0=0,yo0=0,x,y,ptr; + xo0=0,yo0=0; if(xzoom<=32 && yzoom<=32)return; @@ -585,8 +578,7 @@ { u8*d=pwplib_buf; int i,j,u,v; - int idu=du/pwplib_bufw,idv=dv/pwplib_bufw, - odu=dv/pwplib_bufh,odv=-du/pwplib_bufh; + int idu=du/pwplib_bufw,idv=dv/pwplib_bufw; for(i=pwplib_bufh;i;i--) {