mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-15 06:08:35 +00:00
GRIFFON: Fix use of uninitialized variables reported by valgrind
This commit is contained in:
parent
cb65fc2671
commit
adbd5cfd54
@ -54,8 +54,18 @@ namespace Griffon {
|
||||
|
||||
void GriffonEngine::initialize() {
|
||||
// init char *_floatstri[kMaxFloat]
|
||||
for (int i = 0; i < kMaxFloat; i++)
|
||||
for (int i = 0; i < kMaxFloat; i++) {
|
||||
_floatText[i].text = (char *)malloc(64); // 64 bytes each string (should be enough)
|
||||
_floatText[i].framesLeft = 0;
|
||||
_floatText[i].x = 0;
|
||||
_floatText[i].y = 0;
|
||||
_floatText[i].col = 0;
|
||||
|
||||
_floatIcon[i].framesLeft = 0;
|
||||
_floatIcon[i].x = 0;
|
||||
_floatIcon[i].y = 0;
|
||||
_floatIcon[i].ico = 0;
|
||||
}
|
||||
|
||||
_video = new Graphics::TransparentSurface;
|
||||
_video->create(320, 240, g_system->getScreenFormat());
|
||||
@ -491,8 +501,11 @@ void GriffonEngine::loadMap(int mapnum) {
|
||||
INPUT("%i", &_npcInfo[i].item3);
|
||||
INPUT("%i", &_npcInfo[i].script);
|
||||
|
||||
_npcInfo[i].cframe = 0;
|
||||
_npcInfo[i].frame = 0;
|
||||
_npcInfo[i].frame2 = 0;
|
||||
_npcInfo[i].attackattempt = 0;
|
||||
_npcInfo[i].ticks = 0;
|
||||
|
||||
// baby dragon
|
||||
if (_npcInfo[i].spriteset == kMonsterBabyDragon) {
|
||||
|
Loading…
Reference in New Issue
Block a user