Changes

483 bytes added ,  21:23, 18 October 2010
Line 37: Line 37:  
:ETA: Added example of unpacking a WAD file. [[User:Dashxdr|Dashxdr]] 23:18, 17 October 2010 (CEST)
 
:ETA: Added example of unpacking a WAD file. [[User:Dashxdr|Dashxdr]] 23:18, 17 October 2010 (CEST)
 
::Thanks, they're working well. I'll try and work out WAD packing, and add it if I can work it out :p. BTW, I feel its perhaps better to have "sys.argv[2]" as the second argument, so that the user can choose the folder to unpack to. But I guess that's down to personal preference, and a programmer should be able to modify it accordingly. Thanks again. --[[User:SifJar|SifJar]] 21:12, 18 October 2010 (CEST)
 
::Thanks, they're working well. I'll try and work out WAD packing, and add it if I can work it out :p. BTW, I feel its perhaps better to have "sys.argv[2]" as the second argument, so that the user can choose the folder to unpack to. But I guess that's down to personal preference, and a programmer should be able to modify it accordingly. Thanks again. --[[User:SifJar|SifJar]] 21:12, 18 October 2010 (CEST)
 +
::I tried WAD packing, but I can't get it to work. Here's what I got so far:
 +
<pre>
 +
import Wii, sys
 +
 +
if(len(sys.argv) < 3):
 +
print "Usage: python wadpack.py <input> <output> ..."
 +
sys.exit(0)
 +
 +
wadf = Wii.WAD.loadDir(sys.argv[1])
 +
wadf.dump(sys.argv[2])
 +
</pre>
 +
::I had a look at your code, and I couldn't really see where the "loadFile" function came from? I dunno, perhaps I should learn Python a little before attempting this :p --[[User:SifJar|SifJar]] 21:23, 18 October 2010 (CEST)
363

edits