diff options
| author | jacob1 <jfu614@gmail.com> | 2013-05-16 04:20:07 (GMT) |
|---|---|---|
| committer | jacob1 <jfu614@gmail.com> | 2013-05-16 04:20:07 (GMT) |
| commit | 81876a93a30ad71018009a60aed9ede0b43533ab (patch) | |
| tree | add327177f1ce77a6f2752d34a13f312062e8962 /src/simulation/elements | |
| parent | 5ad819efbd4dd745d315d6a238fd0aa11af7be31 (diff) | |
| download | powder-81876a93a30ad71018009a60aed9ede0b43533ab.zip powder-81876a93a30ad71018009a60aed9ede0b43533ab.tar.gz | |
redo some brush drawing stuff to remove useless checks, and to allow for replace mode in the future
Diffstat (limited to 'src/simulation/elements')
| -rw-r--r-- | src/simulation/elements/GEL.cpp | 1 | ||||
| -rw-r--r-- | src/simulation/elements/SPRK.cpp | 2 | ||||
| -rw-r--r-- | src/simulation/elements/STKM.cpp | 6 |
3 files changed, 7 insertions, 2 deletions
diff --git a/src/simulation/elements/GEL.cpp b/src/simulation/elements/GEL.cpp index 8ea7f0f..462fe83 100644 --- a/src/simulation/elements/GEL.cpp +++ b/src/simulation/elements/GEL.cpp @@ -158,6 +158,7 @@ int Element_GEL::graphics(GRAPHICS_FUNC_ARGS) *colr = q*(32-255)/120+255; *colg = q*(48-186)/120+186; *colb = q*208/120; + *pixel_mode |= PMODE_BLUR; return 0; } diff --git a/src/simulation/elements/SPRK.cpp b/src/simulation/elements/SPRK.cpp index a8b40f7..e289798 100644 --- a/src/simulation/elements/SPRK.cpp +++ b/src/simulation/elements/SPRK.cpp @@ -85,7 +85,7 @@ int Element_SPRK::update(UPDATE_FUNC_ARGS) nearp = sim->nearest_part(i, PT_ETRD, -1); if (nearp!=-1 && sim->parts_avg(i, nearp, PT_INSL)!=PT_INSL) { - sim->CreateLine(x, y, (int)(parts[nearp].x+0.5f), (int)(parts[nearp].y+0.5f), 0, 0, PT_PLSM, 0); + sim->CreateLine(x, y, (int)(parts[nearp].x+0.5f), (int)(parts[nearp].y+0.5f), PT_PLSM); sim->part_change_type(i,x,y,ct); ct = parts[i].ctype = PT_NONE; parts[i].life = 20; diff --git a/src/simulation/elements/STKM.cpp b/src/simulation/elements/STKM.cpp index 65fe189..93d5158 100644 --- a/src/simulation/elements/STKM.cpp +++ b/src/simulation/elements/STKM.cpp @@ -421,7 +421,11 @@ int Element_STKM::run_stickman(playerst* playerp, UPDATE_FUNC_ARGS) { { int np = -1; if (playerp->elem == SPC_AIR) - sim->CreateParts(rx + 3*((((int)playerp->pcomm)&0x02) == 0x02) - 3*((((int)playerp->pcomm)&0x01) == 0x01), ry, 4, 4, SPC_AIR, 0); + { + for(int j = -4; j < 5; j++) + for (int k = -4; k < 5; k++) + sim->create_part(-2, rx + 3*((((int)playerp->pcomm)&0x02) == 0x02) - 3*((((int)playerp->pcomm)&0x01) == 0x01)+j, ry+k, SPC_AIR); + } else if (playerp->elem==PT_LIGH && playerp->frames<30)//limit lightning creation rate np = -1; else |
