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
| #include "stdafx.h" | |
| #include <Windows64\4JLibs\inc\4J_Input.h> | |
| #include <Common\App_enums.h> | |
| #include <Windows.h> | |
| C_4JInput InputManager; | |
| void C_4JInput::Initialise(int iInputStateC, unsigned char ucMapC, unsigned char ucActionC, unsigned char ucMenuActionC) |
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
| /* | |
| setup.ts - v0.1 | |
| last updated: 2/15/26 @ 10:22am | |
| developed by Nommiin | |
| usage: | |
| 1. save as "setup.ts" to your project's directory (next to the .yyp file) | |
| 2. run the script with bun (see https://bun.sh/ for installation) | |
| > bun run setup | |
| 3. for each .js file in your project, create a neighboring .ts file as needed |
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
| /* | |
| title: spec.ts | |
| author: nommiin | |
| description: uses HTMLRewriter to convert GmlSpec.xml file to output.json | |
| note: reads GmlSpec.xml from runtime-2024.1400.3.948, ensure this is installed | |
| */ | |
| class GmlElement { | |
| public Name: string = ""; | |
| toJSON(): Record<string, unknown> { |
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 url_parse(_url) | |
| /// @author nommiin | |
| /// @argument {String} _url - The URL to parse into a struct | |
| /// @returns {Struct} | |
| function url_parse(_url) { | |
| var data = { | |
| href: _url, | |
| protocol: undefined, | |
| hostname: undefined, | |
| port: undefined, |
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 _GMFUNCTION_NAME_ array_first(string_split_ext(_GMFUNCTION_, ["gml_Script_", "gml_Object_", "gml_GlobalScript_", "@"], true, 2)) | |
| /* | |
| function test() { | |
| show_message(_GMFUNCTION_NAME_); // test | |
| function does_this() { | |
| show_message(_GMFUNCTION_NAME_); // does_this | |
| var a = function even_work() { | |
| show_message(_GMFUNCTION_NAME_); // even_work | |
| var b = function() { |
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 Exception(msg, args...) | |
| /// @description A class containing error information for the exception being thrown | |
| /// @argument {string | YYGMLException} msg - The message to store in the exception, or GM exception to wrap | |
| /// @argument {any} [args...] - Variables used in template string | |
| /// @returns {Exception} | |
| /// @notes Enable EXCEPTION_EXTENDED to include the origin GML script's content in the exception | |
| function Exception(msg) constructor { | |
| if (is_struct(msg) && string_pos("YYGMLException", instanceof(msg)) != 0) { | |
| self.message = msg.message; | |
| self.longMessage = msg.longMessage; |
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
| /* | |
| Setup: | |
| 1. Create a script named "__meta" | |
| 2. Add a line containing "#autogen" anywhere (also it needs to be a comment lol) | |
| 3. Create a folder named "tools" in your project root and copy this gist's contents into a file named "meta.js" | |
| 4. Create a "pre_project_step.bat" (1) or "pre_project_step.sh" (2) script in your project root and copy the below script: | |
| (1) | |
| @echo off | |
| node %YYprojectDir%\tools\meta.js | |
| (2) |
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 too much work: | |
| - Here's a link to the generated script using default settings, targeting extImGuiGML v1.100.4 (GM Beta v2022.1100.0.259) | |
| https://gist.github.com/nommiin/bce79d83e6e2d135df11328808105e82 | |
| How to use: | |
| 1. Create a main.js in your project root (near .yyp) and copy all this into it | |
| 1a.) Feel free to modify any of the consts at the top, there's a few settings | |
| 2. Run "node main.js" | |
| 3. Open newly created "Imgui.gml" and copy into GameMaker |
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 StateManager( start ) constructor { | |
| States = {}; | |
| Current = start; | |
| CurrentRef = undefined; | |
| BaseRef = undefined; | |
| InstanceRef = other; | |
| static Register = function( name, evt ) { | |
| if (!variable_struct_exists(States, name)) { | |
| var names = variable_struct_get_names(evt), events = {}; |
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
| /* | |
| blob - 4/4/2022 | |
| by Nommiin | |
| Getting Started: | |
| - Usage: | |
| (HOST) | |
| 1. Create a new Blob by calling "my_blob = new Blob(<name>, [root=""])" | |
| 2. Add files to the blob by calling "my_blob.AddFile(<file>)" |
NewerOlder