I hereby claim:
- I am mudhairless on github.
- I am ohthatmud (https://keybase.io/ohthatmud) on keybase.
- I have a public key ASCn38ocRWwhqiIiMrMatdN9t7c84PKISyFjOT0oSkZnEAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
'Roll a die or more, DND style syntax. | |
declare function roll( byref s as string ) as uinteger | |
#define ALGO_CRYPTO 5 | |
#define ALGO_QBASIC 4 | |
#define ALGO_MERSEN 3 | |
#define ALGO_FAST 2 | |
#define ALGO_CRAND 1 | |
'Main |
'modded by sir_mud 11/2013 to run with FB 0.90.1 (differences in ThreadCreate and added extremely minimal ini config) | |
' tweaked by tinram 6/6/07 to run with FB 0.17b (RETURNs in CASE statements were killing it) | |
' 0.16 original by jofers | |
'Option Explicit | |
#include "windows.bi" | |
type configuration |
StartScreenSaver | |
'loadimages: | |
'print "Loading"; | |
restore flyer1dat | |
flyer(0) = loadFromDat() | |
'print "."; | |
restore flyer2dat | |
flyer(1) = loadFromDat() |
function newToaster() as sprite ptr | |
var ret = new sprite | |
ret->img = callocate(sizeof(fb.image ptr) * 4) | |
ret->max_img = 4 | |
for n as integer = 0 to 3 | |
ret->img[n] = flyer(n) | |
next | |
var y = rndrange(0,SaverInfo.ScrHeight/2) | |
var yy = rndrange(0,10) | |
if yy > 5 then y = -(y) |
'Flying Toasters with Toast | |
'Inspired by the classic After Dark screensaver. | |
'Consider this code under the terms of the STFUOIWCU license <http://mud.owlbox.net/license/STFUOIWCU> | |
' | |
'Compile with: | |
'fbc -s gui -w all -x flyer.scr flyer.bas flyer.rc | |
#include "ssk.bas" | |
#include once "fbgfx.bi" | |
function RndRange (byval min_ as integer, byval max_ as integer, byval getnew as integer = 1) as integer |
'modded by sir_mud 11/2013 to run with FB 0.90.1 (differences in ThreadCreate and added extremely minimal ini config) | |
' tweaked by tinram 6/6/07 to run with FB 0.17b (RETURNs in CASE statements were killing it) | |
' 0.16 original by jofers | |
'Option Explicit | |
#include "windows.bi" | |
type configuration |
function average ( arr() as integer ) as integer | |
var ret = 0 | |
for n as integer = 0 to ubound(arr) | |
ret += arr(n) | |
ret /= 2 | |
next | |
return ret | |
end function |
<document lang="en_US"> | |
<title>Document title</title> | |
<author bio="http://site.com/author" email="author@site.com">Joe Author</author> | |
<summary>This is a sample document.</summary> | |
</document> |
#include once "ext/xml/dom.bi" | |
var xmldoc = new ext.xml.tree | |
xmldoc->load("mydocument.xml") | |
var xmlroot = xmldoc->root | |
print "Children of document: " & xmlroot->child("document")->children | |
print "Author: " & xmlroot->child("document")->child("author")->getText | |
var doc = xmlroot->child("document") | |
print "Author Bio: " & doc->child("author")->attribute("bio") |