diff options
| author | spicyjpeg <thatspicyjpeg@gmail.com> | 2022-12-28 14:27:34 +0100 |
|---|---|---|
| committer | spicyjpeg <thatspicyjpeg@gmail.com> | 2022-12-28 14:27:34 +0100 |
| commit | 50faf92a8cb099420aa956dcac3a8105067e117c (patch) | |
| tree | fa817a7419bc06aee432fa9e608b173d628c3b5d /libpsn00b/psxgpu/image.c | |
| parent | 7e350980d5c09bbc81a0de01bf016a87ecfc4feb (diff) | |
| download | psn00bsdk-50faf92a8cb099420aa956dcac3a8105067e117c.tar.gz | |
Re-enable MoveImage(), add tagless primitive structs
Diffstat (limited to 'libpsn00b/psxgpu/image.c')
| -rw-r--r-- | libpsn00b/psxgpu/image.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/libpsn00b/psxgpu/image.c b/libpsn00b/psxgpu/image.c index 96f5366..09c7ab9 100644 --- a/libpsn00b/psxgpu/image.c +++ b/libpsn00b/psxgpu/image.c @@ -90,6 +90,10 @@ int StoreImage(const RECT *rect, uint32_t *data) { ); } +int MoveImage(const RECT *rect, int x, int y) { + return EnqueueDrawOp((void *) &MoveImage2, (uint32_t) rect, x, y); +} + void LoadImage2(const RECT *rect, const uint32_t *data) { _dma_transfer(rect, (uint32_t *) data, 1); } @@ -98,14 +102,18 @@ void StoreImage2(const RECT *rect, uint32_t *data) { _dma_transfer(rect, data, 0); } -/*void MoveImage2(const RECT *rect, int x, int y) { +void MoveImage2(const RECT *rect, int x, int y) { GPU_GP0 = 0x80000000; //GPU_GP0 = rect->x | (rect->y << 16); GPU_GP0 = *((const uint32_t *) &(rect->x)); GPU_GP0 = (x & 0xffff) | (y << 16); //GPU_GP0 = rect->w | (rect->h << 16); GPU_GP0 = *((const uint32_t *) &(rect->w)); -}*/ + + // As no DMA transfer is performed by this command, the GPU IRQ is used + // instead of the DMA IRQ to trigger the draw queue callback. + GPU_GP0 = 0x1f000000; +} /* .TIM image parsers */ |
