Project Alice
Loading...
Searching...
No Matches
constants.hpp
Go to the documentation of this file.
1#pragma once
2#include <stdint.h>
3
4namespace sys {
5enum class virtual_key : uint8_t {
6 NONE = 0x00,
7 LBUTTON = 0x01,
8 RBUTTON = 0x02,
9 CANCEL = 0x03,
10 MBUTTON = 0x04,
11 XBUTTON_1 = 0x05,
12 XBUTTON_2 = 0x06,
13 BACK = 0x08,
14 TAB = 0x09,
15 CLEAR = 0x0C,
16 RETURN = 0x0D,
17 SHIFT = 0x10,
18 CONTROL = 0x11,
19 MENU = 0x12,
20 PAUSE = 0x13,
21 CAPITAL = 0x14,
22 KANA = 0x15,
23 JUNJA = 0x17,
24 FINAL = 0x18,
25 KANJI = 0x19,
26 ESCAPE = 0x1B,
27 CONVERT = 0x1C,
28 NONCONVERT = 0x1D,
29 ACCEPT = 0x1E,
30 MODECHANGE = 0x1F,
31 SPACE = 0x20,
32 PRIOR = 0x21,
33 NEXT = 0x22,
34 END = 0x23,
35 HOME = 0x24,
36 LEFT = 0x25,
37 UP = 0x26,
38 RIGHT = 0x27,
39 DOWN = 0x28,
40 SELECT = 0x29,
41 PRINT = 0x2A,
42 EXECUTE = 0x2B,
43 SNAPSHOT = 0x2C,
44 INSERT = 0x2D,
45 DELETE_KEY = 0x2E,
46 HELP = 0x2F,
47 NUM_0 = 0x30,
48 NUM_1 = 0x31,
49 NUM_2 = 0x32,
50 NUM_3 = 0x33,
51 NUM_4 = 0x34,
52 NUM_5 = 0x35,
53 NUM_6 = 0x36,
54 NUM_7 = 0x37,
55 NUM_8 = 0x38,
56 NUM_9 = 0x39,
57 A = 0x41,
58 B = 0x42,
59 C = 0x43,
60 D = 0x44,
61 E = 0x45,
62 F = 0x46,
63 G = 0x47,
64 H = 0x48,
65 I = 0x49,
66 J = 0x4A,
67 K = 0x4B,
68 L = 0x4C,
69 M = 0x4D,
70 N = 0x4E,
71 O = 0x4F,
72 P = 0x50,
73 Q = 0x51,
74 R = 0x52,
75 S = 0x53,
76 T = 0x54,
77 U = 0x55,
78 V = 0x56,
79 W = 0x57,
80 X = 0x58,
81 Y = 0x59,
82 Z = 0x5A,
83 LWIN = 0x5B,
84 RWIN = 0x5C,
85 APPS = 0x5D,
86 SLEEP = 0x5F,
87 NUMPAD0 = 0x60,
88 NUMPAD1 = 0x61,
89 NUMPAD2 = 0x62,
90 NUMPAD3 = 0x63,
91 NUMPAD4 = 0x64,
92 NUMPAD5 = 0x65,
93 NUMPAD6 = 0x66,
94 NUMPAD7 = 0x67,
95 NUMPAD8 = 0x68,
96 NUMPAD9 = 0x69,
97 MULTIPLY = 0x6A,
98 ADD = 0x6B,
99 SEPARATOR = 0x6C,
100 SUBTRACT = 0x6D,
101 DECIMAL = 0x6E,
102 DIVIDE = 0x6F,
103 F1 = 0x70,
104 F2 = 0x71,
105 F3 = 0x72,
106 F4 = 0x73,
107 F5 = 0x74,
108 F6 = 0x75,
109 F7 = 0x76,
110 F8 = 0x77,
111 F9 = 0x78,
112 F10 = 0x79,
113 F11 = 0x7A,
114 F12 = 0x7B,
115 F13 = 0x7C,
116 F14 = 0x7D,
117 F15 = 0x7E,
118 F16 = 0x7F,
119 F17 = 0x80,
120 F18 = 0x81,
121 F19 = 0x82,
122 F20 = 0x83,
123 F21 = 0x84,
124 F22 = 0x85,
125 F23 = 0x86,
126 F24 = 0x87,
127 NAVIGATION_VIEW = 0x88,
128 NAVIGATION_MENU = 0x89,
129 NAVIGATION_UP = 0x8A,
130 NAVIGATION_DOWN = 0x8B,
131 NAVIGATION_LEFT = 0x8C,
132 NAVIGATION_RIGHT = 0x8D,
133 NAVIGATION_ACCEPT = 0x8E,
134 NAVIGATION_CANCEL = 0x8F,
135 NUMLOCK = 0x90,
136 SCROLL = 0x91,
137 OEM_NEC_EQUAL = 0x92,
138 LSHIFT = 0xA0,
139 RSHIFT = 0xA1,
140 LCONTROL = 0xA2,
141 RCONTROL = 0xA3,
142 LMENU = 0xA4,
143 RMENU = 0xA5,
144 SEMICOLON = 0xBA,
145 PLUS = 0xBB,
146 COMMA = 0xBC,
147 MINUS = 0xBD,
148 PERIOD = 0xBE,
149 FORWARD_SLASH = 0xBF,
150 TILDA = 0xC0,
151 OPEN_BRACKET = 0xDB,
152 BACK_SLASH = 0xDC,
153 CLOSED_BRACKET = 0xDD,
154 QUOTE = 0xDE
155};
156enum class key_modifiers : uint8_t {
157 modifiers_none = 0x0,
158 modifiers_alt = 0x4,
159 modifiers_ctrl = 0x2,
160 modifiers_shift = 0x1,
162 modifiers_ctrl_alt = 0x6,
164 modifiers_all = 0x7
165};
166constexpr inline float ui_scales[] = {0.25f, 0.30f, 0.35f, 0.5f, 0.75f, 1.0f, 1.25f, 1.5f, 1.75f, 2.0f, 2.5f, 3.0f};
167constexpr inline uint32_t ui_scales_count = 12;
168
170 none = 0,
171 yearly = 1,
172 monthly = 2,
173 daily = 3,
174};
175
176constexpr inline int32_t max_autosaves = 16;
177
179 none = 0,
180 linear = 1,
181 quadratic = 2,
182 cubic = 3
183};
184
185enum class map_zoom_mode : uint8_t {
186 panning = 0,
187 inverted = 1,
188 centered = 2,
189 to_cursor = 3,
191};
192
194 inherit = 0,
195 same = 1,
196 none = 2
197};
198
202 standby,
205 disembark,
206 embark
207};
208
210 idle,
213 siege,
214};
215
217 siege,
218 defend,
220 none
221};
222
224
226 revolt = 0, // added
227 war_on_nation = 1, // added
228 war_by_nation = 2, // added
229 wargoal_added = 3, // added
230 siegeover_by_nation = 4, // added
231 siegeover_on_nation = 5, // added
232 colony_finished = 6,
233 reform_gained = 7,
234 reform_lost = 8,
236 upperhouse = 10, // added
237 electionstart = 11, // added
238 electiondone = 12, // added
239 breakcountry = 13, // added
240 peace_accepted_from_nation = 14, // added
241 peace_rejected_from_nation = 15, // added
242 peace_accepted_by_nation = 16, // added
243 peace_rejected_by_nation = 17, // added
245 mobilization_end = 19,
246 factory_complete = 20,
247 rr_complete = 21,
248 fort_complete = 22,
250 province_event = 24,
251 national_event = 25,
252 major_event = 26,
253 invention = 27, // added
254 tech = 28, // added
255 leader_dies = 29, // added
261 decision = 35, // added
262 lose_great_power = 36, // added
263 become_great_power = 37, // added
264 war_subsidies_start_by_nation = 38, // added
265 war_subsidies_start_on_nation = 39, // added
266 war_subsidies_end_by_nation = 40, // added
267 war_subsidies_end_on_nation = 41, // added
272 mil_access_start_by_nation = 46, // added
273 mil_access_start_on_nation = 47, // added
274 mil_access_end_by_nation = 48, // added
275 mil_access_end_on_nation = 49, // added
276 mil_access_declined_by_nation = 50, // added
277 mil_access_declined_on_nation = 51, // added
278 alliance_starts = 52, // added
279 alliance_ends = 53, // added
280 alliance_declined_by_nation = 54, // added
281 alliance_declined_on_nation = 55, // added
282 ally_called_accepted_by_nation = 56, // added
283 ally_called_declined_by_nation = 57, // added
284 discredit_by_nation = 58, // added
285 ban_by_nation = 59, // added
286 expell_by_nation = 60, // added
287 discredit_on_nation = 61, // added
288 ban_on_nation = 62, // added
289 expell_on_nation = 63, // added
290 increase_opinion = 64, // added
291 decrease_opinion_by_nation = 65, // added
292 decrease_opinion_on_nation = 66, // added
293 rem_sphere_by_nation = 67, // added
294 rem_sphere_on_nation = 68, // added
295 removed_from_sphere = 69, // added
296 add_sphere = 70, // added
297 added_to_sphere = 71, // added
298 increase_relation_by_nation = 72, // added
299 increase_relation_on_nation = 73, // added
300 decrease_relation_by_nation = 74, // added
301 decrease_relation_on_nation = 75, // added
302 join_war_by_nation = 76, // added
303 join_war_on_nation = 77, // added
304 gw_unlocked = 78,
305 war_becomes_great = 79, // added
306 cb_detected_on_nation = 80, // added
307 cb_detected_by_nation = 81, // added
312 crisis_resolution_accepted = 86, // added
313 crisis_becomes_war = 87, // added
315 crisis_starts = 89, // added
316 crisis_attacker_backer = 90, // added
317 crisis_defender_backer = 91, // added
318 crisis_fizzle = 92, // added
319 war_join_by = 93, // added
320 war_join_on = 94, // added
321 cb_fab_finished = 95, // added
322 cb_fab_cancelled = 96, // added
323 crisis_voluntary_join = 97, // added
324 // split
325 army_built = 98, // added
326 navy_built = 99, // added
327 bankruptcy = 100,
329 chat_message = 102,
330 count = 128
331};
332
334 revolt = 0, // added
335 war = 1, // added
336 wargoal_added = 2, // added
337 siegeover = 3, // added
338 colony_finished = 4,
339 reform_gained = 5,
340 reform_lost = 6,
342 upperhouse = 8, // added
343 electionstart = 9, // added
344 electiondone = 10, // added
345 breakcountry = 11, // added
346 peace_accepted = 12, // added
347 peace_rejected = 13, // added
349 mobilization_end = 15,
350 factory_complete = 16,
351 rr_complete = 17,
352 fort_complete = 18,
354 province_event = 20,
355 national_event = 21,
356 major_event = 22,
357 invention = 23, // added
358 tech = 24, // added
359 leader_dies = 25, // added
363 decision = 29, // added
364 lose_great_power = 30, // added
365 become_great_power = 31, // added
366 war_subsidies_start = 32, // added
367 war_subsidies_end = 33, // added
369 reparations_end = 35,
370 mil_access_start = 36, // added
371 mil_access_end = 37, // added
372 mil_access_declined = 38, // added
373 alliance_starts = 39, // added
374 alliance_ends = 40, // added
375 alliance_declined = 41, // added
376 ally_called_accepted = 42, // added
377 ally_called_declined = 43, // added
378 discredit = 44, // added
379 ban = 45, // added
380 expell = 46, // added
381 increase_opinion = 47, // added
382 decrease_opinion = 48, // added
383 rem_sphere = 49, // added
384 add_to_sphere = 50, // added
385 increase_relation = 51, // added
386 decrease_relation = 52, // added
387 join_war = 53, // added
388 gw_unlocked = 54,
389 war_becomes_great = 55, // added
390 cb_detected = 56, // added
391 crisis_join_offer_accepted = 57, // added
392 crisis_join_offer_declined = 58, // added
393 crisis_resolution_accepted = 59, // added
394 crisis_becomes_war = 60, // added
395 crisis_resolution_declined = 61, // added
396 crisis_starts = 62, // added
397 crisis_attacker_backer = 63, // added
398 crisis_defender_backer = 64, // added
399 crisis_fizzle = 65, // added
400 cb_fab_finished = 66, // added
401 cb_fab_cancelled = 67, // added
402 crisis_voluntary_join = 68, // added
403 army_built = 69, // added
404 navy_built = 70, // added
405 bankruptcy = 71,
407 chat_message = 73,
408 count = 74
409};
410
415};
416
418 // source target third
433 message_setting_type::count}, //peace_accepted = 12, // added
436 message_setting_type::count}, //peace_rejected = 13, // added
450 message_setting_type::count}, //land_combat_starts = 26,
452 message_setting_type::count}, //naval_combat_starts = 27,
459 message_setting_type::count}, //war_subsidies_start = 32, // added
462 message_setting_type::count}, //war_subsidies_end = 33, // added
465 message_setting_type::count}, //reparations_start = 34,
468 message_setting_type::count}, //reparations_end = 35,
471 message_setting_type::count}, //mil_access_start = 36, // added
474 message_setting_type::count}, //mil_access_end = 37, // added
477 message_setting_type::count}, //mil_access_declined = 38, // added
482 message_setting_type::count}, //alliance_declined = 41, // added
484 message_setting_type::count, message_setting_type::count}, //ally_called_accepted = 42, // added
486 message_setting_type::count, message_setting_type::count}, //ally_called_declined = 43, // added
493 message_setting_type::count}, //decrease_opinion = 48, // added
495 message_setting_type::removed_from_sphere }, //rem_sphere = 49, // added
499 message_setting_type::count}, //increase_relation = 51, // added
502 message_setting_type::count}, //decrease_relation = 52, // added
509 message_setting_type::count}, //crisis_join_offer_accepted = 57, // added
512 message_setting_type::count}, //crisis_join_offer_declined = 58, // added
514 message_setting_type::count, message_setting_type::count}, //crisis_resolution_accepted = 59, // added
516 message_setting_type::count, message_setting_type::count}, //crisis_becomes_war = 60, // added
518 message_setting_type::count}, //crisis_resolution_declined = 61, // added
531};
532
533namespace message_response {
534
535constexpr inline uint8_t ignore = 0x00;
536constexpr inline uint8_t log = 0x01;
537constexpr inline uint8_t popup = 0x02;
538constexpr inline uint8_t pause = 0x04;
539constexpr inline uint8_t sound = 0x08;
540
541constexpr inline uint8_t standard_sound = sound;
542constexpr inline uint8_t standard_log = log | sound;
543constexpr inline uint8_t standard_popup = log | sound | popup;
544constexpr inline uint8_t standard_pause = log | sound | popup | pause;
545
546}
547
550 client,
551 host
552};
553
555 none,
556 protan, //lack red
557 deutan, //lack green
558 tritan, //lack blue
559 achroma, //black and white
560};
561
562constexpr int32_t max_event_options = 8;
563constexpr uint32_t max_languages = 64;
564
570
571} // namespace sys
572
573namespace culture {
574inline constexpr int32_t max_issue_options = 6;
575}
576
577namespace economy {
579constexpr inline int32_t max_building_types = 5;
580}
581
582namespace ui {
583
585enum class production_window_tab : uint8_t { factories = 0x0, investments = 0x1, projects = 0x2, goods = 0x3 };
586constexpr inline uint32_t max_chat_message_len = 64;
587
588}
589
590namespace province {
591namespace border {
592constexpr inline uint8_t state_bit = 0x01;
593constexpr inline uint8_t national_bit = 0x02;
594constexpr inline uint8_t coastal_bit = 0x04;
595constexpr inline uint8_t impassible_bit = 0x08;
596constexpr inline uint8_t non_adjacent_bit = 0x10;
597constexpr inline uint8_t river_crossing_bit = 0x20;
598constexpr inline uint8_t test_bit = 0x40;
599} // namespace border
600} // namespace province
601
602namespace map {
603constexpr inline float min_zoom = 1.0f;
604constexpr inline float max_zoom = 75.0f;
605constexpr inline float zoom_close = 5.f;
606constexpr inline float zoom_very_close = 8.f;
607}
608
609namespace ai {
610enum class fleet_activity {
611 unspecified = 0, // ai hasn't run on this unit yet
612 boarding = 1, // waiting for troops to arrive
613 transporting = 2, // moving or waiting for troops to disembark
614 returning_to_base = 3, // moving back to home port
615 attacking = 4, // trying to attack another fleet
616 merging = 5, // moving to main base to merge up
617 idle = 6, // sitting in main base with no order
618 unloading = 7, // transport arrived, waiting for units to get off
620};
621
622enum class army_activity {
623 unspecified = 0,
624 on_guard = 1, // hold in place
625 attacking = 2,
626 merging = 3,
627 transport_guard = 4,
629 // attack_finished = 6,
630 attack_gathered = 7,
632};
633
634
635
636}
Definition: ai.cpp:13
fleet_activity
Definition: constants.hpp:610
army_activity
Definition: constants.hpp:622
constexpr int32_t max_issue_options
Definition: constants.hpp:574
constexpr int32_t max_building_types
Definition: constants.hpp:579
province_building_type
Definition: constants.hpp:578
constexpr float zoom_close
Definition: constants.hpp:605
constexpr float max_zoom
Definition: constants.hpp:604
constexpr float min_zoom
Definition: constants.hpp:603
constexpr float zoom_very_close
Definition: constants.hpp:606
constexpr uint8_t impassible_bit
Definition: constants.hpp:595
constexpr uint8_t non_adjacent_bit
Definition: constants.hpp:596
constexpr uint8_t test_bit
Definition: constants.hpp:598
constexpr uint8_t state_bit
Definition: constants.hpp:592
constexpr uint8_t river_crossing_bit
Definition: constants.hpp:597
constexpr uint8_t national_bit
Definition: constants.hpp:593
constexpr uint8_t coastal_bit
Definition: constants.hpp:594
Definition: sound.hpp:15
constexpr uint8_t standard_popup
Definition: constants.hpp:543
constexpr uint8_t popup
Definition: constants.hpp:537
constexpr uint8_t pause
Definition: constants.hpp:538
constexpr uint8_t log
Definition: constants.hpp:536
constexpr uint8_t standard_log
Definition: constants.hpp:542
constexpr uint8_t standard_pause
Definition: constants.hpp:544
constexpr uint8_t sound
Definition: constants.hpp:539
constexpr uint8_t standard_sound
Definition: constants.hpp:541
constexpr uint8_t ignore
Definition: constants.hpp:535
Definition: constants.hpp:4
constexpr msg_setting_entry message_setting_map[size_t(message_base_type::count)]
Definition: constants.hpp:417
virtual_key
Definition: constants.hpp:5
save_type
Definition: constants.hpp:565
@ autosave
Definition: constants.hpp:567
@ normal
Definition: constants.hpp:566
@ bookmark
Definition: constants.hpp:568
message_setting_type
Definition: constants.hpp:225
commodity_group
Definition: constants.hpp:223
key_modifiers
Definition: constants.hpp:156
message_base_type
Definition: constants.hpp:333
network_mode_type
Definition: constants.hpp:548
constexpr uint32_t ui_scales_count
Definition: constants.hpp:167
army_group_regiment_status
Definition: constants.hpp:199
map_zoom_mode
Definition: constants.hpp:185
constexpr int32_t max_autosaves
Definition: constants.hpp:176
army_group_regiment_task
Definition: constants.hpp:209
constexpr uint32_t max_languages
Definition: constants.hpp:563
autosave_frequency
Definition: constants.hpp:169
constexpr float ui_scales[]
Definition: constants.hpp:166
color_blind_mode
Definition: constants.hpp:554
map_label_mode
Definition: constants.hpp:178
constexpr int32_t max_event_options
Definition: constants.hpp:562
map_vassal_color_mode
Definition: constants.hpp:193
army_group_order
Definition: constants.hpp:216
production_sort_order
Definition: constants.hpp:584
constexpr uint32_t max_chat_message_len
Definition: constants.hpp:586
production_window_tab
Definition: constants.hpp:585
uint uint32_t
uchar uint8_t
Definition: constants.hpp:411
message_setting_type third
Definition: constants.hpp:414
message_setting_type source
Definition: constants.hpp:412
message_setting_type target
Definition: constants.hpp:413