Don't have an account? Register now to chat, post, use our tools, and much more.
Latest Headlines
Online Users
There are 103 users online: 4 members, 66 guests and 33 bots. Members: flyingfisch, HOMER-16, Tari. Bots: VoilaBot (1), Spinn3r (1), Magpie Crawler (4), VoilaBot (9), Googlebot (18).
RSS & Social Media
SAX
You must log in to view the SAX chat widget
|
| Author |
Message |
|
CalebHansberry

Power User

Joined: 27 Jul 2011 Posts: 319 Location: Great American Plains
|
Posted: 09 Aug 2012 11:10:43 am Post subject: Skylite's Icon Creator Suite |
|
|
Skylite's Icon Creator Suite originally just generated hex code, but now also installs the code into the program of your choice. It can import icons from pictures, PicArc libraries, and strings, and export them as the same. It is actually nearly 100% DCSB libs, especially the GUI ones!
To start with, does anyone know of a way to turn "1010" into "A", or do the same thing for "1010001000001110"? _________________ "We do not understand in order that we may believe; we believe in order to understand." - Francis Breisch Jr., "The Kingdom Of God", 1958
     |
|
| Back to top |
|
|
Tari

Systems Integrator

Joined: 03 Jul 2006 Posts: 2107 Location: Always-winter, Michigan
|
Posted: 09 Aug 2012 12:47:18 pm Post subject: |
|
|
There may be a strange (tricky) way to do it, but I'd stick with the mathematical definition of the problem.
A number x in base n is a string of characters, where the value of the digit at position i (where position 0 is the least significant digit) represents a multiple of n^i. The overall value is the sum of all the digits.
Considering "1010" in binary, that's (0*2^0) + (1*2^1) + (0*2^2) + (1*2^3), or 10 in decimal, which we represent as "A" in hex. How to do such a thing in code? Here's a first go: (my TI-BASIC is very rusty, so this may not actually be quite right) Code: :"1010"→Str1
:StrLen(Str1)→L
:0→X
:For(J,0,L-1)
:X+2^J*(sub(Str1,L-J,1)="1")→X
:End This gets you the value of the binary string in X. Converting to hex, it's easiest just to use a lookup table: Code: :sub("0123456789ABCDEF",X+1,1)→Str1 So then you have converted 4 binary digits to hex in a string.
If you want to do this for a longer string, it's easiest just to take the binary digits four at a time, and do the same conversion, concatenating the results as you go. _________________
Ask questions the smart way · タリ |
|
| Back to top |
|
|
CalebHansberry

Power User

Joined: 27 Jul 2011 Posts: 319 Location: Great American Plains
|
Posted: 18 Aug 2012 11:07:29 pm Post subject: |
|
|
Thank you very much, Tari! A pre-release will be coming soon, but next - does anyone know how to convert "1" to 1? String to decimal? And I can use DCSB libs too.
Thanks! _________________ "We do not understand in order that we may believe; we believe in order to understand." - Francis Breisch Jr., "The Kingdom Of God", 1958
     |
|
| Back to top |
|
|
graphmastur
Power User

Joined: 27 Jul 2010 Posts: 464
|
Posted: 18 Aug 2012 11:25:15 pm Post subject: |
|
|
| Look for something like "expr(" I know that works on TI-83/84, but I'm not sure what you're using. (If you are using those calcs, then I'm pretty sure StrLen above should be "length(") |
|
| Back to top |
|
|
CalebHansberry

Power User

Joined: 27 Jul 2011 Posts: 319 Location: Great American Plains
|
Posted: 18 Aug 2012 11:33:43 pm Post subject: |
|
|
About "length(", you are dead right, that is what it is. About "expr(", I dunno how I would use that. I am using an 84 PSE. _________________ "We do not understand in order that we may believe; we believe in order to understand." - Francis Breisch Jr., "The Kingdom Of God", 1958
     |
|
| Back to top |
|
|
tifreak8x

Guru

Joined: 16 Mar 2005 Posts: 9059 Location: Sol System
|
|
| Back to top |
|
|
CalebHansberry

Power User

Joined: 27 Jul 2011 Posts: 319 Location: Great American Plains
|
Posted: 20 Aug 2012 09:46:31 pm Post subject: |
|
|
| tifreak8x wrote: | | http://www.ticalc.org/archives/files/fileinfo/385/38508.html Might be something close to what you are looking for or wanting to do? It converts binary to hex for sprites of 8x8, 16x16, and 32x32 sizes. |
Hex to Sprite? How would that help me if I need (really) sprite to hex? _________________ "We do not understand in order that we may believe; we believe in order to understand." - Francis Breisch Jr., "The Kingdom Of God", 1958
     |
|
| Back to top |
|
|
KermMartian

Site Admin

Joined: 14 Mar 2005 Posts: 55736 Location: Earth, Sol, Milky Way
|
|
| Back to top |
|
|
CalebHansberry

Power User

Joined: 27 Jul 2011 Posts: 319 Location: Great American Plains
|
Posted: 22 Aug 2012 12:11:38 am Post subject: |
|
|
Oh! I get "expr(" now. I just use "expr(sub(Str0,2,1)" to extract a value from the string Doors leaves behind for radio-buttons.
Skylites Icon Suite BETA has been released in the Cemetech archives now! Yay! Kerm, you really should try it, because it uses so many DCSB libs that it could be an advertisement. _________________ "We do not understand in order that we may believe; we believe in order to understand." - Francis Breisch Jr., "The Kingdom Of God", 1958
     |
|
| Back to top |
|
|
KermMartian

Site Admin

Joined: 14 Mar 2005 Posts: 55736 Location: Earth, Sol, Milky Way
|
Posted: 22 Aug 2012 09:18:03 am Post subject: |
|
|
I just threw it onto jsTIfied and gave it a test, and I must say that I'm quite impressed! Great job on this, including your use of the DCS libs and Input for sprite-drawing. I also made sure it properly complains when Doors CS 7 is not installed, which it does. I have added a link to it on the BASIC Header page of the Doors CS wiki for now, and might link elsewhere at a later date. _________________
 |
|
| Back to top |
|
|
CalebHansberry

Power User

Joined: 27 Jul 2011 Posts: 319 Location: Great American Plains
|
Posted: 22 Aug 2012 02:50:57 pm Post subject: |
|
|
Oh, thanks, Kerm! _________________ "We do not understand in order that we may believe; we believe in order to understand." - Francis Breisch Jr., "The Kingdom Of God", 1958
     |
|
| Back to top |
|
|
CalebHansberry

Power User

Joined: 27 Jul 2011 Posts: 319 Location: Great American Plains
|
Posted: 06 Feb 2013 12:10:34 am Post subject: |
|
|
OK everyone! Skylites' Icon Suite Beta 2 has been released! It adds support for DCS descriptions, DCS5 icons, and converts the icon to hexadecimal faster thanks to using TIFreak's code (thank you!), is spiffed a little, the included PicArc database is half the size, and more!
And I am very happy to have finally conquered my in ability to use hybrid TI-Basic to insert a " into a program! I used sub( to rip a " ripped from a program (which conveniently is itself) with CelticIII's LineRead library. That is how it now can insert DCS descriptions, which use a quote.
And please, please remember, this is a prerelease! I need help with you guys using/abusing this program and helping find annoying bugs or things that could be improved! By the way, if anyone wants to make a French version, I would be glad of that too...
I suppose Kerm should update that link.
[EDIT] And in this version, I made it so that the cursor for drawing the icon no longer goes down a pixel every time you toggle a pixel! For both that fix, and the usage of Input for drawing the icon, kudos go to Kerm. I learned both tricks from reading - pretty much all of - CivSimI, an excellent TI-Basic program. _________________ "We do not understand in order that we may believe; we believe in order to understand." - Francis Breisch Jr., "The Kingdom Of God", 1958
     |
|
| Back to top |
|
|
Kaslai

Member

Joined: 16 Nov 2011 Posts: 172 Location: ???, WA
|
Posted: 06 Feb 2013 12:35:22 am Post subject: |
|
|
That looks really nice, Caleb! I would have killed for a fast application like this about three years ago. The icon generators have always been on the clunky side, but from the looks of it, you're remedying that quite well. _________________
 |
|
| Back to top |
|
|
CalebHansberry

Power User

Joined: 27 Jul 2011 Posts: 319 Location: Great American Plains
|
Posted: 06 Feb 2013 12:39:31 am Post subject: |
|
|
| Kaslai wrote: | | That looks really nice, Caleb! I would have killed for a fast application like this about three years ago. The icon generators have always been on the clunky side, but from the looks of it, you're remedying that quite well. |
Thank you very much for the kind words!
And yes, I personally find it a joy to use SIS to start any project with an icon. _________________ "We do not understand in order that we may believe; we believe in order to understand." - Francis Breisch Jr., "The Kingdom Of God", 1958
     |
|
| Back to top |
|
|
KermMartian

Site Admin

Joined: 14 Mar 2005 Posts: 55736 Location: Earth, Sol, Milky Way
|
Posted: 06 Feb 2013 12:50:50 pm Post subject: |
|
|
I continue to be happy with your use of Doors CS's GUI features for BASIC programmers plus the Celtic III libraries. I'm glad you seem to be understanding the nuances of the APIs fairly well from the existing documentation, and I hope that this program proves useful to many coders. _________________
 |
|
| Back to top |
|
|
CalebHansberry

Power User

Joined: 27 Jul 2011 Posts: 319 Location: Great American Plains
|
Posted: 15 May 2013 12:17:11 pm Post subject: |
|
|
Okay everyone, just wanted to say that there had been a problem with the archive queue, and SIS beta 2 has only just now been made available.
So with that being said, I re-announce - Skylites Icon Suite Beta 2! Anyone who get use out of SISB or would like to, I strongly encourage to download the new version, as it makes the system much more useful and intuitive, and repairs many features that didn't work right.
Again, please, please remember, this is a prerelease! I need help with you guys using/abusing this program and helping find annoying bugs or things that could be improved! And if anyone wants to make a French version, I would be glad of that too. _________________ "We do not understand in order that we may believe; we believe in order to understand." - Francis Breisch Jr., "The Kingdom Of God", 1958
     |
|
| Back to top |
|
|
|
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
|
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
|
© Copyright 2000-2013 Cemetech & Kerm Martian :: Page Execution Time: 0.037400 seconds.
|