diff options
author | Wohlstand <admin@wohlnet.ru> | 2019-05-31 22:07:21 +0300 |
---|---|---|
committer | Wohlstand <admin@wohlnet.ru> | 2019-05-31 22:07:21 +0300 |
commit | 732f2f269d6be456b93af18c8cec035fc01b5eba (patch) | |
tree | 65f75615b944710adf3221100099793a22df660c /utils/gen_adldata/file_formats/common.h | |
parent | 7786fa8f6ba65673d24aa07245cb11d9a1fc1350 (diff) | |
download | libADLMIDI-732f2f269d6be456b93af18c8cec035fc01b5eba.tar.gz libADLMIDI-732f2f269d6be456b93af18c8cec035fc01b5eba.tar.bz2 libADLMIDI-732f2f269d6be456b93af18c8cec035fc01b5eba.zip |
Organize file formats parsers, and multi-bank AIL support
Diffstat (limited to 'utils/gen_adldata/file_formats/common.h')
-rw-r--r-- | utils/gen_adldata/file_formats/common.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/utils/gen_adldata/file_formats/common.h b/utils/gen_adldata/file_formats/common.h index d06059e..f441221 100644 --- a/utils/gen_adldata/file_formats/common.h +++ b/utils/gen_adldata/file_formats/common.h @@ -25,4 +25,13 @@ inline uint16_t toUint16LE(const uint8_t *arr) return num; } +inline uint32_t toUint32LE(const uint8_t *arr) +{ + uint32_t num = arr[0]; + num |= (static_cast<uint32_t>(arr[1] << 8) & 0x0000FF00); + num |= (static_cast<uint32_t>(arr[2] << 16) & 0x00FF0000); + num |= (static_cast<uint32_t>(arr[3] << 24) & 0xFF000000); + return num; +} + #endif // COMMON_H |