From: Gwyn Ciesla Date: Thu, 24 Aug 2017 11:36:40 +0000 (-0500) Subject: 1.13 X-Git-Tag: 1.13 X-Git-Url: http://git.pulsar-zone.net/?a=commitdiff_plain;h=937f46252c551239e170deefee456c6f3e86886e;p=curblaster.git 1.13 Fix cppcheck warnings about uninitialized structs. --- diff --git a/main.cpp b/main.cpp index d75e1f8..e13909a 100644 --- a/main.cpp +++ b/main.cpp @@ -48,7 +48,7 @@ const int landershotmax = 10; const int landermax = 12; const int crawlermax = 6; const int missilemax = 3; -const float version = 1.12; +const float version = 1.13; int score; int lives; @@ -92,6 +92,8 @@ int main(int argc, char *argv[]){ player.xtrail[1] = 0; player.ytrail[0] = 0; player.ytrail[1] = 0; + player.phase = 0; + player.chase = -1; strcpy (player.line0, "<==_>"); strcpy (player.line1, "<_==>"); strcpy (player.radar, "="); @@ -123,6 +125,8 @@ int main(int argc, char *argv[]){ gatebeam1.speed = 0; gatebeam1.vspeed = 0; gatebeam1.vtime = 0; + gatebeam1.phase = 0; + gatebeam1.chase = -1; strcpy (gatebeam1.line0, " ] "); strcpy (gatebeam1.line1, " [ "); strcpy (gatebeam1.line2, " [ "); @@ -139,6 +143,8 @@ int main(int argc, char *argv[]){ gatebeam2.speed = 0; gatebeam2.vspeed = 0; gatebeam2.vtime = 0; + gatebeam2.phase = 0; + gatebeam2.chase = -1; strcpy (gatebeam2.line0, " ] "); strcpy (gatebeam2.line1, " [ "); strcpy (gatebeam2.line2, " [ "); @@ -155,6 +161,8 @@ int main(int argc, char *argv[]){ gatebeam3.speed = 0; gatebeam3.vspeed = 0; gatebeam3.vtime = 0; + gatebeam3.phase = 0; + gatebeam3.chase = -1; strcpy (gatebeam3.line0, " ] "); strcpy (gatebeam3.line1, " [ "); strcpy (gatebeam3.line2, " [ ");