Feature: Simplify MapScripts
SBird1337 opened this issue · comments
Philipp AUER commented
Currently in order to use the Gen III MapScript feature one has to use a raw
statement.
Since each map has to have at a MapScript header even if it is empty, it would be nice to have support for that from PoryScript.
One way to go about this could be, to define the MapScripts directly inside a dedicated environment, which could look like
mapscripts MyMap_MapScripts {
mapscript MAP_SCRIPT_ON_TRANSITION {
lockall
...
releaseall
}
}
and would compile to the MapScript header as well as the individual scripts defined in it, or an empty header blob.
MyMap_MapScripts::
map_script MAP_SCRIPT_ON_TRANSITION MyMap_MapScripts_mapscript1
.byte 0
MyMap_MapScripts_mapscript1:
lockall
...
releaseall
return
Marcus Huderle commented