Mail Archives: djgpp/1999/04/05/17:17:43
B O'Donnell wrote:
>
> I have a program which is supposed to do masked blits from one of a
> collection of shapes at one side of the screen to a selected point on
> the screen - aka a map editor.
>
> I'm using Allegro and an STB Powergraph 64 3D card with 2 MB of memory,
> with Autodetect on the program and 'VBE1' in my allegro.cfg; without the
> 'VBE1' I don't even get this far. I'm working in 640*480*256 mode.
>
> To start with, the current map is blitted piece by piece on the screen,
> and this works fine. When I select a piece a copy is blitted to the top
> of the screen; again no problem. But when I click on the map...
>
> Clicking on a location usually produces a copy of the selection at the
> right X-displacement, but the Y is wrong. To simplify slightly, if the Y
> of the selection is 200, the Y of the copy is somewhere regular about
> 200 to 224, whatever I pass to masked_blit.
>
> If I try to fill a section of identical cells with a different stamp, I
> get a peculiar pattern which ignores the map boundaries. BUT if I wash
> the whole map with one stamp, similar to the first draw, the stamp is
> replicated correctly through the entire map.
>
> Help would be appreciated.
>
> Regards
> Brian O'Donnell
> odonnllb AT indigo DOT ie
As I wrote the above, I kept thinking that I _can_ blit from offscreen
to anywhere onscreen,but it was late, so I went to bed.
Today I rewrote the paint routine to copy from the screen to a bitmap in
memory then copy that bitmap back to the screen. This works as intended.
I'm still mystified, and what I have is a workaround rather than a
solution, so I'm still looking for ideas.
Regards
Brian O'Donnell
odonnllb AT indigo DOT ie
- Raw text -