diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2012-04-07 23:11:21 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2012-04-07 23:11:21 (GMT) |
| commit | c88079d084f2f3b7ec891da22f8c497cd2652853 (patch) | |
| tree | ba24b70fb653b24a23e51c18a1d8d876233f71a5 /src/simulation/Simulation.cpp | |
| parent | bbfbb81086897d50b67bf1494ac150eb607add72 (diff) | |
| download | powder-c88079d084f2f3b7ec891da22f8c497cd2652853.zip powder-c88079d084f2f3b7ec891da22f8c497cd2652853.tar.gz | |
Element sampling HUD thingy (No very good with MVC)
Diffstat (limited to 'src/simulation/Simulation.cpp')
| -rw-r--r-- | src/simulation/Simulation.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/simulation/Simulation.cpp b/src/simulation/Simulation.cpp index 7b1dca8..b52907b 100644 --- a/src/simulation/Simulation.cpp +++ b/src/simulation/Simulation.cpp @@ -120,6 +120,15 @@ int Simulation::flood_prop(int x, int y, size_t propoffset, void * propvalue, in return 0; } +Particle Simulation::Get(int x, int y) +{ + if(pmap[y][x]) + return parts[pmap[y][x]>>8]; + if(photons[y][x]) + return parts[photons[y][x]>>8]; + return Particle(); +} + int Simulation::flood_parts(int x, int y, int fullc, int cm, int bm, int flags) { int c = fullc&0xFF; |
