mirror of
https://github.com/halpz/re3.git
synced 2025-06-28 17:16:19 +00:00
Original screen grabber
This commit is contained in:
@ -181,6 +181,22 @@ psCameraShowRaster(RwCamera *camera)
|
||||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
*****************************************************************************
|
||||
*/
|
||||
RwImage *
|
||||
psGrabScreen(RwCamera *pCamera)
|
||||
{
|
||||
#ifndef LIBRW
|
||||
RwRaster *pRaster = RwCameraGetRaster(pCamera);
|
||||
if (RwImage *pImage = RwImageCreate(pRaster->width, pRaster->height, 32)) {
|
||||
RwImageAllocatePixels(pImage);
|
||||
RwImageSetFromRaster(pImage, pRaster);
|
||||
return pImage;
|
||||
}
|
||||
#endif
|
||||
return nil;
|
||||
}
|
||||
|
||||
/*
|
||||
*****************************************************************************
|
||||
|
@ -22,6 +22,7 @@ extern void psTerminate(void);
|
||||
|
||||
extern void psCameraShowRaster(RwCamera *camera);
|
||||
extern RwBool psCameraBeginUpdate(RwCamera *camera);
|
||||
extern RwImage *psGrabScreen(RwCamera *camera);
|
||||
|
||||
extern void psMouseSetPos(RwV2d *pos);
|
||||
|
||||
|
@ -50,6 +50,15 @@ RsCameraBeginUpdate(RwCamera * camera)
|
||||
return psCameraBeginUpdate(camera);
|
||||
}
|
||||
|
||||
/*
|
||||
*****************************************************************************
|
||||
*/
|
||||
RwImage*
|
||||
RsGrabScreen(RwCamera *camera)
|
||||
{
|
||||
return psGrabScreen(camera);
|
||||
}
|
||||
|
||||
/*
|
||||
*****************************************************************************
|
||||
*/
|
||||
|
@ -274,6 +274,9 @@ RsCameraBeginUpdate(RwCamera *camera);
|
||||
//extern void
|
||||
//RsMouseSetVisibility(RwBool visible);
|
||||
|
||||
extern RwImage*
|
||||
RsGrabScreen(RwCamera *camera);
|
||||
|
||||
extern void
|
||||
RsMouseSetPos(RwV2d *pos);
|
||||
|
||||
|
@ -238,6 +238,23 @@ psCameraShowRaster(RwCamera *camera)
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
*****************************************************************************
|
||||
*/
|
||||
RwImage *
|
||||
psGrabScreen(RwCamera *pCamera)
|
||||
{
|
||||
#ifndef LIBRW
|
||||
RwRaster *pRaster = RwCameraGetRaster(pCamera);
|
||||
if (RwImage *pImage = RwImageCreate(pRaster->width, pRaster->height, 32)) {
|
||||
RwImageAllocatePixels(pImage);
|
||||
RwImageSetFromRaster(pImage, pRaster);
|
||||
return pImage;
|
||||
}
|
||||
#endif
|
||||
return nil;
|
||||
}
|
||||
|
||||
/*
|
||||
*****************************************************************************
|
||||
*/
|
||||
|
Reference in New Issue
Block a user