Thanks again. The program is working now, but now I'm trying to implement the input handeling and FPC acts up again.
The code is the following:
Code:
pressedkeys_: array of boolean;  

[...]

procedure input.keydownevent(event:psdl_event);
begin
    pressedkeys_[event^.key.keysym.scancode] := true;
end;

[...]

function input.waskeypressed(key:psdl_keycode): boolean;
var
    event: integer;
begin
    event := key^.keysym.sym;
    waskeypressed := pressedkeys_[event];
end;
and the part in the game loop:
Code:
        while sdl_pollevent(@e) <> 0 do
        begin
            case e^.type_ of
                sdl_keydown: input_.keydownEvent(e);
            end;
            if input_.waskeypressed(e) = sdlk_escape then running := false;
        end;
The "event := key^.keysym.sym;" part in input.waskeypressed gives me "Error: Illegal qualifier". It's probably a very trivial mistake on my part, but I can't really figure it out on my own.

Thanks again in advance for any help.