Virtual Graphics Library (in the works)

new topic     » topic index » view thread      » older message » newer message

I am creating a graphics library that uses virtual pages in memory.  I
am making this because I don't like the ones I've seen (no offense or
anything...).  But i have just this one problem...the routine i use to
put the virtual info onto the screen causes the program to lock up or
give a message telling you to 'quit all programs and reboot your
computer' (I'm testing on Win95).  Here's a demo program that shows the
style I'm using...please either point me in the right direction or
email me a copy that is correct.

I APOLOGIZE BEFORHAND FOR MY SLOPPY PROGRAMMING, THIS IS HOW THINGS
LOOK BEFORE I NEATEN THEM UP.

TEST.EX:

include machine.e
constant img=repeat(repeat(15,640),480)
--the above line makes a 640x480 BRIGHT_WHITE rectangle
atom mem,mem2
mem=allocate(480*640) --make buffer in memory
mem2=mem --this will be used later...
include graphics.e
if graphics_mode(18) then end if --put to 640x480x16
for y=1 to 480 do
     for x=1 to 640 do
          poke(mem2,img[y][x]) --poke pixels in one at
          mem2=mem2+1          --a time
          --move further into memory
     end for
end for
mem_copy(#A0000,mem,640*480)--put stuff from memory to
                            --screen. (visible)
include get.e
if wait_key() then end if --wait for keypress
free(mem) --free allocated memory
if graphics_mode(-1) then end if --restore graphics

----END----
YOU MAY WANT TO COPY AND PASTE THIS INFO ONTO AN EDITOR
USING A MONOSPACED FONT...DOING SO WOULD MAKE THIS
EASIER TO READ.

Thank you ahead of time, and please respond,
Mike Hurley
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu