genres source code?

Talk about development tools here

Moderator: BigEvilCorporation

Post Reply
djcouchycouch
Very interested
Posts: 710
Joined: Sat Feb 18, 2012 2:44 am

genres source code?

Post by djcouchycouch » Tue Jun 12, 2012 1:53 am

Hi,

Did genres ever get its source code released? The irrational part of me wants to add support for the Graphics Gale sprite format.

Thanks!
DJCC

KanedaFr
Administrateur
Posts: 1139
Joined: Tue Aug 29, 2006 10:56 am
Contact:

Post by KanedaFr » Tue Jun 12, 2012 11:03 am

Nope, because source isn't very...clean ;)

If you want to add support, you could create a plugin (DLL) with these 3 entries

Code: Select all

BOOL APIENTRY DllMain( HANDLE hModule, 
                       DWORD  ul_reason_for_call, 
                       LPVOID lpReserved
					 )
{
    switch (ul_reason_for_call)
	{
		case DLL_PROCESS_ATTACH:
		case DLL_THREAD_ATTACH:
		case DLL_THREAD_DETACH:
		case DLL_PROCESS_DETACH:
			break;
    }
    return TRUE;
}


PLUG_API int PlugGetVersion()
{
	return 0;
}

PLUG_API BOOL PlugExecute(char *info, HANDLE output)
{

// your own stuff i
//info is the line for the rc file and output the outfile to write into
//ex for ANI plugin, its starts with:

char keyword[4]; //ANI\0
	char id[50];
	char file[MAX_PATH];

	int nbElem;

	nbElem = sscanf(info, "%s %s \"%[^\"]\"", keyword, id, file);

	if (nbElem < 3)
	{
		printf("Wrong ANI definition\n");
		printf("ANI id file\n");
		printf("  id\t\tuse as data prefix\n");
		printf("  file\tthe .ani to convert\n\n");
		return FALSE;
	}

}
note I added ANI format to support Graphics Gale .... so if it's not enought, tell me ;)

djcouchycouch
Very interested
Posts: 710
Joined: Sat Feb 18, 2012 2:44 am

Post by djcouchycouch » Tue Jun 12, 2012 1:16 pm

note I added ANI format to support Graphics Gale .... so if it's not enought, tell me
Already??? :shock:

Where do genres updates reside?

KanedaFr
Administrateur
Posts: 1139
Joined: Tue Aug 29, 2006 10:56 am
Contact:

Post by KanedaFr » Tue Jun 12, 2012 2:41 pm

within SGDK. You shoud find an ani.dll in bin folder

djcouchycouch
Very interested
Posts: 710
Joined: Sat Feb 18, 2012 2:44 am

Post by djcouchycouch » Tue Jun 12, 2012 2:56 pm

I don't think I quite understand. Genres in the SGDK already supports Graphics Gale's .gal file format?

KanedaFr
Administrateur
Posts: 1139
Joined: Tue Aug 29, 2006 10:56 am
Contact:

Post by KanedaFr » Tue Jun 12, 2012 7:19 pm

I said it supports ANI file which you can export from Graphics Gale
It's how I made felicia on the genres demo

djcouchycouch
Very interested
Posts: 710
Joined: Sat Feb 18, 2012 2:44 am

Post by djcouchycouch » Tue Jun 12, 2012 7:21 pm

KanedaFr wrote:I said it supports ANI file which you can export from Graphics Gale
It's how I made felicia on the genres demo
Oh, I see.

Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Post by Stef » Wed Sep 04, 2013 9:44 pm

Just trying to add support to new/custom format to genres using plugin but i can't get it to work. What does PLUG_API refer to ? i tried to look in the provided plugin dll files and i can't recognize any known calling convention O_o ? Also how genres actually detect plugin dll files ? i guess you maintain a hard coded list ? or you use the resource type name (ANI --> ani.dll, BITMAP --> bitmap.dll) to automatically find the associated plugin ?
Thanks by advance !

KanedaFr
Administrateur
Posts: 1139
Joined: Tue Aug 29, 2006 10:56 am
Contact:

Post by KanedaFr » Thu Sep 05, 2013 10:32 pm

include this .h

Code: Select all

#ifdef PLUG_EXPORTS
#define PLUG_API __declspec(dllexport)
#else
#define PLUG_API __declspec(dllimport)
#endif

extern "C" PLUG_API int PlugGetVersion( );
extern "C" PLUG_API BOOL PlugExecute(char *info, HANDLE output);
and yes, name of the DLL is name of the resource name

Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Post by Stef » Fri Sep 06, 2013 9:56 am

Thanks for the infos, exactly what i needed :)

Post Reply