Update time! The project stuff is still only sorta functioning, but I guess you can play with it if you want. There are functions that don't work and stuff, so use at your own risk.
That said, I have added palettized colors to the hex sprite editor:

That cyan color is transparent. You can open sprites from a selection like before:


Because of the weird way those sprites work, it gets the size wrong if there are "G" characters. So resize manually:

You can also open an image from file:

And of course clicking insert adds it to your program.

I converted all my Minesweeper sprites using that, and got this as a result:


It uses the Celtic 2 CSE style of doing things, so 0 is transparent. In an ideal world I'll make it detect if you're at the end of a line early and insert a G to optimize on size. I haven't added it yet. Expect it tomorrow.

I haven't tested if it still works right with black and white. Use at your own risk there.

Download:
http://merthsoft.com/Tokens.zip

Check it out, it's Franklin Pierce, the only president from my home state of New Hampshire (he wasn't a very good one Sad):
lol Woo, glad you were able to make good use of my sprites! Did you dig around in my appvars to get at the hex data? :p

Also, the 'G' character represents an end of a row of pixels, not the end of the sprite. By the way you typed that up there, that looks like what you are indicating, but you might have meant it as the end of lines. Just wanting to clarify. Smile

Looks awesome so far! Will be watching for more updates!
Also, there's the H transparency, which replaces the underlying pixel with transparency, whereas 0 transparency leaves the current pixel contents as-is. I don't know if that has a place in your sprite editor.
So I have an error thrown when I click *no color* in the hex sprite editor. It says "Could not find any recognizable digits".


Code:

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.FormatException: Could not find any recognizable digits.
   at System.ParseNumbers.StringToInt(String s, Int32 radix, Int32 flags, Int32* currPos)
   at System.Convert.ToInt16(String value, Int32 fromBase)
   at Merthsoft.Extensions.HexHelper.BinToHex(String bin)
   at Merthsoft.TokenIDE.HexSprite.updateHex()
   at System.Windows.Forms.CheckBox.set_CheckState(CheckState value)
   at System.Windows.Forms.CheckBox.OnClick(EventArgs e)
   at System.Windows.Forms.CheckBox.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.18052 built by: FX45RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll
----------------------------------------
TokenIDE
    Assembly Version: 0.10.3.0
    Win32 Version: 0.10.3.0
    CodeBase: file:///C:/Users/Toshiba%20Admin/Documents/Ti%20Calculator(s)/Tools/Tokens/TokenIDE.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.18047 built by: FX45RTMGDR
    CodeBase: file:///C:/windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.18044 built by: FX45RTMGDR
    CodeBase: file:///C:/windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.18021 built by: FX45RTMGDR
    CodeBase: file:///C:/windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
Microsoft.CSharp
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.17929
    CodeBase: file:///C:/windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.CSharp/v4.0_4.0.0.0__b03f5f7f11d50a3a/Microsoft.CSharp.dll
----------------------------------------
System.Core
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.17929 built by: FX45RTMREL
    CodeBase: file:///C:/windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
Accessibility
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.17929 built by: FX45RTMREL
    CodeBase: file:///C:/windows/Microsoft.Net/assembly/GAC_MSIL/Accessibility/v4.0_4.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------
System.Dynamic
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.17929
    CodeBase: file:///C:/windows/Microsoft.Net/assembly/GAC_MSIL/System.Dynamic/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Dynamic.dll
----------------------------------------
Anonymously Hosted DynamicMethods Assembly
    Assembly Version: 0.0.0.0
    Win32 Version: 4.0.30319.18052 built by: FX45RTMGDR
    CodeBase: file:///C:/windows/Microsoft.Net/assembly/GAC_64/mscorlib/v4.0_4.0.0.0__b77a5c561934e089/mscorlib.dll
----------------------------------------
System.Xml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.18060 built by: FX45RTMGDR
    CodeBase: file:///C:/windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Configuration
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.18060 built by: FX45RTMGDR
    CodeBase: file:///C:/windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.




*EDIT*

I just tried again and I got this instead: "Additonal non-parsable characters are at the end of the string"


Code:

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.FormatException: Additional non-parsable characters are at the end of the string.
   at System.ParseNumbers.StringToInt(String s, Int32 radix, Int32 flags, Int32* currPos)
   at System.Convert.ToInt16(String value, Int32 fromBase)
   at Merthsoft.Extensions.HexHelper.BinToHex(String bin)
   at Merthsoft.TokenIDE.HexSprite.updateHex()
   at System.Windows.Forms.CheckBox.set_CheckState(CheckState value)
   at System.Windows.Forms.CheckBox.OnClick(EventArgs e)
   at System.Windows.Forms.CheckBox.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.18052 built by: FX45RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll
----------------------------------------
TokenIDE
    Assembly Version: 0.10.3.0
    Win32 Version: 0.10.3.0
    CodeBase: file:///C:/Users/Toshiba%20Admin/Documents/Ti%20Calculator(s)/Tools/Tokens/TokenIDE.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.18047 built by: FX45RTMGDR
    CodeBase: file:///C:/windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.18044 built by: FX45RTMGDR
    CodeBase: file:///C:/windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.18021 built by: FX45RTMGDR
    CodeBase: file:///C:/windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
Microsoft.CSharp
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.17929
    CodeBase: file:///C:/windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.CSharp/v4.0_4.0.0.0__b03f5f7f11d50a3a/Microsoft.CSharp.dll
----------------------------------------
System.Core
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.17929 built by: FX45RTMREL
    CodeBase: file:///C:/windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
Accessibility
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.17929 built by: FX45RTMREL
    CodeBase: file:///C:/windows/Microsoft.Net/assembly/GAC_MSIL/Accessibility/v4.0_4.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------
System.Dynamic
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.17929
    CodeBase: file:///C:/windows/Microsoft.Net/assembly/GAC_MSIL/System.Dynamic/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Dynamic.dll
----------------------------------------
Anonymously Hosted DynamicMethods Assembly
    Assembly Version: 0.0.0.0
    Win32 Version: 4.0.30319.18052 built by: FX45RTMGDR
    CodeBase: file:///C:/windows/Microsoft.Net/assembly/GAC_64/mscorlib/v4.0_4.0.0.0__b77a5c561934e089/mscorlib.dll
----------------------------------------
System.Xml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.18060 built by: FX45RTMGDR
    CodeBase: file:///C:/windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Configuration
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.18060 built by: FX45RTMGDR
    CodeBase: file:///C:/windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.


Is this happening after having drawn some colors or when there are G characters in the sprite?
Soo~ Playing around with the new Tokens, I loaded up a png, and it had a white background, but Tokens made it all black. I'm guessing that's a transparency issue though, right?

Anyways, I clicked on the check box that had 'color' next to it, and the sprite editor crashed:


Code:
See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.FormatException: Could not find any recognizable digits.
   at System.ParseNumbers.StringToInt(String s, Int32 radix, Int32 flags, Int32* currPos)
   at System.Convert.ToInt16(String value, Int32 fromBase)
   at Merthsoft.Extensions.HexHelper.BinToHex(String bin)
   at Merthsoft.TokenIDE.HexSprite.updateHex()
   at System.Windows.Forms.CheckBox.set_CheckState(CheckState value)
   at System.Windows.Forms.CheckBox.OnClick(EventArgs e)
   at System.Windows.Forms.CheckBox.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1008 (RTMGDR.030319-1000)
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll
----------------------------------------
TokenIDE
    Assembly Version: 0.10.3.0
    Win32 Version: 0.10.3.0
    CodeBase: file:///C:/Users/Daniel/Tokens/TokenIDE/TokenIDE.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1002 built by: RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1001 built by: RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1001 built by: RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
Microsoft.CSharp
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.CSharp/v4.0_4.0.0.0__b03f5f7f11d50a3a/Microsoft.CSharp.dll
----------------------------------------
System.Core
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.233 built by: RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Dynamic
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Dynamic/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Dynamic.dll
----------------------------------------
Anonymously Hosted DynamicMethods Assembly
    Assembly Version: 0.0.0.0
    Win32 Version: 4.0.30319.1008 (RTMGDR.030319-1000)
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_64/mscorlib/v4.0_4.0.0.0__b77a5c561934e089/mscorlib.dll
----------------------------------------
Accessibility
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1 built by: RTMRel
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Accessibility/v4.0_4.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------
System.Xml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1009 built by: RTMGDR
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Configuration
    Assembly Version: 4.0.0.0
    Win32 Version: 4.0.30319.1009 (RTMGDR.030319-1000)
    CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.


When I clicked 'continue', it filled all the pixels with black.

Edit: Though, if I click on colors again, they come back \o/
If it's not in color mode and you try to open a color picture, you're very likely to get an all-black sprite. You need to make sure it's in color mode already. If you're in color mode, and you've started drawing and switch to black, you're likely to get some issues, too. It sounds like you've managed to get it to mostly work, though. I'll be working on it tonight to get it more stable.
I just tested it, and yes, any color other than white/black and the G characters are causing the errors.

How is G in a hex snippet anyway?
G is a character used in Celtic2CSE and a custom program benryves made for me on the older models that indicated an end of line for data for the sprite, that it needed to reset the column counter and drop a row. This was good for compressing sprite data using BASIC hex data.
Okay, so those error popups should be fixed. Additionally I added the "G" character:



I've also rearranged the menu and keyboard shortcuts a bit:

Ctl+H is now "find and replace".

tifreak, could you test out the black and white sprite editor with the "G" character and let me know if I did it right?
According to your screenshots, that looks perfect. I'll try to test tomorrow, though.
For what it's worth, that usage of G also looks correct to me in the black-and-white screenshots. Smile
Thanks Merth! It works great now.

I really should buy one of the C SE's. They seem so cool with their graphics.
Hm, will the image editor bit ever work with color, and save to the appropriate .8xi for the CSE? Or could it support a way to do .png -> .8xi for the CSE?
The idea right now is to combine the image editor and sprite editor into the same editor, and adding support for the CSE. I don't know how the data is stored in the CSE images, but I assume they're just 5-6-5 16-bit colors? Maybe someone who knows can confirm for me.
One thing that really trips me up in the Sprite Editor is how the "Dim" thing is locked sometimes and it scales weirdly. Also, could you make the binary data editable, like the hex value?

Side note:
Is the hex data for an image arranged in 2 byte segments, like AF or 2C, so like the 2C will span 8 bits of pixels, left to right (and converted to binary, it literally shows which ones are black or white) and the next set of 2 bytes the next one?
Here's a preview of what I've been working on:

(Sorry, big gif.)
Woo, ghost pixels! Very Happy

I take it you are on your little tablet trying to draw on it?
No, it's just hiding the cursor as it's taking the screenshot. The important part is the sprite editor now has plenty of tools in it to make editing easier, and has undo and redo. This is a big step in the way of combining the sprite and image editor in a meaningful way!
Very nice, eager to get my hands on it when you have it available to play with!
  
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
» Goto page Previous  1, 2, 3 ... 6, 7, 8 ... 10, 11, 12  Next
» View previous topic :: View next topic  
Page 7 of 12
» 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

 

Advertisement