:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::
Do you want to advertise at Project Perfect Mod. Find out how to do it HERE.

The time now is Mon Dec 11, 2017 4:10 am
All times are UTC + 0
 Forum index » Featured Tools » CnC Editing Tools
ShpSharp
Moderators: CnC Editing Tools Developpers
Post new topic   Reply to topic Page 1 of 1 [27 Posts] View previous topic :: View next topic
Author Message
Phrohdoh
Soldier


Joined: 12 Feb 2015
Location: Texas, USA

PostPosted: Thu Feb 12, 2015 4:05 pm    Post subject:   ShpSharp Reply with quote

ShpSharp

Hello all, I hope you are having a nice day.

I am posting a WIP tool here in hopes for feedback and possibly some help with development.
In the current state it is purely a palette editor.

Plans:
  * Palette Editor
     * Draw 'selection' rectangle around the currently selected entry (done)
     * Adjusting HSV values for selected index (in progress)
     * Multiple index selection
  * Shp Manipulation
     * Brush tool (1..N px radius)
     * Eraser (set to index 0)
     * Open Palette Editor with the current palette

Building:
Linux & OS X: MonoDevelop/Xamarin Studio (or xbuild)
Windows: Visual Studio Community 2013 (maybe MSBuild)
Note: VS users will need to install the Shared Projects plugin from the visual studio gallery.

License:
ISC License  
Copyright (c) 2015, Taryn Hill <Phrohdoh@gmail.com>

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
The software is provided "as is" and the author disclaims all warranties
with regard to this software including all implied warranties of
merchantability and fitness. In no event shall the author be liable for any
special, direct, indirect, or consequential damages or any damages
whatsoever resulting from loss of use, data or profits, whether in an action
of contract, negligence or other tortious action, arising out of or in
connection with the use or performance of this software.

Any feature request are welcome, though the nonsensical ones will most likely be ignored.
Help with parsing the different SHP formats would be greatly appreciated.
  Note that I do mean help and not doing it for me / throwing a library at it.


Contact Me:
Email: Phrohdoh@gmail.com (I rarely remember to check email)
IRC: irc.freenode.net at #orcaware


You may also find this post on SleipnirStuff

Binaries:
I have attached a zip containing all that should be needed for Linux and Windows, if something does not work please inform me.

Screenshots:




Most recent attachment update: Feb. 25, 2015 - 09:03pm GMT-6


packaged.zip
 Description:
Linux will need to launch via console: `mono --debug ShpSharp.exe`

Download
 Filename:  packaged.zip
 Filesize:  757.94 KB
 Downloaded:  46 Time(s)


Last edited by Phrohdoh on Thu Feb 26, 2015 3:04 am; edited 18 times in total

Back to top
View user's profile Send private message
E1 Elite
Laser Commando


Joined: 28 May 2013

PostPosted: Thu Feb 12, 2015 4:33 pm    Post subject: Reply with quote

Is it for C&C palette that is used in TS/RA2 games etc. or generic like Jasc palette or color table in
indexed images? Same question on shp, whether it is related to these games?

Are you aware of OS Palette Editor available on main PPM page?

Back to top
View user's profile Send private message
Glukv48
Cyborg Firebomber


Joined: 11 Nov 2012
Location: Russia, Krasnodar.

PostPosted: Thu Feb 12, 2015 4:50 pm    Post subject: Reply with quote

It would be better if you gave binaries for Windows, because compiling the source code is not available to all, just as it takes more time.

Back to top
View user's profile Send private message
Phrohdoh
Soldier


Joined: 12 Feb 2015
Location: Texas, USA

PostPosted: Thu Feb 12, 2015 4:51 pm    Post subject: Reply with quote

Yes I am aware of the OS Palette Editor, but it is built for Windows only while this tools is built on top of .NET/Mono which allows usage in Windows, Linux, and OS X.

This is for C&C palettes (td, ra, ts, ra2), the SHPs will eventually be for all games also, but currently I am working on parsing TS/RA2 SHPs.

@Glukv48: I am actually working on that right now.

Back to top
View user's profile Send private message
Glukv48
Cyborg Firebomber


Joined: 11 Nov 2012
Location: Russia, Krasnodar.

PostPosted: Thu Feb 12, 2015 4:54 pm    Post subject: Reply with quote

Phrohdoh wrote:
Yes I am aware of the OS Palette Editor, but it is built for Windows only while this tools is built on top of .NET/Mono which allows usage in Windows, Linux, and OS X.


I am sure that OS Palette Editor works fine under WINE. However, I think that the implementation of a .NET should be better. So good luck.

Back to top
View user's profile Send private message
Phrohdoh
Soldier


Joined: 12 Feb 2015
Location: Texas, USA

PostPosted: Thu Feb 12, 2015 5:37 pm    Post subject: Reply with quote

@Glukv48: Please find attached a zip containing the necessary binaries for running this application.

Mind you the archive is something I just threw together as I'm quite busy atm, so let me know if something is bogus!

Back to top
View user's profile Send private message
Glukv48
Cyborg Firebomber


Joined: 11 Nov 2012
Location: Russia, Krasnodar.

PostPosted: Thu Feb 12, 2015 5:59 pm    Post subject: Reply with quote

He will not start.

Problem Event Name: CLR20r3
Problem signature 01: ShpSharp.exe
Problem signature 02: 1.0.5521.20786
Problem signature 03: 54dce3c5
Problem signature 04: ShpSharp.Desktop
Problem signature 05: 1.0.5521.20786
Problem signature 06: 54dce3c5
Problem signature 07: a
Problem signature 08: 34
Problem signature 09: System.IO.FileNotFoundException
OS Version: 6.1.7601.2.1.0.256.1
More information 1: 0a9e
More information 2: 0a9e372d3b4ad19135b953a78882e789
More information 3: 0a9e
More information 4: 0a9e372d3b4ad19135b953a78882e789

Back to top
View user's profile Send private message
Phrohdoh
Soldier


Joined: 12 Feb 2015
Location: Texas, USA

PostPosted: Thu Feb 12, 2015 6:02 pm    Post subject: Reply with quote

Yep I am silly and forgot a DLL, thanks for testing it!
This is why I made the post to begin with. Smile
Updated with the Gen2Shp files (which means there is bogus code there, so just use the Palette Editor).

Back to top
View user's profile Send private message
Glukv48
Cyborg Firebomber


Joined: 11 Nov 2012
Location: Russia, Krasnodar.

PostPosted: Thu Feb 12, 2015 6:07 pm    Post subject: Reply with quote

Yes. Now it works.

Back to top
View user's profile Send private message
Phrohdoh
Soldier


Joined: 12 Feb 2015
Location: Texas, USA

PostPosted: Thu Feb 12, 2015 6:14 pm    Post subject: Reply with quote

Great!

I have added screenshots to the original post.

Back to top
View user's profile Send private message
President Spencer
Guest




PostPosted: Thu Feb 12, 2015 7:12 pm    Post subject: Reply with quote

I'm hoping that the SHP editor you are working will be a better alternative for the OS SHP, since the OS SHP is so buggy and very time consuming.

Back to top
Parasite03
Cyborg Artillery


Joined: 23 Jul 2013
Location: Russia

PostPosted: Thu Feb 12, 2015 7:22 pm    Post subject: Reply with quote

It'd be good to get the SHP editor to at lest Paint.NET quality.
_________________
DarkVen9109 wrote:
What in the name of insanity is this? I FRICKING LOVE THIS LOGICCCC!!!!!!!!!!!!OOOOOOOOHEEAWWWWWWWWWWWYAAAAAAAAAAAAAAAAAWWWWWW PEW PEW PEW PEW BOOM BOOM BOOM!! Nice I love this!!!! Ferriswheel bomb, Dive bomb. New Logic discovered thanks to Kenosis Very Happy

_________________

Back to top
View user's profile Send private message
Phrohdoh
Soldier


Joined: 12 Feb 2015
Location: Texas, USA

PostPosted: Thu Feb 12, 2015 7:27 pm    Post subject: Reply with quote

I have updated the attached `package.zip` version.

Please try to open a TS/RA2 shp from the main form.

Let me know if it works out for you... you'll know if it does Wink

P.S. Some TS/RA2 shps are actually gen1 which will cause this to crash as I don't parse those yet.

Back to top
View user's profile Send private message
E1 Elite
Laser Commando


Joined: 28 May 2013

PostPosted: Thu Feb 12, 2015 7:34 pm    Post subject: Reply with quote

It opens, but is not visible. If I resize the window, I can see the image flickering.

Back to top
View user's profile Send private message
Phrohdoh
Soldier


Joined: 12 Feb 2015
Location: Texas, USA

PostPosted: Thu Feb 12, 2015 7:37 pm    Post subject: Now includes TS' e1.shp and unittem.pal Reply with quote

@E1 Elite: Could you post a screenshot of what you mean? ATM the actual pixel data is not drawn, just the appropriate bounds.

// end edit

There is a known bug in Windows caused by trying to open the Palette Editor after you have previously closed another instance of it.

This is caused by WinForms and I have not been able to fix it yet.
Any pointers are welcomed.

The (new) packaged attached to this post contains e1.shp and unittem.pal from TS.
Feel free to play around what little bit you can and post your bountiful crashes!


packaged.zip
 Description:

Download
 Filename:  packaged.zip
 Filesize:  712.18 KB
 Downloaded:  11 Time(s)


Back to top
View user's profile Send private message
E1 Elite
Laser Commando


Joined: 28 May 2013

PostPosted: Thu Feb 12, 2015 7:50 pm    Post subject: Reply with quote

Shp loads, but it is blank white. When resizing window, I can see red rectangle with blue rectangle inside
for fraction of a second. Screenshots come blank white, no use.

Back to top
View user's profile Send private message
Matthias M.
Jumpjet Infantry


Joined: 15 Jun 2012
Location: Germany

PostPosted: Thu Feb 12, 2015 8:46 pm    Post subject: Reply with quote

A http://www.getpaint.net/ or http://pinta-project.com/ plugin to edit PAL and SHP files might make more sense than trying to write a whole new image editor from scratch.

Back to top
View user's profile Send private message Visit poster's website
Phrohdoh
Soldier


Joined: 12 Feb 2015
Location: Texas, USA

PostPosted: Thu Feb 12, 2015 8:50 pm    Post subject: Reply with quote

If that were my goal it would definitely make more sense.

Back to top
View user's profile Send private message
Glukv48
Cyborg Firebomber


Joined: 11 Nov 2012
Location: Russia, Krasnodar.

PostPosted: Thu Feb 12, 2015 9:07 pm    Post subject: Reply with quote

Parasite03 wrote:
It'd be good to get the SHP editor to at lest Paint.NET quality.


What for? I believe that SHP editor should only be able to convert SHP files, have simple drawing elements (minimum set, no more than a classic Paint), as well as to be able to change the index palette and change the sequence of frames. I do not see the need for greater functionality.

Back to top
View user's profile Send private message
Phrohdoh
Soldier


Joined: 12 Feb 2015
Location: Texas, USA

PostPosted: Thu Feb 12, 2015 10:26 pm    Post subject: Reply with quote

I have (unfortunately) discovered that the drawing issue is most likely an issue that only exist on Windows and I haven't the slightest clue on how to solve it.

The code for drawing to the canvas on the ShpEditor form is here, if you see something suspicious please let me know.

In other news I have added a frame ticker so you can increment or decrement the currently visible frame (or enter an integer directly).



Updated build! (see OP, I learned how to update uploaded files instead of needing to repost)

Back to top
View user's profile Send private message
Phrohdoh
Soldier


Joined: 12 Feb 2015
Location: Texas, USA

PostPosted: Mon Feb 16, 2015 6:48 pm    Post subject: Reply with quote

Small update to the main form.

Some frames are still bogus for some reason (offset is wrong maybe).



// edit:

Updated the build in the OP.
Feel free to check it out and report some errors.

Thanks!

Last edited by Phrohdoh on Mon Feb 16, 2015 7:23 pm; edited 1 time in total

Back to top
View user's profile Send private message
Zero18
Commander


Joined: 10 Dec 2012
Location: I'm too busy conquering the world!

PostPosted: Mon Feb 16, 2015 6:53 pm    Post subject: Reply with quote

Ah, I like the new palette borders. Much easier to see and to select now. Keep it coming!
_________________
Mod Leader and founder of World Domination


Back to top
View user's profile Send private message
Parasite03
Cyborg Artillery


Joined: 23 Jul 2013
Location: Russia

PostPosted: Mon Feb 16, 2015 10:14 pm    Post subject: Reply with quote

Glukv48 wrote:
Parasite03 wrote:
It'd be good to get the SHP editor to at lest Paint.NET quality.


What for? I believe that SHP editor should only be able to convert SHP files, have simple drawing elements (minimum set, no more than a classic Paint), as well as to be able to change the index palette and change the sequence of frames. I do not see the need for greater functionality.


I don't agree. The editor should not be worse than something simple but yet useful. Paint is junk. Being as useful at drawing as Paint would kinda suck.
_________________
DarkVen9109 wrote:
What in the name of insanity is this? I FRICKING LOVE THIS LOGICCCC!!!!!!!!!!!!OOOOOOOOHEEAWWWWWWWWWWWYAAAAAAAAAAAAAAAAAWWWWWW PEW PEW PEW PEW BOOM BOOM BOOM!! Nice I love this!!!! Ferriswheel bomb, Dive bomb. New Logic discovered thanks to Kenosis Very Happy

_________________

Back to top
View user's profile Send private message
Glukv48
Cyborg Firebomber


Joined: 11 Nov 2012
Location: Russia, Krasnodar.

PostPosted: Mon Feb 16, 2015 10:29 pm    Post subject: Reply with quote

Parasite03 wrote:
Glukv48 wrote:
Parasite03 wrote:
It'd be good to get the SHP editor to at lest Paint.NET quality.


What for? I believe that SHP editor should only be able to convert SHP files, have simple drawing elements (minimum set, no more than a classic Paint), as well as to be able to change the index palette and change the sequence of frames. I do not see the need for greater functionality.


I don't agree. The editor should not be worse than something simple but yet useful. Paint is junk. Being as useful at drawing as Paint would kinda suck.

I think there should be only conversion tools + tools eliminate incorrect pixels. Use any other advanced editor for creating graphics.

Back to top
View user's profile Send private message
Phrohdoh
Soldier


Joined: 12 Feb 2015
Location: Texas, USA

PostPosted: Mon Feb 16, 2015 10:41 pm    Post subject: Reply with quote

Updated the packaged build again.

Note that you have to open a palette before opening a SHP file to prevent a crash.

Working on fixing that (and something new) right now.

// edit
Oh and if you click on the palette living on the ShpEditor form you will get a crash.
I can fix that one later tonight.
(fixed)

Back to top
View user's profile Send private message
Phrohdoh
Soldier


Joined: 12 Feb 2015
Location: Texas, USA

PostPosted: Thu Feb 26, 2015 3:02 am    Post subject: Reply with quote

Updated some internals and fixed a tiny error in the ShpGen2 parser.

Back to top
View user's profile Send private message
Phrohdoh
Soldier


Joined: 12 Feb 2015
Location: Texas, USA

PostPosted: Tue Apr 14, 2015 12:06 am    Post subject: Reply with quote

I'm sorry to drop a dead tool on the community, but I don't much have the desire to work on anything C&C related recently.

It has been a large part of my life so far but life changes and I don't have the time anymore. Hopefully I can find time to visit and possibly return in the future.

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [27 Posts] View previous topic :: View next topic
 Forum index » Featured Tools » CnC Editing Tools
Jump to:  
Quick Reply
Username:


If you are visually impaired or cannot otherwise play the game below please contact the Administrator for help.


 
You can post new topics in this forum
You can 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 attach files in this forum
You can download files in this forum


Powered by phpBB © phpBB Group

Wildcard SSL Certificates
[ Time: 0.1494s ][ Queries: 13 (0.0175s) ][ Debug on ]