Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2006-02

FPC game development (was: Pascal on Linux community)

3 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Felipe Monteiro de Carvalho
to Bisma Jayadi
Bisma Jayadi wrote 6 lines
I have a small domino card game. It was developed on Delphi (7) using my TDominoCard component (http://www.torry.net/quicksearchd.php?String=domino&Title=Yes). I plan to convert it to Lazarus. But, I don't know how to convert the TDominoCard component since Lazarus does not support .res file, while this component depends on a .res file contain card images.

Lazarus supports .res files. I use them often. just do a {$R myresfile.res} and you can use it with the Windows API.

What is the exact code that uses the .res files?

The only problem is that .res files are not multiplatform. You could try getting the image on the .res file and extract them to .bmp files. If you don´t want to distribute many .bmp files you can always create a single big file containing all bmps.

There are various tools that can read the contents of a .res file and extract them.

Felipe Monteiro de Carvalho
Marco van de Voort
to Felipe Monteiro de Carvalho
Show quoted text 20 lines
On 2/2/06, Bisma Jayadi wrote: > I have a small domino card game. It was developed on Delphi (7) using my > TDominoCard component > (http://www.torry.net/quicksearchd.php?String=domino&Title=Yes). I plan to > convert it to Lazarus. But, I don't know how to convert the TDominoCard > component since Lazarus does not support .res file, while this component depends > on a .res file contain card images. Lazarus supports .res files. I use them often. just do a {$R myresfile.res} and you can use it with the Windows API. What is the exact code that uses the .res files? The only problem is that .res files are not multiplatform. You could try getting the image on the .res file and extract them to .bmp files. If you don?t want to distribute many .bmp files you can always create a single big file containing all bmps. There are various tools that can read the contents of a .res file and extract them.

I think he simply means the change of how the compiled .dfm is included.

(from the delphi {$i *.res} to initialization {$I frmmain.lrs})

To OP: this is can be done using the conversion functions, or manually with a bit of ifdeffing if you want to keep delphi compat.