mirror of
https://github.com/GTAmodding/re3.git
synced 2025-10-13 00:40:33 +00:00
Original screen grabber
This commit is contained in:
parent
489743da41
commit
e7945625b5
7 changed files with 85 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
/*
|
||||
*****************************************************************************
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue