Skip to content

Commit

Permalink
Merge pull request #968 from Miepee/23methods
Browse files Browse the repository at this point in the history
Add some GMS2.3 Methods
  • Loading branch information
Grossley authored Jun 12, 2022
2 parents 4b9ab96 + 01995a4 commit a582f62
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
17 changes: 17 additions & 0 deletions UndertaleModLib/Compiler/BuiltinList.cs
Original file line number Diff line number Diff line change
Expand Up @@ -844,6 +844,17 @@ public void Initialize(UndertaleData data)
Functions["texture_get_height"] = new FunctionInfo(this, 1);
Functions["texture_global_scale"] = new FunctionInfo(this, 1);
Functions["texture_get_uvs"] = new FunctionInfo(this, 1);
if (data?.GeneralInfo?.Major >= 2)
{
Functions["texture_prefetch"] = new FunctionInfo(this, 1);
Functions["texture_flush"] = new FunctionInfo(this, 1);
Functions["texture_debug_messages"] = new FunctionInfo(this, 1);
Functions["texture_is_ready"] = new FunctionInfo(this, 1);
Functions["texturegroup_get_textures"] = new FunctionInfo(this, 1);
Functions["texturegroup_get_sprites"] = new FunctionInfo(this, 1);
Functions["texturegroup_get_fonts"] = new FunctionInfo(this, 1);
Functions["texturegroup_get_tilesets"] = new FunctionInfo(this, 1);
}
if (data?.GeneralInfo?.Major >= 2 || data?.GeneralInfo?.Minor >= 3) // Since 1.3?
{
Functions["draw_enable_swf_aa"] = new FunctionInfo(this, 1);
Expand Down Expand Up @@ -1093,6 +1104,12 @@ public void Initialize(UndertaleData data)
Functions["array_equals"] = new FunctionInfo(this, 2);
Functions["array_create"] = new FunctionInfo(this, -1);
Functions["array_copy"] = new FunctionInfo(this, 5);
if (data?.GMS2_3 == true)
{
Functions["method"] = new FunctionInfo(this, 2);
Functions["method_get_self"] = new FunctionInfo(this, 1);
Functions["method_get_index"] = new FunctionInfo(this, 1);
}
Functions["typeof"] = new FunctionInfo(this, 1);
Functions["variable_global_exists"] = new FunctionInfo(this, 1);
Functions["variable_global_get"] = new FunctionInfo(this, 1);
Expand Down
1 change: 1 addition & 0 deletions UndertaleModTool/Resources/GML.xshd
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
<Word>then</Word>
<Word>mod</Word>
<Word>div</Word>
<Word>@@this@@</Word>
</Keywords>

<!-- Some macros -->
Expand Down

0 comments on commit a582f62

Please sign in to comment.