Author Topic: Simple Axe Questions  (Read 21830 times)

0 Members and 1 Guest are viewing this topic.

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: Simple Axe Questions
« Reply #30 on: March 23, 2011, 02:20:37 pm »
What was in this post has been removed since I found a way to get through it.

EDIT:

How to optimize this?:

Code: [Select]
Pxl-On(90,1
Pxl-On(91,2
Pxl-On(92,3
Pxl-On(93,2
Pxl-On(94,1
Pxl-On(90,5
Pxl-On(91,4
Pxl-On(93,4
Pxl-On(94,5

I made it with a For( loop or nested For( loops, and I did it! I really did, but I lost the source code (deleted it in Doors CS7 by mistake) and rewrote 900bytes of code (phew) but can't remember how to make a cross with a loop... I can't make it now (even though I did it before).
Thanks.
« Last Edit: March 23, 2011, 04:31:38 pm by Scout »

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: Simple Axe Questions
« Reply #31 on: March 23, 2011, 05:26:57 pm »
meh... Somehow, I managed to forget how to display a grayscale sprite :(
anyone?

You need to have the sprite stored as two 8x8 sprites (one for the front buffer, one for the back). Then use Pt-On() to display the first one and Pt-On()r to display the second.

Whatever's black on the buffer is black on the screen; whatever's white on the buffer and black on the back-buffer is gray on the screen; whatever's white on both buffers is white.

What was in this post has been removed since I found a way to get through it.

EDIT:

How to optimize this?:

Code: [Select]
Pxl-On(90,1
Pxl-On(91,2
Pxl-On(92,3
Pxl-On(93,2
Pxl-On(94,1
Pxl-On(90,5
Pxl-On(91,4
Pxl-On(93,4
Pxl-On(94,5

I made it with a For( loop or nested For( loops, and I did it! I really did, but I lost the source code (deleted it in Doors CS7 by mistake) and rewrote 900bytes of code (phew) but can't remember how to make a cross with a loop... I can't make it now (even though I did it before).
Thanks.

Use a sprite? That makes it several times smaller.
« Last Edit: March 23, 2011, 05:27:50 pm by Deep Thought »




Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Simple Axe Questions
« Reply #32 on: March 23, 2011, 05:48:44 pm »
How to optimize this?:

Code: [Select]
Pxl-On(90,1
Pxl-On(91,2
Pxl-On(92,3
Pxl-On(93,2
Pxl-On(94,1
Pxl-On(90,5
Pxl-On(91,4
Pxl-On(93,4
Pxl-On(94,5

Pixel method: 117 bytes not counting the pixel routine, 158 bytes with it; 2853 cycles
 

Code: [Select]
Pt-On(88,0,[0022140814220000])

Aligned sprite method: 24 bytes not counting the sprite routine, 150 bytes with it; 918 cycles
« Last Edit: March 23, 2011, 06:01:24 pm by Runer112 »

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: Simple Axe Questions
« Reply #33 on: March 26, 2011, 09:07:55 am »
How to optimize this?:

Code: [Select]
Pxl-On(90,1
Pxl-On(91,2
Pxl-On(92,3
Pxl-On(93,2
Pxl-On(94,1
Pxl-On(90,5
Pxl-On(91,4
Pxl-On(93,4
Pxl-On(94,5

Pixel method: 117 bytes not counting the pixel routine, 158 bytes with it; 2853 cycles
 

Code: [Select]
Pt-On(88,0,[0022140814220000])

Aligned sprite method: 24 bytes not counting the sprite routine, 150 bytes with it; 918 cycles

But it's supposed to be Pxl-Off( so how do I make the sprite White?

Offline Happybobjr

  • James Oldiges
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2325
  • Rating: +128/-20
  • Howdy :)
    • View Profile
Re: Simple Axe Questions
« Reply #34 on: March 26, 2011, 09:37:10 am »
Pt-change(80,0,[FFFFFFFFFFFFFFF])
Pt-Change(88,0,[0022140814220000])

I think that would work
School: East Central High School
 
Axe: 1.0.0
TI-84 +SE  ||| OS: 2.53 MP (patched) ||| Version: "M"
TI-Nspire    |||  Lent out, and never returned
____________________________________________________________

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: Simple Axe Questions
« Reply #35 on: March 26, 2011, 09:39:30 am »
Pt-change(80,0,[FFFFFFFFFFFFFFF])
Pt-Change(88,0,[0022140814220000])

I think that would work

Hum, all I needed was Pt-Change(88,0,[0022140814220000])

Thanks, I had used Pt-On( before.

Offline Happybobjr

  • James Oldiges
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2325
  • Rating: +128/-20
  • Howdy :)
    • View Profile
Re: Simple Axe Questions
« Reply #36 on: March 26, 2011, 09:41:50 am »
* Happybobjr slaps himself awake.

Opps, thanks scout.
School: East Central High School
 
Axe: 1.0.0
TI-84 +SE  ||| OS: 2.53 MP (patched) ||| Version: "M"
TI-Nspire    |||  Lent out, and never returned
____________________________________________________________

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: Simple Axe Questions
« Reply #37 on: March 26, 2011, 09:42:57 am »
* Happybobjr slaps himself awake.

Opps, thanks scout.

No! I have to thank you, you helped me :P

Offline leafy

  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1554
  • Rating: +475/-97
  • Seizon senryakuuuu!
    • View Profile
    • keff.me
Re: Simple Axe Questions
« Reply #38 on: March 29, 2011, 02:46:34 am »
How do you shift one row on the buffer to the right or the left? Just one row, not like horizontal whwere it shifts the entire screen.
In-progress: Graviter (...)

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Simple Axe Questions
« Reply #39 on: March 29, 2011, 03:12:21 am »
Not easily/efficiently in Axe code. I believe this would do it though. This can also be easily modified to work with buffers besides L6 if you need that.

Code: [Select]
.Example call
63sub(SRL)

.Shift Row Left
Lbl SRL
Asm(140140937DE6C0B4C02C7D87856F292909060C2BCB1610FBC9)

.Shift Row Right
Lbl SRR
Asm(140140937DE6C0B4C07D87856F292909060C2BCB1E10FBC9)