Split out version-dependent definitions into separate files.

Subversion-branch: /research
Subversion-revision: 1886
This commit is contained in:
Simon Howard 2010-04-17 23:05:39 +00:00
parent f3ce33db78
commit bc3814b018
5 changed files with 10 additions and 1 deletions

View file

@ -83,6 +83,9 @@ def set_config(name)
for config in configs for config in configs
if name == config::NAME if name == config::NAME
include config include config
return
end end
end end
raise "Unknown configuration: #{name}"
end end

View file

@ -1,6 +1,9 @@
#!/usr/bin/env ruby #!/usr/bin/env ruby
require "json" require "json"
require "common"
set_config(ARGV[1])
def read_block(file) def read_block(file)
result = "" result = ""
@ -34,7 +37,7 @@ end
File.open(ARGV[0]) do |file| File.open(ARGV[0]) do |file|
current_str = "" current_str = ""
file.seek(554068 ) file.seek(STRINGS_OFFSET)
offset = 0 offset = 0
start_offset = nil start_offset = nil

View file

@ -8,6 +8,7 @@ NUM_MOBJS=161
STATE_OFFSET=0x8bf04 STATE_OFFSET=0x8bf04
MOBJINFO_OFFSET=606956 MOBJINFO_OFFSET=606956
STRINGS_OFFSET=554068
# Locations of action pointer functions for Heretic 1.0. Hand-constructed. # Locations of action pointer functions for Heretic 1.0. Hand-constructed.

View file

@ -8,6 +8,7 @@ NUM_MOBJS=160
STATE_OFFSET=0x8e8b4 STATE_OFFSET=0x8e8b4
MOBJINFO_OFFSET=617600 MOBJINFO_OFFSET=617600
STRINGS_OFFSET=563284
# Locations of action pointer functions for Heretic 1.2. Hand-constructed. # Locations of action pointer functions for Heretic 1.2. Hand-constructed.

View file

@ -8,6 +8,7 @@ NUM_MOBJS=160
STATE_OFFSET=0x8e8b4 STATE_OFFSET=0x8e8b4
MOBJINFO_OFFSET=617600 MOBJINFO_OFFSET=617600
STRINGS_OFFSET=563284
# Action pointers for Heretic 1.3. # Action pointers for Heretic 1.3.