Skip to content

v0.2.0

Compare
Choose a tag to compare
@jac3km4 jac3km4 released this 17 Apr 16:06

Feature changes

  • added a basic module system (87da71f)
// the module header is optional
// if you don't define one then all the definitions in the file will be added to the global scope
module MyMod
// you can import all (public) definitions from a module
import MySharedModule.*
// or import specific ones
import MyHelpers.StringBuilder
// import MyHelpers.{StringBuilder, HashMap} is also allowed

// public definitions are automatically exported and available in other modules
// you'd access it through import MyMod.DoStuff
public func DoStuff() {}
  • added for-in syntax for loops (5c6c83c)
for photoModeItem in photoModeItmsArr {
  RPGManager.SendPhotoModeItemUnlockRequest(gi, photoModeItem);
}
  • added array literal syntax (5e976a0)
for i in [0, 1, 2, 3] {
  Log(ToString(i));
}
  • added support for custom enum definitions (9d5c2c8)
enum Direction {
  Left = 0,
  Right = 1,
}
  • added support for break statements (in loops and switches) (1d84389)
  • exposed both WeakRefToBool and RefToBool as a new IsDefined operation (supported in the decompiler as well) (22a92ac)
  • added support for a script manifest file laying the groundwork for basic mod management (r6/scripts/redscript.toml) (71e3106)
  • added support for character escapes in strings (f1834a1 thanks to @flibX0r)
  • relaxed the handling of number literals (e.g. 1 can be assigned to Float etc.) (7e768ba)
  • various decompiler improvements (c827850, 113798f, 9be4825, 83ef9a8)

Bugfixes

  • fixed a codegen issue present when multiple switch cases matched the same body (1d84389)
  • fix an issue with some classes that were inaccessible before due to missing type definitions (9ffa48f)
  • many others...