Author Topic: BatLib  (Read 125581 times)

0 Members and 1 Guest are viewing this topic.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55931
  • Rating: +3153/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • DJ Omnimaga Music
Re: BatLib
« Reply #255 on: March 13, 2011, 03:41:50 pm »
Yeah I mean if both wouldn't fit in one page anymore. Otherwise it's best to keep everything in one page. Btw I posted a news (from your auto-upload-approval topic) finally :D

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: BatLib
« Reply #256 on: March 13, 2011, 10:19:21 pm »
Okay, for anybody that wants to use ReCode, I have fixed the issue with with having nested End statements. You can now do something like this:
Code: [Select]
While xx
<<stuff>>
While yy
<<stuff>>
End
<<stuff>>
End
Here is the download to the fixed version...

Oh also, there are now numbers by the menu items and the "t" in BatLib is shaped slightly differently to make things a little more clear :D Again, thanks for the feedback DJ_O and Scout!

EDIT: Ah, crud, I uploaded the wrong one... Here is the proper upload... One person downloaded that...

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55931
  • Rating: +3153/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • DJ Omnimaga Music
Re: BatLib
« Reply #257 on: March 14, 2011, 11:48:13 pm »
Good to hear, good job :D

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: BatLib
« Reply #258 on: March 17, 2011, 05:16:09 pm »
Okay then here is the next update. I added an error catching thing to dim(29 in case the user tries drawing a rectangle that goes off the screen. Before it would only return an error if you started off the screen :D

Also, I added a new demo program for ReCode called MOVE and it is also a remake of an old game. I've added these commands to ReCode:
log( takes the log of a number in some base
2 will square a number
sin( takes the sine of a number (period=256) and returns a number (-127 to 127)
cos( is similar to sin(
log(Text( will display a number in some base on the graph screen

I just finished up log( and log(Text( and I like 'em :D You can display, say, 1337 in base 14 if you want or whatever base :D

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: BatLib
« Reply #259 on: March 17, 2011, 06:40:35 pm »
Nice Xeda, looking cooler and cooler!

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55931
  • Rating: +3153/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • DJ Omnimaga Music
Re: BatLib
« Reply #260 on: March 26, 2011, 10:57:00 pm »
This is nice Xeda. Also part of that game kinda reminds me of JustCause's Cubes puzzles.

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: BatLib
« Reply #261 on: April 02, 2011, 06:00:16 pm »
Hm, so I was over on TIBD when I got an idea to make a command to delete or insert list elements. I'm not sure why there isn't an OS command (or is there?) for this since there are bcalls... For the deleting, you need to specify the offset into the list, the number of elements to delete and which list you want to perform the function on. I have not actually added the insert command yet, but deleting works like this...

Let the list to play with be {0,1,2,3,4,5,6,7,8,9}

To delete 4 elements starting at the 2, you can do:
Code: [Select]
dim(91,2,4,{0,1,2,3,4,5,6,7,8,9The result will be {0,1,6,7,8,9} in Ans
Alternatively, if that list was stored to L1, you can do:
Code: [Select]
dim(91,2,4,0or
Code: [Select]
dim(91,2,4,L1As a note, they directly modify the list, so there is no need to do something like this:
Code: [Select]
dim(91,2,4,0→L1
Blegh, now I wonder if I should make similar commands for strings...?

Offline mrmprog

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 559
  • Rating: +35/-1
    • View Profile
Re: BatLib
« Reply #262 on: April 03, 2011, 06:19:30 pm »
I was wondering, how likely is this to crash/clear ram/destroy my calc? Is there anything I should know before putting it on a real calc?

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: BatLib
« Reply #263 on: April 03, 2011, 11:15:39 pm »
There are two things that I know of that can cause a crash:
1) Improper syntax (usually problems are caught before they can cause an error)
2) Certain Apps or assembly programs might overwrite the RAM areas used by BatLib

To fix the first one, just make sure you use proper syntaxes. To fix the second one, after running an app or assembly program, you can reinstall BatLib either by running BatLib or using the included prgmZINSTALL. Not all asm programs will cause problems and not all apps will.

Also, I realised as I was posting this that I never updated prgmZINSTALL from the beta version of BatLib, so here is the version that should work on all future versions of BatLib.

Offline mrmprog

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 559
  • Rating: +35/-1
    • View Profile
Re: BatLib
« Reply #264 on: April 04, 2011, 09:36:27 pm »
Ok, I will try this out as soon as I have time to send the app/learn commands. This occurred to me also: What if you released a "safe" version that did not contain the scary mem editing commands? I would be less scared of crashing then  :)

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: BatLib
« Reply #265 on: April 04, 2011, 10:07:13 pm »
Hmm, well I guess I could do that... (sometime later...) Okay, so I removed the commands below, so if you use them, it returns ".SAFE"
12-StoBytes
14-VarEditByte
17-MemEdit
41-GetStats (It might be buggy)
64-CopyProg (This doesn't work for some times... the program version works, though :P)

There shouldn't be any other commands that edit vars or memory that could be unsafe XD

EDIT: Also, I forgot to not include commands 91 and 92, so this has command 91 and 92 XD
91 is DelElements: deletes elements from a list
92 is InsElements: inserts elements into a list (with a value of 0)

Both use the syntax dim(91,Offset,#Elements,List#

Offset starts at 0
#Elements should be greater than 0
List# can either be a direct list or a number representing a list. 0=L1, 1=L2, 2=L3, et cetera

I didn't mean to include them because I haven't added an error handler for if #Elements is 0. Don't let it be 0!! :D

Offline mrmprog

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 559
  • Rating: +35/-1
    • View Profile
Re: BatLib
« Reply #266 on: April 05, 2011, 07:06:11 pm »
Cool! Kind of off topic, but I noticed that CopyProg will cut off the last token in a program when converting to a string.

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: BatLib
« Reply #267 on: April 05, 2011, 09:34:02 pm »
Hmm, that is odd. I will have to see what is up with that... Also, for that, you can use command 21 which automatically copies to a string :)

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: BatLib
« Reply #268 on: April 06, 2011, 09:00:06 am »
I just installed BatLib :D

I have a complaint already though :( Using the batlib app menu is very hard using keys (I know there are numbers) but it's still tricky.

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: BatLib
« Reply #269 on: April 06, 2011, 09:12:24 am »
I know, I was using that to show off the speed of the rectangle operations. I could just take out key presses, but I don't want to :P