diff options
| author | spicyjpeg <thatspicyjpeg@gmail.com> | 2023-05-11 23:08:11 +0200 |
|---|---|---|
| committer | spicyjpeg <thatspicyjpeg@gmail.com> | 2023-05-11 23:08:11 +0200 |
| commit | 2021cdfca29dc5c98e570a674ac97f92f47a1129 (patch) | |
| tree | a7355b8852ae4e9d217560b0cab2dcc02ab8c249 /libpsn00b/psxgpu/image.c | |
| parent | 3b696fc431a9c3f2aa7ea4f27aec20ce5dd67859 (diff) | |
| download | psn00bsdk-2021cdfca29dc5c98e570a674ac97f92f47a1129.tar.gz | |
Add GPU IRQ variants of all display list APIs
Diffstat (limited to 'libpsn00b/psxgpu/image.c')
| -rw-r--r-- | libpsn00b/psxgpu/image.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/libpsn00b/psxgpu/image.c b/libpsn00b/psxgpu/image.c index a08e293..e02c3c2 100644 --- a/libpsn00b/psxgpu/image.c +++ b/libpsn00b/psxgpu/image.c @@ -104,7 +104,17 @@ int StoreImage(const RECT *rect, uint32_t *data) { int MoveImage(const RECT *rect, int x, int y) { _sdk_validate_args(rect, -1); - return EnqueueDrawOp((void *) &MoveImage2, (uint32_t) rect, x, y); + int index = _next_saved_rect; + + _saved_rects[index] = *rect; + _next_saved_rect = (index + 1) % QUEUE_LENGTH; + + return EnqueueDrawOp( + (void *) &MoveImage2, + (uint32_t) &_saved_rects[index], + (uint32_t) x, + (uint32_t) y + ); } void LoadImage2(const RECT *rect, const uint32_t *data) { |
