Author Topic: Project Snake X - help  (Read 26165 times)

0 Members and 1 Guest are viewing this topic.

Offline Snake X

  • Ancient Veteran
  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 810
  • Rating: +33/-8
    • View Profile
Re: Project Snake X - help
« Reply #45 on: August 14, 2010, 08:11:23 pm »
yeah.. That's the only thing that I could think of, but when you put it that way, it makes sense to me now. Thanks for that clarification nemo!

edit: I tried what you said runner about going through all the steps again and well.. it didn't work for me. here's the code and a screenie.
Code: [Select]
:.SNAKEX
:
:.<DATA>
:.LOGO
:[07C0000000000000000000001FE0000000000000000000001FF0000000780000000000003FF0000000FC0000000001F87FF7CF0000FC0000000787F87FF7DF87E0FC0000001F87F07BF7FF8FF0FC0000003F87E079E7FF8FF8FC0000003FC7C07F07FF9FFCFC1000001FEF807FE7FF8FFCFC7C00000FFF807FF7FF8FFCFDFE1E0007FF807FF7FF8FFEFDFE3FC003FF001FF7FF9FFEFFFC7FC001FE0001F7FF9FFEFFF8FFC001FF0039F7EF9FFEFFE0FFC000FF8079F7EFDFFEFFC1FBC001FFC0FFF7EFDFFEFFE1FFC003FFF0FFF7C30FFEFFE1FFC003FFFC7FE3C00FDFFFF1FF8007E7FC1F0000000EFDFFFDE00FC3FC00000000007CFEFBE01F83F80000000000187EFFE03F83F80000000000003E7FE03F8040000000000000003FC03F00000000000000000000000E]→Pic1
:
:.MENU RAIN
:[8080808000000000]→Pic2
:
:.MENU ARROW
:[0010181C18100000]→Pic3
:
:.MENU ITEMS
:"PLAY"→Str1
:"HELP"→Str2
:"SCORES"→Str3
:"QUIT"→Str4
:"ADVENTURE MODE"→Str6
:"TIMED MODE"→Str7
:"CLASSIC MODE"→Str8
:"MAIN MENU"→Str9
:
:.<INITIALIZING>
:DiagnosticOff
:ClrDraw
:ClrDraw{^r}
:
:.STORE MENU TO BACK BUFFER
:Fix 1
:Fix 5
:Text(30,28→M→N,Str1)
:Text(30,36,Str2)
:Text(30,44,Str3)
:Text(30,52,Str4)
:DrawInv
:StorePic
:ClrDraw
:
:.INTRO EFFECT
:For(A,0,63)
:  Line(0,A,95,63-A)
:  DispGraph
:End
:For(A,0,95)
:  Line(A,0,95-A,63)
:  DispGraph
:End
:
:1→A→Z
:
:
:.<MENU LOOP>
:Repeat getKey→K=9 and (M=N) or (K=15)
:
:  .MOVE CURSOR
:  .Update the cursor destination and current position, although does not draw cursor
:  .there are three things being combining to get a new value of N. First, M>N will be 1 if M (destination) is greater than N (current position), so the expression will be 1 so far. Second is -(M<N), which will evaluate to -1 if M is less than N, so this subtracts 1 in this case. This can only be true if the first expression is false, so the expression will now equal 1 if M>N, -1 if M<N, or 0 is neither are true (M=N). This offset is then applied to N, either moving N in the appropriate direction towards M or, if N already equals M, not changing it at all.
:  min(max(K=1-(K=4)*8+M,28),52)→M>N-(M<N)+N→N
:
:  .ADD RAIN
:  .Add a new rain sprite every 5 iterations of the menu loop
:  DS<(A,5)
:    Pt-Change(rand^96,1,Pic2)
:  End
:
:  .DRAW LOGO AND MENU
:  .Shift sandstorm
:  Z+1→Z
:  .Move rain down
:  Vertical +
:  .Backup rain image
:  conj(L6,L1,708)
:  .Draw logo, sandstorm, menu, and cursor
:  sub(DM)
:  .Update screen
:  DispGraph
:  .Restore rain image
:  conj(L1,L6,708)
:
:End
:
:
:.<MENU HANDLER>
:Fix 0
:Fix 4
:ClrHome
:
:.If user did not quit
:If K-15 and (M-52)
:
:  .If PLAY
:  !If M-28
:Text(30,28→M→N,Str6)
:Text(30,36,Str7)
:Text(30,44,Str8)
:Text(30,52,Str9)
:DrawInv
:StorePic
:ClrDraw
:0→X
:.<MENU LOOP>
:Repeat getKey→K=9 and (M=N) or (K=15)
:
:  .MOVE CURSOR
:  .Update the cursor destination and current position, although does not draw cursor
:  .there are three things being combining to get a new value of N. First, M>N will be 1 if M (destination) is greater than N (current position), so the expression will be 1 so far. Second is -(M<N), which will evaluate to -1 if M is less than N, so this subtracts 1 in this case. This can only be true if the first expression is false, so the expression will now equal 1 if M>N, -1 if M<N, or 0 is neither are true (M=N). This offset is then applied to N, either moving N in the appropriate direction towards M or, if N already equals M, not changing it at all.
:  min(max(K=1-(K=4)*8+M,28),52)→M>N-(M<N)+N→N
:
:  .ADD RAIN
:  .Add a new rain sprite every 5 iterations of the menu loop
:  DS<(A,5)
:    Pt-Change(rand^96,1,Pic2)
:  End
:
:  .DRAW LOGO AND MENU
:  .Shift sandstorm
:  Z+1→Z
:  .Move rain down
:  Vertical +
:  .Backup rain image
:  conj(L6,L1,708)
:  .Draw logo, sandstorm, menu, and cursor
:  sub(DM)
:  .Update screen
:  DispGraph
:  .Restore rain image
:  conj(L1,L6,708)
:
:End
:End
:  .If HELP
:  !If M-36
:    Disp Str2
:  End
:
:  .If SCORES
:  !If M-44
:    Disp Str3
:  End
:
:.If QUIT
:Else
:  Disp Str4
:End
:Return
:
:
:.<SUBROUTINES>
:.DRAW MENU
:Lbl DM
:.∙=bitwise and
:.□=bitwise xor
:.┼=bitwise or
:
:  .DRAW LOGO AND SANDSTORM
:  .Loop through the logo, 2 bytes at a time
:  For(B,0,148)
:    .Logo data - End state: Black logo image on white bg
:    .XOR 65535 - Inverts logo data - End state: White logo image on black bg
:    .AND Rain image - If either is white (0), output is white, so logo and rain remain white - End state: White logo image and white rain on black bg
:    .OR *Must wait for data in parentheses to be parsed* :
:      .Sandstorm garbage
:      .AND Logo data - This is the original, black on white logo. For the outside of the logo text, which is white (0), all ANDs will result in staying white (no change, so outside of logo text is unaffected) - The black text of the logo is all black (1), so the end state will be determined by the random data of the sandstorm - End state: Random black/white image on white bg
:    .OR ^ - The only areas of ^ which can be black are the logo text, so everything outside the logo text will be unaffected, while areas inside (previously white) will take on the random sandstorm image - End state: Sandstorm logo image and white rain on black bg
:    .→ Buffer
:    {B*2+Pic1}{^r}→D□65535∙{B*2+L6→C}{^r}┼({B*2+Z}{^r}∙D)→{C}{^r}
:  End
:
:  .DRAW MENU ITEMS
:  .Loop through the menu image, 2 bytes at a time
:  For(B,168,353)
:    .Menu image - End state: White text on black bg
:    .AND Rain image - If either is white (0 - menu text and rain droplets), result will be white (0) - End state: White menu items and rain on black bg
:    .→ Buffer
:    {B*2+L3}{^r}∙{B*2+L6→C}{^r}→{C}{^r}
:  End
:
:  .DRAW CURSOR
:  .Draw black cursor, turning any rain that might have been there black
:  Pt-On(22,N,Pic3)
:  .Invert cursor, turning cursor white
:  Pt-Change(22,N,Pic3)
:
:Return
:
:
:.<VARIABLES>
:.A=Counter to add rain
:.B=Temp loop variable for Lbl DM
:.C=Temp (buffer)
:.D=Temp (pic1 data)
:.K=getKey
:.M=Menu cursor destination
:.N=Menu cursor current display position
:.Z=Sandstorm offset
:.L1=Rain image backup
:.L3=Menu items image
:.L6=Rain image
« Last Edit: August 14, 2010, 09:05:19 pm by Snake X »
Loved this place, still the best producers of power metal, and sparked my dreams of coding.

Offline nemo

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1203
  • Rating: +95/-11
    • View Profile
Re: Project Snake X - help
« Reply #46 on: August 14, 2010, 10:07:23 pm »
copy/paste into SC.
umm.. i got rid of all your comments. sorry. i was trying to keep them, but they cluttered up my workspace. i didn't change very much.. just reordered some stuff around. added a ClrDraw and a DrawInv. make sure you use sourcecoder to parse it.
Code: [Select]
:.WHATYEAH
:[07C0000000000000000000001FE0000000000000000000001FF0000000780000000000003FF0000000FC0000000001F87FF7CF0000FC0000000787F87FF7DF87E0FC0000001F87F07BF7FF8FF0FC0000003F87E079E7FF8FF8FC0000003FC7C07F07FF9FFCFC1000001FEF807FE7FF8FFCFC7C00000FFF807FF7FF8FFCFDFE1E0007FF807FF7FF8FFEFDFE3FC003FF001FF7FF9FFEFFFC7FC001FE0001F7FF9FFEFFF8FFC001FF0039F7EF9FFEFFE0FFC000FF8079F7EFDFFEFFC1FBC001FFC0FFF7EFDFFEFFE1FFC003FFF0FFF7C30FFEFFE1FFC003FFFC7FE3C00FDFFFF1FF8007E7FC1F0000000EFDFFFDE00FC3FC00000000007CFEFBE01F83F80000000000187EFFE03F83F80000000000003E7FE03F8040000000000000003FC03F00000000000000000000000E]→Pic1
:[8080808000000000]→Pic2
:[0010181C18100000]→Pic3
:"PLAY"→Str1
:"HELP"→Str2
:"SCORES"→Str3
:"QUIT"→Str4
:"ADVENTURE MODE"→Str6
:"TIMED MODE"→Str7
:"CLASSIC MODE"→Str8
:"MAIN MENU"→Str9
:DiagnosticOff
:ClrDraw
:ClrDraw{^r}
:Fix 1
:Fix 5
:Text(30,28→M→N,Str1)
:Text(30,36,Str2)
:Text(30,44,Str3)
:Text(30,52,Str4)
:DrawInv
:StorePic
:ClrDraw
:For(A,0,63)
:Line(0,A,95,63-A)
:DispGraph
:End
:For(A,0,95)
:Line(A,0,95-A,63)
:DispGraph
:End
:1→A→Z
:Repeat getKey→K=9 and (M=N)
:ReturnIf getKey(15)
:min(max(K=1-(K=4)*8+M,28),52)→M>N-(M<N)+N→N
:DS<(A,5)
:Pt-Change(rand^96,1,Pic2)
:End
:Z+1→Z
:Vertical +
:conj({L6},{L1},708)
:sub(DM)
:DispGraph
:conj({L1},{L6},708)
:End
:ClrHome
:If K-15 and (M-52)
:!If M-28
:ClrDraw
:ClrDraw{^r}
:Fix 0
:Fix 5
:Text(30,28→M→N,Str6
:Text(30,36,Str7
:Text(30,44,Str8
:Text(30,52,Str9
:Fix 4
:DrawInv
:StorePic
:ClrDraw
:DrawInv
:0→X+1→A→Z
:Repeat getKey→K=9 and (M=N) or (K=15)
:min(max(K=1-(K=4)*8+M,28),52)→M>N-(M<N)+N→N
:DS<(A,5)
:Pt-Change(rand^96,1,Pic2)
:End
:Z+1→Z
:Vertical +
:conj({L6},{L1},708)
:sub(DM)
:DispGraph
:conj({L1},{L6},708)
:End
:End
:!If M-36
:Disp Str2
:End
:!If M-44
:Disp Str3
:End
:Else
:Disp Str4
:End
:Return
:Lbl DM
:For(B,0,148)
:{B*2+Pic1}{^r}→D□65535∙{B*2+{L6}→C}{^r}┼({B*2+Z}{^r}∙D)→{C}{^r}
:End
:For(B,168,353)
:{B*2+{L3}}{^r}∙{B*2+{L6}→C}{^r}→{C}{^r}
:End
:Pt-On(22,N,Pic3)
:Pt-Change(22,N,Pic3)
:Return
:LBL X
:Return
:LBL TM
:Return
:LBL CL
:Return

first attempt at a screenshot, win/fail?




Offline Snake X

  • Ancient Veteran
  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 810
  • Rating: +33/-8
    • View Profile
Re: Project Snake X - help
« Reply #47 on: August 15, 2010, 02:45:23 pm »
I'm sorry.. really I am, but I need the commentary and the proper spacing. I almost went insane trying to work without it  ;). Now, I see what you mean runer and apparently it won't recognize the bit I set to determine which menu it is in. I set the bit as 0 in the first menu and 1 in the second. I used !if M-28 and X-0 for example to determine which menu I was in. Well.. that didn't help so now im lost.
code:
Code: [Select]
:.SNAKEX
:
:.<DATA>
:.LOGO
:[07C0000000000000000000001FE0000000000000000000001FF0000000780000000000003FF0000000FC0000000001F87FF7CF0000FC0000000787F87FF7DF87E0FC0000001F87F07BF7FF8FF0FC0000003F87E079E7FF8FF8FC0000003FC7C07F07FF9FFCFC1000001FEF807FE7FF8FFCFC7C00000FFF807FF7FF8FFCFDFE1E0007FF807FF7FF8FFEFDFE3FC003FF001FF7FF9FFEFFFC7FC001FE0001F7FF9FFEFFF8FFC001FF0039F7EF9FFEFFE0FFC000FF8079F7EFDFFEFFC1FBC001FFC0FFF7EFDFFEFFE1FFC003FFF0FFF7C30FFEFFE1FFC003FFFC7FE3C00FDFFFF1FF8007E7FC1F0000000EFDFFFDE00FC3FC00000000007CFEFBE01F83F80000000000187EFFE03F83F80000000000003E7FE03F8040000000000000003FC03F00000000000000000000000E]→Pic1
:
:.MENU RAIN
:[8080808000000000]→Pic2
:
:.MENU ARROW
:[0010181C18100000]→Pic3
:
:.MENU ITEMS
:"PLAY"→Str1
:"HELP"→Str2
:"SCORES"→Str3
:"QUIT"→Str4
:"ADVENTURE MODE"→Str6
:"TIMED MODE"→Str7
:"CLASSIC MODE"→Str8
:"MAIN MENU"→Str9
:
:.<INITIALIZING>
:DiagnosticOff
:ClrDraw
:ClrDraw{^r}
:
:.STORE MENU TO BACK BUFFER
:Fix 1
:Fix 5
:Text(30,28→M→N,Str1)
:Text(30,36,Str2)
:Text(30,44,Str3)
:Text(30,52,Str4)
:DrawInv
:StorePic
:ClrDraw
:
:.INTRO EFFECT
:  For(A,0,63)
:  Line(0,A,95,63-A)
:  DispGraph
:End
:For(A,0,95)
:  Line(A,0,95-A,63)
:  DispGraph
:End
:
:1→A→Z
:
:
:.<MENU LOOP>
:Repeat getKey→K=9 and (M=N)
:ReturnIf getKey(15)
:
:  .MOVE CURSOR
:  .Update the cursor destination and current position, although does not draw cursor
:  .there are three things being combining to get a new value of N. First, M>N will be 1 if M (destination) is greater than N (current position), so the expression will be 1 so far. Second is -(M<N)
:  min(max(K=1-(K=4)*8+M,28),52)→M>N-(M<N)+N→N
:  DS<(A,5)
:    Pt-Change(rand^96,1,Pic2)
:  End
:
:  .DRAW LOGO AND MENU
:  .Shift sandstorm
:  Z+1→Z
:  .Move rain down
:  Vertical +
:  .Backup rain image
:  conj({L6},{L1},708)
:  .Draw logo, sandstorm, menu, and cursor
:  sub(DM)
:  .Update screen
:  DispGraph
:  .Restore rain image
:  conj({L1},{L6},708)
:
:End
:
:
:.<MENU HANDLER>
:ClrHome
:   If K-15 and (M-52)
:.set menu bit
:0→X
:
:!If M-28 and X-0
:     ClrDraw
:     ClrDraw{^r}
:     Fix 0
:     Fix 5
:     Text(30,28→M→N,Str6
:     Text(30,36,Str7
:     Text(30,44,Str8
:     Text(30,52,Str9
:     Fix 4
:
:     DrawInv
:     StorePic
:     ClrDraw
:     DrawInv
:     1→A→Z→X
:
:
:   .<MENU LOOP>
:
:
:  Repeat getKey→K=9 and (M=N) or (K=15)
:
:  .MOVE CURSOR
:  .Update the cursor destination and current position, although does not draw cursor
:  .there are three things being combining to get a new value of N. First, M>N will be 1 if M (destination) is greater than N (current position), so the expression will be 1 so far. Second is -(M<N), which will evaluate to -1 if M is less than N, so this subtracts 1 in this case. This can only be true if the first expression is false, so the expression will now equal 1 if M>N, -1 if M<N, or 0 is neither are true (M=N). This offset is then applied to N, either moving N in the appropriate direction towards M or, if N already equals M, not changing it at all.
:  min(max(K=1-(K=4)*8+M,28),52)→M>N-(M<N)+N→N
:
:  .ADD RAIN
:  .Add a new rain sprite every 5 iterations of the menu loop
:  DS<(A,5)
:    Pt-Change(rand^96,1,Pic2)
:  End
:
:  .DRAW LOGO AND MENU
:  .Shift sandstorm
:  Z+1→Z
:  Vertical +
:  conj({L6},{L1},708)
:  sub(DM)
:  DispGraph
:  conj({L1},{L6},708)
:  End
:
:  .<MENU HANDLER>
:  !If M-28 and X-1
:     sub(ADV)
:   End
:  !If M-36 and X-1
:     sub(TM)
:   End
:End
:  .If HELP
:  !If M-36 and X-0
:    Disp Str2
:  End
:  .If SCORES
:  !If M-44 and X-0
:    Disp Str3
:  End
:
:
:.If QUIT
:Else
:  Disp Str4
:End
:Return
:
:
:.<SUBROUTINES>
:.DRAW MENU
:Lbl DM
:.∙=bitwise and
:.□=bitwise xor
:.┼=bitwise or
:
:  .DRAW LOGO AND SANDSTORM
:  .Loop through the logo, 2 bytes at a time
:  For(B,0,148)
:    .Logo data - End state: Black logo image on white bg
:    .XOR 65535 - Inverts logo data - End state: White logo image on black bg
:    .AND Rain image - If either is white (0), output is white, so logo and rain remain white - End state: White logo image and white rain on black bg
:    .OR *Must wait for data in parentheses to be parsed* :
:      .Sandstorm garbage
:      .AND Logo data - This is the original, black on white logo. For the outside of the logo text, which is white (0), all ANDs will result in staying white (no change, so outside of logo text is unaffected) - The black text of the logo is all black (1), so the end state will be determined by the random data of the sandstorm - End state: Random black/white image on white bg
:    .OR ^ - The only areas of ^ which can be black are the logo text, so everything outside the logo text will be unaffected, while areas inside (previously white) will take on the random sandstorm image - End state: Sandstorm logo image and white rain on black bg
:    .→ Buffer
:    {B*2+Pic1}{^r}→D□65535∙{B*2+{L6}→C}{^r}┼({B*2+Z}{^r}∙D)→{C}{^r}
:  End
:
:  .DRAW MENU ITEMS
:  .Loop through the menu image, 2 bytes at a time
:  For(B,168,353)
:    .Menu image - End state: White text on black bg
:    .AND Rain image - If either is white (0 - menu text and rain droplets), result will be white (0) - End state: White menu items and rain on black bg
:    .→ Buffer
:    {B*2+{L3}}{^r}∙{B*2+{L6}→C}{^r}→{C}{^r}
:  End
:
:  .DRAW CURSOR
:  .Draw black cursor, turning any rain that might have been there black
:  Pt-On(22,N,Pic3)
:  .Invert cursor, turning cursor white
:  Pt-Change(22,N,Pic3)
:
:Return
:
:Lbl ADV
:  ClrDraw
:  ClrDraw{^r}
:  Disp Str6
:Return
:Lbl TM
:  ClrDraw
:  ClrDraw{^r}
:  Disp Str7
:Return
:Lbl CL
:  ClrDraw
:  ClrDraw{^r}
:  Disp Str8
:Return
:
:
:.<VARIABLES>
:.A=Counter to add rain
:.B=Temp loop variable for Lbl DM
:.C=Temp (buffer)
:.D=Temp (pic1 data)
:.K=getKey
:.M=Menu cursor destination
:.N=Menu cursor current display position
:.X=current menu bit
:.Z=Sandstorm offset
:.L1=Rain image backup
:.L3=Menu items image
:.L6=Rain image
« Last Edit: August 15, 2010, 02:48:02 pm by Snake X »
Loved this place, still the best producers of power metal, and sparked my dreams of coding.

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Project Snake X - help
« Reply #48 on: August 15, 2010, 04:03:26 pm »
Using things like !If M-28 is a sort of cheap, smaller (byte-wise) way of saying If M=28. However, the problem with these types of statements is that they often will not work when trying to combine statements. If you want I can explain it, just trust me, it doesn't work. You either need to do it the right way, like:
Code: [Select]
If M=28 and (X=0)Or nest the two, like:
Code: [Select]
!If X
  !If M-28
By the way, the easiest way to split up your menu processing would be not to check individually at each value of M for the X value, but instead put an !If X in front of the whole menu handler and put all the menu 0 checks in there, and after it use Else to handle all the menu 1 checks.
« Last Edit: August 15, 2010, 04:05:58 pm by Runer112 »

Offline Snake X

  • Ancient Veteran
  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 810
  • Rating: +33/-8
    • View Profile
Re: Project Snake X - help
« Reply #49 on: August 15, 2010, 04:59:23 pm »
ahh I see. Ok, so I'll edit this post if I need help.
edit: I do. at 99% 1st pass - ERR: BLOCK. It takes me to the last line! I double checked everything...
code:
Code: [Select]
:.SNAKEX
:
:.<DATA>
:.LOGO
:[07C0000000000000000000001FE0000000000000000000001FF0000000780000000000003FF0000000FC0000000001F87FF7CF0000FC0000000787F87FF7DF87E0FC0000001F87F07BF7FF8FF0FC0000003F87E079E7FF8FF8FC0000003FC7C07F07FF9FFCFC1000001FEF807FE7FF8FFCFC7C00000FFF807FF7FF8FFCFDFE1E0007FF807FF7FF8FFEFDFE3FC003FF001FF7FF9FFEFFFC7FC001FE0001F7FF9FFEFFF8FFC001FF0039F7EF9FFEFFE0FFC000FF8079F7EFDFFEFFC1FBC001FFC0FFF7EFDFFEFFE1FFC003FFF0FFF7C30FFEFFE1FFC003FFFC7FE3C00FDFFFF1FF8007E7FC1F0000000EFDFFFDE00FC3FC00000000007CFEFBE01F83F80000000000187EFFE03F83F80000000000003E7FE03F8040000000000000003FC03F00000000000000000000000E]→Pic1
:
:.MENU RAIN
:[8080808000000000]→Pic2
:
:.MENU ARROW
:[0010181C18100000]→Pic3
:
:.MENU ITEMS
:"PLAY"→Str1
:"HELP"→Str2
:"SCORES"→Str3
:"QUIT"→Str4
:"ADVENTURE MODE"→Str6
:"TIMED MODE"→Str7
:"CLASSIC MODE"→Str8
:"MAIN MENU"→Str9
:
:.<INITIALIZING>
:DiagnosticOff
:ClrDraw
:ClrDraw{^r}
:
:.STORE MENU TO BACK BUFFER
:Fix 1
:Fix 5
:Text(30,28→M→N,Str1)
:Text(30,36,Str2)
:Text(30,44,Str3)
:Text(30,52,Str4)
:DrawInv
:StorePic
:ClrDraw
:
:.INTRO EFFECT
:  For(A,0,63)
:  Line(0,A,95,63-A)
:  DispGraph
:End
:For(A,0,95)
:  Line(A,0,95-A,63)
:  DispGraph
:End
:
:1→A→Z
:
:
:.<MENU LOOP>
:Repeat getKey→K=9 and (M=N)
:ReturnIf getKey(15)
:
:  .MOVE CURSOR
:  .Update the cursor destination and current position, although does not draw cursor
:  .there are three things being combining to get a new value of N. First, M>N will be 1 if M (destination) is greater than N (current position), so the expression will be 1 so far. Second is -(M<N)
:  min(max(K=1-(K=4)*8+M,28),52)→M>N-(M<N)+N→N
:  DS<(A,5)
:    Pt-Change(rand^96,1,Pic2)
:  End
:
:  .DRAW LOGO AND MENU
:  .Shift sandstorm
:  Z+1→Z
:  .Move rain down
:  Vertical +
:  .Backup rain image
:  conj({L6},{L1},708)
:  .Draw logo, sandstorm, menu, and cursor
:  sub(DM)
:  .Update screen
:  DispGraph
:  .Restore rain image
:  conj({L1},{L6},708)
:
:End
:
:
:.<MENU HANDLER>
:ClrHome
:
:
:   If K-15 and (M-52)
:
:    .set menu bit
:    0→X
:
:    .If menu bit is 0
:    !If X
:
:!If M-28
:     ClrDraw
:     ClrDraw{^r}
:     Fix 0
:     Fix 5
:     Text(30,28→M→N,Str6
:     Text(30,36,Str7
:     Text(30,44,Str8
:     Text(30,52,Str9
:     Fix 4
:
:     DrawInv
:     StorePic
:     ClrDraw
:     Drawinv
:     1→A→Z
:
:
:.<MENU LOOP>
:
:
:  Repeat getKey→K=9 and (M=N) or (K=15)
:
:      .MOVE CURSOR
:      .Update the cursor destination and current position, although does not draw cursor
:      .there are three things being combining to get a new value of N. First, M>N will be 1 if M (destination) is greater than N (current position), so the expression will be 1 so far. Second is -(M<N), which will evaluate to -1 if M is less than N, so this subtracts 1 in this case. This can only be true if the first expression is false, so the expression will now equal 1 if M>N, -1 if M<N, or 0 is neither are true (M=N). This offset is then applied to N, either moving N in the appropriate direction towards M or, if N already equals M, not changing it at all.
:      min(max(K=1-(K=4)*8+M,28),52)→M>N-(M<N)+N→N
:
:      .ADD RAIN
:      .Add a new rain sprite every 5 iterations of the menu loop
:      DS<(A,5)
:        Pt-Change(rand^96,1,Pic2)
:      End
:
:      .DRAW LOGO AND MENU
:      .Shift sandstorm
:      Z+1→Z
:      Vertical +
:      conj({L6},{L1},708)
:      sub(DM)
:      DispGraph
:      conj({L1},{L6},708)
:
:  End
:
:  .<MENU HANDLER>
:  !If M-28
:     sub(ADV)
:   End
:  !If M-36
:     sub(TM)
:   End
:  !If M-44
:     sub(CL)
:  End
:  !If M-52
:  End
:.If menu bit is 1
:Else
:  .If HELP
:  !If M-36
:    Disp Str2
:  End
:  .If SCORES
:  !If M-44
:    Disp Str3
:  End
: .If QUIT
: !If M-52
:   Disp Str4
:  End
:Return
:
:
:.<SUBROUTINES>
:.DRAW MENU
:Lbl DM
:.∙=bitwise and
:.□=bitwise xor
:.┼=bitwise or
:
:  .DRAW LOGO AND SANDSTORM
:  .Loop through the logo, 2 bytes at a time
:  For(B,0,148)
:    .Logo data - End state: Black logo image on white bg
:    .XOR 65535 - Inverts logo data - End state: White logo image on black bg
:    .AND Rain image - If either is white (0), output is white, so logo and rain remain white - End state: White logo image and white rain on black bg
:    .OR *Must wait for data in parentheses to be parsed* :
:      .Sandstorm garbage
:      .AND Logo data - This is the original, black on white logo. For the outside of the logo text, which is white (0), all ANDs will result in staying white (no change, so outside of logo text is unaffected) - The black text of the logo is all black (1), so the end state will be determined by the random data of the sandstorm - End state: Random black/white image on white bg
:    .OR ^ - The only areas of ^ which can be black are the logo text, so everything outside the logo text will be unaffected, while areas inside (previously white) will take on the random sandstorm image - End state: Sandstorm logo image and white rain on black bg
:    .→ Buffer
:    {B*2+Pic1}{^r}→D□65535∙{B*2+{L6}→C}{^r}┼({B*2+Z}{^r}∙D)→{C}{^r}
:  End
:
:  .DRAW MENU ITEMS
:  .Loop through the menu image, 2 bytes at a time
:  For(B,168,353)
:    .Menu image - End state: White text on black bg
:    .AND Rain image - If either is white (0 - menu text and rain droplets), result will be white (0) - End state: White menu items and rain on black bg
:    .→ Buffer
:    {B*2+{L3}}{^r}∙{B*2+{L6}→C}{^r}→{C}{^r}
:  End
:
:  .DRAW CURSOR
:  .Draw black cursor, turning any rain that might have been there black
:  Pt-On(22,N,Pic3)
:  .Invert cursor, turning cursor white
:  Pt-Change(22,N,Pic3)
:
:Return
:
:Lbl ADV
:  ClrDraw
:  ClrDraw{^r}
:  Disp Str6
:Return
:Lbl TM
:  ClrDraw
:  ClrDraw{^r}
:  Disp Str7
:Return
:Lbl CL
:  ClrDraw
:  ClrDraw{^r}
:  Disp Str8
:Return
:
:
:.<VARIABLES>
:.A=Counter to add rain
:.B=Temp loop variable for Lbl DM
:.C=Temp (buffer)
:.D=Temp (pic1 data)
:.K=getKey
:.M=Menu cursor destination
:.N=Menu cursor current display position
:.X=current menu bit
:.Z=Sandstorm offset
:.L1=Rain image backup
:.L3=Menu items image
:.L6=Rain image
« Last Edit: August 15, 2010, 05:32:32 pm by Snake X »
Loved this place, still the best producers of power metal, and sparked my dreams of coding.

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Project Snake X - help
« Reply #50 on: August 15, 2010, 06:19:37 pm »
Let's correctly indent this code, shall we?

Code: [Select]
:If K-15 and (M-52)
:
:  .set menu bit
:  0→X
:
:  .If menu bit is 0
:  !If X
:
:    !If M-28
:      ClrDraw
:      ClrDraw{^r}
:      Fix 0
:      Fix 5
:      Text(30,28→M→N,Str6
:      Text(30,36,Str7
:      Text(30,44,Str8
:      Text(30,52,Str9
:      Fix 4
:
:      DrawInv
:      StorePic
:      ClrDraw
:      Drawinv
:      1→A→Z
:
:
:      .<MENU LOOP>
:
:
:      Repeat getKey→K=9 and (M=N) or (K=15)
:
:        .MOVE CURSOR
:        .Update the cursor destination and current position, although does not draw cursor
:        .there are three things being combining to get a new value of N. First, M>N will be 1 if M (destination) is greater than N (current position), so the expression will be 1 so far. Second is -(M<N), which will evaluate to -1 if M is less than N, so this subtracts 1 in this case. This can only be true if the first expression is false, so the expression will now equal 1 if M>N, -1 if M<N, or 0 is neither are true (M=N). This offset is then applied to N, either moving N in the appropriate direction towards M or, if N already equals M, not changing it at all.
:        min(max(K=1-(K=4)*8+M,28),52)→M>N-(M<N)+N→N
:
:        .ADD RAIN
:        .Add a new rain sprite every 5 iterations of the menu loop
:        DS<(A,5)
:          Pt-Change(rand^96,1,Pic2)
:        End
:
:        .DRAW LOGO AND MENU
:        .Shift sandstorm
:        Z+1→Z
:        Vertical +
:        conj({L6},{L1},708)
:        sub(DM)
:        DispGraph
:        conj({L1},{L6},708)
:
:      End
:
:      .<MENU HANDLER>
:      !If M-28
:        sub(ADV)
:      End
:      !If M-36
:        sub(TM)
:      End
:      !If M-44
:        sub(CL)
:      End
:      !If M-52
:      End
:      .If menu bit is 1
:    Else
:      .If HELP
:      !If M-36
:        Disp Str2
:      End
:      .If SCORES
:      !If M-44
:        Disp Str3
:      End
:      .If QUIT
:      !If M-52
:        Disp Str4
:      End
:      Return

Looks like you're three mismatched Ends short.
« Last Edit: August 15, 2010, 06:21:07 pm by Runer112 »

Offline Snake X

  • Ancient Veteran
  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 810
  • Rating: +33/-8
    • View Profile
Re: Project Snake X - help
« Reply #51 on: August 15, 2010, 06:35:12 pm »
thanks for that.. heh, nemo deleted that and I hand-added it.. guess I didn't do a good job =p

edit: x.x still get an err: block
Code: [Select]
:.SNAKEX
:
:.<DATA>
:.LOGO
:[07C0000000000000000000001FE0000000000000000000001FF0000000780000000000003FF0000000FC0000000001F87FF7CF0000FC0000000787F87FF7DF87E0FC0000001F87F07BF7FF8FF0FC0000003F87E079E7FF8FF8FC0000003FC7C07F07FF9FFCFC1000001FEF807FE7FF8FFCFC7C00000FFF807FF7FF8FFCFDFE1E0007FF807FF7FF8FFEFDFE3FC003FF001FF7FF9FFEFFFC7FC001FE0001F7FF9FFEFFF8FFC001FF0039F7EF9FFEFFE0FFC000FF8079F7EFDFFEFFC1FBC001FFC0FFF7EFDFFEFFE1FFC003FFF0FFF7C30FFEFFE1FFC003FFFC7FE3C00FDFFFF1FF8007E7FC1F0000000EFDFFFDE00FC3FC00000000007CFEFBE01F83F80000000000187EFFE03F83F80000000000003E7FE03F8040000000000000003FC03F00000000000000000000000E]→Pic1
:
:.MENU RAIN
:[8080808000000000]→Pic2
:
:.MENU ARROW
:[0010181C18100000]→Pic3
:
:.MENU ITEMS
:"PLAY"→Str1
:"HELP"→Str2
:"SCORES"→Str3
:"QUIT"→Str4
:"ADVENTURE MODE"→Str6
:"TIMED MODE"→Str7
:"CLASSIC MODE"→Str8
:"MAIN MENU"→Str9
:
:.<INITIALIZING>
:DiagnosticOff
:ClrDraw
:ClrDraw{^r}
:
:.STORE MENU TO BACK BUFFER
:Fix 1
:Fix 5
:Text(30,28→M→N,Str1)
:Text(30,36,Str2)
:Text(30,44,Str3)
:Text(30,52,Str4)
:DrawInv
:StorePic
:ClrDraw
:
:.INTRO EFFECT
:  For(A,0,63)
:  Line(0,A,95,63-A)
:  DispGraph
:End
:For(A,0,95)
:  Line(A,0,95-A,63)
:  DispGraph
:End
:
:1→A→Z
:
:
:.<MENU LOOP>
:Repeat getKey→K=9 and (M=N)
:ReturnIf getKey(15)
:
:  .MOVE CURSOR
:  .Update the cursor destination and current position, although does not draw cursor
:  .there are three things being combining to get a new value of N. First, M>N will be 1 if M (destination) is greater than N (current position), so the expression will be 1 so far. Second is -(M<N)
:  min(max(K=1-(K=4)*8+M,28),52)→M>N-(M<N)+N→N
:  DS<(A,5)
:    Pt-Change(rand^96,1,Pic2)
:  End
:
:  .DRAW LOGO AND MENU
:  .Shift sandstorm
:  Z+1→Z
:  .Move rain down
:  Vertical +
:  .Backup rain image
:  conj({L6},{L1},708)
:  .Draw logo, sandstorm, menu, and cursor
:  sub(DM)
:  .Update screen
:  DispGraph
:  .Restore rain image
:  conj({L1},{L6},708)
:
:End
:
:
:.<MENU HANDLER>
:ClrHome
:
:
:If K-15 and (M-52)
:
:  .set menu bit
:  0→X
:
:  .If menu bit is 0
:  !If X
:
:    !If M-28
:      ClrDraw
:      ClrDraw{^r}
:      Fix 0
:      Fix 5
:      Text(30,28→M→N,Str6
:      Text(30,36,Str7
:      Text(30,44,Str8
:      Text(30,52,Str9
:      Fix 4
:
:      DrawInv
:      StorePic
:      ClrDraw
:      Drawinv
:      1→A→Z
:
:
:      .<MENU LOOP>
:
:
:      Repeat getKey→K=9 and (M=N) or (K=15)
:
:        .MOVE CURSOR
:        .Update the cursor destination and current position, although does not draw cursor
:        .there are three things being combining to get a new value of N. First, M>N will be 1 if M (destination) is greater than N (current position), so the expression will be 1 so far. Second is -(M<N), which will evaluate to -1 if M is less than N, so this subtracts 1 in this case. This can only be true if the first expression is false, so the expression will now equal 1 if M>N, -1 if M<N, or 0 is neither are true (M=N). This offset is then applied to N, either moving N in the appropriate direction towards M or, if N already equals M, not changing it at all.
:        min(max(K=1-(K=4)*8+M,28),52)→M>N-(M<N)+N→N
:
:        .ADD RAIN
:        .Add a new rain sprite every 5 iterations of the menu loop
:        DS<(A,5)
:          Pt-Change(rand^96,1,Pic2)
:        End
:
:        .DRAW LOGO AND MENU
:        .Shift sandstorm
:        Z+1→Z
:        Vertical +
:        conj({L6},{L1},708)
:        sub(DM)
:        DispGraph
:        conj({L1},{L6},708)
:
:      End
:
:      .<MENU HANDLER>
:      !If M-28
:        sub(ADV)
:      End
:      !If M-36
:        sub(TM)
:      End
:      !If M-44
:        sub(CL)
:      End
:      !If M-52
:      End
:      .If menu bit is 1
:    Else
:      .If HELP
:      !If M-36
:        Disp Str2
:      End
:      .If SCORES
:      !If M-44
:        Disp Str3
:      End
:      .If QUIT
:      !If M-52
:        Disp Str4
:      End
:      Return
:
:
:.<SUBROUTINES>
:.DRAW MENU
:Lbl DM
:.∙=bitwise and
:.□=bitwise xor
:.┼=bitwise or
:
:  .DRAW LOGO AND SANDSTORM
:  .Loop through the logo, 2 bytes at a time
:  For(B,0,148)
:    .Logo data - End state: Black logo image on white bg
:    .XOR 65535 - Inverts logo data - End state: White logo image on black bg
:    .AND Rain image - If either is white (0), output is white, so logo and rain remain white - End state: White logo image and white rain on black bg
:    .OR *Must wait for data in parentheses to be parsed* :
:      .Sandstorm garbage
:      .AND Logo data - This is the original, black on white logo. For the outside of the logo text, which is white (0), all ANDs will result in staying white (no change, so outside of logo text is unaffected) - The black text of the logo is all black (1), so the end state will be determined by the random data of the sandstorm - End state: Random black/white image on white bg
:    .OR ^ - The only areas of ^ which can be black are the logo text, so everything outside the logo text will be unaffected, while areas inside (previously white) will take on the random sandstorm image - End state: Sandstorm logo image and white rain on black bg
:    .→ Buffer
:    {B*2+Pic1}{^r}→D□65535∙{B*2+{L6}→C}{^r}┼({B*2+Z}{^r}∙D)→{C}{^r}
:  End
:
:  .DRAW MENU ITEMS
:  .Loop through the menu image, 2 bytes at a time
:  For(B,168,353)
:    .Menu image - End state: White text on black bg
:    .AND Rain image - If either is white (0 - menu text and rain droplets), result will be white (0) - End state: White menu items and rain on black bg
:    .→ Buffer
:    {B*2+{L3}}{^r}∙{B*2+{L6}→C}{^r}→{C}{^r}
:  End
:
:  .DRAW CURSOR
:  .Draw black cursor, turning any rain that might have been there black
:  Pt-On(22,N,Pic3)
:  .Invert cursor, turning cursor white
:  Pt-Change(22,N,Pic3)
:
:Return
:
:Lbl ADV
:  ClrDraw
:  ClrDraw{^r}
:  Disp Str6
:Return
:Lbl TM
:  ClrDraw
:  ClrDraw{^r}
:  Disp Str7
:Return
:Lbl CL
:  ClrDraw
:  ClrDraw{^r}
:  Disp Str8
:Return
:
:
:.<VARIABLES>
:.A=Counter to add rain
:.B=Temp loop variable for Lbl DM
:.C=Temp (buffer)
:.D=Temp (pic1 data)
:.K=getKey
:.M=Menu cursor destination
:.N=Menu cursor current display position
:.X=current menu bit
:.Z=Sandstorm offset
:.L1=Rain image backup
:.L3=Menu items image
:.L6=Rain image
« Last Edit: August 15, 2010, 06:40:04 pm by Snake X »
Loved this place, still the best producers of power metal, and sparked my dreams of coding.

Offline Runer112

  • Project Author
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2289
  • Rating: +639/-31
    • View Profile
Re: Project Snake X - help
« Reply #52 on: August 15, 2010, 07:20:38 pm »
I didn't properly indent all that code for nothing you know... There's a reason...

Offline Snake X

  • Ancient Veteran
  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 810
  • Rating: +33/-8
    • View Profile
Re: Project Snake X - help
« Reply #53 on: August 15, 2010, 07:34:57 pm »
what do you mean? I looked at it and the endings look proper to me.. ¯\(°_o)/¯
thanks for indenting the code.. ill examine it a little closer here.. I just wish the Axe parser would go to the actual block if you know what i mean
edit: Ohhhh I got it now.
« Last Edit: August 15, 2010, 08:05:29 pm by Snake X »
Loved this place, still the best producers of power metal, and sparked my dreams of coding.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Project Snake X - help
« Reply #54 on: August 15, 2010, 08:01:48 pm »
What I usually do instead of indenting is counting each loop/condition starts by 1 each time then substract 1 everytime I encounter an end, then if the final number is not 0, I miss some ends or have too many.

Offline Snake X

  • Ancient Veteran
  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 810
  • Rating: +33/-8
    • View Profile
Re: Project Snake X - help
« Reply #55 on: August 15, 2010, 08:54:32 pm »
hmm.. this is weird. If i press help or scores, it displays the timed mode and classic mode which should only happen in the second menu :s
Code: [Select]
:.SNAKEX
:
:.<DATA>
:.LOGO
:[07C0000000000000000000001FE0000000000000000000001FF0000000780000000000003FF0000000FC0000000001F87FF7CF0000FC0000000787F87FF7DF87E0FC0000001F87F07BF7FF8FF0FC0000003F87E079E7FF8FF8FC0000003FC7C07F07FF9FFCFC1000001FEF807FE7FF8FFCFC7C00000FFF807FF7FF8FFCFDFE1E0007FF807FF7FF8FFEFDFE3FC003FF001FF7FF9FFEFFFC7FC001FE0001F7FF9FFEFFF8FFC001FF0039F7EF9FFEFFE0FFC000FF8079F7EFDFFEFFC1FBC001FFC0FFF7EFDFFEFFE1FFC003FFF0FFF7C30FFEFFE1FFC003FFFC7FE3C00FDFFFF1FF8007E7FC1F0000000EFDFFFDE00FC3FC00000000007CFEFBE01F83F80000000000187EFFE03F83F80000000000003E7FE03F8040000000000000003FC03F00000000000000000000000E]→Pic1
:
:.MENU RAIN
:[8080808000000000]→Pic2
:
:.MENU ARROW
:[0010181C18100000]→Pic3
:
:.MENU ITEMS
:"PLAY"→Str1
:"HELP"→Str2
:"SCORES"→Str3
:"QUIT"→Str4
:"ADVENTURE MODE"→Str6
:"TIMED MODE"→Str7
:"CLASSIC MODE"→Str8
:"MAIN MENU"→Str9
:
:.<INITIALIZING>
:DiagnosticOff
:ClrDraw
:ClrDraw{^r}
:
:.STORE MENU TO BACK BUFFER
:Fix 1
:Fix 5
:Text(30,28→M→N,Str1)
:Text(30,36,Str2)
:Text(30,44,Str3)
:Text(30,52,Str4)
:DrawInv
:StorePic
:ClrDraw
:
:.INTRO EFFECT
:For(A,0,63)
:  Line(0,A,95,63-A)
:  DispGraph
:End
:For(A,0,95)
:  Line(A,0,95-A,63)
:  DispGraph
:End
:
:1→A→Z
:
:
:.<MENU LOOP>
:Repeat getKey→K=9 and (M=N)
:ReturnIf getKey(15)
:
:  .MOVE CURSOR
:  .Update the cursor destination and current position, although does not draw cursor
:  .there are three things being combining to get a new value of N. First, M>N will be 1 if M (destination) is greater than N (current position), so the expression will be 1 so far. Second is -(M<N)
:  min(max(K=1-(K=4)*8+M,28),52)→M>N-(M<N)+N→N
:  DS<(A,5)
:    Pt-Change(rand^96,1,Pic2)
:  End
:
:  .DRAW LOGO AND MENU
:  .Shift sandstorm
:  Z+1→Z
:  .Move rain down
:  Vertical +
:  .Backup rain image
:  conj({L6},{L1},708)
:  .Draw logo, sandstorm, menu, and cursor
:  sub(DM)
:  .Update screen
:  DispGraph
:  .Restore rain image
:  conj({L1},{L6},708)
:
:End
:
:
:.<MENU HANDLER>
:ClrHome
:
:
:If K-15 and (M-52)
:
:  .set menu bit
:  0→X
:
:  .If menu bit is 0
:  !If X
:
:    !If M-28
:      ClrDraw
:      ClrDraw{^r}
:      Fix 0
:      Fix 5
:      Text(30,28→M→N,Str6
:      Text(30,36,Str7
:      Text(30,44,Str8
:      Text(30,52,Str9
:      Fix 4
:   
:      DrawInv
:      StorePic
:      ClrDraw
:      Drawinv
:      1→A→Z
:   
:   
:      .<MENU LOOP>
:   
:     
:      Repeat getKey→K=9 and (M=N) or (K=15)
:   
:        .MOVE CURSOR
:        .Update the cursor destination and current position, although does not draw cursor
:        .there are three things being combining to get a new value of N. First, M>N will be 1 if M (destination) is greater than N (current position), so the expression will be 1 so far. Second is -(M<N), which will evaluate to -1 if M is less than N, so this subtracts 1 in this case. This can only be true if the first expression is false, so the expression will now equal 1 if M>N, -1 if M<N, or 0 is neither are true (M=N). This offset is then applied to N, either moving N in the appropriate direction towards M or, if N already equals M, not changing it at all.
:        min(max(K=1-(K=4)*8+M,28),52)→M>N-(M<N)+N→N
:   
:        .ADD RAIN
:        .Add a new rain sprite every 5 iterations of the menu loop
:        DS<(A,5)
:          Pt-Change(rand^96,1,Pic2)
:        End
:   
:        .DRAW LOGO AND MENU
:        .Shift sandstorm
:        Z+1→Z
:        Vertical +
:        conj({L6},{L1},708)
:        sub(DM)
:        DispGraph
:        conj({L1},{L6},708)
:   
:      End
:    End
:      .<MENU HANDLER>
:      !If M-28
:        sub(ADV)
:      End
:      !If M-36
:        sub(TM)
:      End
:      !If M-44
:        sub(CL)
:      End
:      !If M-52
:      End
:      .If menu bit is 1
:    Else
:      .If HELP
:      !If M-36
:        Disp Str2
:      End
:      .If SCORES
:      !If M-44
:        Disp Str3
:      End
:      .If QUIT
:      !If M-52
:        Disp Str4
:      End
:    End
:End
:      Return
:
:.<SUBROUTINES>
:.DRAW MENU
:Lbl DM
:.∙=bitwise and
:.□=bitwise xor
:.┼=bitwise or
:
:  .DRAW LOGO AND SANDSTORM
:  .Loop through the logo, 2 bytes at a time
:  For(B,0,148)
:    .Logo data - End state: Black logo image on white bg
:    .XOR 65535 - Inverts logo data - End state: White logo image on black bg
:    .AND Rain image - If either is white (0), output is white, so logo and rain remain white - End state: White logo image and white rain on black bg
:    .OR *Must wait for data in parentheses to be parsed* :
:      .Sandstorm garbage
:      .AND Logo data - This is the original, black on white logo. For the outside of the logo text, which is white (0), all ANDs will result in staying white (no change, so outside of logo text is unaffected) - The black text of the logo is all black (1), so the end state will be determined by the random data of the sandstorm - End state: Random black/white image on white bg
:    .OR ^ - The only areas of ^ which can be black are the logo text, so everything outside the logo text will be unaffected, while areas inside (previously white) will take on the random sandstorm image - End state: Sandstorm logo image and white rain on black bg
:    .→ Buffer
:    {B*2+Pic1}{^r}→D□65535∙{B*2+{L6}→C}{^r}┼({B*2+Z}{^r}∙D)→{C}{^r}
:  End
:
:  .DRAW MENU ITEMS
:  .Loop through the menu image, 2 bytes at a time
:  For(B,168,353)
:    .Menu image - End state: White text on black bg
:    .AND Rain image - If either is white (0 - menu text and rain droplets), result will be white (0) - End state: White menu items and rain on black bg
:    .→ Buffer
:    {B*2+{L3}}{^r}∙{B*2+{L6}→C}{^r}→{C}{^r}
:  End
:
:  .DRAW CURSOR
:  .Draw black cursor, turning any rain that might have been there black
:  Pt-On(22,N,Pic3)
:  .Invert cursor, turning cursor white
:  Pt-Change(22,N,Pic3)
:
:Return
:
:Lbl ADV
:  ClrDraw
:  ClrDraw{^r}
:  Disp Str6
:Return
:Lbl TM
:  ClrDraw
:  ClrDraw{^r}
:  Disp Str7
:Return
:Lbl CL
:  ClrDraw
:  ClrDraw{^r}
:  Disp Str8
:Return
:
:
:.<VARIABLES>
:.A=Counter to add rain
:.B=Temp loop variable for Lbl DM
:.C=Temp (buffer)
:.D=Temp (pic1 data)
:.K=getKey
:.M=Menu cursor destination
:.N=Menu cursor current display position
:.X=current menu bit
:.Z=Sandstorm offset
:.L1=Rain image backup
:.L3=Menu items image
:.L6=Rain image
Loved this place, still the best producers of power metal, and sparked my dreams of coding.

Offline nemo

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1203
  • Rating: +95/-11
    • View Profile
Re: Project Snake X - help
« Reply #56 on: August 15, 2010, 09:14:56 pm »
sorry for straightening your code.. i hate indented code. even in computer languages it bothers me when it's indented with brackets.


Offline Snake X

  • Ancient Veteran
  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 810
  • Rating: +33/-8
    • View Profile
Re: Project Snake X - help
« Reply #57 on: August 15, 2010, 09:17:17 pm »
x.x nemo, idk how you would go without it tbh
Loved this place, still the best producers of power metal, and sparked my dreams of coding.

Offline nemo

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1203
  • Rating: +95/-11
    • View Profile
Re: Project Snake X - help
« Reply #58 on: August 15, 2010, 09:19:44 pm »
whenever i make a repeat, while, if, or for statement, i enter in a few lines and add the corresponding End statement. that way i never get an Err:Block.


Offline Snake X

  • Ancient Veteran
  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 810
  • Rating: +33/-8
    • View Profile
Re: Project Snake X - help
« Reply #59 on: August 15, 2010, 09:21:16 pm »
I guess that works.. We all have our individual coding styles
Loved this place, still the best producers of power metal, and sparked my dreams of coding.