Bitmask 1.5
Simple and efficient bitmask collision detection routines
Copyright (C) 2002-2005 Ulf Ekstrom except for the bitcount function.
This library is released under the LGPL licence. This means that you
must give the users of your program the ability to substitute another
version of this library in your program, by linking to it dynamically
or supplying you object files for relinking by the user. It also means
that if you modified the code of the bitmask lib and distribute these
changes in binary form you must be able to provide your code changes
to the reciever of the binary. See the file COPYING for the exact
licence.
All API documentation has been moved to the file bitmask.html.
Changelog
---------
1.5 Bugfix for bitmask_draw. Better testcases. Small performance
improvements.
1.4 Bugfixes for non-32 bit wide stripes. A test program was added, and
a bug in bitmask_fill() was fixed. The header file was modified to
work with C++ programs. Created bitmask_scale.
1.3 Bitcount for systems with non-32 bit long ints. License change.
1.2 Removed all uses of integer division from bitmask_overlap_pos()
Made small portability fix for other than 32 bit machines.
The library has now seen some real world use, and has no known
bugs.
1.1 Fixed bug where width and height of a mask was mixed up.
1.0 Initial version
.___________________________________________________________.
| |
| A M I G A O S 4 . 0 C O M P I L E B Y |
._______ .______. |
| ____/________________________________________| |__ .
._|____._ | ._ | ._ | _/______.
| |/ | |/ | |/ | |/ |
| | _________| | |
|_________________|______|spt/up |_______________|_______________|
. .
| |
| A B O U T T H I S P O R T |
| |
| |
| I am in a shitty economical situation, so if you feel |
| that what I do is worth anything, use paypal to donate |
| to my email addy, spotATtriadDOTse, thanx! |
| |
| Spot / Up Rough 2006 |
|___________________________________________________________|
Built with:
gcc -mcrt=newlib -Wall -O2 -I/sdk/local/newlib/include/SDL
-I/sdk/local/common/include/SDL bitmask.c -c
gcc -mcrt=newlib -Wall -O2 -I/sdk/local/newlib/include/SDL
-I/sdk/local/common/include/SDL -o test bitmask.o test.c
Test Results:
Testing bitmask library with 32 bit wide stripes.
ok ok ok ok ok ok ok ok ok
All tests finished ok.
Scaling quality (should be about 1.0): 1.011236
Scaling quality (should be about 1.0): 0.997907
| |