0 Members and 2 Guests are viewing this topic.
:[FF36C78465378FC1636374858CCFCF3352CFFFC3T5376CD3]:
[random question]I have been noticing that in advanced programs in axe, (such as the demo rpg) in the beginning the sprites are declared and then it just has something like this:Code: [Select]:[FF36C78465378FC1636374858CCFCF3352CFFFC3T5376CD3]but it doesn't store it or anything.what is the use of this?[/random question]
:[FF36C78465378FC1636374858CCFCF3352CFFFC3T5376CD3]
[00]→GDB1[FF]
Quote from: parser padwan on October 13, 2011, 06:54:44 pm[random question]I have been noticing that in advanced programs in axe, (such as the demo rpg) in the beginning the sprites are declared and then it just has something like this:Code: [Select]:[FF36C78465378FC1636374858CCFCF3352CFFFC3T5376CD3]but it doesn't store it or anything.what is the use of this?[/random question]All static variables are stored one after another in memory, so if you do something likeQuote from: Axe[00]→GDB1[FF]then {Str0+1} will be EFF.
All static variables are stored one after another in memory, so if you do something likeQuote from: Axe[00]→GDB1[FF]then {Str0+1} will be EFF.
:.ENEMY:.enemy:[3C4289819F423C14]->Pic1:.X position of enemies in L1:For(A,1,5):(A*9)->{L1+A}:End:.which direction each enemy is going:For(A,6,10):1->{L1+A}:End:Repeat getKey(15):ClrDraw:Line(0,63,95,63):Line(0,0,95,0):Line(95,0,95,63):Line 0,0,0,63):.draw guys:For(E,1,5):Pt-On(({L1+E}),55,Pic1):End:Dispgraph:.see if at edge:For(F,1,5):If ({L1+F}=1) or ({L1+F}=86):((-1)*({L1+F}))->{L1+F}:End: End:.actually move them:For(C,1,5):({L1+C})+({L1+(C+5)})->{L1+C}:End:Pause 50: End
:If ({L1+F}=1)+({L1+F}=86):-1**{L1+F+5}->{L1+F+5}:End
:For(E,0,4):.from 0 to 4:Pt-On(({L1+E}),55,Pic1):.see if at edge:If ({L1+E}=1)+({L1+E}=86):-1**{L1+E+5}->{L1+E+5}:End:.actually move them:{L1+E}+{L1+E+5}->{L1+E}:End:DispGraph
:For(A,6,10) // A = [6,7,8,9,10]:1->{L1+A} // {L1+6} = [1,1,1,1,1]:End
:Fill(L1+6,5,1) // {L1+6} = 5*[1] = [1,1,1,1,1]
** Is fixed point multiplication, not signed multiplication. The regular * multiplication works for both signed and unsigned numbers.