Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Known 2.3 Compilation/Decompilation Errors #710

Open
4 of 23 tasks
Jacky720 opened this issue Dec 18, 2021 · 2 comments
Open
4 of 23 tasks

Known 2.3 Compilation/Decompilation Errors #710

Jacky720 opened this issue Dec 18, 2021 · 2 comments

Comments

@Jacky720
Copy link
Contributor

Jacky720 commented Dec 18, 2021

This is a list of errors I have thus far encountered when reviewing compilation for Deltarune Chapter 1&2.

Crashes:

  • Assignment to variables which share names with scripts (gml_Object_obj_CHAPTER_SELECT_Create_0)
  • Local function recognition (gml_Object_obj_darkfountain_Draw_0)
  • Something with decompilation of a local assignment yields var a += (gml_Object_obj_queen_bulletcontroller_Step_0)
  • 8bf886f buffer_get_surface now should accept fewer arguments (gml_Object_obj_shapepuzzle_Draw_0)
  • @@ functions (gml_Object_obj_tensionbar_Draw_0)
  • Instance IDs with dot notation (several room start entries)
  • e5ada74 Scripts. While I have made some progress on assembling these (hackalicious branch), the offsets in references still need to be adjusted.

Non-matching:

  • setowner calls. Currently, I'm ignoring these, which really helps.
  • Weird decompilation of a while loop as a while loop inside an identical if statement (gml_Object_DEVICE_CHOICE_ch1_Step_0)
  • Code duplication in decompilation of breaks in loops. I think this has actually been around before 2.3; as I recall, Undertale narrowly avoids it using the profile system. (gml_Object_DEVICE_FAILURE_Step_0)
    There is a similar issue in some for loops, apparently without the break statement; this may indicate an undecompiled continue? (gml_Object_lang_sprite_layer_hider_Create_0)
  • Array ++/-- calls do not compile correctly. (gml_Object_DEVICE_MENU_Step_0)
  • Global array ++/-- calls do not decompile correctly. (gml_Object_obj_battlecontroller_Step_0)
  • Several collision events are compiling with bf or b instructions shooting just short of instructions they should come after, including popenvs, popzs, and even bs (gml_Object_o_coaster_jama_Collision_o_coaster_hero)
  • 5a6e45a room_speed is being popped as a Self variable, not a Builtin? (gml_Object_o_boxingcontroller_Create_0)
  • Assigning other objects' alarms needs a conv (to variable) instruction in 2.3. (gml_Object_o_boxingqueen_Step_0)
  • 5a6e45a Builtin arrays are incorrectly compiling as Self, including the -5/-1 bit that is still used in 2.3. (gml_Object_o_coaster_berdly_Step_0)
  • Something is incorrect (maybe use of the bool type?) in compiling a complex if clause. (gml_Object_obj_alleyswitch_Step_0)
  • instance_exists(self) should compile using @@This@@. Likewise with other. (gml_Object_obj_battle_cleanup_Alarm_0)
  • Some apparently useless b instructions (going where the code was going anyway) are being dropped. (gml_Object_obj_battletester_Draw_64) This also seems to show up in profile-less Undertale.
  • Ternaries with ? 1 : 0 are simplified in decompilation to use the condition directly. (gml_Object_obj_berdlyb2_enemy_Step_0)
  • Anonymous script offsets are still not corrected, but this appears to only be an issue for exact 1:1 saving; the game runs with only minor tweaks after CheckDecompiler.
  • Anything with multiple functions becomes a mess.
  • return statements in ifs do not compile (gml_GlobalScript_scr_drawpart_crop).
  • And more... Le sigh.
@Miepee
Copy link
Contributor

Miepee commented Jun 12, 2022

Some of these have seperate issues. Might wanna collect them here.
The return statement in an if statement i.e. sounds like #900

@colinator27
Copy link
Member

Most of these should be fixed by #2056, specifically aside from setowner/array owners not being implemented yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants