chore: initial commit

This commit is contained in:
fallenoak 2023-01-02 13:17:18 -06:00
commit 70b00c5c38
No known key found for this signature in database
GPG key ID: 7628F8E61AEA070D
965 changed files with 264882 additions and 0 deletions

17
src/util/Byte.hpp Normal file
View file

@ -0,0 +1,17 @@
#ifndef UTIL_BYTE_HPP
#define UTIL_BYTE_HPP
#include <cstdint>
#define BYTEn(x, n) (*((uint8_t*)&(x)+n))
#define BYTE1(x) BYTEn(x, 1)
#define BYTE2(x) BYTEn(x, 2)
#define BYTE3(x) BYTEn(x, 3)
#define BYTE4(x) BYTEn(x, 4)
#define LOBYTE(x) (*((uint8_t*)&(x)))
#define HIBYTE(x) (*((uint8_t*)&(x)+1))
#define LOWORD(x) (*((uint16_t*)&(x)))
#define HIWORD(x) (*((uint16_t*)&(x)+1))
#endif