This commit is contained in:
Rob Pearce 2006-11-06 09:16:19 +00:00
parent 5fecf15200
commit 1ca89f9f6d
11 changed files with 785 additions and 207 deletions

BIN
blank.bmp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 822 B

After

Width:  |  Height:  |  Size: 822 B

View File

@ -63,5 +63,46 @@ end
tile spikes
id 10
solid 0
spikes 1
file spikes.bmp
end
tile teleport
id 11
solid 0
file teleport.bmp
end
tile teleport2
id 12
solid 0
file teleport2.bmp
end
tile teleportdest
id 13
solid 0
file teleexit.bmp
end
tile water
id 14
solid 0
water 1
file water.bmp
end
tile watertop
id 15
water 1
solid 0
file watertop.bmp
end
tile waterspikes
id 16
water 1
solid 0
spikes 1
file waterspikes.bmp
end

View File

@ -2,33 +2,33 @@ tileset greentiles
bg 0
hurryup 30
endmaps
****************************************
*000000s00*0000000000000000000000000000*
*000000000*0000000000000000000000000000*
*000000000*0000000000000000000000000000*
*000000000*0000000000000000000000000000*
*000000000******************************
*000000000000000000000000000000s0000000*
*00000000000000000000000000000000000000*
*00000000000000000000000000000000000000*
*00000000000000000000000000000000000000*
*00000000000000000000000000000000000000*
*00000000000000000000000000000000000000*
*00000000000000000000000000000000000a00*
*00000000000000000000000000000000000000*
*0a000000000000000000000000000000000000*
*00000000000000000000000000000000000000*
*00000000000000000000000000000000000000*
*00000000000000000000000000000000000000*
*00000000000000000000000000000000000000*
*00000000000000000000000000000000000000*
*00000000000000000000a00000000000000000*
*00000000000000000000000000000000000000*
*00000000000000000000000000000000000000*
*00000000000000000000000000000000000000*
*00000000000000000000000000000000000000*
*00000000000000000000000000000000000000*
*00000000000000000000000000000000000000*
*00000000000000000000000000000000000000*
*10000000000a0000000000000000a000000000*
***000>>>>>000>>>>>>>>>>>>>>000<<<<<<00*
*00000000000000000000000000000000000000*
*00000000000000000000000000000000000000*
*00000000000000000000000000000000000000*
*^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*
*0.100000000000000000000000000000000r00*
****************000000000000000*********
*000000000000000000000000000000*0000000*
*000000000000000000000000000000*0r00000*
*000000000000000000000000000000*~~~~~~~*
*000000000000000000000000000000*0000000*
*000000000000000000000000000000*00000r0*
*0000000<<<<<<<<<<<<<<<<<<<<<<<*~~~~~~~*
*000000000000000000000000000000*0000000*
*000000000000000000000000000000*0000000*
*000000000000000000000000000000*00r0000*
*000000000000000000000000000000*~~~~~~~*
*000000000000000000000000000000*0000000*
*>>>>>>>>>>>>>>>>>>>>>>>>>00000*0000000*
*0000000000a0000000000000000000*000r000*
*000000000000000000000000000000*~~~~~~~*
*000000000000000000000000000000*0000000*
*0000a000000000000000000000^^^^*0000000*
*0;00000000000000000000000/*****0000000*
*0:0000000000000000000a00/******000r000*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

BIN
rc

Binary file not shown.

829
rc.c

File diff suppressed because it is too large Load Diff

33
rc.h
View File

@ -34,7 +34,7 @@
#define S_SOLID 1
#define S_SLOPE 2
#define MAXPTYPES 9
#define MAXPTYPES 14
#define P_PLAYER 0
#define P_RAT 1
#define P_CHEESE 2
@ -44,6 +44,11 @@
#define P_BEE 6
#define P_SPIDER 7
#define P_CLOUD 8
#define P_ICECREAM 9
#define P_CHIPS 10
#define P_BURGER 11
#define P_SNAKE 12
#define P_SPIT 13
#define F_WALK1 0
#define F_JUMP 1
@ -67,6 +72,12 @@
#define T_RIGHT 8
#define T_LEFT 9
#define T_SPIKES 10
#define T_TELEPORT 11
#define T_TELEPORT2 12
#define T_TELEPORTDEST 13
#define T_WATER 14
#define T_WATERTOP 15
#define T_WATERSPIKES 16
@ -80,6 +91,8 @@ typedef struct tiletype_s {
char name[SMALLBUFLEN];
int lowness[TILEW];
int solid;
int water;
int spikes;
SDL_Surface *img;
struct tiletype_s *next;
struct tiletype_s *prev;
@ -132,8 +145,12 @@ typedef struct sprite_s {
int jumping;
int jumpdir;
int willbecome;
int angry;
int teleporting;
int dead;
int invuln;
int bounces;
@ -157,6 +174,7 @@ typedef struct sprite_s {
int netystart;
int timer;
int jumptimer;
int moved;
@ -164,6 +182,10 @@ typedef struct sprite_s {
double xs,ys;
struct sprite_s *bullet;
struct sprite_s *owner;
double x,y;
int dir;
SDL_Surface *img;
@ -174,7 +196,7 @@ typedef struct sprite_s {
} sprite_t;
typedef struct imageset_s {
SDL_Surface *img[MAXFRAMES*2];
SDL_Surface *img[MAXFRAMES*4];
int numimages;
} imageset_t;
imageset_t imageset[MAXPTYPES];
@ -188,7 +210,7 @@ void movetext(void);
void killtext(text_t *t);
void removeall(void);
void removetext(void);
int addsprite(int id,int x, int y, char *name);
sprite_t *addsprite(int id,int x, int y, char *name);
int loadtiletypes(char *filename);
tiletype_t *gettileat(int pixx,int pixy, int *tilex, int *tiley);
int loadlevel(int lnum);
@ -204,6 +226,8 @@ void dogravity(sprite_t *s);
void dotileeffects(sprite_t *s);
int movex(sprite_t *s,double amt);
void movesprite(sprite_t *s);
int isinwater(sprite_t *s);
int isroofabove(sprite_t *s);
int isonground(sprite_t *s);
int isongroundpoint(sprite_t *s, int x, int y);
int isonladder(sprite_t *s);
@ -211,6 +235,7 @@ int isladderabove(sprite_t *s);
int isfruit(int id);
int dofruiteffect(sprite_t *s);
int ismonster(int id);
int isbullet(int id);
void killsprite(sprite_t *s);
void checkcollide(sprite_t *s);
void die(sprite_t *s);
@ -223,5 +248,7 @@ void tick(void);
inline void drawpixel16(SDL_Surface *screen, int x, int y, SDL_Color c);
inline void drawpixel32(SDL_Surface *screen, int x, int y, SDL_Color c);
inline void drawbox16(SDL_Surface *screen, int x1,int y1,int x2,int y2,SDL_Color *c,SDL_Color *fc);
void drawline16(SDL_Surface *screen, int x1, int y1, int x2, int y2, SDL_Color c);
int getcolor(SDL_Surface *dest, int x, int y, SDL_Color *col);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -1,37 +0,0 @@
initial checkin
--This line, and those below, will be ignored--
AM full.bmp
AM sky.bmp
A emptylevel
AM slopedown.bmp
AM right.bmp
AM laddertop.bmp
A level1.dat
AM blank.bmp
AM pdwarf.png
A Makefile.windows
AM pjump.bmp
AM ladder.bmp
AM player.bmp
AM cheese.bmp
AM pfall.bmp
A Makefile
A level.dat
AM ratdead.bmp
AM dwarf.jpg
A rc.c
A rc.h
AM land.bmp
AM ratcaught.bmp
A greentiles
AM pdwarfjump.png
AM rat.bmp
AM oldblank.bmp
A tiles.conf
AM slopeup.bmp
AM pdwarffall.png
A testlevel
AM left.bmp
AM spikes.bmp
A Makefile.posix