This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function draw_hq_text_ext_transformed(_x,_y,_str,_sep,_width,_xscale,_yscale,_angle) { | |
| //this function will automatically adjust the x, y, width, scakes and sep based on what the gui was scaled to before hand | |
| //this is a drawing function for breaking out of the rescaling the gui layer to the highest possible quality before returning | |
| static _is_browser = (os_browser != browser_not_a_browser); | |
| var _w, _h; | |
| //get the gui measurements | |
| if (_is_browser){ | |
| _w = browser_width; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //-------------------------------------------------------------------------------------------------------\\ | |
| // __ It looks like you're looking for advice on initialization, | |
| // / \ / Would you like help with that? | |
| // | | | |
| // @ @ Tinkerer_Red has removed all of the gml_pragma( "global", *); | |
| // | | from the functions to prevent issues importing. | |
| // || |/ If you would like to re-enable them just un comment them! | |
| // || || | |
| // |\_/| He also commented out the MacroExpansion in | |
| // \___/ `__global_object_depths` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function buffer_array(_length, _type, _value=0) constructor { | |
| width = _width; | |
| height = _height; | |
| size = width*height; | |
| type = _type; | |
| if (type == buffer_string) | |
| || (type == buffer_text) { | |
| show_error("Type can not be a sting or text", true); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function hash_of_doom(_funcArr) { | |
| static __executors = (function(){ | |
| var _struct = {}; | |
| struct_set_from_hash(_struct, 0, function(_funcArr) { }); | |
| struct_set_from_hash(_struct, 1, function(_funcArr) { _funcArr[0]() }); | |
| struct_set_from_hash(_struct, 2, function(_funcArr) { _funcArr[0](); _funcArr[1]() }); | |
| struct_set_from_hash(_struct, 3, function(_funcArr) { _funcArr[0](); _funcArr[1](); _funcArr[2]() }); | |
| struct_set_from_hash(_struct, 4, function(_funcArr) { _funcArr[0](); _funcArr[1](); _funcArr[2](); _funcArr[3]() }); | |
| struct_set_from_hash(_struct, 5, function(_funcArr) { _funcArr[0](); _funcArr[1](); _funcArr[2](); _funcArr[3](); _funcArr[4]() }); | |
| struct_set_from_hash(_struct, 6, function(_funcArr) { _funcArr[0](); _funcArr[1](); _funcArr[2](); _funcArr[3](); _funcArr[4](); _funcArr[5]() }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function constructor_call_ext(_func, _args) { | |
| static __executors = (function(){ | |
| var _struct = {}; | |
| struct_set_from_hash(_struct, 0, function(_func, _args) { return new _func( ); }); | |
| struct_set_from_hash(_struct, 1, function(_func, _args) { return new _func( _args[0] ); }); | |
| struct_set_from_hash(_struct, 2, function(_func, _args) { return new _func( _args[0], _args[1] ); }); | |
| struct_set_from_hash(_struct, 3, function(_func, _args) { return new _func( _args[0], _args[1], _args[2] ); }); | |
| struct_set_from_hash(_struct, 4, function(_func, _args) { return new _func( _args[0], _args[1], _args[2], _args[3] ); }); | |
| struct_set_from_hash(_struct, 5, function(_func, _args) { return new _func( _args[0], _args[1], _args[2], _args[3], _args[4] ); }); | |
| struct_set_from_hash(_struct, 6, function(_func, _args) { return new _func( _args[0], _args[1], _args[2], _args[3], _args[4], _args[5] ); }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #region GC Timer Internals | |
| //Beta IDE v2023.600.0.368 Beta Runtime v2023.600.0.387 | |
| // as of now, this number is 2 but might change in the future so best to calculate it on build, note this is not needed just increases accuracy | |
| //forget the initial count as it builds new internals on first call | |
| if (os_browser == browser_not_a_browser) gc_get_stats().num_objects_in_generation[0] | |
| //find out the offset from simply running the function | |
| var __gc_start = (os_browser != browser_not_a_browser) ? 0 : gc_get_stats().num_objects_in_generation[0] | |
| global.__gc_log_offset = (os_browser != browser_not_a_browser) ? 0 : gc_get_stats().num_objects_in_generation[0]-__gc_start; | |
| #endregion |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 1. Upper Bound Positive (64-bit max positive value) | |
| show_debug_message((0b0111111111111111111111111111111111111111111111111111111111111111 == __binaryTo64Bit("0b0111111111111111111111111111111111111111111111111111111111111111")) ? "Success" : $"{0b0111111111111111111111111111111111111111111111111111111111111111} != {__binaryTo64Bit("0b0111111111111111111111111111111111111111111111111111111111111111")}"); | |
| // 2. Lower Bound Positive (64-bit min positive value) | |
| show_debug_message((0b1 == __binaryTo64Bit("0b1")) ? "Success" : $"{0b1} != {__binaryTo64Bit("0b1")}"); | |
| // 3. Upper Bound Negative (64-bit min negative value) | |
| show_debug_message((0b1000000000000000000000000000000000000000000000000000000000000000 == __binaryTo64Bit("0b1000000000000000000000000000000000000000000000000000000000000000")) ? "Success" : $"{0b1000000000000000000000000000000000000000000000000000000000000000} != {__binaryTo64Bit("0b1000000000000000000000000000000000000000000000000000000000000000")}"); | |
| // 4. Lower Bound Negative (64-bit max n |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| show_debug_message("\n\n\n") | |
| demo_view_pointer = dbg_view("Demo", true, 0, 0, display_get_gui_width(), display_get_gui_height()); | |
| dbg_section("", true); | |
| dbg_text_separator("Views"); | |
| #region dbg_view | |
| dbg_section("dbg_view", false); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function serialize(_obj) { | |
| if (is_handle(_obj) && script_exists(_obj)) return undefined; // strip functions as `undefined` | |
| if (!is_array(_obj) && !is_struct(_obj)) return _obj; | |
| // Check if it's an array or a plain object, then create a new instance accordingly | |
| if (is_struct(_obj)) { | |
| var _result = {}; | |
| var _names = struct_get_names(_obj) | |
| var _length = array_length(_names); | |
| for (var _i=0; _i<_length; _i++) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #macro parent_constructor __parent_constructor(asset_get_index(_GMFUNCTION_)) | |
| /// @ignore | |
| function __parent_constructor(_ref) { | |
| if (struct_exists(static_get(_ref), "__parent_constructor__")) return static_get(_ref).__parent_constructor__; | |
| var _constructor = undefined; | |
| //check to see if this is the constructor | |
| var _tags = asset_get_tags(_ref, asset_script) | |