[alt.msdos.programmer] Borland BGI Limitations...

<ACPS2924@Ryerson.Ca> (01/29/91)

This is my problem,
in using the Borland BGI interface in TurboC++ i find that
the functions {imagesize(),getimage(),putimage() } all seem to work
for images that are <64k.  This poses a problem in anything better
than cga.  Imagesize returns only an unsigned int,(16 bits).
This works fine if you use malloc() and not farmalloc().
Has anyone gotten around this limitation?
Anyone have a patch.
Anyone have rewrites of these functions for ega/vga (target adapter).

Peter,

+----------------------------------------------------------------------+
acps2924@ryerson.ca ! Who is the  ! If plumbers designed toilets like
advisor1@ryerson.ca ! user,pray,  ! software professionals design tools,
                    ! and who is  ! we'd be up to our knees in crap.
                    ! the used ?  !                 - Charles A. Rovira
+----------------------------------------------------------------------+

teittinen@cc.helsinki.fi (Marko Teittinen) (01/30/91)

In article <91028.164531ACPS2924@Ryerson.Ca>, ACPS2924@Ryerson.Ca writes:
> This is my problem,
> in using the Borland BGI interface in TurboC++ i find that
> the functions {imagesize(),getimage(),putimage() } all seem to work
> for images that are <64k.  This poses a problem in anything better
> than cga.  Imagesize returns only an unsigned int,(16 bits).
> This works fine if you use malloc() and not farmalloc().
> Has anyone gotten around this limitation?

There is a very simple workaround for this limitation. You just divide
the area into such pieces that each of the pieces takes less than 64 kB
of memory. Using VGA high resolution mode, you shouldn't need more than
4 pieces. If you divide the area vertically and place the pieces on the
screen from top to bottom, there won't be even very much difference in
the way the image is drawn.

-- 
E-Mail: teittinen@finuh.bitnet               ! "Studying is the only way
        teittinen@cc.helsinki.fi             !  to do nothing without
Marko Teittinen, student of computer science !  anyone blaming you" -me