New Helper Userlib

Blitz3D Forums/Blitz3D Userlibs/New Helper Userlib

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

I've started work on a helper DLL for Blitz3D and was wondering if anyone would be interested in trying it out and maybe making some suggestions as to added functions. I intend to release the DLL as freeware when I am done. All I would ask is that I am listed in the credits somewhere if you use it.

Download the DLL here...

http://www.imakegames.com/B3DHLP.dll


Here are the functions I've done so far...

FmtStr$ - allows you to format a number like "#,###.00"
(This function suffers from Blitz's lack of extended precision)

DiskSpaceFree - Returns free Space of HD in megabytes
DiskSpaceTotal - Returns total space of HD in megabytes

SetBit - Allows setting an individual bit of a variable
ResetBit - Allows resetting an individial bit of a variable
TestBit - Returns whether a bit is on or off in a variable

SaveBank - Allows you to save the entire contents of a Bank at once

LoadBank - Allows you to load an entire Bank's contents from a file.

Here are the .decls...

.lib "B3DHLP.dll"
SaveBank% (pBank%, Filename$):"SAVEBANK"
LoadBank% (pBank%, Filename$):"LOADBANK"
FmtStr$ (InVal$ , pFmt$):"FMTSTR"
DiskSpaceFree% (Drive$):"DISKSPACEFREE"
DiskSpaceTotal% (Drive$):"DISKSPACETOTAL"
SetBit% (dwVal%, BitPos%):"SETBIT"
ResetBit% (dwVal%, BitPos%):"RESETBIT"
TestBit% (dwVal%, BitPos%):"TESTBIT"