Closed rchastain closed 1 year ago
interesting timing - i have spent the last couple of months researching various object formats and creating a few programs. take a look at rtBinObj and rtBinSrc - feel free to fork and create linux versions if you find them useful.
back to your problem. it looks like you need to convert the pic.obj to a more cross platform format. it looks like its ega/vga screen dump
I'll take a look at your code and see if I can implement something to display with ptcgraph.
I am always looking for some small games to play around with
On Thu, 18 May 2023 at 14:04, Roland Chastain @.***> wrote:
Hello Nick. I hope you don't mind if I create this dicussion here. I discovered a project that you could find interesting:
I started to port it to Free Pascal + ptcGraph, but I have no idea how to load pictures. I said to myself that maybe you would accept to involve yourself in that little project.
I attach here the current state of my code. It compiles and starts, with pictures indexes displayed instead of pictures. Please see uobj.pas.
baby-chess-ptcgraph-230518.zip https://github.com/RetroNick2020/raster-master/files/11510434/baby-chess-ptcgraph-230518.zip
(By the way there is another interesting project https://github.com/rchastain/pascal-russian-checkers by the same author that I could port easily to FPC.)
Regards.
Roland
— Reply to this email directly, view it on GitHub https://github.com/RetroNick2020/raster-master/issues/22, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANSAEFJDZHOMC7AMTT27PN3XGZQEPANCNFSM6AAAAAAYGY3CEI . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Thanks for your kind answer. Yes, I will take a look at rtBinObj and rtBinSrc.
See you!
Meanwhile I found a temporary solution: I used graphics coming from another program. You can see the result here.
But I still would be interested in having the original pieces, if possible.
See you soon!
I fixed memory leaks, so it's better to use the code of the repository instead of the code that I posted here.
If you compile with make
, the program uses the replacement pictures.
If you compile with make original
, the program uses the uobj unit.
Hi Ronan,
I did a quick conversion of the pic.obj to a raw file. each byte represents a pixel. the pieces are 50x50, I have included modified code to display the pieces. this should get you back on track. you can convert the raw file to a byte array so you don't have to allocate memory or read it from disk. use the rtBinSrc program
On Thu, 18 May 2023 at 14:04, Roland Chastain @.***> wrote:
Hello Nick. I hope you don't mind if I create this dicussion here. I discovered a project that you could find interesting:
Baby Chess
I started to port it to Free Pascal + ptcGraph, but I have no idea how to load pictures. I said to myself that maybe you would accept to involve yourself in that little project.
I attach here the current state of my code. It compiles and starts, with pictures indexes displayed instead of pictures. Please see uobj.pas.
baby-chess-ptcgraph-230518.zip
(By the way there is another interesting project by the same author that I could port easily to FPC.)
Regards.
Roland
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>
Hi Nick. Great news! But I think that you forgot to attach the files.
That's great! Use what ever works better for you.
The new pieces look great! Unless you are trying to preserve the original I don't think you are losing anything.
if you decide to import the raw file to array using rtbinsrc set the items per line to 50. you will be able to see the chess pieces in text form.
Thank you very much Nick! Your code works perfectly. I also tried rtBinSrc, and it works perfectly too. Finally I decided to remove commas from Pascal code generated by rtBinSrc and to use it as a simple text file.
It's true that the new pieces are nice but I am glad to have also the original pieces.
Now I can focus on the chess program itself.
That's great. What ever format works for you.
Hello Nick. I hope you don't mind if I create this discussion here. I discovered a project that you could find interesting:
I started to port it to Free Pascal + ptcGraph, but I have no idea how to load the pictures. I said to myself that maybe you would accept to involve yourself in that little project.
I attach here the current state of my code. It compiles and starts, with pictures indexes displayed instead of pictures. Please see uobj.pas.
baby-chess-ptcgraph-230518.zip
(By the way there is another interesting project by the same author that I could easily port to FPC.)
Regards.
Roland