This file contains 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
////////////// | |
// Chapter 401 | |
////////////// | |
// # = constant | |
// * = readonly | |
// @ = instance variable | |
// & = obsolete | |
// $ = US spelling | |
// £ = UK spelling |
This file contains 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
/// @return N/A (0) | |
/// | |
/// Executes a method call for each element of the given struct/array/data structure. | |
/// This iterator is shallow and will not also iterate over nested structs/arrays (though | |
/// you can of course call foreach() inside the specified method) | |
/// | |
/// This function can also iterate over all members of a ds_map, ds_list, or ds_grid. | |
/// You will need to specify a value for [dsType] to iterate over a data structure | |
/// | |
/// The specified method is passed the following parameters: |
This file contains 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
clip_x1 = 10; | |
clip_x2 = 500; | |
clip_y1 = 10; | |
clip_y2 = 100; | |
draw_set_color(c_white); | |
draw_set_alpha(1); | |
// set up shader: | |
shader_set(shd_clip_rect); |
This file contains 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
// 39dll <3 | |
function bufferencrypt(_key, b = global.buffer) { | |
bufferdecrypt(_key, b); | |
} | |
function bufferdecrypt(_key, _buff = global.buffer) { | |
var keylen = min(string_length(_key), 256); | |
if (keylen < 0) return false; |
This file contains 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 Test() constructor { | |
static test = "--- singleton test"; | |
} | |
Test(); | |
function get_test() { | |
return static_get(Test); | |
} |
This file contains 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
////////////// | |
// Chapter 401 | |
////////////// | |
// # = constant | |
// * = readonly | |
// @ = instance variable | |
// & = obsolete | |
// $ = US spelling | |
// £ = UK spelling |
This file contains 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
// | |
// based on https://github.com/YoYoGames/GameMaker-HTML5/blob/develop/scripts/functions/Function_MotionPlanning.js#L232 | |
// | |
global.__mp_settings = { | |
maxrot: 30, | |
rotstep: 10, | |
ahead: 3, | |
onspot: true, | |
} |
This file contains 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 timer(_name = "") constructor { | |
name = string(_name); | |
time = get_timer(); | |
static total = function() { | |
var ddelta = get_timer() - time; | |
var ss = string_format( ddelta/repeats, 1, 10); | |
show_debug_message(string((ddelta)/1000) + "ms - " + ss + " per iteration " + name); | |
} | |
} |
This file contains 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
{ | |
release: GM_version, //Game version | |
app_build: GM_build_date, | |
config: os_get_config(), | |
paused: bool(os_is_paused()), | |
network_connected: bool(os_is_network_connected(false)), | |
language: os_get_language(), | |
region: os_get_region(), | |
runtime_version: GM_runtime_version, | |
app_start_time: date_current_datetime(), |
This file contains 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
// Simple particle system with blowing wind effect | |
// Note that this is *not* supposed to be an even vaguely accurate simulation | |
// There are also still a lot of optimisations possible | |
function _effect_windblown_particles() constructor | |
{ | |
param_num_particles = 100; | |
param_particle_spawn_time = 100; // measured in milliseconds | |
param_particle_spawn_all_at_start = 0; | |
param_warmup_frames = 0; | |
param_sprite = _effect_windblown_particles_leaf_sprite; |
NewerOlder