From c50beb53c023e665243a28b2c82a7a66bc87de72 Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Fri, 10 Mar 2023 11:09:12 -0800 Subject: [PATCH] Minor fixes --- CAudioSoundEffect.bt | 18 ++++++++--------- CGraphicsModel.bt | 46 ++++++++++++++++++++++---------------------- 2 files changed, 31 insertions(+), 33 deletions(-) diff --git a/CAudioSoundEffect.bt b/CAudioSoundEffect.bt index 81a4a68..32feeb4 100644 --- a/CAudioSoundEffect.bt +++ b/CAudioSoundEffect.bt @@ -6,7 +6,7 @@ #include "Common.bt" typedef struct STimelineEvent { - uint unk1; + float unk1; float unk2; } STimelineEvent; @@ -52,8 +52,8 @@ typedef struct CAudioMetaSample { float unk8; float unk9; float unk10; - float unk11; - float unk12; + int unk11; + int unk12; int unk13; float unk14; int unk15; @@ -102,18 +102,16 @@ typedef struct CAudioSoundEffect { // Loaded by CAudioSoundEffect::FinishConstructing float unk2; uint unk3 ; - local uint useUnk3 = (unk3 & 0xffffff80) | (unk3 & 7) | ((unk3 >> 1) & 8) | (((unk3 >> 3) & 1)) << 4 | ((unk3 >> 5) & 1) << 6 | ((unk3 >> 1) & 32); - if (((unk3 << 1) >> 6) & 1) { + if (unk3 & (1 << 1)) { uchar unk4; - if ((useUnk3 >> 2) & 1) { - float unk5; - } - } else if (unk3 & 4) { + } + + if (unk3 & (1 << 2)) { float unk5; } - if ((useUnk3 >> 3) & 1) { + if (unk3 & (1 << 4)) { float unk6; } diff --git a/CGraphicsModel.bt b/CGraphicsModel.bt index 5bcdd87..1a4869a 100644 --- a/CGraphicsModel.bt +++ b/CGraphicsModel.bt @@ -133,7 +133,7 @@ struct SSkinnedModelHeader { uint uintsCount; uint uints[uintsCount]; uint dataCount; - uint data[dataCount]; + char data[dataCount]; } }; @@ -250,40 +250,40 @@ struct CLayeredTextureData typedef struct { FourCC id ; - if (ReadByte() == 0) //Fix DKCTF WiiU models - { - uint32 tmpFormatI32; //Do this so we can get the fancy struct names - switch (tmpFormatI32) - { - case 0: + if (ReadByte() == 0) //Fix DKCTF WiiU models + { + uint32 tmpFormatI32; //Do this so we can get the fancy struct names + switch (tmpFormatI32) + { + case 0: local FourCC type = "TXTR"; - CMaterialTextureTokenData texture; - break; - case 1: + CMaterialTextureTokenData texture; + break; + case 1: local FourCC type = "COLR"; - float color[4]; - break; - case 2: + float color[4]; + break; + case 2: local FourCC type = "SCLR"; float scalar; break; - case 3: + case 3: local FourCC type = "INT1"; //Not sure if in DKCTF but need to dcheck - int int1; - break; - case 4: + int int1; + break; + case 4: local FourCC type = "CPLX"; - byte unk[141]; - break; - case 5: + byte unk[141]; + break; + case 5: local FourCC type = "INT4"; int int4[4]; break; - case 6: + case 6: local FourCC type = "MAT4"; //Not sure if in DKCTF but need to dcheck float mtx[16]; - break; - } + break; + } } else {