Prashant47 / libgraph

libgraph is an implementation of the TurboC graphics API (graphics.h) on GNU/Linux using SDL
Other
16 stars 5 forks source link

i smell a fork #1

Open JazzMaster opened 7 years ago

JazzMaster commented 7 years ago

this fixes a less than to be desired "code hole" from JEDI-SDL that DOS/win has tried to fix for lazarus called -graph-obviously.

Unfortunately, there is no equivalent on unices/macos because ncurses/libVESA handles this. The Lazarus video unit is hackish at best(an os devel course section Ive already mastered) and only works on the REAL console, as you have mentioned, libVESA or eqivalent already handles that. OH , try this with X11 running! You need SDL or OGL instead of the console for that.Any libVESA calls immeadiately fail. The card is IN USE. DUH!

heres the rub. This is only available in C. While I get the BGI code in C, the linkage and include hell is confusing me.(Im thinking the "uses clause" here but I dont have that said unit installed in pascal....)

Id love nothing more than a BGI Lazarus/fpc compatible port. FULL SOURCES with mind you two caveats:

sdl demo openGL demo

the port is good. We should be showing how to demo sdl/allegro and openGL/CL as well. That is PROPER way to code. But in a pinch, the BGI works well. And it CAN be hacked to 1966x768 for example.

everyone seem to have forgotten that code is universal and language agnostic. what can be done in c, can mostly be done in pascal but better, and usually type safer.

you reference two issues(Id call them bugs, theres a way already to address these):

--

arg-v(command line input)-see also python version of this(which is bugged) (argv determines calling functions and sub-fuctions you want when calling an app.)

someapp.bin --ihateSin --cleanUP

lin-phites here go hog wild.(try mining with multipool) anything over 120 chars for program input I find overkill.

-- line length on a 80x25 'console'(the default terminal window size) I always assumed a CGA 80x35(I was writing on an 8088 for god sake), but as with python --there are ways to NOT assume--and get this input from the 'window' or 'terminal' and adjust accordingly. That would be the better way to do things. "I doubt consoles have a 256 char line input."

also, Ive heard yada yada about porting code back and forth between c/pascal. do ones homework. C is a trip for me. But I make an attempt at least..

maybe Ill get back to you when I feel so inclined.