mirror of
https://github.com/libretro/NP2kai.git
synced 2024-10-07 23:03:25 +00:00
24 lines
307 B
C
24 lines
307 B
C
#include "compiler.h"
|
|
#include "textcnv.h"
|
|
|
|
|
|
void textcnv_swapendian32(void *buf, UINT leng) {
|
|
|
|
UINT8 *p;
|
|
UINT8 tmp0;
|
|
UINT8 tmp1;
|
|
|
|
p = (UINT8 *)buf;
|
|
while(leng) {
|
|
tmp0 = p[0];
|
|
tmp1 = p[1];
|
|
p[0] = p[3];
|
|
p[1] = p[2];
|
|
p[2] = tmp1;
|
|
p[3] = tmp0;
|
|
p += 4;
|
|
leng--;
|
|
}
|
|
}
|
|
|