This is a PGD-encrypted CPK file. The file can be decrypted using widely available tools.
The actual CPK has a general format, and can be worked with using CRIWARE's
#include <iostream> | |
static uint32_t bit_cast(float f) { | |
uint32_t x; | |
memcpy(&x, &f, 4); | |
return x; | |
} | |
static float bit_cast(uint32_t x) { | |
float f; |
<html> | |
<head> | |
<style> | |
html { | |
height: 100%; | |
} | |
html, body { | |
display: flex; | |
flex-direction: column; |
Name | Value | |
---|---|---|
Lighting enable | 1 | |
Light 0 enable | 1 | |
Light 1 enable | 1 | |
Light 2 enable | 1 | |
Light 3 enable | 0 | |
Clip enable | 0 | |
Cullface enable | 1 | |
Texture map enable | 1 | |
Fog enable | 1 |
PSP: | |
[x] Deltas at full vol | |
[r] OFF diff=2047.875000, rms=5792.265198 | |
[r] ROOM diff=2740.536865, rms=6093.509401 | |
[r] UNK1 diff=5646.696045, rms=8305.105095 | |
[r] UNK2 diff=3329.976440, rms=5844.549529 | |
[r] UNK3 diff=3565.636353, rms=6382.942206 | |
[r] HALL diff=2694.235474, rms=5512.626961 | |
[r] SPACE diff=3364.618896, rms=6143.147106 |
void ConvertS16ToF32(float *out, const s16 *in, size_t size) { | |
#ifdef _M_SSE | |
const __m128i zero = _mm_setzero_si128(); | |
while (size >= 8) { | |
__m128i indata1 = _mm_loadu_si128((__m128i *)in); | |
// Now we unpack with "sign extension", by unpacking with 0xFFFF if zero is greater. | |
__m128i insign1 = _mm_cmpgt_epi16(zero, indata1); | |
__m128i indata1lo = _mm_unpacklo_epi16(indata1, insign1); | |
__m128i indata1hi = _mm_unpackhi_epi16(indata1, insign1); |