Thanks for your suggestion, I'll try to get the cvs updates up and running. TortoiseCVS is a good tool to do so, isn't it?


Considering the code example my SDLTest.dpr looks like this:

Code:
program SDLTest;

uses
  windows,
  SysUtils,
  SDL;

var
  screen_ : PSDL_Surface;

procedure display_bmp(file_name : PChar);
var
  image : PSDL_Surface;
begin
  // Load the BMP file into a surface
  image := SDL_LoadBMP(file_name);
  if (image = nil) then
  begin
    MessageBox(0, PChar(Format('Couldn''t load %s : %s',
      [file_name, SDL_GetError])), 'Error', MB_OK or MB_ICONHAND);
    exit;
  end;
  if (image.format.palette and screen_.format.palette) then
  begin
    SDL_SetColors(screen_, @image.format.palette.colors[0], 0, image.format.palette.ncolors);
  end;
  // Blit onto the screen surface
  if &#40;SDL_BlitSurface&#40;image, nil, screen_, nil&#41; < 0&#41; then
    MessageBox&#40;0, PCHar&#40;Format&#40;'BlitSurface error &#58; %s', &#91;SDL_GetError&#93;&#41;&#41;, 'Error', MB_OK or MB_ICONHAND&#41;;
  SDL_UpdateRect&#40;screen_, 0, 0, image.w, image.h&#41;;
  // Free the allocated BMP surface
  SDL_FreeSurface&#40;image&#41;;
end;

begin
  // Initialize the SDL library
  if &#40;SDL_Init&#40;SDL_INIT_VIDEO&#41; < 0&#41; then begin
    MessageBox&#40;0, PChar&#40;Format&#40;'Couldn''t initialize SDL &#58; %s',
      &#91;SDL_GetError&#93;&#41;&#41;, 'Error', MB_OK or MB_ICONHAND&#41;;
    // Clean up on exit
    SDL_Quit;
    exit;
  end;

  &#40;*
   * Initialize the display in a 640x480 8-bit palettized mode,
   * requesting a software surface
   *&#41;
  screen_ &#58;= SDL_SetVideoMode&#40;640, 480, 8, SDL_SWSURFACE or SDL_ANYFORMAT&#41;;
  display_bmp&#40;'./auweia.bmp'&#41;;
  if &#40;screen_ = nil&#41; then begin
    MessageBox&#40;0, PChar&#40;Format&#40;'Couldn''t set 640x480x8 video mode &#58; %s',
      &#91;SDL_GetError&#93;&#41;&#41;, 'Error', MB_OK or MB_ICONHAND&#41;;
    SDL_Quit;
    exit;
  end;
end.
It is taken directly from the "Object Pascal SDL Doc.chm" file and Delphi complains about the following line:

Code:
if &#40;image.format.palette and screen_.format.palette&#41; then
with the message "Operator is not applicable to this operands." (hopefully proper translated from german)