mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2025-12-12 03:02:30 +00:00
chore: initial commit
This commit is contained in:
commit
70b00c5c38
965 changed files with 264882 additions and 0 deletions
17
src/util/Byte.hpp
Normal file
17
src/util/Byte.hpp
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue