Re: BatLib
Posted: Sun 13 Mar, 2011 9:20 pm
I've been gone for the past 9 days without internet, but I have some updates... If you like the sound of SubMatrix, you might like some of the newer commands...:
Things like ListToCol and SubRow will make it much easier to use matrices for saving/loading save data. Since the last update I have also added a fixed width 4x6 font (I've only finished the first 128 chars) as well as some commands that use it. It draws the chars to the grah screen and wraps the text to the next line automatically. Command 89 (ASCIILength) is also pretty useful because it returns the number of chars in a token or a string of tokens. For example, dim(86,"sin(ln(3)) would return 10 because the sin( token is 4 chars and ln( is 3 chars and the rest are 1 char. This will help give programmers an idea of how much space a string will use when displayed
Also, I have put a lot of work over the past few days into BASIC ReCode (dim(40)) so that is now functioning as an interpreted programming language. It now has 43 functions and has enough stuff to make a game. In fact, I remade my old Block Eater program using ReCode and the result is pretty impressive The code is a few hundred bytes smaller and the speed increase is massive:
Block Eater (ReCode)
Block Eater (BASIC)
Neat, right? The cool part is that a BASIC program can include blocks of ReCode and blocks of ReCode can contain assembly. ReCode uses BASIC tokens but doesn't necessarily do the same thing. For example, Line( draws rectangles (the same as dim(29)) instead of a line and Shade( deals with the contrast.
Here is a link to v4.00.92.43
http://www.omnimaga.org/index.php?actio ... ttach=6555
Code: Select all
70-PlayNote
71-Logic
72-MatrixList
73-Left
74-Right
75-Mid
76-Diag
77-DiagI
78-SubCol
79-SubRow
80-ListToDiag
81-ListToDiagI
82-ListToCol
83-ListToRow
84-ExecVarBASIC
85-GetProgName
86-Timer
87-DrawText
88-DrawDispText
89-ASCIILength
90-DrawTokenStr
Also, I have put a lot of work over the past few days into BASIC ReCode (dim(40)) so that is now functioning as an interpreted programming language. It now has 43 functions and has enough stuff to make a game. In fact, I remade my old Block Eater program using ReCode and the result is pretty impressive The code is a few hundred bytes smaller and the speed increase is massive:
Block Eater (ReCode)
Block Eater (BASIC)
Neat, right? The cool part is that a BASIC program can include blocks of ReCode and blocks of ReCode can contain assembly. ReCode uses BASIC tokens but doesn't necessarily do the same thing. For example, Line( draws rectangles (the same as dim(29)) instead of a line and Shade( deals with the contrast.
Here is a link to v4.00.92.43
http://www.omnimaga.org/index.php?actio ... ttach=6555