Fixed bug with boxing glove facing the wrong way
Added new tile type: metal More troublshooting code for catching bug
This commit is contained in:
parent
db8fa02c72
commit
9cab0704cf
|
@ -351,3 +351,9 @@ id 5
|
||||||
solid 0
|
solid 0
|
||||||
file newtiles/railleft.png
|
file newtiles/railleft.png
|
||||||
end
|
end
|
||||||
|
|
||||||
|
tile land
|
||||||
|
id 4
|
||||||
|
solid 1
|
||||||
|
file newtiles/metal.png
|
||||||
|
end
|
||||||
|
|
|
@ -30,5 +30,6 @@
|
||||||
101,level101.dat,Sand Castle
|
101,level101.dat,Sand Castle
|
||||||
102,level102.dat,Diving Pool
|
102,level102.dat,Diving Pool
|
||||||
18,level8.5.dat,Look out above...
|
18,level8.5.dat,Look out above...
|
||||||
|
110,level110.dat,Portrait Gallery #1
|
||||||
109,level109.dat,THE END SO FAR
|
109,level109.dat,THE END SO FAR
|
||||||
99,level99.dat,TEST LEVEL
|
99,level99.dat,TEST LEVEL
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 766 B |
|
@ -0,0 +1,65 @@
|
||||||
|
bgfile beach1.png
|
||||||
|
bg 0
|
||||||
|
hurryup 60
|
||||||
|
help
|
||||||
|
endhelp
|
||||||
|
monsters
|
||||||
|
0 2 23
|
||||||
|
23 10 3
|
||||||
|
12 20 18
|
||||||
|
1 31 19
|
||||||
|
1 9 19
|
||||||
|
6 19 3
|
||||||
|
1 36 11
|
||||||
|
1 4 11
|
||||||
|
49 32 7
|
||||||
|
49 4 7
|
||||||
|
60 30 26
|
||||||
|
60 6 27
|
||||||
|
18 11 28
|
||||||
|
18 33 28
|
||||||
|
1 33 15
|
||||||
|
1 6 15
|
||||||
|
endmonsters
|
||||||
|
exitdir 1
|
||||||
|
44,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,44,
|
||||||
|
44,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,44,
|
||||||
|
44,0,0,0,0,0,0,0,0,0,0,0,0,0,33,33,0,0,0,0,0,0,0,0,0,33,33,0,0,0,0,0,0,0,0,0,0,0,0,44,
|
||||||
|
44,0,0,0,0,0,0,0,0,0,0,0,0,33,33,33,0,0,0,0,0,0,0,0,0,33,33,33,0,0,0,0,0,0,0,0,0,0,0,44,
|
||||||
|
44,0,0,0,0,0,0,0,0,0,23,23,33,33,33,0,0,0,0,0,0,0,0,0,0,0,33,33,33,23,23,0,0,0,0,0,0,0,0,44,
|
||||||
|
44,0,0,0,0,0,0,0,0,0,0,0,33,33,33,0,0,0,10,56,56,56,9,0,0,0,33,33,33,0,0,0,0,0,0,0,0,0,0,44,
|
||||||
|
44,0,0,0,0,0,0,0,0,0,0,0,33,33,33,33,0,56,56,56,56,56,56,56,0,33,33,33,33,0,0,0,0,0,0,0,0,0,0,44,
|
||||||
|
44,0,0,0,0,0,0,0,0,0,0,0,0,33,33,33,56,56,56,56,56,56,56,56,56,33,33,33,0,0,0,0,0,0,0,0,0,0,0,44,
|
||||||
|
44,0,23,23,23,23,23,23,23,23,23,23,0,0,56,56,56,56,56,56,56,56,56,56,56,56,56,0,0,23,23,23,23,23,23,23,23,23,0,44,
|
||||||
|
44,0,0,0,0,0,0,0,0,0,0,0,0,0,56,56,56,56,56,56,56,56,56,56,56,56,56,0,0,0,0,0,0,0,0,0,0,0,0,44,
|
||||||
|
44,0,0,0,0,0,0,0,0,0,0,0,0,0,56,56,56,56,56,56,56,56,56,56,56,56,56,0,0,0,0,0,0,0,0,0,0,0,0,44,
|
||||||
|
44,0,0,0,0,0,0,0,0,0,0,0,0,0,56,56,56,56,56,56,56,56,56,56,56,56,56,0,0,0,0,0,0,0,0,0,0,0,0,44,
|
||||||
|
44,23,23,23,23,23,23,23,23,23,0,0,0,0,53,53,33,33,33,33,53,33,33,33,33,53,53,0,0,0,23,23,23,23,23,23,23,23,23,44,
|
||||||
|
44,0,0,0,0,0,0,0,0,0,0,0,0,0,53,53,33,33,33,33,53,33,33,33,33,53,53,0,0,0,0,0,0,0,0,0,0,0,0,44,
|
||||||
|
44,0,0,0,0,0,0,0,0,0,0,0,0,0,53,53,33,27,33,33,53,33,33,27,33,53,53,0,0,0,0,0,0,0,0,0,0,0,0,44,
|
||||||
|
44,0,0,0,0,0,0,0,0,0,0,0,0,0,53,53,33,27,33,33,53,33,33,27,33,53,53,0,0,0,0,0,0,0,0,0,0,0,0,44,
|
||||||
|
44,0,0,23,23,23,23,23,23,23,23,0,0,0,53,53,33,33,33,33,53,33,33,33,33,53,53,0,0,23,23,23,23,23,23,23,23,0,0,44,
|
||||||
|
44,0,0,0,0,0,0,0,0,0,0,0,0,0,53,53,53,53,53,53,53,53,53,53,53,53,53,0,0,0,0,0,0,0,0,0,0,0,0,44,
|
||||||
|
44,0,0,0,0,0,0,0,0,0,0,0,0,0,53,53,53,53,53,53,53,53,53,53,53,53,53,0,0,0,0,0,0,0,0,0,0,0,0,44,
|
||||||
|
44,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,53,53,53,53,53,53,53,53,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44,
|
||||||
|
44,0,0,0,23,23,23,23,23,23,23,23,0,0,0,0,0,53,53,53,33,53,53,53,0,0,0,0,23,23,23,23,23,23,23,23,0,0,0,44,
|
||||||
|
44,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,53,53,53,33,53,53,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44,
|
||||||
|
44,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,33,33,33,33,33,33,33,55,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44,
|
||||||
|
44,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,33,33,33,33,33,33,33,33,33,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44,
|
||||||
|
44,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,33,33,33,33,33,33,33,33,33,23,23,23,23,23,23,23,23,23,23,23,23,23,23,44,
|
||||||
|
44,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,33,33,33,33,33,33,33,33,33,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44,
|
||||||
|
44,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,33,33,33,33,33,33,33,33,33,16,16,16,16,16,16,16,16,16,16,16,16,16,16,44,
|
||||||
|
44,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,33,33,33,33,33,33,33,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,44,
|
||||||
|
44,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,33,33,33,33,33,33,33,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,44,
|
||||||
|
44,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,44,
|
||||||
|
layer2
|
||||||
|
19,19,28
|
||||||
|
20,19,28
|
||||||
|
21,19,28
|
||||||
|
17,28,15
|
||||||
|
18,28,15
|
||||||
|
19,28,15
|
||||||
|
20,28,15
|
||||||
|
21,28,15
|
||||||
|
22,28,15
|
||||||
|
23,28,15
|
14
rc.c
14
rc.c
|
@ -1347,19 +1347,20 @@ void checkcollide(sprite_t *s) {
|
||||||
|
|
||||||
/* check for colission with our net */
|
/* check for colission with our net */
|
||||||
if (s->netting ) {
|
if (s->netting ) {
|
||||||
if ((isnettable(s2->id) && !s2->invuln) || (s->netsticky && isfruit(s2->id))){
|
if ((isnettable(s2) && !s2->invuln) || (s->netsticky && isfruit(s2->id))){
|
||||||
if ((s->x + s->netlen*s->netdir) > s2->x) {
|
if ((s->x + s->netlen*s->netdir) > s2->x) {
|
||||||
xdiff = (s->x + s->netlen*s->netdir) - s2->x;
|
xdiff = (s->x + s->netlen*s->netdir) - s2->x;
|
||||||
} else {
|
} else {
|
||||||
xdiff = s2->x - (s->x + s->netlen*s->netdir);
|
xdiff = s2->x - (s->x + s->netlen*s->netdir);
|
||||||
}
|
}
|
||||||
//if (xdiff < 0) xdiff = -xdiff;
|
if (xdiff < 0) xdiff = -xdiff;
|
||||||
|
|
||||||
if (s->netystart > (s2->y - s2->img->h/2)) {
|
if (s->netystart > (s2->y - s2->img->h/2)) {
|
||||||
ydiff = s->netystart - (s2->y - s2->img->h/2);
|
ydiff = s->netystart - (s2->y - s2->img->h/2);
|
||||||
} else {
|
} else {
|
||||||
ydiff = (s2->y - s2->img->h/2) - s->netystart;
|
ydiff = (s2->y - s2->img->h/2) - s->netystart;
|
||||||
}
|
}
|
||||||
//if (ydiff < 0) ydiff = -ydiff;
|
if (ydiff < 0) ydiff = -ydiff;
|
||||||
|
|
||||||
ythresh = s2->img->h;
|
ythresh = s2->img->h;
|
||||||
// check...
|
// check...
|
||||||
|
@ -1382,8 +1383,6 @@ void checkcollide(sprite_t *s) {
|
||||||
if ((xdiff <= s2->img->w/2) && (ydiff <= ythresh)) {
|
if ((xdiff <= s2->img->w/2) && (ydiff <= ythresh)) {
|
||||||
// we hit something!
|
// we hit something!
|
||||||
|
|
||||||
printf("caught: s='%s',%0.0f,%0.0f s2='%s',%0.0f,%0.0f\n",
|
|
||||||
s->name, s->x, s->y, s2->name,s2->x,s2->y);
|
|
||||||
|
|
||||||
if (s->netsticky && isfruit(s2->id)) {
|
if (s->netsticky && isfruit(s2->id)) {
|
||||||
getfruit(s, s2, 1);
|
getfruit(s, s2, 1);
|
||||||
|
@ -1423,6 +1422,11 @@ void checkcollide(sprite_t *s) {
|
||||||
// otherwise we caught it if we have enough nets
|
// otherwise we caught it if we have enough nets
|
||||||
|
|
||||||
if (s->netcaught < s->netmax) {
|
if (s->netcaught < s->netmax) {
|
||||||
|
|
||||||
|
printf("caught: ydiff=%0.0f,ythresh=%0.0f,s='%s',%0.0f,%0.0f s2='%s',%0.0f,%0.0f\n",
|
||||||
|
ydiff,ythresh,
|
||||||
|
s->name, s->x, s->y, s2->name,s2->x,s2->y);
|
||||||
|
|
||||||
s2->caughtby = s;
|
s2->caughtby = s;
|
||||||
s2->jumping = B_FALSE;
|
s2->jumping = B_FALSE;
|
||||||
s2->falling = 0;
|
s2->falling = 0;
|
||||||
|
|
26
shared.c
26
shared.c
|
@ -1222,6 +1222,8 @@ int loadimagesets(void) {
|
||||||
|
|
||||||
loadspriteimage(P_GLOVE,F_WALK1, "sprites/glove.png");
|
loadspriteimage(P_GLOVE,F_WALK1, "sprites/glove.png");
|
||||||
imageset[P_GLOVE].numimages = 1;
|
imageset[P_GLOVE].numimages = 1;
|
||||||
|
// manually do flipped images
|
||||||
|
imageset[P_GLOVE].img[MAXFRAMES] = rotozoomSurfaceXY(imageset[P_GLOVE].img[0], 0, -1,1,0);
|
||||||
|
|
||||||
loadspriteimage(P_DIAMOND,F_WALK1, "sprites/diamond.png");
|
loadspriteimage(P_DIAMOND,F_WALK1, "sprites/diamond.png");
|
||||||
imageset[P_DIAMOND].numimages = 1;
|
imageset[P_DIAMOND].numimages = 1;
|
||||||
|
@ -1686,6 +1688,10 @@ void drawsprite(sprite_t *s) {
|
||||||
if (s->dir == -1) {
|
if (s->dir == -1) {
|
||||||
frame += MAXFRAMES;
|
frame += MAXFRAMES;
|
||||||
}
|
}
|
||||||
|
} else if (s->id == P_GLOVE) {
|
||||||
|
if (s->dir == -1) {
|
||||||
|
frame += MAXFRAMES;
|
||||||
|
}
|
||||||
} else if ((s->id == P_WINGLEFT) || (s->id == P_WINGRIGHT)) {
|
} else if ((s->id == P_WINGLEFT) || (s->id == P_WINGRIGHT)) {
|
||||||
if (player->dir == -1) {
|
if (player->dir == -1) {
|
||||||
frame += MAXFRAMES;
|
frame += MAXFRAMES;
|
||||||
|
@ -2573,6 +2579,8 @@ int randompowerup(void) {
|
||||||
int num;
|
int num;
|
||||||
num = rand() % 31;
|
num = rand() % 31;
|
||||||
|
|
||||||
|
return P_BOXING;
|
||||||
|
|
||||||
switch (num) {
|
switch (num) {
|
||||||
case 0:
|
case 0:
|
||||||
default:
|
default:
|
||||||
|
@ -2674,14 +2682,16 @@ int isboss(int monid) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int isnettable(int monid) {
|
int isnettable(sprite_t *s) {
|
||||||
if (ismonster(monid)) {
|
if (ismonster(s->id)) {
|
||||||
switch (monid) {
|
if (ismonster(s->id)) {
|
||||||
case P_BLACKCLOUD:
|
switch (s->id) {
|
||||||
case P_KINGRAT:
|
case P_BLACKCLOUD:
|
||||||
return B_FALSE;
|
case P_KINGRAT:
|
||||||
default:
|
return B_FALSE;
|
||||||
return B_TRUE;
|
default:
|
||||||
|
return B_TRUE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
2
shared.h
2
shared.h
|
@ -47,7 +47,7 @@ int loadlevellist(void);
|
||||||
int savelevellist(void);
|
int savelevellist(void);
|
||||||
int ispermenant(int pid);
|
int ispermenant(int pid);
|
||||||
int isbosslevel(int lev);
|
int isbosslevel(int lev);
|
||||||
int isnettable(int monid);
|
int isnettable(sprite_t *s);
|
||||||
int isboss(int monid);
|
int isboss(int monid);
|
||||||
int getbosshealth(int mid);
|
int getbosshealth(int mid);
|
||||||
void getpixelrgb(SDL_Surface *where, int x, int y, SDL_Color *clr);
|
void getpixelrgb(SDL_Surface *where, int x, int y, SDL_Color *clr);
|
||||||
|
|
Loading…
Reference in New Issue