TI 83/84
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
Go Back   Dev Hardware ForumsSOFTWARETI 83/84

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Hardware Forums Sponsor:
  Trader Rating: 0 · #1  
Old November 10th, 2009, 10:13 PM
Justsomeguy Justsomeguy is offline
n00b DevH'er
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Sep 2009
Posts: 5 Justsomeguy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 31 m 51 sec
Reputation Power: 0
Screensaver program

I'm having a bit of trouble.

Legend:
A="Change String from last time?"
H="Starting Direction"
V="Length of String"
D="Down"
O="Over"
R="Right"
L="Left"
T="Top"
B="Bottom"
M="Movement Direction"
Str1="Text that flys"
If M = 72, it will go to the upperleft
If M = 74, it will go to the upperright
If M = 92, it will go to the lowerleft
If M = 94, it will go to the lowerright

Code:
:Input A
:If A=1:Input Str1
:length(Str1)*6→V   #length in pixels of text
:AxesOff
:ClrDraw
:0→Xmin
:94→Xmax
:0→Ymin
:62→Ymax
:
:1→T
:62-8→B  #Minus amount of pixels from bottom
:92-V→R  #Minus amount of pixels from right side
:1→L
:
:Horizontal 1
:Vertical 1
:Horizontal 61
:Vertical 93
:
:randInt(2,B)→D   #Starting
:randInt(2,R)→O   #Coordinates
:
:Text(‾1,D,O,Str1) #Displays text for first time
:
:randInt(1,4)→H   #Starting Direction
:If H=1:92→M
:If H=2:74→M     
:If H=3:72→M
:If H=4:94→M
:
:While 1
:¦  # Those four lines add or subtract pixels 
:¦  # and make the movement work
:¦ D-(M=92)→D:O-(M=92)→O
:¦ D+(M=74)→D:O+(M=74)→O
:¦ D-(M=72)→D:O+(M=72)→O
:¦ D+(M=94)→D:O-(M=94)→O
:¦ 
:¦ If M=72:Then:  #if going up and left
:¦ ¦ If D=T:92→M  #if hit top bar, go down and left
:¦ ¦ If O=L:94→M  #if hit left bar, go up and right
:¦ End
:¦ If M=74:Then:  #if going up and right
:¦ ¦ If D=T:94→M  #if hit top bar, go down and right
:¦ ¦ If O=R:72→M  #if hit right bar, go up and to the left
:¦ End
:¦ If M=92:Then:  #if going down and left
:¦ ¦ If D=B:72→M  #if hit bottom bar, go up and right
:¦ ¦ If O=L:94→M  #if hit left bar, go down and right
:¦ End
:¦ If M=94:Then:   #if going down and right
:¦ ¦ If D=B:74→M   #if hit bottom bar, go up and right
:¦ ¦ If O=R:92→M   #if hit right bar, go down and left
:¦ End
:¦ 
:¦ Text(‾1,D,O,Str1)  #displays text
:¦
:¦ If 1:Then:     #debug info
:¦ ¦ Text(9,1,"D")
:¦ ¦ Text(9,5,D)
:¦ ¦ Text(15,1,"O")
:¦ ¦ Text(15,5,O)
:¦ End
:End


The problem is that the text isn't "bouncing" off the walls like it should when it reaches one of the sides. The only thing that I can think is wrong is that I have some variables mixed up, or a syntax error. I don't see it.

Reply With Quote
  Trader Rating: 0 · #2  
Old November 11th, 2009, 06:35 AM
Justsomeguy Justsomeguy is offline
n00b DevH'er
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Sep 2009
Posts: 5 Justsomeguy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 31 m 51 sec
Reputation Power: 0
I think I've solved it, but I haven't fixed it yet. The directions don't go the way I meant for them to go. Added "Text(3,1,"M",M" to debug. I'll post later when I've gotten around to fixing it.

Reply With Quote
  Trader Rating: 0 · #3  
Old November 11th, 2009, 08:32 PM
Justsomeguy Justsomeguy is offline
n00b DevH'er
Dev Hardware Newbie (0 - 499 posts)
 
Join Date: Sep 2009
Posts: 5 Justsomeguy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 31 m 51 sec
Reputation Power: 0
Finished.
Code:
:Input "Change?: ",A
:If A=1:Input Str1
:Input "Big?: ",Q
:AxesOff
:ClrDraw
:0→Xmin
:94→Xmax
:0→Ymin
:62→Ymax
:
:2→L
:2→T
:If Q=1:Then:
:¦ length(Str1)*6→V
:¦ 61-8→B
:¦ 93-V→R
:End
:If Q≠1:Then:
:¦ length(Str1)*4→V
:¦ 61-7→B
:¦ 93-V→R
:End
:If V>91:Then:
:¦ Disp " ","      NO."
:¦ Stop
:End
:Horizontal(1
:Vertical 1
:Horizontal(61
:Vertical 93
:
:randInt(T,B)→D
:randInt(L,R)→O
:If Q=1:Text(‾1,D,O,Str1)
:If Q≠1:Text(D,O,Str1)
:randInt(1,4)→H
:If H=1:92→M
:If H=2:74→M
:If H=3:72→M
:If H=4:94→M
:
:While 1
:¦ 
:¦ D-(M=72)→D:O-(M=72)→O
:¦ D+(M=94)→D:O+(M=94)→O
:¦ D-(M=74)→D:O+(M=74)→O
:¦ D+(M=92)→D:O-(M=92)→O
:¦ 
:¦ If M=72:Then:
:¦ ¦ If D=T:92→M
:¦ ¦ If O=L:74→M
:¦ End
:¦ If M=74:Then:
:¦ ¦ If D=T:94→M
:¦ ¦ If O=R:72→M
:¦ End
:¦ If M=92:Then:
:¦ ¦ If D=B:72→M
:¦ ¦ If O=L:94→M
:¦ End
:¦ If M=94:Then:
:¦ ¦ If D=B:74→M
:¦ ¦ If O=R:92→M
:¦ End
:¦ If Q=1:Text(‾1,D,O,Str1)
:¦ If Q≠1:Text(D,O,Str1)
:¦ 
:¦ If O<L or O>R or D<T or D>B:Then:
:¦ ¦ randInt(T,B)→D
:¦ ¦ randInt(L,R)→O
:¦ ¦ Horizontal(1
:¦ ¦ Horizontal(61
:¦ ¦ Vertical 1
:¦ ¦ Vertical 93
:¦ End
:¦ 
:¦ 
:¦ If 0:Then:
:¦ ¦ Text(3,1,"M",M)
:¦ ¦ Text(9,1,"D")
:¦ ¦ Text(9,5,D)
:¦ ¦ Text(15,1,"O")
:¦ ¦ Text(15,5,O)
:¦ End
:End

Reply With Quote
Reply

Viewing: Dev Hardware ForumsSOFTWARETI 83/84 > Screensaver program


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump




 Free IT White Papers!
 
Create the Optimal Architecture for your Critical Applications
Warburton's the largest independently owned bakery in the UK faced a number of difficult challenges in providing the most robust yet efficient IT infrastructure for their organization's success. IBM's services combined with their xSeries servers created the perfect platform for their SAP environment with sufficient flexibility, and did so in very time effective fashion.

 
Five Best Practices for Deploying a Successful Service-Oriented Architecture
This white paper describes the benefits you can expect with SOA, and how IBM can help take your business there.

 
Gartner Magic Quadrant for Application Delivery Controllers
Gartner summarizes its view on Application Delivery Controllers, evaluates strengths and weaknesses of solutions, and provides Magic Quadrant reporting for a quick comparison across all vendors. Learn from Gartner how you can benefit from an all-in-one device like Citrix NetScaler that delivers the highest levels of availability, performance and security.

 
Knowledge is Power
What you don't know can hurt you, and is likely costing you money and increasing your security risks during an era of scarce resources. This white paper proposes six key strategies that enterprise security managers can use to improve their network defense posture.

 
Rationalizing the Multi-Tool Environment
The rationalized multi-tool approach is flexible, scalable and cost effective. It provides the necessary input to the IT service management business processes. It preserves prior investments in monitoring tools, empowers technologists to select the best tools with which to do their jobs, and enhances effective response to incidents.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
     
 




© 2003-2010 by Developer Shed. All rights reserved. DS Cluster 3 Hosted by Hostway
For more Enterprise Application Development news, visit eWeek