[comp.sys.amiga] Help with DrawImage +

dave@aquarium.buffalo.ny.us (David R. Tyler) (01/05/91)

 Hello all!

  I have been playing around with creating/drawing images...

  and had very few problems...	(GRR!)

  but, when i changed to a CUSTOMSCREEN (it was on the WBSCREEN)
  with 3 planes (8 colours), i get garbage when i attempt to
  drawimage into the last color (color 7)...

  wondering if perhaps there is a hidden bug in the os (or something)
  having to do with plotting an image into the last plane of a
  window (and having more data to go...?), i added another plane,
  now i have 4. This fixed the garbage problem but...

  when i draw 7 of these images in a row accross my screen,
  (white, green, yellow, blue, grey, brown, BLUE)

  the last blue SHOULD BE RED. THE Color is set to red (15)...

   does anyone have ANY IDEA WHY this happens?	 i really want to use
   that color in my program!!!!


 here is a snippet of the code:
 ---------------------------------------------------------------------------
 here.PlanePick=7;
 DrawImage(Rport,&hex,200,190);
 ---------------------------------------------------------------------------

 hex is the associated image structure:

 struct Image hex =
  {
   0,0	     - leftedge, topedge
   32,9,2    - width, height, depth
   HEXA,7,0, - ImageData, PlanePick, PlaneOnOff
   NULL      - NextImage
   };

 HEXA is of type USHORT, and is in CHIP..

 --------------------------------------------------------------------------

my image data is enough for 2 planes, but when i change depth to 1, and
remove the data for the second plane (it was only a dup of the first
plane) i get garbage spread through the 7 images, and the colors are
an alternating series of the first 2 colors (white & green).

 i am completely baffled.


 does anyone know why it would be blue (as opposed to another color)
  which is color 4 in my pallete?

i look forward to SOMEONE having a clue as to why this is happening..

 if anyone wants to see the code, the file(s) are short, and i could forward
 copies in mail... (*wistful sigh*) thanks....


__________________________________________________________________________
 C=  //_\        Only      | The Amiga Aquarium        300/1200/2400  ->|b|
__  ///_\\  _  _    _   _  |USA:   (716) 837-1699                       |a|
\\\///---\\ |\/| | |_| |_\ |School: Tyler33@Snybufva.Bitnet             |u|
 \\//     \\_________|     |UseNet: dave@aquarium.buffalo.ny.us (Home)  |d|
__\/_______________________|____________________________________________|_|