FPC game development (was: Pascal on Linux community)

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

FPC game development (was: Pascal on Linux community)

Bee-6
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.

Help and suggestion are needed. TIA.

-Bee-

has Bee.ography at
http://beeography.blogsome.com
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: FPC game development (was: Pascal on Linux community)

Felipe Monteiro de Carvalho
On 2/2/06, Bisma Jayadi <[hidden email]> 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.

--
Felipe Monteiro de Carvalho
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: FPC game development (was: Pascal on Linux community)

Marco van de Voort
> On 2/2/06, Bisma Jayadi <[hidden email]> 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.
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal