I cannot believe I forgot to update this! (I was sure I had) I completely rewrote BatLib, starting from scratch over the summer. Now, almost all bugs are fixed and many commands now have full features. Here is a post from the first major update:
I have added in all the other 104 commands as well as 19 more commands. I have updated almost everything, so a bunch of the commands are now more powerful (and still backwards compatible). All the bugs or issues that I could find are now fixed and I have yet to find bugs, now. Here are some changes:
- dim(1) was used to disable Done and turn the run indicator off. Now you can use a digit after the 1 to fine tune that. For example, dim(1.1) does something different from dim(1) or dim(1.2), but all deal with the run indicator and Done message.
- dim(29) now draws rectangles with clipping.
Which reminds me that negative numbers are now read properly. Before, BatLib just used the absolute value of inputs
- dim(41) now allows the input of all variable types and works just fine with lists and named lists. It also has an otional argument that will let you get the size of a variable as it apears in the memory menu. Before, it just returned the size of the data portion of a var.
- dim(52) and dim(53) now let you draw sprites to pixel coordinates using an otional argument. I finally fixed this all up yesterday and this works with larger srites, too.
- dim(54) now returns the number of lines in the var if you try to read line 0
- dim(59) Now can convert from any base 1 to 36 into any other base 2 to 36. Numbers can even be a few hundred digits long!
- dim(64) (which is Copyprog) now works. The issue was super simple, too, so I wish I had figured it out earlier.
- dim(46) (portedit) now works!
- dim(85) (Getprogname) now works completely and flawlessly
Now for the new commands!
- dim(105) (pxlLine) draws a line with pixel coordinates. There are also draw modes where you supply a list as a draw pattern
- dim(106) draws a circle very quickly using pixel coordinates. There is also a mode for using draw patterns
- dim(107) draws a pxlline to a variable (like a pic var)
- dim(108) draws a pxlcircle to a var
- dim(109) can be used to open up a popup menu. Selecting an otion returns a number.
- dim(110) can be used to convert a number to a string. This does not work with imaginary numbers.
- dim(111) converts a list to a string. This works with imaginary numbers
- dim(112) compresses a string of text. There are two built in codecs.
- dim(113) decompresses a string of compressed text.
- dim(114) will return an optimal codec string for a string of data.
- dim(115) will compress data with a custom codec.
- dim(116) will decompress data with a custom codec.
- dim(117) will perform a search and replace, scanning a variable.
- dim(118) will work like my GetName program. It returns, in alphabetical order, the name of a variable of a given type. For examle, this can be used to get the name of the third program in the program list.
- dim(119) provides lowercase options.
- dim(120) provides text options
- dim(121) and dim(122) are options to draw a sprite to a variable (like a pic var)
- dim(123) will delete a line from a data base
Also, in this release is a beta/test version of BatLib that will be able to use a revolutionary new "GroupHook" that I came up with. Since no other apps have it, I had to perform some modifications to existing apps for demonstration. Basically, I managed to make it so that when I installed BatLibG, I could use the parser hooks in Celtic 3, Omnicalc, and Grammer, too without installing them. Celtic 3 and Omnicalc did conflict with the real( commands, though. I managed to modify DoorsCS7, too, and I could use Celtic 3 and DSC commands, too, but I will not release the modified DCS7 because I haven't talked to Kerm about it.
Then, I broke a few things, so I had to update again:
Hmm, I am going to have to look into that, then Also, I have some more updates and bug fixes. Appparently when I went on an optmising spree, I broke a few things :[
- dim(14) and dim(15) now have options for using 2-byte words
- dim(124) was added for creating variables
- dim(125) was added for executing inline Grammer code
- dim(60) now allows you to archive or unarchive a var
- dim(29) is fixed (before, it added 1 to the x-coordinate)
- dim(29) now has two options for pixel testing rectangle regions
- dim(56) and dim(62) have been fixed (pixel test results were broken)
- dim(63) was fixed (similar issue)
I found a discrepancy in the compression routine that is now fixed. It sometimes lost data instead of being lossless.
EDIT: Oh! I almost forgot to mention that I made an example program for compressing/decompressing data. It can get great compression ratios depending on the data (I had a tilemap compress down to almost 11%). It is very easy to use, so I hope it can get used in some big projects !
The download for that version is here. That is the last one that I released with full documentation. I then made an update where BatLibG was phased out, so BatLib now comes standard with GroupHook:
For GroupHook, I tried a technique suggested by Runer that has worked excellently. I am still working on adding better features, but currently, you can:
Get which apps are in the GroupHook
Using command 126:
- dim(126,#) will return the name of the nth app in the grouphook. (Returns ".DNE" if the number is out of range)
- dim(126.1) will disable all grouphooks
- dim(126.2) will enable all grouphooks