Skip to content

Instantly share code, notes, and snippets.

View bluebear94's full-sized avatar
🦊
fluffy fox

+merlan #flirora bluebear94

🦊
fluffy fox
View GitHub Profile
import java.util._
import java.io._
object Mystery {
// It's a mystery.
val LUT: Array[String] = Array("\u3042", "\u3044", "\u3046", "\u3048", "\u304a",
"\u304b", "\u304d", "\u304f", "\u3051", "\u3053",
"\u3055", "\u3057", "\u3059", "\u305b", "\u305d",
@bluebear94
bluebear94 / SteveOrAlex.scala
Created August 27, 2014 02:28
Determines whether you're Steve or Alex.
import java.util.UUID
import scala.io.Source
object SteveOrAlex {
def main(args: Array[String]) {
val name = args(0)
println(s"Stats for $name")
val theID = uuid(name)
println(s"UUID: $theID")
val hash = theID.hashCode
@bluebear94
bluebear94 / autogen.py
Created December 27, 2014 02:25
A tool to autogenerate text files.
import argparse, re, io
template_pattern = re.compile("<%%(.*?)%%>")
def autogen(template, config):
exec(config)
loc = locals()
def replace(match):
nonlocal loc
expression = match.group(1)
@bluebear94
bluebear94 / healthbar.dnh
Created January 24, 2015 00:12
healthbar.dnh - A Danmakufu library for drawing circular healthbars.
/*
Circular Healthbar Library by Fluffy8x
The code in this source file is in public domain.
createHealthbar(enemy, maxLife, innerR, outerR) - Creates a healthbar for a non-boss.
createBossHealthbar(bossScene, innerR, outerR) - Creates a healthbar for a boss scene.
boss() - Gets the boss set for drawing the healthbar.
setBoss(boss) - Sets the boss to use as the center for drawing a boss healthbar.
delBoss() - Same as setBoss(ID_INVALID).
@bluebear94
bluebear94 / utf8.dnh
Last active September 27, 2015 21:20
A UTF-8 file reader.
// temp workaround till pre7
let CHR_NULL = " " - " ";
let CHR_1 = "!" - " ";
let CHR_2 = CHR_1 + CHR_1;
let CHR_4 = CHR_2 + CHR_2;
let CHR_8 = CHR_4 + CHR_4;
let CHR_16 = CHR_8 + CHR_8;
let CHR_32 = " ";
let CHR_64 = "@";
** SEARCHING FOR COLLABORATORS FOR THP2.0 **
- Get involved in some delicious web development
- Be part of a close community of geeks
- Most of all, have fun!
To get involved, contact the person who posted this announcement.
@bluebear94
bluebear94 / ww.dnh
Created May 26, 2015 02:32
Automatic word wrapping
// because mkm was a dumbo at word wrapping
// THAT'S IT, FUCK MANUAL WORD WRAPPING
function ObjText_SetTextWW(text, string, maxWidth) {
let right = 0;
let lastSpace = -1;
ObjText_SetText(text, "d"); // Great. Now you just barred all chance of supporting proportional fonts.
let charWidth = ObjText_GetTotalWidth(text);
let maxStrLen = maxWidth / charWidth;
WriteLog(maxStrLen);
let len = length(string);
@bluebear94
bluebear94 / away.md
Last active August 29, 2015 14:22
Going away!

BB94/Fluffy8x is going for a trip!

From 2015 June 3 to July 3, I will be out of the country -- that is, in South Korea. Of course I don't want to go; in fact, doing so would make me miss three days of school and the graduation ceremony, but my parents did, without accounting for snow days.

What does this mean to you?

First off, I will not be on Skype for that period. We will bring only my brother's computer, and while I hope he allows me to, Skype is completely out of question because my mom uses it on that machine.

For my fellow translator: When I am finished with all of the translatables, I will give you a link via MoTK's PM. NTP is now hosted on Github. You may send back the translated material or ask questions through PM as well.

#!/bin/python3
#TouhouDanmakufu[Package]
#ScriptVersion[3]
#Title["Nice Game!"]
#Text["Actually a Python script. (Yay! I'm free now!)"]
from pathlib import *
from io import *
from sys import *