Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
executable file 66 lines (57 sloc) 2.695 kB
#!/usr/bin/python
'''
This file is part of nodereviver
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 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
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
@author: Vincent Petry <PVince81@yahoo.fr>
'''
from nodereviver.config import Config
import optparse
def main():
config = Config()
parser = optparse.OptionParser(description='Node Reviver')
parser.add_option('--disable-sound', action="store_true",
dest='disableSound',
default=False, help='disable sound')
parser.add_option('--game', action="store_true", default=True,
dest='game',
help='runs the game (default)')
parser.add_option('--editor', action="store_true", default=False,
dest='editor',
help='runs the level editor (buggy)')
parser.add_option('--fullscreen', action="store_true", default=config.fullScreen,
dest='fullScreen',
help='runs the game in full screen mode')
parser.add_option('--startlevel', action="store", default=1,
dest='startLevel', type=int,
help='specifies the start level number (cheat mode)')
parser.add_option('--datapath', action="store", default=config.dataPath,
dest='dataPath', type=str,
help='specifies the data path')
parser.add_option('--controls', action="store_true", default=config.controls,
dest='controls',
help='Displays UI buttons (suitable for touch screens)')
(args, rest) = parser.parse_args()
config.startLevel = args.startLevel
config.sound = not args.disableSound
config.dataPath = args.dataPath
config.fullScreen = args.fullScreen
config.controls = args.controls
if args.editor:
from nodereviver.editor import Editor
editor = Editor(config)
editor.run()
elif args.game:
from nodereviver.game import Game
game = Game(config)
game.run()
if __name__ == '__main__':
main()
Jump to Line
Something went wrong with that request. Please try again.