Done !!!!! yes will post code for a final check and then I'll attempt another upload to ticalc and email Kerm to upload the final to cemetech.
|
here it is please take a look but it works yeah and no mem leakage.
Code:
tell me what you think
Code:
::DCS6
:"FFFFA021B58BB52B802BFFEFC7DFD7DF45DFABEFC7F7EFF7EFF7EFEFD7ABBBC7"
::A
:θINVERT
::
:" 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz.?!→Str1
:33→dim(∟LHS
:If not(∟LHS(1
:{3,31,19,16,30,31,26,29,24,1,66,2,31,19,16,30,31,26,29,24,1,66,1,31,19,16,30,31,26,29,24,1,66→∟LHS
:StoreGDB 1
:ClrDraw
:AxesOff
:0→Xmin
:94→Xmax
:0→Ymin
:62→YMax
:For(A,0,62
:¦ Horizontal(A
:End
:StorePic 1
:Lbl C
:DelVar SDelVar DRecallPic 1
:Asm(prgmθINVERT
:Text({-}1,8,6,"LIGHTNING v2.5
:Line(6,46,88,46,0
:Text(17,25,"BY THESTORM
:Text({-}1,27,6,"1- PLAY
:Text({-}1,35,6,"2- WATCH
:Text({-}1,43,6,"3- SCORES
:Text({-}1,51,6,"4- EXIT
:{83,82,81,81,81,81,82,83,83,83,83,83,83,82,81,80,79,78,78,78,78,79,80,81,82,83,83,83,83,82,81,80,81,
82,83,82,81,80,79,78,77,78,79,80,79,78,77,78,79,80,81,82,83,82,81,80,80,80,80,79,78,77→{L1}
:For(N,0,61
:¦ Pxl-Off(N,{L1}(N+1
:End
:DelVar {L1}
:Lbl Z
:Repeat Ans
:¦ getKey
:End
:Ans→K
:If K=92
:Goto 1
:If K=93
:Goto 2
:If K=94
:Goto 4
:If K=82 or K=45 or K=22
:Goto 3
:Goto Z
:Lbl 4
:RecallPic 1
:Text({-}1,8,10,"LIGHTNIN v2.5
:Text({-}1,16,16,"HIGH SCORES
:Line(6,38,88,38,0
:" →Str2
:For(A,2,11
:¦ ∟LHS(A→B
:¦ If B=0
:¦ 1→B
:¦ Str2+(sub(Str1,B,1→Str2
:End
:Text({-}1,28,4,Str2," ",∟LHS(1
:" →Str3
:For(A,13,22
:¦ ∟LHS(A→B
:¦ If B=0
:¦ 1→B
:¦ Str3+(sub(Str1,B,1→Str3
:End
:Text({-}1,38,4,Str3," ",∟LHS(12
:" →Str4
:For(A,24,33
:¦ ∟LHS(A→B
:¦ If B=0
:¦ 1→B
:¦ Str4+(sub(Str1,B,1→Str4
:End
:Text({-}1,48,4,Str4," ",∟LHS(23
:Pause
:DelVar Str2DelVar Str3DelVar Str4Goto C
:Lbl 1
:1→D
:Lbl 2
:DelVar L47→P
:Repeat getKey=45 or L
:¦ RecallPic 1
:¦ (P-8(S>6))D+randInt(12,82)not(D→G
:¦ (P+8(S>6))D+randInt(12,82)not(D→F
:¦ randInt(0,2→O
:¦ 2+iPart((S/3)D+not(D→E
:¦ If not(L
:¦ Then
:¦ ¦ For(V,62,0,{-}E
:¦ ¦ ¦ randInt({-}1,1→A
:¦ ¦ ¦ G+EA(G+EA>0 and G+EA<95→W
:¦ ¦ ¦ Line(G,V+E,W,V,0
:¦ ¦ ¦ W→G
:¦ ¦ ¦ If (S>6)D or not(D)(O=2
:¦ ¦ ¦ Then
:¦ ¦ ¦ ¦ randInt({-}1,1→B
:¦ ¦ ¦ ¦ F+EB(F+EB>0 and F+EB<95→U
:¦ ¦ ¦ ¦ Line(F,V+E,U,V,0
:¦ ¦ ¦ ¦ U→F
:¦ ¦ ¦ End
:¦ ¦ ¦ If D
:¦ ¦ ¦ Then
:¦ ¦ ¦ ¦ getKey→K
:¦ ¦ ¦ ¦ If K=26 or K=24 or V≥60
:¦ ¦ ¦ ¦ Then
:¦ ¦ ¦ ¦ ¦ P→M
:¦ ¦ ¦ ¦ ¦ P+2(K=26 and P<91)-(K=24 and P>3→P
:¦ ¦ ¦ ¦ ¦ Pt-On(M,10,2:Line(M,9,M,3:Line(M+1,6,M+3,8:Line(M-1,6,M-3,8:Line(M-1,2,M-3,0:Line(M+1,2,M+3,0
:¦ ¦ ¦ ¦ ¦ Pt-Off(P,10,2:Line(P,9,P,3,0:Line(P+1,6,P+3,8,0:Line(P-1,6,P-3,8,0:Line(P-1,2,P-3,0,0:Line(P+1,2,P+3,0,0
:¦ ¦ ¦ ¦ End
:¦ ¦ ¦ End
:¦ ¦ ¦ V→Z
:¦ ¦ ¦ If D(V≤13 and (abs(P-G)≤5 or (S>6 and abs(P-F)≤5))) or K=45
:¦ ¦ ¦ Then
:¦ ¦ ¦ ¦ 1→L
:¦ ¦ ¦ ¦ {-}1→V
:¦ ¦ ¦ End
:¦ ¦ End
:¦ End
:¦ If (6<S)D or not(D)(O=2
:¦ For(A,1,2
:¦ ¦ Line(G+1,Z+1,G+3,Z+3,0:Line(G-1,Z+1,G-3,Z+3,0:Line(G-3,Z,G-4,Z+1,0:Line(G+3,Z,G+4,Z+1,0
:¦ ¦ F→G
:¦ ¦ If (6<S)D or not(D)(O=2
:¦ End
:¦ StorePic 2
:¦ ClrDraw
:¦ RecallPic 2
:¦ If not(L
:¦ Then
:¦ ¦ S+1→S
:¦ ¦ ClrDraw
:¦ End
:End
:If D
:Then
:¦ If S>∟LHS(23
:¦ Then
:¦ ¦ ClrHome
:¦ ¦ DispGraph
:¦ ¦ Disp
:¦ ¦ Disp ""," High Score"," Enter Name
:¦ ¦ Repeat 11>length(Str2
:¦ ¦ ¦ Input " ",Str2
:¦ ¦ ¦ If 10<length(Str2
:¦ ¦ ¦ Then
:¦ ¦ ¦ ¦ Output(2,4," To Long
:¦ ¦ ¦ End
:¦ ¦ End
:¦ ¦ For(A,1,length(Str2
:¦ ¦ ¦ 0→{L1}(1
:¦ ¦ ¦ inString(Str1,sub(Str2,A,1→{L1}(A+1
:¦ ¦ ¦ 11→dim({L1}
:¦ ¦ End
:¦ ¦ S→{L1}(1
:¦ ¦ {∟LHS(1),∟LHS(2),∟LHS(3),∟LHS(4),∟LHS(5),∟LHS(6),∟LHS(7),∟LHS(8),∟LHS(9),∟LHS(10),∟LHS(11→{L2}
:¦ ¦ {∟LHS(12),∟LHS(13),∟LHS(14),∟LHS(15),∟LHS(16),∟LHS(17),∟LHS(18),∟LHS(19),∟LHS(20),∟LHS(21),∟LHS(22→{L3}
:¦ ¦ If S>{L2}(1
:¦ ¦ Then
:¦ ¦ ¦ augment({L1},{L2}→∟LHS
:¦ ¦ ¦ augment(∟LHS,{L3}→∟LHS
:¦ ¦ ¦ Else
:¦ ¦ ¦ If S>{L3}(1
:¦ ¦ ¦ Then
:¦ ¦ ¦ ¦ augment({L2},{L1}→∟LHS
:¦ ¦ ¦ ¦ augment(∟LHS,{L3}→∟LHS
:¦ ¦ ¦ ¦ Else
:¦ ¦ ¦ ¦ If S>∟LHS(23
:¦ ¦ ¦ ¦ Then
:¦ ¦ ¦ ¦ ¦ augment({L2},{L3}→∟LHS
:¦ ¦ ¦ ¦ ¦ augment(∟LHS,{L1}→∟LHS
:¦ ¦ ¦ ¦ End
:¦ ¦ ¦ End
:¦ ¦ End
:¦ ¦ ClrHome
:¦ ¦ DelVar {L1}DelVar {L2}DelVar {L3}
:¦ ¦ Else
:¦ ¦ Text(15,24," Ha Ha You Lose!
:¦ ¦ Text(23,25," Your Score= ",S
:¦ ¦ Pause
:¦ End
:End
:Goto 4
:Lbl 3
:ClrDraw
:RecallGDB 1
:DelVar Pic1DelVar Pic2DelVar Str1DelVar GDB1
tell me what you think
"Always code as if the person who will maintain your code is a maniac serial killer that knows where you live" -Unknown
"If you've done something right no one will know that you've done anything at all" -Futurama
<Michael_V> or create a Borg collective and call it The 83+
<Michael_V> Lower your slide cases and prepare to be silent linked. Memory clears are futile.
lafferjm wrote:
I tried this game and it was entirely to easy, you should add something to make it a lot harder.
How far did you get? Because it is suppose to get harder.
Also which version did you have did you type this code in or did you download it from the archives because the one in the archives wasn't finished.
Edit: He got the old version from the archives.
"Always code as if the person who will maintain your code is a maniac serial killer that knows where you live" -Unknown
"If you've done something right no one will know that you've done anything at all" -Futurama
<Michael_V> or create a Borg collective and call it The 83+
<Michael_V> Lower your slide cases and prepare to be silent linked. Memory clears are futile.
I am making a new verson using laffermj's api but i'm waiting for him to make some changes.
"Always code as if the person who will maintain your code is a maniac serial killer that knows where you live" -Unknown
"If you've done something right no one will know that you've done anything at all" -Futurama
<Michael_V> or create a Borg collective and call it The 83+
<Michael_V> Lower your slide cases and prepare to be silent linked. Memory clears are futile.
Newest completed version v2.5 hope you guys like it. http://www.mediafire.com/?8t1zxcg90dt
waiting laffermj still waiting laffermj
waiting laffermj still waiting laffermj
"Always code as if the person who will maintain your code is a maniac serial killer that knows where you live" -Unknown
"If you've done something right no one will know that you've done anything at all" -Futurama
<Michael_V> or create a Borg collective and call it The 83+
<Michael_V> Lower your slide cases and prepare to be silent linked. Memory clears are futile.
Nice, small, and a quick enjoyable game. Challenging too, nice job!
My tiny suggestion: Make an xLIB--This'll earn a coveted gamespot next to NGTetris if I don't have to lug a subroutine around.
My tiny suggestion: Make an xLIB--This'll earn a coveted gamespot next to NGTetris if I don't have to lug a subroutine around.
I've given up trying to sync all of my sigs at once.
Go look at my UTI Profile and make my life easier. Thnx.
Go look at my UTI Profile and make my life easier. Thnx.
I try to avoid xLib but I'm working on a version using lafferjm's api but he hasn't finished the features I need to get it done. I'll take a look at xLib and see what feature's I can use.
Edit: No I will not use xLib it doesn't have the functions I need and the version I saw had very few functions for an app.
These are the functions I use
Invert text, invert screen, black screen, clear screen, run indicator off, turn calc off/pause, sprite function (maybe).
Edit: No I will not use xLib it doesn't have the functions I need and the version I saw had very few functions for an app.
These are the functions I use
Invert text, invert screen, black screen, clear screen, run indicator off, turn calc off/pause, sprite function (maybe).
"Always code as if the person who will maintain your code is a maniac serial killer that knows where you live" -Unknown
"If you've done something right no one will know that you've done anything at all" -Futurama
<Michael_V> or create a Borg collective and call it The 83+
<Michael_V> Lower your slide cases and prepare to be silent linked. Memory clears are futile.
"Always code as if the person who will maintain your code is a maniac serial killer that knows where you live" -Unknown
"If you've done something right no one will know that you've done anything at all" -Futurama
<Michael_V> or create a Borg collective and call it The 83+
<Michael_V> Lower your slide cases and prepare to be silent linked. Memory clears are futile.
TheStorm wrote:
I try to avoid xLib but I'm working on a version using lafferjm's api but he hasn't finished the features I need to get it done. I'll take a look at xLib and see what feature's I can use.
Edit: No I will not use xLib it doesn't have the functions I need and the version I saw had very few functions for an app.
These are the functions I use
Invert text, invert screen, black screen, clear screen, run indicator off, turn calc off/pause, sprite function (maybe).
The only one xLIB can't do is calc off/pause, but I don't know why you'd need that anyways.
Edit: No I will not use xLib it doesn't have the functions I need and the version I saw had very few functions for an app.
These are the functions I use
Invert text, invert screen, black screen, clear screen, run indicator off, turn calc off/pause, sprite function (maybe).
Assuming you looked here, I'm guessing you didn't look at the readme.
Quote:
tr1p1ea - 08/03/2007 (dd/mm/yyyy)
---------------------------------
xLIB v0.602b:
-------------
xLIB is now an APP that adds some functionality to TI-83+ BASIC programs. It installs a
parser hook which will intercept any real( requests.
To install xLIB simply copy "xLIB.8xk" to your calc using your favoutrite flavour of linking
software.
To enable xLIB you must run it from the APPS menu and select '1'. A message should appear
informing you that xLIB has been enabled. Pressing '2' will disable xLIB and '3' will quit.
xLIB uses both SavesScreen and AppBackupScreen, if you have any other libs that use those
saferam areas the results could be unpredictable.
0 - ClearScreen:
----------------
usage: real(0,Clr_UpDateLCD
Clr_UpdateLCD = Toggle LCD update 0 = No, 1 = Yes
This function Clears the graph buffer and the LCD.
1 - DrawSprite:
---------------
usage: real(1,Spr_X,Spr_Y,Spr_Width,SprHeight,sPIC_Num,sPIC_X,sPIC_Y,Spr_Method,Spr_Flip,Spr_UpDateLCD
Spr_X = Sprite X location
Spr_Y = Sprite Y location
Spr_Width = Sprite width in BYTES (so a 16 pixel wide sprite would have a width of 2)
Spr_Height = Sprite height in pixels
sPIC_Num = The PIC in which the sprite is located PIC0 - PIC9
sPIC_X = X offset to sprite in PIC, must be ALIGNED. Can be a value from 0-11
sPIC_Y = Y offset to sprite in PIC
Spr_Method = The copy method 0 = Overwrite, 1 = AND, 2 = OR, 3 = XOR
Spr_Flip = Flip Sprite 0 = No Flip, 1 = Horizontal Flip
Spr_UpdateLCD = Toggle LCD update 0 = No, 1 = Yes
This function will draw clipped sprites of ANY size anywhere on the screen.
Dont forget that sprites always have a width which is a multiple of 8. However with this routine we
want the BYTE width of the sprite. It is 8 pixels per byte! So a 8x8 sprite has a BYTE width of 1,
a 16x16 sprite would have a BYTE width of 2. A 12x12 sprite would still occupy 2 BYTES so it also has a
BYTE width of 2.
sPIC_X is only at ALIGNED positions, can be a value from 0-11
sPIC_Y can be from 0-63
Horizontal Sprite Flipping has now been implemented. This should save you some space.
This function will still be able to read PIC data even if it is archived!
2 - DrawTileMap:
----------------
usage: real(2,Matrice_Name,X_Offset,Y_Offset,MapWidth,MapHeight,ScreenStartX,
ScreenEndX,ScreenStartY,ScreenEndY,mPIC_Num,Tile_Method,Tile_Size,Map_UpdateLCD
Matrice_Name = Name of matrice containing map data 0 - 9. 0 = [A] - 9 = [J]
X_Offsett = X Map Offsett. Which part of the map you wish to start drawing at
Y_Offsett = Y Map Offsett. Which part of the map you wish to start drawing at
MapWidth = Width of TileMap
MapHeight = Height of TileMap
ScreenStartX = Which COLUMN you wish to START drawing. Can be a value from 0-12 for 8x8 or 0-6 for 16x16
ScreenEndX = Which COLUMN you wish to END drawing at. Can be a value from 0-12 for 8x8 or 0-6 for 16x16
ScreenStartY = Which ROW you wish to START drawing. Can be a value from 0-8 for 8x8 or 0-4 for 16x16
ScreenEndY = Which ROW you wish to END drawing at. Can be a value from 0-8 for 8x8 or 0-4 for 16x16
mPIC_Num = The PIC in which the tile data is located PIC0 - PIC255
Tile_Method = The copy method 0 = Overwrite, 1 = AND, 2 = OR, 3 = XOR
Tile_Size = Size of tiles, 8 = 8x8, 16 = 16x16
Map_UpdateLCD = Toggle LCD update 0 = No, 1 = Yes
The ScreenStartX, ScreenEndX, ScreenStartY, ScreenEndY enable you to draw a 'windowed' map. This means that you can draw
your map and leave space for a HUD or something similar. Drawing smaller maps will also be a little faster.
To draw an 8x8 tilesize map centered with a 1 tile blank border the inputs would be:
ScreenStartX = 1
ScreenEndX = 11
ScreenStartY = 1
ScreenEndY = 7
The TileMap routine now supports MULTIPLE PICS and 16-bit TILE INDEX's. This means that you can have a map with more than
256 different tiles. If a tile is >95 it will overlap to the next PIC (if it exists).
PICS must follow each other numerically!!!!
So if your input PIC is PIC0 any tiles > 95 will be taken from PIC1 and any tiles > 191 will be taken from PIC2.
If the PIC doesnt exist then the tile will be drawn as a BLANK.
This function will still be able to read PIC data even if it is archived! But it may slow things down.
3 - RecallPIC
-------------
usage: real(3,rPIC_Num,rPIC_Method,Recall_UpdateLCD
rPIC_Num = PIC to recall PIC0 - PIC255
rPIC_Method = The copy method 0 = Overwrite, 1 = AND, 2 = OR, 3 = XOR
Recall_UpdateLCD = Toggle LCD update 0 = No, 1 = Yes
This will recall a pic and display it with some options (OR, XOR etc)
This function will still be able to read PIC data even if it is archived!
4 - ScrollScreen
----------------
usage: real(4,Scrl_Direction,Scrl_Number,Scrl_UpdateLCD
Scrl_Direction = direction to scroll
Scrl_Number = number of pixels to scroll
Scrl_UpdateLCD = Toggle LCD update 0 = No, 1 = Yes
Directions:
0 - Up
1 - Down
2 - Left
3 - Right
4 - UpLeft
5 - UpRight
6 - DownLeft
7 - DownRight
5 - ChangeContrast
------------------
usage: real(5,Contrast_Function,ContrastVal
Contrast_Function = Contrast returned in Ans (0-39). 0 = Set Contrast, 1 = Get Contrast
ContrastVal = New contrast value. Can be a value from 0-39
6 - UpdateLCD
-------------
usage: real(6
This function will copy the graph buffer to the LCD
7 - RunIndicator
----------------
usage: real(7,runIndicVal
runIndicVal = Toggle Run Indicator. 0 = Off, 1 = On
8 - GetKey
----------
usage: real(8
Scans the keypad and returns a key code in the ANS variable.
Has support for multiple Arrow Keypresses
Key Codes:
----------
F1 = 53
F2 = 52
F3 = 51
F4 = 50
F5 = 49
2nd = 54
Mode = 55
Del = 56
Down = 1
Left = 2
Right = 3
Up = 4
DownLeft = 5
DownRight = 6
UpLeft = 7
UpRight = 8
Alpha = 48
XTN = 40
Stat = 32
Math = 47
Apps = 39
Prgm = 31
Vars = 23
Clear = 15
X1 = 46
Sin = 38
Cos = 30
Tan = 22
Power = 14
X2 = 45
Comma = 37
LeftPara = 29
RightPara = 21
Divide = 13
Multiply = 12
Subtract = 11
Add = 10
Enter = 9
Log = 44
Ln = 43
Sto = 42
0 = 33
1 = 34
2 = 26
3 = 18
4 = 35
5 = 27
6 = 19
7 = 36
8 = 28
9 = 20
Period = 141
Negative = 140
9 - CreatePIC
-------------
usage: real(9,cPIC_Funtion,cPIC_Num
cPIC_Function = Function to perform. 0 = StorePIC, 1 = DeletePIC
cPIC_Num = Number of PIC file to store to. Ranges from 1-255
*NOTE* PIC0 is actually PIC10 according to the TIOS. To store to PIC0
use: real(9,10
*IMPORTANT* Because the PIC's use tokens in their name that the TIOS doesnt really
have (for PICS) the names in your memory mgmt will be all strange, ex:
PIC0
inString(
P/Y
Z-Test(
THIS IS PERFECTLY NORMAL, nothing is wrong with your calc. The TIOS just doesnt have
the names for PIC variables above the 10th.
To transfer these PICs to your calc you MUST GROUP THEM. Sending may fail if you
attempt to send them individually.
10 - ExecuteArchivedProg
------------------------
usage: "PRGMNAME:real(10,exAction,Prgm_Dest:prgmXTEMP0XX
"PRGMNAME = Name of program to be stored in the ANS variable. Program can be ARCHIVED or in RAM
exAction = Action to perform. 0 = copy, 1 = clean specific, 2 = clean all
Prgm_Dest = Destination XTEMP program. Ranges from 0-15
This function will copy a program from the ARCHIVE or RAM to one of 16 XTEMP programs. The name of the
program to copy must be stored in the ANS variable prior to running this function.
This function will work with BASIC and TIOS ASM (nostub) programs.
For example, to copy the BASIC program ADEMO to XTEMP000 you would do:
"ADEMO
real(10,0,0
To copy the BASIC program MAP1 to XTEMP011, and then RUN XTEMP011 you would do:
"MAP1
real(10,0,11
prgmXTEMP011
To copy the **TIOS ASM** program SCROLL to XTEMP009, and then RUN XTEMP009 you would do:
"SCROLL
real(10,0,11
Asm(prgmXTEMP011
To REMOVE program XTEMP006 you would do:
real(10,1,6
To REMOVE ALL XTEMP0XX programs you would do:
real(10,2,0
*NOTE* If the XTEMP0XX program already exists (in RAM or ARCHIVE) then this function will exit
without copying. You must manually remove the target program before attempting to
replace it. (This is to stop accidents with nested programs trying to replace themselves).
11 - GetCalcVersion
-------------------
usage: real(11
Returns a code in the ANS variable which will tell you what calc version you are running.
83+ = 0
83+ SE = 1
84+ = 2
84+ SE = 3
12 - DrawShape
--------------
usage: real(12,Shape_Type,x1,y1,x2,y2,DrawShape_UpdateLCD
Shape_Type = Tpye of Shape you want to draw:
0 = DrawSingleLineBlack
1 = DrawSingleLineWhite
2 = DrawSingleLineInvert
3 = DrawEmptyRectangleBlack
4 = DrawEmptyRectangleWhite
5 = DrawEmptyRectangleInvert
6 = DrawFilledRectangleBlack
7 = DrawFilledRectangleWhite
8 = DrawFilledRectangleInvert
9 = DrawRectOutlineBlackFillWhite
10 = DrawRectOutlineWhiteFillBlack
x1 = First x coord (for rectangles this is TOP LEFT corner)
y1 = First y coord (for rectangles this is TOP LEFT corner)
x2 = Second x coord (for rectangles this is BOTTOM RIGHT corner)
y2 = Second y coord (for rectangles this is BOTTOM RIGHT corner)
Scrl_UpdateLCD = Toggle LCD update 0 = No, 1 = Yes
13 - TextMode
--------------
usage: real(13,TextFunction,Text_Char
TextFunction = 0 = Normal, 1 = Inverse, 2 = Lowercase on, 3 = Lowercase off, 4 = Display Character
If TextFunction = 4: Text_Char = Number of character to display (0 - 255).
When Lowercase is enabled, press ALPHA twice to enter lowercase mode in the TIOS.
*NOTE* Some TIOS functions (like errors and some menus) automatically reset these textflag's to Normal.
14 - CheckRAM
-------------
usage: real(14
Returns the amount of FREE RAM in ANS
End of Functions List.
*WARNING*: You MUST provide the correct inputs for each function. If you do not you
risk a crash or worse.
DO NOT TRY TO RUN YOUR BASIC PROGRAM FROM MIRAGEOS!!!! I use a saferam area that MirageOS uses,
it may cause instability.
Credits & Thanks:
-----------------
Dan Weiss (DWedit) - APP Devkit 2.0
Dan Englender (Dan_E) - WikiTI
Sean McLaughlin (Sigma) - Ideas for masked/clipped sprite routine wihtout smc
Patai Gergely (CoBB) - PindurTI, greatest 83+ emulator by far
Badja - Initial Clipped line routine
James Montelongo (Jim e) & YUKI - DI wrapper routine ideas
Texas Instruments (TI) - SDK and System Routine Documentation
Kevin Ouellet (Kevin, xlibman) - Testing & ideas
George Daole-Wellman (Dysfunction) - Testing & ideas
Kalan Scallan (kalan_vod) - Testing & ideas
Fred Sparks (CDI, [froody]) - Testing & ideas
threefingeredguy - Testing & ideas
Shaun McFall (Merthsoft) - Testing & ideas
Fred Shen (dragon__lance) - Testing & ideas
Brian Benson (Necro) - Testing & ideas
Jesko Roos (lolje) - Testing, bug finding (storepic bug!)
Everyone on MaxCoderz Forums
Everyone in #TCPA (EfNet)
If i forgot you please email me and i will update this section.
Disclaimer:
-----------
This program is still in early stages and may contain bugs. Program is use at own risk,
I can not be held responsible for loss of data and or hardware damage.
If you have any questions please email me at: tr1p1ea@yahoo.com.au
I have no problem with anyone using this program as long as you credit me
properly. Please dont try to modify and/or pass this program off as your
own with out first gaining my consent.
I'd say that covers your needs. ---------------------------------
xLIB v0.602b:
-------------
xLIB is now an APP that adds some functionality to TI-83+ BASIC programs. It installs a
parser hook which will intercept any real( requests.
To install xLIB simply copy "xLIB.8xk" to your calc using your favoutrite flavour of linking
software.
To enable xLIB you must run it from the APPS menu and select '1'. A message should appear
informing you that xLIB has been enabled. Pressing '2' will disable xLIB and '3' will quit.
xLIB uses both SavesScreen and AppBackupScreen, if you have any other libs that use those
saferam areas the results could be unpredictable.
0 - ClearScreen:
----------------
usage: real(0,Clr_UpDateLCD
Clr_UpdateLCD = Toggle LCD update 0 = No, 1 = Yes
This function Clears the graph buffer and the LCD.
1 - DrawSprite:
---------------
usage: real(1,Spr_X,Spr_Y,Spr_Width,SprHeight,sPIC_Num,sPIC_X,sPIC_Y,Spr_Method,Spr_Flip,Spr_UpDateLCD
Spr_X = Sprite X location
Spr_Y = Sprite Y location
Spr_Width = Sprite width in BYTES (so a 16 pixel wide sprite would have a width of 2)
Spr_Height = Sprite height in pixels
sPIC_Num = The PIC in which the sprite is located PIC0 - PIC9
sPIC_X = X offset to sprite in PIC, must be ALIGNED. Can be a value from 0-11
sPIC_Y = Y offset to sprite in PIC
Spr_Method = The copy method 0 = Overwrite, 1 = AND, 2 = OR, 3 = XOR
Spr_Flip = Flip Sprite 0 = No Flip, 1 = Horizontal Flip
Spr_UpdateLCD = Toggle LCD update 0 = No, 1 = Yes
This function will draw clipped sprites of ANY size anywhere on the screen.
Dont forget that sprites always have a width which is a multiple of 8. However with this routine we
want the BYTE width of the sprite. It is 8 pixels per byte! So a 8x8 sprite has a BYTE width of 1,
a 16x16 sprite would have a BYTE width of 2. A 12x12 sprite would still occupy 2 BYTES so it also has a
BYTE width of 2.
sPIC_X is only at ALIGNED positions, can be a value from 0-11
sPIC_Y can be from 0-63
Horizontal Sprite Flipping has now been implemented. This should save you some space.
This function will still be able to read PIC data even if it is archived!
2 - DrawTileMap:
----------------
usage: real(2,Matrice_Name,X_Offset,Y_Offset,MapWidth,MapHeight,ScreenStartX,
ScreenEndX,ScreenStartY,ScreenEndY,mPIC_Num,Tile_Method,Tile_Size,Map_UpdateLCD
Matrice_Name = Name of matrice containing map data 0 - 9. 0 = [A] - 9 = [J]
X_Offsett = X Map Offsett. Which part of the map you wish to start drawing at
Y_Offsett = Y Map Offsett. Which part of the map you wish to start drawing at
MapWidth = Width of TileMap
MapHeight = Height of TileMap
ScreenStartX = Which COLUMN you wish to START drawing. Can be a value from 0-12 for 8x8 or 0-6 for 16x16
ScreenEndX = Which COLUMN you wish to END drawing at. Can be a value from 0-12 for 8x8 or 0-6 for 16x16
ScreenStartY = Which ROW you wish to START drawing. Can be a value from 0-8 for 8x8 or 0-4 for 16x16
ScreenEndY = Which ROW you wish to END drawing at. Can be a value from 0-8 for 8x8 or 0-4 for 16x16
mPIC_Num = The PIC in which the tile data is located PIC0 - PIC255
Tile_Method = The copy method 0 = Overwrite, 1 = AND, 2 = OR, 3 = XOR
Tile_Size = Size of tiles, 8 = 8x8, 16 = 16x16
Map_UpdateLCD = Toggle LCD update 0 = No, 1 = Yes
The ScreenStartX, ScreenEndX, ScreenStartY, ScreenEndY enable you to draw a 'windowed' map. This means that you can draw
your map and leave space for a HUD or something similar. Drawing smaller maps will also be a little faster.
To draw an 8x8 tilesize map centered with a 1 tile blank border the inputs would be:
ScreenStartX = 1
ScreenEndX = 11
ScreenStartY = 1
ScreenEndY = 7
The TileMap routine now supports MULTIPLE PICS and 16-bit TILE INDEX's. This means that you can have a map with more than
256 different tiles. If a tile is >95 it will overlap to the next PIC (if it exists).
PICS must follow each other numerically!!!!
So if your input PIC is PIC0 any tiles > 95 will be taken from PIC1 and any tiles > 191 will be taken from PIC2.
If the PIC doesnt exist then the tile will be drawn as a BLANK.
This function will still be able to read PIC data even if it is archived! But it may slow things down.
3 - RecallPIC
-------------
usage: real(3,rPIC_Num,rPIC_Method,Recall_UpdateLCD
rPIC_Num = PIC to recall PIC0 - PIC255
rPIC_Method = The copy method 0 = Overwrite, 1 = AND, 2 = OR, 3 = XOR
Recall_UpdateLCD = Toggle LCD update 0 = No, 1 = Yes
This will recall a pic and display it with some options (OR, XOR etc)
This function will still be able to read PIC data even if it is archived!
4 - ScrollScreen
----------------
usage: real(4,Scrl_Direction,Scrl_Number,Scrl_UpdateLCD
Scrl_Direction = direction to scroll
Scrl_Number = number of pixels to scroll
Scrl_UpdateLCD = Toggle LCD update 0 = No, 1 = Yes
Directions:
0 - Up
1 - Down
2 - Left
3 - Right
4 - UpLeft
5 - UpRight
6 - DownLeft
7 - DownRight
5 - ChangeContrast
------------------
usage: real(5,Contrast_Function,ContrastVal
Contrast_Function = Contrast returned in Ans (0-39). 0 = Set Contrast, 1 = Get Contrast
ContrastVal = New contrast value. Can be a value from 0-39
6 - UpdateLCD
-------------
usage: real(6
This function will copy the graph buffer to the LCD
7 - RunIndicator
----------------
usage: real(7,runIndicVal
runIndicVal = Toggle Run Indicator. 0 = Off, 1 = On
8 - GetKey
----------
usage: real(8
Scans the keypad and returns a key code in the ANS variable.
Has support for multiple Arrow Keypresses
Key Codes:
----------
F1 = 53
F2 = 52
F3 = 51
F4 = 50
F5 = 49
2nd = 54
Mode = 55
Del = 56
Down = 1
Left = 2
Right = 3
Up = 4
DownLeft = 5
DownRight = 6
UpLeft = 7
UpRight = 8
Alpha = 48
XTN = 40
Stat = 32
Math = 47
Apps = 39
Prgm = 31
Vars = 23
Clear = 15
X1 = 46
Sin = 38
Cos = 30
Tan = 22
Power = 14
X2 = 45
Comma = 37
LeftPara = 29
RightPara = 21
Divide = 13
Multiply = 12
Subtract = 11
Add = 10
Enter = 9
Log = 44
Ln = 43
Sto = 42
0 = 33
1 = 34
2 = 26
3 = 18
4 = 35
5 = 27
6 = 19
7 = 36
8 = 28
9 = 20
Period = 141
Negative = 140
9 - CreatePIC
-------------
usage: real(9,cPIC_Funtion,cPIC_Num
cPIC_Function = Function to perform. 0 = StorePIC, 1 = DeletePIC
cPIC_Num = Number of PIC file to store to. Ranges from 1-255
*NOTE* PIC0 is actually PIC10 according to the TIOS. To store to PIC0
use: real(9,10
*IMPORTANT* Because the PIC's use tokens in their name that the TIOS doesnt really
have (for PICS) the names in your memory mgmt will be all strange, ex:
PIC0
inString(
P/Y
Z-Test(
THIS IS PERFECTLY NORMAL, nothing is wrong with your calc. The TIOS just doesnt have
the names for PIC variables above the 10th.
To transfer these PICs to your calc you MUST GROUP THEM. Sending may fail if you
attempt to send them individually.
10 - ExecuteArchivedProg
------------------------
usage: "PRGMNAME:real(10,exAction,Prgm_Dest:prgmXTEMP0XX
"PRGMNAME = Name of program to be stored in the ANS variable. Program can be ARCHIVED or in RAM
exAction = Action to perform. 0 = copy, 1 = clean specific, 2 = clean all
Prgm_Dest = Destination XTEMP program. Ranges from 0-15
This function will copy a program from the ARCHIVE or RAM to one of 16 XTEMP programs. The name of the
program to copy must be stored in the ANS variable prior to running this function.
This function will work with BASIC and TIOS ASM (nostub) programs.
For example, to copy the BASIC program ADEMO to XTEMP000 you would do:
"ADEMO
real(10,0,0
To copy the BASIC program MAP1 to XTEMP011, and then RUN XTEMP011 you would do:
"MAP1
real(10,0,11
prgmXTEMP011
To copy the **TIOS ASM** program SCROLL to XTEMP009, and then RUN XTEMP009 you would do:
"SCROLL
real(10,0,11
Asm(prgmXTEMP011
To REMOVE program XTEMP006 you would do:
real(10,1,6
To REMOVE ALL XTEMP0XX programs you would do:
real(10,2,0
*NOTE* If the XTEMP0XX program already exists (in RAM or ARCHIVE) then this function will exit
without copying. You must manually remove the target program before attempting to
replace it. (This is to stop accidents with nested programs trying to replace themselves).
11 - GetCalcVersion
-------------------
usage: real(11
Returns a code in the ANS variable which will tell you what calc version you are running.
83+ = 0
83+ SE = 1
84+ = 2
84+ SE = 3
12 - DrawShape
--------------
usage: real(12,Shape_Type,x1,y1,x2,y2,DrawShape_UpdateLCD
Shape_Type = Tpye of Shape you want to draw:
0 = DrawSingleLineBlack
1 = DrawSingleLineWhite
2 = DrawSingleLineInvert
3 = DrawEmptyRectangleBlack
4 = DrawEmptyRectangleWhite
5 = DrawEmptyRectangleInvert
6 = DrawFilledRectangleBlack
7 = DrawFilledRectangleWhite
8 = DrawFilledRectangleInvert
9 = DrawRectOutlineBlackFillWhite
10 = DrawRectOutlineWhiteFillBlack
x1 = First x coord (for rectangles this is TOP LEFT corner)
y1 = First y coord (for rectangles this is TOP LEFT corner)
x2 = Second x coord (for rectangles this is BOTTOM RIGHT corner)
y2 = Second y coord (for rectangles this is BOTTOM RIGHT corner)
Scrl_UpdateLCD = Toggle LCD update 0 = No, 1 = Yes
13 - TextMode
--------------
usage: real(13,TextFunction,Text_Char
TextFunction = 0 = Normal, 1 = Inverse, 2 = Lowercase on, 3 = Lowercase off, 4 = Display Character
If TextFunction = 4: Text_Char = Number of character to display (0 - 255).
When Lowercase is enabled, press ALPHA twice to enter lowercase mode in the TIOS.
*NOTE* Some TIOS functions (like errors and some menus) automatically reset these textflag's to Normal.
14 - CheckRAM
-------------
usage: real(14
Returns the amount of FREE RAM in ANS
End of Functions List.
*WARNING*: You MUST provide the correct inputs for each function. If you do not you
risk a crash or worse.
DO NOT TRY TO RUN YOUR BASIC PROGRAM FROM MIRAGEOS!!!! I use a saferam area that MirageOS uses,
it may cause instability.
Credits & Thanks:
-----------------
Dan Weiss (DWedit) - APP Devkit 2.0
Dan Englender (Dan_E) - WikiTI
Sean McLaughlin (Sigma) - Ideas for masked/clipped sprite routine wihtout smc
Patai Gergely (CoBB) - PindurTI, greatest 83+ emulator by far
Badja - Initial Clipped line routine
James Montelongo (Jim e) & YUKI - DI wrapper routine ideas
Texas Instruments (TI) - SDK and System Routine Documentation
Kevin Ouellet (Kevin, xlibman) - Testing & ideas
George Daole-Wellman (Dysfunction) - Testing & ideas
Kalan Scallan (kalan_vod) - Testing & ideas
Fred Sparks (CDI, [froody]) - Testing & ideas
threefingeredguy - Testing & ideas
Shaun McFall (Merthsoft) - Testing & ideas
Fred Shen (dragon__lance) - Testing & ideas
Brian Benson (Necro) - Testing & ideas
Jesko Roos (lolje) - Testing, bug finding (storepic bug!)
Everyone on MaxCoderz Forums
Everyone in #TCPA (EfNet)
If i forgot you please email me and i will update this section.
Disclaimer:
-----------
This program is still in early stages and may contain bugs. Program is use at own risk,
I can not be held responsible for loss of data and or hardware damage.
If you have any questions please email me at: tr1p1ea@yahoo.com.au
I have no problem with anyone using this program as long as you credit me
properly. Please dont try to modify and/or pass this program off as your
own with out first gaining my consent.
I've given up trying to sync all of my sigs at once.
Go look at my UTI Profile and make my life easier. Thnx.
Go look at my UTI Profile and make my life easier. Thnx.
Yeah but who wants an app when you can use something much smaller?
Tomorrow the api will be ready to use. The only function it won't have will be the sprite one. It will also have a new functions, one is the blackscreen that you wanted and the other is clearing the graphscreen. Also if you use the graphscreen clear it also gets rid of axes so you wont need that command anymore also.
Tomorrow the api will be ready to use. The only function it won't have will be the sprite one. It will also have a new functions, one is the blackscreen that you wanted and the other is clearing the graphscreen. Also if you use the graphscreen clear it also gets rid of axes so you wont need that command anymore also.
@HarrierFalcon
not all there!!!
TheStorm wrote:
These are the functions I use
Invert text, invert screen, black screen, clear screen, run indicator off, turn calc off/pause, sprite function (maybe).
Invert text, invert screen, black screen, clear screen, run indicator off, turn calc off/pause, sprite function (maybe).
not all there!!!
"Always code as if the person who will maintain your code is a maniac serial killer that knows where you live" -Unknown
"If you've done something right no one will know that you've done anything at all" -Futurama
<Michael_V> or create a Borg collective and call it The 83+
<Michael_V> Lower your slide cases and prepare to be silent linked. Memory clears are futile.
Harrierfalcon wrote:
The only one xLIB can't do is calc off/pause, but I don't know why you'd need that anyways.
I've given up trying to sync all of my sigs at once.
Go look at my UTI Profile and make my life easier. Thnx.
Go look at my UTI Profile and make my life easier. Thnx.
The last version has been uploaded to ticalc for all those who care. The version i am working on now will be uploaded soon and will include the new commands. All i have to do is write a readme and thestorm can get underway with his different version.
Harrierfalcon wrote:
Harrierfalcon wrote:
The only one xLIB can't do is calc off/pause, but I don't know why you'd need that anyways.
Invert screen is needed also
Edit: @ lafferjm did you add the functions because the read me hasn't changed?
"Always code as if the person who will maintain your code is a maniac serial killer that knows where you live" -Unknown
"If you've done something right no one will know that you've done anything at all" -Futurama
<Michael_V> or create a Borg collective and call it The 83+
<Michael_V> Lower your slide cases and prepare to be silent linked. Memory clears are futile.
So thats the one I have and still doesn't have the final features I need to finish my game. I don't need the sprite function and would prfer you didn't ad them tell later so that I could be done with this project.
"Always code as if the person who will maintain your code is a maniac serial killer that knows where you live" -Unknown
"If you've done something right no one will know that you've done anything at all" -Futurama
<Michael_V> or create a Borg collective and call it The 83+
<Michael_V> Lower your slide cases and prepare to be silent linked. Memory clears are futile.
- lafferjm
- Calculator Deity (Posts: 1537)
- 17 May 2007 07:33:02 pm
- Last edited by lafferjm on 17 May 2007 07:46:59 pm; edited 1 time in total
Here is the second version of the api
http://lafferealm.awardspace.com/LBAPI.8xp
I do not have a readme completed but here are the function numbers and what they do.
1=Text inverse on
2=Text inverse off
3=Run indicator off
4=Run indicator on
5=Clear homescreen
6=Make graph black
7=Clear the graph screen and get rid of axes
8=Invert the graphscreen
9=Power Down
10=Get rid of the done
11=Pause
http://lafferealm.awardspace.com/LBAPI.8xp
I do not have a readme completed but here are the function numbers and what they do.
1=Text inverse on
2=Text inverse off
3=Run indicator off
4=Run indicator on
5=Clear homescreen
6=Make graph black
7=Clear the graph screen and get rid of axes
8=Invert the graphscreen
9=Power Down
10=Get rid of the done
11=Pause
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.
» Go to Registration page
» Go to Registration page
» Goto page Previous 1, 2, 3, 4, 5, 6 Next
» View previous topic :: View next topic
» View previous topic :: View next topic
Page 5 of 6
» All times are UTC - 5 Hours
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Advertisement