Lazarus
Programming => Graphics and Multimedia => Graphics => Topic started by: palazzol on January 28, 2017, 06:49:49 pm
-
Just wondering if anyone has created headers already for SDL_bgi, before I give it a go...
http://libxbgi.sourceforge.net/
I am looking at porting a large codebase from Turbo Pascal for DOS to SDL...and this would make life easier.
Thanks
-
FPC's graph is not bgi based. It would be more logical to make a SDL version for graph then to mess with libxbgi.
-
Hi marcov,
Not sure I understand... when you say "make a SDL version for Graph", do you mean reimplement all the drawing primitives? These functions already exist in SDL_bgi, and the function calls are the same from what I can see. So why wouldn't I want to just wrap and use them?
I'm comparing...
http://www.freepascal.org/docs-html/current/rtl/graph/index-5.html
with
http://www.cs.colorado.edu/~main/cs1300/doc/bgi/
(Incidentally, for my needs I don't care about the mouse and keyboard calls - I'd go straight to SDL for those. Maybe I don't even need to wrap them)
-
Well, you'd be porting away from graph then. Fine for a one off of course.
I was just thinking that porting the relevant parts of those old 2004 sources makes it all pascal (except for maintained libraries like SDL), and has the ability to be e.g. SDL less on Windows etc.
Anyway, no, I'm not aware of any headers. But there is a sdlgraph part of the FPC distribution, which might already have done this.
-
Thanks for the explanation - that makes sense. I'll look into that approach as well.
I'm not 100% sure but I think the sdlgraph stuff is based on the old SDL1.2, which I'd rather avoid.
But the code is interesting and worth looking at I think.