[Featured][Beta] API - Why hasn't this been done yet?!

Here you can find side projects of the staff and great projects which we think should get extra support. (Note that featured projects are not projects by staff members of MaxCoderz)

Moderator: MaxCoderz Staff

Post Reply
gangsta
Sir Posts-A-Lot
Posts: 171
Joined: Wed 12 Oct, 2005 10:46 pm

Post by gangsta »

we need a direct input routine...
threefingeredguy
Calc King
Posts: 2195
Joined: Sun 27 Mar, 2005 4:06 am
Location: sleeping
Contact:

Post by threefingeredguy »

The problem with that is that several keys return the same value, it just depends on which key group you were checking. A more practical routine would be a getcsc routine.
Image
User avatar
Timendus
Calc King
Posts: 1729
Joined: Sun 23 Jan, 2005 12:37 am
Location: Netherlands
Contact:

Post by Timendus »

Like I commented on the API:

"How would you imagine that to work?

Code: Select all

loop:
   kbd.readkey(group)
   cp kEnter
   jr z,pressed_enter
    ...
   jr loop
Et cetera..? For it to be fast you'll still have to specify a keygroup that you want to read, so it'll hardly make anything easier to put it in the API. It'd be 2 minutes to add that, but I don't entirely see the point yet."

And I added some really simple sprite routines (flip and invert) to get the Sprites section running. I wrote them in the Help forum, haven't tested them, but they're only like 5 lines of code :) I agree with Gangsta that we need a good or/xor/and sprite routine, but I'm not sure which one to use... Suggestions?
http://clap.timendus.com/ - The Calculator Link Alternative Protocol
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS
lloydkirk1989
Calc Wizard
Posts: 680
Joined: Wed 22 Dec, 2004 5:37 am
Location: West Palm Beach,FL
Contact:

Post by lloydkirk1989 »

User avatar
Timendus
Calc King
Posts: 1729
Joined: Sun 23 Jan, 2005 12:37 am
Location: Netherlands
Contact:

Post by Timendus »

Thought someone was going to say that :) I'll take a look at it.

I wrote some array routines:
Image

In fact, I only added the "format for displaying" routine, and indexOf and getVal routines. I'd already added CoBB's routine some days ago, and KV added his own :) (Way to go Vincent :yes:)

Now it mostly needs two routines for importing and exporting Ti-OS List variables I think. Annoying thing is that those use floating point values...
Last edited by Timendus on Tue 16 May, 2006 6:02 pm, edited 1 time in total.
http://clap.timendus.com/ - The Calculator Link Alternative Protocol
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS
necro
Calc King
Posts: 1619
Joined: Sat 26 Mar, 2005 2:45 am
Location: your shadow

Post by necro »

I added a FEW ideas, have more but I am not sure how you feel about to many being added at one time. Also, is multiple ideas like that ok...or should they be in seprate "posts" (no idea what to call them)
User avatar
Timendus
Calc King
Posts: 1729
Joined: Sun 23 Jan, 2005 12:37 am
Location: Netherlands
Contact:

Post by Timendus »

No, it's alright like that :) You could try to add comments to other people's ideas when they cover the same topic, instead of making new ideas, but for the rest you're doing things ok :) And it's up to you how many you add at once, but it could be less overwhelming for programmers if you keep it slow ;)

Your first two ideas are pretty good. I think I'll write those one of these days. And the last two would be good additions too. We need a Programs section with reading from, writing to and executing programs :)

I don't really get the others though.
Necro at API wrote:3.List routine to allow some one to store an element from a list into a var
4.Matrix Routine to allow some one to store from a matrix to a var
How do you use the words "list", "var" and "matrix" here? As bytes in assembly, or as the Ti-OS variables? If you mean the former, I just wrote your idea no.3.
http://clap.timendus.com/ - The Calculator Link Alternative Protocol
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS
necro
Calc King
Posts: 1619
Joined: Sat 26 Mar, 2005 2:45 am
Location: your shadow

Post by necro »

in response to the question, I meant storing to a Ti-OS variable indeed...
User avatar
Timendus
Calc King
Posts: 1729
Joined: Sun 23 Jan, 2005 12:37 am
Location: Netherlands
Contact:

Post by Timendus »

I was afraid so :) I'm going to leave all the VAT stuff to someone who knows what he's doing, because I know nothing of the 83+ archive. I could probably get some program/list/matrix routines working for my humble old Ti-83, but that would be no guarantee for 83+...

I added some more really simple routines to the Array and Strings sections. I intend to do that whenever I have 5 minutes left :)

Oh, and I renamed array.format to array.toString. Makes more sense that way I think. I'll write a var.toString too one of these days.
http://clap.timendus.com/ - The Calculator Link Alternative Protocol
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS
User avatar
Timendus
Calc King
Posts: 1729
Joined: Sun 23 Jan, 2005 12:37 am
Location: Netherlands
Contact:

Post by Timendus »

I see someone made an empty section called string.copy. I guess I should've explained how that works.

Sections are "objects" that you wish to manipulate, like Strings, the Homescreen, the Link port, et cetera. Every section/object has several routines in them that do the manipulating. So if you'd want to add a string.copy routine, you shouldn't add it as a section but as a routine inside the section Strings: Go to Strings, click "Add routine", type in "string.copy(>from,>to)", press "Confirm name" and type your routine in the template where it says "Your code here".

By the way, does anyone know if there is a way to make a textarea width 100%? When you edit a routine, the textarea width depends on how much horizontal space there's left in that frame, which is variable... I haven't really figured out a way to fix that yet...
http://clap.timendus.com/ - The Calculator Link Alternative Protocol
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS
User avatar
kv83
Maxcoderz Staff
Posts: 2735
Joined: Wed 15 Dec, 2004 7:26 pm
Location: The Hague, Netherlands
Contact:

Post by kv83 »

frames are evil
Image
User avatar
Timendus
Calc King
Posts: 1729
Joined: Sun 23 Jan, 2005 12:37 am
Location: Netherlands
Contact:

Post by Timendus »

Thanks a bunch KV ;)
Anyway, I fixed it.

Code: Select all

textarea {
	font-family: Courier New;
	font-size: 11px;
	font-color: black;
	width: 100%;
}
http://clap.timendus.com/ - The Calculator Link Alternative Protocol
http://api.timendus.com/ - Make your life easier, leave the coding to the API
http://vera.timendus.com/ - The calc lover's OS
gangsta
Sir Posts-A-Lot
Posts: 171
Joined: Wed 12 Oct, 2005 10:46 pm

Post by gangsta »

Need Help!! Won't compile-

Code: Select all

; ==========================================
; Required headers
; ==========================================
#include "../includes/headers.inc"

#define api_defines
#include "../includes/api.inc"

; ==========================================
; Description (ignored if not Ion/MirageOS)
; ==========================================
#ifndef TI83P
.db "API",0
#endif

; ==========================================
; Program entry point
; ==========================================
init_all:
	graph.clear()
	graph.println(helloworld)
	ret

helloworld:
	.db "Hello World!", 0

.end
DarkerLine
Calc Wizard
Posts: 526
Joined: Tue 08 Mar, 2005 1:37 am
Location: who wants to know?
Contact:

Post by DarkerLine »

Off the top of my head, I think you're missing

Code: Select all

.org $9D93
.db $BB,$6D
before the program code.
just try to be nice to people.
_________________
My TI Blog - http://mpl.unitedti.org/
User avatar
Jim e
Calc King
Posts: 2457
Joined: Sun 26 Dec, 2004 5:27 am
Location: SXIOPO = Infinite lives for both players
Contact:

Post by Jim e »

I'd say he's making calls that don't exist.

Code: Select all

#define api_routines
#include "api.inc"
squeeze that in there some where.
Image
Post Reply