diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2012-08-06 15:14:08 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2012-08-06 15:14:08 (GMT) |
| commit | 662640c96c86ba83132f0683c35bfba24b43783c (patch) | |
| tree | 5f0b5270d9410a683d45909e789c478c01d6d6e0 /src/graphics/Renderer.cpp | |
| parent | 0e43f2e83118897bc916db69a012f4686429d930 (diff) | |
| download | powder-662640c96c86ba83132f0683c35bfba24b43783c.zip powder-662640c96c86ba83132f0683c35bfba24b43783c.tar.gz | |
Fix previous merge with SOAP.cpp that created a bug in SOAP. add debug lines for PRTI, PRTO, WIFI and lines for SOAP.
Diffstat (limited to 'src/graphics/Renderer.cpp')
| -rw-r--r-- | src/graphics/Renderer.cpp | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/src/graphics/Renderer.cpp b/src/graphics/Renderer.cpp index c1f24da..20bef9d 100644 --- a/src/graphics/Renderer.cpp +++ b/src/graphics/Renderer.cpp @@ -1127,6 +1127,14 @@ void Renderer::render_parts() #endif //Pixel rendering + if (pixel_mode & EFFECT_LINES) + { + if (t==PT_SOAP) + { + if ((parts[i].ctype&7) == 7) + draw_line(nx, ny, (int)(parts[parts[i].tmp].x+0.5f), (int)(parts[parts[i].tmp].y+0.5f), colr, colg, colb, cola); + } + } if(pixel_mode & PSPEC_STICKMAN) { char buff[20]; //Buffer for HP @@ -1619,6 +1627,25 @@ void Renderer::render_parts() addpixel(nx+nxo, ny+nyo, colr, colg, colb, 255-orbd[r]); } } + if (pixel_mode & EFFECT_DBGLINES) + { + if (mousePosX == nx && mousePosY == ny)//draw lines connecting wifi/portal channels + { + int z; + int type = parts[i].type; + if (type == PT_PRTI) + type = PT_PRTO; + else if (type == PT_PRTO) + type = PT_PRTI; + for (z = 0; z<NPART; z++) { + if (parts[z].type) + { + if (parts[z].type==type&&parts[z].tmp==parts[i].tmp) + xor_line(nx,ny,(int)(parts[z].x+0.5f),(int)(parts[z].y+0.5f)); + } + } + } + } //Fire effects if(firea && (pixel_mode & FIRE_BLEND)) { @@ -2107,7 +2134,9 @@ Renderer::Renderer(Graphics * g, Simulation * sim): zoomEnabled(false), decorations_enable(1), gravityFieldEnabled(false), - gravityZonesEnabled(false) + gravityZonesEnabled(false), + mousePosX(-1), + mousePosY(-1) { this->g = g; this->sim = sim; |
