Jul 7, 2018


Additions:

  • Added more typed externs for built-in functions (matrices, clipboard, gml.sys.*, room manipulation, cameras...)
  • Added @:noRefWrite for mapping global arrays that should be written to without [@] (such as built-in ones).
  • Added @:dsMap for mapping typedefs to ds_maps (sample).

Improvements:

  • You no longer need to manually set sfgml_next when targeting GMS2 - if the output file is a .yy, the compiler directive is added automatically.
  • The library now automatically sets a few compiler directives based on target version features,
    • sfgml_array_create: whether array_create is supported (GMS2 and >1.4.1763)
    • sfgml_array_decl: whether [...] array initializer is supported (GMS2 and extensions in >1.4.1763)
    • sfgml_ternary: whether ternary operator is supported (GMS2 and extensions in >1.4.1763)
    • sfgml_copyset: whether copy-on-write array behaviour is safe to use (currently isn't)
    • sfgml_version: target version, as set by you or automatically set based on file extension (current 1.4/2.x)
    • sfgml_extension: whether compiling to an extension (rather than a script-set GML file)
    • sfgml_next: whether targeting GMS2.
  • Target GM version is now mentioned in the timestamp header (which can be disabled via -D sfgml_timestamp=false)

Changes:

  • sfgml_version is now in GM-style format (e.g. "1.4.1763" or "2.2").

Fixes:

  • Fixed (a == b) == c compiling incorrectly (not enough parentheses in generated code).
  • Fixed an occasional issue with postfix inline ++ being printed as += 1.
  • Fixed a few mismatches in gml.net.*  and asset externs.
  • The extension now prefers array_copy over copy-on-write trick because there's this strange YYC bug.
  • Fixed @:nativeGen enums reporting field paths ("my_enum_field") instead of names ("field") for getName.
  • Fixed SfEnumTools.setTo crashing on nativeGen enums in debug mode.
  • Fixed js.Boot not having a std-prefix.

Files

sfgml.zip 393 kB
Version Jul 7, 2018 Jul 07, 2018

Get sfgml - a Haxe»GameMaker compiler

Download NowName your own price

Leave a comment

Log in with itch.io to leave a comment.