Page 1 of 1
genres source code?
Posted: Tue Jun 12, 2012 1:53 am
by djcouchycouch
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
Posted: Tue Jun 12, 2012 11:03 am
by KanedaFr
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

Posted: Tue Jun 12, 2012 1:16 pm
by djcouchycouch
note I added ANI format to support Graphics Gale .... so if it's not enought, tell me
Already???
Where do genres updates reside?
Posted: Tue Jun 12, 2012 2:41 pm
by KanedaFr
within SGDK. You shoud find an ani.dll in bin folder
Posted: Tue Jun 12, 2012 2:56 pm
by djcouchycouch
I don't think I quite understand. Genres in the SGDK already supports Graphics Gale's .gal file format?
Posted: Tue Jun 12, 2012 7:19 pm
by KanedaFr
I said it supports ANI file which you can export from Graphics Gale
It's how I made felicia on the genres demo
Posted: Tue Jun 12, 2012 7:21 pm
by djcouchycouch
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.
Posted: Wed Sep 04, 2013 9:44 pm
by Stef
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 !
Posted: Thu Sep 05, 2013 10:32 pm
by KanedaFr
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
Posted: Fri Sep 06, 2013 9:56 am
by Stef
Thanks for the infos, exactly what i needed
