Mail Archives: djgpp/1997/09/24/09:15:22
From: | ludvig <ludvig AT club-internet DOT fr>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | How to use movedata with a pointer ?
|
Date: | Mon, 22 Sep 1997 18:06:16 +0200
|
Organization: | Grolier Interactive Europe
|
Lines: | 35
|
Message-ID: | <34269778.15B8@club-internet.fr>
|
Reply-To: | ludvig AT club-internet DOT fr
|
NNTP-Posting-Host: | ppp-106-3.villette.club-internet.fr
|
Mime-Version: | 1.0
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Hi everyone!
I'm trying to speed up some graphic code of mine so a friend can be
amazed about what you can do with DJGPP(he=486DX66, me P133). So, the
thing is that I have a screen_buffer that I want to put on screen, no
problem, I have already written a C-optimized(more or less) put_bmp
function, but I want to put a specific bitmap always on a specific place
on sceen and I want to use movedata until I start programming
asm...(movedata might speed up my put_bmp function too but it's not that
important, yet:) ).
So, I have a
screen_buffer=malloc(416*416*2); in my init_graphics() function
and I would be able to flush a selected part on 0xA0000+offset.
like
for(n=0;n<208;n++)
_farpokew(_dos_ds,0xA0000+offset+n,screen_buffer[ibmp+n]);
where offset and ibmp is *eh* offsets.
But I want to use movedata.
How do I do? I have tried in vain to set the _my_ds selector to
screen_buffer[ibmp] etc and well, it doesn't work. I think the solution
might be really simple but as with problems, when you don't know the
answers, they are always hard to solve.
Ludvig
ps. please send me a copy <ludvig AT club-internet DOT fr>
- Raw text -