• Axe Q&A 5 5
Currently:  

Author Topic: Axe Q&A  (Read 587278 times)

0 Members and 4 Guests are viewing this topic.

Offline saintrunner

  • Custom Spriter: You ask it! I'll Make it!
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1787
  • Rating: +115/-11
  • Flogging Molly
    • View Profile
    • Jonny K Music
Re: Axe Q&A
« Reply #1215 on: December 14, 2011, 10:34:36 pm »
Yeah I think only subroutines can have multiple figures in them
My Sprites Thread   :Updated often :) for your viewing pleasure

GAMES:

Offline chattahippie

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 358
  • Rating: +27/-0
  • Super Member! :D
    • View Profile
Re: Axe Q&A
« Reply #1216 on: December 14, 2011, 10:34:38 pm »
@chattahippie, I can't say much for MathPrint besides I was glad to get rid of it for 2.43 lol. But no, the ASM program was some "power tool" thing, if I remember correctly. Admittedly, I think it was me who told it to shift the screen.
I've used those too... but unfortunately, 2.55 forces me to use such scrolling nonsense until I remember to turn off mathprint :P

EDIT:
Code: [Select]
°A-2→°MYVAR
5→MYVAR
MYVAR++
MYVAR*13→MYVAR
Disp MYVAR▸Dec,i .Prints 78
;D
Hope that helps!
« Last Edit: December 14, 2011, 10:39:37 pm by chattahippie »

Offline BlakPilar

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 734
  • Rating: +44/-1
    • View Profile
Re: Axe Q&A
« Reply #1217 on: December 14, 2011, 10:39:25 pm »
Darn...
* BlakPilar is now sad...
Oh well, though. Methinks it's time for arrays, then. Thanks guys.

Offline epic7

  • Chopin!
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2200
  • Rating: +135/-8
  • I like robots
    • View Profile
Re: Axe Q&A
« Reply #1218 on: December 14, 2011, 10:46:30 pm »
Is there to do this, but with bitmaps?
[...]->Pic1
[...]
[...]
Pt-On(A,B,Z*8+Pic1)

Offline saintrunner

  • Custom Spriter: You ask it! I'll Make it!
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1787
  • Rating: +115/-11
  • Flogging Molly
    • View Profile
    • Jonny K Music
Re: Axe Q&A
« Reply #1219 on: December 14, 2011, 10:53:33 pm »
Darn...
* BlakPilar is now sad...
Oh well, though. Methinks it's time for arrays, then. Thanks guys.

try using multiple figured variables, it might work
My Sprites Thread   :Updated often :) for your viewing pleasure

GAMES:

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Axe Q&A
« Reply #1220 on: December 15, 2011, 04:37:03 am »
Is there to do this, but with bitmaps?
[...]->Pic1
[...]
[...]
Pt-On(A,B,Z*8+Pic1)

Just replace the 8 with the size of the bitmap data in bytes

Offline BlakPilar

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 734
  • Rating: +44/-1
    • View Profile
Re: Axe Q&A
« Reply #1221 on: December 15, 2011, 06:46:31 am »
EDIT:
Code: [Select]
°A-2→°MYVAR
5→MYVAR
MYVAR++
MYVAR*13→MYVAR
Disp MYVAR▸Dec,i .Prints 78
;D
Hope that helps!

Woot! Thanks chattahippie!
« Last Edit: December 15, 2011, 04:48:11 pm by BlakPilar »

Offline epic7

  • Chopin!
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2200
  • Rating: +135/-8
  • I like robots
    • View Profile
Re: Axe Q&A
« Reply #1222 on: December 15, 2011, 05:11:12 pm »
Is there to do this, but with bitmaps?
[...]->Pic1
[...]
[...]
Pt-On(A,B,Z*8+Pic1)

Just replace the 8 with the size of the bitmap data in bytes
What's the size of a 24x24 bitmp?

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Axe Q&A
« Reply #1223 on: December 15, 2011, 05:53:17 pm »
You entered the data into your calculator, you should know :P I do believe it amounts to 74 bytes though

Offline epic7

  • Chopin!
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2200
  • Rating: +135/-8
  • I like robots
    • View Profile
Re: Axe Q&A
« Reply #1224 on: December 16, 2011, 06:06:50 pm »
How would I combine two strings, such as
"Hello "->Str1
"World!"->Str2
.A guess
Str2->{Str1+6}
Text(1,,Str1)
.^ would that work?
« Last Edit: December 16, 2011, 06:07:07 pm by epic7 »

Offline Darl181

  • «Yo buddy, you still alive?»
  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3408
  • Rating: +305/-13
  • VGhlIEdhbWU=
    • View Profile
    • darl181.webuda.com
Re: Axe Q&A
« Reply #1225 on: December 16, 2011, 06:22:45 pm »
So you're trying to display one after the other?  (not exactly sure what you're trying to do)
Something to remember is that strings are "zero-terminated", which means that when you have a string and →Str# Axe automatically puts a zero at the end so it knows when to stop displaying etc.

If you do this, a zero is put at the end:
"The Game"→Str1

If you do this, a zero is not put at the end:
"The Game"

So if you have this:
"I like to eat "
"apples and "
"bananas "
[00]

It displays all of it as one string.
(Keep in mind that it looks for the [00] at the end, tho...it'll keep displaying until it reaches one.)
« Last Edit: December 16, 2011, 06:23:11 pm by Darl181 »
Vy'o'us pleorsdti thl'e gjaemue

Offline LincolnB

  • Check It Out Now
  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1115
  • Rating: +125/-4
  • By Hackers For Hackers
    • View Profile
Re: Axe Q&A
« Reply #1226 on: December 16, 2011, 07:24:39 pm »
How would I combine two strings, such as
"Hello "->Str1
"World!"->Str2
.A guess
Str2->{Str1+6}
Text(1,,Str1)
.^ would that work?

no, that just puts a pointer to Str2 in the sixth byte of data starting at Str1. You would need to set up some kind of a loop to copy single bytes of data from Str1 to Str2.
Completed Projects:
   >> Spacky Emprise   >> Spacky 2 - Beta   >> Fantastic Sam
   >> An Exercise In Futility   >> GeoCore

My Current Projects:

Projects in Development:
In Medias Res - Contest Entry

Talk to me if you need help with Axe coding.


Spoiler For Bragging Rights:
Not much yet, hopefully this section will grow soon with time (and more contests)



Offline Quigibo

  • The Executioner
  • CoT Emeritus
  • LV11 Super Veteran (Next: 3000)
  • *
  • Posts: 2031
  • Rating: +1075/-24
  • I wish real life had a "Save" and "Load" button...
    • View Profile
Re: Axe Q&A
« Reply #1227 on: December 16, 2011, 07:34:20 pm »
If you're thinking of combining strings in Axe... you're probably doing something wrong :P  Just display them one after the other.  Axe doesn't add newlines unless you specify them so its perfectly okay to do "Disp Str1,Str2" or "Text Str1,Str2" and it will print them to the screen as if they were a single string.  You never actually need to "combine them".
« Last Edit: December 16, 2011, 07:35:53 pm by Quigibo »
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline Darl181

  • «Yo buddy, you still alive?»
  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3408
  • Rating: +305/-13
  • VGhlIEdhbWU=
    • View Profile
    • darl181.webuda.com
Re: Axe Q&A
« Reply #1228 on: December 16, 2011, 07:51:15 pm »
I've been meaning to ask: how does axe handle newlines in the source?
Would this program, when compiled...
Spoiler For Spoiler:
.A
[0000000000000000]→Pic1
[FFFFFFFFFFFFFFFF]

ClrHome

For(A,0,7)
Pt-On(A*8,0,Pic1+8)
End
DispGraph
...end up being bigger than this, when compiled...?
Spoiler For Spoiler:
.A
[0000000000000000FFFFFFFFFFFFFFFF]→Pic1
ClrHome
For(A,0,7)
Pt-On(A*8,0,Pic1+8)
End
DispGraph
« Last Edit: December 16, 2011, 07:51:31 pm by Darl181 »
Vy'o'us pleorsdti thl'e gjaemue

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Axe Q&A
« Reply #1229 on: December 16, 2011, 07:55:41 pm »
That's one of the advantages of compiled languages. Larger source code does not mean larger compiled code. You can add line breaks and comments and long-named labels all you want; the compiled code will always be the same size.