Skip to content
🌋️
Alchemy
Theme: Weyard
Theme: Modern
Mode: Auto
Mode: Light
Mode: Dark
Alchemy
Source
Reference
Loading...
Searching...
No Matches
text_reader.h
Go to the documentation of this file.
1
#ifndef ALCHEMY_TEXT_READER_H
2
#define ALCHEMY_TEXT_READER_H
3
4
/// @file
5
/// TextReader, a cursor through message text.
6
7
#include "
edition.h
"
8
#include "
types.h
"
9
#include "
static_assert.h
"
10
11
/// A position in a Huffman-coded message: the previous code, which picks the
12
/// next symbol's tree, and the message's remaining bits.
13
struct
TextReader
{
14
u32
previousCode
;
15
const
u32
*
words
;
16
u32
bits
;
17
};
18
19
STATIC_ASSERT
(
sizeof
(
struct
TextReader
) == 0x0c);
20
STATIC_ASSERT
(
offsetof
(
struct
TextReader
, words) == 4);
21
STATIC_ASSERT
(
offsetof
(
struct
TextReader
, bits) == 8);
22
23
#endif
edition.h
The edition's language, for C to compare (LANGUAGE == LANGUAGE_GERMAN).
static_assert.h
STATIC_ASSERT, a compile-time check that emits nothing.
STATIC_ASSERT
#define STATIC_ASSERT(condition)
C89 permits repeated extern declarations of the same array.
Definition
static_assert.h:15
offsetof
#define offsetof(type, member)
Definition
stddef.h:19
TextReader
A position in a Huffman-coded message: the previous code, which picks the next symbol's tree,...
Definition
text_reader.h:13
TextReader::previousCode
u32 previousCode
Definition
text_reader.h:14
TextReader::words
const u32 * words
Definition
text_reader.h:15
TextReader::bits
u32 bits
Definition
text_reader.h:16
types.h
The integer types, TRUE, UNUSED and the fixed-address macros.
u32
unsigned int u32
Definition
types.h:15
include
graphics
text_reader.h