From: "A. Sinan Unur" Newsgroups: comp.os.msdos.djgpp Subject: Re: Kinda long bitmap question... Date: Mon, 22 Dec 1997 13:29:21 -0600 Organization: Cornell University Lines: 33 Sender: asu1 AT cornell DOT edu (Verified) Message-ID: <349EBF91.EAF@cornell.edu> References: <349ea65f DOT 126291690 AT news DOT earthlink DOT net> Reply-To: sinan DOT unur AT cornell DOT edu NNTP-Posting-Host: facilityk-dns.human.cornell.edu Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Jaster wrote: > > Ok.. in 320x200 graphics mode, I want to have a buffer[64000] that I > can copy to a BITMAP * using memcpy.. for example > > memcpy(bitmap->line[0],buffer,64000); > > now my question is.. when I fill buffer[64000] with the int 4 and then > memcpy it to a bitmap (320x200) that I have previously made.. instead > of filling the whole bitmap with the color red.. it only fills > everyother verticle line with red.. I'm not trying to use this as a > clear_to_color() but I eventually hope to edit the buffer[64000] > thereby being able to edit the bitmap... > > I hope I put this clearly enough.. If you need to see the source I'm > using I can post it.. it's not very long.. any help and source code is > greatly appreciated... thanks > an int is 32 bits = 4 bytes. each pixel in the mode 13 screen corresponds to a byte. if buffer is an array of int, each element will be 0x00000004, i.e. 3 consecutive black pixels followed by a red one. two requests from everyone: + especially if you are posting something off-topic, please think a little before posting. ++ by all means, please provide the smallest piece of code that exhibits the problem. could you not have at least specified whether buffer was an aray of int or char? -- Sinan