From: Jarda B. <edh...@us...> - 2006-07-08 14:29:33
|
Update of /cvsroot/gemrb/ie_shell/plugins In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv21729/plugins Modified Files: builtins.py core.py Log Message: Added new formats: bamc, tis, pro, vvc, wfx, partial wed Started work on compressed and encrypted streams Index: builtins.py =================================================================== RCS file: /cvsroot/gemrb/ie_shell/plugins/builtins.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** builtins.py 3 Jul 2006 18:15:36 -0000 1.5 --- builtins.py 8 Jul 2006 14:29:29 -0000 1.6 *************** *** 33,37 **** ################################################### ! def load_object (name): try: --- 33,37 ---- ################################################### ! def load_object (name, type = None): try: *************** *** 44,48 **** return FileStream(name).load_object () else: ! return ResourceStream(name).load_object () --- 44,48 ---- return FileStream(name).load_object () else: ! return ResourceStream(name, type).load_object () *************** *** 56,77 **** ################################################### ! def export_obj (name, filename, type = 0): """Exports resource `name' into file `filename'. If the `name' is not ! unique, specify resource type with `type'""" oo = core.keys.get_resref_by_name_re(name) ! if type != 0: oo = filter (lambda o: o['type'] == type, oo) ! if len (oo) > 1 and type == 0: print "More than one result" return ! o = oo[0] src_file = core.keys.bif_list[o['locator_src_ndx']] b = core.formats['BIFF'] (os.path.join (core.game_dir, src_file['file_name'])) b.decode_file () ! b.save_file_res (filename, b.file_list[o['locator_ntset_ndx']]) --- 56,78 ---- ################################################### ! def export_obj (name, filename, type = None, index = 0): """Exports resource `name' into file `filename'. If the `name' is not ! unique, specify resource type with `type' and eventually `index' if ! there's still more than one""" oo = core.keys.get_resref_by_name_re(name) ! if type != None: oo = filter (lambda o: o['type'] == type, oo) ! if len (oo) > 1 and type == None: print "More than one result" return ! o = oo[index] src_file = core.keys.bif_list[o['locator_src_ndx']] b = core.formats['BIFF'] (os.path.join (core.game_dir, src_file['file_name'])) b.decode_file () ! b.save_file_data (filename, b.file_list[o['locator_ntset_ndx']]) *************** *** 113,117 **** ################################################### ! def load_ids (name): def p (obj): obj.decode_file () --- 114,118 ---- ################################################### ! def load_ids (): def p (obj): obj.decode_file () Index: core.py =================================================================== RCS file: /cvsroot/gemrb/ie_shell/plugins/core.py,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** core.py 3 Jul 2006 18:15:36 -0000 1.5 --- core.py 8 Jul 2006 14:29:29 -0000 1.6 *************** *** 24,27 **** --- 24,30 ---- dialog_file = 'dialog.tlk' + xor_key = "\x88\xa8\x8f\xba\x8a\xd3\xb9\xf5\xed\xb1\xcf\xea\xaa\xe4\xb5\xfb\xeb\x82\xf9\x90\xca\xc9\xb5\xe7\xdc\x8e\xb7\xac\xee\xf7\xe0\xca\x8e\xea\xca\x80\xce\xc5\xad\xb7\xc4\xd0\x84\x93\xd5\xf0\xeb\xc8\xb4\x9d\xcc\xaf\xa5\x95\xba\x99\x87\xd2\x9d\xe3\x91\xba\x90\xca" + + global slash_trans slash_trans = string.maketrans ('\\', '/') |