-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|24|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-




HoboBen

Parse point-pair string

3rd September 2010

Using a simple parser, extract the point-pairs from a string such as:
''-850.5,75.0 958,137.5 958,-262.5 850,325 742,262.6 742,137.5''
By using a simple tokenizer/lexer, we can safely catch all errors. And it's much more readable and maintainable*snip*


HoboBen

PHP robots.txt access parser

8th August 2010

Reads a robots.txt file and attempts to discover if a given robot is permitted to access a given file on the server.
[code]
<?php
/*
* robots.php
*
* Author: ben@tophatstuff.co.uk
* Date: 2010-08-08
*
* Reads*snip*


HoboBen

Wikipedia/MediaWiki API example

7th August 2010

Short examples showing how to get information from MediaWiki (e.g. Wikipedia) websites


JL235

Post PHP server-side execution

30th July 2010

Continue executing a PHP script after page has been sent


JL235

onLoad events

21st July 2010

a bit more durable then using the onLoad function


Afr0

Packet

19th July 2010

A generic Packet class


Jayenkai

MoneyDisplay

19th July 2010

Just needed this, thought others might want it.
[code]
Function MoneyDisplay$(fn,ftxt2$=''$'')
ftxt$=''''
ftxt3$=fn
fx=0
For fn=Len(ftxt3$) To 1 Step -1
ftxt$=Mid$(ftxt3$,fn,1)+ftxt$
fx=fx+1
If fx=3 And fn>1 Then ftxt$=''*snip*


Jayenkai

Avabar

10th July 2010

The blue un-specific avabar things..


HoboBen

Fast text wrapping

7th July 2010

Fast - Tries to do as little string manipulation as possible.
[code]
Program
Uses
keyset,
pure2d

Const
WT_ARRAY_SIZE = 1024
LINE_SPACING = 1.0
Var
breakPoint: Array [WT_ARRAY_SIZE] of Integer
breakPointS*snip*


HoboBen

Generate english place names

13th June 2010

A set of rules for programatically generating English-sounding place names.
[code]
town = *ton, *tone, *ham, *shire, *by, *cot, *cott, *cotte, *stoke, *stow, *wick, *wich, *worth, *eaton, *folk
castle = *bury, *borough, *brough, *burgh, *burh, *ches*snip*


Cower

NinePatch Image

15th May 2010

NinePatch image similar to the ninepatch drawables in Android OS.


HoboBen

Simple Random Terrain Generator

14th May 2010

Simple fractal random terrain generation. Less than 100 lines of code, including displaying to screen. Adjustable turbulence.
[code]
{
By Ben Golightly 2010, tophatstuff.co.uk
Feel free to modify and use with or without credit
}
Program
*snip*


mindstorm8191

Error module

14th May 2010

handles errors, part of Mindstorm's collection


Cower

NLayoutView

10th April 2010

View that permits relative layouts among subviews (similar to the Android RelativeLayout viewgroup)


Cower

Basic Render-to-Texture

9th April 2010

Very simple render-to-texture classes for OpenGL


Cower

NTabView

9th April 2010

Tab view from my NToolkit framework


Cower

Javascript Animation Thingy

2nd April 2010

Bit of code to handle animating stuff in Javascript.


Cower

BlitzMax Lexer Module

13th March 2010

Module for tokenizing BlitzMax source code


Phoenix

Iterating edges of a polygon

25th February 2010

This is neat and trivial trick I found the other day which is useful when you want to iterate through consecutive pairs of vertices (edges) of a polygon. [tt]i[/tt] is the index of the first vertex, and [tt]j[/tt] is the index of the following vertex.
[co*snip*


Cower

Lua State Wrapper

31st January 2010

Object-oriented wrapper around Lua states


Jayenkai

Timestamp

17th January 2010

Why doesn't BlitzMax have a timestamp?!
This oughta work for most stuff.. Doesn't keep mills, but they're addable if you're bored.
[code]
Function Timestamp:Long()
' Returns a big-ass number.
fLong:Long=0
ftxt$=CurrentDate$()
ftxt$=Upper$(ftxt$) *snip*


Cower

Multitouch Trackpad Events

8th January 2010

Code for handling for mutlitouch trackpad events (magnification, rotation, and swiping) in BlitzMax under Mac OS


Sticky

Integer\\IP converter

4th January 2010

Converts between integers and IPs


Cower

BlitzMax Source Tokenizer

25th December 2009

Title just about does it


Cower

Input Class/Lua Script

3rd December 2009

Small script for handling input (key presses, releases, hooks, etc.)

Newer Posts More - Older Posts