genres source code?
Moderator: BigEvilCorporation
-
- Very interested
- Posts: 710
- Joined: Sat Feb 18, 2012 2:44 am
genres source code?
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
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
Nope, because source isn't very...clean
If you want to add support, you could create a plugin (DLL) with these 3 entries
note I added ANI format to support Graphics Gale .... so if it's not enought, tell me
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;
}
}
-
- Very interested
- Posts: 710
- Joined: Sat Feb 18, 2012 2:44 am
-
- Very interested
- Posts: 710
- Joined: Sat Feb 18, 2012 2:44 am
-
- Very interested
- Posts: 710
- Joined: Sat Feb 18, 2012 2:44 am
-
- Very interested
- Posts: 3131
- Joined: Thu Nov 30, 2006 9:46 pm
- Location: France - Sevres
- Contact:
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 !
Thanks by advance !
include this .h
and yes, name of the DLL is name of the resource name
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);