Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Flipper 6.0 Help File - <b>fpcx_put()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
FPCX_PUT()
   Displays a PCX picture on the screen.

   Syntax
         nOk = FPCX_PUT(nX,nY,cAction,cFileName [,nFg,nBg] [,nPalette])

   Arguments
         nX          Horizontal position.
         nY          Vertical position.
         cAction     One of five character constants: 'P','R','A','O','X'
                     P - Moves the image to the screen.
                     R - Moves an inverted image to the screen.
                     A - Moves the ANDed image to the screen.
                     O - Moves the ORed image to the screen.
                     X - Moves the XORed image to the screen.
         cFileName   Name of the PCX image on disk.
         OPTIONAL PARAMETERS (Mono image to 16 color)
         nFg         Single plane image foreground color.
         nBg         Single plane image background color.
         OPTIONAL PARAMETERS (4 plane EGA image to mono)
         nFg         Which planes will be displayed.

         nPalette    Determines whether to set the internal PCX
                     palette or default to the existing palette.
                        0 - do not reset palette,
                        1 - reset palette (default)

   Returns
         nOk         0 - failure, 1 - success.

   Description
         FPCX_PUT() writes a PCX image from disk directly to the screen.
         You can place the image anywhere on the screen. You can also select
         how the image is to be place on the screen.

         If you wish to display a single plane video image on an EGA or VGA
         screen, then you can set the foreground and background color for
         the image. A background of -1 does not draw the background. For
         any other image, these parameters are ignored.

         If you wish to display a 4 video plane image on a mono screen,
         then you can set the planes you wish to display using the nFg
         parameter. Consider nFg a bit mask. If you set the mask to 1,
         then the first video plane will be displayed according to the
         cAction flag. If you set the flag to 3 (binary: 00000011),
         then the first two video planes of the image will be displayed.
         A 15 (binary: 00001111) will display all video planes. After
         the first video plane is displayed according to the cAction flag,
         the subsequent planes are OR'd to the first image.

         By default the palette embedded in the PCX image will reset
         the current video palette. To override the reseting of the
         palette, set the 7th parameter to a 0. The palette can be
         reset to the original after the PCX picture has been shown by
         calling SET_PAL() with each of the original values.

            FLIP_INIT()
            VM_INIT(10,0,"FLIPPER.VM")
            FSCREEN()
            FPCX_PUT(0,0,'P',"GARY.PCX",fg,bg,1)   && Show PCX
            inkey(0)
            SET_PAL(0,0)
            SET_PAL(1,1)
            SET_PAL(2,2)

            etc .....

            TEXTMODE()
            VM_QUIT()

See Also: FPCX_ROT() FPCX_SCALE() PCX_HEADER() PCX_TO_PIC()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson