Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Runer112

Pages: 1 ... 137 138 [139] 140 141 ... 153
2071
Axe / Re: Project Snake X - help
« on: August 12, 2010, 01:25:31 pm »
To draw just the rain, you would execute a loop with only these parts:

Code: [Select]
:  .ADD RAIN
:  DS<(A,5)
:    Pt-Change(rand^96,1,Pic2)
:  End
:
:  Vertical +
:  DispGraph

As for a more thoroughly commented source:

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
:
:
:.<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
:  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
:    Disp Str1
:  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
:
:  .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{box}65535{dot}{B*2+{L6}→C}{^r}{cross}({B*2+Z}{^r}{dot}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}{dot}{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
:.D=Temp
:.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

2072
The Axe Parser Project / Re: Axe Parser
« on: August 10, 2010, 09:49:18 pm »
I was just looking at the auto-ops list, and I'm just wondering if all of these entries are correct, because they seem pretty odd. For instance, /10 is not only an auto-opt, but smaller than /2? And //64 is an auto-opt but /64 is not? Not to mention odd things like 16-bit checks being smaller than 8-bit checks.

2073
The Axe Parser Project / Re: Bug Reports
« on: August 10, 2010, 03:22:02 pm »
Since you're talking about interrupts, by int(), I assume you actually mean fnInt()?

fnInt(1,2) would try to activate Lbl 1 as an interrupt, and I'm guessing you don't have a subroutine called "1" in your program, so getting the label missing error would make sense.

I can't be sure, but Axe seems to be pretty stable for now, so I would guess the RAM clears are being caused by your code itself, not a bug. You would need to post it so somebody could look at it and determine if it's a problem with your source code or if it is in fact a bug.


Actually, you may be onto something. I assumed 0.4.3 fixed the label errors, but apparently it didn't. The problem appears to be with the fnInt() command. As far as I can see, the problem is that, using whatever shortened character set Quigibo uses to store label name data (if I had to guess, 0-9 A-Z), the first character of the label name called is always misinterpreted. It seems that this character is stored with a value 10 less than what it should be. In one of my programs, I want to enable "INT" as an interrupt. When compiling, fnInt(INT,6) throws a missing label error, claiming that "8NT" is missing. fnInt(ZNT,6) throws an error, claiming that "PNT" is missing. In both of these names returned, the first character has a value 10 less than what it should be. fnInt(SNT,6), however, compiles correctly, as S is 10 letters ahead of I in the alphabet.

This error only appears to happen with fnInt(), not sub() or Goto.

2074
The Axe Parser Project / Re: Axe Parser
« on: August 10, 2010, 03:17:03 am »
What exactly are the advantages of compiling to an app currently? And what could they be in the future?

2075
The Axe Parser Project / Re: Bug Reports
« on: August 10, 2010, 03:09:53 am »
@Runer, most of those bugs have been fixed in 0.4.3 already.

@Builderboy, that's no bug!  Apps need about 120 extra bytes for the header, about 67 bytes for the dummy signature, and they have larger routines for displaying text.

Release 0.4.3 soon? Or maybe even just 0.4.2.5? :) I really want to get back to work on Link's Awakening. ;) Or if you want to wait a while more to make the next release have a bit more in it, could you possibly just email me a copy of the fixed 0.4.2? If not that's ok, I guess I can wait like everyone else lol. But if so, thanks in advance.

2076
The Axe Parser Project / Re: Features Wishlist
« on: August 10, 2010, 12:52:51 am »
Oh, at least you could find it and fix it.

2077
The Axe Parser Project / Re: Features Wishlist
« on: August 10, 2010, 12:35:51 am »
When you get an Error Lable, could it tell you which Lable its missing?  The jump to Error doesn't help because it just jumps to the end of the program.

Looks like you're having the same problem as me, label missing errors being thrown with no missing labels to be found.

2078
The Axe Parser Project / Re: Bug Reports
« on: August 09, 2010, 10:55:04 pm »
Axe 0.4.2 is throwing ERR: LBL MISSING even though I searched the whole source file for subroutine calls, and they all exist. The program compiles correctly with Axe 0.4.1.

On a side note, scrolling to an error in Axe 0.4.2 and then, without closing the program editor, opening Axe again and going to the compile menu, causes graphical problems. The title is missing from the list of programs to compile, and when compiling a program, the whole interface is shifted down a line.

EDIT: On another side note, I cannot tell you what is causing this but every now and then during a compile, I'll get ERR:MEMORY and I'll have 0 RAM left.

EDIT 2: I just double and triple checked my source, line by line. I can't find a Goto or sub() anywhere that calls a nonexistent routine. I'm a little depressed, I waited like a week for 0.4.2 to come out with a fixed division routine so I could resume work on my contest entry, and now this. :'(

EDIT 3: More than one of my programs are affected by this problem, although not all of them. I wanted to see if the specific label names I used affects it, but it does not appear to be so. Replacing all the subroutine names with ones from programs that compile successfully did not remedy the problem. Next, I will see if rearranging subroutines changes anything.

EDIT 4: Rearranging the subroutines does not appear to help. At this point I don't know what else I can do.

EDIT 5: I tried to disable interrupts during compiling using wabbitemu's debugger because earlier you said that interrupts could potentially cause problems. No such luck, either the parser or the OS somehow re-enables interrupts during compiling.

2079
Axe / Re: Project Snake X - help
« on: August 09, 2010, 10:23:35 pm »
  • Fixed menu selection
  • Tweaked rain effect
  • Optimized cursor movement code
  • Commented and indented everything
  • Since this will probably start becoming the actual game soon, changed header to .SNAKEX instead of .LOGO

EDIT: Wait, something is wrong.

EDIT 2: Fixed it and reattached file.

2080
Axe / Re: Project Snake X - help
« on: August 09, 2010, 09:55:53 pm »
Don't the Axe contest rules specify that posting the entire source code for your project is not allowed until the end of the contest? Just saying. :-\

Not to mention, as DJ Omni said in the rules, "keep in mind that usage of other people's code may affect your originality score considerably."

2081
The Axe Parser Project / Re: Link Routine Testing
« on: August 08, 2010, 07:50:26 pm »
I had a link cable with my 83+, my bro's 83+, my 83+SE and my TI-Nspire, but I kept losing almost all of them and I accidentally my TI-Nspire link cable under two calcs, so it's still working, but only if held in certain ways, and looks like it's in terrible shape now.

You accidentally the whole link cable?

2082
Axe / Re: Can I use the FreeRam pointers as static variables?
« on: August 06, 2010, 02:23:15 am »
I was just looking at the Axe Parser category and part of this topic's name caught my eye: "static variables" ;D

Hehehe *chuckling to self*

2083
The Axe Parser Project / Re: Axe Parser
« on: August 03, 2010, 12:59:31 am »
Does anyone know how to change the allocated memory size for something without losing the contained data? For example, how does the operating system accommodate changes in program size while the user is editing a BASIC program?

EDIT - And another question: Is it possible to retain OS-style getKey functionality with custom interrupts enabled?

2084
The Axe Parser Project / Re: Axe Parser
« on: August 02, 2010, 03:56:11 pm »
Does anyone know where the OS stores the current pen X and Y values?

2085
The Axe Parser Project / Re: Bug Reports
« on: August 01, 2010, 12:57:44 am »
Well these are pure hexadecimal source programs, so the size of the "executable" programs are less than half those of the source and fit individually RAM. Every two bytes of source hex become one byte of compiled hex, and the comments, line breaks, and brackets disappear, leaving only 20.5K each. What did you expect though, the entire overworld from Link's Awakening is pretty big. ;D But I've managed to compress the two 20.5K uncompressed tilemap data programs into one 19K appvar thankfully.

Pages: 1 ... 137 138 [139] 140 141 ... 153