Fixed serious bug with whitetail spider
This commit is contained in:
parent
2a28051b6d
commit
186d4aa387
|
@ -33,9 +33,9 @@ monsters
|
||||||
15 9 24
|
15 9 24
|
||||||
16 16 4
|
16 16 4
|
||||||
16 18 4
|
16 18 4
|
||||||
158 20 4
|
|
||||||
158 12 4
|
|
||||||
158 3 4
|
158 3 4
|
||||||
|
171 20 4
|
||||||
|
171 3 14
|
||||||
endmonsters
|
endmonsters
|
||||||
exitdir -1
|
exitdir -1
|
||||||
74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,
|
74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,74,
|
||||||
|
|
|
@ -7,7 +7,6 @@ monsters
|
||||||
0 19 28
|
0 19 28
|
||||||
134 21 28
|
134 21 28
|
||||||
23 19 4
|
23 19 4
|
||||||
6 33 15
|
|
||||||
1 33 22
|
1 33 22
|
||||||
1 11 22
|
1 11 22
|
||||||
49 31 28
|
49 31 28
|
||||||
|
@ -56,6 +55,7 @@ monsters
|
||||||
17 15 16
|
17 15 16
|
||||||
17 8 7
|
17 8 7
|
||||||
17 10 7
|
17 10 7
|
||||||
|
171 29 16
|
||||||
endmonsters
|
endmonsters
|
||||||
exitdir -2
|
exitdir -2
|
||||||
90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,
|
90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,
|
||||||
|
|
|
@ -11,12 +11,8 @@ monsters
|
||||||
6 34 7
|
6 34 7
|
||||||
6 3 19
|
6 3 19
|
||||||
6 7 1
|
6 7 1
|
||||||
1 11 11
|
|
||||||
1 20 22
|
1 20 22
|
||||||
1 7 25
|
|
||||||
1 30 16
|
|
||||||
1 19 2
|
1 19 2
|
||||||
1 15 16
|
|
||||||
158 30 2
|
158 30 2
|
||||||
158 10 2
|
158 10 2
|
||||||
16 25 6
|
16 25 6
|
||||||
|
@ -39,6 +35,9 @@ monsters
|
||||||
15 13 16
|
15 13 16
|
||||||
16 27 22
|
16 27 22
|
||||||
16 23 22
|
16 23 22
|
||||||
|
171 11 11
|
||||||
|
171 7 25
|
||||||
|
171 29 16
|
||||||
endmonsters
|
endmonsters
|
||||||
exitdir -2
|
exitdir -2
|
||||||
90,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,90,
|
90,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,90,
|
||||||
|
@ -49,15 +48,15 @@ exitdir -2
|
||||||
90,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,7,0,0,0,0,0,0,0,0,0,0,0,90,
|
90,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,7,0,0,0,0,0,0,0,0,0,0,0,90,
|
||||||
90,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,7,0,0,0,0,0,0,0,0,0,0,0,90,
|
90,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,7,0,0,0,0,0,0,0,0,0,0,0,90,
|
||||||
90,0,0,0,0,0,0,0,0,0,0,0,0,0,0,89,89,89,89,89,89,89,89,89,89,89,89,89,89,0,0,0,0,0,0,0,0,0,0,90,
|
90,0,0,0,0,0,0,0,0,0,0,0,0,0,0,89,89,89,89,89,89,89,89,89,89,89,89,89,89,0,0,0,0,0,0,0,0,0,0,90,
|
||||||
|
90,89,89,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,90,
|
||||||
90,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,90,
|
90,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,90,
|
||||||
90,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,90,
|
90,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,89,89,89,89,90,
|
||||||
90,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,90,
|
|
||||||
90,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,90,
|
90,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,90,
|
||||||
90,0,0,0,0,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,0,0,0,0,0,0,0,0,0,0,0,0,0,90,
|
90,0,0,0,0,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,0,0,0,0,0,0,0,0,0,0,0,0,0,90,
|
||||||
90,0,0,0,0,93,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,92,0,0,0,0,0,0,0,0,0,0,0,0,0,90,
|
90,0,0,0,0,93,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,92,0,0,0,0,0,0,0,0,0,0,0,0,0,90,
|
||||||
90,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,90,
|
90,0,0,0,0,0,0,0,7,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,90,
|
||||||
90,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,90,
|
90,0,0,0,0,0,0,0,7,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,90,
|
||||||
90,0,0,0,0,0,0,0,0,0,0,89,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,90,
|
90,0,0,0,0,0,0,0,7,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,90,
|
||||||
90,0,0,0,0,0,0,0,89,89,89,89,89,89,89,89,89,89,89,0,0,0,0,0,0,89,89,89,89,89,89,89,89,89,89,0,0,0,0,90,
|
90,0,0,0,0,0,0,0,89,89,89,89,89,89,89,89,89,89,89,0,0,0,0,0,0,89,89,89,89,89,89,89,89,89,89,0,0,0,0,90,
|
||||||
90,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,90,
|
90,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,90,
|
||||||
90,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,90,
|
90,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,90,
|
||||||
|
@ -67,12 +66,14 @@ exitdir -2
|
||||||
90,0,0,0,0,0,0,0,0,0,0,0,0,0,0,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,0,0,0,0,0,90,
|
90,0,0,0,0,0,0,0,0,0,0,0,0,0,0,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,0,0,0,0,0,90,
|
||||||
90,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,90,
|
90,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,90,
|
||||||
90,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,90,
|
90,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,90,
|
||||||
90,0,0,0,89,89,89,89,89,89,89,89,89,89,89,89,89,89,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,90,
|
90,0,0,89,89,89,89,89,89,89,89,89,89,89,89,89,89,89,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,90,
|
||||||
90,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,90,
|
90,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,90,
|
||||||
90,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,90,
|
90,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,90,
|
||||||
90,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,90,
|
90,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,90,
|
||||||
layer2
|
layer2
|
||||||
27,3,8
|
27,3,8
|
||||||
17,7,8
|
17,7,8
|
||||||
|
8,12,8
|
||||||
|
8,13,7
|
||||||
16,17,8
|
16,17,8
|
||||||
28,17,8
|
28,17,8
|
||||||
|
|
|
@ -8,10 +8,8 @@ monsters
|
||||||
134 25 18
|
134 25 18
|
||||||
23 25 13
|
23 25 13
|
||||||
7 19 5
|
7 19 5
|
||||||
18 2 3
|
|
||||||
18 35 7
|
18 35 7
|
||||||
18 4 27
|
18 4 27
|
||||||
18 33 23
|
|
||||||
6 31 10
|
6 31 10
|
||||||
133 35 25
|
133 35 25
|
||||||
133 5 22
|
133 5 22
|
||||||
|
@ -31,6 +29,8 @@ monsters
|
||||||
17 4 27
|
17 4 27
|
||||||
17 4 7
|
17 4 7
|
||||||
17 35 7
|
17 35 7
|
||||||
|
18 33 23
|
||||||
|
18 2 3
|
||||||
endmonsters
|
endmonsters
|
||||||
exitdir -2
|
exitdir -2
|
||||||
33,87,87,87,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,87,87,87,32,
|
33,87,87,87,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,33,87,87,87,32,
|
||||||
|
|
|
@ -4,9 +4,10 @@ hurryup 10
|
||||||
help
|
help
|
||||||
endhelp
|
endhelp
|
||||||
monsters
|
monsters
|
||||||
|
0 38 28
|
||||||
134 18 15
|
134 18 15
|
||||||
171 3 25
|
171 3 25
|
||||||
0 38 28
|
171 16 20
|
||||||
endmonsters
|
endmonsters
|
||||||
exitdir 1
|
exitdir 1
|
||||||
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,
|
||||||
|
|
52
rc.c
52
rc.c
|
@ -4862,12 +4862,16 @@ printf("setting target to y = %d\n",ss->timer2);
|
||||||
}
|
}
|
||||||
} else { // down
|
} else { // down
|
||||||
if (isonladder(s)) {
|
if (isonladder(s)) {
|
||||||
// climb down
|
if (isladderbelow(s)) {
|
||||||
s->y += getspeed(s);
|
// climb down
|
||||||
s->jumping = 0;
|
s->y += getspeed(s);
|
||||||
s->falling = 0;
|
s->jumping = 0;
|
||||||
s->climbing = B_TRUE;
|
s->falling = 0;
|
||||||
s->moved = MV_WALK;
|
s->climbing = B_TRUE;
|
||||||
|
s->moved = MV_WALK;
|
||||||
|
} else {
|
||||||
|
s->climbing = B_FALSE;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (ladderx && isplayerabove(s)) { // if we are at the bottom of a ladder
|
} else if (ladderx && isplayerabove(s)) { // if we are at the bottom of a ladder
|
||||||
|
@ -4881,15 +4885,20 @@ printf("setting target to y = %d\n",ss->timer2);
|
||||||
s->timer3 = D_UP;
|
s->timer3 = D_UP;
|
||||||
} else if (isonladder(s) && isplayerbelow(s)) { // is we are at top of ladder
|
} else if (isonladder(s) && isplayerbelow(s)) { // is we are at top of ladder
|
||||||
int ladderx = isonladder(s);
|
int ladderx = isonladder(s);
|
||||||
s->y += getspeed(s);
|
if (isladderbelow(s)) {
|
||||||
s->jumping = 0;
|
s->y += getspeed(s);
|
||||||
s->falling = 0;
|
s->jumping = 0;
|
||||||
s->climbing = B_TRUE;
|
s->falling = 0;
|
||||||
s->moved = MV_WALK;
|
s->climbing = B_TRUE;
|
||||||
// lock to centre of ladder
|
s->moved = MV_WALK;
|
||||||
s->x = ladderx;
|
// lock to centre of ladder
|
||||||
s->timer3 = D_DOWN;
|
s->x = ladderx;
|
||||||
|
s->timer3 = D_DOWN;
|
||||||
|
} else {
|
||||||
|
s->climbing = B_FALSE;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
|
s->climbing = B_FALSE;
|
||||||
// walk
|
// walk
|
||||||
tt = gettileat(s->x + s->dir+getspeed(s),s->y,NULL,NULL);
|
tt = gettileat(s->x + s->dir+getspeed(s),s->y,NULL,NULL);
|
||||||
/* if there's a hole in front of us */
|
/* if there's a hole in front of us */
|
||||||
|
@ -7446,7 +7455,7 @@ int isonladder(sprite_t *s) {
|
||||||
return (tx*TILEW)+(TILEW/2);
|
return (tx*TILEW)+(TILEW/2);
|
||||||
}
|
}
|
||||||
|
|
||||||
// if ladder bove and climbing
|
// if ladder above and climbing
|
||||||
if (isladderabove(s) && s->climbing) {
|
if (isladderabove(s) && s->climbing) {
|
||||||
return isladderabove(s);
|
return isladderabove(s);
|
||||||
}
|
}
|
||||||
|
@ -7467,6 +7476,19 @@ int isladderabove(sprite_t *s) {
|
||||||
return B_FALSE;
|
return B_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// return the x position of the middle of the ladder if so
|
||||||
|
int isladderbelow(sprite_t *s) {
|
||||||
|
tiletype_t *tthere;
|
||||||
|
int tx;
|
||||||
|
//tthere = gettileat(s->x,s->y-TILEH, NULL,NULL);
|
||||||
|
tthere = gettileat(s->x,s->y, &tx,NULL);
|
||||||
|
if (isladder(tthere->id)) {
|
||||||
|
return (tx*TILEW)+(TILEW/2);
|
||||||
|
}
|
||||||
|
|
||||||
|
return B_FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
int isinwater(sprite_t *s) {
|
int isinwater(sprite_t *s) {
|
||||||
return isinwaterpoint(s->x, s->y - s->img->h/2);
|
return isinwaterpoint(s->x, s->y - s->img->h/2);
|
||||||
}
|
}
|
||||||
|
|
1
rc.h
1
rc.h
|
@ -24,6 +24,7 @@ int isongroundpoint(sprite_t *s, int x, int y);
|
||||||
int isonladder(sprite_t *s);
|
int isonladder(sprite_t *s);
|
||||||
int isonbridge(sprite_t *s);
|
int isonbridge(sprite_t *s);
|
||||||
int isladderabove(sprite_t *s);
|
int isladderabove(sprite_t *s);
|
||||||
|
int isladderbelow(sprite_t *s);
|
||||||
int dofruiteffect(sprite_t *pp, sprite_t *s);
|
int dofruiteffect(sprite_t *pp, sprite_t *s);
|
||||||
void checkcollide(sprite_t *s);
|
void checkcollide(sprite_t *s);
|
||||||
void checkcollideplatform(sprite_t *s);
|
void checkcollideplatform(sprite_t *s);
|
||||||
|
|
21
shared.c
21
shared.c
|
@ -1220,6 +1220,7 @@ int loadtiletypes(char *filename) {
|
||||||
|
|
||||||
int loadimagesets(void) {
|
int loadimagesets(void) {
|
||||||
int p,i;
|
int p,i;
|
||||||
|
SDL_Surface *tempsurf;
|
||||||
SDL_Surface *tempimg;
|
SDL_Surface *tempimg;
|
||||||
SDL_Surface *reds;
|
SDL_Surface *reds;
|
||||||
SDL_Surface *origi;
|
SDL_Surface *origi;
|
||||||
|
@ -1412,8 +1413,7 @@ int loadimagesets(void) {
|
||||||
/* next 3 are auto generated */
|
/* next 3 are auto generated */
|
||||||
loadspriteimage(P_WSPIDER,F_CLIMB1, "sprites/whitespiderclimb.png");
|
loadspriteimage(P_WSPIDER,F_CLIMB1, "sprites/whitespiderclimb.png");
|
||||||
loadspriteimage(P_WSPIDER,F_CLIMB2, "sprites/whitespiderclimb1.png");
|
loadspriteimage(P_WSPIDER,F_CLIMB2, "sprites/whitespiderclimb1.png");
|
||||||
loadspriteimage(P_WSPIDER,F_SHOOT, "sprites/whitespiderclimb1.png"); // TO WORK AROUND A BUG!!
|
imageset[P_WSPIDER].numimages = 10;
|
||||||
imageset[P_WSPIDER].numimages = 11;
|
|
||||||
|
|
||||||
|
|
||||||
loadspriteimage(P_SPIDER,F_WALK1, "sprites/newspider.png");
|
loadspriteimage(P_SPIDER,F_WALK1, "sprites/newspider.png");
|
||||||
|
@ -1926,9 +1926,9 @@ int loadimagesets(void) {
|
||||||
SDL_FreeSurface(reds);
|
SDL_FreeSurface(reds);
|
||||||
|
|
||||||
// Convert the reddened image to the screen format
|
// Convert the reddened image to the screen format
|
||||||
temps = SDL_DisplayFormat(imageset[P_BLACKCLOUD].img[MAXFRAMES*2]);
|
tempsurf = SDL_DisplayFormat(imageset[P_BLACKCLOUD].img[MAXFRAMES*2]);
|
||||||
SDL_FreeSurface(imageset[P_BLACKCLOUD].img[MAXFRAMES*2]);
|
SDL_FreeSurface(imageset[P_BLACKCLOUD].img[MAXFRAMES*2]);
|
||||||
imageset[P_BLACKCLOUD].img[MAXFRAMES*2] = temps;
|
imageset[P_BLACKCLOUD].img[MAXFRAMES*2] = tempsurf;
|
||||||
|
|
||||||
// Make the background red bits completely transparent
|
// Make the background red bits completely transparent
|
||||||
SDL_SetColorKey(imageset[P_BLACKCLOUD].img[MAXFRAMES*2],
|
SDL_SetColorKey(imageset[P_BLACKCLOUD].img[MAXFRAMES*2],
|
||||||
|
@ -1996,27 +1996,27 @@ int loadimagesets(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// take a copy of the original image
|
// take a copy of the original image
|
||||||
temps = rotozoomSurfaceXY(origi, 0, 1,1,0);
|
tempsurf = rotozoomSurfaceXY(origi, 0, 1,1,0);
|
||||||
redarea.x = 0; redarea.y = 0;
|
redarea.x = 0; redarea.y = 0;
|
||||||
redarea.w = 1; redarea.h = 1;
|
redarea.w = 1; redarea.h = 1;
|
||||||
temparea.w = 1; temparea.h = 1;
|
temparea.w = 1; temparea.h = 1;
|
||||||
|
|
||||||
for (y = 0; y < temps->h; y++) {
|
for (y = 0; y < tempsurf->h; y++) {
|
||||||
for (x = 0; x < temps->w; x++) {
|
for (x = 0; x < tempsurf->w; x++) {
|
||||||
|
|
||||||
getpixelrgb(temps , x, y, &tempcol);
|
getpixelrgb(tempsurf , x, y, &tempcol);
|
||||||
// if pixel isn't transparent...
|
// if pixel isn't transparent...
|
||||||
if (tempcol.unused > 0 ) {
|
if (tempcol.unused > 0 ) {
|
||||||
temparea.x = x;
|
temparea.x = x;
|
||||||
temparea.y = y;
|
temparea.y = y;
|
||||||
// make this pixel redder
|
// make this pixel redder
|
||||||
SDL_BlitSurface(reds, &redarea, temps, &temparea);
|
SDL_BlitSurface(reds, &redarea, tempsurf, &temparea);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
imageset[p].img[MAXFRAMES*2+i] = temps;
|
imageset[p].img[MAXFRAMES*2+i] = tempsurf;
|
||||||
|
|
||||||
// free red image surface
|
// free red image surface
|
||||||
SDL_FreeSurface(reds);
|
SDL_FreeSurface(reds);
|
||||||
|
@ -2333,6 +2333,7 @@ void drawsprite(sprite_t *s) {
|
||||||
s->img = imageset[s->id].img[frame];
|
s->img = imageset[s->id].img[frame];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// zapper lightning bolt
|
// zapper lightning bolt
|
||||||
if ((s->id == P_ZAPPER) && (s->timer4 > 0)) {
|
if ((s->id == P_ZAPPER) && (s->timer4 > 0)) {
|
||||||
if (s->zapping) {
|
if (s->zapping) {
|
||||||
|
|
Loading…
Reference in New Issue