author | alfadur <mail@none> |
Sat, 08 Apr 2023 16:45:55 +0300 | |
changeset 15949 | 668c88b31dd6 |
parent 15893 | 5b3beb90e1a6 |
child 16016 | 4933920eba89 |
permissions | -rw-r--r-- |
14154
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
diff
changeset
|
1 |
#ifndef ENGINE_H |
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
diff
changeset
|
2 |
#define ENGINE_H |
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
diff
changeset
|
3 |
|
14271
1aac8a62be6f
Implement send_ipc and read_ipc in engine lib, send_ipc in frontend
unC0Rr
parents:
14154
diff
changeset
|
4 |
#include <stddef.h> |
14154
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
diff
changeset
|
5 |
#include <stdint.h> |
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
diff
changeset
|
6 |
|
15893
5b3beb90e1a6
Implement generation of c header from rust interface, adapt qmlfrontend
unC0Rr
parents:
15891
diff
changeset
|
7 |
#include "../rust/lib-hedgewars-engine/target/lib-hedgewars-engine.hpp" |
15217 | 8 |
|
9 |
#ifndef Q_NAMESPACE |
|
10 |
#define Q_NAMESPACE |
|
11 |
#endif |
|
12 |
||
13 |
#ifndef Q_ENUM_NS |
|
14 |
#define Q_ENUM_NS(x) |
|
15 |
#endif |
|
16 |
||
17 |
#ifndef Q_DECLARE_METATYPE |
|
18 |
#define Q_DECLARE_METATYPE(x) |
|
19 |
#endif |
|
20 |
||
14154
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
diff
changeset
|
21 |
namespace Engine { |
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
diff
changeset
|
22 |
extern "C" { |
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
diff
changeset
|
23 |
|
15893
5b3beb90e1a6
Implement generation of c header from rust interface, adapt qmlfrontend
unC0Rr
parents:
15891
diff
changeset
|
24 |
using EngineInstance = hwengine::EngineInstance; |
5b3beb90e1a6
Implement generation of c header from rust interface, adapt qmlfrontend
unC0Rr
parents:
15891
diff
changeset
|
25 |
using PreviewInfo = hwengine::PreviewInfo; |
14154
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
diff
changeset
|
26 |
|
15893
5b3beb90e1a6
Implement generation of c header from rust interface, adapt qmlfrontend
unC0Rr
parents:
15891
diff
changeset
|
27 |
using hedgewars_engine_protocol_version_t = |
5b3beb90e1a6
Implement generation of c header from rust interface, adapt qmlfrontend
unC0Rr
parents:
15891
diff
changeset
|
28 |
decltype(hwengine::hedgewars_engine_protocol_version); |
14294
21be7838a127
Add advance_simulation() function to engine lib, some WIP on frontend
unc0rr
parents:
14271
diff
changeset
|
29 |
|
15893
5b3beb90e1a6
Implement generation of c header from rust interface, adapt qmlfrontend
unC0Rr
parents:
15891
diff
changeset
|
30 |
using start_engine_t = decltype(hwengine::start_engine); |
5b3beb90e1a6
Implement generation of c header from rust interface, adapt qmlfrontend
unC0Rr
parents:
15891
diff
changeset
|
31 |
using generate_preview_t = decltype(hwengine::generate_preview); |
5b3beb90e1a6
Implement generation of c header from rust interface, adapt qmlfrontend
unC0Rr
parents:
15891
diff
changeset
|
32 |
using dispose_preview_t = decltype(hwengine::dispose_preview); |
5b3beb90e1a6
Implement generation of c header from rust interface, adapt qmlfrontend
unC0Rr
parents:
15891
diff
changeset
|
33 |
using cleanup_t = decltype(hwengine::cleanup); |
5b3beb90e1a6
Implement generation of c header from rust interface, adapt qmlfrontend
unC0Rr
parents:
15891
diff
changeset
|
34 |
using send_ipc_t = decltype(hwengine::send_ipc); |
5b3beb90e1a6
Implement generation of c header from rust interface, adapt qmlfrontend
unC0Rr
parents:
15891
diff
changeset
|
35 |
using read_ipc_t = decltype(hwengine::read_ipc); |
5b3beb90e1a6
Implement generation of c header from rust interface, adapt qmlfrontend
unC0Rr
parents:
15891
diff
changeset
|
36 |
using setup_current_gl_context_t = decltype(hwengine::setup_current_gl_context); |
5b3beb90e1a6
Implement generation of c header from rust interface, adapt qmlfrontend
unC0Rr
parents:
15891
diff
changeset
|
37 |
using render_frame_t = decltype(hwengine::render_frame); |
5b3beb90e1a6
Implement generation of c header from rust interface, adapt qmlfrontend
unC0Rr
parents:
15891
diff
changeset
|
38 |
using advance_simulation_t = decltype(hwengine::advance_simulation); |
5b3beb90e1a6
Implement generation of c header from rust interface, adapt qmlfrontend
unC0Rr
parents:
15891
diff
changeset
|
39 |
using move_camera_t = decltype(hwengine::move_camera); |
14854
aed75d439027
Implement external events approach to input user actions into engine.
unc0rr
parents:
14713
diff
changeset
|
40 |
|
15893
5b3beb90e1a6
Implement generation of c header from rust interface, adapt qmlfrontend
unC0Rr
parents:
15891
diff
changeset
|
41 |
using simple_event_t = decltype(hwengine::simple_event); |
5b3beb90e1a6
Implement generation of c header from rust interface, adapt qmlfrontend
unC0Rr
parents:
15891
diff
changeset
|
42 |
using long_event_t = decltype(hwengine::long_event); |
5b3beb90e1a6
Implement generation of c header from rust interface, adapt qmlfrontend
unC0Rr
parents:
15891
diff
changeset
|
43 |
using positioned_event_t = decltype(hwengine::positioned_event); |
14854
aed75d439027
Implement external events approach to input user actions into engine.
unc0rr
parents:
14713
diff
changeset
|
44 |
|
15893
5b3beb90e1a6
Implement generation of c header from rust interface, adapt qmlfrontend
unC0Rr
parents:
15891
diff
changeset
|
45 |
using SimpleEventType = hwengine::SimpleEventType; |
5b3beb90e1a6
Implement generation of c header from rust interface, adapt qmlfrontend
unC0Rr
parents:
15891
diff
changeset
|
46 |
using LongEventType = hwengine::LongEventType; |
5b3beb90e1a6
Implement generation of c header from rust interface, adapt qmlfrontend
unC0Rr
parents:
15891
diff
changeset
|
47 |
using LongEventState = hwengine::LongEventState; |
5b3beb90e1a6
Implement generation of c header from rust interface, adapt qmlfrontend
unC0Rr
parents:
15891
diff
changeset
|
48 |
using PositionedEventType = hwengine::PositionedEventType; |
14854
aed75d439027
Implement external events approach to input user actions into engine.
unc0rr
parents:
14713
diff
changeset
|
49 |
|
15217 | 50 |
} // extern "C" |
51 |
||
52 |
Q_NAMESPACE |
|
53 |
||
54 |
Q_ENUM_NS(SimpleEventType) |
|
55 |
Q_ENUM_NS(LongEventType) |
|
56 |
Q_ENUM_NS(LongEventState) |
|
57 |
Q_ENUM_NS(PositionedEventType) |
|
58 |
||
59 |
}; // namespace |
|
60 |
||
61 |
Q_DECLARE_METATYPE(Engine::SimpleEventType) |
|
62 |
Q_DECLARE_METATYPE(Engine::LongEventType) |
|
63 |
Q_DECLARE_METATYPE(Engine::LongEventState) |
|
64 |
Q_DECLARE_METATYPE(Engine::PositionedEventType) |
|
14154
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
diff
changeset
|
65 |
|
8354b390f1a2
Some refactoring of qmlfrontend. It now shows land preview generated by hedgewars-engine
unC0Rr
parents:
diff
changeset
|
66 |
#endif // ENGINE_H |