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

Binary file not shown.

Binary file not shown.

BIN
opl/genmidi/genmidi1.lmp Normal file

Binary file not shown.

Binary file not shown.