| 1 | #cxx . . $ `<file>/src/pt2_helpers.h`/pragma once |
| 2 | |
| 3 | #include <stdint.h> |
| 4 | #include <stdbool.h> |
| 5 | |
| 6 | #define SWAP16cxx . . $ `src/pt2_helpers.h:6:9`!(value) \ |
| 7 | ( \ |
| 8 | (((uint16_t)((value) & 0x00FF)) << 8) | \ |
| 9 | (((uint16_t)((value) & 0xFF00)) >> 8) \ |
| 10 | ) |
| 11 | |
| 12 | #define SWAP32cxx . . $ `src/pt2_helpers.h:12:9`!(value) \ |
| 13 | ( \ |
| 14 | (((uint32_t)((value) & 0x000000FF)) << 24) | \ |
| 15 | (((uint32_t)((value) & 0x0000FF00)) << 8) | \ |
| 16 | (((uint32_t)((value) & 0x00FF0000)) >> 8) | \ |
| 17 | (((uint32_t)((value) & 0xFF000000)) >> 24) \ |
| 18 | ) |
| 19 | |
| 20 | #define SWAP64cxx . . $ `src/pt2_helpers.h:20:9`!(x) \ |
| 21 | ( \ |
| 22 | (((x) << 56) & 0xFF00000000000000ULL) | \ |
| 23 | (((x) << 40) & 0x00FF000000000000ULL) | \ |
| 24 | (((x) << 24) & 0x0000FF0000000000ULL) | \ |
| 25 | (((x) << 8) & 0x000000FF00000000ULL) | \ |
| 26 | (((x) >> 8) & 0x00000000FF000000ULL) | \ |
| 27 | (((x) >> 24) & 0x0000000000FF0000ULL) | \ |
| 28 | (((x) >> 40) & 0x000000000000FF00ULL) | \ |
| 29 | (((x) >> 56) & 0x00000000000000FFULL) \ |
| 30 | ) |
| 31 | |
| 32 | #define SGNcxx . . $ `src/pt2_helpers.h:32:9`!(x) (((x) >= 0) ? 1 : -1) |
| 33 | #define ABScxx . . $ `src/pt2_helpers.h:33:9`!(a) (((a) < 0) ? -(a) : (a)) |
| 34 | #define MINcxx . . $ `src/pt2_helpers.h:34:9`!(a, b) (((a) < (b)) ? (a) : (b)) |
| 35 | #define MAXcxx . . $ `src/pt2_helpers.h:35:9`!(a, b) (((a) > (b)) ? (a) : (b)) |
| 36 | #define CLAMPcxx . . $ `src/pt2_helpers.h:36:9`!(x, low, high) (((x) > (high)) ? (high) : (((x) < (low)) ? (low) : (x))) |
| 37 | |
| 38 | #define R12cxx . . $ `src/pt2_helpers.h:38:9`!(x) (((x) >> 8) & 0xF) |
| 39 | #define G12cxx . . $ `src/pt2_helpers.h:39:9`!(x) (((x) >> 4) & 0xF) |
| 40 | #define B12cxx . . $ `src/pt2_helpers.h:40:9`!(x) ((x) & 0xF) |
| 41 | |
| 42 | // 0..15 -> 0..255 |
| 43 | #define R12_to_R24cxx . . $ `src/pt2_helpers.h:43:9`!(x) (R12(x) * 17) |
| 44 | #define G12_to_G24cxx . . $ `src/pt2_helpers.h:44:9`!(x) (G12(x) * 17) |
| 45 | #define B12_to_B24cxx . . $ `src/pt2_helpers.h:45:9`!(x) (B12(x) * 17) |
| 46 | |
| 47 | #define RGB12_to_RGB24cxx . . $ `src/pt2_helpers.h:47:9`!(x) ((R12_to_R24(x) << 16) | (G12_to_G24(x) << 8) | (B12_to_B24(x))) |
| 48 | |
| 49 | #define R24cxx . . $ `src/pt2_helpers.h:49:9`!(x) (((x) >> 16) & 0xFF) |
| 50 | #define G24cxx . . $ `src/pt2_helpers.h:50:9`!(x) (((x) >> 8) & 0xFF) |
| 51 | #define B24cxx . . $ `src/pt2_helpers.h:51:9`!(x) ((x) & 0xFF) |
| 52 | |
| 53 | #define RGB24cxx . . $ `src/pt2_helpers.h:53:9`!(r, g, b) (((r) << 16) | ((g) << 8) | (b)) |
| 54 | |
| 55 | void showErrorMsgBoxcxx . . $ showErrorMsgBox(326aeb464d16410c).(const char *fmt, ...); |
| 56 | |
| 57 | void sanitizeFilenameCharcxx . . $ sanitizeFilenameChar(fda57c8427c60377).(char *chr); |
| 58 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! sampleNameIsEmptycxx . . $ sampleNameIsEmpty(c6b7e35ff6de5671).(char *name); |
| 59 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! moduleNameIsEmptycxx . . $ moduleNameIsEmpty(c6b7e35ff6de5671).(char *name); |
| 60 | void updateWindowTitlecxx . . $ updateWindowTitle(b45ddcbc8423892c).(boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! modified); |