From: Nate Eldredge Newsgroups: comp.os.msdos.djgpp Subject: Re: [OT] graphics routines Date: 11 May 2001 18:48:37 -0700 Organization: InterWorld Communications Lines: 40 Sender: nate AT mercury DOT st DOT hmc DOT edu Message-ID: <83pudf8hhm.fsf@mercury.st.hmc.edu> References: <3afc6377 AT leia DOT ktsnet DOT com> NNTP-Posting-Host: mercury.st.hmc.edu Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: nntp1.interworld.net 989632118 81807 134.173.57.219 (12 May 2001 01:48:38 GMT) X-Complaints-To: usenet AT news DOT interworld DOT net NNTP-Posting-Date: Sat, 12 May 2001 01:48:38 +0000 (UTC) User-Agent: Gnus/5.0802 (Gnus v5.8.2) Emacs/20.5 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com "Cody" writes: > How would I in DJGPP do the following:? I have browsed the allegro game > library but got nothing out of it (wayyyy too much code). I can do the If you use allegro, you can just call its functions, and don't need to know how it works inside. I found the manual and example programs quite sufficient to figure out how to use it. > following in 16-bit does apps, but DJGPP's 32-bit protected mode poses a > problem. Links to the code or just replies with the code would certainly be > appreciated. > > 1. get into different video modes (320x200 w/ 256 colors and more, 320x240 > w/ 256 colors and more, 640x480 w/ 256 colors and more, etc.)? __dpmi_int > 2. put a pixel in those modes (any difference in them...?)? _farpokeb(_dos_ds, 0xa0000 + offset, color) > 3. get back into 80x25 text mode? __dpmi_int > I'm unfamiliar with at&t style asm (plus I'm and even if I knew at&t style asm I wouldn't be able to do it since I think > 32-bit protected mode getting into graphics are different than what I have > to do with turbo c++. I hope that the putpixel routine is the fastest that > you know of, because that's the only one that really needs a lot of speed. Actually, if your algorithm depends on putpixel being fast, it's in trouble. You should draw your image to a buffer somewhere and blit it into video memory (dosmemput is helpful here). -- Nate Eldredge neldredge AT hmc DOT edu