Author Topic: Couple quick questions  (Read 3071 times)

0 Members and 1 Guest are viewing this topic.

_player1537

  • Guest
Couple quick questions
« on: November 02, 2010, 06:15:16 pm »
Been a while since I played with Axe, but I seem to recall a
Code: [Select]
Pxl-On(Y*256+X) command.  But when I just checked (Axe 4.1 [upgrading soon]) it gave me an error argument.  Is this still here?

Also, somewhat along with my previous question, can/will there be a
Code: [Select]
Line(Y*256A+X,y2*256+x2) command?

Offline Michael_Lee

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1019
  • Rating: +124/-9
    • View Profile
Re: Couple quick questions
« Reply #1 on: November 02, 2010, 06:19:09 pm »
For Pxl-On, from what I can see, it has to follow this format:
Code: [Select]
Pxl-On(X-coordinate,Y-coordinate)
I think there's an output command (for the homescreen) that uses a format kind of like that:
Code: [Select]
Output(X)
Description: The cursor moves to the cursor position (X/256,X%256)

Not sure why you would want a line command like that - seems a little complicated compared to the one already existent.
My website: Currently boring.

Projects:
Axe Interpreter
   > Core: Done
   > Memory: Need write code to add constants.
   > Graphics: Rewritten.  Needs to integrate sprites with constants.
   > IO: GetKey done.  Need to add mostly homescreen IO stuff.
Croquette:
   > Stomping bugs
   > Internet version: On hold until I can make my website less boring/broken.

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: Couple quick questions
« Reply #2 on: November 03, 2010, 10:29:14 am »
I think it used to take up a few less bytes, but Axe is now auto-calculating the single value, so it's pretty much pointless now.




_player1537

  • Guest
Re: Couple quick questions
« Reply #3 on: November 03, 2010, 08:18:48 pm »
I don't think it would be pointless.  The reason I asked is because for Minigolf, I was hoping to be able to use one simple function (GP: Get Point) and just call it like:
Code: [Select]
Pxl-On(Sub(GP,x,y,angle,length))

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: Couple quick questions
« Reply #4 on: November 03, 2010, 08:20:22 pm »
Oh, I see. But there's no Pxl-On([pointer to sprite]) command, so how would that help?

EDIT: I don't remember any command that does that... Maybe you're thinking of Output(P) or Text(P)?
« Last Edit: November 03, 2010, 08:21:28 pm by Deep Thought »




_player1537

  • Guest
Re: Couple quick questions
« Reply #5 on: November 03, 2010, 10:25:52 pm »
Erm, sorry, but what did you mean?  Pxl-On is for just pixels, no?  Why would I point Pxl-On to a sprite?  Btw, I probably am thinking of Output/Text, but I was hoping it would be able to be used with Pxl-On (Line would be better)

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Couple quick questions
« Reply #6 on: November 03, 2010, 10:46:47 pm »
well then you could just write your own pixel plotting function to do the same thing (or build it into your GP routine):

Code: [Select]
Lbl PXL
Pxl-On(R1^96,R1/96
Return

:D

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: Couple quick questions
« Reply #7 on: November 03, 2010, 11:26:20 pm »
You can use the L6 or L3 buffer directly if you want to get every pixel in order for a screen transformation or something, but otherwise the 2 coordinate pixel plotting is more optimized.  There has never been a pixel command with one argument, you must be thinking of Output() and Text().
___Axe_Parser___
Today the calculator, tomorrow the world!

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: Couple quick questions
« Reply #8 on: November 04, 2010, 11:52:19 am »
Erm, sorry, but what did you mean?  Pxl-On is for just pixels, no?  Why would I point Pxl-On to a sprite?  Btw, I probably am thinking of Output/Text, but I was hoping it would be able to be used with Pxl-On (Line would be better)

x.x My mistake. I kept reading that as Pt-On.

well then you could just write your own pixel plotting function to do the same thing (or build it into your GP routine):

Code: [Select]
Lbl PXL
Pxl-On(R1^96,R1/96
Return

:D

Yep, use that :)
« Last Edit: November 04, 2010, 11:52:35 am by Deep Thought »