Add patch list for Doom 1, and make dumper script take a filename

argument.

Subversion-branch: /research
Subversion-revision: 1669
This commit is contained in:
Simon Howard 2009-09-12 19:11:36 +00:00
parent 122074db7b
commit 1ebf5809ac
6 changed files with 6 additions and 5 deletions

View file

@ -65,7 +65,7 @@ end
def read_instruments(filename)
instruments = []
File.open("genmidi.lmp") do |file|
File.open("genmidi1.lmp") do |file|
header = file.read(8)
if header != "#OPL_II#"
@ -103,7 +103,7 @@ def display_instruments(instruments)
padding = 25 - instrument.name.length
print " " * padding
print "(#{instrument.flags}) "
print "(#{instrument.fine_tuning},#{instrument.flags}) "
print data_to_s(instrument.voice1_data)
print "|"
@ -187,12 +187,12 @@ def write_sbi(filename, instruments, start_instrument)
end
end
if ARGV.length < 1
puts "Usage: genmidi-dumper [ -sbi | -txt ]"
if ARGV.length < 2
puts "Usage: genmidi-dumper [ -sbi | -txt ] <filename>"
exit(0)
end
instruments = read_instruments("genmidi.lmp")
instruments = read_instruments(ARGV[1])
if ARGV[0] == "-sbi"
write_sbi("std.o3", instruments[0, 128], 0)
@ -200,3 +200,4 @@ if ARGV[0] == "-sbi"
elsif ARGV[0] == "-txt"
display_instruments(instruments)
end

Binary file not shown.

Binary file not shown.

BIN
opl/genmidi/genmidi1.lmp Normal file

Binary file not shown.

Binary file not shown.