Delphi SDK: Module's for OfflineList.

If you have some comments or if you want more function please contact me at Replouf66@Hotmail.com

If you make a module for OfflineList please contact me, I will test it and propose it on my web site.
Replouf66@Hotmail.com

Before start:

Declaration needed:

type
   FSetSize = procedure(rom: PPChar; size:pInteger; newSize: Integer); stdcall; // call this function to inflate or deflate the size of the rom.
type
   TGameModule=record // this record indicate some information about the rom.
      crc: PChar; // indicate the crc of the rom file.
      name: PChar; // indicate the name of the game.
      named: PChar; // indicate the rom naming.
      num: Integer; // indicate the release number of the rom.
   end;
type
   TModuleEdit=record
      rom : PPChar; // pointer to an array of CHAR.
      size : pInteger; //pointer to the size of the rom.
      game : TGame; //record with information about the rom.
   end;


Function/Procedure Summary
procedure closeModule; stdcall;
          This procedure is called when the module is deactivated.
procedure configModule; stdcall;
          If the user can configure the module this procedure will be called.
procedure editRom(resize:TSetSize; edit: TModuleEdit); stdcall; *needed*
          Procedure to patch, edit or modify a rom.
function

getAuthor : pchar; stdcall;
          This function returns the Author of the module.

function getSDKVersion : pchar; stdcall; *needed*
         This function returns the SDK version used by the plugin.
function getName : pchar; stdcall;
          This function returns the name of the module.
function

getSmallComment : pchar; stdcall;
          This function returns a small comment to describe the module.

function getVersion : pchar; stdcall;
          This function returns the version of the module.
procedure

initModule(dir: pchar); stdcall;
         This function is called when the module is activated.

procedure rename(language:Integer); stdcall;
         This procedure is called at startup of OfflineList and when the user change the selected language.

 

Function/Procedure Detail

closeModule

procedure closeModule; stdcall;
This procedure is called when the module is deactivated.


Don't forget to free the memory allocated by your module.



configModule

procedure configModule; stdcall;
If the user can configure the module this procedure will be called.



editRom *needed*

procedure editRom(resize:TSetSize; edit: TModuleEdit); stdcall;
Procedure to patch, edit or modify a rom.
Parameters:
resize - the procedure's address to inflate or deflate the rom.

edit - a record that contains the rom, its size and some informations.


getAuthor

function getAuthor : pchar; stdcall;
This function returns the author of the module.
Returns:
a PCHAR indicating the author of the module.

getName

function getName : pchar; stdcall;
This function returns the name of the module.
Returns:
a PCHAR indicating the name of the module.

getSDKVersion *needed*

function getSDKVersion : pchar; stdcall;
This function returns the SDK version used by the plugin.
You need to return a valid version to recieve the correct struct.

Returns:
a pchar indicating the plugin version.


getSmallComment

function getSmallComment : pchar; stdcall;
This function returns a comment to describe the module.
Returns:
a PCHAR indicating what the module do.

getVersion

function getVersion : pchar; stdcall;
This function returns the version of the module.
Returns:
a PCHAR indicating the module version.


initModule

procedure initModule(dir:pchar); stdcall;
This function is called when the module is activated.


You can store file configuration or anything in the directory "dir" you need to create it if it doesn't exist.

Parameters:
dir - the path where you can store file.


rename

procedure rename(language:Integer); stdcall;
This procedure is called at startup of OfflineList and when the user change the selected language.


The language value:

- 0 : English

- 1 : French

- 2 : Chinese (Simp)

- 3 : Chinese (Trad)

- 4 : German

- 5 : Dutch

- 6 : Italian

- 7 : Japanese

- 8 : Norwegian

- 9 : Polish

- 10 : Portuguese (Brazil)

- 11 : Spanish

- 12 : Spanish (Mexico)

- 13 : Swedish

- 14 : Danish

- 15 : Czech

- 16 : ...

Parameters:
language - Indicating the language selected in OfflineList.