Commits

Anonymous committed b5c9a2e

fresh graphics

Comments (0)

Files changed (31)

base copy.png

Added
New image

deadFighter10PxA-1.png

Added
New image

deadFighter10PxA-2.png

Added
New image

deadFighter10PxA-3.png

Added
New image

deadFighter10PxA-4.png

Added
New image

deadFighter10PxA-5.png

Added
New image

deadFighter10PxA-6.png

Added
New image

deadFighter10PxA-7.png

Added
New image

deadFighter10PxA-8.png

Added
New image

effectsIcon.png

Added
New image

generator-produced.png

Added
New image

generator.png

Added
New image

generator0.png

Added
New image

motherDead-1.png

Added
New image

motherDead-2.png

Added
New image

motherDead-3.png

Added
New image

motherDead-4.png

Added
New image

motherDead-5.png

Added
New image

motherDead-6.png

Added
New image

motherDead-7.png

Added
New image

motherDead-8.png

Added
New image

musicIcon.png

Added
New image

needGrand0-v2.png

Added
New image

needGrand1-v2.png

Added
New image

needStuff-v2.png

Added
New image

pad1.png

Added
New image

pyconsole_functions.py

+# coding=UTF8
+# Copyright © 2010 Rob Leachman
+# Please see the file COPYING in this distribution for license information
+import enviro
+import pygame
+
+def fps(display=True):
+    '''\
+    Display frames per second
+    Parameters:
+       display - True=do display, False=don't display
+    '''
+    
+    enviro.displayFPS = display
+
+def credits(n):
+    '''\
+    Cheat - set credits
+    Parameters:
+       n - Number of credits to add
+    '''
+    
+    print n
+    enviro.credits += n
+    enviro.writeCredits(enviro.credits)
+    return n
+
+def line(start_pos, end_pos, color=[0,0,0], width=1):
+	'''\
+	Call pygame.draw.line
+	Parameters:
+		start_pos - x,y coordinate of start point
+		end_pos - x,y coordinate of end point
+		color - Line color in RGB format
+		width - Line thickness 
+	'''
+	pygame.draw.line(enviro.screen, color, start_pos, end_pos, width)

pyconsole_syntax.py

+# coding=UTF8
+# Copyright © 2010 Rob Leachman
+# Please see the file COPYING in this distribution for license information
+import re
+# # # # # # # # # # # # # # # # # # 
+# An Example of User Defined Syntax 
+#(Familiarity with regex is assumed)
+# --------------------------------- 
+# First create a regular expression to match the syntax you want      
+re_add = re.compile(r'(?P<left_op>\S+)\s*[+]\s*(?P<right_op>\S+)')
+# This one allows us to find things that match "x + y" where x and y  
+# are integers.						
+#
+# Then we define a function.        
+# The console will always pass itself as the first argument, 
+# and the SRE_Match object as the second.
+#
+# Everything in the match group will be a string at first so you need
+# to convert each element to its correct type, the console can handle this
+# with the console.convert_token method
+# perform whatever operation you wish to perform (don't foget
+# to validate the input, at the very least enclose it in a try..except block)
+# Then output it to the console, or do whatever you want with the data.
+def console_add(console, match):
+	left = console.convert_token(match.group("left_op"))
+	right = console.convert_token(match.group("right_op"))
+	try:
+		out = left + right
+	except Exception, strerror:
+		console.output(strerror)
+	else:
+		console.output(out)
+	return out
+
+# # # # # # # # # # # # # # # # # #
+# Another Example, this one       #
+# lets you call functions like:   #
+# name(arg1,arg2,...,argn)        #
+re_function = re.compile(r'(?P<name>\S+)(?P<params>[\(].*[\)])')
+def console_func(console, match):
+	func = console.convert_token(match.group("name"))
+	params = console.convert_token(match.group("params"))
+	
+	
+	if not isinstance(params, tuple):
+		params = [params]
+	
+	try:
+		out = func(*params)
+	except Exception, strerror:
+		console.output(strerror)
+	else:
+		console.output(out)

road1.png

Added
New image

road2.png

Added
New image

road3.png

Added
New image