CameraCreate cosmetic fix

This commit is contained in:
Fire-Head 2019-06-12 20:08:04 +03:00
parent 3317217ed8
commit 292fd5ad24

View File

@ -117,39 +117,39 @@ CameraSize(RwCamera * camera, RwRect * rect,
zRaster = RwRasterCreate(rect->w, rect->h, 0, rwRASTERTYPEZBUFFER); zRaster = RwRasterCreate(rect->w, rect->h, 0, rwRASTERTYPEZBUFFER);
if( raster && zRaster ) if( raster && zRaster )
{ {
RwCameraSetRaster(camera, raster); RwCameraSetRaster(camera, raster);
RwCameraSetZRaster(camera, zRaster); RwCameraSetZRaster(camera, zRaster);
} }
else else
{ {
if( raster ) if( raster )
{ {
RwRasterDestroy(raster); RwRasterDestroy(raster);
} }
if( zRaster ) if( zRaster )
{ {
RwRasterDestroy(zRaster); RwRasterDestroy(zRaster);
} }
rect->x = origSize.x; rect->x = origSize.x;
rect->y = origSize.y; rect->y = origSize.y;
rect->w = origSize.w; rect->w = origSize.w;
rect->h = origSize.h; rect->h = origSize.h;
/* /*
* Use default values... * Use default values...
*/ */
raster = raster =
RwRasterCreate(rect->w, rect->h, 0, rwRASTERTYPECAMERA); RwRasterCreate(rect->w, rect->h, 0, rwRASTERTYPECAMERA);
zRaster = zRaster =
RwRasterCreate(rect->w, rect->h, 0, rwRASTERTYPEZBUFFER); RwRasterCreate(rect->w, rect->h, 0, rwRASTERTYPEZBUFFER);
RwCameraSetRaster(camera, raster); RwCameraSetRaster(camera, raster);
RwCameraSetZRaster(camera, zRaster); RwCameraSetZRaster(camera, zRaster);
} }
} }
/* Figure out the view window */ /* Figure out the view window */
@ -269,7 +269,7 @@ CameraCreate(RwInt32 width, RwInt32 height, RwBool zBuffer)
} }
STARTPATCHES STARTPATCHES
InjectHook(0x526450, GetFirstObjectCallback, PATCH_JUMP); //InjectHook(0x526450, GetFirstObjectCallback, PATCH_JUMP);
InjectHook(0x526460, GetFirstObject, PATCH_JUMP); InjectHook(0x526460, GetFirstObject, PATCH_JUMP);
InjectHook(0x527170, CameraSize, PATCH_JUMP); InjectHook(0x527170, CameraSize, PATCH_JUMP);
InjectHook(0x527340, CameraDestroy, PATCH_JUMP); InjectHook(0x527340, CameraDestroy, PATCH_JUMP);