unit fwPlattform;

{$IFDEF FPC}
  {$MODE DELPHI}
{$ENDIF}

interface

uses fwLogging,
     fwGlobals,
     fwTypes,
     fwObject,
     fwObjectlist,
     fwCustomEngine,

{$IFDEF WIN32}
     SDL,
     fwCustomSDLEngine,
     fwWindowsSDLEngine
{$ENDIF}

{$IFDEF LINUX_i386}
     SDL,
     fwSDLEngine
{$ENDIF}

{$IFDEF GP2X}
     fwGP2XSDLEngine
{$ENDIF}

{$IFDEF GP2XWIZ}
     fwWIZSDLEngine
{$ENDIF}

{$IFDEF CAANOO}
     fwCaanooSDLEngine
{$ENDIF}

{$IFDEF PANDORA}
     SDL,
     fwCustomSDLEngine,
     fwPandoraSDLEngine
{$ENDIF}

{$IFDEF N800}
     fwN800Engine
{$ENDIF}

{$IFDEF DINGUX}
     fwSDLEngine
{$ENDIF}

{$IFDEF ARMEL}
     fwSDLEngine
{$ENDIF}
     ;

type
{$IFDEF WIN32}
  TfwEngine        = class(TfwSDLEngine);
{$ENDIF}

{$IFDEF LINUX_i386}
  TfwEngine        = class(TfwSDLEngine);
{$ENDIF}

{$IFDEF GP2X}
  TfwEngine        = class(TfwGP2XSDLEngine);
{$ENDIF}

{$IFDEF GP2XWIZ}
  TfwEngine        = class(TfwWIZSDLEngine);
{$ENDIF}

{$IFDEF CAANOO}
  TfwEngine        = class(TfwCaanooSDLEngine);
{$ENDIF}

{$IFDEF PANDORA}
  TfwEngine        = class(TfwPandoraSDLEngine);
{$ENDIF}

{$IFDEF N800}
  TfwEngine        = class(TfwSDLEngine);
{$ENDIF}

{$IFDEF DINGUX}
  TfwEngine        = class(TfwSDLEngine);
{$ENDIF}

{$IFDEF ARMEL}
  TfwEngine        = class(TfwSDLEngine);
{$ENDIF}

// Button - Belegung pro Plattform
{$IFDEF WIN32}
const
  SCREEN_WIDTH     = 800;
  SCREEN_HEIGHT    = 480;
  SCREEN_BPP       = 16;

const
  LEFT_BUTTON      = SDLK_LEFT;
  RIGHT_BUTTON     = SDLK_RIGHT;
  UP_BUTTON        = SDLK_UP;
  DOWN_BUTTON      = SDLK_DOWN;
  FIRE_BUTTON      = SDLK_SPACE;

type
  TfwCEKeyControl  = TfwSDLInputKey;
{$ENDIF}

{$IFDEF LINUX_i386}
const
  LEFT_BUTTON      = SDLK_LEFT;
  RIGHT_BUTTON     = SDLK_RIGHT;
  UP_BUTTON        = SDLK_UP;
  DOWN_BUTTON      = SDLK_DOWN;
  FIRE_BUTTON      = SDLK_SPACE;
  
type
  TfwCEKeyControl  = TfwSDLInputKey;
{$ENDIF}

{$IFDEF GP2X}
const
  UP_BUTTON        = GP2X_UP_BUTTON;
  LEFT_BUTTON      = GP2X_LEFT_BUTTON;
  DOWN_BUTTON      = GP2X_DOWN_BUTTON;
  RIGHT_BUTTON     = GP2X_RIGHT_BUTTON;
  FIRE_BUTTON      = GP2X_B_BUTTON;
  
type
  TfwCEKeyControl  = TfwSDLInputKey;
{$ENDIF}

{$IFDEF GP2XWIZ}
const
  UP_BUTTON        = GP2XWIZ_UP_BUTTON;
  LEFT_BUTTON      = GP2XWIZ_LEFT_BUTTON;
  DOWN_BUTTON      = GP2XWIZ_DOWN_BUTTON;
  RIGHT_BUTTON     = GP2XWIZ_RIGHT_BUTTON;
  FIRE_BUTTON      = GP2XWIZ_B_BUTTON;

type
  TfwCEKeyControl  = TfwSDLInputKey;
{$ENDIF}

{$IFDEF CAANOO}
const
  UP_BUTTON        = CAANOO_UP_BUTTON;
  LEFT_BUTTON      = CAANOO_LEFT_BUTTON;
  DOWN_BUTTON      = CAANOO_DOWN_BUTTON;
  RIGHT_BUTTON     = CAANOO_RIGHT_BUTTON;
  FIRE_BUTTON      = CAANOO_B_BUTTON;
  
type
  TfwCEKeyControl  = TfwSDLInputKey;
{$ENDIF}

{$IFDEF PANDORA}
const
  SCREEN_WIDTH     = 800;
  SCREEN_HEIGHT    = 480;
  SCREEN_BPP       = 16;

const
  LEFT_BUTTON      = SDLK_LEFT;
  RIGHT_BUTTON     = SDLK_RIGHT;
  UP_BUTTON        = SDLK_UP;
  DOWN_BUTTON      = SDLK_DOWN;
  FIRE_BUTTON      = SDLK_HOME;

type
  TfwCEKeyControl  = TfwSDLInputKey;
{$ENDIF}

{$IFDEF N800}
const
  UP_BUTTON        = 1;
  LEFT_BUTTON      = 2;
  DOWN_BUTTON      = 3;
  RIGHT_BUTTON     = 4;
  FIRE_BUTTON      = 5;

type
  TfwCEKeyControl  = TfwSDLInputKey;
{$ENDIF}

{$IFDEF DINGUX}
const
  LEFT_BUTTON      = SDLK_LEFT;
  RIGHT_BUTTON     = SDLK_RIGHT;
  UP_BUTTON        = SDLK_UP;
  DOWN_BUTTON      = SDLK_DOWN;
  FIRE_BUTTON      = SDLK_SPACE;
  
type
  TfwCEKeyControl  = TfwSDLInputKey;
{$ENDIF}

implementation

end.
