CompuServe Messages

#Screen Image HELP!

    11-Dec-91 16:29:09
Sb: #Screen Image HELP!
Fm: Steve Jackson Games 73407,515
To: All
I'm having a bit of a problem popping a custom image up on a Screen. This is slightly modified from Andres' C Manual. When I add in a bunch of stuff for opening a window and use DrawImage (main_window, &titlescreen_image,0,0) it works fine, and draws the custom image on the screen. When I got rid of the Window routines and attempt to attach it to the Screen's RastPort, the image no longer appears. Any guesses? —- cut here —-#include <intuition/intuition.h> #include <intuition/screens.h> #include <graphics/display.h> #include "title.h" #define WIDTH 640 #define HEIGHT 400 #define DEPTH 4 struct IntuitionBase *IntuitionBase; struct GfxBase *GfxBase; struct Screen *main_screen; struct NewScreen my_new_screen= { 0, 0, WIDTH, HEIGHT, DEPTH, 0, 1, INTERLACE|HIRES, CUSTOMSCREEN, NULL, "Test 1.0", NULL, NULL }; /* Insert a big titlescreen_data[] collection here. */ struct Image titlescreen_image= { 0, 0, WIDTH, HEIGHT, DEPTH, titlescreen_data, 0x000F, 0x0000, NULL }; main() { IntuitionBase = (struct IntuitionBase *) OpenLibrary("intuition.library",0); GfxBase = (struct GfxBase *) OpenLibrary( "graphics.library", 0 ); main_screen= (struct Screen *) OpenScreen( &my_new_screen ); /* lots of color assignments using SETRGB4 deleted */ DrawImage( main_screen->RastPort, &titlescreen_image, 0, 0); /* This doesn't work */ Delay( 50 * 30); CloseScreen( main_screen ); CloseLibrary( GfxBase ); CloseLibrary( IntuitionBase ); }