delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/06/10/07:18:19

Newsgroups: comp.os.msdos.djgpp
From: tob AT world DOT std DOT com (Tom Breton)
Subject: Re: Optimization help needed
Message-ID: <EBHL5o.JKI@world.std.com>
Organization: The World Public Access UNIX, Brookline, MA
References: <339B3E72 DOT 4FE AT flash DOT net>
Date: Mon, 9 Jun 1997 02:20:12 GMT
Lines: 25
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

In article <339B3E72 DOT 4FE AT flash DOT net>, Chris Sequeira  <nav2 AT flash DOT net> wrote:
>I got Justin Frankel's Plush 3D library to work with Allegro graphics
>modes.  Now I can run it at high resolutions, such as 360 x 480 Mode-X
>and the like.  Only one problem:  the Plush framebuffer and Allegro
>memory bitmaps are created with incompatible data types.  The Plush
>framebuffer is pure characters;  the Allegro bitmap is of type BITMAP. 
>So, every frame, I have to call this function to copy the pixel values
>to the Allegro bitmap:
>

*Do* you have to call it? It seems to me that by making Allegro's
bitmap data pointer point to that, you could get by without copying,
which makes the whole problem go away. Watch out for memory allocation
and deallocation.

Understand that I'm not talking about BITMAP * bmp, but bmp->data.

>It has to copy W * H (in this case, 360*480) pixels every frame. 
>Needless to say, it's not fast stuff.  I don't know how to get around
>this, so I need to optimize it.  Unfortunately, I don't know any
>assembly language.  Can anybody help with this?

Be glad you don't, you'd be knee deep in stuff you didn't have to do. }:)


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019