Files
jak-project/game/graphics/sceGraphicsInterface.cpp
T
Ziemas 9168e20e18 Overlord fixes (#1301)
* srpc: Implement part of VBlank_Handler

And call it on RPC message for lack of better ways

* ssound: Fix distance calculation

avoids negative array index

* srpc: fix sound id assignment

* srpc: bail out on missing sound id

* ssound: Fixes for angle and volume calculation

* srpc: Fix VAG filename stuff

* ssound: Fix CalculateAngle

* ssound: UpdateAutoVol fixes

* srpc: Fix up SET_PARAM command
2022-04-13 18:50:35 -04:00

35 lines
987 B
C++

#include "game/graphics/sceGraphicsInterface.h"
#include "game/graphics/gfx.h"
#include <cstdio>
#include "common/util/Assert.h"
#include "game/overlord/srpc.h"
/*!
* Wait for rendering to complete.
* In the PC Port, this currently does nothing.
*
* From my current understanding, we can get away with this and just sync everything on vsync.
* However, there are two calls to this per frame.
*
* But I don't fully understand why they call sceGsSyncPath where they do (right before depth cue)
* so maybe the depth cue looks at the z-buffer of the last rendered frame when setting up the dma
* for the next frame? The debug drawing also happens after this.
*
* The second call is right before swapping buffers/vsync, so that makes sense.
*
*
*/
u32 sceGsSyncPath(u32 mode, u32 timeout) {
ASSERT(mode == 0 && timeout == 0);
return Gfx::sync_path();
}
/*!
* Actual vsync.
*/
u32 sceGsSyncV(u32 mode) {
ASSERT(mode == 0);
VBlank_Handler();
return Gfx::vsync();
}