Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

some more explicit initialisations

  • Loading branch information...
commit 9c688116e1eb202acc6e1e648a819201f3a26b0d 1 parent 92278ab
Jaka Kranjc lynxlynxlynx authored
1  gemrb/core/GUI/Console.cpp
View
@@ -47,6 +47,7 @@ Console::Console(const Region& frame)
HistPos = 0;
HistMax = 0;
palette = NULL;
+ font = NULL;
}
Console::~Console(void)
1  gemrb/core/GUI/Control.cpp
View
@@ -45,6 +45,7 @@ Control::Control(const Region& frame)
Changed = true;
InHandler = false;
VarName[0] = 0;
+ ControlID = 0;
Value = 0;
Flags = 0;
Tooltip = NULL;
7 gemrb/core/GUI/GameControl.cpp
View
@@ -81,7 +81,9 @@ GameControl::GameControl(const Region& frame)
//this is the default action, individual actors should have one too
//at this moment we use only this
//maybe we don't even need it
- spellCount = 0;
+ spellCount = spellIndex = spellOrItem = spellSlot = 0;
+ spellUser = NULL;
+ spellName[0] = 0;
user = NULL;
lastActorID = 0;
trackerID = 0;
@@ -92,9 +94,11 @@ GameControl::GameControl(const Region& frame)
drawPath = NULL;
pfs.null();
lastCursor = IE_CURSOR_NORMAL;
+ StartX = StartY = lastMouseX = lastMouseY = 0;
moveX = moveY = 0;
scrolling = false;
numScrollCursor = 0;
+ DoubleClick = false;
DebugFlags = 0;
AIUpdateCounter = 1;
AlwaysRun = false; //make this a game flag if you wish
@@ -113,6 +117,7 @@ GameControl::GameControl(const Region& frame)
DialogueFlags = 0;
dialoghandler = new DialogHandler();
DisplayText = NULL;
+ DisplayTextTime = 0;
}
//TODO:
3  gemrb/core/GUI/MapControl.cpp
View
@@ -87,6 +87,9 @@ MapControl::MapControl(const Region& frame)
ScrollY = 0;
NotePosX = 0;
NotePosY = 0;
+ MapWidth = MapHeight = ViewWidth = ViewHeight = 0;
+ XCenter = YCenter = 0;
+ lastMouseX = lastMouseY = 0;
mouseIsDown = false;
MarkDirty();
convertToGame = true;
2  gemrb/core/GUI/ScrollBar.cpp
View
@@ -37,7 +37,7 @@ ScrollBar::ScrollBar(const Region& frame)
Pos = 0;
Value = 0;
State = 0;
- stepPx = 0;
+ stepPx = SliderYPos = 0;
ResetEventHandler( ScrollBarOnChange );
ta = NULL;
for(int i=0;i<SB_RES_COUNT;i++) {
2  gemrb/core/GUI/TextArea.cpp
View
@@ -40,6 +40,7 @@ TextArea::TextArea(const Region& frame, Color hitextcolor, Color initcolor, Colo
keeplines = 100;
rows = 0;
TextYPos = 0;
+ ticks = starttime = 0;
startrow = 0;
minrow = 0;
Cursor = NULL;
@@ -59,6 +60,7 @@ TextArea::TextArea(const Region& frame, Color hitextcolor, Color initcolor, Colo
tmp.g = 152;
tmp.b = 102;
lineselpal = core->CreatePalette( tmp, lowtextcolor );
+ ftext = finit = NULL;
}
TextArea::~TextArea(void)
2  gemrb/core/GUI/WorldMapControl.cpp
View
@@ -43,6 +43,8 @@ WorldMapControl::WorldMapControl(const Region& frame, const char *font, int dire
ScrollX = 0;
ScrollY = 0;
MouseIsDown = false;
+ lastMouseX = lastMouseY = 0;
+ lastCursor = 0;
Area = NULL;
Value = direction;
Game* game = core->GetGame();
Please sign in to comment.
Something went wrong with that request. Please try again.