Author Topic: BatLib  (Read 146598 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: BatLib
« Reply #315 on: April 11, 2011, 09:10:42 pm »
All I can say is... Nice :D Also, to answer you, Scout, I plan to make it a little different... You will be able to use a pointer to the sprite data, then you have the size, coordinates, and method arguments, so:
Code: [Select]
"Str1→A                ;This returns a pointer to Str1 in A
Pt-On(A,X,Y,W,H,T

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: BatLib
« Reply #316 on: April 12, 2011, 03:55:04 am »
With strings, good as well!

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 #317 on: April 13, 2011, 10:37:49 pm »
I just noticed in the readme that the name for command 68 is wrong XD It should be MakeString. I must have copied and pasted there or something, but it is used to create a string returned in Ans that is a specified length :)

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: BatLib
« Reply #318 on: April 14, 2011, 04:16:05 am »
I just noticed in the readme that the name for command 68 is wrong XD It should be MakeString. I must have copied and pasted there or something, but it is used to create a string returned in Ans that is a specified length :)

dim(68

Never tried it, gotta do, thanks.

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 #319 on: April 14, 2011, 10:32:58 am »
Yeah, I only really made that command to give users a way to start tilemap data or fontsets/sprite sets :)

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: BatLib
« Reply #320 on: April 14, 2011, 10:51:48 am »
I know there's dim(22 but I'd like a command that lets us type hex for several lines:

Code: [Select]
dim(X
210100
EF0745
EF7942

Can that be done in BatLib or ReCode?

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 #321 on: April 14, 2011, 11:36:50 am »
hehe, I am glad you asked Scout :) I made a program a while back that lets you do something similar:

That will compress a program, but I could definitely modify the code a little for BatLib :) That program never really was popular and it was originally supposed to be part of LSDOS, but... I guess it didn't work out :/

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: BatLib
« Reply #322 on: April 14, 2011, 11:52:49 am »
I like it much Zeda :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 #323 on: April 14, 2011, 05:01:11 pm »
Okay, so Scout asked earlier for an update, so I threw this together with these updates:
-ReCode starts in 6MHz mode
-dim(10 is executed at 6MHz
-Pause (in ReCode) is executed at 6MHz
-dim(44 (a sound routine) is executed at 6MHz
-Changed 'Pause While' to 'Pause If ' to prevent problems with nesting inside of a While/If...Then block
-dim(1 now also disables 'Done'

I also added command 94 which is used to insert data. It doesn't catch if the user is inserting data outside of the variable, though:
dim(94,Offset,"VarName","String"|Str#
-If the Offset is 0, the string of data will be inserted at the beginning of the var.
-"VarName" is the name of the var to insert data into. If this is not in RAM, a string ".ARCH" will be returned.
-The last argument can either be a string or the number of a string (Str1=0, Str2=1, et cetera). If you use the number, the string can be in archive

Also, I think I might know how to fix up the CopyProg command which will be very useful :) I also might add my ASMComp program for use with ReCode and as a command to compress asm programs. Here is a screenie for the program:


Sorry, I haven't updated the readme, yet, so it is just the App:

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: BatLib
« Reply #324 on: April 14, 2011, 05:03:55 pm »
Did you update dim(57? Just wondering, it's already in my calculator :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 #325 on: April 14, 2011, 05:05:11 pm »
No, I didn't update that XD I actually cannot remember the last time I updated that XD

(for those who don't know, dim(57 is what returns the version of BatLib as a string)

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: BatLib
« Reply #326 on: April 15, 2011, 07:22:48 am »
No, I didn't update that XD I actually cannot remember the last time I updated that XD

(for those who don't know, dim(57 is what returns the version of BatLib as a string)

In the version before this you did ;P

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 #327 on: April 15, 2011, 08:44:35 am »
Hehe, okay :D Maybe if I remember for the next update, I will, but I'm not guaranteeing it! ;P

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: BatLib
« Reply #328 on: April 15, 2011, 08:50:37 am »
Could you make it an integer instead of a string? Let's say you add new commands and we want to check if the version is higher than X:

Code: [Select]
If dim(57>X

Even if it doesn't use the dots, it's just a straightforward number.

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 #329 on: April 15, 2011, 08:55:06 am »
Hmm, I could add in a new command just to return the number, yes. I actually have it set up to do that nicely... So for v4.00.95.51, it would display 95.51 in Ans. Does that sound good?