Permalink
Browse files

Lots and lots of stuff. Got robots working.

  • Loading branch information...
simhacker
simhacker committed Jun 22, 2009
1 parent 509b0fa commit 4fc82383a74fda1bbdbc2e2be9822217ac31f4dd
Showing with 968 additions and 246 deletions.
  1. +28 −0 BUGS.txt
  2. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/dataColorMap.png
  3. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/icairp.png
  4. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/icairphi.png
  5. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/icchlk.png
  6. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/icchlkhi.png
  7. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/iccoal.png
  8. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/iccoalhi.png
  9. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/iccom.png
  10. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/iccomhi.png
  11. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/icdozr.png
  12. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/icdozrhi.png
  13. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/icersr.png
  14. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/icersrhi.png
  15. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/icfire.png
  16. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/icfirehi.png
  17. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/icind.png
  18. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/icindhi.png
  19. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/icnuc.png
  20. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/icnuchi.png
  21. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/icpark.png
  22. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/icparkhi.png
  23. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/icpol.png
  24. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/icpolhi.png
  25. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/icqry.png
  26. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/icqryhi.png
  27. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/icrail.png
  28. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/icrailhi.png
  29. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/icres.png
  30. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/icreshi.png
  31. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/icroad.png
  32. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/icroadhi.png
  33. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/icseap.png
  34. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/icseaphi.png
  35. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/icstad.png
  36. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/icstadhi.png
  37. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/icwire.png
  38. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/icwirehi.png
  39. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/obj1-0.png
  40. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/obj1-1.png
  41. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/obj1-2.png
  42. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/obj1-3.png
  43. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/obj1-4.png
  44. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/obj2-0.png
  45. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/obj2-1.png
  46. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/obj2-2.png
  47. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/obj2-3.png
  48. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/obj2-4.png
  49. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/obj2-5.png
  50. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/obj2-6.png
  51. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/obj2-7.png
  52. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/obj3-0.png
  53. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/obj3-1.png
  54. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/obj3-10.png
  55. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/obj3-2.png
  56. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/obj3-3.png
  57. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/obj3-4.png
  58. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/obj3-5.png
  59. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/obj3-6.png
  60. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/obj3-7.png
  61. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/obj3-8.png
  62. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/obj3-9.png
  63. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/obj4-0.png
  64. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/obj4-1.png
  65. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/obj4-2.png
  66. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/obj4-3.png
  67. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/obj4-4.png
  68. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/obj4-5.png
  69. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/obj4-6.png
  70. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/obj4-7.png
  71. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/obj5-0.png
  72. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/obj5-1.png
  73. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/obj5-10.png
  74. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/obj5-11.png
  75. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/obj5-12.png
  76. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/obj5-13.png
  77. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/obj5-14.png
  78. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/obj5-15.png
  79. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/obj5-2.png
  80. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/obj5-3.png
  81. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/obj5-4.png
  82. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/obj5-5.png
  83. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/obj5-6.png
  84. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/obj5-7.png
  85. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/obj5-8.png
  86. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/obj5-9.png
  87. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/obj6-0.png
  88. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/obj6-1.png
  89. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/obj6-2.png
  90. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/obj7-0.png
  91. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/obj7-1.png
  92. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/obj7-2.png
  93. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/obj7-3.png
  94. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/obj7-4.png
  95. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/obj7-5.png
  96. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/obj8-0.png
  97. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/obj8-1.png
  98. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/obj8-2.png
  99. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/obj8-3.png
  100. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/powerGridColorMap.png
  101. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/rateColorMap.png
  102. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/scenario1Icon.png
  103. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/scenario2Icon.png
  104. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/scenario3Icon.png
  105. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/scenario4Icon.png
  106. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/scenario5Icon.png
  107. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/scenario6Icon.png
  108. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/scenario7Icon.png
  109. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/scenario8Icon.png
  110. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/terrainColorMap.png
  111. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/tiles.png
  112. BIN MicropolisCore/src/images/{simEngine → micropolisEngine}/tiles_pixels.png
  113. +1 −1 MicropolisCore/src/makefile
  114. +4 −4 MicropolisCore/src/pyMicropolis/gtkFrontend/main.py
  115. +1 −1 MicropolisCore/src/pyMicropolis/makefile
  116. 0 MicropolisCore/src/pyMicropolis/{simEngine → micropolisEngine}/__init__.py
  117. 0 MicropolisCore/src/pyMicropolis/{simEngine → micropolisEngine}/eliza.py
  118. 0 MicropolisCore/src/pyMicropolis/{simEngine → micropolisEngine}/micropolisbudgetpanel.py
  119. 0 MicropolisCore/src/pyMicropolis/{simEngine → micropolisEngine}/micropoliscontrolpanel.py
  120. 0 MicropolisCore/src/pyMicropolis/{simEngine → micropolisEngine}/micropolisdisasterspanel.py
  121. +1 −1 MicropolisCore/src/pyMicropolis/{simEngine → micropolisEngine}/micropolisdrawingarea.py
  122. 0 MicropolisCore/src/pyMicropolis/{simEngine → micropolisEngine}/micropolisevaluationpanel.py
  123. 0 MicropolisCore/src/pyMicropolis/{simEngine → micropolisEngine}/micropolisevaluationview.py
  124. 0 MicropolisCore/src/pyMicropolis/{simEngine → micropolisEngine}/micropolisgaugeview.py
  125. +9 −4 MicropolisCore/src/pyMicropolis/{simEngine → micropolisEngine}/micropolisgenericengine.py
  126. 0 MicropolisCore/src/pyMicropolis/{simEngine → micropolisEngine}/micropolisgtkengine.py
  127. 0 MicropolisCore/src/pyMicropolis/{simEngine → micropolisEngine}/micropolishistorypanel.py
  128. 0 MicropolisCore/src/pyMicropolis/{simEngine → micropolisEngine}/micropolishistoryview.py
  129. 0 MicropolisCore/src/pyMicropolis/{simEngine → micropolisEngine}/micropolismappanel.py
  130. 0 MicropolisCore/src/pyMicropolis/{simEngine → micropolisEngine}/micropolismessagespanel.py
  131. 0 MicropolisCore/src/pyMicropolis/{simEngine → micropolisEngine}/micropolisnotebook.py
  132. 0 MicropolisCore/src/pyMicropolis/{simEngine → micropolisEngine}/micropolisnoticepanel.py
  133. 0 MicropolisCore/src/pyMicropolis/{simEngine → micropolisEngine}/micropolisnoticeview.py
  134. +74 −74 MicropolisCore/src/pyMicropolis/{simEngine → micropolisEngine}/micropolispiemenus.py
  135. +37 −3 MicropolisCore/src/pyMicropolis/{simEngine → micropolisEngine}/micropolisrobot.py
  136. +1 −1 MicropolisCore/src/pyMicropolis/{simEngine → micropolisEngine}/micropolisstartpanel.py
  137. 0 MicropolisCore/src/pyMicropolis/{simEngine → micropolisEngine}/micropolistool.py
  138. +69 −14 MicropolisCore/src/pyMicropolis/{simEngine → micropolisEngine}/micropolisturbogearsengine.py
  139. 0 MicropolisCore/src/pyMicropolis/{simEngine → micropolisEngine}/micropolisview.py
  140. +1 −1 MicropolisCore/src/pyMicropolis/{simEngine → micropolisEngine}/micropoliswebserver.py
  141. 0 MicropolisCore/src/pyMicropolis/{simEngine → micropolisEngine}/micropoliswindow.py
  142. +8 −6 laszlo/micropolis/classes/appview.lzx
  143. +5 −0 laszlo/micropolis/classes/edittileview.lzx
  144. +66 −18 laszlo/micropolis/classes/edittileviewpie.lzx
  145. +1 −1 laszlo/micropolis/classes/historyview.lzx
  146. +2 −0 laszlo/micropolis/classes/includes.lzx
  147. +1 −1 laszlo/micropolis/classes/libraryview.lzx
  148. +2 −1 laszlo/micropolis/classes/mypiemenu.lzx
  149. +1 −1 laszlo/micropolis/classes/piemenu.lzx
  150. +5 −0 laszlo/micropolis/classes/resources_images.lzx
  151. +175 −0 laszlo/micropolis/classes/robot.lzx
  152. +1 −1 laszlo/micropolis/classes/scenariosview.lzx
  153. +75 −7 laszlo/micropolis/classes/tileview.lzx
  154. +8 −0 laszlo/micropolis/classes/toolcursor.lzx
  155. +16 −0 laszlo/micropolis/classes/toolicon.lzx
  156. +60 −95 laszlo/micropolis/classes/toolpalette.lzx
  157. +293 −0 laszlo/micropolis/classes/tooltip.lzx
  158. +2 −2 laszlo/micropolis/resources/data/strings_de-DE.xml
  159. +9 −1 laszlo/micropolis/resources/data/strings_en-US.xml
  160. +2 −2 laszlo/micropolis/resources/data/strings_fr-FR.xml
  161. +4 −2 laszlo/micropolis/resources/data/strings_kr-KR.xml
  162. +5 −3 laszlo/micropolis/resources/data/strings_nl-NL.xml
  163. BIN laszlo/micropolis/resources/images/tool_airport.png
  164. BIN laszlo/micropolis/resources/images/tool_airporthi.png
  165. BIN laszlo/micropolis/resources/images/tool_bulldozer.png
  166. BIN laszlo/micropolis/resources/images/tool_bulldozerhi.png
  167. BIN laszlo/micropolis/resources/images/tool_center.png
  168. BIN laszlo/micropolis/resources/images/tool_centerhi.png
  169. BIN laszlo/micropolis/resources/images/tool_coalpower.png
  170. BIN laszlo/micropolis/resources/images/tool_coalpowerhi.png
  171. BIN laszlo/micropolis/resources/images/tool_commercial.png
  172. BIN laszlo/micropolis/resources/images/tool_commercialhi.png
  173. BIN laszlo/micropolis/resources/images/tool_firestation.png
  174. BIN laszlo/micropolis/resources/images/tool_firestationhi.png
  175. BIN laszlo/micropolis/resources/images/tool_industrial.png
  176. BIN laszlo/micropolis/resources/images/tool_industrialhi.png
  177. BIN laszlo/micropolis/resources/images/tool_nuclearpower.png
  178. BIN laszlo/micropolis/resources/images/tool_nuclearpowerhi.png
  179. BIN laszlo/micropolis/resources/images/tool_pacbot.png
  180. BIN laszlo/micropolis/resources/images/tool_pacbothi.png
  181. BIN laszlo/micropolis/resources/images/tool_park.png
  182. BIN laszlo/micropolis/resources/images/tool_parkhi.png
  183. BIN laszlo/micropolis/resources/images/tool_policestation.png
  184. BIN laszlo/micropolis/resources/images/tool_policestationhi.png
  185. BIN laszlo/micropolis/resources/images/tool_query.png
  186. BIN laszlo/micropolis/resources/images/tool_queryhi.png
  187. BIN laszlo/micropolis/resources/images/tool_railroad.png
  188. BIN laszlo/micropolis/resources/images/tool_railroadhi.png
  189. BIN laszlo/micropolis/resources/images/tool_residential.png
  190. BIN laszlo/micropolis/resources/images/tool_residentialhi.png
  191. BIN laszlo/micropolis/resources/images/tool_road.png
  192. BIN laszlo/micropolis/resources/images/tool_roadhi.png
  193. BIN laszlo/micropolis/resources/images/tool_seaport.png
  194. BIN laszlo/micropolis/resources/images/tool_seaporthi.png
  195. BIN laszlo/micropolis/resources/images/tool_stadium.png
  196. BIN laszlo/micropolis/resources/images/tool_stadiumhi.png
  197. BIN laszlo/micropolis/resources/images/tool_wire.png
  198. BIN laszlo/micropolis/resources/images/tool_wirehi.png
  199. +1 −1 turbogears/micropolis/controllers.py
View
@@ -115,3 +115,31 @@ http://blogs.adobe.com/air/2009/05/performance_tips_for_adobe_air.html
http://arno.org/arnotify/2009/05/writing-well-behaved-efficient-air-applications/
Bug in cherrypy socket flushing on mac.
http://www.cherrypy.org/ticket/598
/opt/local/lib/python2.5/site-packages/CherryPy-2.3.0-py2.5.egg/cherrypy/_cpwsgiserver.py
def tick(self):
try:
s, addr = self.socket.accept()
if not self.ready:
return
#if hasattr(s, 'settimeout'):
# s.settimeout(self.timeout)
s.settimeout(None)
request = self.RequestHandlerClass(s, addr, self)
self.requests.put(request)
/opt/local/lib/python2.5/site-packages/CherryPy-2.3.0-py2.5.egg/cherrypy/_cpwsgiserver3.py
def tick(self):
"""Accept a new connection and put it on the Queue."""
try:
s, addr = self.socket.accept()
if not self.ready:
return
#if hasattr(s, 'settimeout'):
# s.settimeout(self.timeout)
s.settimeout(None)
conn = self.ConnectionClass(s, addr, self)
self.requests.put(conn)
@@ -117,7 +117,7 @@ build_cellEngine:
# ----------------------------------------------------------------------
# build/install micropolisEngine
MICROPOLISENGINEDEST = pyMicropolis/simEngine
MICROPOLISENGINEDEST = pyMicropolis/micropolisEngine
build_micropolisEngine:
$(MAKE) -C MicropolisEngine build_python
@@ -5,8 +5,8 @@
"""
import pyMicropolis.simEngine
from pyMicropolis.simEngine import micropolisengine, micropolisgtkengine, micropoliswindow, micropolisrobot
import pyMicropolis.micropolisEngine
from pyMicropolis.micropolisEngine import micropolisengine, micropolisgtkengine, micropoliswindow, micropolisrobot
import gtk
import random
import math
@@ -23,15 +23,15 @@ def run():
if True:
for i in range(0, 4):
engine.addRobot(
micropolisrobot.MicropolisRobot_PacMan(
micropolisrobot.MicropolisRobot_PacBot(
x=(8 * 16) + 3 + (16 * 2 * i),
y=(7 * 16) + 3,
direction=0))
if False:
for i in range(0, 20):
engine.addRobot(
micropolisrobot.MicropolisRobot_PacMan(
micropolisrobot.MicropolisRobot_PacBot(
x=random.randint(0, (micropolisengine.WORLD_W * 16) - 1),
y=random.randint(0, (micropolisengine.WORLD_H * 16) - 1),
direction = random.randint(0, 3) * math.pi / 2))
@@ -69,7 +69,7 @@ clean:
rm -rf *~ *.pyc *.pyd *.so */?*~ */*.pyc */*.pyd */*.so \
tileEngine/tileengine.py \
cellEngine/cellengine.py \
simEngine/micropolisengine.py
micropolisEngine/micropolisengine.py
########################################################################
@@ -143,7 +143,7 @@
images = []
spriteData['images'] = images
for i in range(0, spriteData['frames']):
fileName = 'images/simEngine/obj%d-%d.png' % (
fileName = 'images/micropolisEngine/obj%d-%d.png' % (
spriteData['id'],
i,
)
@@ -683,19 +683,19 @@ def __init__(
self.dataColorMap = \
cairo.ImageSurface.create_from_png(
'images/simEngine/dataColorMap.png')
'images/micropolisEngine/dataColorMap.png')
self.rateColorMap = \
cairo.ImageSurface.create_from_png(
'images/simEngine/rateColorMap.png')
'images/micropolisEngine/rateColorMap.png')
self.powerGridColorMap = \
cairo.ImageSurface.create_from_png(
'images/simEngine/powerGridColorMap.png')
'images/micropolisEngine/powerGridColorMap.png')
self.terrainColorMap = \
cairo.ImageSurface.create_from_png(
'images/simEngine/terrainColorMap.png')
'images/micropolisEngine/terrainColorMap.png')
self.expressInterest(
self,
@@ -1644,6 +1644,11 @@ def removeRobot(self, robot):
robots.remove(robot)
def clearRobots(self):
for robot in list(self.robots):
self.removeRobot(robot)
def simRobots(self):
#print "SIMROBOTS"
for robot in self.robots:
Oops, something went wrong.

0 comments on commit 4fc8238

Please sign in to comment.