diff --git a/src/game/GameController.cpp b/src/game/GameController.cpp index e029fc9ef..07f2722a1 100644 --- a/src/game/GameController.cpp +++ b/src/game/GameController.cpp @@ -54,7 +54,7 @@ void GameController::DrawPoints(queue & pointQueue) void GameController::Tick() { - gameModel->GetSimulation()->update_particles(); + //gameModel->GetSimulation()->update_particles(); } void GameController::SetPaused(bool pauseState) diff --git a/src/game/GameModel.cpp b/src/game/GameModel.cpp index 3d5a800aa..50f266fa4 100644 --- a/src/game/GameModel.cpp +++ b/src/game/GameModel.cpp @@ -5,7 +5,9 @@ #include "Renderer.h" GameModel::GameModel(): - activeElement(1) + activeElement(1), + sim(NULL), + ren(NULL) { sim = new Simulation(); ren = new Renderer(ui::Engine::Ref().g, sim); diff --git a/src/interface/Button.cpp b/src/interface/Button.cpp index 783c29747..659aeed7c 100644 --- a/src/interface/Button.cpp +++ b/src/interface/Button.cpp @@ -21,6 +21,7 @@ Button::Button(Window* parent_state, std::string buttonText): isMouseInside(false), isButtonDown(false), isTogglable(false), + toggle(false), actionCallback(NULL), textPosition(ui::Point(0, 0)), textVAlign(AlignMiddle), @@ -35,6 +36,7 @@ Button::Button(Point position, Point size, std::string buttonText): isMouseInside(false), isButtonDown(false), isTogglable(false), + toggle(false), actionCallback(NULL), textPosition(ui::Point(0, 0)), textVAlign(AlignMiddle), @@ -49,6 +51,7 @@ Button::Button(std::string buttonText): isMouseInside(false), isButtonDown(false), isTogglable(false), + toggle(false), actionCallback(NULL), textPosition(ui::Point(0, 0)), textVAlign(AlignMiddle), diff --git a/src/interface/Window.cpp b/src/interface/Window.cpp index e28d34bed..ca29be0db 100644 --- a/src/interface/Window.cpp +++ b/src/interface/Window.cpp @@ -7,7 +7,8 @@ using namespace ui; Window::Window(Point _position, Point _size): Position(_position), Size(_size), - focusedComponent_(NULL) + focusedComponent_(NULL), + AllowExclusiveDrawing(true) { } diff --git a/src/simulation/Air.cpp b/src/simulation/Air.cpp index b3826ab2d..3c88e91bb 100644 --- a/src/simulation/Air.cpp +++ b/src/simulation/Air.cpp @@ -117,8 +117,8 @@ void Air::update_airh(void) void Air::update_air(void) { - int x, y, i, j; - float dp, dx, dy, f, tx, ty; + int x = 0, y = 0, i = 0, j = 0; + float dp = 0.0f, dx = 0.0f, dy = 0.0f, f = 0.0f, tx = 0.0f, ty = 0.0f; for (y=0; ypv; hv = air->hv; + signs = (sign*)calloc(MAXSIGNS, sizeof(sign)); + //ptypes[0] = {"", PIXPACK(0x000000), 0.0f, 0.00f * CFDS, 1.00f, 0.00f, 0.0f, 0.0f, 0.00f, 0.000f * CFDS, 0, 0, 0, 0, 1, 1, 1, 100, 0, R_TEMP+0.0f +273.15f, 251, "Erases particles.", ST_NONE, 0, NULL, NULL}; //ptypes[1] = {"DUST", PIXPACK(0xFFE0A0), 0.7f, 0.02f * CFDS, 0.96f, 0.80f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 1, 10, 0, 0, 30, 1, 1, 85, 0, R_TEMP+0.0f +273.15f, 70, "Very light dust. Flammable.", ST_SOLID, TYPE_PART|PROP_LIFE_DEC|PROP_LIFE_KILL_DEC, NULL, &graphics_DUST}; //ptypes[2] = {"WATR", PIXPACK(0x2030D0), 0.6f, 0.01f * CFDS, 0.98f, 0.95f, 0.0f, 0.1f, 0.00f, 0.000f * CFDS, 2, 0, 0, 0, 20, 1, 1, 30, 0, R_TEMP-2.0f +273.15f, 29, "Liquid. Conducts electricity. Freezes. Extinguishes fires.", ST_LIQUID, TYPE_LIQUID|PROP_CONDUCTS|PROP_LIFE_DEC|PROP_NEUTPENETRATE, &update_WATR, NULL};