[game-baker commit] r303 - trunk/trunk

0 views
Skip to first unread message

codesite...@google.com

unread,
Feb 21, 2009, 12:56:39 PM2/21/09
to game-ba...@googlegroups.com
Author: timwintle
Date: Sat Feb 21 09:55:21 2009
New Revision: 303

Modified:
trunk/trunk/gbfileio.py

Log:
Updated gbfileio to a new file version number - you can now open old .gb
files

Modified: trunk/trunk/gbfileio.py
==============================================================================
--- trunk/trunk/gbfileio.py (original)
+++ trunk/trunk/gbfileio.py Sat Feb 21 09:55:21 2009
@@ -1,4 +1,10 @@
-VERSION_NUMBER = 0
+VERSION_NUMBER = 1
+"""
+Versions:
+ version 0: origional
+ version 1: gamebaker 0.3.0 onwards
+ * Added "sounds" property to games
+"""

def get_type_string(typ):
if typ == "game":
@@ -66,6 +72,11 @@
elif method == "pickle":
game = unpickle(s)

+ if typ == "game":
+ if version < 1:
+ # have to add "sounds" property
+ if game.__dict__.get("sounds") is None:
+ game.sounds = {}
return game


Reply all
Reply to author
Forward
0 new messages