Tried your solution, it dosen't work...
Am i doing it wrong or... i tried to use what you told me below and got this
I know it's wrong, but with what should i replace that to make it work?Code:path:=pChar(ExtractFilePath(grafica.exeName));
Ahh now I see what is confusing you.
When I write use Application.ExeName I mean that literally.
You see in modern pascal dialects the Application is actually a global variable for TApplication class which contains several properties and methods. Best example of seeing this in use is looking ath the source of your project file (*.dpr file).
And one of its properties is ExeName which contains full filename of your application executable.
With Freepascal you can also use the "old school" way:
(No need for pChar as you can see.)Code:path:=ExtractFilePath(ParamStr(0));
Best regards,
Cybermonkey
What Silverwarrior suggested :
Tex[1]:=IMG_LoadTexture(PChar(Ren,path+'\monster.bmp'));
should read :
Tex[1]:=IMG_LoadTexture(Ren,PChar(path+'\monster.bmp'));
When the moon hits your eye like a big pizza pie - that's an extinction level impact event.
Ok, in the end i mananged to find out how to make it work with paths, thanks to both of you
Another question: I've heard from my teacher that in the Pascal IDE are some options or something like that to show the amount of memory and time execution of a program. Can you tell me how to make use of them?
Bookmarks