mirror of
https://gitlab.com/skmp/dca3-game.git
synced 2025-09-09 14:10:53 +02:00
partially implement camera clears
This commit is contained in:
11
vendor/librw/src/dc/rwdc.cpp
vendored
11
vendor/librw/src/dc/rwdc.cpp
vendored
@@ -1029,6 +1029,8 @@ void endUpdate(Camera* cam) {
|
||||
{
|
||||
pvr_set_zclip(0.0f);
|
||||
pvr_wait_ready();
|
||||
pvr_set_bg_color(cam->clearColor.red / 255.0f, cam->clearColor.green / 255.0f, cam->clearColor.blue / 255.0f);
|
||||
|
||||
if (cam->frameBuffer->type == Raster::CAMERATEXTURE) {
|
||||
auto natras = GETDCRASTEREXT(cam->frameBuffer);
|
||||
uint32 rx = cam->frameBuffer->width;
|
||||
@@ -1086,7 +1088,10 @@ void endUpdate(Camera* cam) {
|
||||
matfxContexts.clear();
|
||||
}
|
||||
|
||||
void clearCamera(Camera*,RGBA*,uint32) {
|
||||
void clearCamera(Camera* cam,RGBA* col,uint32 flags) {
|
||||
if (flags & rwCAMERACLEARIMAGE) {
|
||||
cam->clearColor = *col;
|
||||
}
|
||||
UNIMPL_LOG();
|
||||
}
|
||||
|
||||
@@ -3839,9 +3844,9 @@ rasterCreate(Raster* raster)
|
||||
|
||||
if (raster->type == Raster::CAMERATEXTURE) {
|
||||
if (rasterFmt == Raster::DEFAULT && raster->depth == 0) {
|
||||
fprintf(stderr, "CameraTexture: Default means 4444?\n");
|
||||
fprintf(stderr, "CameraTexture: Default means 565?\n");
|
||||
raster->depth = 16;
|
||||
raster->format |= Raster::C4444;
|
||||
raster->format |= Raster::C565;
|
||||
}
|
||||
}
|
||||
|
||||
|
1
vendor/librw/src/rwobjects.h
vendored
1
vendor/librw/src/rwobjects.h
vendored
@@ -779,6 +779,7 @@ struct Camera
|
||||
/* RW: frustum sectors, space, position */
|
||||
World *world;
|
||||
ObjectWithFrame::Sync originalSync;
|
||||
RGBA clearColor;
|
||||
void (*originalBeginUpdate)(Camera*);
|
||||
void (*originalEndUpdate)(Camera*);
|
||||
|
||||
|
Reference in New Issue
Block a user