// THIS FILE IS GENERATED AUTOMATICALLY, DO NOT EDIT IT!
// it's un_exported.func.h converted by the GenerateInterface tool.


{
    This file is part of Chentrah,
    Copyright (C) 2004-2012 Anton Rzheshevski (chebmaster@mail.ru).

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see http://www.gnu.org/licenses/

 **********************************************************************

    This file contains the definitions and initialization code
    for the functions exported from the mothe rmodule to the game module

 **********************************************************************}
{
 en_US:
    Generally, one should use interfaces
      in stead of such perversion.
      Alas, at the time I built this,
      FreePascal didn't yet support the interfaces well.

    Besides, I don't see the point of reworking this mechanism.
      It works, it works well, it is in a way more flexible
      than the interface mechanism, it is safe enough.
      In short, moving from it to interfaces would be just a waste of time.
      
    After reaching a stable version, this list will stop changing,
      except adding new functions maybe.

 ru_RU:
    Знаю, что изврат, но меня ТАК ДОСТАЛО поддерживать
     (а самое страшное - модифицировать) четыре разных
     списка одних и тех же функций в четырёх разных местах.
     Да ещё вручную следить, чтобы все изменения в них
     совпадали до точки...

    Всё худо-бедно держалось пока мне не пришлось массированно править
     списки параметров (переезд с String на PChar).
     Вот тут-то ад и разверсзя... =:(

 **********************************************************************}
{
    This header is used by both the mother executable and the module dlls.
     The mother definition style:
       function A (): integer;
       , so macros are: MotherState^.ExportHostProc( = "function", )) = "", , pointer( = "".
     The module definition style:
       var A: function (): integer;
       , so macros are: MotherState^.ExportHostProc( = "", )) = ":function", , pointer( = "".
     The core exporting proc definition style:
       3: p:=@A;
       , so macros are: MotherState^.ExportHostProc( = "", e_fun2 = "", , pointer( = ":p:=@"
     The module importing proc definition style:
       RegisterProc(3, @A);
       , so macros are: MotherState^.ExportHostProc( = "RegisterProc(", e_fun2 = ")", , pointer( = ",@"

 **********************************************************************}

// ---------------------- INTERFACING BETWEEN THE MODULE AND THE ENGINE -------

MotherState^.ExportHostProc( {$ifndef header} 0003 , pointer( {$endif}_ValidateVersion )){$ifdef header}(m, n, b: integer); cdecl{$endif};
MotherState^.ExportHostProc( {$ifndef header} 0001 , pointer( {$endif}_ValidateTypesets )){$ifdef header}(i, n: integer); cdecl{$endif};
MotherState^.ExportHostProc( {$ifndef header} 0004 , pointer( {$endif}_ValidateTypesetsEq )){$ifdef header}(n: PAnsiChar; v1, v2: integer); cdecl{$endif};
MotherState^.ExportHostProc( {$ifndef header} 0002 , pointer( {$endif}_ValidateTypesetsLe )){$ifdef header}(n: PAnsiChar; v1, v2: integer); cdecl{$endif};
MotherState^.ExportHostProc( {$ifndef header} 0005 , pointer( {$endif}_RequestExit )){$ifdef header}(); cdecl{$endif};
MotherState^.ExportHostProc( {$ifndef header} 0006 , pointer( {$endif}GoingDownHard )) {$ifdef header}(): boolean; cdecl{$endif};

MotherState^.ExportHostProc( {$ifndef header} 0007 , pointer( {$endif}_cgeSetBackground )){$ifdef header}(FileName: PAnsiChar); cdecl{$endif};
MotherState^.ExportHostProc( {$ifndef header} 0107 , pointer( {$endif}_cgeSetBackgroundPtr )){$ifdef header}(p: pointer; size: integer); cdecl{$endif};
MotherState^.ExportHostProc( {$ifndef header} 0108 , pointer( {$endif}_cgeDrawBackground )){$ifdef header}(); cdecl{$endif};
MotherState^.ExportHostProc( {$ifndef header} 0008 , pointer( {$endif}_cgeHeartBeat )){$ifdef header}(); cdecl{$endif};

MotherState^.ExportHostProc( {$ifndef header} 0015 , pointer( {$endif}GetWindowExists )) {$ifdef header}(): boolean; cdecl{$endif};

MotherState^.ExportHostProc( {$ifndef header} 0017 , pointer( {$endif}_SetConfigInt )) {$ifdef header} (section, id: PAnsiChar; Value: integer); cdecl{$endif};
MotherState^.ExportHostProc( {$ifndef header} 0018 , pointer( {$endif}_GetConfigInt )) {$ifdef header} (section, id: PAnsiChar): integer; cdecl{$endif};
MotherState^.ExportHostProc( {$ifndef header} 0019 , pointer( {$endif}_GetConfigIntCh )) {$ifdef header} (section, id: PAnsiChar; min, max: integer): integer; cdecl{$endif};
MotherState^.ExportHostProc( {$ifndef header} 0101 , pointer( {$endif}_SetConfigStr )) {$ifdef header} (section, id, Value: PAnsiChar); cdecl{$endif};
MotherState^.ExportHostProc( {$ifndef header} 0102 , pointer( {$endif}_GetConfigStr )) {$ifdef header} (section, id: PAnsiChar): PAnsiChar; cdecl{$endif};

MotherState^.ExportHostProc( {$ifndef header} 0020 , pointer( {$endif}_GetCGM )) {$ifdef header}(): integer; cdecl{$endif}; //reads the message queue;

MotherState^.ExportHostProc( {$ifndef header} 0021 , pointer( {$endif}_MakeSurePathExists )) {$ifdef header} (path: PAnsiChar); cdecl{$endif};


// ------------------------------ LOG AND EXCEPTION HANDLING ------------------

MotherState^.ExportHostProc( {$ifndef header} 1002 , pointer( {$endif} {$ifdef cgekernel}_exp_StopDying{$else}StopDying{$endif} )) {$ifdef header}(): PWideChar; cdecl{$endif};

MotherState^.ExportHostProc( {$ifndef header} 1003 , pointer( {$endif}DbgSayA )) {$ifdef header}(Yell: PAnsiChar); cdecl{$endif};
//MotherState^.ExportHostProc( {$ifndef header} 0044 , pointer( {$endif}HostDieW )) {$ifdef header}(txt: PWideChar); cdecl{$endif};
MotherState^.ExportHostProc( {$ifndef header} 1004 , pointer( {$endif}SetDying )) {$ifdef header}(d: boolean); cdecl{$endif};

MotherState^.ExportHostProc( {$ifndef header} 1005 , pointer( {$endif}_HostDyellW )) {$ifdef header}(txt: PWideChar); cdecl{$endif};
//MotherState^.ExportHostProc( {$ifndef header} 0117 , pointer( {$endif}HostRaiseException )) {$ifdef header}(); cdecl{$endif};


MotherState^.ExportHostProc( {$ifndef header} 1006 , pointer( {$endif}_HostLogW )) {$ifdef header}(txt: PWideChar); cdecl{$endif};
MotherState^.ExportHostProc( {$ifndef header} 1007 , pointer( {$endif}_HostMsg  )) {$ifdef header}(M: TMessageId): PWideChar; cdecl{$endif};
MotherState^.ExportHostProc( {$ifndef header} 1008 , pointer( {$endif}AddLogOK  )) {$ifdef header}(); cdecl{$endif};
(*{$ifdef windows}
//DONT NEED IT ANYMORE
MotherState^.ExportHostProc( {$ifndef header} 1009 , pointer( {$endif}CgeTryWrap )) {$ifdef header}(backwrapperproc, calledproc: pointer); cdecl{$endif};
{$endif}*)

// --------------------------------- OPENGL HELPERS AND WRAPPERS --------------

MotherState^.ExportHostProc( {$ifndef header} 2001 , pointer( {$endif}_CgeSwapBuffers )){$ifdef header}(); cdecl{$endif};
MotherState^.ExportHostProc( {$ifndef header} 2002 , pointer( {$endif}_CgeBuildAlphaMipmaps )) {$ifdef header}(Width, Height: integer; Data: pointer); cdecl{$endif};
MotherState^.ExportHostProc( {$ifndef header} 2004 , pointer( {$endif}{$ifdef cgekernel}exGetGlProcAddress{$else}GetGLProcAddress{$endif} )) {$ifdef header}(ProcName, Suffix: PAnsiChar): Pointer; cdecl{$endif};
MotherState^.ExportHostProc( {$ifndef header} 2005 , pointer( {$endif}{$ifdef cgekernel}exGetGlProcAddress2{$else}GetGLProcAddress2{$endif} )) {$ifdef header}(ProcName, Suffix1, Suffix2: PAnsiChar): Pointer; cdecl{$endif};

MotherState^.ExportHostProc( {$ifndef header} 2006 , pointer( {$endif}GetHigherPowerOf2 )) {$ifdef header}(i: integer): integer; cdecl{$endif};
MotherState^.ExportHostProc( {$ifndef header} 2007 , pointer( {$endif}GetLowerPowerOf2 )) {$ifdef header}(i: integer): integer; cdecl{$endif};


// --------------------------------- SOUND ------------------------------------
MotherState^.ExportHostProc( {$ifndef header} 2101 , pointer( {$endif}{$ifdef cgekernel}exGetALProcAddress{$else}GetALProcAddress{$endif} )) {$ifdef header}(ProcName: PAnsiChar): Pointer; cdecl{$endif};
//the data format is always 16 bits stereo.
MotherState^.ExportHostProc( {$ifndef header} 2102 , pointer( {$endif}CgeNewSoundData )){$ifdef header}(begins: TDateTime; samples, rate: integer; data: pointer); cdecl{$endif};
MotherState^.ExportHostProc( {$ifndef header} 2103 , pointer( {$endif}CgeSetSoundVolume )){$ifdef header}(volume: float); cdecl{$endif};

MotherState^.ExportHostProc( {$ifndef header} 2104 , pointer( {$endif}_PlaySound )){$ifdef header}(Wavfilename: PAnsiChar); cdecl{$endif};



//  -------------------------------- CGE-FILE MANAGEMENT ----------------------
// Rest in peace, paradigm.

//MotherState^.ExportHostProc( {$ifndef header} 0049 , pointer( {$endif}OpenCGEFileForWrite )) {$ifdef header}(TargetName: PAnsiChar; version: AnsiChar); cdecl{$endif};
//MotherState^.ExportHostProc( {$ifndef header} 0050 , pointer( {$endif}OpenCGEFileForRead )) {$ifdef header}(SourceName: PAnsiChar; var version: AnsiChar); cdecl{$endif};
//MotherState^.ExportHostProc( {$ifndef header} 0051 , pointer( {$endif}ReadFromCGEFile )) {$ifdef header}(var BufferLen: integer): pointer; cdecl{$endif};
//MotherState^.ExportHostProc( {$ifndef header} 0055 , pointer( {$endif}AllocCGefileWriteBuffer )) {$ifdef header}(var BufferLen: integer): pointer; cdecl{$endif};
//MotherState^.ExportHostProc( {$ifndef header} 0052 , pointer( {$endif}WriteToCGEFile )) {$ifdef header} (BufferLen: integer); cdecl{$endif};
//MotherState^.ExportHostProc( {$ifndef header} 0053 , pointer( {$endif}CloseCGEFile )) {$ifdef header} (FlushToFile: boolean; FileName: PAnsiChar); cdecl{$endif};
//MotherState^.ExportHostProc( {$ifndef header} 0115 , pointer( {$endif}EmergencyCloseCGEFile )) {$ifdef header} (); cdecl{$endif};
//MotherState^.ExportHostProc( {$ifndef header} 0069 , pointer( {$endif}GetCGEFileSessionId )) {$ifdef header}(): int64; cdecl{$endif};


//MotherState^.ExportHostProc( {$ifndef header} 0071 , pointer( {$endif}CgeFileExists )) {$ifdef header}(name: PAnsiChar): boolean; cdecl{$endif};
//MotherState^.ExportHostProc( {$ifndef header} 0072 , pointer( {$endif}CgeFileRename )) {$ifdef header} (fFrom, fTo: PAnsiChar); cdecl{$endif};
MotherState^.ExportHostProc( {$ifndef header} 3001 , pointer( {$endif}_UnmangleFileName )){$ifdef header}(m: PAnsiChar): pAnsiChar; cdecl{$endif};
MotherState^.ExportHostProc( {$ifndef header} 3002 , pointer( {$endif}_GetFileHash )){$ifdef header}(name: PAnsiChar; phash: pResourceHash); cdecl{$endif};
MotherState^.ExportHostProc( {$ifndef header} 3003 , pointer( {$endif}_GetFileDateTime )){$ifdef header}(name: PAnsiChar): TDateTime; cdecl{$endif};
MotherState^.ExportHostProc( {$ifndef header} 3004 , pointer( {$endif}_GetIsHashvalid )){$ifdef header}(phash: pMd5Digest): boolean; cdecl{$endif};


(*
MotherState^.ExportHostProc( {$ifndef header} 3005 , pointer( {$endif}_CreateContainer )){$ifdef header}(Name: PAnsiChar; Size: integer): pointer; cdecl{$endif};
MotherState^.ExportHostProc( {$ifndef header} 3006 , pointer( {$endif}_GetContainer )){$ifdef header}(Name: PAnsiChar): pointer; cdecl{$endif};
MotherState^.ExportHostProc( {$ifndef header} 3007 , pointer( {$endif}_GetContainerSize )){$ifdef header}(Name: PAnsiChar): integer; cdecl{$endif};
MotherState^.ExportHostProc( {$ifndef header} 3008 , pointer( {$endif}_DeleteContainer )){$ifdef header}(Name: PAnsiChar); cdecl{$endif};
MotherState^.ExportHostProc( {$ifndef header} 3009 , pointer( {$endif}_StoreContainerToFile )) {$ifdef header} (Name, FileName: PAnsiChar); cdecl{$endif};
MotherState^.ExportHostProc( {$ifndef header} 3010 , pointer( {$endif}_CreateContainerFromFile )) {$ifdef header}(Name, FileName: PAnsiChar; var Size: integer): pointer; cdecl{$endif};
*)
//--------------------------------- RESOURCE MANAGEMENT -----------------------

//MotherState^.ExportHostProc( {$ifndef header} 0057 , pointer( {$endif}GetCurrentSessionID )) {$ifdef header}(): int64; cdecl{$endif};
//MotherState^.ExportHostProc( {$ifndef header} 0058 , pointer( {$endif}NewSessionID )) {$ifdef header} (); cdecl{$endif};

(*
MotherState^.ExportHostProc( {$ifndef header} 0111 , pointer( {$endif}_CgeNewResource )) {$ifdef header} (ResType: integer; pname: pinteger; ptoken: pResourceToken); cdecl{$endif};
MotherState^.ExportHostProc( {$ifndef header} 0067 , pointer( {$endif}_CgeDeleteResource )) {$ifdef header} (ResType, name: integer; ptoken: PResourceToken); cdecl{$endif};
MotherState^.ExportHostProc( {$ifndef header} 0062 , pointer( {$endif}_UpdateResourceToken )) {$ifdef header} (ResType, name: integer; ptoken: PResourceToken); cdecl{$endif};
MotherState^.ExportHostProc( {$ifndef header} 0063 , pointer( {$endif}_UnclaimResource )) {$ifdef header} (ResType, name: integer; ptoken: PResourceToken); cdecl{$endif};
MotherState^.ExportHostProc( {$ifndef header} 0064 , pointer( {$endif}_ClaimResource )) {$ifdef header} (ResType: integer; pname: pinteger; ptoken: pResourceToken): longbool; cdecl{$endif};
MotherState^.ExportHostProc( {$ifndef header} 0065 , pointer( {$endif}_ClearUnclaimedResourcesList )) {$ifdef header} (); cdecl{$endif};
MotherState^.ExportHostProc( {$ifndef header} 0066 , pointer( {$endif}_DeleteUnclaimedResources )) {$ifdef header} (); cdecl{$endif};
*)

MotherState^.ExportHostProc( {$ifndef header} 4000 , pointer( {$endif}GenHash )) {$ifdef header} (phash: PResourceHash); cdecl{$endif};
MotherState^.ExportHostProc( {$ifndef header} 4001 , pointer( {$endif}StoreResource )) {$ifdef header} (phandle: pDWORD; phash: PResourceHash); cdecl{$endif};
MotherState^.ExportHostProc( {$ifndef header} 4002 , pointer( {$endif}ClaimResource )) {$ifdef header} (phash: PResourceHash): PRes; cdecl{$endif};
MotherState^.ExportHostProc( {$ifndef header} 4003 , pointer( {$endif}GetFirstResource )) {$ifdef header} (): PRes; cdecl{$endif};
MotherState^.ExportHostProc( {$ifndef header} 4004 , pointer( {$endif}GetNextResource )) {$ifdef header} (): PRes; cdecl{$endif};
MotherState^.ExportHostProc( {$ifndef header} 4005 , pointer( {$endif}ClearResourceList )) {$ifdef header} (); cdecl{$endif};
MotherState^.ExportHostProc( {$ifndef header} 4006 , pointer( {$endif}HashesMatch )) {$ifdef header} (a, b: PResourceHash): boolean; cdecl{$endif};

//These are used for storing the classes information:
MotherState^.ExportHostProc( {$ifndef header} 3011 , pointer( {$endif}CgeCreateMemoryStream )) {$ifdef header}(): pointer; cdecl{$endif};
MotherState^.ExportHostProc( {$ifndef header} 3012 , pointer( {$endif}CgeDeleteMemoryStream )) {$ifdef header}(s: pointer); cdecl{$endif};
MotherState^.ExportHostProc( {$ifndef header} 3013 , pointer( {$endif}CgeSeekMemoryStream )) {$ifdef header}(s: pointer; pos: integer); cdecl{$endif};
MotherState^.ExportHostProc( {$ifndef header} 3014 , pointer( {$endif}CgeWriteToMemoryStream )) {$ifdef header}(s: pointer; buf: pointer; len: integer); cdecl{$endif};
MotherState^.ExportHostProc( {$ifndef header} 3015 , pointer( {$endif}CgeReadFromMemoryStream )) {$ifdef header}(s: pointer; buf: pointer; len: integer): integer; cdecl{$endif};
MotherState^.ExportHostProc( {$ifndef header} 3016 , pointer( {$endif}CgeWriteIntToMemoryStream )) {$ifdef header}(s: pointer; i: integer); cdecl{$endif};
MotherState^.ExportHostProc( {$ifndef header} 3017 , pointer( {$endif}CgeReadIntFromMemoryStream )) {$ifdef header}(s: pointer): integer; cdecl{$endif};
MotherState^.ExportHostProc( {$ifndef header} 3018 , pointer( {$endif}CgeGetMemoryStreamMem )) {$ifdef header}(s: pointer): pointer; cdecl{$endif};
MotherState^.ExportHostProc( {$ifndef header} 3019 , pointer( {$endif}CgeGetMemoryStreamSize )) {$ifdef header}(s: pointer): integer; cdecl{$endif};
MotherState^.ExportHostProc( {$ifndef header} 3020 , pointer( {$endif}CgeMemoryStreamLoadFromFile )) {$ifdef header}(s: pointer; name: PAnsiChar); cdecl{$endif};
MotherState^.ExportHostProc( {$ifndef header} 3021 , pointer( {$endif}CgeMemoryStreamSaveToFile )) {$ifdef header}(s: pointer; name: PAnsiChar); cdecl{$endif};

//This is a per-module setting!
MotherState^.ExportHostProc( {$ifndef header} 3022 , pointer( {$endif}CgeGetCiMemoryStream )) {$ifdef header}(): pointer; cdecl{$endif};
MotherState^.ExportHostProc( {$ifndef header} 3023 , pointer( {$endif}CgeSetCiMemoryStream )) {$ifdef header}(s: pointer); cdecl{$endif};

MotherState^.ExportHostProc( {$ifndef header} 3024 , pointer( {$endif}CgeGetHostMem )) {$ifdef header}(size: integer): pointer; cdecl{$endif};
MotherState^.ExportHostProc( {$ifndef header} 3025 , pointer( {$endif}CgeFreeHostMem )) {$ifdef header}(p: pointer); cdecl{$endif};
MotherState^.ExportHostProc( {$ifndef header} 3026 , pointer( {$endif}CgeReallocHostMem )) {$ifdef header}(p: pointer; newsize: integer): pointer; cdecl{$endif};


// -------------------------------- MOUSE POINTER -----------------------------

MotherState^.ExportHostProc( {$ifndef header} 3201 , pointer( {$endif}CgeLoadCursorFromFile )) {$ifdef header}(FileName: PAnsiChar; xhotspot, yhotspot: integer); cdecl{$endif};
MotherState^.ExportHostProc( {$ifndef header} 3202 , pointer( {$endif}CgeLoadCursorFromMemory )) {$ifdef header}(pfile: pointer; size, xhotspot, yhotspot: integer); cdecl{$endif};
//Remember, kids! 32x32 only!
MotherState^.ExportHostProc( {$ifndef header} 3203 , pointer( {$endif}CgeLoadCursorFromRawPixmap )) {$ifdef header}(pixels: pointer; xhotspot, yhotspot: integer); cdecl{$endif};
MotherState^.ExportHostProc( {$ifndef header} 3204 , pointer( {$endif}CgeEmptyCursor )) {$ifdef header}(); cdecl{$endif};
MotherState^.ExportHostProc( {$ifndef header} 3205 , pointer( {$endif}CgeStandardCursor )) {$ifdef header}(); cdecl{$endif};
MotherState^.ExportHostProc( {$ifndef header} 3206 , pointer( {$endif}CgeHourglassCursor )) {$ifdef header}(); cdecl{$endif};

// -------------------------------------- TIMER -------------------------------

//MotherState^.ExportHostProc( {$ifndef header} 5001 , pointer( {$endif}_CTimer )) {$ifdef header} (): float; cdecl{$endif};
//MotherState^.ExportHostProc( {$ifndef header} 5002 , pointer( {$endif}{$ifdef cgekernel}_exp_Tick{$else}Tick{$endif})) {$ifdef header}(): longint; cdecl{$endif};
MotherState^.ExportHostProc( {$ifndef header} 5003 , pointer( {$endif}Second )){$ifdef header}(): double; cdecl{$endif};
MotherState^.ExportHostProc( {$ifndef header} 5004 , pointer( {$endif}UsecByTsc )){$ifdef header}(ptsc: pqword): double; cdecl{$endif};


//----------------------------------- VAMPYRE IMAGING -------------------------

//MotherState^.ExportHostProc( {$ifndef header} 1014 , pointer( {$endif}CgeNewPic )) {$ifdef header} (): pointer; cdecl{$endif};
MotherState^.ExportHostProc( {$ifndef header} 6000 , pointer( {$endif}DeletePic )) {$ifdef header} (name: pointer); cdecl{$endif};

//MotherState^.ExportHostProc( {$ifndef header} 1001 , pointer( {$endif}LoadNewPic )) {$ifdef header} (FileName: PAnsiChar; phash: pResourceHash): pointer; cdecl{$endif};
MotherState^.ExportHostProc( {$ifndef header} 6001 , pointer( {$endif}LoadPic )) {$ifdef header} (FileName: PAnsiChar): pointer; cdecl{$endif};
MotherState^.ExportHostProc( {$ifndef header} 6002 , pointer( {$endif}LoadPicAs )) {$ifdef header} (FileName: PAnsiChar; format: GLenum): pointer; cdecl{$endif};
MotherState^.ExportHostProc( {$ifndef header} 6003 , pointer( {$endif}LoadPicFromMem )) {$ifdef header} (p: pointer; size: integer): pointer; cdecl{$endif};
MotherState^.ExportHostProc( {$ifndef header} 6004 , pointer( {$endif}LoadPicFromMemAs )) {$ifdef header} (p: pointer; size: integer; format: GLenum): pointer; cdecl{$endif};


MotherState^.ExportHostProc( {$ifndef header} 6005 , pointer( {$endif}CreatePic )){$ifdef header}(width, height: integer; format: GLuint): pointer; cdecl{$endif};

MotherState^.ExportHostProc( {$ifndef header} 6006 , pointer( {$endif}SavePic )){$ifdef header}(FileName: PAnsiChar; name: pointer); cdecl{$endif};

MotherState^.ExportHostProc( {$ifndef header} 6007 , pointer( {$endif}ResizePic )){$ifdef header}(name: pointer; newwidth, newheight: integer); cdecl{$endif};
MotherState^.ExportHostProc( {$ifndef header} 6008 , pointer( {$endif}ResamplePic )){$ifdef header}(name: pointer; newwidth, newheight: integer; wrap: boolean); cdecl{$endif};
MotherState^.ExportHostProc( {$ifndef header} 6009 , pointer( {$endif}ClonePic )){$ifdef header}(name1: pointer): pointer; cdecl{$endif};
MotherState^.ExportHostProc( {$ifndef header} 6010 , pointer( {$endif}CloneResamplePic )){$ifdef header}(name1: pointer; newwidth, newheight: integer; wrap: boolean): pointer; cdecl{$endif};

MotherState^.ExportHostProc( {$ifndef header} 6011 , pointer( {$endif}GetPicFmt )) {$ifdef header} (name: pointer): GLuint; cdecl{$endif};
MotherState^.ExportHostProc( {$ifndef header} 6012 , pointer( {$endif}GetPicPixels )) {$ifdef header} (name: pointer): pointer; cdecl{$endif};
MotherState^.ExportHostProc( {$ifndef header} 6013 , pointer( {$endif}GetPicWidth )) {$ifdef header} (name: pointer): integer; cdecl{$endif};
MotherState^.ExportHostProc( {$ifndef header} 6014 , pointer( {$endif}GetPicHeight )) {$ifdef header} (name: pointer): integer; cdecl{$endif};
MotherState^.ExportHostProc( {$ifndef header} 6015 , pointer( {$endif}GetPicBytes )) {$ifdef header} (name: pointer): integer; cdecl{$endif};

// -------------------------------- FONT MANAGEMENT ---------------------------

MotherState^.ExportHostProc( {$ifndef header} 7001 , pointer( {$endif}cgeffSizeToFace )){$ifdef header}(size: integer; face: Pinteger; zoom: PGLfloat); cdecl{$endif};
MotherState^.ExportHostProc( {$ifndef header} 7002 , pointer( {$endif}cgeffFitStringIntoRectangle )){$ifdef header}(Size, numChars, numLines, Width, Height: integer; fit: PStringFitRec);  cdecl{$endif};
MotherState^.ExportHostProc( {$ifndef header} 7003 , pointer( {$endif}cgeffGetStringWidth )) {$ifdef header} (Size, numChars: integer): GLfloat; cdecl{$endif};
MotherState^.ExportHostProc( {$ifndef header} 7004 , pointer( {$endif}cgeffGetStringHeight )) {$ifdef header} (Size, numLines: integer): GLfloat; cdecl{$endif};

//the caller is responsible for switching to FFP and setting the ortho projection!
MotherState^.ExportHostProc( {$ifndef header} 7005 , pointer( {$endif}cgeffSetRenderState )){$ifdef header}(noshadow: boolean); cdecl{$endif};
MotherState^.ExportHostProc( {$ifndef header} 7006 , pointer( {$endif}cgeffRenderString )){$ifdef header}(fit: PStringFitRec; Left, Top: glFloat; w: PWideChar); cdecl{$endif};


(*
MotherState^.ExportHostProc( {$ifndef header} 7007 , pointer( {$endif}cgeGetProportionalFontName )) {$ifdef header} (index: integer): PAnsiChar; cdecl{$endif};
MotherState^.ExportHostProc( {$ifndef header} 7008 , pointer( {$endif}cgeCalcWordMetrics )) {$ifdef header} (
  chars: PWideChar; len, font_index, size, diminish: integer; width, width_condensed: PInteger; UV, UV_condensed: PGLfloat); cdecl{$endif};

*)
(*


//the fonts CGE loads by itself: 0=ChebStyle, 1=Nimbus Sans L.
MotherState^.ExportHostProc( {$ifndef header} 2007 , pointer( {$endif}_foGetSysFont )) {$ifdef header} (index: integer): integer; cdecl{$endif};

//all objects should be created prior, via CgeNewResource(CGE_RESOURCE_FONT, ...)
MotherState^.ExportHostProc( {$ifndef header} 2001 , pointer( {$endif}_foLoadFont )) {$ifdef header} (FileName: PAnsiChar; name: integer): boolean; cdecl{$endif};
MotherState^.ExportHostProc( {$ifndef header} 2008 , pointer( {$endif}_foGetFontname )) {$ifdef header} (index: integer): PAnsiChar; cdecl{$endif};

//This one performs the actual width high and low calculations
//Returns the *actual* character size (culled to min..max supported by the font)
//The array receiving the data must be pre-allocated.
//The string must *not* contain spaces.
MotherState^.ExportHostProc( {$ifndef header} 2006 , pointer( {$endif}_foCalcWord )) {$ifdef header}
  (chars: PWideChar; len, font, size: integer; bold, italic, condensed: boolean; word: PiCharArray;
   texture, shadow: pGLuint): integer; cdecl{$endif};
*)




