summaryrefslogtreecommitdiff
path: root/src/interface.old/Sandbox.cpp
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-01-17 20:46:06 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-01-17 20:46:06 (GMT)
commit4a60b97c700c2f1843b7e99313554cb89fb5da4e (patch)
tree3b33ef6f74a4e8a4ff5968a81b9c4c429ccaa7c6 /src/interface.old/Sandbox.cpp
parent6273089bf486bf46ad325d72c7290ebb272bd3d8 (diff)
downloadpowder-4a60b97c700c2f1843b7e99313554cb89fb5da4e.zip
powder-4a60b97c700c2f1843b7e99313554cb89fb5da4e.tar.gz
Some minor changes
Diffstat (limited to 'src/interface.old/Sandbox.cpp')
-rw-r--r--src/interface.old/Sandbox.cpp76
1 files changed, 0 insertions, 76 deletions
diff --git a/src/interface.old/Sandbox.cpp b/src/interface.old/Sandbox.cpp
deleted file mode 100644
index 5e29bae..0000000
--- a/src/interface.old/Sandbox.cpp
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Sandbox.cpp
- *
- * Created on: Jan 8, 2012
- * Author: Simon
- */
-
-#include <iostream>
-
-#include "Config.h"
-
-#include "interface/Sandbox.h"
-#include "interface/Component.h"
-#include "Renderer.h"
-#include "Simulation.h"
-
-namespace ui {
-
-Sandbox::Sandbox():
- Component(0, 0, XRES, YRES),
- ren(NULL),
- isMouseDown(false),
- activeElement(1)
-{
- sim = new Simulation();
-}
-
-Simulation * Sandbox::GetSimulation()
-{
- return sim;
-}
-
-void Sandbox::OnMouseMovedInside(int localx, int localy, int dx, int dy)
-{
- if(isMouseDown)
- {
- sim->create_line(lastCoordX, lastCoordY, localx, localy, 2, 2, activeElement, 0);
- lastCoordX = localx;
- lastCoordY = localy;
- }
-}
-
-void Sandbox::OnMouseDown(int localx, int localy, unsigned int button)
-{
- sim->create_line(localx, localy, localx, localy, 2, 2, activeElement, 0);
- lastCoordX = localx;
- lastCoordY = localy;
- isMouseDown = true;
-}
-
-void Sandbox::OnMouseUp(int localx, int localy, unsigned int button)
-{
- sim->create_line(lastCoordX, lastCoordY, localx, localy, 2, 2, activeElement, 0);
- lastCoordX = localx;
- lastCoordY = localy;
- isMouseDown = false;
-}
-
-void Sandbox::Draw(void* userdata)
-{
- Graphics * g = reinterpret_cast<Graphics*>(userdata);
- if(!ren)
- ren = new Renderer(g, sim);
- ren->render_parts();
-}
-
-void Sandbox::Tick(float delta)
-{
- sim->update_particles();
-}
-
-Sandbox::~Sandbox() {
- // TODO Auto-generated destructor stub
-}
-
-} /* namespace ui */