Skip to content

Instantly share code, notes, and snippets.

@mva1985
mva1985 / events.sdlbas
Created June 9, 2019 21:12
sdlBasic library to poll input devices and generate discrete events like key_down, key_up & co.
' events.sdlbas: sdlBasic library to poll input devices
' and generate discrete events like key_down, key_up & co.
' 2019-05-07 No Time To Play <https://notimetoplay.org/>
' Use as you like; please keep the attribution if you will.
const no_event = 0
const key_down_event = 1
const key_up_event = 2
const mouse_down_event = 3
@mva1985
mva1985 / textalign.sdlbas
Created June 9, 2019 21:12
sdlBasic library to render text on the fly with various alignments relative to the given coordinates.
' textalign.sdlbas: sdlBasic library to render text on the fly
' with various alignments relative to the given coordinates.
' 2019-05-06 No Time To Play <https://notimetoplay.org/>
' Use as you like; please keep the attribution if you will.
' Set to a number the game leaves unused otherwise.
' Slot 0 (zero) is the mouse cursor in full screen.
dim common _temp_text_slot = 1
@mva1985
mva1985 / ciphersaber.py
Created April 24, 2017 03:48 — forked from keiyakins/ciphersaber.py
Keiya's ciphersaber implementation
#!/usr/bin/env python
"""An implementation of CipherSaber-2.
Copyright 2010, Keiya Bachhuber
Licensed under the WTFPL version 2 (http://sam.zoy.org/wtfpl/COPYING)
"""
from sys import argv
from os import urandom
from random import randint
from warnings import warn