Message-ID: <386A9193.124D022D@ozemail.com.au> From: QarnoS Organization: Anti-Conservation Foundation of Australia X-Mailer: Mozilla 4.7 [en] (Win98; I) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: Very fast allegro blitting Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 40 NNTP-Posting-Host: slmlb36p59.ozemail.com.au X-Trace: ozemail.com.au 946508021 210.84.138.60 (Thu, 30 Dec 1999 09:53:41 EST) NNTP-Posting-Date: Thu, 30 Dec 1999 09:53:41 EST Distribution: world Date: Thu, 30 Dec 1999 09:56:20 +1100 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Hi all! It seems that the allegro blit function is the bottleneck in my current project, so I'm trying to create a faster allegro blit for a memory -> screen bitmap in 640x480x256 resolution. Since I know what the bitmap types are, and the resolution, I should be able to cut back on the overhead of checking bitmap type, etc. This is what I have, so far, but it crashes with no useful traceback info. Firstly, this is the function call I'm trying to emulate (buffer is a 620x440x256 memory bitmap): blit(buffer, screen, 0, 0, 10, 10, 620, 440); Here's the code: void fast_blit(BITMAP * buffer) { bmp_select(screen); for (int y = 10; y < 450; y++) { unsigned long address = bmp_write_line(screen, y) + 10; memcpy((void *)(address), buffer->line[y], 620); } bmp_unwrite_line(screen); } Thanks in advance. -- QarnoS { Insert witty comment here } -----BEGIN GEEK CODE BLOCK----- Version: 3.1 GO d- s:+ a--- c++(++++) UL P+ L+ E W+++ N++ o-- K---- w-- O? M-- V? PS PE Y-- PGP- t+(+++) 5-- X+(++) R* tv b DI-- D+ G-(--) e(*) h! !r(---) m ------END GEEK CODE BLOCK------