changeset 4:6ad756581ef1

Added parpg.py and a default configuration.
author KarstenBock@gmx.net
date Thu, 12 Jan 2012 18:51:18 +0100
parents 30bcf64f483d
children 8da675d9f525
files parpg.cfg.default parpg.py
diffstat 2 files changed, 180 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/parpg.cfg.default	Thu Jan 12 18:51:18 2012 +0100
@@ -0,0 +1,137 @@
+[fife]
+# Options marked with ? are untested/unknown
+
+# Game window's title (string) DO NOT EDIT!
+WindowTitle = PARPG Techdemo 2
+
+# Icon to use for the game window's border (filename) DO NOT EDIT!
+WindowIcon = window_icon.png
+
+# Video driver to use. (?)
+VideoDriver = ""
+
+# Backend to use for graphics (OpenGL|SDL)
+RenderBackend = OpenGL 
+
+# Run the game in fullscreen mode or not. (True|False)
+FullScreen = False
+
+# Screen Resolution's width. Not used if FullScreen is set to False (800|1024|etc)
+ScreenWidth = 800
+
+# Screen Resolution's height. Not used if FullScreen is set to False (600|768|etc)
+ScreenHeight = 600
+
+# Screen DPI? (?)
+BitsPerPixel = 0
+
+# ? (?)
+SDLRemoveFakeAlpha = 1
+
+GLUseFramebuffer = True
+
+GLUseNPOT = True
+
+# The Sensitivity of the mouse. (-0.99 to 10.0)
+MouseSensitivity = 0.0
+
+# Sets whether the mouse should be accelerated. (True|False)
+MouseAcceleration = False
+
+# Subdirectory to load icons from (path)
+IconsPath = icons
+
+# ? ([R, G, B])
+ColorKey = [250, 0, 250]
+
+# ? (True|False)
+ColorKeyEnabled = False
+
+# Turn on sound effects and music (True|False)
+EnableSound = True
+
+# Initial volume of sound effects and music (0.0-100.0?)
+InitialVolume = 5.0
+
+# Characters to use to render fonts. DO NOT EDIT!
+FontGlyphs = " abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.,!?-+/():;%&`'*#=[]""
+
+# Subdirectory to load fronts from (path)
+FontsPath = fonts
+
+# Font to load when game starts
+#TODO: make it so that the font name is supplied instead of the filename
+Font = oldtypewriter.ttf
+
+# Size of in-game fonts
+DefaultFontSize = 12
+
+# ? (?)
+LogModules = [controller]
+
+# ? (?)
+PychanDebug = False
+
+# use Psyco Acceperation (True|False)
+UsePsyco = False
+
+# ? (?)
+ProfilingOn = False
+
+# Lighting Model to use (0-2)
+Lighting = 0
+
+[parpg]
+# System directory where all data files are located (path)
+DataPath = "./data"
+
+# System subdirectory to load maps from (path)
+MapsPath = maps
+
+# YAML file that contains the available maps (filename)
+MapsFile = maps.yaml
+
+# Map to load when game starts (filename)
+Map = Mall
+
+# ? (filename)
+AllAgentsFile = all_agents.yaml
+
+# System subdirectory to load objects from (path)
+ObjectsPath = objects
+
+# YAML file that contains the database of availabel objects (filename)
+ObjectDatabaseFile = object_database.yaml
+
+# System subdirectory to load dialogues from (path)
+DialoguesPath = dialogue
+
+# System subdirectory to load quests from (path)
+QuestsPath = quests
+
+# System subdirectory where gui files are loaded from (path)
+GuiPath = gui
+
+# System subdirectory where cursors are loaded from (path)
+CursorPath = cursors
+
+# File to use for default cursor (filename)
+CursorDefault = cursor_plain.png
+
+# File to use for up cursor (filename)
+CursorUp = cursor_up.png
+
+# File to use for right cursor (filename)
+CursorRight = cursor_right.png
+
+# File to use for down cursor (filename)
+CursorDown = cursor_down.png
+
+# File to use for left cursor (filename)
+CursorLeft = cursor_left.png
+
+# how many pixles to move the camera per time frame (digit)
+ScrollSpeed = 1.0
+
+# Player walk speed (digit)
+PCSpeed = 3
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/parpg.py	Thu Jan 12 18:51:18 2012 +0100
@@ -0,0 +1,43 @@
+#!/usr/bin/env python2 
+#   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/>.
+
+#TODO: Modularize this script
+import sys
+from optparse import OptionParser
+from os import path
+
+from parpg.main import main
+
+usage = ('usage: %prog [options] settings_path [system_path user_path]\n\n'
+         'The settings_path argument is mandatory and is the directory in \n'
+         'which your parpg.cfg file is located. Optionally, you may \n'
+         'specify where data files are located (system_path), and where \n'
+         'the user settings and data files should be saved to (user_path)\n\n'
+         'Example: python %prog .')
+
+parser = OptionParser(description='PARPG Launcher Script', usage=usage)
+parser.add_option('-f', '--logfile',
+                  help='Name of log file to save to')
+parser.add_option('-l', '--loglevel', default='critical',
+                  help='desired output level for log file')
+opts, args = parser.parse_args()
+
+if not args:
+    if path.isfile("./parpg.cfg"):
+        args =(".")
+    else:
+        parser.print_help()
+        sys.exit(1)
+
+main(args, opts)
\ No newline at end of file