Skip to content

Instantly share code, notes, and snippets.

@cremno
cremno / jp.c
Created March 6, 2021 10:02
code found on kc ~late 2012
#include <stdio.h>
#include <string.h> /* ANSI X3.159-1989 source code compliant with ISO/IEC 9899:1990 */
#include <ctype.h> /* proudly made without MySQL and Postgres for greater readability */
#define _(spurdo,spaerde,ebin) do{spaerde=stpcpy(spurdo,wtf8[ebin]);if(!ebin--)spaerde=stpcpy(spaerde,"\x65\x73");else if(!ebin)*--spaerde=0;*spurdo=toupper(*spurdo);}while(++ebin >9000)
int main(){int i,j,k,l;char*p,*q,*r,*s,b[42];char const*const wtf8[]={"\x74\x6f\x64","\x73\x74\x72\x61\x66\x65","\x6b\x69\x6e\x64\x65\x72","\x73\x63\x68\xc3\xa4\x6e\x64\x65\x72"};
for(i^=i;~(i>>1)&(1<<1);++i){_(b,p,i);for(j^=j;!(j>>2);++j){if(!(j^i))continue;q=stpcpy(stpcpy(p,wtf8[j]),"\x20\x66\xc3\xbc\x72\x20");for(k^=k;~k^~(1<<2);++k){if(!((k^j)&&(i^k)))continue;_(q,r,k);
for(l^=l;~l>>2;++l){if(!(j^l)||!((l-k)&&(l-i)))continue;s=stpcpy(r,wtf8[l]);if(!l--)stpcpy(s,"\x65");else if(!l)stpcpy(s,"\x6e");puts(b);break;}}}}return 0;
}
@cremno
cremno / rgss_bugs.md
Last active September 7, 2020 20:46
List of RGSS Bugs
Method Version(s) Description
Bitmap#gradient_fill_rect 2, 3 non-rect "overloads": vertical=false is ignored
Table#_load all string length isn't checked; possible crash
Table#[]= all allows omitting last index argument in which case it'ss assumed to be 0: Table.new(1)[] = v sets first element to v; also Table.new(3, 2, 1)[2, 1] = v is the same as Table.new(3, 2, 1)[2, 1, 0] = v
Rect#_load all string length isn't checked; possible crash
Rect#{x,y,width,height} all return a fixnum even if attribute is a bignum (INT2FIX vs. INT2NUM?)
Plane#visible all unaffected by Plane#visible=; returns true if not disposed
Window#padding 3 default value is actually 8, not 12 as documented
Viewport#initialize 1 crash if no argument is passed
# ★ Additional Blend Types
# ★★★★★★★★★★★★★★★★★
#
# Author/s : cremno
# RGSS ver : 1 to 3
# old: 0 = normal, 1 = addition, 2 = subtract
# new: 3 = multiply, 4 = screen, 5 = lighten, 6 = darken
class Blend_Type
def initialize(blend_type)
# ★ BrowseForFolder
# ★★★★★★★★★★★★★
#
# Author/s : cremno
# RGSS ver : 1 to 3
module BrowseForFolder
class BrowseForFolderError < StandardError
end
@cremno
cremno / joystick.rb
Last active August 29, 2015 13:56
Joystick
# ★ Joystick
# ★★★★★★★★
#
# Author/s : cremno
# RGSS ver : 1 to 3
module Joystick
class << self