Author Topic: New to Axe.  (Read 12791 times)

0 Members and 1 Guest are viewing this topic.

Offline Masinini

  • LV2 Member (Next: 40)
  • **
  • Posts: 33
  • Rating: +0/-0
    • View Profile
Re: New to Axe.
« Reply #15 on: December 09, 2010, 04:53:00 pm »
Thanks! Now I get it. I had understood the use of binary in assembly a while ago, but didn't make the connection. So when he stores a hexidecimal list to a picture, and then uses X,Y,Pic1 later, it turns on the specific points at x'y to match the hexidecimal?

And did you do the hexidecimal in your head? I'm not sure how the rows each equal, 66 per say.
Output(1,1,"By the pricking of my thumb"
Txt(1,1, "Something wicked this way comes."

Offline AngelFish

  • Is this my custom title?
  • Administrator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3242
  • Rating: +270/-27
  • I'm a Fishbot
    • View Profile
Re: New to Axe.
« Reply #16 on: December 09, 2010, 04:57:30 pm »
Windows 7 includes a calculator that can convert Binary to Hex  :P

If you don't have that, then Wikipedia has a Binary-Hex conversion chart.

To convert the binary to Hex, all I did was take each sequence of four bits and replace it with the corresponding Hex number. For example, the top row was 0110 0110. Looking at the chart, this converts to the Hex numbers 6 and 6, which I grouped together to form a byte.

So, 66 99 99 66 66 99 99 66 is the image.

Also, yes, using Pt-on OR's each of the points already in the buffer. If either the bit in the picture or the bit in the buffer are on, the screen will turn that pixel on when Dispgraph is used. Pt-Change XOR's the Sprite with the buffer.
« Last Edit: December 09, 2010, 05:00:01 pm by Qwerty.55 »
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

Offline yunhua98

  • You won't this read sentence right.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2718
  • Rating: +214/-12
  • Go take a dive in the River Lethe.
    • View Profile
Re: New to Axe.
« Reply #17 on: December 09, 2010, 05:28:09 pm »
You can use Hexpic, included in Axe Parser Tools folder, and draw 8x8 sprites, then it will convert the sprite to Hex.  or alternativly you can use ione of the many sprite editors made by our community members.  ;)

Spoiler For =====My Projects=====:
Minor setback due to code messing up.  On hold for Contest.
<hr>
On hold for Contest.


Spoiler For ===Staff Memberships===:






Have you seen any good news-worthy programs/events?  If so, PM me with an article to be included in the next issue of CGPN!
The Game is only a demo, the code that allows one to win hasn't been done.
To paraphrase Oedipus, Hamlet, Lear, and all those guys, "I wish I had known this some time ago."
Signature Last Updated: 12/26/11
<hr>

Offline Masinini

  • LV2 Member (Next: 40)
  • **
  • Posts: 33
  • Rating: +0/-0
    • View Profile
Re: New to Axe.
« Reply #18 on: December 09, 2010, 05:53:17 pm »
Thanks for your help all. All I need to do now is experiment and practice, making sure I get the codes down.
Output(1,1,"By the pricking of my thumb"
Txt(1,1, "Something wicked this way comes."

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: New to Axe.
« Reply #19 on: December 09, 2010, 06:30:18 pm »
Thanks for your help all. All I need to do now is experiment and practice, making sure I get the codes down.

Check the open source programs in Omnimaga, that's how I learnt.

Also, Axe's examples are pretty good to learn.

Offline Masinini

  • LV2 Member (Next: 40)
  • **
  • Posts: 33
  • Rating: +0/-0
    • View Profile
Re: New to Axe.
« Reply #20 on: December 09, 2010, 06:51:11 pm »
New Question.

So, If I wanted to draw an X, I could make an 8x8 sprite like

01000010
01000010
00100100
00011000
00100100
01000010
01000010
00000000   But say i wanted to make a box that could only fit in an 24x6 spreite sized box. Would I have to use 3 8x8 sprites and just leave off part?

That X in hexadecimal is 42, 42, 24, 18, 24, 42, 42, 00
Output(1,1,"By the pricking of my thumb"
Txt(1,1, "Something wicked this way comes."

Offline squidgetx

  • Food.
  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1881
  • Rating: +503/-17
  • rawr.
    • View Profile
Re: New to Axe.
« Reply #21 on: December 09, 2010, 08:14:25 pm »
Yeah, you could either use 3 8x8 sprites or the bitmap command. But the bitmap command is slow and rather confusing, so you're probably better off with 3 8x8 sprites that have 2 blank columns at the end
« Last Edit: December 09, 2010, 08:18:09 pm by squidgetx »

Offline AngelFish

  • Is this my custom title?
  • Administrator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3242
  • Rating: +270/-27
  • I'm a Fishbot
    • View Profile
Re: New to Axe.
« Reply #22 on: December 09, 2010, 08:17:28 pm »
New Question.

So, If I wanted to draw an X, I could make an 8x8 sprite like

01000010
01000010
00100100
00011000
00100100
01000010
01000010
00000000   But say i wanted to make a box that could only fit in an 24x6 spreite sized box. Would I have to use 3 8x8 sprites and just leave off part?

That X in hexadecimal is 42, 42, 24, 18, 24, 42, 42, 00

You can't leave off part. You have to designate the full data for Pt-On, I believe. You can use the Bitmap command by doing

Code: [Select]
Data(rows,columns)->Pic1
[Hex]
...
Bitmap(X,Y,Pic1

 The problem is that Bitmap takes approximately 15 times longer than Pt-on.
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

Offline Masinini

  • LV2 Member (Next: 40)
  • **
  • Posts: 33
  • Rating: +0/-0
    • View Profile
Re: New to Axe.
« Reply #23 on: December 09, 2010, 08:19:22 pm »
When I say leave off part, i mean just make the Hexidecimal code for that area 00.
Output(1,1,"By the pricking of my thumb"
Txt(1,1, "Something wicked this way comes."

Offline AngelFish

  • Is this my custom title?
  • Administrator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3242
  • Rating: +270/-27
  • I'm a Fishbot
    • View Profile
Re: New to Axe.
« Reply #24 on: December 09, 2010, 08:20:08 pm »
Then it'll work. Setting blank bytes to 00 simply doesn't draw them.
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

Offline Deep Toaster

  • So much to do, so much time, so little motivation
  • Administrator
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 8217
  • Rating: +758/-15
    • View Profile
    • ClrHome
Re: New to Axe.
« Reply #25 on: December 09, 2010, 08:20:23 pm »
^ What Qwerty said. Plus, storing six bits (pixels) per row would get really nasty to deal with because all of it's in bytes of 8.




Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: New to Axe.
« Reply #26 on: December 09, 2010, 08:23:19 pm »
Didn't Bitmap use the Overwrite logic, though? (erasing everything behind)

Offline AngelFish

  • Is this my custom title?
  • Administrator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3242
  • Rating: +270/-27
  • I'm a Fishbot
    • View Profile
Re: New to Axe.
« Reply #27 on: December 09, 2010, 08:24:47 pm »
It does, but then again so does Pt-Off
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: New to Axe.
« Reply #28 on: December 10, 2010, 02:27:25 am »
Ok, because you said the following:
Then it'll work. Setting blank bytes to 00 simply doesn't draw them.
It should actually draw them, right? (in white)

Offline AngelFish

  • Is this my custom title?
  • Administrator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3242
  • Rating: +270/-27
  • I'm a Fishbot
    • View Profile
Re: New to Axe.
« Reply #29 on: December 10, 2010, 02:28:40 am »
No, 00 with the Pt-On command is transparent because the routine uses OR logic to map the pixels.
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ