diff options
| author | fschildt <florian.schildt@protonmail.com> | 2025-10-01 14:08:24 +0200 | 
|---|---|---|
| committer | fschildt <florian.schildt@protonmail.com> | 2025-10-01 14:09:13 +0200 | 
| commit | c775ca6133d93ed97359a6a50bd94a5563c740de (patch) | |
| tree | 9d3efb1c7e7538ff9d5cae408d2c29f9dd3daeab /src/common/defs.hpp | |
| parent | 41c2e2ecfcccf62b3c646980dd283848e33a8134 (diff) | |
general refactoring, prepare breakout game
Diffstat (limited to 'src/common/defs.hpp')
| -rw-r--r-- | src/common/defs.hpp | 14 | 
1 files changed, 14 insertions, 0 deletions
diff --git a/src/common/defs.hpp b/src/common/defs.hpp new file mode 100644 index 0000000..007d560 --- /dev/null +++ b/src/common/defs.hpp @@ -0,0 +1,14 @@ +#pragma once + +#include <cassert> +#include <cstdint> + + +#define ARRAY_COUNT(x) (sizeof(x) / sizeof(x[0])) + +#define InvalidDefaultCase assert(0) + +#define KIBIBYTES(x) ((x)*1024) +#define MEBIBYTES(x) ((x)*KIBIBYTES(1024)) +#define GIBIBYTES(x) ((x)*MEBIBYTES(1024)) +  | 
