Advertisement

Invaluable Tools you have found?

Started by July 02, 2014 12:45 PM
9 comments, last by Icebone1000 10 years, 2 months ago

Sometimes you stumble over a tool or software that just helps so much in development and makes things so much easier. There is so many out there though so it is easy to miss something. Have you guys found some that you just can't see you could live without or that just makes the job much easier?

I think my pick would be Pyxel Edit for making easy tilesets and pixel graphics for games, you can even use it as a level editor and import it to your game directly, adjusting the graphics if you need and building the levels at the same time: http://pyxeledit.com/

OpenAmeos UML Tool.

Is some old but in wide ranges customizable. I wrote code generators and do not use an editor, except the buildin, to create code and makefiles and such things.

Advertisement

sfxr to create 8bit sound effects in a second.

Fruny: Ftagn! Ia! Ia! std::time_put_byname! Mglui naflftagn std::codecvt eY'ha-nthlei!,char,mbstate_t>

I like Cosmigo ProMotion for sprite art.

Free and Open Source Software also provides a wealth of alternatives to paid software -- GIMP instead of Photoshop, InkScape instead of Illustrator, Blender instead of Max or Maya, Git instead of, say, perforce. Vim or Emacs (if you're so inclined), instead of other paid options.

And now for some things off the beaten trail for most...

In general, many of the simple command-line tools that come in a typical *nix environment are great if you learn how to use them, and use them together, especially combined with shell scripts. Complex processing of text and images are usually just a few lines of bash away.

XML (poorly used) often gets a bad wrap, but done well its increadibly useful on the developer-facing side of your build system, and the wealth of tools in its ecosystem -- XSD, XPath, XSLT -- are powerful. It behooves you to know a least a little about those tools if you work with XML in any way.

I'm also leaning more and more these days towards service-oriented developer tooling. HTTP/REST services are an excellent way to build, make available, and scale components of your build pipeline, and you can still rather easily provide command-line clients to make those services available there.

I guess, in short, the longer you've been developing the more you'll notice that there are useful tools everywhere. One can hardly spend a day doing anything without finding something new to make a mental note of. Programmers are fundamentally lazy, and lazy people make the best tools.

throw table_exception("(? ???)? ? ???");

Not a tool, but a handy little trick that not everyone may be aware of.

In Windows, do the following:

Click on Start, type "shell:sendto" (without quotes), press Return.

Create a new shortcut to C:\Windows\System32\Notepad.exe

You can now right-click on any file and do Send to... Notepad, for quick viewing and basic editing. Yes, other text editors are fancier, but Notepad loads in an instant.

You can also add shortcuts to other editing programs or whatever you like in there.

I use this every day and it's almost the first customization I do on any new machine.

Direct3D has need of instancing, but we do not. We have plenty of glVertexAttrib calls.


Click on Start, type "shell:sendto" (without quotes), press Return.

Create a new shortcut to C:\Windows\System32\Notepad.exe

I've done exactly that, only for my hex editor, HxD. I use Notepad++, which gives me a Context menu 'Edit with Notepad++' already.

Advertisement


Click on Start, type "shell:sendto" (without quotes), press Return.

Create a new shortcut to C:\Windows\System32\Notepad.exe

I've done exactly that, only for my hex editor, HxD. I use Notepad++, which gives me a Context menu 'Edit with Notepad++' already.

That's equally valid, yes. Where I tend to use it most often is on servers (and I work a lot on servers) where being able to quickly open any file type (even files without an extension) from a context menu is very damn useful, and where one generally doesn't install any additional software. On a desktop a Notepad replacement makes sense.

Direct3D has need of instancing, but we do not. We have plenty of glVertexAttrib calls.

MHS.
This isn’t a plug; it literally is the most useful non-standard tool I use while programming, thanks to its script feature and hotkeys.

When I want to make a new class I hit Ctrl-1 and type the name of the class and the macro guard name and it spits out the whole class template, complete with namespace, comment header/copyright, class body, constructor/destructor, public and protected sections, etc.

Ctrl-3 to create a Doxygen comment for a method or member.


		/**
		 * DESCRIPTION
		 *
		 * \param PARM DESC
		 * \param PARM DESC
		 * \return RETURN
		 */
I Ctrl-Click the capital words to fully select them and fill them appropriately.

I set a hotkey on Ctrl-8 and wrote a script to add static_cast<TYPE>() around variables for me (where TYPE is replaced with whatever I have in the clipboard, and the parentheses are surrounding the thing that needs to be cast).



Spitting out predefined text is not its only use.
I often use it to generate tables, such as this one which parameterizes a template function and makes a function-pointer table for some texel-converting routine for images:
	LSE_INLINE const LSUINT32 LSE_FCALL	CImageLib::ConvComponent( LSI_PIXEL_FORMAT _pfSrcFormat, LSI_PIXEL_FORMAT _pfDstFormat,
		LSI_PIXEL_COMPONENTS _ppComp, LSUINT32 _ui32Component ) {
		typedef LSUINT32 (LSE_FCALL * PfConverterFunc)( LSUINT32 _ui32Src );
		static const PfConverterFunc pfTable[LSI_PF_TOTAL_INT][LSI_PF_TOTAL_INT][4] = {
			{	// LSI_PF_A8
				{	// LSI_PF_A8 -> LSI_PF_A8
					CImageLib::ConvComp<0, 0, false>,	// LSI_PP_R
					CImageLib::ConvComp<0, 0, false>,	// LSI_PP_G
					CImageLib::ConvComp<0, 0, false>,	// LSI_PP_B
					CImageLib::ConvComp<8, 8, true>,	// LSI_PP_A
				},
				{	// LSI_PF_A8 -> LSI_PF_R3G3B2
					CImageLib::ConvComp<0, 3, false>,	// LSI_PP_R
					CImageLib::ConvComp<0, 3, false>,	// LSI_PP_G
					CImageLib::ConvComp<0, 2, false>,	// LSI_PP_B
					CImageLib::ConvComp<8, 0, true>,	// LSI_PP_A
				},
				{	// LSI_PF_A8 -> LSI_PF_R5G6B5
					CImageLib::ConvComp<0, 5, false>,	// LSI_PP_R
					CImageLib::ConvComp<0, 6, false>,	// LSI_PP_G
					CImageLib::ConvComp<0, 5, false>,	// LSI_PP_B
					CImageLib::ConvComp<8, 0, true>,	// LSI_PP_A
				},
				{	// LSI_PF_A8 -> LSI_PF_R4G4B4A4
					CImageLib::ConvComp<0, 4, false>,	// LSI_PP_R
					CImageLib::ConvComp<0, 4, false>,	// LSI_PP_G
					CImageLib::ConvComp<0, 4, false>,	// LSI_PP_B
					CImageLib::ConvComp<8, 4, true>,	// LSI_PP_A
				},
				{	// LSI_PF_A8 -> LSI_PF_R5G5B5A1
					CImageLib::ConvComp<0, 5, false>,	// LSI_PP_R
					CImageLib::ConvComp<0, 5, false>,	// LSI_PP_G
					CImageLib::ConvComp<0, 5, false>,	// LSI_PP_B
					CImageLib::ConvComp<8, 1, true>,	// LSI_PP_A
				},
				{	// LSI_PF_A8 -> LSI_PF_R8G8B8
					CImageLib::ConvComp<0, 8, false>,	// LSI_PP_R
					CImageLib::ConvComp<0, 8, false>,	// LSI_PP_G
					CImageLib::ConvComp<0, 8, false>,	// LSI_PP_B
					CImageLib::ConvComp<8, 0, true>,	// LSI_PP_A
				},
				{	// LSI_PF_A8 -> LSI_PF_R8G8B8A8
					CImageLib::ConvComp<0, 8, false>,	// LSI_PP_R
					CImageLib::ConvComp<0, 8, false>,	// LSI_PP_G
					CImageLib::ConvComp<0, 8, false>,	// LSI_PP_B
					CImageLib::ConvComp<8, 8, true>,	// LSI_PP_A
				},
				{	// LSI_PF_A8 -> LSI_PF_R16G16B16A16
					CImageLib::ConvComp<0, 16, false>,	// LSI_PP_R
					CImageLib::ConvComp<0, 16, false>,	// LSI_PP_G
					CImageLib::ConvComp<0, 16, false>,	// LSI_PP_B
					CImageLib::ConvComp<8, 16, true>,	// LSI_PP_A
				},
			},
			{	// LSI_PF_R3G3B2
				{	// LSI_PF_R3G3B2 -> LSI_PF_A8
					CImageLib::ConvComp<3, 0, false>,	// LSI_PP_R
					CImageLib::ConvComp<3, 0, false>,	// LSI_PP_G
					CImageLib::ConvComp<2, 0, false>,	// LSI_PP_B
					CImageLib::ConvComp<0, 8, true>,	// LSI_PP_A
				},
				{	// LSI_PF_R3G3B2 -> LSI_PF_R3G3B2
					CImageLib::ConvComp<3, 3, false>,	// LSI_PP_R
					CImageLib::ConvComp<3, 3, false>,	// LSI_PP_G
					CImageLib::ConvComp<2, 2, false>,	// LSI_PP_B
					CImageLib::ConvComp<0, 0, true>,	// LSI_PP_A
				},
				{	// LSI_PF_R3G3B2 -> LSI_PF_R5G6B5
					CImageLib::ConvComp<3, 5, false>,	// LSI_PP_R
					CImageLib::ConvComp<3, 6, false>,	// LSI_PP_G
					CImageLib::ConvComp<2, 5, false>,	// LSI_PP_B
					CImageLib::ConvComp<0, 0, true>,	// LSI_PP_A
				},
				{	// LSI_PF_R3G3B2 -> LSI_PF_R4G4B4A4
					CImageLib::ConvComp<3, 4, false>,	// LSI_PP_R
					CImageLib::ConvComp<3, 4, false>,	// LSI_PP_G
					CImageLib::ConvComp<2, 4, false>,	// LSI_PP_B
					CImageLib::ConvComp<0, 4, true>,	// LSI_PP_A
				},
				{	// LSI_PF_R3G3B2 -> LSI_PF_R5G5B5A1
					CImageLib::ConvComp<3, 5, false>,	// LSI_PP_R
					CImageLib::ConvComp<3, 5, false>,	// LSI_PP_G
					CImageLib::ConvComp<2, 5, false>,	// LSI_PP_B
					CImageLib::ConvComp<0, 1, true>,	// LSI_PP_A
				},
				{	// LSI_PF_R3G3B2 -> LSI_PF_R8G8B8
					CImageLib::ConvComp<3, 8, false>,	// LSI_PP_R
					CImageLib::ConvComp<3, 8, false>,	// LSI_PP_G
					CImageLib::ConvComp<2, 8, false>,	// LSI_PP_B
					CImageLib::ConvComp<0, 0, true>,	// LSI_PP_A
				},
				{	// LSI_PF_R3G3B2 -> LSI_PF_R8G8B8A8
					CImageLib::ConvComp<3, 8, false>,	// LSI_PP_R
					CImageLib::ConvComp<3, 8, false>,	// LSI_PP_G
					CImageLib::ConvComp<2, 8, false>,	// LSI_PP_B
					CImageLib::ConvComp<0, 8, true>,	// LSI_PP_A
				},
				{	// LSI_PF_R3G3B2 -> LSI_PF_R16G16B16A16
					CImageLib::ConvComp<3, 16, false>,	// LSI_PP_R
					CImageLib::ConvComp<3, 16, false>,	// LSI_PP_G
					CImageLib::ConvComp<2, 16, false>,	// LSI_PP_B
					CImageLib::ConvComp<0, 16, true>,	// LSI_PP_A
				},
			},
			{	// LSI_PF_R5G6B5
				{	// LSI_PF_R5G6B5 -> LSI_PF_A8
					CImageLib::ConvComp<5, 0, false>,	// LSI_PP_R
					CImageLib::ConvComp<6, 0, false>,	// LSI_PP_G
					CImageLib::ConvComp<5, 0, false>,	// LSI_PP_B
					CImageLib::ConvComp<0, 8, true>,	// LSI_PP_A
				},
				{	// LSI_PF_R5G6B5 -> LSI_PF_R3G3B2
					CImageLib::ConvComp<5, 3, false>,	// LSI_PP_R
					CImageLib::ConvComp<6, 3, false>,	// LSI_PP_G
					CImageLib::ConvComp<5, 2, false>,	// LSI_PP_B
					CImageLib::ConvComp<0, 0, true>,	// LSI_PP_A
				},
				{	// LSI_PF_R5G6B5 -> LSI_PF_R5G6B5
					CImageLib::ConvComp<5, 5, false>,	// LSI_PP_R
					CImageLib::ConvComp<6, 6, false>,	// LSI_PP_G
					CImageLib::ConvComp<5, 5, false>,	// LSI_PP_B
					CImageLib::ConvComp<0, 0, true>,	// LSI_PP_A
				},
				{	// LSI_PF_R5G6B5 -> LSI_PF_R4G4B4A4
					CImageLib::ConvComp<5, 4, false>,	// LSI_PP_R
					CImageLib::ConvComp<6, 4, false>,	// LSI_PP_G
					CImageLib::ConvComp<5, 4, false>,	// LSI_PP_B
					CImageLib::ConvComp<0, 4, true>,	// LSI_PP_A
				},
				{	// LSI_PF_R5G6B5 -> LSI_PF_R5G5B5A1
					CImageLib::ConvComp<5, 5, false>,	// LSI_PP_R
					CImageLib::ConvComp<6, 5, false>,	// LSI_PP_G
					CImageLib::ConvComp<5, 5, false>,	// LSI_PP_B
					CImageLib::ConvComp<0, 1, true>,	// LSI_PP_A
				},
				{	// LSI_PF_R5G6B5 -> LSI_PF_R8G8B8
					CImageLib::ConvComp<5, 8, false>,	// LSI_PP_R
					CImageLib::ConvComp<6, 8, false>,	// LSI_PP_G
					CImageLib::ConvComp<5, 8, false>,	// LSI_PP_B
					CImageLib::ConvComp<0, 0, true>,	// LSI_PP_A
				},
				{	// LSI_PF_R5G6B5 -> LSI_PF_R8G8B8A8
					CImageLib::ConvComp<5, 8, false>,	// LSI_PP_R
					CImageLib::ConvComp<6, 8, false>,	// LSI_PP_G
					CImageLib::ConvComp<5, 8, false>,	// LSI_PP_B
					CImageLib::ConvComp<0, 8, true>,	// LSI_PP_A
				},
				{	// LSI_PF_R5G6B5 -> LSI_PF_R16G16B16A16
					CImageLib::ConvComp<5, 16, false>,	// LSI_PP_R
					CImageLib::ConvComp<6, 16, false>,	// LSI_PP_G
					CImageLib::ConvComp<5, 16, false>,	// LSI_PP_B
					CImageLib::ConvComp<0, 16, true>,	// LSI_PP_A
				},
			},
			{	// LSI_PF_R4G4B4A4
				{	// LSI_PF_R4G4B4A4 -> LSI_PF_A8
					CImageLib::ConvComp<4, 0, false>,	// LSI_PP_R
					CImageLib::ConvComp<4, 0, false>,	// LSI_PP_G
					CImageLib::ConvComp<4, 0, false>,	// LSI_PP_B
					CImageLib::ConvComp<4, 8, true>,	// LSI_PP_A
				},
				{	// LSI_PF_R4G4B4A4 -> LSI_PF_R3G3B2
					CImageLib::ConvComp<4, 3, false>,	// LSI_PP_R
					CImageLib::ConvComp<4, 3, false>,	// LSI_PP_G
					CImageLib::ConvComp<4, 2, false>,	// LSI_PP_B
					CImageLib::ConvComp<4, 0, true>,	// LSI_PP_A
				},
				{	// LSI_PF_R4G4B4A4 -> LSI_PF_R5G6B5
					CImageLib::ConvComp<4, 5, false>,	// LSI_PP_R
					CImageLib::ConvComp<4, 6, false>,	// LSI_PP_G
					CImageLib::ConvComp<4, 5, false>,	// LSI_PP_B
					CImageLib::ConvComp<4, 0, true>,	// LSI_PP_A
				},
				{	// LSI_PF_R4G4B4A4 -> LSI_PF_R4G4B4A4
					CImageLib::ConvComp<4, 4, false>,	// LSI_PP_R
					CImageLib::ConvComp<4, 4, false>,	// LSI_PP_G
					CImageLib::ConvComp<4, 4, false>,	// LSI_PP_B
					CImageLib::ConvComp<4, 4, true>,	// LSI_PP_A
				},
				{	// LSI_PF_R4G4B4A4 -> LSI_PF_R5G5B5A1
					CImageLib::ConvComp<4, 5, false>,	// LSI_PP_R
					CImageLib::ConvComp<4, 5, false>,	// LSI_PP_G
					CImageLib::ConvComp<4, 5, false>,	// LSI_PP_B
					CImageLib::ConvComp<4, 1, true>,	// LSI_PP_A
				},
				{	// LSI_PF_R4G4B4A4 -> LSI_PF_R8G8B8
					CImageLib::ConvComp<4, 8, false>,	// LSI_PP_R
					CImageLib::ConvComp<4, 8, false>,	// LSI_PP_G
					CImageLib::ConvComp<4, 8, false>,	// LSI_PP_B
					CImageLib::ConvComp<4, 0, true>,	// LSI_PP_A
				},
				{	// LSI_PF_R4G4B4A4 -> LSI_PF_R8G8B8A8
					CImageLib::ConvComp<4, 8, false>,	// LSI_PP_R
					CImageLib::ConvComp<4, 8, false>,	// LSI_PP_G
					CImageLib::ConvComp<4, 8, false>,	// LSI_PP_B
					CImageLib::ConvComp<4, 8, true>,	// LSI_PP_A
				},
				{	// LSI_PF_R4G4B4A4 -> LSI_PF_R16G16B16A16
					CImageLib::ConvComp<4, 16, false>,	// LSI_PP_R
					CImageLib::ConvComp<4, 16, false>,	// LSI_PP_G
					CImageLib::ConvComp<4, 16, false>,	// LSI_PP_B
					CImageLib::ConvComp<4, 16, true>,	// LSI_PP_A
				},
			},
			{	// LSI_PF_R5G5B5A1
				{	// LSI_PF_R5G5B5A1 -> LSI_PF_A8
					CImageLib::ConvComp<5, 0, false>,	// LSI_PP_R
					CImageLib::ConvComp<5, 0, false>,	// LSI_PP_G
					CImageLib::ConvComp<5, 0, false>,	// LSI_PP_B
					CImageLib::ConvComp<1, 8, true>,	// LSI_PP_A
				},
				{	// LSI_PF_R5G5B5A1 -> LSI_PF_R3G3B2
					CImageLib::ConvComp<5, 3, false>,	// LSI_PP_R
					CImageLib::ConvComp<5, 3, false>,	// LSI_PP_G
					CImageLib::ConvComp<5, 2, false>,	// LSI_PP_B
					CImageLib::ConvComp<1, 0, true>,	// LSI_PP_A
				},
				{	// LSI_PF_R5G5B5A1 -> LSI_PF_R5G6B5
					CImageLib::ConvComp<5, 5, false>,	// LSI_PP_R
					CImageLib::ConvComp<5, 6, false>,	// LSI_PP_G
					CImageLib::ConvComp<5, 5, false>,	// LSI_PP_B
					CImageLib::ConvComp<1, 0, true>,	// LSI_PP_A
				},
				{	// LSI_PF_R5G5B5A1 -> LSI_PF_R4G4B4A4
					CImageLib::ConvComp<5, 4, false>,	// LSI_PP_R
					CImageLib::ConvComp<5, 4, false>,	// LSI_PP_G
					CImageLib::ConvComp<5, 4, false>,	// LSI_PP_B
					CImageLib::ConvComp<1, 4, true>,	// LSI_PP_A
				},
				{	// LSI_PF_R5G5B5A1 -> LSI_PF_R5G5B5A1
					CImageLib::ConvComp<5, 5, false>,	// LSI_PP_R
					CImageLib::ConvComp<5, 5, false>,	// LSI_PP_G
					CImageLib::ConvComp<5, 5, false>,	// LSI_PP_B
					CImageLib::ConvComp<1, 1, true>,	// LSI_PP_A
				},
				{	// LSI_PF_R5G5B5A1 -> LSI_PF_R8G8B8
					CImageLib::ConvComp<5, 8, false>,	// LSI_PP_R
					CImageLib::ConvComp<5, 8, false>,	// LSI_PP_G
					CImageLib::ConvComp<5, 8, false>,	// LSI_PP_B
					CImageLib::ConvComp<1, 0, true>,	// LSI_PP_A
				},
				{	// LSI_PF_R5G5B5A1 -> LSI_PF_R8G8B8A8
					CImageLib::ConvComp<5, 8, false>,	// LSI_PP_R
					CImageLib::ConvComp<5, 8, false>,	// LSI_PP_G
					CImageLib::ConvComp<5, 8, false>,	// LSI_PP_B
					CImageLib::ConvComp<1, 8, true>,	// LSI_PP_A
				},
				{	// LSI_PF_R5G5B5A1 -> LSI_PF_R16G16B16A16
					CImageLib::ConvComp<5, 16, false>,	// LSI_PP_R
					CImageLib::ConvComp<5, 16, false>,	// LSI_PP_G
					CImageLib::ConvComp<5, 16, false>,	// LSI_PP_B
					CImageLib::ConvComp<1, 16, true>,	// LSI_PP_A
				},
			},
			{	// LSI_PF_R8G8B8
				{	// LSI_PF_R8G8B8 -> LSI_PF_A8
					CImageLib::ConvComp<8, 0, false>,	// LSI_PP_R
					CImageLib::ConvComp<8, 0, false>,	// LSI_PP_G
					CImageLib::ConvComp<8, 0, false>,	// LSI_PP_B
					CImageLib::ConvComp<0, 8, true>,	// LSI_PP_A
				},
				{	// LSI_PF_R8G8B8 -> LSI_PF_R3G3B2
					CImageLib::ConvComp<8, 3, false>,	// LSI_PP_R
					CImageLib::ConvComp<8, 3, false>,	// LSI_PP_G
					CImageLib::ConvComp<8, 2, false>,	// LSI_PP_B
					CImageLib::ConvComp<0, 0, true>,	// LSI_PP_A
				},
				{	// LSI_PF_R8G8B8 -> LSI_PF_R5G6B5
					CImageLib::ConvComp<8, 5, false>,	// LSI_PP_R
					CImageLib::ConvComp<8, 6, false>,	// LSI_PP_G
					CImageLib::ConvComp<8, 5, false>,	// LSI_PP_B
					CImageLib::ConvComp<0, 0, true>,	// LSI_PP_A
				},
				{	// LSI_PF_R8G8B8 -> LSI_PF_R4G4B4A4
					CImageLib::ConvComp<8, 4, false>,	// LSI_PP_R
					CImageLib::ConvComp<8, 4, false>,	// LSI_PP_G
					CImageLib::ConvComp<8, 4, false>,	// LSI_PP_B
					CImageLib::ConvComp<0, 4, true>,	// LSI_PP_A
				},
				{	// LSI_PF_R8G8B8 -> LSI_PF_R5G5B5A1
					CImageLib::ConvComp<8, 5, false>,	// LSI_PP_R
					CImageLib::ConvComp<8, 5, false>,	// LSI_PP_G
					CImageLib::ConvComp<8, 5, false>,	// LSI_PP_B
					CImageLib::ConvComp<0, 1, true>,	// LSI_PP_A
				},
				{	// LSI_PF_R8G8B8 -> LSI_PF_R8G8B8
					CImageLib::ConvComp<8, 8, false>,	// LSI_PP_R
					CImageLib::ConvComp<8, 8, false>,	// LSI_PP_G
					CImageLib::ConvComp<8, 8, false>,	// LSI_PP_B
					CImageLib::ConvComp<0, 0, true>,	// LSI_PP_A
				},
				{	// LSI_PF_R8G8B8 -> LSI_PF_R8G8B8A8
					CImageLib::ConvComp<8, 8, false>,	// LSI_PP_R
					CImageLib::ConvComp<8, 8, false>,	// LSI_PP_G
					CImageLib::ConvComp<8, 8, false>,	// LSI_PP_B
					CImageLib::ConvComp<0, 8, true>,	// LSI_PP_A
				},
				{	// LSI_PF_R8G8B8 -> LSI_PF_R16G16B16A16
					CImageLib::ConvComp<8, 16, false>,	// LSI_PP_R
					CImageLib::ConvComp<8, 16, false>,	// LSI_PP_G
					CImageLib::ConvComp<8, 16, false>,	// LSI_PP_B
					CImageLib::ConvComp<0, 16, true>,	// LSI_PP_A
				},
			},
			{	// LSI_PF_R8G8B8A8
				{	// LSI_PF_R8G8B8A8 -> LSI_PF_A8
					CImageLib::ConvComp<8, 0, false>,	// LSI_PP_R
					CImageLib::ConvComp<8, 0, false>,	// LSI_PP_G
					CImageLib::ConvComp<8, 0, false>,	// LSI_PP_B
					CImageLib::ConvComp<8, 8, true>,	// LSI_PP_A
				},
				{	// LSI_PF_R8G8B8A8 -> LSI_PF_R3G3B2
					CImageLib::ConvComp<8, 3, false>,	// LSI_PP_R
					CImageLib::ConvComp<8, 3, false>,	// LSI_PP_G
					CImageLib::ConvComp<8, 2, false>,	// LSI_PP_B
					CImageLib::ConvComp<8, 0, true>,	// LSI_PP_A
				},
				{	// LSI_PF_R8G8B8A8 -> LSI_PF_R5G6B5
					CImageLib::ConvComp<8, 5, false>,	// LSI_PP_R
					CImageLib::ConvComp<8, 6, false>,	// LSI_PP_G
					CImageLib::ConvComp<8, 5, false>,	// LSI_PP_B
					CImageLib::ConvComp<8, 0, true>,	// LSI_PP_A
				},
				{	// LSI_PF_R8G8B8A8 -> LSI_PF_R4G4B4A4
					CImageLib::ConvComp<8, 4, false>,	// LSI_PP_R
					CImageLib::ConvComp<8, 4, false>,	// LSI_PP_G
					CImageLib::ConvComp<8, 4, false>,	// LSI_PP_B
					CImageLib::ConvComp<8, 4, true>,	// LSI_PP_A
				},
				{	// LSI_PF_R8G8B8A8 -> LSI_PF_R5G5B5A1
					CImageLib::ConvComp<8, 5, false>,	// LSI_PP_R
					CImageLib::ConvComp<8, 5, false>,	// LSI_PP_G
					CImageLib::ConvComp<8, 5, false>,	// LSI_PP_B
					CImageLib::ConvComp<8, 1, true>,	// LSI_PP_A
				},
				{	// LSI_PF_R8G8B8A8 -> LSI_PF_R8G8B8
					CImageLib::ConvComp<8, 8, false>,	// LSI_PP_R
					CImageLib::ConvComp<8, 8, false>,	// LSI_PP_G
					CImageLib::ConvComp<8, 8, false>,	// LSI_PP_B
					CImageLib::ConvComp<8, 0, true>,	// LSI_PP_A
				},
				{	// LSI_PF_R8G8B8A8 -> LSI_PF_R8G8B8A8
					CImageLib::ConvComp<8, 8, false>,	// LSI_PP_R
					CImageLib::ConvComp<8, 8, false>,	// LSI_PP_G
					CImageLib::ConvComp<8, 8, false>,	// LSI_PP_B
					CImageLib::ConvComp<8, 8, true>,	// LSI_PP_A
				},
				{	// LSI_PF_R8G8B8A8 -> LSI_PF_R16G16B16A16
					CImageLib::ConvComp<8, 16, false>,	// LSI_PP_R
					CImageLib::ConvComp<8, 16, false>,	// LSI_PP_G
					CImageLib::ConvComp<8, 16, false>,	// LSI_PP_B
					CImageLib::ConvComp<8, 16, true>,	// LSI_PP_A
				},
			},
			{	// LSI_PF_R16G16B16A16
				{	// LSI_PF_R16G16B16A16 -> LSI_PF_A8
					CImageLib::ConvComp<16, 0, false>,	// LSI_PP_R
					CImageLib::ConvComp<16, 0, false>,	// LSI_PP_G
					CImageLib::ConvComp<16, 0, false>,	// LSI_PP_B
					CImageLib::ConvComp<16, 8, true>,	// LSI_PP_A
				},
				{	// LSI_PF_R16G16B16A16 -> LSI_PF_R3G3B2
					CImageLib::ConvComp<16, 3, false>,	// LSI_PP_R
					CImageLib::ConvComp<16, 3, false>,	// LSI_PP_G
					CImageLib::ConvComp<16, 2, false>,	// LSI_PP_B
					CImageLib::ConvComp<16, 0, true>,	// LSI_PP_A
				},
				{	// LSI_PF_R16G16B16A16 -> LSI_PF_R5G6B5
					CImageLib::ConvComp<16, 5, false>,	// LSI_PP_R
					CImageLib::ConvComp<16, 6, false>,	// LSI_PP_G
					CImageLib::ConvComp<16, 5, false>,	// LSI_PP_B
					CImageLib::ConvComp<16, 0, true>,	// LSI_PP_A
				},
				{	// LSI_PF_R16G16B16A16 -> LSI_PF_R4G4B4A4
					CImageLib::ConvComp<16, 4, false>,	// LSI_PP_R
					CImageLib::ConvComp<16, 4, false>,	// LSI_PP_G
					CImageLib::ConvComp<16, 4, false>,	// LSI_PP_B
					CImageLib::ConvComp<16, 4, true>,	// LSI_PP_A
				},
				{	// LSI_PF_R16G16B16A16 -> LSI_PF_R5G5B5A1
					CImageLib::ConvComp<16, 5, false>,	// LSI_PP_R
					CImageLib::ConvComp<16, 5, false>,	// LSI_PP_G
					CImageLib::ConvComp<16, 5, false>,	// LSI_PP_B
					CImageLib::ConvComp<16, 1, true>,	// LSI_PP_A
				},
				{	// LSI_PF_R16G16B16A16 -> LSI_PF_R8G8B8
					CImageLib::ConvComp<16, 8, false>,	// LSI_PP_R
					CImageLib::ConvComp<16, 8, false>,	// LSI_PP_G
					CImageLib::ConvComp<16, 8, false>,	// LSI_PP_B
					CImageLib::ConvComp<16, 0, true>,	// LSI_PP_A
				},
				{	// LSI_PF_R16G16B16A16 -> LSI_PF_R8G8B8A8
					CImageLib::ConvComp<16, 8, false>,	// LSI_PP_R
					CImageLib::ConvComp<16, 8, false>,	// LSI_PP_G
					CImageLib::ConvComp<16, 8, false>,	// LSI_PP_B
					CImageLib::ConvComp<16, 8, true>,	// LSI_PP_A
				},
				{	// LSI_PF_R16G16B16A16 -> LSI_PF_R16G16B16A16
					CImageLib::ConvComp<16, 16, false>,	// LSI_PP_R
					CImageLib::ConvComp<16, 16, false>,	// LSI_PP_G
					CImageLib::ConvComp<16, 16, false>,	// LSI_PP_B
					CImageLib::ConvComp<16, 16, true>,	// LSI_PP_A
				},
			},
		};
		return pfTable[_pfSrcFormat][_pfDstFormat][_ppComp]( _ui32Component );
	}
It has an expression evaluator to allow me to type complex C expressions and see their results, such as:
Expression: 1000 / 24.94651031 - 1000 / 37.14330261230
Result: 13.163013

Expression: ((5600000000) + (((1024 * 4) - (5600000000) & ((1024 * 4) - 1)) & ((1024 * 4) - 1)))
Result: 5600002048 (14DC94000)


It has a useful data converter (here are all the values for 2047.999f reinterpreted as different types):
[attachment=22467:Converter.png]


Mainly, its scripts are useful for anything of which you can think. You can write any type of script you want (the script language is L. Spiro C) to generate any type of data you want or to perform find/replace operations (useful for porting), run simulations and check results, etc.
For example, in a physics simulation, which update code is correct?
void Update( float _fDelta ) {
    m_fVel += m_fAcceleration * _fDelta;
    m_fPos += m_fVel * fDelta.
}
/* OR */
void Update( float _fDelta ) {
    m_fPos += m_fVel * fDelta.
    m_fVel += m_fAcceleration * _fDelta;
}
An MHS script to simulate both and compare against ½gt² (simulation starting from P and V = 0) reveals the correct answer.

It is a good way in general to test any type of algorithm you have in your mind and overall a tool without which programming is both a pain and inefficient. The reason my code is so consistent (spacing, style, comments, etc.) is because MHS is writing half of my code for me.


L. Spiro

I restore Nintendo 64 video-game OST’s into HD! https://www.youtube.com/channel/UCCtX_wedtZ5BoyQBXEhnVZw/playlists?view=1&sort=lad&flow=grid

Another tool i cant live without now is Workflowy. It is really awesome for making lists and to do tasks for development.

If you want to try it out you can use my referral and you get double the amounts of notes :) https://workflowy.com/invite/1ff7e79c.lnx

qavimator

This is a tool for SecondLife, however the .bvh files it creates are universal ... very easy animation tool to use.

I cannot remember the books I've read any more than the meals I have eaten; even so, they have made me.

~ Ralph Waldo Emerson

This topic is closed to new replies.

Advertisement