0 Members and 9 Guests are viewing this topic.
pxl-Test(X,Y+1) should be pxl-Test(X,Y/256+1)Also you can save a lot of memory by doing !If pxl-Test(X,Y/256+1) instead of If (pxl-Test(X,Y/256+1)=0).
Yes, it is. The advantage to having x256 is that you can have the object move at partial speeds (such as one pixel every three frames for the illusion of 33% speed). pxl-Test( and all those other commands still treat it as if it were a multiple of 256, but this way you can have one object moving one pixel every frame and another at a fraction of that speed.
.Y of the sprite0→Y.X of the sprite0→X.X Acceleration of the sprite0→A.Y Acceleration of the sprite0→BRepeat getKey(15) ClrDraw If getKey(2) A-128→A End If getKey(3) A+128→A End Line(0,63,95,63) X+A→X Y+B→Y Pxl-On(X/256,Y/256) If (pxl-Test(X,Y+1)=0) Y+128→Y End DispGraphEnd
[FFFFFF->Str1[010203[More hex[504432]
[FFFFFF[010203[More hex[504432]->Str1
[0102"Foobar"Data(42)->Str1
It occurred to me that I'm treating memory almost as magic in some cases.So, some questions.What's the difference between doingCode: [Select][FFFFFF->Str1[010203[More hex[504432]andCode: [Select][FFFFFF[010203[More hex[504432]->Str1
If want to load a large amount of memory (using hex, strings or Data()) on multiple lines, how does Axe know when the block of memory ends? For example, if I haveCode: [Select][0102"Foobar"Data(42)->Str1How does the compiler know the limits of the block of memory?
[FFFFFF]->Str1[010203][HEX000][FFFFFF]
[FFFFFF->Str1[010203[HEX000[FFFFFF]
.Y of the sprite0→Y.X of the sprite0→X.X Acceleration of the sprite0→A.Y Acceleration of the sprite0→BRepeat getKey(15) ClrDraw If getKey(2) A-128→A End If getKey(3) A+128→A End Line(0,63,95,63) X+A→X Y+B→Y Pxl-On(X/256,Y/256) !If (pxl-Test(X/256,Y/256+1)) Y+128→Y End DispGraphEnd
!If Y/2560->A->BEnd