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
/** | |
* AUTHOR: Maurycy Zarzycki | |
* WEBSITE: www.evidentlycube.com | |
* DESCRIPTION: | |
* This is a Node script that removes protection from RPG Maker 2000 and 2003 | |
* games via RM2k3 General Utility Tool. | |
* It was not thoroughly tested, I used it so I could fix a very old game of mine, | |
* Diamentowa Przygoda, where I "accidentally" released the game with the start | |
* position in the wrong place. | |
* |
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
#!/bin/bash | |
confirm() { | |
while true; do | |
read -p "$1 y/n " -n 1 yn < /dev/tty | |
case $yn in | |
[Yy]* ) echo ;break;; | |
[Nn]* ) echo ;exit 1;; | |
* ) echo ;echo "Please answer y or n.";; | |
esac |
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
export class Pool<T> | |
{ | |
private readonly _pool: T[]; | |
private readonly _construct: () => T; | |
private readonly _autoHydrateSize: number; | |
private _indexInPool: number; | |
constructor(initialCapacity: number, construct: () => T, autoHydrateSize: number = 1) | |
{ | |
this._pool = []; |
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
import * as PIXI from 'pixi.js'; | |
// Caution #1: it's written in TypeScript! | |
// Caution #2: it uses the fast element removal method (move last element into removed element's place and change array length) | |
// which changes the order of items in the array, so your rendering order will be affected | |
// Caution #3: events are not triggered | |
export class BufferableContainer extends PIXI.Container | |
{ | |
private readonly childrenToAdd: PIXI.DisplayObject[]; |
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
/** | |
* Adapted from https://github.com/rstacruz/jsdom-global | |
* Make sure this file is registered when running tests by adding this to the command with which you run mocha: | |
* -r <path>/hookJsdom.js | |
*/ | |
const JSDOM = require( 'jsdom' ).JSDOM; | |
const jsdomOptions = { | |
url: 'http://localhost/' | |
}; |
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
using System; | |
namespace TransNeuronica | |
{ | |
//#if WINDOWS || LINUX // This conditional compilation is commented out because right now not all constants are correctly defined | |
// and we can't add our own in a simple fashion. I'll figure it out later | |
public static class Program | |
{ | |
[STAThread] | |
static void Main() |
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
window.isAutomaticTrimpsRunning = true; | |
if (typeof game !== 'undefined'){ | |
window.game = game; | |
} | |
if (typeof window.game === 'undefined' || window.game == null){ | |
console.error("Save and refresh the page and run the script again"); | |
throw new Error(""); | |
} |
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
// ==UserScript== | |
// @name Trimps precise number hover | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Displays a tooltip with precise number when hovering over all numbers in Trimps. Warning: the numbers rendered before the plugin is loaded won't register the tooltip handlers, so for example HPs before you fight might not react. | |
// @author Maurycy Zarzycki, Retrocade.net | |
// @match https://trimps.github.io/ | |
// @require http://code.jquery.com/jquery-latest.js | |
// @grant none | |
// ==/UserScript== |
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(Phaser, PIXI){ | |
var defineFor = function(classDef){ | |
classDef.prototype.positionCenter = function(){ | |
this.center = Phaser.GAMES[0].width / 2; | |
}; | |
classDef.prototype.positionMiddle = function(){ | |
this.middle = Phaser.GAMES[0].height / 2; | |
}; | |
classDef.prototype.positionCenterParent = function(){ | |
if (this.parent !== null){ |