Jump to content
xisto Community
Asphinx

C++ Dos Graphics How do I display graphics in dos?

Recommended Posts

I have just started programming in c++ and have a DOS game set up that would benefit greatly from some graphics/animations. unfortunately, I have absolutely no idea how to go about this, and to amke matters worse, have no idea as to how to add graphics in general. so my question to everyone else is:how do I add graphics to my dos application?if it helps I am using the Dev-Bloodshed compiler, and would be willing to switch.looking for help,Asphinx

Share this post


Link to post
Share on other sites

My main reason for disliking C++ is that it has no built in graphics support. You must find and download a library of grpahics functions. There are two routes to take. One is do a search for a VGA graphics library and the other is to get a DirectX library and learn DirectX. For a simple DOS game I recommend the former, or even switching to QBASIC.~Viz

Share this post


Link to post
Share on other sites

You should look for the Borland Graphics Interface.It comes with the Borland C/C++ Compiler.But I think you should change of compiler to these.And search for help on using this.The basic code for startin graphics using this is:initgraph()And to close you used:closegraph()So you cand add this code to a class, maybe called Graphics, and the contrutor may open graphics mode, and the destructor may close it.

Share this post


Link to post
Share on other sites

I have just started programming in c++ and have a DOS game set up that would benefit greatly from some graphics/animations. unfortunately, I have absolutely no idea how to go about this, and to amke matters worse, have no idea as to how to add graphics in general. so my question to everyone else is:

how do I add graphics to my dos application?

if it helps I am using the Dev-Bloodshed compiler, and would be willing to switch.

 

looking for help,

Asphinx

<{POST_SNAPBACK}>


You can start by doing a google search for VGA Graphics. VGA was used in most DOS games. There was one VGA graphics library that I found. But, I don't remember the website. The best way to create the graphics is to do a google for Deluxe Paint II enhanced. This program is probibally abandonware, but It was used to create the graphics for the old LucasArts games, like: Indiana Jones and the Fate of Atlantis, and other ones too.

Share this post


Link to post
Share on other sites

Although Dev c++ is best I recommend turbo c++ for Dos based graphics.I myself have made a project based on Hospital Management in entirely console mode.If you are not interested in windows and socket level programming right now then Dev c++ is of no use.Use instead turbo c++ an open source compiler from Borlond.Click below to download

 

http://forums.xisto.com/no_longer_exists/

 

HOMEPAGE: http://forums.xisto.com/no_longer_exists/

 

One simple example to Draw a circle in Dos based mode in turbo c++

#include <graphics.h>#include <stdlib.h>#include <stdio.h>#include <conio.h>int main(void){   /* request auto detection */   int gdriver = DETECT, gmode, errorcode;   int midx, midy;   int radius = 100;   /* initialize graphics and local variables */   initgraph(&gdriver, &gmode, "");   /* read result of initialization */   errorcode = graphresult();   if (errorcode != grOk)  /* an error occurred */   {      printf("Graphics error: %s\n", grapherrormsg(errorcode));      printf("Press any key to halt:");      getch();      exit(1); /* terminate with an error code */   }   midx = getmaxx() / 2;   midy = getmaxy() / 2;   setcolor(getmaxcolor());   /* draw the circle */   circle(midx, midy, radius);   /* clean up */   getch();   closegraph();   return 0;}
Edited by miCRoSCoPiC^eaRthLinG (see edit history)

Share this post


Link to post
Share on other sites

I am not very sure as to your expertice with compilers and also the language as such. The way you described, it reminds me of days when I started doing graphics programming in C.

What I would suggest now are few guidelines. Decide on how you are going to proceed on this guidelines and ask for details. I would be able to help.

1. As suggested above, use the Borland Graphics API. This would be good if you are in the initial phase and want to learn the basics of graphics.

2. You are a good programmer in C, then you might try a bit of hand on the VGA dos routines. I believe they are the 21h routines. I do not remember exactly, but would look up and tell more if you are going this way. But I must warn you that this would require a bit of machine knowledge - that is, some assemble basics.

3. After about a year of programming for graphics and games, I ended up with this option. Use Allegro graphics package along with the DJGPP, a 32-bit C/C++ development system for Intel 30386+ PCs running under DOS. The two of them work amazingly together, giving a robust executable in the end. Links: Allegro, DJGPP. Both of these are open source, that means you do not need to pay anything for using them. What more? You dont need to pay anything for the products you launch using them - you do not need to give them a royalty.

OK. I would better stop now, lest it would seem that I am spamming. ;)

:) Anyways, I will track this topic, so if you need anything, ask here, and I will see what my rusty brain can find and reply. ;)

Share this post


Link to post
Share on other sites

Here is a website that has alot of older Gra[phic libaries and code sample for DOS, Win32, Linux etc.

https://smallbusiness.yahoo.com/

There is the classic VESA for dos which I think is like what DirectX is for the new Windows range. There are quite a few other libary's and also they do take advatage of the older and smaller video cards. This could be a disadvantage though if you have a newer video card as these libaries what support alot of its features. Plus you would probably need to get a dos driver for you video card.

Share this post


Link to post
Share on other sites

Here is a coded picture for a DOS window. I forget the program that was used to create it. I was in school then and someone in my team did the pictures while the rest of the team were coding actions. This picture will display a picture of a church right in the DOS window. Maybe searching for DOS graphics software will net the program that made this code.

/********************************************************************/void Pic::mainpic()//picture of the church/********************************************************************/{		unsigned char TITLE [] = {	' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',	' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',	' ',  ' ',  ' ',  ' ',  ' ',  'Âł',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',	' ',  ' ',  'Ă',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',	' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',	' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',	' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',	' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  'Ă',  'Ă',  'Ă',  'Ă',  'Ă',	' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',	' ',  'Âł',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  'Ă',  'Ă',  'Ă',	' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',	' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',	' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',	' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',	' ',  ' ',  ' ',  'Âł',  ' ',  ' ',  ' ',  'Âł',  ' ',  ' ',  ' ',  ' ',	' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  'Âł',  ' ',  ' ',	' ',  ' ',  ' ',  ' ',  ' ',  ' ',  'Ă',  ' ',  ' ',  ' ',  ' ',  ' ',	' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',	' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',	' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',	' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  'Âł',	' ',  ' ',  ' ',  'Âł',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',	' ',  ' ',  ' ',  ' ',  ' ',  'Âł',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',	'Ă',  'Ă',  'Ă',  'Ă',  'Ă',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',	' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',	' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',	' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',	' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  'Ă',  'Ă',  'Ă',  'Ă',  'Ă',	' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',	' ',  'Âł',  ' ',  ' ',  ' ',  ' ',  ' ',  'Ă',  'Ă',  'Ă',  'Ă',  'Ă',	'Ă',  'Ă',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',	' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',	' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',	' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',	' ',  ' ',  ' ',  'Âł',  ' ',  ' ',  ' ',  'Âł',  ' ',  ' ',  'Ă',  'Ă',	'Ă',  ' ',  ' ',  'Âł',  'Ă',  'Ă',  'Ă',  ' ',  ' ',  'Âł',  'Ă',  'Ă',	' ',  ' ',  ' ',  'Ă',  'Ă',  'Ă',  'Âł',  'Ă',  'Ă',  'Âż',  ' ',  ' ',	' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',	' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',	' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',	' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  'Âł',	' ',  ' ',  ' ',  'Âł',  ' ',  ' ',  'Âł',  ' ',  'Âł',  ' ',  ' ',  'Âł',	' ',  ' ',  ' ',  ' ',  ' ',  'Âł',  ' ',  'Âł',  ' ',  ' ',  ' ',  'Âł',	'Ă',  'Ă',  'ĂŞ',  'Ă',  'Ă',  'Âł',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',	' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',	' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',	' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',	' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  'Âł',  ' ',  ' ',  ' ',  'Âł',	' ',  ' ',  'Âł',  ' ',  ' ',  ' ',  ' ',  'Âł',  'Ă',  'Ă',  'Ă',  ' ',	' ',  'Âł',  ' ',  'Âł',  ' ',  ' ',  ' ',  'Ă',  'Ă',  'Ă',  'Ă',  'Ă',	'Ă',  'Ă',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',	' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',	' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',	' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',	' ',  ' ',  ' ',  'Âł',  ' ',  ' ',  ' ',  'Âł',  ' ',  ' ',  'Âł',  ' ',	' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',	' ',  ' ',  'Ă',  'Ă',  'Ă',  'Ă',  'Âş',  'Ă',  'Ă',  'Ă',  'Ă',  ' ',	' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',	' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',	' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',	' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  'Âł',	' ',  ' ',  ' ',  'Âł',  ' ',  ' ',  'Âł',  ' ',  ' ',  ' ',  ' ',  ' ',	' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  'Ă',  'Ă',  'Ă',	'Ă',  'Ă',  'Âş',  'Ă',  'Ă',  'Ă',  'Ă',  'Ă',  ' ',  ' ',  ' ',  ' ',	' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',	' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',	' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',	' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',	' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',	' ',  ' ',  'Ă',  'Ă',  '²',  'Ă',  'Ă',  'Ă',  'Ă',  'Ă',  'Âş',  'Ă',	'Ă',  'Ă',  'Ă',  'Ă',  '²',  'Ă',  'Ă',  ' ',  ' ',  ' ',  ' ',  ' ',	' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',	' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',	' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',	' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',	' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  'Ă',  'Ă',  'Ă',  'Ă',  'Ă',	'²',  'Ă',  'Ă',  'Ă',  'Ă',  'Ă',  'Âş',  'Ă',  'Ă',  'Ă',  'Ă',  'Ă',	'²',  'Ă',  'Ă',  'Ă',  'Ă',  'Ă',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',	' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',	' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',	' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',	' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',	' ',  ' ',  'Ă',  'Ă',  'Ă',  'Ă',  'Ă',  'Ă',  '²',  'Ă',  'Ă',  'Ă',	'Ă',  'Ă',  'Âş',  'Ă',  'Ă',  'Ă',  'Ă',  'Ă',  '²',  'Ă',  'Ă',  'Ă',	'Ă',  'Ă',  'Ă',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',	' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',	' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',	' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',	' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  'Ă',  'Ă',  'Ă',	'Ă',  'Ă',  'Ă',  'Ă',  '²',  'Ă',  'Ă',  'Ă',  'Ă',  'Ă',  'Ă',  'Ă',	'Ă',  'Ă',  'Ă',  'Ă',  '²',  'Ă',  'Ă',  'Ă',  'Ă',  'Ă',  'Ă',  'Ă',	' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',	' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',	' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',	' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',	' ',  ' ',  ' ',  ' ',  'Ă',  'Ă',  'Ă',  'Ă',  'Ă',  'Ă',  'Ă',  'Ă',	'²',  'Ă',  'Ă',  'Ă',  'Ă',  'Ă',  'Ă',  'Ă',  'Ă',  'Ă',  'Ă',  'Ă',	'²',  'Ă',  'Ă',  'Ă',  'Ă',  'Ă',  'Ă',  'Ă',  'Ă',  ' ',  ' ',  ' ',	' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',	' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',	' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',	' ',  'Ă',  'Ă',  'Ă',  'Ă',  'Ă',  'Ă',  ' ',  ' ',  ' ',  ' ',  'Ă',	'Ă',  'Ă',  '²',  'Ă',  'Ă',  'Ă',  'Ă',  'Ă',  'Ă',  'Ă',  'Ă',  'Ă',	'Ă',  'Ă',  'Ă',  'Ă',  'Ă',  'Ă',  'Ă',  'Ă',  'Ă',  'Ă',  'Ă',  'Ă',	'Ă',  'Ă',  '²',  'Ă',  'Ă',  'Ă',  ' ',  ' ',  ' ',  ' ',  'Ă',  'Ă',	'Ă',  'Ă',  'Ă',  'Ă',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',	' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',	' ',  ' ',  'Ă',  'Ă',  'Ă',  'Ă',  'Ă',  ' ',  ' ',  '²',  '²',  '²',	'²',  '²',  '²',  '²',  '²',  '²',  '²',  'Ă',  'Ă',  'Ă',  '²',  'Ă',	'Ă',  'Ă',  'Ă',  'Âş',  'Âş',  ' ',  'Ă',  'Ă',  'Ă',  'Âť',  'Âş',  'Ă',	'Ă',  'Ă',  'Âť',  ' ',  'Âş',  'Âş',  'Ă',  'Ă',  'Ă',  'Ă',  '²',  'Ă',	'Ă',  'Ă',  '²',  '²',  '²',  '²',  '²',  '²',  '²',  '²',  '²',  '²',	' ',  ' ',  'Ă',  'Ă',  'Ă',  'Ă',  'Ă',  ' ',  ' ',  ' ',  ' ',  ' ',	' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  'Âą',  'Âą',	'Âą',  'Âą',  'Âą',  'Âą',  'Âą',  '²',  '²',  '²',  '²',  '²',  '²',  '²',	'²',  '²',  '²',  'Ă',  'Ă',  'Ă',  '²',  'Ă',  'Ă',  'Ă',  'Ă',  'Âş',	'Âş',  'Ă',  'Ă',  'Ă',  'Ă',  'Ă',  'Âş',  'Ă',  'Ă',  'Ă',  'Ă',  'Ă',	'Âş',  'Âş',  'Ă',  'Ă',  'Ă',  'Ă',  '²',  'Ă',  'Ă',  'Ă',  '²',  '²',	'²',  '²',  '²',  '²',  '²',  '²',  '²',  '²',  'Âą',  'Âą',  'Âą',  'Âą',	'Âą',  'Âą',  'Âą',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',	' ',  ' ',  ' ',  ' ',  ' ',  ' ',  'Âą',  'Âą',  'Âą',  'Âą',  'Âą',  'Âą',	'Âą',  '²',  '²',  '²',  '²',  '²',  '²',  '²',  '²',  '²',  '²',  'Ă',	'Ă',  'Ă',  '²',  'Ă',  'Ă',  'Ă',  'Ă',  'Âş',  'Âş',  ' ',  'Ă',  'Ă',	'Ă',  'Âť',  'Âş',  'Ă',  'Ă',  'Ă',  'Âť',  ' ',  'Âş',  'Âş',  'Ă',  'Ă',	'Ă',  'Ă',  '²',  'Ă',  'Ă',  'Ă',  '²',  '²',  '²',  '²',  '²',  '²',	'²',  '²',  '²',  '²',  'Âą',  'Âą',  'Âą',  'Âą',  'Âą',  'Âą',  'Âą',  ' ',	' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',	' ',  ' ',  'Âą',  'Âą',  'Âą',  'Âą',  'Âą',  'Âą',  'Âą',  '²',  '²',  '²',	'²',  '²',  '²',  '²',  '²',  '²',  '²',  'Ă',  'Ă',  'Ă',  '²',  'Ă',	'Ă',  'Ă',  'Ă',  'Âş',  'Âş',  ' ',  'Ă',  'Ă',  'Ă',  'Ă',  'Âş',  'Ă',	'Ă',  'Ă',  'Ă',  ' ',  'Âş',  'Âş',  'Ă',  'Ă',  'Ă',  'Ă',  '²',  'Ă',	'Ă',  'Ă',  '²',  '²',  '²',  '²',  '²',  '²',  '²',  '²',  '²',  '²',	'Âą',  'Âą',  'Âą',  'Âą',  'Âą',  'Âą',  'Âą',  ' ',  ' ',  ' ',  ' ',  ' ',	' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  'Âą',  'Âą',	'Âą',  'Âą',  'Âą',  'Âą',  'Âą',  '²',  '²',  '²',  '²',  '²',  '²',  '²',	'²',  '²',  '²',  'Ă',  'Ă',  'Ă',  '²',  'Ă',  'Ă',  'Ă',  'Ă',  'Âş',	'Âş',  'Ă',  'Ă',  'Ă',  'Ă',  'Âť',  'Âş',  'Ă',  'Ă',  'Ă',  'Âť',  'Ă',	'Âş',  'Âş',  'Ă',  'Ă',  'Ă',  'Ă',  '²',  'Ă',  'Ă',  'Ă',  '²',  '²',	'²',  '²',  '²',  '²',  '²',  '²',  '²',  '²',  'Âą',  'Âą',  'Âą',  'Âą',	'Âą',  'Âą',  'Âą',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',  ' ',	' ',  ' ',  ' ',  ' ',  ' ',  ' ',  'Âą',  'Âą',  'Âą',  'Âą',  'Âą',  'Âą',	'Âą',  '²',  '²',  '²',  '²',  '²',  '²',  '²',  '²',  '²',  '²',  'Ă',	'Ă',  'Ă',  '²',  'Ă',  'Ă',  'Ă',  'Ă',  'Âş',  'Âş',  ' ',  'Ă',  'Ă',	'Ă',  'Ă',  'Âş',  'Ă',  'Ă',  'Ă',  'Ă',  ' ',  'Âş',  'Âş',  'Ă',  'Ă',	'Ă',  'Ă',  '²',  'Ă',  'Ă',  'Ă',  '²',  '²',  '²',  '²',  '²',  '²',	'²',  '²',  '²',  '²',  'Âą',  'Âą',  'Âą',  'Âą',  'Âą',  'Âą',  'Âą', ' '};	int ctr;	for(ctr = 0;ctr <= 1750;ctr++)	cout<<TITLE[ctr];

Share this post


Link to post
Share on other sites

I have just started programming in c++ and have a DOS game set up that would benefit greatly from some graphics/animations. unfortunately, I have absolutely no idea how to go about this, and to amke matters worse, have no idea as to how to add graphics in general. so my question to everyone else is:how do I add graphics to my dos application?
if it helps I am using the Dev-Bloodshed compiler, and would be willing to switch.

looking for help,
Asphinx



I don't think DevC++ compiles for DOS. As far as I know it compiles console-mode programs, but I'm pretty sure they require the win32 libraries - check your compiled executable for dependencies and you may find "MSVCRT.DLL" - if this is the case, your program won't even run in DOS with your compiler.

I would recommend you give up the oldschool and move to a more supported GUI. There are plenty of multiplatform libraries out there that are very simple, and work well with DevC++.

Check out SDL - the Simple Directmedia Layer. You can find it on Google quite easily, along with how to use it in DevC++ - assuming you're not using the Package Manager (which I don't recommend).


As for DOS, you'll get like .002% support and user base - and you'll be stuck with pretty much useless code that has trouble even in windows. (I was mad when I was no longer able to use INT 10, 13, and 33 for keyboard, video, and mouse) - but if you want DOS - I too would recommend an old borland system - although... eck - it's like black and white CRT television.

Share this post


Link to post
Share on other sites
about c++ programming using the graphics.hC++ Dos GraphicsHow can I make my own c++ program using the graphics.H.Can you lend me some ideas about it. And also we have must have 5 page program.And if we run it,it will appear a 5 different shapes.So I'm hoping that you can help me. Thanks. 
 
-reply by bernadette

Share this post


Link to post
Share on other sites
My pc not support graphics.h(c++)C++ Dos Graphics

Even though I copy codes to run in my computer ,but it still displays a message that graphics.H could not support under window.

Please tell me the way to solve or better still do I need some software to install or not?

 

-reply by polen

Share this post


Link to post
Share on other sites
@ marsdenC++ Dos Graphics

I had 1 error with the code you sent:

graphics.Cpp: error:  expected unqualified-id before '{' token.  /txtmngr/images/smileys/smiley5.Gif

Please reply with solution!

-reply by random guest

 

Share this post


Link to post
Share on other sites
graphics.hC++ Dos Graphics

graphics.H can't work on windows 7 operating system..

if you are running windows 7 operating system on your computer.. 

you can download dosbox then run c++ in it..

with that you can run graphics.H on windows 7 but check first the graphics.H

on the option->linker->mark graphics.H

-reply by Jean Carlo Bacolod

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.