Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!psuvax1!psuvm!cunyvm!t32qc From: T32QC@CUNYVM.BITNET (NEO) Newsgroups: comp.sys.amiga.programmer Subject: Graphic Screens Message-ID: <91036.163031T32QC@CUNYVM.BITNET> Date: 5 Feb 91 21:30:31 GMT Organization: City University of New York/ University Computer Center Lines: 155 This is some code to open up a graphic screen without using intuition You dont have to worry about title bar etc. I was just wondering how do I make this screen overscan. This opens up a 640 * 400 screen with 16 colors. Any help on how to make this an overscaned screen would be greatly appreciated Thanks T32QC@CUNYVM.BITNET -------------------Cut Here---------------------------------- /**********************************************************/ /* This Opens a 640*400 Screen 16 Colors */ /**********************************************************/ #include "exec/types.h" #include "exec/memory.h" #include "exec/devices.h" #include "graphics/gfx.h" #include "graphics/gfxbase.h" #include "graphics/gfxmacros.h" #include "graphics/text.h" #include "graphics/view.h" #include "graphics/clip.h" #include "graphics/copper.h" #include "graphics/gels.h" #include "graphics/regions.h" #include "hardware/blit.h" #include "devices/keymap.h" #define Width 640 #define Height 400 #define Depth 4 #define MODES HIRES|LACE struct GfxBase *GfxBase; struct View View; struct ViewPort ViewPort; struct RasInfo RasInfo; struct BitMap BitMap; struct RastPort RastPort; struct View *oldView; USHORT Colors[16] = { 0x000,0xfff,0x0bf,0x09f, 0x07f,0x06f,0x04f,0x02f, 0x00f,0x20f,0x40f,0xbbb, 0x999,0x888,0x777,0x666 }; /**********************************************************/ /* Grafix Setup */ /**********************************************************/ main() { int i; if((GfxBase = (struct GfxBase *) OpenLibrary("graphics.library",0)) == NULL) { printf(" No Graphics !!!!!"); Exit (0); } oldView = GfxBase->ActiView; InitView (&View); InitVPort (&ViewPort); View.ViewPort = &ViewPort; View.Modes = MODES; ViewPort.DWidth = Width; ViewPort.DHeight = Height; ViewPort.RasInfo = &RasInfo; ViewPort.Modes = MODES; ViewPort.ColorMap = (struct ColorMap *)GetColorMap (16); if (ViewPort.ColorMap == 0) goto cleanup1; RasInfo.Next = NULL; RasInfo.RxOffset = 0; RasInfo.RyOffset = 0; RasInfo.BitMap = &BitMap; InitBitMap (&BitMap, Depth, Width, Height); for (i=0; i