IceShard
1
A personal game engine project, with development focused on 2D/2.5D games.
Toggle main menu visibility
Loading...
Searching...
No Matches
core
public
ice
types.hxx
Go to the documentation of this file.
1
3
4
#pragma once
5
#include <cmath>
6
#include <cstdint>
7
8
namespace
ice
9
{
10
11
using
utf8
= char8_t;
// might need to be changed to unisgned char later.
12
using
utf16
= char16_t;
13
using
utf32
= char32_t;
14
using
wchar
= wchar_t;
15
16
using
f32
= float;
17
using
f64
= double;
18
19
using
i8
= std::int8_t;
20
using
i16
= std::int16_t;
21
using
i32
= std::int32_t;
22
using
i64
= std::int64_t;
23
24
using
u8
= std::uint8_t;
25
using
u16
= std::uint16_t;
26
using
u32
= std::uint32_t;
27
using
u64
= std::uint64_t;
28
29
using
uptr
= std::uintptr_t;
30
31
// Forward declaration of ref types
32
struct
ref8
;
33
struct
ref16
;
34
struct
ref32
;
35
36
// Forward declaration of time-types
37
struct
Ts
;
38
struct
Tms
;
39
struct
Tus
;
40
struct
Tns
;
41
42
// Note: Added these checks, because the previous definition using std::float_t resulted in f32 being a 'long double' type.
43
static_assert
(
sizeof
(
f32
) == 4,
"We expect 'float' types to be 4 bytes."
);
44
static_assert
(
sizeof
(
f64
) == 8,
"We expect 'double' types to be 8 bytes."
);
45
46
}
// namespace ice
ice
SPDX-License-Identifier: MIT.
Definition
array.hxx:12
ice::i8
std::int8_t i8
Definition
types.hxx:19
ice::u64
std::uint64_t u64
Definition
types.hxx:27
ice::i32
std::int32_t i32
Definition
types.hxx:21
ice::f64
double f64
Definition
types.hxx:17
ice::wchar
wchar_t wchar
Definition
types.hxx:14
ice::u16
std::uint16_t u16
Definition
types.hxx:25
ice::uptr
std::uintptr_t uptr
Definition
types.hxx:29
ice::i64
std::int64_t i64
Definition
types.hxx:22
ice::utf32
char32_t utf32
Definition
types.hxx:13
ice::u32
std::uint32_t u32
Definition
types.hxx:26
ice::utf16
char16_t utf16
Definition
types.hxx:12
ice::f32
float f32
Definition
types.hxx:16
ice::i16
std::int16_t i16
Definition
types.hxx:20
ice::u8
std::uint8_t u8
Definition
types.hxx:24
ice::utf8
char8_t utf8
Definition
types.hxx:11
ice::Tms
Represents time interval of milliseconds.
Definition
clock_types.hxx:38
ice::Tns
Represents time interval of nanoseconds.
Definition
clock_types.hxx:73
ice::Ts
Represents time interval of seconds.
Definition
clock_types.hxx:21
ice::Tus
Represents time interval of microseconds.
Definition
clock_types.hxx:56
ice::ref16
Holds 'offset' and 'size' fields (u16) to access data stored in a buffer-like object.
Definition
ref.hxx:19
ice::ref32
Holds 'offset' and 'size' fields (u32) to access data stored in a buffer-like object.
Definition
ref.hxx:12
ice::ref8
Holds 'offset' and 'size' fields (u8) to access data stored in a buffer-like object.
Definition
ref.hxx:28
Generated by
1.18.0