Author Topic: BatLib  (Read 146973 times)

0 Members and 1 Guest are viewing this topic.

Offline Xeda112358

  • they/them
  • Project Author
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: SpriteLib
« Reply #165 on: January 21, 2011, 07:28:11 pm »
If you have ever used xLIB or Celtic3 or something they all use something called a parser hook. This means that some BASIC commands get intercepted by the APP and the APP uses the arguments. BatLib happens to modify sum(. on that note, sum( is usually used to find the sum of a list. For example:
Code: [Select]
sum({0,1,4,9,16,,25,36...9801
Would return 328350 (I think :P). BatLib lets this normal execution occur, so any BASIC programs that use sum( the normal way will still work.

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: SpriteLib
« Reply #166 on: January 21, 2011, 11:22:32 pm »
How about sum({1,2,3},2=5 or sum({1,2,3,4},2,3=5?

Offline Xeda112358

  • they/them
  • Project Author
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: SpriteLib
« Reply #167 on: January 21, 2011, 11:23:35 pm »
Erm, that is not available, but if I can, I won't mind trying that. No promises though :D

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: SpriteLib
« Reply #168 on: January 21, 2011, 11:26:19 pm »
Kerm found a way round it, so you can always ask him.  Remember the arguments are stored with the most recent in OP1 (I think). Will this conflict with DCS's sum() hook?

Offline Xeda112358

  • they/them
  • Project Author
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: SpriteLib
« Reply #169 on: January 22, 2011, 12:35:14 am »
DCs has a sum( hook? It shouldn't conflict... Also, I know how to do it, it is just that I have been a little tied up... :P It is the last argument that is stored to OP1, too. BatLib pushes OP1 into the FPS stack, resets the FPS stack, and then uses the pointer to point to the first command. It also checks first if there is one argument and then it checks if that argument is a list. If it is a list it jumps to some exit code.

Offline Xeda112358

  • they/them
  • Project Author
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
BatLib (App)
« Reply #170 on: January 23, 2011, 01:42:10 pm »
BatLib (App)



http://www.omnimaga.org/index.php?action=downloads;sa=view;down=596

This APP is designed to aid BASIC programs by providing advanced control of the calculator as well as new functions that the OS does not provide. It handles sprites, memory editing, fontsets, reading from the archive, data manipulations, drawing, and other random or useful functions.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: SpriteLib
« Reply #171 on: January 23, 2011, 01:43:58 pm »
That definitively needs a sub-forum. I just have like 10-20 to add I think O.O
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Offline Xeda112358

  • they/them
  • Project Author
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: SpriteLib
« Reply #172 on: January 23, 2011, 02:26:56 pm »
Cool! Yeah, I'm sure you have a lot on your hands... I've no clue how you do it.

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: SpriteLib
« Reply #173 on: January 23, 2011, 02:42:11 pm »
Congratulations Xeda! I bet you're a happy girl, your own subforum :D

Ashbad

  • Guest
Re: SpriteLib
« Reply #174 on: January 23, 2011, 02:43:07 pm »
cheers to your project's own subforum! :D

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: SpriteLib
« Reply #175 on: January 23, 2011, 02:44:00 pm »
Finally there were less to add, but I still need to check other pages to see if there are more. Some projects might wait since there were no updates in a while.
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Offline Xeda112358

  • they/them
  • Project Author
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: SpriteLib
« Reply #176 on: January 23, 2011, 02:50:00 pm »
...
And I want to thank all the folks who...
<<two hours later>>
And that one kid... yes the goat...

Now to get back on topic, I am working on a multiprecision multiplying routine and I am trying to get BASIC ReCode back up and functioning. Since there is still >9000 bytes of memory till fill the APP, I am going to focus more on command 40.

(Seriously, the code is 7215 bytes so far... I have 9041 bytes to go before it is full.)

Offline Xeda112358

  • they/them
  • Project Author
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: SpriteLib v4.00.61.Beta
« Reply #177 on: January 26, 2011, 02:02:57 pm »
Time for the new update... Apparently, I was half asleep every time I went to check for bugs. As a tip, before installing a new version of BatLib, uninstall the version you have! (sum(0,50,51). There were bugs, but only because I kept forgetting to uninstall the previous version...

There is a bug that I found with command 41 when you try to get the stats of an archived variable. This is a glitch that seems to randomly come and go in the version updates without my interference.

The new commands are:
60-DelVarArc-Deletes a variable from RAM or Archive
61-DrawRectvar- Draws a rectangle directly to a var (like Pic1, for example)
62-DrawToVar- Uses the drawing routines directly on a variable (like pictures)

These are all ideas from DJ Omnimaga or inspired by DJ Omnimaga. I still have yet to allow for pixel testing of archived pictures, but that is something I plan to add soon.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: SpriteLib
« Reply #178 on: January 29, 2011, 02:03:00 am »
...
And I want to thank all the folks who...
<<two hours later>>
And that one kid... yes the goat...
What about the goat? ???
Now to get back on topic, I am working on a multiprecision multiplying routine and I am trying to get BASIC ReCode back up and functioning. Since there is still >9000 bytes of memory till fill the APP, I am going to focus more on command 40.

(Seriously, the code is 7215 bytes so far... I have 9041 bytes to go before it is full.)

Nice, you got a lot of space left. What would be the multiprecision routine? I'M curious what's the difference between regular TI-BASIC ones and that.

I'll probably try this later, although I'M not sure how much time I'll have...
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Offline Xeda112358

  • they/them
  • Project Author
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 4704
  • Rating: +719/-6
  • Calc-u-lator, do doo doo do do do.
    • View Profile
Re: SpriteLib
« Reply #179 on: January 29, 2011, 02:05:21 am »
I plan to add math functions that  let us use huge numbers. The converter was a demo of it handling a 75 digit number. I plan to add functionality for much larger numbers as well as math functions on these numbers.