- Redrew black cloud of doom and changed code slightly
- Moved editor font to data area - Added code to create .app - Mouse cursor now hidden - Removed unused files
This commit is contained in:
parent
1050dcd0b0
commit
99dd423a7b
13
Makefile
13
Makefile
|
@ -8,13 +8,10 @@ rc: rc.c shared.c rc.h shared.h globals.h defs.h
|
||||||
edit: edit.c shared.c edit.h shared.h globals.h defs.h
|
edit: edit.c shared.c edit.h shared.h globals.h defs.h
|
||||||
gcc -D__EDITOR -Wall -o edit -g edit.c shared.c `sdl-config --cflags --libs` -I/usr/local/include -L/usr/local/lib -lSDLmain -lSDL -lSDL_image -lSDL_gfx -lSDL_ttf
|
gcc -D__EDITOR -Wall -o edit -g edit.c shared.c `sdl-config --cflags --libs` -I/usr/local/include -L/usr/local/lib -lSDLmain -lSDL -lSDL_image -lSDL_gfx -lSDL_ttf
|
||||||
|
|
||||||
rc.app: rc
|
app: rc
|
||||||
if [ `uname -s` != "Darwin" ]; then echo "Mac .app bundle generation is only available under OSX."; exit 1; fi;
|
if [ `uname -s` != "Darwin" ]; then echo "Mac .app bundle generation is only available under OSX."; exit 1; fi;
|
||||||
if [ -d RatCatcher.app ]; then rm -fr RatCatcher.app ; fi
|
if [ -d RatCatcher.app ]; then rm -fr RatCatcher.app ; fi
|
||||||
mkdir data
|
platypus -a rc -t shell -o None -u "Rob Pearce" -f data -f rc -f data run.sh RatCatcher.app
|
||||||
cp -R gfx/*.png gfx/*.ttf gfx/*.wav data
|
seticon -d icon.icns RatCatcher.app
|
||||||
cp -R world1 sounds sprites newtiles music *.ttf data
|
dylibbundler -od -b -x ./RatCatcher.app/Contents/Resources/rc -d ./RatCatcher.app/Contents/libs/ -p @executable_path/../libs/
|
||||||
platypus -a rc -t shell -o TextWindow -i icon.icns -u "Rob Pearce" -f data -f rc -f gamefont.ttf -f data -f green.tiles -f levels.dat run.sh RatCatcher.app
|
|
||||||
cp icon.icns mille.app/Contents/Resources/appIcon.icns
|
|
||||||
rm -rf data
|
|
||||||
dylibbundler -l -x ./mille.app/Contents/Resources/client -d ./mille.app/Contents/libs/ -cd -od
|
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 47 KiB |
14
defs.h
14
defs.h
|
@ -105,6 +105,10 @@
|
||||||
#define BELLTIME 20 // how long the bell flash lasts
|
#define BELLTIME 20 // how long the bell flash lasts
|
||||||
#define CLOCKTIME 10 // how many seconds a clock lasts
|
#define CLOCKTIME 10 // how many seconds a clock lasts
|
||||||
|
|
||||||
|
// blackcloud
|
||||||
|
#define CLOUDGROWSPEED 25 // lower is faster
|
||||||
|
#define CLOUDGROWAMT 0.01 // lower is faster
|
||||||
|
|
||||||
|
|
||||||
// king rat
|
// king rat
|
||||||
#define KR_WALKTIME 100
|
#define KR_WALKTIME 100
|
||||||
|
@ -423,9 +427,9 @@ typedef struct text_s {
|
||||||
typedef struct level_s {
|
typedef struct level_s {
|
||||||
int id;
|
int id;
|
||||||
int bgtileid;
|
int bgtileid;
|
||||||
char bgfile[MIDBUFLEN];
|
char bgfile[BUFLEN];
|
||||||
char name[MIDBUFLEN];
|
char name[BUFLEN];
|
||||||
char filename[MIDBUFLEN];
|
char filename[BUFLEN];
|
||||||
int map[LEVELW*LEVELH];
|
int map[LEVELW*LEVELH];
|
||||||
int map2[LEVELW*LEVELH]; // second map layer
|
int map2[LEVELW*LEVELH]; // second map layer
|
||||||
int tileframe[LEVELW*LEVELH]; // tracks frame numbers for tiles
|
int tileframe[LEVELW*LEVELH]; // tracks frame numbers for tiles
|
||||||
|
@ -515,10 +519,12 @@ typedef struct sprite_s {
|
||||||
char name[MIDBUFLEN]; // Help text for help icons, otherwise not really used outside of debugging
|
char name[MIDBUFLEN]; // Help text for help icons, otherwise not really used outside of debugging
|
||||||
|
|
||||||
// pinkcloud only
|
// pinkcloud only
|
||||||
double size;
|
|
||||||
double rotated;
|
double rotated;
|
||||||
double angle;
|
double angle;
|
||||||
|
|
||||||
|
// pink/black cloud only
|
||||||
|
double size;
|
||||||
|
|
||||||
// player and monster
|
// player and monster
|
||||||
int lives; // only for player and bosses
|
int lives; // only for player and bosses
|
||||||
int swimming; // are we in the water?
|
int swimming; // are we in the water?
|
||||||
|
|
20
edit.c
20
edit.c
|
@ -70,12 +70,21 @@ int main (int argc, char **argv) {
|
||||||
|
|
||||||
setfruitinfo();
|
setfruitinfo();
|
||||||
|
|
||||||
|
datadir = NULL;
|
||||||
|
|
||||||
/* handle arguments */
|
/* handle arguments */
|
||||||
if (argc >= 2) {
|
if (argc >= 2) {
|
||||||
for (i = 1; i < argc; i++) {
|
for (i = 1; i < argc; i++) {
|
||||||
if (!strcmp(argv[i], "-fs")) {
|
if (!strcmp(argv[i], "-fs")) {
|
||||||
printf("Fullscreen mode enabled.\n");
|
printf("Fullscreen mode enabled.\n");
|
||||||
vidargs |= SDL_FULLSCREEN;
|
vidargs |= SDL_FULLSCREEN;
|
||||||
|
} else if (!strcmp(argv[i], "-d")) {
|
||||||
|
if (++i >= argc) {
|
||||||
|
printf("Missing data dir.\n");
|
||||||
|
usage();
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
|
datadir = strdup(argv[i]);
|
||||||
} else if (!strcmp(argv[i], "-dump")) {
|
} else if (!strcmp(argv[i], "-dump")) {
|
||||||
dumpinfo();
|
dumpinfo();
|
||||||
exit(1);
|
exit(1);
|
||||||
|
@ -94,6 +103,11 @@ int main (int argc, char **argv) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (datadir == NULL) {
|
||||||
|
datadir = strdup("data");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (loadlevellist()) {
|
if (loadlevellist()) {
|
||||||
printf("Error loading level list from levels.dat.\n");
|
printf("Error loading level list from levels.dat.\n");
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -147,7 +161,9 @@ int main (int argc, char **argv) {
|
||||||
fakeblock.lowness[i] = 0;
|
fakeblock.lowness[i] = 0;
|
||||||
}
|
}
|
||||||
fakeblock.solid = S_SOLID;
|
fakeblock.solid = S_SOLID;
|
||||||
fakeblock.img[0] = IMG_Load("newtiles/land.png");
|
|
||||||
|
sprintf(filename, "%s/newtiles/land.png",datadir);
|
||||||
|
fakeblock.img[0] = IMG_Load(filename);
|
||||||
fakeblock.numframes = 1;
|
fakeblock.numframes = 1;
|
||||||
fakeblock.next = NULL;
|
fakeblock.next = NULL;
|
||||||
fakeblock.prev = NULL;
|
fakeblock.prev = NULL;
|
||||||
|
@ -165,7 +181,7 @@ int main (int argc, char **argv) {
|
||||||
|
|
||||||
/* load fonts */
|
/* load fonts */
|
||||||
TTF_Init();
|
TTF_Init();
|
||||||
sprintf(filename, "editfont.ttf");
|
sprintf(filename, "%s/editfont.ttf",datadir);
|
||||||
for (i = 1; i < MAXLETTERHEIGHT; i++) {
|
for (i = 1; i < MAXLETTERHEIGHT; i++) {
|
||||||
font[i] = TTF_OpenFont(filename,i);
|
font[i] = TTF_OpenFont(filename,i);
|
||||||
if (!font[i]) {
|
if (!font[i]) {
|
||||||
|
|
34
level.dat
34
level.dat
|
@ -1,34 +0,0 @@
|
||||||
tileset greentiles
|
|
||||||
bg 0
|
|
||||||
hurryup 30
|
|
||||||
endmaps
|
|
||||||
~~00000000000000000000000000000000000000
|
|
||||||
~~00000000000000000000000000000000000000
|
|
||||||
~~00000000000000000000000000000000000000
|
|
||||||
~~00000000000000000000000000000000000000
|
|
||||||
~~00000000000000000000000000000000000000
|
|
||||||
~~00000000000000000000000000000000000000
|
|
||||||
~~00000000000000000000000000000000000000
|
|
||||||
~~00000000000000000000000000000000000000
|
|
||||||
~~00000000000000000000000000000000000000
|
|
||||||
~~00000000000000000000000000000000000000
|
|
||||||
~~00000000000000000000000000000000000000
|
|
||||||
~~00000000000000000000000000000000000000
|
|
||||||
~~00000000000000000000000000000000000000
|
|
||||||
~~00000000000000000000000000000000000000
|
|
||||||
~~00000000~0000000000~000000000000000000
|
|
||||||
~~00000000~0000000000~000000000000000000
|
|
||||||
~~00000000~0000000000~000000000000000000
|
|
||||||
~~00000000~~~~~~~~~~~~000000000000000000
|
|
||||||
~~000000000000000*\000000000000000000000
|
|
||||||
~~0000000000000000*\00000000000000000000
|
|
||||||
~~00000000000000000*\0000000000000000000
|
|
||||||
~~000000~~~~00000000*~~~~~~~~~~~~0000000
|
|
||||||
~~00000000000000000000000000000000000000
|
|
||||||
~~00000000000000000000000000000000000000
|
|
||||||
~~00000000000000000000000000~00000000000
|
|
||||||
~~0000~~~~000000000000/~~\00*00000000000
|
|
||||||
~~0000000000000000000/****~~*00000000000
|
|
||||||
~~000000000000000000/********\0000000000
|
|
||||||
~~000000000000000/~~**********\000000000
|
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
35
level1.dat
35
level1.dat
|
@ -1,35 +0,0 @@
|
||||||
tileset greentiles
|
|
||||||
bg 0
|
|
||||||
hurryup 30
|
|
||||||
z,10
|
|
||||||
endmaps
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*0000000000000000000000000r000000000000*
|
|
||||||
*000000000000000~~~~~~~~~~~~~0000000000*
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*00001000000000000000000000000000000000*
|
|
||||||
*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*
|
|
||||||
****************************************
|
|
||||||
****************************************
|
|
||||||
****************************************
|
|
||||||
****************************************
|
|
||||||
****************************************
|
|
||||||
****************************************
|
|
||||||
****************************************
|
|
||||||
****************************************
|
|
||||||
****************************************
|
|
34
level2.dat
34
level2.dat
|
@ -1,34 +0,0 @@
|
||||||
tileset greentiles
|
|
||||||
bg 0
|
|
||||||
hurryup 30
|
|
||||||
endmaps
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*0000r0000000000000000000000000000r0000*
|
|
||||||
*~~~~~~~~~~000000000000000000~~~~~~~~~~*
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*00000000000r00000000000000r00000000000*
|
|
||||||
*0000000~~~~~~~~~~0000~~~~~~~~~~0000000*
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*00000000000000~~~~~~~~~~00000000000000*
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*000000000000r0000000000000r00000000000*
|
|
||||||
*0000000~~~~~~~~~~0000~~~~~~~~~~0000000*
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*~~~~~~~~~~000000000000000000~~~~~~~~~~*
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*00010000000000000000000000000000000000*
|
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
34
level3.dat
34
level3.dat
|
@ -1,34 +0,0 @@
|
||||||
tileset greentiles
|
|
||||||
bg 0
|
|
||||||
hurryup 30
|
|
||||||
endmaps
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*000000000r0000000000000000000000000000*
|
|
||||||
*000000~~~~~~~~~~~~**000000000000000000*
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*00000000000000001000000000000000000000*
|
|
||||||
*000000000000~~~~~~~~~~~~~~~00000000000*
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*0000000000r000000000000000000000r00000*
|
|
||||||
*000~~~~~~~~~~~~~~0000~~~~~0000~~~~~000*
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*000000000000000000000000r0000000000000*
|
|
||||||
*000~~~~~0000~~~~~0000~~~~~~~~~~~~~~000*
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*00000000000r00000000000000000000000000*
|
|
||||||
*000~~~~~~~~~~~~~~0000~~~~~0000~~~~~000*
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*000000000000000000000000r0000000000000*
|
|
||||||
*000~~~~~0000~~~~~0000~~~~~~~~~~~~~~000*
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
34
level4.dat
34
level4.dat
|
@ -1,34 +0,0 @@
|
||||||
tileset greentiles
|
|
||||||
bg 0
|
|
||||||
hurryup 30
|
|
||||||
endmaps
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*000000000r0000000000000000000000000000*
|
|
||||||
*000000~~~~~~~~~~~~**000000000000000000*
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*0000000000000000000000r000000000000000*
|
|
||||||
*000000000000~~~~~~~~~~~~~~~00000000000*
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*00000000000000/~~~~~~~~~\0000000000000*
|
|
||||||
*0000000000000/***********\000000000000*
|
|
||||||
*000000000000/**000000000**\00000000000*
|
|
||||||
*00000000000/***0000000r0***\0000000000*
|
|
||||||
*000~~~~~~~~~~~~~~0000~~~~~~~~~~~~~~000*
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*00000000000r000000000000000r0000000000*
|
|
||||||
*000000000~~~~0000000000000~~~~00000000*
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*000000000000000000000000r0000000000000*
|
|
||||||
*000~~~~~0000~~~~~0000~~~~~~~~~~~~~~000*
|
|
||||||
*0000000000000000*0000*0000000000000000*
|
|
||||||
*0000000000000000*0000*0000000000000000*
|
|
||||||
*0010000000000000*^^^^*0000000r00000000*
|
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
34
level5.dat
34
level5.dat
|
@ -1,34 +0,0 @@
|
||||||
tileset greentiles
|
|
||||||
bg 0
|
|
||||||
hurryup 30
|
|
||||||
endmaps
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*0000000000000000000000*000000000000000*
|
|
||||||
*0000000000000000000000*000000000000000*
|
|
||||||
*0000000000000000000000*000000000000000*
|
|
||||||
*0000000000000000000000*000r00000r00000*
|
|
||||||
*0000000000000000000000*~~~~~~~~~~~~~~-*
|
|
||||||
*0000000000000000000000000000000000000=*
|
|
||||||
*0000000000000000000000000000000000000=*
|
|
||||||
*0000000000000000000000000000000000000=*
|
|
||||||
*1000000000000000000000000000000000000=*
|
|
||||||
*~0000000000000000r0000000000000000000=*
|
|
||||||
*00000000000000~~~~~~~~~~0000000000000=*
|
|
||||||
*0000000000000000000000000000000000000=*
|
|
||||||
*>>>00000000000000000000000000000000<<~*
|
|
||||||
****>0000000000000000r0000000000000<000*
|
|
||||||
*****>000000000~~~~~~~~~~000000000<0000*
|
|
||||||
******>>>0000000000000000000000<<<00000*
|
|
||||||
*********>>>0000000000000000<<<00000000*
|
|
||||||
************>>>>00000000<<<<00000000000*
|
|
||||||
****************00000000*00000000000000*
|
|
||||||
****************00000000*00000000000000*
|
|
||||||
****************000**000*00000000000000*
|
|
||||||
****************00000000*00000000000000*
|
|
||||||
****************^^^^^^^^*00000000000000*
|
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
34
level6.dat
34
level6.dat
|
@ -1,34 +0,0 @@
|
||||||
tileset greentiles
|
|
||||||
bg 0
|
|
||||||
hurryup 30
|
|
||||||
endmaps
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*00000000000000000000a00000000000000000*
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*000000r0000000000000000000000000000000*
|
|
||||||
*0~~-~~~~~00000000000000000000000000000*
|
|
||||||
*000=0000000000000000000000000000000000*
|
|
||||||
*000=0000000000~~~~~~000000000000000000*
|
|
||||||
*000=0000000000000000000000000000000000*
|
|
||||||
*000=000000000000000000000000000r000000*
|
|
||||||
*000=0000000000000000000000000~~~~~-~~~*
|
|
||||||
*000=000000000000000000000000000000=000*
|
|
||||||
*000=000000000000000000000000000000=000*
|
|
||||||
*000=000000000000000000000000000000=000*
|
|
||||||
*000=000000000000r^^000000000000000=000*
|
|
||||||
*000=00000~~~~~-~~~~~00000000000000=000*
|
|
||||||
*000=0000000000=0000000000000000000=000*
|
|
||||||
*000=0000000000=0000000000000000000=000*
|
|
||||||
*000=0000000000=000000000000r000000=000*
|
|
||||||
*000=0000000000=0000000~~~-~~~~0000=000*
|
|
||||||
*000=0000000000=0000000000=00000000=000*
|
|
||||||
*000=0000000000=0000000000=00000000=000*
|
|
||||||
*000=0000000000=0000000000=00000000=000*
|
|
||||||
*000=0000000000=0000000000=00000000=000*
|
|
||||||
*010=0000000000=0000000000=00000000=000*
|
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
34
level7.dat
34
level7.dat
|
@ -1,34 +0,0 @@
|
||||||
tileset greentiles
|
|
||||||
bg 0
|
|
||||||
hurryup 30
|
|
||||||
endmaps
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*000000000000000000a0000000000000000000*
|
|
||||||
*000000a0000000000000000000000000000000*
|
|
||||||
*00000000000000000000000000r00000000000*
|
|
||||||
***********000*******************000000*
|
|
||||||
*000000000s000000000000s000000000000000*
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*0000000000000000000000000000000000~~~~*
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*000000000000000000r0000000000000000000*
|
|
||||||
**-********000*******************000000*
|
|
||||||
*0=0s000*000000*0000s00*0000s00*0000000*
|
|
||||||
*0=000000000000000000000000000000000000*
|
|
||||||
*0=000000000000000000000000000000000000*
|
|
||||||
*0=000000000000000000000000000000000000*
|
|
||||||
*0=000000000000000000000000000000000000*
|
|
||||||
*0=000000000000000000000000000000000000*
|
|
||||||
*0=000000000000000000000000000000000000*
|
|
||||||
*0=000000000000000000000000000000^^^000*
|
|
||||||
*~~~~~~~~~0000~~~~~~~~~~000~~00~~~~~~-~*
|
|
||||||
*000000000000000000000000000000000000=0*
|
|
||||||
*000000000000000000000000000000000000=0*
|
|
||||||
*000000000000000000000000000000000000=0*
|
|
||||||
*000000000000000000000000000000000000=0*
|
|
||||||
*0100000^^^^^^^^000000000000000000000=0*
|
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
34
level8.dat
34
level8.dat
|
@ -1,34 +0,0 @@
|
||||||
tileset greentiles
|
|
||||||
bg 0
|
|
||||||
hurryup 30
|
|
||||||
endmaps
|
|
||||||
*000000000*0000000000000000000000000000*
|
|
||||||
*000000000*0000000000000000000000000000*
|
|
||||||
*000000000*0000000000000000000000000000*
|
|
||||||
*000000000******************************
|
|
||||||
*000000000000000000000000000000s0000000*
|
|
||||||
*00000000000000000000000000000000000000*
|
|
||||||
*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*
|
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
55
rc.c
55
rc.c
|
@ -36,7 +36,7 @@ int sprayalpha; // for spray effect
|
||||||
SDL_Surface *pausedtext, *pausedshadow;
|
SDL_Surface *pausedtext, *pausedshadow;
|
||||||
int paused;
|
int paused;
|
||||||
|
|
||||||
tiletype_t fakeblock;
|
//tiletype_t fakeblock;
|
||||||
|
|
||||||
|
|
||||||
/* the order in which fruit will appear */
|
/* the order in which fruit will appear */
|
||||||
|
@ -170,6 +170,7 @@ int main (int argc, char **argv) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
fakeblock.id = T_LAND;
|
fakeblock.id = T_LAND;
|
||||||
strcpy(fakeblock.name,"Fake");
|
strcpy(fakeblock.name,"Fake");
|
||||||
for (i = 0; i < TILEW; i++) {
|
for (i = 0; i < TILEW; i++) {
|
||||||
|
@ -180,6 +181,7 @@ int main (int argc, char **argv) {
|
||||||
fakeblock.numframes = 1;
|
fakeblock.numframes = 1;
|
||||||
fakeblock.next = NULL;
|
fakeblock.next = NULL;
|
||||||
fakeblock.prev = NULL;
|
fakeblock.prev = NULL;
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
/* load fonts */
|
/* load fonts */
|
||||||
|
@ -325,7 +327,8 @@ int main (int argc, char **argv) {
|
||||||
|
|
||||||
if (!paused) {
|
if (!paused) {
|
||||||
if (keys[SDLK_q]) {
|
if (keys[SDLK_q]) {
|
||||||
gtime = nexthurryup-1;
|
//gtime = nexthurryup-1;
|
||||||
|
gtime = nexthurryup+14;
|
||||||
}
|
}
|
||||||
if (keys[SDLK_l]) {
|
if (keys[SDLK_l]) {
|
||||||
if (toggletimer == 0) {
|
if (toggletimer == 0) {
|
||||||
|
@ -2631,14 +2634,18 @@ if (s->id == P_PUFF) printf("PUFF WITH DOOMCOUNT!\n");
|
||||||
}
|
}
|
||||||
} else if (s->id == P_BLACKCLOUD) {
|
} else if (s->id == P_BLACKCLOUD) {
|
||||||
if ((player->dead) || (levelcomplete)) {
|
if ((player->dead) || (levelcomplete)) {
|
||||||
if ((s->img->h <= 3) || (s->img->w <= 3)) {
|
if (s->size <= 0.2) {
|
||||||
s->dead = D_FINAL;
|
s->dead = D_FINAL;
|
||||||
/* reset hurryup timer */
|
/* reset hurryup timer */
|
||||||
nexthurryup = gtime + level->hurryuptime;
|
nexthurryup = gtime + level->hurryuptime;
|
||||||
} else {
|
} else {
|
||||||
SDL_Surface *ts;
|
SDL_Surface *ts, *cloudim;
|
||||||
|
//printf("shrink\n");
|
||||||
|
cloudim = imageset[P_BLACKCLOUD].img[0];
|
||||||
/* get smaller */
|
/* get smaller */
|
||||||
ts = rotozoomSurfaceXY(s->img,0, 0.9 , 0.9 ,0);
|
s->size -= 0.1;
|
||||||
|
ts = rotozoomSurfaceXY(cloudim,0,s->size, s->size, 0);
|
||||||
|
//ts = rotozoomSurfaceXY(s->img,0, 0.9 , 0.9 ,0);
|
||||||
SDL_FreeSurface(s->img);
|
SDL_FreeSurface(s->img);
|
||||||
s->img = ts;
|
s->img = ts;
|
||||||
s->y--;
|
s->y--;
|
||||||
|
@ -2652,35 +2659,41 @@ if (s->id == P_PUFF) printf("PUFF WITH DOOMCOUNT!\n");
|
||||||
s->x += s->xs;
|
s->x += s->xs;
|
||||||
s->y += s->ys;
|
s->y += s->ys;
|
||||||
|
|
||||||
if (s->x >= (640 - s->img->w/2 - 5)) {
|
if (s->x >= (640 - s->img->w/2)) {
|
||||||
s->xs = -s->xs;
|
s->xs = -s->xs;
|
||||||
s->x = 640 - s->img->w/2 - 6;
|
s->x = 640 - s->img->w/2;
|
||||||
}
|
}
|
||||||
if (s->x <= (s->img->w/2 + 5)) {
|
if (s->x <= (s->img->w/2)) {
|
||||||
s->xs = -s->xs;
|
s->xs = -s->xs;
|
||||||
s->x = s->img->w/2 + 6;
|
s->x = s->img->w/2;
|
||||||
}
|
}
|
||||||
if (s->y >= (480 - s->img->h/2 - 5)) {
|
if (s->y >= (480 - s->img->h)) {
|
||||||
s->ys = -s->ys;
|
s->ys = -s->ys;
|
||||||
s->y = 480 - s->img->h/2 - 6;
|
s->y = 480 - s->img->h;
|
||||||
}
|
}
|
||||||
if (s->y <= (s->img->h/2 + 5)) {
|
if (s->y <= (s->img->h)) {
|
||||||
s->ys = -s->ys;
|
s->ys = -s->ys;
|
||||||
s->y = s->img->h/2 + 6;
|
s->y = s->img->h;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (timer % 50 == 0) {
|
if (timer % CLOUDGROWSPEED == 0) {
|
||||||
int w,h;
|
//int w,h;
|
||||||
SDL_Surface *ts;
|
SDL_Surface *ts, *cloudim;
|
||||||
/* get bigger */
|
|
||||||
w = s->img->w;
|
|
||||||
h = s->img->h;
|
cloudim = imageset[P_BLACKCLOUD].img[F_WALK1];
|
||||||
ts = rotozoomSurfaceXY(s->img,0, 1.1 , 1.1 ,0);
|
//w = s->img->w;
|
||||||
|
//h = s->img->h;
|
||||||
|
//ts = rotozoomSurfaceXY(s->img,0, 1.1 , 1.1 ,0);
|
||||||
|
s->size += CLOUDGROWAMT;
|
||||||
|
//printf("grow, now %0.2f\n",s->size);
|
||||||
|
ts = rotozoomSurfaceXY(cloudim,0,s->size, s->size, 0);
|
||||||
SDL_FreeSurface(s->img);
|
SDL_FreeSurface(s->img);
|
||||||
s->img = ts;
|
s->img = ts;
|
||||||
|
|
||||||
s->y += 2;
|
s->y += 2;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5187,8 +5200,10 @@ void initsdl(void) {
|
||||||
screen = SDL_SetVideoMode(640,480,16,SDL_SWSURFACE|vidargs);
|
screen = SDL_SetVideoMode(640,480,16,SDL_SWSURFACE|vidargs);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
if (!screen) {
|
if (!screen) {
|
||||||
printf("Failed to open window: %s\n", SDL_GetError());
|
printf("Failed to open window: %s\n", SDL_GetError());
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
SDL_ShowCursor(SDL_DISABLE);
|
||||||
}
|
}
|
||||||
|
|
25
shared.c
25
shared.c
|
@ -611,6 +611,8 @@ void setdefaults(sprite_t *s) {
|
||||||
// special
|
// special
|
||||||
if (s->id == P_PINKCLOUD) {
|
if (s->id == P_PINKCLOUD) {
|
||||||
s->size = 0.1;
|
s->size = 0.1;
|
||||||
|
} else if (s->id == P_BLACKCLOUD) {
|
||||||
|
s->size = 0.1;
|
||||||
} else {
|
} else {
|
||||||
// not used
|
// not used
|
||||||
s->size = -1;
|
s->size = -1;
|
||||||
|
@ -679,7 +681,8 @@ sprite_t *addsprite(int id, int x, int y, char *name ) {
|
||||||
s->x = x;
|
s->x = x;
|
||||||
s->y = y;
|
s->y = y;
|
||||||
if (s->id == P_BLACKCLOUD) {
|
if (s->id == P_BLACKCLOUD) {
|
||||||
s->img = rotozoomSurfaceXY(imageset[id].img[F_WALK1],0,1,1,0);
|
//s->img = rotozoomSurfaceXY(imageset[id].img[F_WALK1],0,1,1,0);
|
||||||
|
s->img = rotozoomSurfaceXY(imageset[id].img[F_WALK1],0,0.1,0.1,0);
|
||||||
} else if (s->id == P_PINKCLOUD) {
|
} else if (s->id == P_PINKCLOUD) {
|
||||||
s->img = rotozoomSurfaceXY(imageset[id].img[F_WALK1],0,(double)PCGROWSPEED,(double)PCGROWSPEED,0);
|
s->img = rotozoomSurfaceXY(imageset[id].img[F_WALK1],0,(double)PCGROWSPEED,(double)PCGROWSPEED,0);
|
||||||
} else {
|
} else {
|
||||||
|
@ -1032,12 +1035,8 @@ int loadimagesets(void) {
|
||||||
/* next 3 are auto generated */
|
/* next 3 are auto generated */
|
||||||
imageset[P_SPIDER].numimages = 8;
|
imageset[P_SPIDER].numimages = 8;
|
||||||
|
|
||||||
loadspriteimage(P_BLACKCLOUD,F_WALK1, "sprites/cloud.png");
|
loadspriteimage(P_BLACKCLOUD,F_WALK1, "sprites/blackcloud.png");
|
||||||
loadspriteimage(P_BLACKCLOUD,F_JUMP, "sprites/cloud.png");
|
imageset[P_BLACKCLOUD].numimages = 1;
|
||||||
loadspriteimage(P_BLACKCLOUD,F_FALL, "sprites/cloud.png");
|
|
||||||
loadspriteimage(P_BLACKCLOUD,F_CAUGHT, "sprites/cloud.png");
|
|
||||||
loadspriteimage(P_BLACKCLOUD,F_DEAD, "sprites/cloud.png");
|
|
||||||
imageset[P_BLACKCLOUD].numimages = 2;
|
|
||||||
|
|
||||||
loadspriteimage(P_PINKCLOUD,F_WALK1, "sprites/pinkcloud.png");
|
loadspriteimage(P_PINKCLOUD,F_WALK1, "sprites/pinkcloud.png");
|
||||||
imageset[P_PINKCLOUD].numimages = 1;
|
imageset[P_PINKCLOUD].numimages = 1;
|
||||||
|
@ -1217,7 +1216,7 @@ int loadimagesets(void) {
|
||||||
int angle = 90;
|
int angle = 90;
|
||||||
/* rotated death images */
|
/* rotated death images */
|
||||||
// TODO: need to free tempimg ? */
|
// TODO: need to free tempimg ? */
|
||||||
if (!isfruit(p) && !isbullet(p) && !iseffect(p)) {
|
if (!isfruit(p) && !isbullet(p) && !iseffect(p) && p != P_BLACKCLOUD) {
|
||||||
for (fr = F_DEAD2; fr <= F_DEAD4; fr++) {
|
for (fr = F_DEAD2; fr <= F_DEAD4; fr++) {
|
||||||
if (!imageset[p].img[fr]) {
|
if (!imageset[p].img[fr]) {
|
||||||
tempimg = rotozoomSurface(imageset[p].img[F_DEAD],angle,1,0);
|
tempimg = rotozoomSurface(imageset[p].img[F_DEAD],angle,1,0);
|
||||||
|
@ -1229,7 +1228,7 @@ int loadimagesets(void) {
|
||||||
|
|
||||||
for (i = 0; i < imageset[p].numimages; i++) {
|
for (i = 0; i < imageset[p].numimages; i++) {
|
||||||
SDL_Surface *origi;
|
SDL_Surface *origi;
|
||||||
if (!isfruit(p) && !iseffect(p)) {
|
if (!isfruit(p) && !iseffect(p) && p != P_BLACKCLOUD) {
|
||||||
|
|
||||||
SDL_SetColorKey(imageset[p].img[i],
|
SDL_SetColorKey(imageset[p].img[i],
|
||||||
SDL_SRCCOLORKEY, SDL_MapRGB(screen->format, 0, 0, 0));
|
SDL_SRCCOLORKEY, SDL_MapRGB(screen->format, 0, 0, 0));
|
||||||
|
@ -1446,13 +1445,13 @@ void drawsprite(sprite_t *s) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* x-flip if required */
|
/* x-flip if required */
|
||||||
if (!isfruit(s->id) && !iseffect(s->id)) {
|
if (!isfruit(s->id) && !iseffect(s->id) && (s->id != P_BLACKCLOUD)) {
|
||||||
if (s->dir == -1) {
|
if (s->dir == -1) {
|
||||||
frame += MAXFRAMES;
|
frame += MAXFRAMES;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* make red if required */
|
/* make red if required */
|
||||||
if (s->angry) {
|
if (s->angry && s->id != P_BLACKCLOUD) {
|
||||||
frame += (MAXFRAMES*2);
|
frame += (MAXFRAMES*2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2185,6 +2184,10 @@ int loadlevellist(void) {
|
||||||
|
|
||||||
sprintf(filename, "%s/levels.dat",datadir);
|
sprintf(filename, "%s/levels.dat",datadir);
|
||||||
f = fopen(filename,"r");
|
f = fopen(filename,"r");
|
||||||
|
if (!f) {
|
||||||
|
printf("Error opening levels data file\n");
|
||||||
|
exit(1);
|
||||||
|
}
|
||||||
// format is:
|
// format is:
|
||||||
//
|
//
|
||||||
// id,filename,description,
|
// id,filename,description,
|
||||||
|
|
53
stdout.txt
53
stdout.txt
|
@ -1,53 +0,0 @@
|
||||||
got tile 0: blank (solid=0)
|
|
||||||
got tile 1: land (solid=1)
|
|
||||||
got tile 2: slopeup (solid=2)
|
|
||||||
got tile 3: slopedown (solid=2)
|
|
||||||
got tile 4: full (solid=1)
|
|
||||||
got tile 5: sky (solid=0)
|
|
||||||
got tile 6: ladder (solid=0)
|
|
||||||
got tile 7: laddertop (solid=1)
|
|
||||||
got tile 8: right (solid=1)
|
|
||||||
got tile 9: left (solid=1)
|
|
||||||
got tile 10: spikes (solid=0)
|
|
||||||
Background tile id is 0 (blank)
|
|
||||||
Hurryup time is 30
|
|
||||||
got mapping: 'z' to 10
|
|
||||||
got tile 0: blank (solid=0)
|
|
||||||
got tile 1: land (solid=1)
|
|
||||||
got tile 2: slopeup (solid=2)
|
|
||||||
got tile 3: slopedown (solid=2)
|
|
||||||
got tile 4: full (solid=1)
|
|
||||||
got tile 5: sky (solid=0)
|
|
||||||
got tile 6: ladder (solid=0)
|
|
||||||
got tile 7: laddertop (solid=1)
|
|
||||||
got tile 8: right (solid=1)
|
|
||||||
got tile 9: left (solid=1)
|
|
||||||
got tile 10: spikes (solid=0)
|
|
||||||
Background tile id is 0 (blank)
|
|
||||||
Hurryup time is 30
|
|
||||||
got tile 0: blank (solid=0)
|
|
||||||
got tile 1: land (solid=1)
|
|
||||||
got tile 2: slopeup (solid=2)
|
|
||||||
got tile 3: slopedown (solid=2)
|
|
||||||
got tile 4: full (solid=1)
|
|
||||||
got tile 5: sky (solid=0)
|
|
||||||
got tile 6: ladder (solid=0)
|
|
||||||
got tile 7: laddertop (solid=1)
|
|
||||||
got tile 8: right (solid=1)
|
|
||||||
got tile 9: left (solid=1)
|
|
||||||
got tile 10: spikes (solid=0)
|
|
||||||
Background tile id is 0 (blank)
|
|
||||||
Hurryup time is 30
|
|
||||||
got tile 0: blank (solid=0)
|
|
||||||
got tile 1: land (solid=1)
|
|
||||||
got tile 2: slopeup (solid=2)
|
|
||||||
got tile 3: slopedown (solid=2)
|
|
||||||
got tile 4: full (solid=1)
|
|
||||||
got tile 5: sky (solid=0)
|
|
||||||
got tile 6: ladder (solid=0)
|
|
||||||
got tile 7: laddertop (solid=1)
|
|
||||||
got tile 8: right (solid=1)
|
|
||||||
got tile 9: left (solid=1)
|
|
||||||
got tile 10: spikes (solid=0)
|
|
||||||
Background tile id is 0 (blank)
|
|
||||||
Hurryup time is 30
|
|
BIN
verdana.ttf
BIN
verdana.ttf
Binary file not shown.
Loading…
Reference in New Issue