2011-08-24 14:14:44 +02:00
|
|
|
/*
|
|
|
|
Copyright (C) 2003 Parallel Realities
|
2015-03-01 21:37:32 +01:00
|
|
|
Copyright (C) 2011, 2012, 2013 Guus Sliepen
|
|
|
|
Copyright (C) 2015 Julian Marchant
|
2011-08-24 14:14:44 +02:00
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU General Public License
|
2015-02-26 17:20:36 +01:00
|
|
|
as published by the Free Software Foundation; either version 3
|
2011-08-24 14:14:44 +02:00
|
|
|
of the License, or (at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
2015-02-26 17:20:36 +01:00
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
2011-08-24 14:14:44 +02:00
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
2015-02-26 17:20:36 +01:00
|
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
2011-08-24 14:14:44 +02:00
|
|
|
*/
|
|
|
|
|
2011-08-26 21:29:04 +02:00
|
|
|
#include "Starfighter.h"
|
|
|
|
|
2015-05-21 01:49:37 +02:00
|
|
|
Engine engine;
|
2011-08-24 14:14:44 +02:00
|
|
|
|
2015-05-21 01:49:37 +02:00
|
|
|
void engine_init()
|
2011-08-24 14:14:44 +02:00
|
|
|
{
|
|
|
|
engine.musicVolume = 100;
|
2011-08-26 16:14:58 +02:00
|
|
|
engine.useAudio = true;
|
2011-08-24 14:14:44 +02:00
|
|
|
|
2012-03-11 15:21:38 +01:00
|
|
|
engine.maxAliens = 9;
|
2011-08-24 14:14:44 +02:00
|
|
|
|
2012-03-11 15:21:38 +01:00
|
|
|
engine.ssx = 0;
|
2011-08-24 14:14:44 +02:00
|
|
|
engine.ssy = 0;
|
2015-02-27 05:23:08 +01:00
|
|
|
engine.smx = 0;
|
|
|
|
engine.smy = 0;
|
2011-08-24 14:14:44 +02:00
|
|
|
|
2012-03-11 15:21:38 +01:00
|
|
|
engine.bulletHead = new object;
|
2011-08-24 14:14:44 +02:00
|
|
|
engine.bulletHead->next = NULL;
|
|
|
|
engine.bulletTail = engine.bulletHead;
|
|
|
|
|
|
|
|
engine.explosionHead = new object;
|
|
|
|
engine.explosionHead->next = NULL;
|
|
|
|
engine.explosionTail = engine.explosionHead;
|
|
|
|
|
|
|
|
engine.collectableHead = new collectables;
|
|
|
|
engine.collectableHead->next = NULL;
|
|
|
|
engine.collectableTail = engine.collectableHead;
|
|
|
|
|
|
|
|
engine.debrisHead = new object;
|
|
|
|
engine.debrisHead->next = NULL;
|
|
|
|
engine.debrisTail = engine.debrisHead;
|
|
|
|
|
|
|
|
engine.commsSection = 0;
|
|
|
|
|
2013-09-30 16:52:43 +02:00
|
|
|
for (int i = 0; i < KEY_LAST; i++)
|
2012-03-11 15:21:38 +01:00
|
|
|
engine.keyState[i] = 0;
|
2011-08-24 14:14:44 +02:00
|
|
|
|
2012-03-11 15:21:38 +01:00
|
|
|
engine.eventTimer = 0;
|
2011-08-24 14:14:44 +02:00
|
|
|
engine.counter2 = 0;
|
|
|
|
engine.timeTaken = 0;
|
|
|
|
engine.timeMission = 0;
|
|
|
|
engine.counter = 0;
|
|
|
|
engine.seconds = 0;
|
|
|
|
engine.minutes = 0;
|
2011-08-26 16:14:58 +02:00
|
|
|
engine.paused = false;
|
2011-08-24 14:14:44 +02:00
|
|
|
engine.gameSection = SECTION_TITLE;
|
|
|
|
|
2011-08-26 16:14:58 +02:00
|
|
|
engine.cheat = false;
|
|
|
|
engine.cheatShield = false;
|
|
|
|
engine.cheatAmmo = false;
|
|
|
|
engine.cheatCash = false;
|
2011-08-24 14:14:44 +02:00
|
|
|
}
|