home *** CD-ROM | disk | FTP | other *** search
- Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
- Path: sparky!uunet!paladin.american.edu!auvm!CENTRAL1.LANCASTER.AC.UK!MARTINK
- Via: UK.AC.LANCS.CENT1; 21 JAN 93 10:42:12 GMT
- X-Mailer: ELM [version 2.4 PL17]
- Content-Type: text
- Content-Length: 1118
- Message-ID: <7775.9301211043@central1.lancaster.ac.uk>
- Newsgroups: bit.listserv.i-amiga
- Date: Thu, 21 Jan 1993 10:43:39 +0000
- Sender: Info-Amiga List <I-AMIGA@RUTVM1.BITNET>
- From: Martin Kalugin <martink@CENTRAL1.LANCASTER.AC.UK>
- Subject: Gadgets & images
- Lines: 51
-
- Hi!
-
- I need some assistance with C programming on the Amiga 500+. I am trying
- to write a function called "CreateImage ()". The synopsis looks like:
-
-
- int CreateImage (image_st_ptr, image_data, width, height, depth);
-
- struct Image *image_st_ptr;
- UWORD chip *image_data;
- int width, height, depth;
-
-
- The aim of the function is to take a pointer to an Image structure
- (image_st_ptr) fill in the relevant details (such as the image data, its width,
- height & depth).
-
- After the function is called I call:
-
- DrawImage (window_1->RPort, &image_st, 50, 50);
-
- But it displays a whole load of garbage!
-
-
-
- I have tried simply filling in the structure at the same time as I declare it,
- Ie,
-
- struct Image image_st =
- {
- 0, 0, 16, 6, 2,
- image_data,
- 0x03, 0x00, NULL
- };
-
- And this displays the image just fine!!!
-
-
- Does anyone know what I could be doing wrong?
-
- By the way I am declaring the image data in "chip" memory and I am using
- Lattice C 5.10.
-
-
- Please reply to:
- --
- Martin Kalugin
-
- Phone: (0524) 593677
-
- Email: M.Kalugin@uk.ac.lancaster
-