- [+] remove command line switches for hiscore server
- [+] on beehive (1-16), make chute wider so that rats can fall down it - [+] Hiscores - [+] make L/R do the same as U/D - [+] honey - [+] honey shouldn't slow down bullets - [+] honey slows down players too much , especially if you don't have boots. maybe don't slowdown below normal speed. - [+] magic lamp - [+] don't say 'hurry up' when magic lamp is active. - [+] magic lamp should show a countdown ticking down - [+] magic lamp should last exactly 30 seconds.
This commit is contained in:
parent
0b6a524379
commit
e04a095147
|
@ -72,12 +72,12 @@ exitdir 1
|
||||||
4,20,20,20,20,0,0,0,0,0,0,24,24,24,24,26,26,26,26,26,26,26,26,26,26,26,24,24,24,24,0,0,0,0,0,20,20,20,20,4,
|
4,20,20,20,20,0,0,0,0,0,0,24,24,24,24,26,26,26,26,26,26,26,26,26,26,26,24,24,24,24,0,0,0,0,0,20,20,20,20,4,
|
||||||
4,0,0,0,0,0,0,0,0,0,0,24,24,24,24,26,26,26,26,26,26,26,26,26,26,26,24,24,24,24,0,0,0,0,0,0,0,0,0,4,
|
4,0,0,0,0,0,0,0,0,0,0,24,24,24,24,26,26,26,26,26,26,26,26,26,26,26,24,24,24,24,0,0,0,0,0,0,0,0,0,4,
|
||||||
4,0,0,0,0,0,0,0,0,0,0,0,24,24,24,26,26,26,26,26,26,26,26,26,26,26,24,24,24,0,0,0,0,0,0,0,0,0,0,4,
|
4,0,0,0,0,0,0,0,0,0,0,0,24,24,24,26,26,26,26,26,26,26,26,26,26,26,24,24,24,0,0,0,0,0,0,0,0,0,0,4,
|
||||||
4,0,0,0,0,0,0,0,0,0,0,0,24,24,24,25,25,25,25,25,25,25,25,25,26,25,24,24,24,0,0,0,0,0,0,0,0,0,0,4,
|
4,0,0,0,0,0,0,0,0,0,0,0,24,24,24,25,25,25,25,25,25,25,25,26,26,25,24,24,24,0,0,0,0,0,0,0,0,0,0,4,
|
||||||
4,20,20,20,20,0,0,0,0,0,0,0,24,24,24,24,24,24,24,24,24,24,24,24,26,24,24,24,24,0,0,0,0,0,0,20,20,20,20,4,
|
4,20,20,20,20,0,0,0,0,0,0,0,24,24,24,24,24,24,24,24,24,24,24,26,26,24,24,24,24,0,0,0,0,0,0,20,20,20,20,4,
|
||||||
4,0,0,0,0,0,0,0,0,0,0,0,0,0,24,24,24,24,24,24,24,24,24,24,26,24,24,0,0,0,0,0,0,0,0,0,0,0,0,4,
|
4,0,0,0,0,0,0,0,0,0,0,0,0,0,24,24,24,24,24,24,24,24,24,26,26,24,24,0,0,0,0,0,0,0,0,0,0,0,0,4,
|
||||||
4,0,0,0,0,0,0,0,0,0,0,0,0,0,24,24,24,24,24,24,24,24,24,24,26,24,24,0,0,0,0,0,0,0,0,0,0,0,0,4,
|
4,0,0,0,0,0,0,0,0,0,0,0,0,0,24,24,24,24,24,24,24,24,24,26,26,24,24,0,0,0,0,0,0,0,0,0,0,0,0,4,
|
||||||
4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,24,24,24,24,24,24,24,24,26,24,0,0,0,0,0,0,0,0,0,0,0,0,0,4,
|
4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,24,24,24,24,24,24,24,26,26,24,0,0,0,0,0,0,0,0,0,0,0,0,0,4,
|
||||||
4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,24,24,24,24,24,24,24,24,26,24,0,0,0,0,0,0,0,0,0,0,0,0,0,4,
|
4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,24,24,24,24,24,24,24,26,26,24,0,0,0,0,0,0,0,0,0,0,0,0,0,4,
|
||||||
4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,
|
4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,
|
||||||
4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,
|
4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,
|
||||||
4,0,0,0,0,0,0,17,0,29,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,29,0,17,0,0,0,0,0,0,4,
|
4,0,0,0,0,0,0,17,0,29,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,29,0,17,0,0,0,0,0,0,4,
|
||||||
|
|
58
rc.c
58
rc.c
|
@ -85,6 +85,7 @@ int cameraalpha;
|
||||||
|
|
||||||
int playedbell;
|
int playedbell;
|
||||||
int clocktime;
|
int clocktime;
|
||||||
|
int lamptime = -1;
|
||||||
|
|
||||||
int gameovertime;
|
int gameovertime;
|
||||||
|
|
||||||
|
@ -296,7 +297,7 @@ int main (int argc, char **argv) {
|
||||||
} else if (!strcmp(argv[i], "-jt")) {
|
} else if (!strcmp(argv[i], "-jt")) {
|
||||||
printf("Joystick test mode enabled.\n");
|
printf("Joystick test mode enabled.\n");
|
||||||
joytest = B_TRUE;
|
joytest = B_TRUE;
|
||||||
} else if (!strcmp(argv[i], "-hs")) {
|
/*} else if (!strcmp(argv[i], "-hs")) {
|
||||||
if (++i >= argc) {
|
if (++i >= argc) {
|
||||||
printf("Missing hiscore server name.\n");
|
printf("Missing hiscore server name.\n");
|
||||||
usage();
|
usage();
|
||||||
|
@ -331,6 +332,7 @@ int main (int argc, char **argv) {
|
||||||
}
|
}
|
||||||
hiscoreport = atoi(argv[i]);
|
hiscoreport = atoi(argv[i]);
|
||||||
printf("Hiscore port set to '%d'\n",hiscoreport);
|
printf("Hiscore port set to '%d'\n",hiscoreport);
|
||||||
|
*/
|
||||||
} else {
|
} else {
|
||||||
usage();
|
usage();
|
||||||
exit(1);
|
exit(1);
|
||||||
|
@ -1366,6 +1368,35 @@ void tick(void) {
|
||||||
Mix_ResumeMusic();
|
Mix_ResumeMusic();
|
||||||
globpowerup = -1;
|
globpowerup = -1;
|
||||||
}
|
}
|
||||||
|
} else if (globpowerup == PW_LAMP) {
|
||||||
|
int maxdoom = -1;
|
||||||
|
sprite_t *s2;
|
||||||
|
// never reach hurryup time
|
||||||
|
nexthurryup++;
|
||||||
|
//////// display countdown
|
||||||
|
// find goldcoin with highest doomcount
|
||||||
|
for (s2 = sprite; s2 ; s2 = s2->next) {
|
||||||
|
if ((s2->id == P_GOLDCOIN) && (s2->doomcount > maxdoom)) {
|
||||||
|
maxdoom = s2->doomcount;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (maxdoom > -1) {
|
||||||
|
int secondsleft;
|
||||||
|
secondsleft = (maxdoom / fps);
|
||||||
|
if (secondsleft != lamptime) {
|
||||||
|
SDL_Color *col;
|
||||||
|
lamptime = secondsleft;
|
||||||
|
sprintf(tempm, "%d",lamptime);
|
||||||
|
if (lamptime < 5) {
|
||||||
|
col = &red;
|
||||||
|
} else if (lamptime < 15) {
|
||||||
|
col = &yellow;
|
||||||
|
} else {
|
||||||
|
col = &green;
|
||||||
|
}
|
||||||
|
addoutlinetext(320,120,TEXTSIZE_LEVEL, tempm, col,&black,15, TT_NORM);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// handle flood effect
|
// handle flood effect
|
||||||
|
@ -1410,8 +1441,6 @@ void tick(void) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* check for hurryup*/
|
/* check for hurryup*/
|
||||||
if (!isbosslevel(curlevelnum)) {
|
if (!isbosslevel(curlevelnum)) {
|
||||||
if ((gtime == nexthurryup) && (curlevel->iced != WATER_COMPLETE)) {
|
if ((gtime == nexthurryup) && (curlevel->iced != WATER_COMPLETE)) {
|
||||||
|
@ -9400,16 +9429,16 @@ int movex(sprite_t *s,double amt,int onpurpose) {
|
||||||
|
|
||||||
tt = gettileat(s->x, s->y, &tilex,&tiley);
|
tt = gettileat(s->x, s->y, &tilex,&tiley);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (amt > 0) amtdir = 1;
|
if (amt > 0) amtdir = 1;
|
||||||
else (amtdir = -1);
|
else (amtdir = -1);
|
||||||
|
|
||||||
// walking on sticky tiles?
|
// walking on sticky tiles?
|
||||||
if (tt->sticky && onpurpose && !s->falling) {
|
if (isplayer(s) || ismonster(s->id)) {
|
||||||
amt /= 2;
|
if (tt->sticky && onpurpose && !s->falling) {
|
||||||
// enforce minimum speed for player
|
amt /= 2;
|
||||||
if (isplayer(s) && amt < 1) amt = 1;
|
// enforce minimum speed for player
|
||||||
|
if (isplayer(s) && amt < 1) amt = 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
curx = s->x;
|
curx = s->x;
|
||||||
|
@ -9942,6 +9971,7 @@ int dofruiteffect(sprite_t *pp, sprite_t *s) {
|
||||||
addoutlinetext(s->x,s->y - s->img->h/2, TEXTSIZE_POINTS, tempm,&white,&black,POINTSDELAY, TT_NORM);
|
addoutlinetext(s->x,s->y - s->img->h/2, TEXTSIZE_POINTS, tempm,&white,&black,POINTSDELAY, TT_NORM);
|
||||||
|
|
||||||
globpowerup = PW_LAMP;
|
globpowerup = PW_LAMP;
|
||||||
|
lamptime = -1;
|
||||||
|
|
||||||
// create gold coins
|
// create gold coins
|
||||||
delay = 0;
|
delay = 0;
|
||||||
|
@ -9974,8 +10004,6 @@ int dofruiteffect(sprite_t *pp, sprite_t *s) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return B_TRUE;
|
return B_TRUE;
|
||||||
} else if (s->id == P_CANNONPOWERUP) {
|
} else if (s->id == P_CANNONPOWERUP) {
|
||||||
sprite_t *newsp;
|
sprite_t *newsp;
|
||||||
|
@ -10414,8 +10442,8 @@ void usage(void) {
|
||||||
printf("usage: rc [-fs] [-l xx]\n");
|
printf("usage: rc [-fs] [-l xx]\n");
|
||||||
printf(" -fs Start in full-screen mode.\n");
|
printf(" -fs Start in full-screen mode.\n");
|
||||||
printf(" -l xx Skip to level xx.\n");
|
printf(" -l xx Skip to level xx.\n");
|
||||||
printf(" -hs xx Set hiscore_server to http://xx.\n");
|
//printf(" -hs xx Set hiscore_server to http://xx.\n");
|
||||||
printf(" -hp xx Connect to hiscore_server on port xx.\n");
|
//printf(" -hp xx Connect to hiscore_server on port xx.\n");
|
||||||
printf(" -js Joystick test mode.\n");
|
printf(" -js Joystick test mode.\n");
|
||||||
printf(" -as Auto screenshot mode (dumps to /tmp/levelxx.bmp).\n");
|
printf(" -as Auto screenshot mode (dumps to /tmp/levelxx.bmp).\n");
|
||||||
printf(" -t Enable tutorial (ie. help text).\n");
|
printf(" -t Enable tutorial (ie. help text).\n");
|
||||||
|
@ -14005,13 +14033,13 @@ void checkhiscores(sprite_t *who){
|
||||||
|
|
||||||
if (keytimer == 0) {
|
if (keytimer == 0) {
|
||||||
// check for scrolling
|
// check for scrolling
|
||||||
if (keydown(pnum, KEY_UP)) { // scroll through letters
|
if (keydown(pnum, KEY_UP) || keydown(pnum, KEY_LEFT)) { // scroll through letters
|
||||||
if (curlet == 'a') curlet = '*';
|
if (curlet == 'a') curlet = '*';
|
||||||
else if (curlet == '*') curlet = ' ';
|
else if (curlet == '*') curlet = ' ';
|
||||||
else if (curlet == ' ') curlet = 'z';
|
else if (curlet == ' ') curlet = 'z';
|
||||||
else curlet--;
|
else curlet--;
|
||||||
keytimer = 5;
|
keytimer = 5;
|
||||||
} else if (keydown(pnum, KEY_DOWN)) { // scroll through letters
|
} else if (keydown(pnum, KEY_DOWN) || keydown(pnum, KEY_RIGHT)) { // scroll through letters
|
||||||
if (curlet == 'z') curlet = ' ';
|
if (curlet == 'z') curlet = ' ';
|
||||||
else if (curlet == ' ') curlet = '*';
|
else if (curlet == ' ') curlet = '*';
|
||||||
else if (curlet == '*') curlet = 'a';
|
else if (curlet == '*') curlet = 'a';
|
||||||
|
|
8
shared.c
8
shared.c
|
@ -19,6 +19,10 @@
|
||||||
#include "globals.h"
|
#include "globals.h"
|
||||||
#include "shared.h"
|
#include "shared.h"
|
||||||
|
|
||||||
|
#ifndef __EDITOR
|
||||||
|
extern int fps;
|
||||||
|
#endif
|
||||||
|
|
||||||
int loadlevel(int lnum, int wantmonsters) {
|
int loadlevel(int lnum, int wantmonsters) {
|
||||||
FILE *f;
|
FILE *f;
|
||||||
int x,y;
|
int x,y;
|
||||||
|
@ -1031,7 +1035,9 @@ sprite_t *addsprite(int id, int x, int y, char *name ) {
|
||||||
if (!strcmp(s->name, "random_up")) {
|
if (!strcmp(s->name, "random_up")) {
|
||||||
s->doomcount = 900;
|
s->doomcount = 900;
|
||||||
} else if (!strcmp(s->name, "goldcoin")) {
|
} else if (!strcmp(s->name, "goldcoin")) {
|
||||||
s->doomcount = 1400;
|
//s->doomcount = 1400;
|
||||||
|
// 30 seconds
|
||||||
|
s->doomcount = fps*30;
|
||||||
} else {
|
} else {
|
||||||
s->doomcount = 500;
|
s->doomcount = 500;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue