2021-04-01 02:07:58 +02:00
|
|
|
//
|
2021-03-28 22:49:05 +02:00
|
|
|
// Generated By: dol2asm
|
|
|
|
|
// Translation Unit: JPAKeyBlock
|
2021-04-01 02:07:58 +02:00
|
|
|
//
|
2021-03-28 22:49:05 +02:00
|
|
|
|
2021-04-01 02:07:58 +02:00
|
|
|
#include "JSystem/JParticle/JPAKeyBlock.h"
|
2023-07-24 01:30:24 +03:00
|
|
|
#include "JSystem/JParticle/JPAMath.h"
|
2021-03-28 22:49:05 +02:00
|
|
|
|
2021-04-01 02:07:58 +02:00
|
|
|
//
|
2021-03-28 22:49:05 +02:00
|
|
|
// Types:
|
2021-04-01 02:07:58 +02:00
|
|
|
//
|
2021-03-28 22:49:05 +02:00
|
|
|
|
2021-04-01 02:07:58 +02:00
|
|
|
//
|
2021-03-28 22:49:05 +02:00
|
|
|
// Forward References:
|
2021-04-01 02:07:58 +02:00
|
|
|
//
|
2021-03-28 22:49:05 +02:00
|
|
|
|
2021-04-01 02:07:58 +02:00
|
|
|
//
|
2021-03-28 22:49:05 +02:00
|
|
|
// External References:
|
2021-04-01 02:07:58 +02:00
|
|
|
//
|
2021-03-28 22:49:05 +02:00
|
|
|
|
2021-04-01 02:07:58 +02:00
|
|
|
//
|
2021-03-28 22:49:05 +02:00
|
|
|
// Declarations:
|
2021-04-01 02:07:58 +02:00
|
|
|
//
|
2021-03-28 22:49:05 +02:00
|
|
|
|
2021-04-06 18:00:35 +02:00
|
|
|
/* 8027D730-8027D740 278070 0010+00 0/0 1/1 0/0 .text __ct__11JPAKeyBlockFPCUc */
|
2023-07-24 01:30:24 +03:00
|
|
|
JPAKeyBlock::JPAKeyBlock(const u8* data)
|
|
|
|
|
: mDataStart(data)
|
|
|
|
|
, field_0x4(reinterpret_cast<const float*>(&data[0xC]))
|
|
|
|
|
{
|
2021-03-28 22:49:05 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* ############################################################################################## */
|
|
|
|
|
|
2021-04-06 18:00:35 +02:00
|
|
|
/* 8027D740-8027D7D4 278080 0094+00 0/0 1/1 0/0 .text calc__11JPAKeyBlockFf */
|
2023-07-24 01:30:24 +03:00
|
|
|
void JPAKeyBlock::calc(float p1) {
|
|
|
|
|
if (mDataStart[0xB] != '\0') {
|
|
|
|
|
int v1 = (int)field_0x4[(mDataStart[9] - 1) * 4] + 1;
|
|
|
|
|
// p1 -= (v1 * ((int)p1 / v1));
|
|
|
|
|
int v2 = ((int)p1 / v1);
|
|
|
|
|
p1 = p1 - (v2 * v1);
|
|
|
|
|
}
|
|
|
|
|
JPACalcKeyAnmValue(p1, mDataStart[9], field_0x4);
|
2021-03-28 22:49:05 +02:00
|
|
|
}
|