mirror of https://github.com/AbePralle/FGB.git
[Tools] Updated MapMaker source for current version of Rogue
This commit is contained in:
parent
8f28ba3a27
commit
52f004b8d9
|
@ -26,7 +26,7 @@ endRoutine
|
||||||
|
|
||||||
routine launcher_folder->String
|
routine launcher_folder->String
|
||||||
local result = Build.LAUNCHER_FOLDER
|
local result = Build.LAUNCHER_FOLDER
|
||||||
result = File.expand_filepath( result )
|
result = File.expand_path( result )
|
||||||
return File.without_trailing_separator( result )
|
return File.without_trailing_separator( result )
|
||||||
endRoutine
|
endRoutine
|
||||||
|
|
||||||
|
@ -224,7 +224,7 @@ class Build [singleton]
|
||||||
|
|
||||||
method dispatch_command
|
method dispatch_command
|
||||||
local m = find_command( rogo_command )
|
local m = find_command( rogo_command )
|
||||||
require m
|
require m || "no such routine rogo_$()" (rogo_command)
|
||||||
|
|
||||||
local args = @[]
|
local args = @[]
|
||||||
forEach (arg in rogo_args)
|
forEach (arg in rogo_args)
|
||||||
|
@ -236,10 +236,10 @@ class Build [singleton]
|
||||||
endWhich
|
endWhich
|
||||||
endForEach
|
endForEach
|
||||||
if (m.parameter_count == 1 and args.count > 1) args = @[ args ] # Wrap args in a ValueList.
|
if (m.parameter_count == 1 and args.count > 1) args = @[ args ] # Wrap args in a ValueList.
|
||||||
m.call( Global, args )
|
m( args )
|
||||||
|
|
||||||
method find_command( name:String )->MethodInfo
|
method find_command( name:String )->MethodInfo
|
||||||
return <<Global>>.find_method( rogo_prefix + name )
|
return <<Global>>.find_global_method( rogo_prefix + name )
|
||||||
|
|
||||||
method on_error
|
method on_error
|
||||||
Console.error.println "=" * 79
|
Console.error.println "=" * 79
|
||||||
|
@ -352,7 +352,7 @@ routine rogo_help( command="":String )
|
||||||
|
|
||||||
println "USAGE"
|
println "USAGE"
|
||||||
local lines = String[]
|
local lines = String[]
|
||||||
forEach (m in <<Global>>.methods)
|
forEach (m in <<Global>>.global_methods)
|
||||||
if (m.name.begins_with(Build.rogo_prefix))
|
if (m.name.begins_with(Build.rogo_prefix))
|
||||||
lines.add( " " + get_syntax(m.name.after_first(Build.rogo_prefix)) )
|
lines.add( " " + get_syntax(m.name.after_first(Build.rogo_prefix)) )
|
||||||
endIf
|
endIf
|
||||||
|
@ -367,7 +367,7 @@ routine get_syntax( m_name:String )->String
|
||||||
if (Build.rogo_syntax.contains(m_name))
|
if (Build.rogo_syntax.contains(m_name))
|
||||||
return "rogo " + Build.rogo_syntax[ m_name ]
|
return "rogo " + Build.rogo_syntax[ m_name ]
|
||||||
else
|
else
|
||||||
local m = <<Global>>.find_method( Build.rogo_prefix + m_name )
|
local m = <<Global>>.find_global_method( Build.rogo_prefix + m_name )
|
||||||
if (not m) return null
|
if (not m) return null
|
||||||
local line = "rogo $" (m_name.replacing('_',' '))
|
local line = "rogo $" (m_name.replacing('_',' '))
|
||||||
line += " <$>" (m.parameter_name(forEach in 0..<m.parameter_count))
|
line += " <$>" (m.parameter_name(forEach in 0..<m.parameter_count))
|
||||||
|
|
|
@ -340,7 +340,7 @@ class Graphics [singleton]
|
||||||
local left = Bitmap[]
|
local left = Bitmap[]
|
||||||
local up = Bitmap[]
|
local up = Bitmap[]
|
||||||
local down = Bitmap[]
|
local down = Bitmap[]
|
||||||
facings.add( up ).add( left ).add( down ).add( right )
|
facings.[ add(up), add(left), add(down), add(right) ]
|
||||||
forEach (tile in tiles from first_actor)
|
forEach (tile in tiles from first_actor)
|
||||||
right.add( tile )
|
right.add( tile )
|
||||||
up.add( tile.cloned.[rotate_90(&ccw)] )
|
up.add( tile.cloned.[rotate_90(&ccw)] )
|
||||||
|
|
Loading…
Reference in New Issue