diff --git a/includes/powder.h b/includes/powder.h index 9e63d61e0..89e1c0bfd 100644 --- a/includes/powder.h +++ b/includes/powder.h @@ -140,6 +140,7 @@ #define PT_DRIC 81 #define PT_CBNW 82 #define PT_STOR 83 +#define PT_PVOD 84 #define PT_SPNG 90 #define PT_RIME 91 @@ -327,6 +328,7 @@ int update_CO2(UPDATE_FUNC_ARGS); int update_CBNW(UPDATE_FUNC_ARGS); int update_STOR(UPDATE_FUNC_ARGS); int update_BIZR(UPDATE_FUNC_ARGS); +int update_PVOD(UPDATE_FUNC_ARGS); int update_MISC(UPDATE_FUNC_ARGS); int update_legacy_PYRO(UPDATE_FUNC_ARGS); @@ -490,7 +492,7 @@ static const part_type ptypes[PT_NUM] = {"DRIC", PIXPACK(0xE0E0E0), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, -0.0005f* CFDS, 0, 0, 0, 0, 20, 1, 1, 100, SC_SOLIDS, 172.65f, 2, "Dry Ice.", ST_SOLID, TYPE_SOLID, NULL}, {"BUBW", PIXPACK(0x2030D0), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 20, 1, 1, 30, SC_LIQUID, R_TEMP-2.0f +273.15f, 29, "Carbonated water. Conducts electricity. Freezes. Extinguishes fires.", ST_LIQUID, TYPE_LIQUID|PROP_CONDUCTS|PROP_LIFE_DEC|PROP_NEUTPENETRATE, &update_CBNW}, {"STOR", PIXPACK(0x50DFDF), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_POWERED, R_TEMP+0.0f +273.15f, 251, "Solid. Stores a single particle, releases when charged with PSCN, also passes to PIPE", ST_NONE, TYPE_SOLID, &update_STOR}, - /*FREE*/{"MOVE", PIXPACK(0xFFFFFF), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 0, 0, 100, SC_LIFE, 9000.0f, 40, "'Move' particles! Does not move things.. it is a life type B368/S245", ST_NONE, TYPE_SOLID|PROP_LIFE, NULL}, + {"PVOD", PIXPACK(0x792020), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, SC_POWERED, R_TEMP+0.0f +273.15f, 251, "Solid. When activated, destroys entering particles", ST_NONE, TYPE_SOLID, &update_PVOD}, /*FREE*/{"PGOL", PIXPACK(0xE05010), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 0, 0, 100, SC_LIFE, 9000.0f, 40, "Pseudo Life! B357/S238", ST_NONE, TYPE_SOLID|PROP_LIFE, NULL}, /*FREE*/{"DMOE", PIXPACK(0x500000), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 0, 0, 100, SC_LIFE, 9000.0f, 40, "Diamoeba! B35678/S5678", ST_NONE, TYPE_SOLID|PROP_LIFE, NULL}, /*FREE*/{"34", PIXPACK(0x500050), 0.0f, 0.00f * CFDS, 0.90f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 0, 0, 0, 100, SC_LIFE, 9000.0f, 40, "34! B34/S34)", ST_NONE, TYPE_SOLID|PROP_LIFE, NULL}, @@ -663,7 +665,7 @@ static part_transition ptransitions[PT_NUM] = /* DRIC */ {IPL, NT, IPH, NT, ITL, NT, 195.65f,PT_CO2}, /* CBNW */ {IPL, NT, IPH, NT, 273.15f,PT_ICEI, 373.0f, PT_WTRV}, /* STOR */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, - /*FREE*//* GOL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, + /* STOR */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, /*FREE*//* GOL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, /*FREE*//* GOL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, /*FREE*//* GOL */ {IPL, NT, IPH, NT, ITL, NT, ITH, NT}, diff --git a/src/graphics.c b/src/graphics.c index d8798c185..305674241 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -1854,7 +1854,7 @@ void draw_parts(pixel *vid) draw_line(vid , nx, ny+3, player2[11], player2[12], 100, 100, 255, s); draw_line(vid , player2[11], player2[12], player2[15], player2[16], 100, 100, 255, s); } - if (cmode==CM_NOTHING && t!=PT_PIPE && t!=PT_SWCH && t!=PT_LCRY && t!=PT_PUMP && t!=PT_GPMP && t!=PT_PBCN && t!=PT_FILT && t!=PT_HSWC && t!=PT_PCLN && t!=PT_DEUT && t!=PT_WIFI && t!=PT_LIFE)//nothing display but show needed color changes + if (cmode==CM_NOTHING && t!=PT_PIPE && t!=PT_SWCH && t!=PT_LCRY && t!=PT_PUMP && t!=PT_GPMP && t!=PT_PBCN && t!=PT_FILT && t!=PT_HSWC && t!=PT_PCLN && t!=PT_DEUT && t!=PT_WIFI && t!=PT_LIFE && t!=PT_PVOD)//nothing display but show needed color changes { if (t==PT_PHOT) { @@ -1914,7 +1914,7 @@ void draw_parts(pixel *vid) t!=PT_LCRY && t!=PT_SWCH && t!=PT_PCLN && t!=PT_PUMP && t!=PT_HSWC && t!=PT_FILT && t!=PT_GPMP && t!=PT_PBCN && t!=PT_LIFE && - t!=PT_O2 && t!=PT_H2) + t!=PT_O2 && t!=PT_H2 && t!=PT_PVOD) { if (ptypes[parts[i].type].properties&TYPE_LIQUID) //special effects for liquids in fancy mode { @@ -3067,6 +3067,22 @@ void draw_parts(pixel *vid) blendpixel(vid, nx-1, ny+1, GR, 10, 10, 112); } } + else if (t==PT_PVOD) + { + uint8 GR = 0x3B+((parts[i].life>10?10:parts[i].life)*16); + vid[ny*(XRES+BARSIZE)+nx] = PIXRGB(GR, 30, 30); + if (cmode == CM_BLOB) { + blendpixel(vid, nx+1, ny, GR, 30, 30, 223); + blendpixel(vid, nx-1, ny, GR, 30, 30, 223); + blendpixel(vid, nx, ny+1, GR, 30, 30, 223); + blendpixel(vid, nx, ny-1, GR, 30, 30, 223); + + blendpixel(vid, nx+1, ny-1, GR, 30, 30, 112); + blendpixel(vid, nx-1, ny-1, GR, 30, 30, 112); + blendpixel(vid, nx+1, ny+1, GR, 30, 30, 112); + blendpixel(vid, nx-1, ny+1, GR, 30, 30, 112); + } + } else if (t==PT_PUMP) { uint8 GR = 0x3B+((parts[i].life>10?10:parts[i].life)*19); diff --git a/src/main.c b/src/main.c index 34bc99d72..398400ea3 100644 --- a/src/main.c +++ b/src/main.c @@ -151,9 +151,9 @@ static const char *it_msg = "The spacebar can be used to pause physics.\n" "'P' will take a screenshot and save it into the current directory.\n" "\n" - "\bgCopyright (c) 2008-11 Stanislaw K Skowronek (\brhttp://powder.unaligned.org\bg, \bbirc.unaligned.org #wtf\bg)\n" - "\bgCopyright (c) 2010-11 Simon Robertshaw, Skresanov Savely, cracker64, Bryan Hoyle, Nathan Cousins, jacksonmj,\n" - " Lieuwe Mosch\n" + "Contributors: \bgStanislaw K Skowronek (\brhttp://powder.unaligned.org\bg, \bbirc.unaligned.org #wtf\bg),\n" + "\bgSimon Robertshaw, Skresanov Savely, cracker64, Catelite, Bryan Hoyle, Nathan Cousins, jacksonmj,\n" + "\bgLieuwe Mosch, Anthony Boot\n" "\n" "\bgTo use online features such as saving, you need to register at: \brhttp://powdertoy.co.uk/Register.html" ; diff --git a/src/powder.c b/src/powder.c index e7afe4e3e..465158d8a 100644 --- a/src/powder.c +++ b/src/powder.c @@ -119,6 +119,8 @@ void init_can_move() can_move[t][PT_INVIS] = 3; //stop CNCT being displaced by other particles can_move[t][PT_CNCT] = 0; + //Powered void behaviour varies on powered state + can_move[t][PT_PVOD] = 3; } for (t=0;t>8].life == 10){ + if (parts[i].type == PT_STKM) + { + player[27] = 0; + } + if (parts[i].type == PT_STKM2) + { + player2[27] = 0; + } + parts[i].type=PT_NONE; + } + return 0; + } if ((r&0xFF)==PT_BHOL || (r&0xFF)==PT_NBHL) //this is where blackhole eats particles { if (parts[i].type == PT_STKM)