home *** CD-ROM | disk | FTP | other *** search
- /****************************************************************************
- * *
- * DOSWRAP.H *
- * *
- ***************************************************************************/
-
- #ifndef DOSWRAP_PROTO
- #define DOSWRAP_PROTO
-
- #include "rwdos.h"
-
- /****************************************************************************
- RwDPrintChar
-
- On entry : Xcord
- : Ycord
- : Character
- : Color
- */
-
- void RwDPrintChar(int nX,
- int nY,
- int nC,
- int nColor)
- {
- RwPrintChar pcPrint;
-
- pcPrint.x = nX;
- pcPrint.y = nY;
- pcPrint.c = nC;
- pcPrint.color = nColor;
-
- RwDeviceControl(rwPRINTCHAR,0, &pcPrint, sizeof(RwPrintChar));
- }
-
- /****************************************************************************
- RwDPointerRemove
-
- On entry :
- On exit :
- */
-
- void RwDPointerRemove(void)
- {
- RwDeviceControl(rwPOINTERREMOVE,0,NULL, 0);
- }
-
- /****************************************************************************
- RwDPointerDisplay
-
- On entry : xcord (out)
- : ycord (out)
- : buttons (out)
- On exit :
- */
-
- void RwDPointerDisplay(int *pX,
- int *pY,
- int *pBut)
- {
- RwMousePointer mMouse;
-
- RwDeviceControl(rwPOINTERDISPLAY,0,&mMouse, sizeof(RwMousePointer));
- (*pX) = mMouse.x;
- (*pY) = mMouse.y;
- (*pBut) = mMouse.buttons;
- }
-
- /****************************************************************************
- RwDPointerDisplayAt
-
- On entry : xcord
- : ycord
- On exit :
- */
-
- void RwDPointerDisplayAt(int nX,
- int nY)
- {
- RwMousePointer mMouse;
-
- mMouse.x = nX;
- mMouse.y = nY;
-
- RwDeviceControl(rwPOINTERDISPLAYAT,0,&mMouse, sizeof(RwMousePointer));
- }
-
- /****************************************************************************
- RwDPointerGetPosition
-
- On entry : xcord (out)
- : ycord (out)
- : buttons (out)
- On exit :
- */
-
- void RwDPointerGetPosition(int *pX,
- int *pY,
- int *pBut)
- {
- RwMousePointer mMouse;
-
- RwDeviceControl(rwPOINTERGETPOSITION,0,&mMouse, sizeof(RwMousePointer));
- (*pX) = mMouse.x;
- (*pY) = mMouse.y;
- (*pBut) = mMouse.buttons;
- }
-
- /****************************************************************************
- RwDPointerSetPosition
-
- On entry : xcord
- : ycord
- On exit :
- */
-
- void RwDPointerSetPosition(int nX,
- int nY)
- {
- RwMousePointer mMouse;
-
- mMouse.x = nX;
- mMouse.y = nY;
-
- RwDeviceControl(rwPOINTERSETPOSITION,0,&mMouse, sizeof(RwMousePointer));
- }
-
- /****************************************************************************
- RwDPointerGetRelative
-
- On entry : xcord (out)
- : ycord (out)
- : buttons (out)
- On exit :
- */
-
- void RwDPointerGetRelative(int *pX,
- int *pY,
- int *pBut)
- {
- RwMousePointer mMouse;
-
- RwDeviceControl(rwPOINTERGETRELATIVE,0,&mMouse, sizeof(RwMousePointer));
- (*pX) = mMouse.x;
- (*pY) = mMouse.y;
- (*pBut) = mMouse.buttons;
- }
-
- /****************************************************************************
- RwDBitmapToRaw
-
- On entry : In bitmap
- : width
- : Height
- : Color
- : Outstorage (OUT)
- On exit : Pointer to raw created
- */
-
- void *RwDBitmapToRaw(void *pInImage,
- int nWidth,
- int nHeight,
- int nColor,
- void *pStorage)
- {
- RwImageConvert ciConvert;
-
- ciConvert.inimage = pInImage;
- ciConvert.w = nWidth;
- ciConvert.h = nHeight;
- ciConvert.colora = nColor;
- ciConvert.outstorage = pStorage;
-
- RwDeviceControl(rwBITMAPTORAW,0,&ciConvert, sizeof(RwImageConvert));
-
- return ciConvert.outstorage;
- }
-
-
- /****************************************************************************
- RwDCharmapToRaw
-
- On entry : In charmap
- : width
- : Height
- : ColorA
- : ColorB
- : Outstorage (OUT)
- On exit : Pointer to raw created
- */
-
- void *RwDCharmapToRaw(void *pInImage,
- int nWidth,
- int nHeight,
- int nColorA,
- int nColorB,
- void *pStorage)
- {
- RwImageConvert ciConvert;
-
- ciConvert.inimage = pInImage;
- ciConvert.w = nWidth;
- ciConvert.h = nHeight;
- ciConvert.colora = nColorA;
- ciConvert.colorb = nColorB;
- ciConvert.outstorage = pStorage;
-
- RwDeviceControl(rwCHARMAPTORAW,0,&ciConvert, sizeof(RwImageConvert));
-
- return ciConvert.outstorage;
- }
-
- /****************************************************************************
- RwDPointerSetRegion
-
- On entry : min x
- : min y
- : max x
- : max y
- On exit :
- */
-
- void RwDPointerSetRegion(int nMinX,
- int nMinY,
- int nMaxX,
- int nMaxY,
- int nSpeed)
- {
- RwRect rRect;
-
- rRect.x = nMinX;
- rRect.y = nMinY;
- rRect.w = nMaxX - nMinX;
- rRect.h = nMaxY - nMinY;
-
- RwDeviceControl(rwPOINTERSETREGION,nSpeed,&rRect, sizeof(RwRect));
- }
-
- /****************************************************************************
- RwDPointerSetClipRegion
-
- On entry : min x
- : min y
- : max x
- : max y
- On exit :
- */
-
- void RwDPointerSetClipRegion(int nMinX,
- int nMinY,
- int nMaxX,
- int nMaxY)
- {
- RwRect rRect;
-
- rRect.x = nMinX;
- rRect.y = nMinY;
- rRect.w = nMaxX - nMinX;
- rRect.h = nMaxY - nMinY;
-
- RwDeviceControl(rwPOINTERSETCLIPREGION,0,&rRect, sizeof(RwRect));
- }
-
- /****************************************************************************
- RwDPointerSetImage
-
- On entry : Hotspot X
- : Hotspot Y
- : Width/ColorA
- : Height/ColorB
- : Image (NULL - defualt pointer image)
- On exit :
- */
-
- void RwDPointerSetImage(int nHotX,
- int nHotY,
- int nWidth,
- int nHeight,
- void *pImage)
- {
- RwPointerImage piImage;
-
-
- piImage.hotx = nHotX;
- piImage.hoty = nHotY;
- piImage.w = nWidth;
- piImage.h = nHeight;
- piImage.image= pImage;
-
- RwDeviceControl(rwPOINTERSETIMAGE,0,&piImage, sizeof(RwPointerImage));
- }
-
- #endif
-
-
-
-