Project: Starfighter
Copyright (C) 2003 Parallel Realities
Copyright (C) 2011, 2012 Guus Sliepen
-Copyright (C) 2015 Julian Marchant
+Copyright (C) 2015, 2016 onpon4 <onpon4@riseup.net>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
}
}
- atexit(cleanUp);
+ atexit(engine_cleanup);
- initGraphics();
- initSystem(); // Opens video mode and sound
+ gfx_init();
+ engine_setMode();
loadFont();
if (cheatAttempt && !engine.cheat)
{
- clearScreen(black);
- drawString("That doesn't work anymore", -1, 285, FONT_WHITE);
- drawString("Try harder...", -1, 315, FONT_WHITE);
- updateScreen();
+ screen_clear(black);
+ screen_renderString("That doesn't work anymore", -1, 285, FONT_WHITE);
+ screen_renderString("Try harder...", -1, 315, FONT_WHITE);
+ renderer_update();
SDL_Delay(2000);
- clearScreen(black);
- updateScreen();
+ screen_clear(black);
+ renderer_update();
SDL_Delay(500);
}
- freeGraphics();
+ gfx_free();
audio_loadSounds();
initWeapons();
- initVars();
+
+ srand(time(NULL));
+
+ if (engine.useAudio)
+ {
+ Mix_Volume(-1, 100);
+ Mix_VolumeMusic(engine.musicVolume);
+ }
+
alien_defs_init();
- setColorIndexes();
+ colors_init();
showStory();
case 2:
if (game.stationedPlanet == -1)
- doCutscene(0);
+ cutscene_init(0);
section = game_mainLoop();
break;
}