Omnimaga: The Coders Of Tomorrow
Welcome, Guest. Please login or register.
 
Omnimaga: The Coders Of Tomorrow
24 May, 2013, 05:14:58 *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   home   news downloads projects tutorials misc forums rules new posts irc about Login Register  
+-OmnomIRC

You must Register, be logged in and have at least 40 posts to use this shout-box! If it still doesn't show up afterward, it might be that OmnomIRC is disabled for your group or under maintenance.

Note: You can also use an IRC client like mIRC, X-Chat or Mibbit to connect to an EFnet server and #omnimaga.

Pages: 1 ... 39 40 [41] 42   Go Down
  Print  
Author Topic: Routines -  (Read 42564 times) Bookmark and Share
0 Members and 1 Guest are viewing this topic.
Quigibo
The Executioner
LV11 Super Veteran (Next: 3000)
***********
Offline Offline

Gender: Male
Last Login: 21 May, 2013, 02:03:21
Date Registered: 22 January, 2010, 05:02:37
Location: Los Angeles
Posts: 2022


Total Post Ratings: +1019

View Profile
« Reply #600 on: 13 December, 2011, 10:17:28 »
+2

I made this fun little program and I wanted to share it because its awesome.  See if you can guess what shape it draws. Grin  
(Requires 1.1.0)

:.COOL
:.Allocate a 96x64 bitmap
:[6040]→Str1
:Buff(768)
:
:.Draw a single pixel on the screen
:ClrDraw
:Pxl-On(0,0)
:
:.Loop a few times
:1→C
:For(6)
:  .Turn the buffer into a bitmap
:  Copy(L6,Str1+2,768)
:
:  .Draw some bitmaps
:  Bitmap(C,0,Str1)
:  Bitmap(0,C,Str1)
:  
:  .Display and iterate
:  DispGraph
:  C*2→C
:End
:Pause 5000
« Last Edit: 13 December, 2011, 10:25:55 by Quigibo » Logged

___Axe_Parser___
Today the calculator, tomorrow the world!
jacobly
LV4 Regular (Next: 200)
****
Offline Offline

Last Login: Today at 01:29:41
Date Registered: 09 October, 2011, 01:53:09
Posts: 199

Total Post Ratings: +149

View Profile
« Reply #601 on: 13 December, 2011, 10:46:34 »
+1

Spoiler for guess:
Sierpinski-ish?
################################################################
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
##  ##  ##  ##  ##  ##  ##  ##  ##  ##  ##  ##  ##  ##  ##  ## 
#   #   #   #   #   #   #   #   #   #   #   #   #   #   #   #   
####    ####    ####    ####    ####    ####    ####    ####   
# #     # #     # #     # #     # #     # #     # #     # #     
##      ##      ##      ##      ##      ##      ##      ##     
#       #       #       #       #       #       #       #       
########        ########        ########        ########       
# # # #         # # # #         # # # #         # # # #         
##  ##          ##  ##          ##  ##          ##  ##         
#   #           #   #           #   #           #   #           
####            ####            ####            ####           
# #             # #             # #             # #             
##              ##              ##              ##             
#               #               #               #               
################                ################               
# # # # # # # #                 # # # # # # # #                 
##  ##  ##  ##                  ##  ##  ##  ##                 
#   #   #   #                   #   #   #   #                   
####    ####                    ####    ####                   
# #     # #                     # #     # #                     
##      ##                      ##      ##                     
#       #                       #       #                       
########                        ########                       
# # # #                         # # # #                         
##  ##                          ##  ##                         
#   #                           #   #                           
####                            ####                           
# #                             # #                             
##                              ##                             
#                               #                               
################################
# # # # # # # # # # # # # # # #
##  ##  ##  ##  ##  ##  ##  ## 
#   #   #   #   #   #   #   #   
####    ####    ####    ####   
# #     # #     # #     # #     
##      ##      ##      ##     
#       #       #       #       
########        ########       
# # # #         # # # #         
##  ##          ##  ##         
#   #           #   #           
####            ####           
# #             # #             
##              ##             
#               #               
################
# # # # # # # #
##  ##  ##  ## 
#   #   #   #   
####    ####   
# #     # #     
##      ##     
#       #       
########       
# # # #         
##  ##         
#   #           
####           
# #             
##             
#               
I feel like a computer now... Tongue
Logged
parserp
Hero Extraordinaire
LV10 31337 u53r (Next: 2000)
**********
Offline Offline

Gender: Male
Last Login: Yesterday at 23:14:32
Date Registered: 08 September, 2011, 02:01:43
Location: Here.
Posts: 1421


Total Post Ratings: +80

View Profile WWW
« Reply #602 on: 23 December, 2011, 22:12:23 »
0

I've seen some people wanting to use Text input routines, so here's the one I use in Axe Snake, SpiderAx, and Jump.  Press Second when done typing, del to backspace, and Clear to quit.
At the end of the routine, the string is null terminated and begins at L1.  It also Displays it again because I wanted to show how to display it and waits for you to press second again. Smiley

If you use this routine, you may credit me, but it is not necessary. Grin
so... I have been trying to use this, but would it be possible to store it in a string rather than a list?
I've tried L1->Str0, but it doesn't work when trying to do stuff like this: GatCalc("appvStr0",Y0)

...but, is that even possible?
Logged

ticalc.org | Cemetech | TI-Freakware | casiocalc.org

My New Website!
Spoiler for The Rest:



A useful tool
Spoiler for bands:
Five Finger Death Punch
Disturbed
Slipknot
Linkin Park
Avenged Sevenfold
Breaking Benjamin
Skillet
30 Seconds to Mars
epic7
Chopin!
LV11 Super Veteran (Next: 3000)
***********
Offline Offline

Gender: Male
Last Login: Yesterday at 23:33:09
Date Registered: 22 October, 2011, 01:45:43
Location: Northeast US
Posts: 2171


Total Post Ratings: +121

View Profile
« Reply #603 on: 23 December, 2011, 22:16:10 »
0

Maybe use Copy(?
Logged



Current Projects:
TitleLanguageProgressStatus
DrillMiner    C (ndless)   35%         Active
?     C (ndless)   0%        Unconfirmed

Spoiler for Programming languages I currently know:
Java (Learning in AP Comp Sci)
C (Specifically Ndless)
Unity JavaScript
LabView (For FIRST robotics)
z80 ASM (Just a little bit Tongue)
parserp
Hero Extraordinaire
LV10 31337 u53r (Next: 2000)
**********
Offline Offline

Gender: Male
Last Login: Yesterday at 23:14:32
Date Registered: 08 September, 2011, 02:01:43
Location: Here.
Posts: 1421


Total Post Ratings: +80

View Profile WWW
« Reply #604 on: 23 December, 2011, 22:26:16 »
0

Maybe use Copy(?
hmmm, doesn't seem to work Big frown
Logged

ticalc.org | Cemetech | TI-Freakware | casiocalc.org

My New Website!
Spoiler for The Rest:



A useful tool
Spoiler for bands:
Five Finger Death Punch
Disturbed
Slipknot
Linkin Park
Avenged Sevenfold
Breaking Benjamin
Skillet
30 Seconds to Mars
jacobly
LV4 Regular (Next: 200)
****
Offline Offline

Last Login: Today at 01:29:41
Date Registered: 09 October, 2011, 01:53:09
Posts: 199

Total Post Ratings: +149

View Profile
« Reply #605 on: 24 December, 2011, 04:44:02 »
+1

L₁→Str0 and GetCalc("Str0",Y₀) refer to two completely different Str0's. Assuming you want to get L₁ into Str0, as in if you were to type Str0 on the home screen, it would display the string at L₁, then:
Copy(L₁,GetCalc("Str0",length(L₁)→L),L)
Logged
Builderboy
Physics Guru
LV13 Extreme Addict (Next: 9001)
*************
Offline Offline

Gender: Male
Last Login: Today at 00:13:40
Date Registered: 20 April, 2009, 00:28:53
Location: Ravenholm
Posts: 5642


Total Post Ratings: +589

View Profile
« Reply #606 on: 24 December, 2011, 05:26:14 »
+1

Yeah it all depends on what you mean.  You say you want it to store into a string rather than a list, but it doesn't store the text to a list in the first place, it stores it directly to memory, at the location L1.  When you say string, we are not sure if you mean an Axe data string (Str0 GDB0 Pic0) or an OS string
Logged

ztrumpet
The Rarely Active One
LV13 Extreme Addict (Next: 9001)
*************
Offline Offline

Gender: Male
Last Login: 22 May, 2013, 03:10:30
Date Registered: 08 November, 2009, 21:10:12
Location: Michigan
Posts: 5687


Total Post Ratings: +360

View Profile
« Reply #607 on: 24 December, 2011, 05:35:45 »
+1

Do you mean into an OS string?  If so, you will want to combine a couple of routines here.  If you just want to store it to the Axe variable, Str0, that's different.  For it, do Buff(17)->Str0 at the beginning of the program and then replace L1 in my routine with Str0.
Logged

parserp
Hero Extraordinaire
LV10 31337 u53r (Next: 2000)
**********
Offline Offline

Gender: Male
Last Login: Yesterday at 23:14:32
Date Registered: 08 September, 2011, 02:01:43
Location: Here.
Posts: 1421


Total Post Ratings: +80

View Profile WWW
« Reply #608 on: 24 December, 2011, 06:41:24 »
0

Do you mean into an OS string?  If so, you will want to combine a couple of routines here.  If you just want to store it to the Axe variable, Str0, that's different.  For it, do Buff(17)->Str0 at the beginning of the program and then replace L1 in my routine with Str0.
ah, ok. I'm trying to get it as an axe variable, and I need it to create an appvar with the selected name in the program.
However, I'm not understanding exactly what I need to do in order to do that. Big frown
Logged

ticalc.org | Cemetech | TI-Freakware | casiocalc.org

My New Website!
Spoiler for The Rest:



A useful tool
Spoiler for bands:
Five Finger Death Punch
Disturbed
Slipknot
Linkin Park
Avenged Sevenfold
Breaking Benjamin
Skillet
30 Seconds to Mars
jacobly
LV4 Regular (Next: 200)
****
Offline Offline

Last Login: Today at 01:29:41
Date Registered: 09 October, 2011, 01:53:09
Posts: 199

Total Post Ratings: +149

View Profile
« Reply #609 on: 24 December, 2011, 06:45:18 »
+2

Is this what you want?

1
2
3
4
"appv"Buff(8)→Str0
Copy(L₁,Str0+1,8)
GetCalc(Str0,Y₀)
Logged
parserp
Hero Extraordinaire
LV10 31337 u53r (Next: 2000)
**********
Offline Offline

Gender: Male
Last Login: Yesterday at 23:14:32
Date Registered: 08 September, 2011, 02:01:43
Location: Here.
Posts: 1421


Total Post Ratings: +80

View Profile WWW
« Reply #610 on: 24 December, 2011, 06:49:53 »
0

Is this what you want?

1
2
3
4
"appv"Buff(8)→Str0
Copy(L₁,Str0+1,8)
GetCalc(Str0,Y₀)
Ahh, yes!!! it works! thanks! Cheesy
Logged

ticalc.org | Cemetech | TI-Freakware | casiocalc.org

My New Website!
Spoiler for The Rest:



A useful tool
Spoiler for bands:
Five Finger Death Punch
Disturbed
Slipknot
Linkin Park
Avenged Sevenfold
Breaking Benjamin
Skillet
30 Seconds to Mars
Keoni29
LV9 Veteran (Next: 1337)
*********
Offline Offline

Gender: Male
Last Login: Yesterday at 21:19:09
Date Registered: 15 March, 2011, 16:23:33
Location: The Netherlands
Posts: 1117


Total Post Ratings: +146

View Profile WWW
« Reply #611 on: 31 January, 2012, 14:16:13 »
0

http://www.omnimaga.org/index.php?topic=12477.0
A routine which draws a sprite scaled.
Logged


Spoiler for Hidden:
Last signature update 10:55 april 22nd 2013
Xeda112358
Xombie. I am it.
Coder Of Tomorrow
LV12 Extreme Poster (Next: 5000)
*
Offline Offline

Last Login: Yesterday at 22:01:23
Date Registered: 31 October, 2010, 08:46:36
Location: Land of Little Cubes and Tea, NY
Posts: 3760


Total Post Ratings: +610

View Profile
« Reply #612 on: 31 January, 2012, 15:56:42 »
0

To make Serpinski's triangle, I am not sure if this is proper Axe code, but it is essentially how I do it in other languages where I have such fun screen access (and it does not use another buffer):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
0→A
ClrDraw
Repeat getKey(15
If A≤95
A++
Pxl-On(A,0            ;Axe use (X,Y), right?
End
DispGraph
L6+767→C-12→D
For(756)
{C--} xor {D--}→{C}
End
End
That isn't nearly as fast as it could be, but I'm not too good with Axe Big smile

EDIT: THe screenie isn't the above Axe program (it is in another language)
EDIT2: calc84maniac gave some optimisation tricks (using For(756) and {C--} for example)


* Autocell Example 0.gif (202.18 KB, 192x128 - viewed 141 times.)
« Last Edit: 31 January, 2012, 16:26:52 by Xeda112358 » Logged



Grammer Download (2.29.04.12)
Latest update (possibly incomplete)
My pastebin
Spoiler for FileSyst:
FileSyst is an application that provides a folder and filesystem for the TI-83+/84+ calculators. It is designed to be easy to access and use in BASIC, and it can be used to access game files and save data, or to create a command prompt, among other things:

Spoiler for Graphiti:
This is a graph explorer for graph theory. It will require lots of work to finish. Currently you can:
Add/delete vertices
Add edges (direction not shown, but they are directed)
Arrange vertices in a circle (in the future, you will be able to define levels of rings and the number of nodes in each)
Create complete graphs quickly

Plans:
Add adjacency matrix viewer
Deleting edges
Multiple graphs support
Arrows for directed graphs
Planarity testing
Matrix operations
Weighted edges
Chromatic polynomials
Chromatic numbers

Spoiler for Stats:

Samocal             [o---------]
Virtual Processor   [o---------]
EnG                 [oo--------]
Grammer             [ooo-------]
AsmComp             [ooo-------]
Partex              [oooo------]
BatLib              [oooooooo--]
Grammer82           [----------]
Grammer68000        [----------]


Pseudonyms:  Zeda, Xeda, Thunderbolt
Languages:   English, français
Programming: z80 Assmebly
             Grammer
             TI-BASIC (83/84/+/SE, 89/89t/92)
Known For:   -Creator of the Grammer programming language
              (Winning program of zContest2011)
             -BatLib- One of the most feature packed libraries for BASIC programmers available
              with over 100 functions and a simple programming language
             -Learning to program z80 in hexadecimal before using an assembler (no computer was
              available!)
╔═╦╗░╠═╬╣▒║ ║║▓╚═╩╝█


Deep Thought
So much to do, so much time, so little motivation
Administrator
LV13 Extreme Addict (Next: 9001)
*
Offline Offline

Gender: Male
Last Login: Today at 03:26:33
Date Registered: 19 May, 2009, 08:00:00
Location: The Universe
Posts: 7813


Total Post Ratings: +706

View Profile WWW
« Reply #613 on: 31 January, 2012, 16:37:52 »
0

http://www.omnimaga.org/index.php?topic=12477.0
A routine which draws a sprite scaled.
I think this got lost in the threads of time, but meishe91, DJ_O, and Quigibo came up with some really neat scalers (for partial sizes, even) on this page: http://www.omnimaga.org/index.php?topic=3419.30
Logged




Keoni29
LV9 Veteran (Next: 1337)
*********
Offline Offline

Gender: Male
Last Login: Yesterday at 21:19:09
Date Registered: 15 March, 2011, 16:23:33
Location: The Netherlands
Posts: 1117


Total Post Ratings: +146

View Profile WWW
« Reply #614 on: 31 January, 2012, 21:34:18 »
0

http://www.omnimaga.org/index.php?topic=12477.0
A routine which draws a sprite scaled.
I think this got lost in the threads of time, but meishe91, DJ_O, and Quigibo came up with some really neat scalers (for partial sizes, even) on this page: http://www.omnimaga.org/index.php?topic=3419.30
Cool! I haven't seen that one before. I wrote my routine at school today, because I was bored Smiley
Logged


Spoiler for Hidden:
Last signature update 10:55 april 22nd 2013
Pages: 1 ... 39 40 [41] 42   Go Up
  Print  
 
Jump to:  

Powered by EzPortal
Powered by MySQL Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Powered by PHP
Page created in 0.541 seconds with 30 queries.
Skin by DJ Omnimaga edited from SMF default theme with the help of tr1p1ea.
All programs, games and songs avaliable on this website are property of their respective owners.
Best viewed in Opera, Firefox, Chrome and Safari with a resolution of 1024x768 or above.