Skip to content

Instantly share code, notes, and snippets.

View Sanqui's full-sized avatar
🦉

Sanqui Sanqui

🦉
View GitHub Profile
@Sanqui
Sanqui / help.js
Last active August 29, 2015 13:57
// how the hell do I do this
function script() {
this.turn_player() // instant action, so it's cool
this.speak("Hello!") // blocking - must wait for user input
answer = this.ask("Are you feeling well?") // uh oh...
if (answer) { // runtime condition
this.speak("That's nice!") //welp.
}
else {
@Sanqui
Sanqui / Makefile
Last active August 29, 2015 13:58
modern RGBDS project example
all: game.gb
game.o: game.asm
rgbasm -o game.o game.asm
game.gb: game.o
rgblink -n game.sym -m $*.map -o $@ $<
rgbfix -jv -i XXXX -k XX -l 0x33 -m 0x01 -p 0 -r 0 -t game $@
clean:

Keybase proof

I hereby claim:

  • I am Sanqui on github.
  • I am sanqui (https://keybase.io/sanqui) on keybase.
  • I have a public key whose fingerprint is 1228 DF20 EE44 31F7 C932 FA02 C431 F762 0475 722A

To claim this, I am signing this object:

@Sanqui
Sanqui / 0_tables
Last active August 29, 2015 14:02
pokedex game data table extravaganza
map
"A game-specific physical instance of a location_area"
* location_area
* version_collection (?)
* width
* height
map_connection
"A physical connection between two maps"
* map0

Keybase proof

I hereby claim:

  • I am sanqui on github.
  • I am sanqui (https://keybase.io/sanqui) on keybase.
  • I have a public key whose fingerprint is C55A D67C 92CF 682F D641 45CF E9AE D11B F096 3207

To claim this, I am signing this object:

- name: Venusaur
lv: 56
hp: 140
type: Grass
weakess: Fire
resistance:
retreatcost: 4
moves:
- name: Giga Drain
- energy: GG**
@Sanqui
Sanqui / gist:2318290
Created April 6, 2012 09:00
GBZ80 emulator concept in DCPU (0x10^c)
; Option A: Using DCPU registers for storing 16-bit Z80 registers
; x, y, z, i = FA, BC, DE, HL
; reading B: ; cycles
; set a, y ; 1
; shr a, 8 ; 2
; reading C:
; set a, y ; 1
; and a, 0x00ff ; 2
; reading BC:
; set a, bc ; 1
@Sanqui
Sanqui / helper.py
Created September 22, 2012 08:49 — forked from mitsuhiko/helper.py
url_for_here()
from flask import request, url_for
# Supports multiple query args with the same key.
def url_for_here(**changed_args):
args = request.args.to_dict(flat=False)
args.update(request.view_args)
args.update(changed_args)
return url_for(request.endpoint, **args)
app.jinja_env.globals['url_for_here'] = url_for_here
@Sanqui
Sanqui / gist:3798944
Created September 28, 2012 09:55
minpowerlevel() decorator
from flask import abort
# Callable decorator
def minpowerlevel(powerlevel):
def decorator(function):
@wraps(function)
def f(*args, **kvargs):
if g.user.powerlevel >= powerlevel:
return function(*args, **kvargs)
else:
@Sanqui
Sanqui / game.yaml
Created October 27, 2012 20:36
yarpge source concept stub
game:
tilesets:
- tileset: &tileset0
name: Overworld
file: overworld.png
colisions:
[1, 0]
maps:
- map: &map0