mirror of
https://gitlab.com/skmp/dca3-game.git
synced 2025-04-28 13:07:59 +03:00
partially implement camera clears
This commit is contained in:
parent
e0e07883d1
commit
fc6cdc5f7e
2 changed files with 9 additions and 3 deletions
11
vendor/librw/src/dc/rwdc.cpp
vendored
11
vendor/librw/src/dc/rwdc.cpp
vendored
|
@ -1089,6 +1089,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;
|
||||
|
@ -1146,7 +1148,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();
|
||||
}
|
||||
|
||||
|
@ -4092,9 +4097,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*);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue