summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPhilip <philip@philip-linuxlaptop.(none)>2010-11-12 17:46:02 (GMT)
committer Philip <philip@philip-linuxlaptop.(none)>2010-11-12 17:46:02 (GMT)
commitebcded767e1e35a3431b4938cb9dd39b6b8ad188 (patch)
treeae59c29202d7095eecea81c745c494bb909f5312 /src
parent383b2ad709e8b03702c8590ce944639ddd471e7b (diff)
downloadpowder-ebcded767e1e35a3431b4938cb9dd39b6b8ad188.zip
powder-ebcded767e1e35a3431b4938cb9dd39b6b8ad188.tar.gz
First release of the mod
Diffstat (limited to 'src')
-rw-r--r--src/interface.c6
-rw-r--r--src/main.c6
-rw-r--r--src/powder.c47
3 files changed, 53 insertions, 6 deletions
diff --git a/src/interface.c b/src/interface.c
index 90684a3..7fae854 100644
--- a/src/interface.c
+++ b/src/interface.c
@@ -170,7 +170,7 @@ void add_sign_ui(pixel *vid_buf, int mx, int my)
draw_icon(vid_buf, x0+68, y0+42, 0x9E, ju == 1);
draw_icon(vid_buf, x0+86, y0+42, 0x9F, ju == 2);
- drawrect(vid_buf,x0+104,y0+42,26,15,255,255,255,255);
+
@@ -180,6 +180,8 @@ void add_sign_ui(pixel *vid_buf, int mx, int my)
drawtext(vid_buf, x0+138, y0+45, "\x85", 255, 255, 255, 255);
drawtext(vid_buf, x0+152, y0+46, "Delete", 255, 255, 255, 255);
drawrect(vid_buf, x0+134, y0+42, 50, 15, 255, 255, 255, 255);
+ drawrect(vid_buf,x0+104,y0+42,26,15,255,255,255,255);
+ drawtext(vid_buf, x0+110, y0+48, "Mv.", 255, 255, 255, 255);
}
drawtext(vid_buf, x0+5, y0+69, "OK", 255, 255, 255, 255);
@@ -196,7 +198,7 @@ void add_sign_ui(pixel *vid_buf, int mx, int my)
if(b && !bq && mx>=x0+86 && mx<=x0+103 && my>=y0+42 && my<=y0+59)
ju = 2;
- if(b && !bq && mx>=x0+104 && mx<=x0+130 && my>=y0+42 && my<=y0+59)
+ if(!nm && b && !bq && mx>=x0+104 && mx<=x0+130 && my>=y0+42 && my<=y0+59)
{
MSIGN = i;
break;
diff --git a/src/main.c b/src/main.c
index a16891f..8bb917a 100644
--- a/src/main.c
+++ b/src/main.c
@@ -102,8 +102,8 @@ int death = 0, framerender = 0;
int amd = 1;
int FPSB = 0;
int MSIGN =-1;
-int CGOL = 0;
-int GSPEED = 1;//causes my .exe to crash..
+//int CGOL = 0;
+//int GSPEED = 1;//causes my .exe to crash..
sign signs[MAXSIGNS];
@@ -2064,7 +2064,7 @@ int main(int argc, char *argv[])
if(currentTime-pastFPS>=1000)
{
#ifdef BETA
- sprintf(uitext, "Version %d (Beta %d) FPS:%d", SAVE_VERSION, MINOR_VERSION, FPS);
+ sprintf(uitext, "Cracker's Version %d (Beta %d) FPS:%d", SAVE_VERSION, MINOR_VERSION, FPS);
//printf("%s\n", uitext);
#else
sprintf(uitext, "Version %d.%d FPS:%d", SAVE_VERSION, MINOR_VERSION, FPS);
diff --git a/src/powder.c b/src/powder.c
index 97e6ae7..04999fb 100644
--- a/src/powder.c
+++ b/src/powder.c
@@ -929,7 +929,7 @@ void update_particles_i(pixel *vid, int start, int inc)
{
if(!(parts[i].life==10&&(parts[i].type==PT_LCRY||parts[i].type==PT_PCLN||parts[i].type==PT_HSWC)))
parts[i].life--;
- if(parts[i].life<=0 && t!=PT_METL && t!=PT_IRON && t!=PT_FIRW && t!=PT_PCLN && t!=PT_HSWC && t!=PT_WATR && t!=PT_RBDM && t!=PT_LRBD && t!=PT_SLTW && t!=PT_BRMT && t!=PT_PSCN && t!=PT_NSCN && t!=PT_NTCT && t!=PT_PTCT && t!=PT_BMTL && t!=PT_SPRK && t!=PT_LAVA && t!=PT_ETRD&&t!=PT_LCRY && t!=PT_INWR && t!=PT_GLOW)
+ if(parts[i].life<=0 && t!=PT_METL && t!=PT_IRON && t!=PT_FIRW && t!=PT_PCLN && t!=PT_HSWC && t!=PT_WATR && t!=PT_RBDM && t!=PT_LRBD && t!=PT_SLTW && t!=PT_BRMT && t!=PT_PSCN && t!=PT_NSCN && t!=PT_NTCT && t!=PT_PTCT && t!=PT_BMTL && t!=PT_SPRK && t!=PT_LAVA && t!=PT_ETRD&&t!=PT_LCRY && t!=PT_INWR && t!=PT_GLOW && t!= PT_FOG)
{
kill_part(i);
continue;
@@ -1995,6 +1995,51 @@ void update_particles_i(pixel *vid, int start, int inc)
}
}
}
+ else if(t==PT_FOG)
+ {
+ for(nx=-1; nx<2; nx++)
+ for(ny=-1; ny<2; ny++)
+ if(x+nx>=0 && y+ny>0 &&
+ x+nx<XRES && y+ny<YRES && (nx || ny))
+ {
+ r = pmap[y+ny][x+nx];
+ if((r>>8)>=NPART || !r)
+ continue;
+ if(pstates[parts[r>>8].type].state==ST_SOLID&&5>=rand()%50&&parts[i].life==0&&!(parts[r>>8].type==PT_CLNE||parts[r>>8].type==PT_PCLN))
+ {
+ t = parts[i].type = PT_RIME;
+ parts[i].vx = 0;
+ parts[i].vy = 0;
+ }
+ if(parts[r>>8].type==PT_SPRK)
+ {
+ parts[i].life += rand()%20;
+ }
+ }
+ }
+ else if(t==PT_RIME)
+ {
+ for(nx=-1; nx<2; nx++)
+ for(ny=-1; ny<2; ny++)
+ if(x+nx>=0 && y+ny>0 &&
+ x+nx<XRES && y+ny<YRES && (nx || ny))
+ {
+ r = pmap[y+ny][x+nx];
+ if((r>>8)>=NPART || !r)
+ continue;
+ rt = parts[r>>8].type;
+ if(rt==PT_SPRK)
+ {
+ t = parts[i].type = PT_FOG;
+ parts[i].life = rand()%50 + 60;
+ }
+ else if(rt==PT_FOG&&parts[r>>8].life>0)
+ {
+ t = parts[i].type = PT_FOG;
+ parts[i].life = parts[r>>8].life/2;
+ }
+ }
+ }
else if(t==PT_LCRY)
{
for(nx=-1; nx<2; nx++)