mirror of
https://github.com/pspdev/pspsdk.git
synced 2025-12-24 12:42:36 +00:00
- Fix sceGuBreak - Fix sceGuContinue - Fix sceGuDrawArrayN - Fix sceGuMorphWeight - Remove unnecessary 0xffffff as it is done by sendCommandi - Improve the name of some parameters - Create and use GU_MAX_STATUS - Remove magic numbers in `sceGuMaterial` - Remove magic numbers in `sceGuMorphWeight` - Remove magic numbers in `sceGuSetMatrix` - Remove magic numbers in `sceGuSignal`
22 lines
907 B
C
22 lines
907 B
C
/*
|
|
* PSP Software Development Kit - https://github.com/pspdev
|
|
* -----------------------------------------------------------------------
|
|
* Licensed under the BSD license, see LICENSE in PSPSDK root for details.
|
|
*
|
|
* Copyright (c) 2005 Jesper Svennevid
|
|
*/
|
|
|
|
#include "guInternal.h"
|
|
|
|
void sceGuCopyImage(int psm, int sx, int sy, int width, int height, int srcw, void *src, int dx, int dy, int destw, void *dest)
|
|
{
|
|
sendCommandi(TRANSFER_SRC, ((unsigned int)src));
|
|
sendCommandi(TRANSFER_SRC_W, ((((unsigned int)src) & 0xff000000) >> 8) | srcw);
|
|
sendCommandi(TRANSFER_SRC_OFFSET, (sy << 10) | sx);
|
|
sendCommandi(TRANSFER_DST, ((unsigned int)dest));
|
|
sendCommandi(TRANSFER_DST_W, ((((unsigned int)dest) & 0xff000000) >> 8) | destw);
|
|
sendCommandi(TRANSFER_DST_OFFSET, (dy << 10) | dx);
|
|
sendCommandi(TRANSFER_SIZE, ((height - 1) << 10) | (width - 1));
|
|
sendCommandi(TRANSFER_START, (psm ^ 0x03) ? 0 : 1);
|
|
}
|