YoYoGames / GameMaker-Bugs

Public tracking for GameMaker bugs
13 stars 5 forks source link

Typed Handles p2 #3165

Closed iampremo closed 8 months ago

gnysek commented 11 months ago

Seems it's about assets in asset tree. Resources from Asset tree will be in P1, so this might be about audio_bus, buffers, cameras, fx, mp_grids, physics fixtures, vertex buffers, surfaces and stuff?

rwkay commented 8 months ago

Added support for the following as typed refs.

planning on working on

rwkay commented 8 months ago

See https://github.com/YoYoGames/GameMaker/pull/2935 this is fixed in 2023.11 - I checked with the debugger and it seems to work as expected with buffers and surfaces....

sihammill commented 7 months ago

Verified in IDE v2023.1100.0.418 Runtime v2023.1100.0.438

backYard321 commented 6 months ago

Added support for the following as typed refs.

* Buffers

* vertex formats

planning on working on

* vertex buffers

* surfaces

Any plans for scripts/built-in functions?

gnysek commented 6 months ago

@BackYard321 This was already done for 2023.8

Typed Handles p1 - YoYoGames/GameMaker-Bugs#3172

As per runtime release notes:

This affects DS structs, Objects, Sprites, Sounds, Rooms, Backgrounds (tilemaps), Paths, Scripts, Fonts, Timelines, Tiles (tilesets), Shaders, Sequences, AnimCurves, Instances and Particle Systems, so please be aware that your code may now need fixes before it will work in 2023.8 if you have actually had invalid function calls all along and old versions didn’t tell you

backYard321 commented 6 months ago

@BackYard321 This was already done for 2023.8

Typed Handles p1 - YoYoGames/GameMaker-Bugs#3172

As per runtime release notes:

This affects DS structs, Objects, Sprites, Sounds, Rooms, Backgrounds (tilemaps), Paths, Scripts, Fonts, Timelines, Tiles (tilesets), Shaders, Sequences, AnimCurves, Instances and Particle Systems, so please be aware that your code may now need fixes before it will work in 2023.8 if you have actually had invalid function calls all along and old versions didn’t tell you

It was supposed to be added, but never actually was - I discussed this in the release thread and submitted a report. If you type show_message(instance_destroy) or show_message(userScript), it will give you a number, not a ref.

rwkay commented 6 months ago

user scripts are definitely references now (it was a bug fix, it is in 2023.11) I am not 100% sure on built in functions....

gnysek commented 6 months ago

@rwkay just checked in Runtime v2023.1100.0.450 :

show_debug_message(is_handle(Script1)); // 0
show_debug_message(is_handle(method(undefined, Script1))); // 0
show_debug_message(is_handle(instance_destroy)); // 0

show_debug_message(typeof(Script1)); // number
show_debug_message(typeof(instance_destroy)); // number

Either still a bug, or bugfix is yet not merged?

(Edit: I've also checked if function name is different than script name, to be sure it's not displaying info for resource instead of function - but results are same).

backYard321 commented 6 months ago

user scripts are definitely references now (it was a bug fix, it is in 2023.11) I am not 100% sure on built in functions....

Sweet, thank you! I dug up the bug report I submitted and saw it was marked as "not planned", so I was concerned for a sec.

Refs for built-in functions would be nice too tbh, so that something like is_callable() could checking whether something is actually a method/function ref, rather than just a number corresponding to a function.