Omnimaga

Calculator Community => TI Calculators => Axe => Topic started by: stevon8ter on December 03, 2012, 05:39:18 pm

Title: [AXE] rotC(Pic1) -> Pic2
Post by: stevon8ter on December 03, 2012, 05:39:18 pm
Is it possible to do: rotC(Pic1)->Pic2 ? (Sprites)
Title: Re: [AXE] rotC(Pic1) -> Pic2
Post by: nikitouzz on December 03, 2012, 05:40:39 pm
no because rotC retunr on pointer and it as you make pic1->pic2....
Title: Re: [AXE] rotC(Pic1) -> Pic2
Post by: stevon8ter on December 03, 2012, 05:42:06 pm
Hmmm and would {Pic1}-> {Pic2} be possible then?
Title: Re: [AXE] rotC(Pic1) -> Pic2
Post by: Deep Toaster on December 03, 2012, 05:43:09 pm
No because the command →Pic2 is actually an instruction to the compiler and doesn't get run during the program.

EDIT: That was for your first question. {Pic1}→{Pic2} is perfectly fine but it only copies the first byte (the first row) of Pic1 to Pic2.
Title: Re: [AXE] rotC(Pic1) -> Pic2
Post by: nikitouzz on December 03, 2012, 05:43:46 pm
yes or not ^^

If you compile you program in applications isn't possible, but else {Pic1}-> {Pic2} copie the first byte of pic1 at pic2 you can make for copie two sprite :copy(PIC1,PIC2,8) ;)
Title: Re: [AXE] rotC(Pic1) -> Pic2
Post by: stevon8ter on December 03, 2012, 05:45:40 pm
With the copy instruction, i can't rotate sprite?
Title: Re: [AXE] rotC(Pic1) -> Pic2
Post by: Deep Toaster on December 03, 2012, 05:47:35 pm
Copy(rotC(Pic1),Pic2,8)
Title: Re: [AXE] rotC(Pic1) -> Pic2
Post by: stevon8ter on December 03, 2012, 05:49:37 pm
Ok thx :D
Title: Re: [AXE] rotC(Pic1) -> Pic2
Post by: nikitouzz on December 03, 2012, 05:52:35 pm
or you can use the anonyme function :

Code: [Select]
:.A
:[FF00FF00FF00FF00]→Pic1
:Buff(8)→GDB1FUNC
:λ(r1)→{GDB1FUNC}r
:λ(rotC(r1))→{GDB1FUNC+2}r
:λ(rotCC(r1))→{GDB1FUNC+4}r
:λ(flipV(r1))→{GDB1FUNC+6}r
:1→D
:
:While 1
:getKey→r1>0 and (r1<5)?r1→D
:Pt-OFF(0,,({D-1*2+GDB1FUNC}r)(Pic1
:DispGraphClrDraw
:EndIf getKey(15)
Title: Re: [AXE] rotC(Pic1) -> Pic2
Post by: Deep Toaster on December 03, 2012, 05:53:34 pm
Lambdas are larger and slower than normal subroutines.
Title: Re: [AXE] rotC(Pic1) -> Pic2
Post by: nikitouzz on December 03, 2012, 05:55:15 pm
yes for one code in grayscale but for th B/W is doof :) but is't right than lambda is very slow
Title: Re: [AXE] rotC(Pic1) -> Pic2
Post by: stevon8ter on December 03, 2012, 06:00:43 pm
I'll just use the easy copy code xp

Thx guys