0 Members and 2 Guests are viewing this topic.
Quote from: DJ Omnimaga on November 27, 2010, 01:54:48 pmQuote from: ScoutDavid on November 27, 2010, 01:53:15 pmQuote from: aeTIos on November 27, 2010, 01:52:42 pmyesThat's a very uncomprehensible reply now, is that a 'yes it works very good scoutDavid, you rule'?That would pretty much be the same thing, aside from the you rule part It was, of course, a joke. I'm now printing this code and will then implement it in my code.Now, I still have to divide a 16*16 sprite I have into 4 8*8 sprites to make a loading screen (not needed but it's professional)
Quote from: ScoutDavid on November 27, 2010, 01:53:15 pmQuote from: aeTIos on November 27, 2010, 01:52:42 pmyesThat's a very uncomprehensible reply now, is that a 'yes it works very good scoutDavid, you rule'?That would pretty much be the same thing, aside from the you rule part
Quote from: aeTIos on November 27, 2010, 01:52:42 pmyesThat's a very uncomprehensible reply now, is that a 'yes it works very good scoutDavid, you rule'?
yes
Quote from: ScoutDavid on November 27, 2010, 01:56:08 pmQuote from: DJ Omnimaga on November 27, 2010, 01:54:48 pmQuote from: ScoutDavid on November 27, 2010, 01:53:15 pmQuote from: aeTIos on November 27, 2010, 01:52:42 pmyesThat's a very uncomprehensible reply now, is that a 'yes it works very good scoutDavid, you rule'?That would pretty much be the same thing, aside from the you rule part It was, of course, a joke. I'm now printing this code and will then implement it in my code.Now, I still have to divide a 16*16 sprite I have into 4 8*8 sprites to make a loading screen (not needed but it's professional)USE lordconiupiters 16*16 sprite drawing routine, if you dont use grayscale.Link: in a minute
The first thing you need to consider is that the drawing of Pic1 at (0,0) is still there, even after you draw it again.So (unless you want the old one to remain) you have to do one of two things: (There might be more, these are the two that have occurred to me.)1) Store a copy of the screen before Pic1 was drawn at all to, say, L3 (the backbuffer). Draw Pic1. When you want to move Pic1, copy the backbuffer to the main buffer. This will effectively remove Pic1 from the screen. You can now draw Pic1 in its new location.
I reread the thread and couldn't find your 'methods', so here is a new idea:Code: [Select]:[38107C1010282828->Pic1:Pt-Change(0,0,Pic1:DispGraph:Repeat getKey(3):ClrDraw:Pt-Change(0,10,Pic1:DispGraph:EndI added ClrDraw, that could work, right?
:[38107C1010282828->Pic1:Pt-Change(0,0,Pic1:DispGraph:Repeat getKey(3):ClrDraw:Pt-Change(0,10,Pic1:DispGraph:End
That should work, but I don't think it does what you originally intended. When you run it, what you will see is Pic1 appearing quickly once then disappearing at (0,0), and then it will display at (0,10), 10 pixels down, until you press right.
My confusion is that I thought you wanted it to start at (0,0) and only move to (10,0) after you press right. I thought that, after that, you wanted it to continue to move right every time you pressed right.
:[38107C1010282828->Pic1:10->A:Pt-Change(0,0,Pic1:DispGraph:Repeat getKey(3):ClrDraw:Pt-Change(0,A,Pic1:A+10->A:DispGraph:If A>=MAX:0->A:End:End
:[38107C1010282828->Pic1:10->A:Lbl 0:Pt-Change(0,0,Pic1:DispGraph:Repeat getKey->Z:End:If Z!=3:Goto 0:End:ClrDraw:Pt-Change(0,A,Pic1:A+10->A:DispGraph:If A>79:0->A:End:End
:[38107C1010282828->Pic1:10->A:Lbl 0:Pt-Change(0,0,Pic1:DispGraph:Repeat getKey(15):Goto 2:End:Lbl 2:Repeat getKey->Z:If Z!=3:Goto 0:End:If Z=3:ClrDraw:Pt-Change(0,10,Pic1:End
:Repeat getKey->Z:End:While Z!=15:If Z=3:ClrDraw:Pt-Change(0,10,Pic1:End
:.PICTEST:[38107C1010282828→Pic1:0→A:Lbl 0:ClrDraw:ClrHome:Pt-Change(0,0,Pic1:DispGraph:Lbl 1:If A>99:0→A:ClrDraw:Pt-Change(A,0,Pic1:DispGraph:End:If A<0:90→A:ClrDraw:Pt-Change(A,0,Pic1:DispGraph:End:Repeat getKey→Z:End:Repeat getKey(15):If Z=3:ClrDraw:A+10→A:Pt-Change(A,0,Pic1:DispGraph:Goto 1:End:If Z=2:ClrDraw:A-10→A:Pt-Change(A,0,Pic1:DispGraph:Goto 1:End:End:Lbl 2
In Axe, just about all mathematics and comparsions are, by default, unsigned. And in an unsigned system, you can never have a value less than zero. What you need is a signed comparison.
:If -B>0#DO CODE:End