More reorganization.

This commit is contained in:
onpon4 2015-05-20 19:49:37 -04:00
parent f306825636
commit 46a80eb30b
6 changed files with 9 additions and 9 deletions

View File

@ -1,9 +1,9 @@
CXXFLAGS ?= -O2 -Wall -g
CXXFLAGS += `pkg-config --cflags sdl2 SDL2_image SDL2_mixer`
LIBS = `pkg-config --libs sdl2 SDL2_image SDL2_mixer`
OBJS = alien.o audio.o bullet.o cargo.o collectable.o explosion.o game.o globals.o graphics.o init.o intermission.o loadSave.o messages.o misc.o missions.o player.o resources.o script.o ship.o shop.o Starfighter.o title.o weapons.o
OBJS = alien.o audio.o bullet.o cargo.o collectable.o engine.o explosion.o game.o graphics.o init.o intermission.o loadSave.o messages.o misc.o missions.o player.o resources.o script.o ship.o shop.o Starfighter.o title.o weapons.o
VERSION = 1.3.3
VERSION = 1.3.4-dev
PROG = starfighter
DOCS = docs/*
DATA = data gfx sound music

View File

@ -29,7 +29,7 @@ int main(int argc, char **argv)
if (chdir(DATADIR) == -1)
printf("Warning: failed to change directory to \"%s\"\n", DATADIR);
defineGlobals(); // Must do this first!
engine_init(); // Must do this first!
cheatAttempt = false;
cheatCount = 0;

View File

@ -40,9 +40,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "bullet.h"
#include "cargo.h"
#include "collectable.h"
#include "engine.h"
#include "explosion.h"
#include "game.h"
#include "globals.h"
#include "graphics.h"
#include "init.h"
#include "intermission.h"

View File

@ -19,9 +19,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "Starfighter.h"
globalEngineVariables engine;
Engine engine;
void defineGlobals()
void engine_init()
{
engine.musicVolume = 100;
engine.useAudio = true;

View File

@ -20,8 +20,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifndef GLOBALS_H
#define GLOBALS_H
extern globalEngineVariables engine;
extern Engine engine;
void defineGlobals();
void engine_init();
#endif

View File

@ -240,7 +240,7 @@ enum keys {
KEY_LAST
};
struct globalEngineVariables {
struct Engine {
SDL_Event event;
int done;