Twilight Princess
Decompilation of The Legend of Zelda: Twilight Princess
Loading...
Searching...
No Matches
macros.h
Go to the documentation of this file.
1
#ifndef NW4HBM_MACROS_H
2
#define NW4HBM_MACROS_H
3
4
// Doesn't exist in line info, but still helpful to have
5
6
#if defined(CHAR_BIT)
7
#define CHAR_BIT_ CHAR_BIT
8
#else
9
#define CHAR_BIT_ 8
// most common; default
10
#endif
11
12
// offset_ is in chars
13
#define NW4HBM_BYTE_(byte_, offset_) (static_cast<unsigned char>(byte_) << CHAR_BIT_ * (offset_))
14
15
// File versions and FourChars
16
17
#define NW4HBM_FILE_VERSION(major_, minor_) (NW4HBM_BYTE_(major_, 1) | NW4HBM_BYTE_(minor_, 0))
18
19
#define NW4HBM_FOUR_CHAR(a_, b_, c_, d_) \
20
(NW4HBM_BYTE_(a_, 3) | NW4HBM_BYTE_(b_, 2) | NW4HBM_BYTE_(c_, 1) | NW4HBM_BYTE_(d_, 0))
21
22
#endif
// NW4HBM_MACROS_H
src
revolution
homebuttonLib
nw4hbm
macros.h
Generated by
1.12.0