Item CreateBasicDisplay (ScreenContext *sc, uint32 displayType, uint32 numScreens)
DisplayScreen()
to view the screen display on the monitor. Using this function, you can create a display suitable for NTSC or PAL. This is controlled using the displayType argument. The different display types are defined in graphics.h and currently include:
DI_TYPE_DEFAULT-Specifying this value results in a display which matches the current defaults for the system. If the system is PAL, it opens a PAL display, and if the machine is NTSC, it opens an NTSC display. Note that additional display types that can be the default are likely to be added in the future. If your code can only deal with either NTSC or PAL, specify the modes explicitly.
DI_TYPE_NTSC-Opens a 320-x-240 display running at 60Hz.
DI_TYPE_PAL1-Opens a 320-x-240 display running at 50Hz.
DI_TYPE_PAL2-Opens a 384-x-288 display running at 50Hz.
If your application includes both NTSC and PAL artwork, you can use the following approach to determine which set of artwork to use:
You can then supply the displayType parameter to
QueryGraphics(QUERYGRAF_TAG_DEFAULTDISPLAYTYPE,&displayType);
if ((displayType == DI_TYPE_PAL1) || (displayType == DI_TYPE_PAL2)) {
displayType = DI_TYPE_PAL2; }
else { displayType = DI_TYPE_NTSC; }
CreateBasicDisplay()
. The above code protects you against any new display types that can be added to the system. Essentially, if the system says the default is PAL, you will use the PAL artwork. Any other condition results in an NTSC display.
DeleteBasicDisplay