Quick links: itch.io
· explanation
Versions: GameMaker: Studio 1.4.1773 .. 1.4.9999
Platforms: Windows, Windows (YYC)
This extension fixes the buffer_set_surface
function in GameMaker: Studio by providing a fallback implementation
if the original function doesn't work.
Import the GMEZ file from itch (right-click on the Extensions folder in the resource tree, pick "Import extension") or Download Repository and check out the example project.
You don't have to replace any function calls - the extension will redirect calls to the original function automatically.
The extension also provides one function and one variable.
-
buffer_set_surface_detect()
This function detects whether the originalbuffer_set_surface
function works correctly and setsbuffer_set_surface_uses_fallback
accordingly.It will be automatically ran when calling
buffer_set_surface
for the first time, but you can also run it yourself if you need to know whether the fallback function is going to be used without callingbuffer_set_surface
. -
buffer_set_surface_uses_fallback
This global variable indicates whether the fallback function is being used.It is
true
if it is,false
if it isn't, andundefined
if neitherbuffer_set_surface
norbuffer_set_surface_detect
have been called yet.
Just like with the regular buffer_set_surface
function, your buffer must be at least surface_get_width(surface) * surface_get_height(surface) * 4
bytes long, or the function will not copy anything in there.
See BUILD.md
Author: YellowAfterlife
License: MIT