I previously used Delphi 6 and now I'm using Lazarus. With both I could directly pass a string argument to SDL_LoadBMPOriginally Posted by GordonShumway
[pascal]
surface := SDL_LoadBMP('bitmap.bmp');
[/pascal]
But doing it with a string variable requires you to make it a pointer:
[pascal]
var
sFilename: String;
...
surface := SDL_LoadBMP(PChar(sFilename));
[/pascal]
Thats where I made most of my mistakes... lol .
Bookmarks