/* * * Universes * * Copyright (C) 2006-2007 Alejandro Valenzuela Roca, * * http://mexinetica.com/~lanjoe9 * * This file is part of MotorJ, a free framework for videogame development. * * * MotorJ is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * MotorJ is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with MotorJ. If not, see . */ // Include your universes header files in universes.h // Create your universe instances in this file, below #include "universes.h" extern mjApplication App; Universe * menu; Universe * game; Universe * create_universes() { Universe * result; menu = new MenuUniverse(); game = new GameUniverse(); menu->Init(); // Add all universes to the application's universes list list_append(0, (void *) menu, &App.universes); list_append(1, (void *) game, &App.universes); result = menu; // since we assume we're not going to switch universes immediately: result->SetNextUniverse(result); return result; }