Login [Register]
Don't have an account? Register now to chat, post, use our tools, and much more.
This project is complete, but will have later updates. You can get the latest version here.

Preface: I would not be at all surprised to learn that this has or is being made as of now. Sorry for the redundancy, but I'm not trying to steal your idea!

I am creating an on-calc ICE sprite editor, written in both ICE and TI-BASIC. Here's why:

ICE program: Graphical hub; sprite dimension specifications, sprite editor, options

TI-BASIC program: Hex conversion, string imports/exports to the ICE program

The entire reason for the BASIC program is for the ability for completed sprite data to be stored in strings for later use, mostly just using Rcl to include it into an ICE program.

There is one issue though... As PT_ said in his ICE readme, there can be very bad results if an ICE executed BASIC program encounters an error such as a nonexistent string. I obviously want to put safeguards up against this. If anyone can tell me how to check if a string variable exists without creating an error, please let me know. This will be the only thing holding me back.

P.S. No source right now just because I don't want to embarrass myself with the lack of optimization. Razz
I'm almost finished! I would post screenshots, but TI-Connect doesn't like ICE. Here's a list of the features:

    ~Complete access to the Xlib color palette

    ~Color comparison between selected drawing color and selected sprite pixel

    ~Dynamic sprite pixel size allowing for any dimension variations, including non-squares

    ~Sprites can be exported to Str1 for later use

    ~Sprites can be imported to Str1 to edit

    ~Multiple drawing tools such a fill, regular pencil, and color dropper

I'll be done pretty soon, so tell me if you want anything else in the program!
This sounds like an eminently useful project, and I'm looking forward to the finished product. By the way, for screenshots, you can use CEmu.
I'm done with everything except the color dropper, which contains an elusive bug.
I'm completely finished! I'll upload in a few minutes. I've managed to complete every single feature, including dynamic pixel sizing.



~Draw: draws selected palette color to selected sprite location

~Fill: fills all area of like color around selected sprite location to selected palette color

~Grab: sets selected sprite location color to palette color

~Cursor: swaps between cursor control for palette and sprite

~Palette: cycles through four sections of the Xlib palette

~Arrow keys: navigates through palette/sprite

~Delete: Exports sprite and exits program.
Nice! Except those images are upside down Wink
How you detect if a string was present or not? I'm having the same issue with DCS9IC.

EDIT: also, any load capabilities? Razz
TheLastMillennial wrote:
Nice! Except those images are upside down Wink
How you detect if a string was present or not? I'm having the same issue with DCS9IC.

EDIT: also, any load capabilities? Razz

As of now, I have found no way to test whether a string is present. Any mention of an undefined string in a program results in an error. I'll just have to trust that no-one will import a nonexistent string.

If by load capabilities you mean ability to import existing sprite data to edit, yes. You can store existing sprite data to Str1 to access with the editor.
This program has been uploaded to the archives and is waiting at Kerm's pearly gates.
SMASH that mf like button and don't forget to subscribe

EDIT: Don't try to import a sprite when Str1 is empty. It might not end well.
As for the issue of not being able to detect empty strings, you can use length(Str1) in a BASIC program to detect if it exists or not. If it doesn't (or it's an empty string), it'll output 0. So you can just put a really easy check to determine whether or not the string exists (and if you go a step further, whether or not it's the length of an ICE sprite) before loading, and give an error message if it doesn't.
123outerme wrote:
As for the issue of not being able to detect empty strings, you can use length(Str1) in a BASIC program to detect if it exists or not. If it doesn't (or it's an empty string), it'll output 0. So you can just put a really easy check to determine whether or not the string exists (and if you go a step further, whether or not it's the length of an ICE sprite) before loading, and give an error message if it doesn't.
Cool! I'll update my program with that feature. However, my program can create an edit any dimensions of sprite, not just squares, so I won't need that second part.
If I delete Str0 and do
Code:
length(Str0
it says "error undefined" Sad
TheLastMillennial wrote:
If I delete Str0 and do
Code:
length(Str0
it says "error undefined" Sad

Oh yeah, that's right, if the variable's deleted, it doesn't work. The only solution I can think of is make the user input their imported string at the beginning of the program (where they could RCL a string or Ans), and then you can validate it from there. What you can do is initialize a new string with one space (" ") and then get the substring of everything but the first character once you've validated the program.
Example in pseudocode:

Code:
" "->Str0
Get imported string into Str0
If imported string is a valid ICE sprite //I'd imagine you want to check the length here
sub(Str0, 2, length(Str0))->Str0
Use Str0
123outerme wrote:
TheLastMillennial wrote:
If I delete Str0 and do
Code:
length(Str0
it says "error undefined" Sad

Oh yeah, that's right, if the variable's deleted, it doesn't work. The only solution I can think of is make the user input their imported string at the beginning of the program (where they could RCL a string or Ans), and then you can validate it from there. What you can do is initialize a new string with one space (" ") and then get the substring of everything but the first character once you've validated the program.
Example in pseudocode:

Code:
" "->Str0
Get imported string into Str0
If imported string is a valid ICE sprite //I'd imagine you want to check the length here
sub(Str0, 2, length(Str0))->Str0
Use Str0

That's quite difficult since ICE takes full control of the screen even when a BASIC program is executed. I do however have that string initialization/trimming technique for sprite exporting.
A review would be greatly appreciated if any of you guys have the time Razz
Since this is your first (and a half) release I'm not going to put this in the reviews since I can't edit it.

My immediate reaction: Wow, his readme just got broke. Everything got pushed onto 1 line and it's really hard to follow this way.

My Second reaction: why does an icon maker not have an icon? Laughing I'm an idiot, this is a sprite maker not an icon maker! 0x5

The temptation was too much, I deleted Str1 and tried to load it. Fortunately the program just quit. I don't know if it displayed an error since I ran it through Cesium.

The controls are a little weird at first, but I got use to them fairly quickly.

Suggestions:
*How about removing 'grab' and 'fill' and put them under a new section called 'File'. Then add (under 'File' the option to discard your progress and make a new sprite. Then use 'draw' with [2nd] and [Enter].
*Also, an 'undo' button would be nice since there are so many colors it's hard to find what originally went there.
*When loading/ saving an icon, it'd be nice to have an '<number of elements loaded>/<total number of elements>' (you can get the total num of elements by doing length(Str1) Wink)

Bugs:
*If you make the width or height greater than 99, it compresses the numbers together and adds a ':' instead of a 1 to the front.
*Surprisingly, that's all I found!

Overall though outstanding program! Even without my suggestions I think this still deserves a [10/10] Very Happy
TheLastMillennial wrote:
Suggestions:
*How about removing 'grab' and 'fill' and put them under a new section called 'File'. Then add (under 'File' the option to discard your progress and make a new sprite. Then use 'draw' with [2nd] and [Enter].
*Also, an 'undo' button would be nice since there are so many colors it's hard to find what originally went there.
*When loading/ saving an icon, it'd be nice to have an '<number of elements loaded>/<total number of elements>' (you can get the total num of elements by doing length(Str1) Wink)
Sorry about the readme, Perhaps you weren't on the latest release, but I'll look into it.

I think I'll leave grab and fill where they are, just because it's nice to be a click away from basic drawing controls, but I might add a File-like menu under the DEL button to access things like starting from scratch, exporting, an undo button (I was thinking about that).

The reason for that bug is that the command to display an integer takes an argument for the number of digits displayed, causing a small visual bug when it is gone over. I can fix that by changing that argument from simply "3" to something like "(n/1000)+(n/100)+(n/10)+1" where n is the number displayed.

Thanks for the input! Here's a list of other issues and upcoming features.

CalcMeister wrote:
Set max sprite dimensions to 100*100
Fix printUInt( bug (the graphical glitch)
Create undo button
Add loading indicator for when the program is cooking on something (especially something long like Fill)
Create File menu and redo exporting GUI
Idiot-proof ICE/BASIC liaison program
Add support for sprite being broken into multiple strings for very large files
Fix crash when a very large file completes exporting
Add quick palette and quick palette control
Great! I love those updates!
A few small suggestions, instead of putting your program under the Misc. folder, why not put it under Graphics?
Also, if you could include a download link in your first post that'd be convenient. Wink
TheLastMillennial wrote:
Great! I love those updates!
A few small suggestions, instead of putting your program under the Misc. folder, why not put it under Graphics?
Also, if you could include a download link in your first post that'd be convenient. Wink
I have it under the Misc. folder right now so that it's the second thing you notice when you find ICE Compiler. I can put it in both folder though! Smile I'll put the download in the first post.
Sadly, there is no trace of the original ICE source code anywhere, though the compiled asm still exists. There may not be another update for a while!
Let's all nag PT_ to make an ICE decompiler! Razz
Also, how is "decompiler" still recognized by Chrome as a misspelled word for me by this point?
  
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
Page 1 of 2
» All times are GMT - 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

 

Advertisement