summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-07-22 13:46:09 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-07-22 13:46:09 (GMT)
commitf445b80e8a0d97408aa6b7b7b62ef5a661ec6e99 (patch)
tree8257cf91666e4a4527b5580da24e6334d53ad250 /src
parentf7d8556965832821036c210ffc1f9e73f3ff70cc (diff)
downloadpowder-f445b80e8a0d97408aa6b7b7b62ef5a661ec6e99.zip
powder-f445b80e8a0d97408aa6b7b7b62ef5a661ec6e99.tar.gz
Strealine icon and Erase icon
Diffstat (limited to 'src')
-rw-r--r--src/game/GameView.cpp2
-rw-r--r--src/game/ToolButton.cpp2
-rw-r--r--src/graphics/Renderer.cpp40
3 files changed, 42 insertions, 2 deletions
diff --git a/src/game/GameView.cpp b/src/game/GameView.cpp
index 6b4a953..4b5a438 100644
--- a/src/game/GameView.cpp
+++ b/src/game/GameView.cpp
@@ -441,7 +441,7 @@ void GameView::NotifyToolListChanged(GameModel * sender)
currentX -= 31;
tempButton->SetActionCallback(new ToolAction(this, toolList[i]));
- VideoBuffer * tempTexture = toolList[i]->GetTexture(30, 18);
+ VideoBuffer * tempTexture = toolList[i]->GetTexture(26, 14);
tempButton->Appearance.SetTexture(tempTexture);
if(tempTexture)
delete tempTexture;
diff --git a/src/game/ToolButton.cpp b/src/game/ToolButton.cpp
index 21e19be..3021b40 100644
--- a/src/game/ToolButton.cpp
+++ b/src/game/ToolButton.cpp
@@ -42,7 +42,7 @@ void ToolButton::Draw(const ui::Point& screenPos)
if(Appearance.GetTexture())
{
- g->draw_image(Appearance.GetTexture(), screenPos.X, screenPos.Y, 255);
+ g->draw_image(Appearance.GetTexture(), screenPos.X+2, screenPos.Y+2, 255);
}
else
{
diff --git a/src/graphics/Renderer.cpp b/src/graphics/Renderer.cpp
index d91d30f..22cfacf 100644
--- a/src/graphics/Renderer.cpp
+++ b/src/graphics/Renderer.cpp
@@ -480,6 +480,46 @@ VideoBuffer * Renderer::WallIcon(int wallID, int width, int height)
newTexture->SetPixel(i, j, PIXR(pc), PIXG(pc), PIXB(pc), 255);
}
}
+ else if (wt == WL_ERASE)
+ {
+ for (j=0; j<height; j+=2)
+ {
+ for (i=1+(1&(j>>1)); i<width/2; i+=2)
+ {
+ newTexture->SetPixel(i, j, PIXR(pc), PIXG(pc), PIXB(pc), 255);
+ }
+ }
+ for (j=0; j<height; j++)
+ {
+ for (i=width/2; i<width; i++)
+ {
+ newTexture->SetPixel(i, j, PIXR(pc), PIXG(pc), PIXB(pc), 255);
+ }
+ }
+ for (j=4; j<width/2; j++)
+ {
+ newTexture->SetPixel(j+6, j, 0xFF, 0, 0, 255);
+ newTexture->SetPixel(j+7, j, 0xFF, 0, 0, 255);
+ newTexture->SetPixel(-j+21, j, 0xFF, 0, 0, 255);
+ newTexture->SetPixel(-j+22, j, 0xFF, 0, 0, 255);
+ }
+ }
+ else if(wt == WL_STREAM)
+ {
+ for (j=0; j<height; j++)
+ {
+ for (i=0; i<width; i++)
+ {
+ pc = i==0||i==width-1||j==0||j==height-1 ? PIXPACK(0xA0A0A0) : PIXPACK(0x000000);
+ newTexture->SetPixel(i, j, PIXR(pc), PIXG(pc), PIXB(pc), 255);
+ }
+ }
+ newTexture->SetCharacter(4, 3, 0x8D, 255, 255, 255, 255);
+ for (i=width/3; i<width; i++)
+ {
+ newTexture->SetPixel(i, 8+(int)(3.9f*cos(i*0.3f)), 255, 255, 255, 255);
+ }
+ }
return newTexture;
}