• Axe Q&A 5 5
Currently:  

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

0 Members and 1 Guest are viewing this topic.

Offline calc84maniac

  • eZ80 Guru
  • Coder Of Tomorrow
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2912
  • Rating: +471/-17
    • View Profile
    • TI-Boy CE
Re: Axe Q&A
« Reply #705 on: October 06, 2011, 06:37:07 pm »
Code: [Select]
!If GetCalc("Str1",SIZE)→A
.ERROR
End
.A holds pointer to a new string that is SIZE bytes large
"Most people ask, 'What does a thing do?' Hackers ask, 'What can I make it do?'" - Pablos Holman

Offline Wellen

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 118
  • Rating: +7/-2
    • View Profile
Re: Axe Q&A
« Reply #706 on: October 07, 2011, 06:49:57 am »
Hello, still have problems with drawing bitmaps..
I have a 40*44 picture that I translated in hexa by myself, and when I use the bitmap fonction, it doesn't display what I expect
The code :
Code: [Select]
:.A
:Data(40,44)→Pic1
:[00003A00000001E1900000079764000000719A00
:[002DFEB500002E688980002207B2800069DE6D80
:[00A803C2C00097DC9C40066233F7E006DF07F960
:[0F661C96A00D99E32D501E271CDEA02963F36760
:[34260C9D503B45F36AA03CB70C95602969FB6D60
:[46A90D2A502AD5F2EA40151776AAE014AAD52A40
:[0AA12B6BC0A955EAB90084543545405457CF5140
:[122852AB00255DB54E000AAE856D00154A440800
:[AAB1EBB500152CAA9800202612B600149A4DF000
:[0812B540000865382000082A0A80000212A80000
:[02A4040000010850000000128000000000000000
:Tangent(10,20,Pic1
:Repeat getKey
:End
What it displays :

???

Attached the picture and its hexa code, but I'm sure it's 95% right.
-/...././/--./.-/--/.
I'm french, so please feel free to correct my bad english, it'd help me a lot ;)
Spoiler For Feat. Loulou54:
Spoiler For Projects:
Spoiler For Axe:
Ti-Lock : Lock your calc before turning it off               [XXXXXXXX--] 80%
Spoiler For Ti-Basic:
Spoiler For Soko-Ti, a sokoban game in Ti-Basic:

Spoiler For Memory:

Downloads here.

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Axe Q&A
« Reply #707 on: October 07, 2011, 11:23:43 am »
Reverse the order of the height and width bytes. ;)

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: Axe Q&A
« Reply #708 on: October 07, 2011, 12:41:41 pm »
Has anyone got a routine that wait for the user to release all keys ? Like

Lbl WLP
While getKey(0)
End
Return


but that doesn't work when I put sub(WLP). It doesn't wait for anything.
« Last Edit: October 07, 2011, 12:41:46 pm by Hayleia »
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline Wellen

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 118
  • Rating: +7/-2
    • View Profile
Re: Axe Q&A
« Reply #709 on: October 07, 2011, 12:57:55 pm »
Reverse the order of the height and width bytes. ;)
Oh my..
Thanks a lot, I read in the doc that it was width, then height.. :banghead:
 :D

Hayleia (sorry, correct name now ^^), I had the same problem, so I added a pause : (and it worked)
Code: [Select]
While getKey(0)
Pause 5
End
« Last Edit: October 07, 2011, 01:10:55 pm by Wellen »
-/...././/--./.-/--/.
I'm french, so please feel free to correct my bad english, it'd help me a lot ;)
Spoiler For Feat. Loulou54:
Spoiler For Projects:
Spoiler For Axe:
Ti-Lock : Lock your calc before turning it off               [XXXXXXXX--] 80%
Spoiler For Ti-Basic:
Spoiler For Soko-Ti, a sokoban game in Ti-Basic:

Spoiler For Memory:

Downloads here.

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: Axe Q&A
« Reply #710 on: October 07, 2011, 01:03:08 pm »
Haleyia, I had the same problem, so I added a pause :
Code: [Select]
While getKey(0)
Pause 5
End
Thanks ! It works !!! :D
Also, If you saw your respect make like a sine function, it is because I wanted to put you +1 but pressed the wrong one D: (Fixed)

Why do everyone kill my name ? D:
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline Wellen

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 118
  • Rating: +7/-2
    • View Profile
Re: Axe Q&A
« Reply #711 on: October 07, 2011, 01:11:54 pm »
It's pretty hard not to fail when spelling your name :P
-/...././/--./.-/--/.
I'm french, so please feel free to correct my bad english, it'd help me a lot ;)
Spoiler For Feat. Loulou54:
Spoiler For Projects:
Spoiler For Axe:
Ti-Lock : Lock your calc before turning it off               [XXXXXXXX--] 80%
Spoiler For Ti-Basic:
Spoiler For Soko-Ti, a sokoban game in Ti-Basic:

Spoiler For Memory:

Downloads here.

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: Axe Q&A
« Reply #712 on: October 09, 2011, 06:01:39 am »
It's pretty hard not to fail when spelling your name :P
No. Just think it is like Hayley Wiliams but with IA at the end.
I hope I didn't misspelled her name :P

Another question now :P
In term of space in the compiled code. Are those methods the same ?
Code: [Select]
"test"[00]→Str1
Text(0,0,Str1)
Code: [Select]
Text(0,0,"test")
« Last Edit: October 09, 2011, 06:02:01 am by Hayleia »
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: Axe Q&A
« Reply #713 on: October 09, 2011, 06:21:24 am »
They are the same in output, but I think you should use the first because then the data goes to the end of the program.
Tip:
Instead of
Code: [Select]
Text(x,y,"string") you can use
Code: [Select]
Text(Y*256+X):Text "String" to save space (could be outdated, and maybe you have to invert x and y in Y*256+X)
I'm not a nerd but I pretend:

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: Axe Q&A
« Reply #714 on: October 09, 2011, 07:01:09 am »
Thanks. In fact I already use the second one but I thought about translation: using the first method would allow me to separate the main program from the text, so I could give the text file to someone who want to translate the game. So if it takes the same space it is ok.
* Hayleia now has a lot of work D:
I'll do that when I have time and when I get bored...
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: Axe Q&A
« Reply #715 on: October 09, 2011, 09:51:48 am »
Ok. Checked the optimize trick, does still work.
I'm not a nerd but I pretend:

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: Axe Q&A
« Reply #716 on: October 09, 2011, 10:28:28 am »
In term of space in the compiled code. Are those methods the same ?
Code: [Select]
"test"[00]→Str1
Text(0,0,Str1)
Code: [Select]
Text(0,0,"test")
No, they are not the same.  Since Axe automatically appends a [00] to the end of everything with quotes around it that you store to a location (like "test"→Str1) the code on the left will actually be one byte larger.
These two are the exact same:
Code: [Select]
"test"→Str1
Text(0,0,Str1)
Code: [Select]
Text(0,0,"test")
I hope this helped clarify things. :)
« Last Edit: October 09, 2011, 10:28:45 am by ztrumpet »

Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: Axe Q&A
« Reply #717 on: October 09, 2011, 10:32:57 am »
Wow lol, didnt see that [00]
I'm not a nerd but I pretend:

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: Axe Q&A
« Reply #718 on: October 09, 2011, 10:37:38 am »
Tip:
Instead of
Code: [Select]
Text(x,y,"string") you can use
Code: [Select]
Text(Y*256+X):Text "String" to save space (could be outdated, and maybe you have to invert x and y in Y*256+X)
Oh, yeah, and I forgot to mention that this tip is outdated as of Axe 0.2.3 or so. ;)

Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: Axe Q&A
« Reply #719 on: October 09, 2011, 10:38:30 am »
Huh? I just tried and it worked.
I'm not a nerd but I pretend: