Fix some uninitialised variables
This commit is contained in:
parent
6a331fdaf8
commit
fa201a7aeb
@ -54,7 +54,7 @@ void GameController::DrawPoints(queue<ui::Point*> & pointQueue)
|
||||
|
||||
void GameController::Tick()
|
||||
{
|
||||
gameModel->GetSimulation()->update_particles();
|
||||
//gameModel->GetSimulation()->update_particles();
|
||||
}
|
||||
|
||||
void GameController::SetPaused(bool pauseState)
|
||||
|
@ -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);
|
||||
|
@ -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),
|
||||
|
@ -7,7 +7,8 @@ using namespace ui;
|
||||
Window::Window(Point _position, Point _size):
|
||||
Position(_position),
|
||||
Size(_size),
|
||||
focusedComponent_(NULL)
|
||||
focusedComponent_(NULL),
|
||||
AllowExclusiveDrawing(true)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -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; y<YRES/CELL; y++)
|
||||
for (x=0; x<XRES/CELL; x++)
|
||||
@ -294,7 +294,8 @@ void Air::update_air(void)
|
||||
memcpy(pv, opv, sizeof(pv));
|
||||
}
|
||||
}
|
||||
Air::Air()
|
||||
Air::Air():
|
||||
airMode(0)
|
||||
{
|
||||
//Simulation should do this.
|
||||
make_kernel();
|
||||
|
@ -3222,6 +3222,8 @@ Simulation::Simulation()
|
||||
pv = air->pv;
|
||||
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};
|
||||
|
Reference in New Issue
Block a user