Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Stashi

drawing a line in a dos window?

This topic is 6168 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

i''m trying to create a dos window and simply draw some lines. i''ve been trying to use graphics.h (i''ve downloaded several examples of line drawing in dos), but it generates so many errors for me. for example: c:\microsoft visual studio\vc98\include\graphics.h(347) : error C4226: nonstandard extension used : ''far'' is an obsolete keyword i get that about 100 times (for each time far is mentioned in the header). what is wrong with all of this? why won''t it work? im using c++

Share this post


Link to post
Share on other sites
Advertisement
It looks like you are using MSVC. The console mode does not support any graphics modes. You need to get a full DOS compiler like DJGPP for writing DOS applications

Share this post


Link to post
Share on other sites
If your just looking to do simple dos stuff like drawing lines and other geometry, then i suggest Allegro, which to my knowledge can only be used with a command line compiler like DJGPP... you can find them all for download at the DJGPP website, i think it''s www.delorie.com... (look for a "zip picker")

__
Tsu

Share this post


Link to post
Share on other sites
far is an old keyword that was used in 16-bit programming on 32-bit processors (386. 486 in particular) to indicate that the value or address being pointed to was beyond the usually accessible range . However, with 32-bit native programming (which is what you do under Windows), you can address over 4GB of memory - essentially making memory addressing linear (and far obsolete).

<graphics.h> was provided on versions of MSVC prior to 4.0 (the last one I got it with was v1.52). It defines a bunch of DOS graphics. However, having a header file means nothing if you don''t have the executable code, and the corresponding code is not provided and plain doesn''t work.

If you wish to do Windows graphics (which I heartily recommend, as WinXP plans to banish DOS forever), look into GDI, DirectGraphics and OpenGL.

Share this post


Link to post
Share on other sites
well see, i would do stuff like Opengl (i have, in fact) and DirectX, but I was just really hoping to attempt and make a raycasting engine in dos, similar to Wolfeinstein...just for fun

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I would suggest allegro (www.allegro.cc). No, it''s not just command line, it can be used on DJGPP, MingW, MSVC++, Dev-C++, and probably some more. I still use it for some stuff. Try it out, it''s easy and good.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!