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
| /* VERTEX SHADER */ | |
| attribute vec3 in_Position; | |
| attribute vec4 in_Colour; | |
| attribute vec2 in_Texcoord; | |
| varying vec2 texture_coordinate; | |
| void main() { | |
| vec4 vertex_model_position = vec4(in_Position, 1.0); | |
| texture_coordinate = in_Texcoord; |
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
| /** | |
| * parses a yy file into a struct | |
| * @param {string} yy_file_path the full path to the yy file that has to be parsed | |
| * @return {struct} | |
| */ | |
| function yy_parse(yy_file_path) { | |
| if (yy_file_path != "") { | |
| var yy_text_file = file_text_open_read(yy_file_path); | |
| var json_string = ""; |
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
| /** | |
| * converts compressed tile data from a room yy file into a runtime tilemap | |
| * @param {array<real>} compressed_tile_data the "TileCompressedData" from the yy file | |
| * @param {string} tilemap_name the string name of the tilemap layer to populate | |
| * @param {real} tilemap_columns the number of columns in the tilemap being populated | |
| */ | |
| function compressed_tile_data_to_tilemap(compressed_tile_data, tilemap_name, tilemap_columns) { | |
| var tilemap_layer = layer_tilemap_get_id(tilemap_name); | |
| var tile_index = 0; |
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
| /* | |
| * takes a sprite frame, from stretched frames, and returns the image index for it | |
| * @param {Asset.GMSprite} sprite the sprite we're looking up | |
| * @param {Real} frame the frame to check | |
| * @return {Real} | |
| */ | |
| function sprite_get_index_from_frame(sprite, frame) { | |
| var all_frames_information = sprite_get_info(sprite).frame_info; | |
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
| /** | |
| * creates a struct object for managing a JASC-PAL color palette | |
| * @param {Real} dot_pal_file the path to the .pal file | |
| */ | |
| function jasc_pal_pallette(dot_pal_file) constructor { | |
| /** | |
| * parses the .pal file | |
| * @param {string} dot_pal_file the path toe the .pal file | |
| */ |
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
| //this is the vertex shader | |
| attribute vec3 in_Position; | |
| attribute vec4 in_Colour; | |
| attribute vec2 in_Texture_Coordinate; | |
| varying vec2 vertex_texture_coordinate; | |
| void main() { | |
| vec4 vertex_model_position = vec4(in_Position, 1.0); |
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
| /** | |
| * converts a room region to a gpu scissor region | |
| * @param {real} x the x position of the region origin | |
| * @param {real} y the y position of the region origin | |
| * @param {real} width the width of the region | |
| * @param {real} height the height of the region | |
| * @return {struct} | |
| */ | |
| function room_region_to_scissor_region(x, y, width, height) { | |
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
| /** | |
| * remaps the values on a noise texture to fall between two new values | |
| * @param {asset.GMSprite} noise_sprite the sprite that needs to be remapped | |
| * @param {real} new_minimum the new minimum noise value | |
| * @param {real} new_maximum the new maximum noise value | |
| */ | |
| function noise_remap(noise_sprite, new_minimum, new_maximum) { | |
| var width = sprite_get_width(noise_sprite); | |
| var height = sprite_get_height(noise_sprite); |
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
| /** | |
| * creates a data uri out of a sprite | |
| * assumes rgba, 8bit | |
| * @param {Asset.GMSprite} sprite_asset which sprite to convert to url | |
| * @param {Real} [frame_number] which frame is being converted | |
| * @return {String} | |
| */ | |
| function sprite_create_data_url(sprite_asset, frame_number = 0) { | |
| static buffer_write_u32_backwards = function(buffer, value) { |
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 copy_game_path() { | |
| clipboard_set_text($"{parameter_string(0)} -game {parameter_string(2)}"); | |
| } |
NewerOlder