This repository has been archived by the owner on Jun 11, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
base.h
1474 lines (1466 loc) · 68.4 KB
/
base.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#ifndef LANGUAGESTORM_LANGUAGE_BASE_H_INCLUDED
#define LANGUAGESTORM_LANGUAGE_BASE_H_INCLUDED
#include <sstream>
#include <iomanip>
namespace languagestorm {
class base {
protected:
base() = default;
public:
virtual ~base() = default;
virtual std::string const ordinal(size_t value) const {
/// Helper function to return a value with its ordinal suffix for this language, i.e. 1st, 2nd etc
std::stringstream ss;
ss << value;
if(((value % 100) >= 11) && ((value % 100) <= 13)) {
ss << "th";
} else {
switch(value % 10) {
case 1:
ss << "st";
break;
case 2:
ss << "nd";
break;
case 3:
ss << "rd";
break;
default:
ss << "th";
break;
}
}
return ss.str();
};
virtual std::string const sphereface() const {
/// Context: shown at the start of every new game, probably should be kept
/// the same for most languages
return "sphereFACE";
}
virtual std::string const a_game_by_voxelstorm() const {
/// Context: shown at the start of every new game, "VoxelStorm" should
/// probably be kept the same for most languages
return "A game by VoxelStorm";
}
virtual std::string const dead() const {
/// Context: shown after the player's first death
return "DEAD";
}
virtual std::string const dead_plural(uint_fast64_t deathcount) const {
/// Context: shown after every death, with a count of deaths so far
/// i.e: DEAD x36
std::stringstream ss;
ss << "DEAD x" << deathcount;
return ss.str();
}
virtual std::string const won() const {
/// Context: shown when the game is complete
return "WON";
}
virtual std::string const pause() const {
/// Context: shown circling the player's view when the game is paused
return "PAUSE";
}
virtual std::string const loading() const {
/// Context: In the title bar of the game when starting windowed, may appear elsewhere
// Note: the menu options are likely to appear in an all-caps font
return "Loading...";
}
virtual std::string const quit() const {
/// Context: menu option: exit the game entirely
return "Quit";
}
virtual std::string const save_and_quit() const {
/// Context: menu option: exit the game entirely
return "Save and quit";
}
virtual std::string const resume() const {
/// Context: menu option: resume playing
return "Continue";
}
virtual std::string const restart() const {
/// Context: menu option: end the current game and start a new one
return "Restart";
}
virtual std::string const done() const {
/// Context: menu option: finished changing options, go back to main menu
return "Done";
}
virtual std::string const back() const {
/// Context: menu option: don't take any action in this menu, go back to the last
return "Back";
}
virtual std::string const options() const {
/// Context: menu option: open options / settings menu
return "Options";
}
virtual std::string const language() const {
/// Context: menu option: language selection menu title
return "Language";
}
virtual std::string const inventory() const {
/// Context: menu option: open inventory screen
return "Inventory";
}
virtual std::string const sphere() const {
/// Context: menu option: open info about the current sphere
return "Sphere";
}
virtual std::string const game_log() const {
/// Context: menu option: open game log screen
return "Event Log";
}
virtual std::string const controls() const {
/// Context: menu option: open game input control configuration menu
return "Controls";
}
virtual std::string const help() const {
/// Context: menu option: open the help window
return "Help";
}
virtual std::string const about() const {
/// Context: menu option: open the about-this-game window
return "About";
}
virtual std::string const update_available() const {
/// Context: menu option: title that appears when an updated version is available
return "Update available!";
}
virtual std::string const download_latest_version() const {
/// Context: menu option: button that appears when an updated version is available
return "Download latest version";
}
virtual std::string const unable_to_check_latest_version() const {
/// Context: menu option: about menu, version information, when the game can't connect to the update server
return "Unable to check latest version online";
}
virtual std::string const version_is_up_to_date() const {
/// Context: menu option: about menu, version information, when this version is the latest available online
return "This version is confirmed up to date";
}
virtual std::string const version_is_outdated(std::string const &new_version) const {
/// Context: menu option: about menu, version information - button that can be pressed to open the game download page
std::stringstream ss;
ss << "This version is outdated - download " << new_version;
return ss.str();
}
virtual std::string const help_controls() const {
/// Context: help window: block of help text
return "BASIC CONTROLS";
}
virtual std::string const helptext01() const {
/// Context: help window: block of help text
return "Your ship has momentum. Orient it in the direction you wish to accelerate, and fire your thrusters.";
}
virtual std::string const helptext02() const {
return "To decelerate, turn around and fire your thrusters in the opposite direction.";
}
virtual std::string const helptext03() const {
return "When the camera is unlocked, you can look freely around the sphere.";
}
virtual std::string const helptext04() const {
return "Green things are usually good - collect them." "\n\n"
"Red things are usually bad - avoid them.";
}
virtual std::string const helptext05() const {
return "White things are neutral, but colliding with them is not generally a good idea.";
}
virtual std::string const helptext06() const {
return "Impacts are usually fatal. AblativeARMOUR gives some protection, but it is best not to rely on it.";
}
virtual std::string const helptext07() const {
return "Your progress is saved when you exit, but your savegame is deleted if you die.";
}
virtual std::string const helptext08() const {
return "The presence of planetary mass inhibits sphereSPACE transport. Destroy planetary matter to unlock wormholes.";
}
virtual std::string const helptext09() const {
return "Planetary matter can be fractured and mined.";
}
virtual std::string const helptext10() const {
return "The SphereSPACE has varied regions. Some directions have more planetary mass than others, some attract more red things than others.";
}
virtual std::string const helptext11() const {
return "Explore the menus - there is advanced information available in the sphere and inventory menus.";
}
virtual std::string const helptext12() const {
return "Visit the controls menu to see the rest of the available controls, and customise them.";
}
virtual std::string const helptext13() const {
return "You can configure and use any controllers, gamepads, joysticks, or VR interfaces, as well as the keyboard and mouse.";
}
virtual std::string const helptext14() const {
return "The graphical theme can be customised. Theme files can be shared online.";
}
virtual std::string const helptext15() const {
return "There seems to be something deep below the heart of the sphereSPACE wormhole network.";
}
virtual std::string const helptext16() const {
return "It sends ripples through the fabric of sphereSPACE itself. It is the source.";
}
virtual std::string const helptext17() const {
return "It's what brought you here.";
}
virtual std::string const helptext18() const {
return "You are drawn to it. You were created to investigate it.";
}
virtual std::string const helptext19() const {
return "You don't know why yet.";
}
virtual std::string const abouttext(std::string const &version, std::string const &git_version, std::string const &compileinfo, std::string const ¤t_year) const {
/// Context: "about" menu
std::stringstream ss;
ss << "sphereFACE" "\n"
"by" "\n"
"VoxelStorm" "\n\n" <<
"Version " << version << "\n" <<
"Revision " << git_version << "\n\n" <<
compileinfo << "\n\n" <<
"© 2014-" << current_year << "\n" <<
"VoxelStorm.com";
return ss.str();
}
virtual std::string const version(std::string const &version_string) const {
/// Context: Under the main title
std::stringstream ss;
ss << "Version " << version_string;
return ss.str();
}
virtual std::string const aboutlink_devblog() const {
return "About sphereFACE & dev blog";
}
virtual std::string const aboutlink_wiki() const {
return "sphereFACE wiki";
}
virtual std::string const aboutlink_officialsite() const {
return "Official website";
}
virtual std::string const aboutlink_moregames() const {
return "More VoxelStorm games";
}
virtual std::string const aboutlink_review() const {
return "Write a review on Steam";
}
virtual std::string const aboutlink_twitter() const {
return "Twitter";
}
virtual std::string const aboutlink_facebook() const {
return "Facebook";
}
virtual std::string const aboutlink_gplus() const {
return "Google+";
}
virtual std::string const aboutlink_youtube() const {
return "YouTube";
}
virtual std::string const sound() const {
/// Context: options menu: subtitle for the section
return "Sound";
}
virtual std::string const volume(int volume_percent) const {
/// Context: options menu: setting for the current sound volume
std::stringstream ss;
ss << "Master volume: " << volume_percent << "%";
return ss.str();
}
virtual std::string const music_volume(int volume_percent) const {
/// Context: options menu: setting for the current music volume
std::stringstream ss;
ss << "Music volume: " << volume_percent << "%";
return ss.str();
}
virtual std::string const now_playing() const {
/// Context: options menu: title above the info showing what music is currently playing
return "Now Playing";
}
virtual std::string const mute_when_paused_enabled(bool enabled) const {
/// Context: options menu: setting for whether to silence the music and sounds when the player pauses the game
if(enabled) {
return "Mute when paused: enabled";
} else {
return "Mute when paused: disabled";
}
}
virtual std::string const save_log_to_file_enabled(bool enabled) const {
/// Context: options menu: setting for whether to save the game log to a file
if(enabled) {
return "Save log to file: enabled";
} else {
return "Save log to file: disabled";
}
}
virtual std::string const select_audio_device() const {
/// Context: options menu: sound device selection menu
return "Select audio output device";
}
virtual std::string const currently_selected_audio_device(std::string const &device_name) const {
/// Context: options menu: what sound device is currently selected
std::stringstream ss;
ss << "Selected: " << device_name;
return ss.str();
}
virtual std::string const play_test_sound() const {
/// Context: options menu: sound device selection menu
return "Play a test sound";
}
virtual std::string const is_default() const {
/// Context: options menu: sound device selection menu
return " (default)";
}
virtual std::string const graphics() const {
/// Context: options menu: subtitle for the section
return "Graphics";
}
virtual std::string const fullscreen(bool fullscreen) const {
/// Context: options menu: setting for whether to show the game in full-screen or windowed mode
if(fullscreen) {
return "Display fullscreen";
} else {
return "Display in window";
}
}
virtual std::string const field_of_view(float fov) const {
/// Context: options menu: setting for the current field of view (acts as button to change it)
std::stringstream ss;
ss << "Field of view: " << fov;
return ss.str();
}
virtual std::string const shader_quality() const {
/// Context: options menu: graphics setting for the maximum quality (hence lowest performance)
return "Shader: Quality";
}
virtual std::string const shader_compromise() const {
/// Context: options menu: graphics setting for a compromise between quality and performance
return "Shader: Compromise";
}
virtual std::string const shader_performance() const {
/// Context: options menu: graphics setting for the maximum performance (hence lowest quality)
return "Shader: Performance";
}
virtual std::string const vsync_default() const {
/// Context: options menu: graphics setting for vertical sync (will usually translate as just "vsync")
return "VSync: System default";
}
virtual std::string const vsync_off() const {
/// Context: options menu: graphics setting for vertical sync (will usually translate as just "vsync")
return "VSync: Off";
}
virtual std::string const vsync_on() const {
/// Context: options menu: graphics setting for vertical sync (will usually translate as just "vsync")
return "VSync: On";
}
virtual std::string const fbo_enabled(bool enabled) const {
/// Context: options menu: setting for whether to enable FBO (frame buffer object) rendering mode, FBO is a technical term that probably won't translate
if(enabled) {
return "FBO rendering enabled";
} else {
return "FBO rendering disabled";
}
}
virtual std::string const fbo_multisample_enabled(bool enabled) const {
/// Context: options menu: setting for whether to enable FBO multisampled rendering, these are technical terms that may not translate
if(enabled) {
return "FBO multisampling enabled";
} else {
return "FBO multisampling disabled";
}
}
virtual std::string const vr_enabled(bool enabled) const {
/// Context: options menu: setting for whether to enable or disable virtual reality support
if(enabled) {
return "Virtual reality enabled";
} else {
return "Virtual reality disabled";
}
}
virtual std::string const input() const {
/// Context: options menu: subtitle for the section
return "Input";
}
virtual std::string const mouse_sensitivity(float sensitivity) const {
/// Context: options menu: setting for the current mouse movement speed for looking around
std::stringstream ss;
ss << "Mouse sensitivity: " << sensitivity;
return ss.str();
}
virtual std::string const rotation_speed(float speed) const {
/// Context: options menu: setting for the current mouse movement speed for looking around
std::stringstream ss;
ss << "Rotation speed: " << speed;
return ss.str();
}
virtual std::string const turn_sensitivity(float sensitivity) const {
/// Context: options menu: setting for the current keyboard sensitivity for ship rotation
std::stringstream ss;
ss << "Turn sensitivity: " << sensitivity << "%";
return ss.str();
}
virtual std::string const pickup_mode_switch() const {
/// Context: options menu: title for setting when to switch to new weapons
return "Switch to new weapons";
}
virtual std::string const always() const {
/// Context: options menu: setting to always switch to new weapons when they're picked up
return "Always";
}
virtual std::string const never() const {
/// Context: options menu: setting to never switch to new weapons when they're picked up
return "Never";
}
virtual std::string const if_not_firing() const {
/// Context: options menu: setting to switch to new weapons only if we're not firing at the time
return "If not firing";
}
virtual std::string const follow_cam_enabled(bool enabled) const {
/// Context: options menu: option for switching on and off the view that follows the player's ship
if(enabled) {
return "Follow-cam enabled";
} else {
return "Follow-cam disabled";
}
}
virtual std::string const follow_cam_mode() const {
/// Context: options menu: title for setting to select view mode that follows player's ship
return "Follow-cam mode";
}
virtual std::string const follow_cam_mode_clamp() const {
/// Context: options menu: view mode that follows the player's ship
return "Clamp to ship";
}
virtual std::string const follow_cam_mode_lead() const {
/// Context: options menu: view mode that follows the player's ship
return "Lead the ship";
}
virtual std::string const follow_cam_mode_lead_smooth() const {
/// Context: options menu: view mode that follows the player's ship
return "Lead the ship smoothly";
}
virtual std::string const smooth_mouse_mode() const {
/// Context: options menu: title for setting to select cursor smoothing mode
return "Cursor smoothing algorithm";
}
virtual std::string const smooth_mouse_mode_instant() const {
/// Context: options menu: mouse smoothing mode that just moves as the mouse moves, i.e. no smoothing
return "Smoothing disabled";
}
virtual std::string const smooth_mouse_mode_smooth_lerp() const {
/// Context: options menu: mouse smoothing mode that interpolates to the mouse position smoothing each axis independently
return "Interpolate axes independently";
}
virtual std::string const smooth_mouse_mode_smooth_bilerp() const {
/// Context: options menu: mouse smoothing mode that interpolates to the mouse position smoothing both axes together
return "Interpolate axes together";
}
virtual std::string const smooth_mouse_amount(float amount) const {
/// Context: options menu: setting for the current mouse smoothing amount
std::stringstream ss;
ss << "Cursor smoothing: " << amount;
return ss.str();
}
virtual std::string const training_drag_enable() const {
/// Context: options menu: title for setting when to enable the drag that slows down your ship to make it easier for beginners to fly
return "Training mode drag";
}
virtual std::string const in_first_sphere_only() const {
/// Context: options menu: setting for training drag - to enable in first sphere only
return "In first sphere only";
}
virtual std::string const keyboard_configuration() const {
/// Context: control configuration menu
return "Keyboard configuration";
}
virtual std::string const controller_configuration() const {
/// Context: control configuration menu (for a game controller or joystick, such as a gamepad)
return "Controller configuration";
}
virtual std::string const configure() const {
/// Context: control configuration menu, configure the selected controls
return "Configure";
}
virtual std::string const add_new() const {
/// Context: control configuration menu, add a new control profile
return "Add new";
}
virtual std::string const select() const {
/// Context: control configuration menu, select an option (such as a control profile)
return "Select";
}
virtual std::string const jettison() const {
/// Context: button to drop inventory items
return "Jettison";
}
virtual std::string const delete_option() const {
/// Context: control configuration menu, delete a control profile
return "Delete";
}
virtual std::string const unused() const {
/// Context: control configuration menu, show an option is not used - this should be emphatic (all caps) or somehow different to ordinary text
return "UNUSED";
}
virtual std::string const custom(unsigned int number) const {
/// Context: control configuration menu, default name of new custom control profiles, each is numbered from 1 upwards
std::stringstream ss;
ss << "CUSTOM " << number;
return ss.str();
}
virtual std::string const background_flash(bool value) const {
/// Context: Whether to enable background flashing as a graphical effect
if(value) {
return "Flash background: on";
} else {
return "Flash background: off";
}
}
virtual std::string const weapon_change_announcements_enabled(bool value) const {
/// Context: whether to show a visual announcement when the player changes their selected weapon
if(value) {
return "Announce weapon change: on";
} else {
return "Announce weapon change: off";
}
}
virtual std::string const dates_in_highscores_enabled(bool value) const {
/// Context: whether to show the date a high score was achieved in the high score screen
if(value) {
return "Dates in high scores: shown";
} else {
return "Dates in high scores: hidden";
}
}
virtual std::string const weapons() const {
/// Context: weapon list title
return "Weapons";
}
virtual std::string const upgrades() const {
/// Context: upgrade list title
return "Upgrades";
}
virtual std::string const ships_logs() const {
/// Context: ships log list
return "shipsLOGS";
}
virtual std::string const weapon_beamlaser_name() const {
/// Context: weapon name
return "beamLASER";
}
virtual std::string const weapon_beamlaser_description() const {
/// Context: weapon description
return "A directed-energy weapon firing a continuous beam of coherent light. Instantaneous damage is relatively low, but continuous concentrated fire is possible. Upgrading can significantly increase the output power.";
}
virtual std::string const weapon_burst_name() const {
/// Context: weapon name
return "fuelBURST";
}
virtual std::string const weapon_burst_description() const {
/// Context: weapon description
return "A last-resort venting of fuel to destroy nearby obstacles. Effective over a relatively short range, this secondary weapon can be fired without the need to reconfigure the primary weapon. Upgrading improves range and damage.";
}
virtual std::string const weapon_enemy_launcher_name() const {
/// Context: weapon name
return "enemyLAUNCHER";
}
virtual std::string const weapon_enemy_launcher_description() const {
/// Context: weapon description
return "Launches enemy ships. If you have this, you probably cheated to get it.";
}
virtual std::string const weapon_flakcannon_launcher_name() const {
/// Context: weapon name
return "flakCANNON";
}
virtual std::string const weapon_flakcannon_description() const {
/// Context: weapon description
return "A close-combat weapon that fires a deadly cloud of heavy, fast-moving shrapnel in a broad spread. Not an accurate weapon, but very effective for defeating both well-shielded enemies, or isolated groups of small targets.";
}
virtual std::string const weapon_flamethrower_name() const {
/// Context: weapon name
return "flameTHROWER";
}
virtual std::string const weapon_flamethrower_description() const {
/// Context: weapon description
return "Shoots a broad but short-ranged stream of burning hydrazine fuel mixed with oxidant. The expanding fuel can repel targets as well as damaging them, and the amount of damage increases in inverse proportion to range.";
}
virtual std::string const weapon_gaussrifle_name() const {
/// Context: weapon name
return "gaussRIFLE";
}
virtual std::string const weapon_gaussrifle_description() const {
/// Context: weapon description
return "Collects and charges up ionised particles, which are then launched in a high-velocity stream towards the target. The high velocity makes this weapon effective for shattering large planetary bodies, as well as piercing through shielding.";
}
virtual std::string const weapon_mine_name() const {
/// Context: weapon name
return "spaceMINES";
}
virtual std::string const weapon_mine_description() const {
/// Context: weapon description
return "Drops static mines that stay where they are dropped, and explode when approached closely by planetary bodies or sentient beings. Upgrading can incrase explosive damage and effective range, as well as mine laying repeat rate.";
}
virtual std::string const weapon_powerup_name() const {
/// Context: weapon name
return "powerupLAUNCHER";
}
virtual std::string const weapon_powerup_description() const {
/// Context: weapon description
return "Fires powerups. If you have this, you probably cheated to get it.";
}
virtual std::string const weapon_pulselaser_name() const {
/// Context: weapon name
return "pulseLASER";
}
virtual std::string const weapon_pulselaser_description() const {
/// Context: weapon description
return "A directed-energy weapon firing short pulses of highly focused coherent light. Requires time to recharge between shots, but allows for a great deal of damage at high precision. Upgrading increases fire rate as well as range and damage.";
}
virtual std::string const weapon_railgun_name() const {
/// Context: weapon name
return "railGUN";
}
virtual std::string const weapon_railgun_description() const {
/// Context: weapon description
return "A high-velocity electromagnetically launched kinetic impact weapon. Travelling at relativistic speeds, the heavy projectile is highly accurate and capable of penetrating through even thick layers of planetary matter and enemy shielding.";
}
virtual std::string const weapon_rocket_name() const {
/// Context: weapon name
return "guidedROCKETS";
}
virtual std::string const weapon_rocket_description() const {
/// Context: weapon description
return "Fires slow guided rockets that you can steer by turning your ship. These explode on impact. Although initially slow, the rockets accelerate continuously and have a long range, with the possibility of terminal guidance.";
}
virtual std::string const weapon_singularitycannon_name() const {
return "singularityCANNON";
}
virtual std::string const weapon_singularitycannon_description() const {
return "Warps the fabric of space-time itself to create a short-lived artificial singularity, which attracts all matter in its vicinity, and consumes anything it touches. It takes some time to spin up the singularity prior to launch.";
}
virtual std::string const weapon_speedspreadgun_name() const {
/// Context: weapon name
return "speedspreadGUN";
}
virtual std::string const weapon_speedspreadgun_description() const {
/// Context: weapon description
return "A repeating cannon firing a burst of spread-velocity shells. This weapon is versatile enough to be used both as a spread weapon and a concentrated fire weapon, and it can be upgraded to increase the number of shells and their velocity range.";
}
virtual std::string const weapon_spreadgun_name() const {
/// Context: weapon name
return "spreadGUN";
}
virtual std::string const weapon_spreadgun_description() const {
/// Context: weapon description
return "A repeating cannon firing a broad spread of medium-velocity shells, which continue in flight indefinitely until they hit something. It is possible to upgrade both the number of shells launched per shot, and their outward spin.";
}
virtual std::string const weapon_picked_up(std::string const &name) const {
/// Context: announcement of a new weapon being obtained by the player
std::stringstream ss;
ss << "Got " << name;
return ss.str();
}
virtual std::string const weapon_picked_up(std::string const &name, std::string const &level) const {
/// Context: announcement of a new weapon of a specific level being obtained by the player
/// note: level is passed in as a roman numeral
std::stringstream ss;
ss << "Got level " << level << " " << name;
return ss.str();
}
virtual std::string const weapon_upgraded(std::string const &name, std::string const &level) const {
/// Context: announcement of a weapon being upgraded to a new level
/// note: level is passed in as a roman numeral
std::stringstream ss;
ss << name << " upgraded: level " << level;
return ss.str();
}
virtual std::string const reverse_thruster_picked_up() const {
return "Got reverseTHRUSTER";
}
virtual std::string const ships_log_picked_up() const {
/// Context: Announcement that the player has picked up a ship's log
return "shipsLOG added to inventory";
}
virtual std::string const carrier_destroyed() const {
/// Context: announcement that the enemy boss has been killed
return "Carrier destroyed!";
}
virtual std::string const debris_percent_destroyed(int value) const {
/// Context: announcement that the player has destroyed a certain percentage of the sphere's asteroids
std::stringstream ss;
ss << value << "% destroyed";
return ss.str();
}
virtual std::string const plus(int value) const {
/// Context: anywhere an increment of a number needs to be shown (i.e. score increase)
std::stringstream ss;
ss << "+" << value;
return ss.str();
}
virtual std::string const minus(int value) const {
/// Context: anywhere an decrement of a number needs to be shown (i.e. score decrease)
std::stringstream ss;
ss << "-" << value;
return ss.str();
}
virtual std::string const percent(int value) const {
/// Context: anywhere a number needs to be shown as a percentage
std::stringstream ss;
ss << value << "%";
return ss.str();
}
virtual std::string const high_scores() const {
/// Context: title of the high scores menu
return "highSCORES";
}
virtual std::string const no_high_scores_yet() const {
/// Context: content of the high scores menu if nobody has set a high score yet
return "No high score set yet.";
}
virtual std::string const new_high_score(int highscore) const {
/// Context: announcing a new high score
std::stringstream ss;
ss << "New high score: " << highscore;
return ss.str();
}
virtual std::string const new_high_score(int highscore, unsigned int place) const {
/// Context: announcing a new high score and what place we're in now on the scoreboard
std::stringstream ss;
// use the ordinal function to convert "1" to "1st" etc
ss << "New high score: " << highscore << ", " << ordinal(place);
return ss.str();
}
virtual std::string const entered_sphere(std::string const new_sphere) const {
/// Context: announcement, the name of the sphere we've entered
std::stringstream ss;
ss << "Arrived at " << new_sphere;
return ss.str();
}
virtual std::string const cleared_sphere(std::string const new_sphere) const {
/// Context: announcement, the name of the sphere we've entered
std::stringstream ss;
ss << "Cleared " << new_sphere;
return ss.str();
}
virtual std::string const now_playing_track(std::string const music_track) const {
/// Context: announcement, the name of the new music track that's now playing
std::stringstream ss;
ss << "Now playing: " << music_track;
return ss.str();
}
virtual std::string const switched_weapon_to(std::string const new_weapon_name) const {
/// Context: announcement, the name of the new weapon we've switched to
std::stringstream ss;
ss << "Switched to " << new_weapon_name;
return ss.str();
}
virtual std::string const switched_weapon_to(std::string const new_weapon_name, std::string const &level) const {
/// Context: announcement, the name of the new weapon we've switched to and its level
/// note: level is passed in as a roman numeral
std::stringstream ss;
ss << "Switched to level " << level << " " << new_weapon_name;
return ss.str();
}
virtual std::string const current_score(int score) const {
/// Context: header above the highscores menu button
std::stringstream ss;
ss << "Current score: " << score;
return ss.str();
}
virtual std::string const bonesphere() const {
/// Context: title of the special sphere that contains the player's "bones", where they last died
return "boneSPHERE";
}
virtual std::string const sphere_is_clear() const {
/// Context: notice that a sphere is completely clear
return "100% clear";
}
virtual std::string const difficulty(float this_difficulty) const {
/// Context: displaying difficulty settings and the difficulty of a sphere as a percentage
unsigned int const difficulty_percent = static_cast<unsigned int>(this_difficulty * 100.0f);
std::stringstream ss;
ss << "Difficulty: " << difficulty_percent << "%";
return ss.str();
}
virtual std::string const altitude(float this_altitude) const {
/// Context: displaying the altitude of a sphere - units are lightyears (ly in English)
std::stringstream ss;
ss << "Altitude: " << std::fixed << std::setprecision(2) << this_altitude << "ly"; // set_precision lets us choose the number of decimal places
return ss.str();
}
virtual std::string const distance_to_target(float this_distance) const {
/// Context: displaying the distance between two points - units are lightyears (ly in English)
std::stringstream ss;
ss << "Distance: " << std::fixed << std::setprecision(2) << this_distance << "ly to target"; // set_precision lets us choose the number of decimal places
return ss.str();
}
virtual std::string const distance_to_target_and_from_ship(float this_distance_to_target, float this_distance_from_ship) const {
/// Context: displaying the distance between two points - units are lightyears (ly in English)
std::stringstream ss;
ss << "Distance: " << std::fixed << std::setprecision(2) << this_distance_from_ship << "ly from ship, " << std::fixed << std::setprecision(2) << this_distance_to_target << " to target"; // set_precision lets us choose the number of decimal places
return ss.str();
}
virtual std::string const name_multiple(std::string const &name, unsigned int number) const {
/// Context: sphere menu, modifies an existing name to add a multiplier
std::stringstream ss;
ss << name << " x" << number;
return ss.str();
}
virtual std::string const name_debris(float mass) const {
/// Context: sphere menu, describes a piece of asteroid debris
std::stringstream ss;
// convert mass to some more interesting looking value
unsigned int pretty_mass = static_cast<unsigned int>(mass * 1000.0f);
// let's pretend that converts to yottagrams ;) The earth weighs about 5974Yg
ss << "Debris (mass " << pretty_mass << "Yg)";
return ss.str();
}
virtual std::string const name_portal(std::string const destination) const {
/// Context: sphere menu, describes where a portal goes
std::stringstream ss;
ss << "Portal to " << destination;
return ss.str();
}
virtual std::string const portals() const {
/// Context: sphere menu, title of list of links to view a different sphere
return "Portals";
}
virtual std::string const move_to_sphere(std::string const sphere_name) const {
/// Context: sphere menu, link to view a different sphere
std::stringstream ss;
ss << "View \"" << sphere_name << "\"";
return ss.str();
}
virtual std::string const move_to_current_sphere(std::string const sphere_name) const {
/// Context: sphere menu, link to view the currently occupied sphere
std::stringstream ss;
ss << "Return to \"" << sphere_name << "\"";
return ss.str();
}
virtual std::string const portal_locked(std::string const sphere_name) const {
/// Context: sphere menu, disabled link to view a different sphere
std::stringstream ss;
ss << "\"" << sphere_name << "\" locked";
return ss.str();
}
virtual std::string const name_armour() const {
/// Context: sphere menu, player armour
return "ablativeARMOUR";
}
virtual std::string const description_armour() const {
/// Context: powerup description
return "A hardened aggregate of ice and rock, harvested from destroyed asteroids and planetary bodies, and formed into a segmented protective shell. Capable of absorbing or deflecting all but the most powerful impacts, the ablativeARMOUR is sacrificed in the process.";
}
virtual std::string const armour_status(unsigned int num_armours, unsigned int max_num_armours) const {
/// Context: powerup description
if(num_armours == 0) {
return "Armour status: Depleted";
} else {
std::stringstream ss;
if(num_armours == max_num_armours) {
ss << "Armour status: All " << max_num_armours << " plates intact";
} else {
ss << "Armour status: " << num_armours << " / " << max_num_armours << " plates intact";
}
return ss.str();
}
}
virtual std::string const armour_picked_up(unsigned int num_armours) const {
/// Context: announcement of armour being picked up by the player
std::stringstream ss;
ss << "Got " << num_armours << "x ablativeARMOUR";
return ss.str();
}
virtual std::string const name_bullet_base() const {
/// Context: sphere menu, generic bullet fired by the player
return "Projectile";
}
virtual std::string const name_bullet_enemy_base() const {
/// Context: sphere menu, generic bullet fired by an enemy
return "Enemy projectile";
}
virtual std::string const name_bullet_asteroids() const {
return "spreadGUN bullet";
}
virtual std::string const name_bullet_enemy_asteroids() const {
return "Enemy spreadGUN bullet";
}
virtual std::string const name_bullet_burst() const {
return "fuelBURST";
}
virtual std::string const name_bullet_enemy_burst() const {
return "Enemy fuelBURST";
}
virtual std::string const name_bullet_fireball() const {
return "fireBALL";
}
virtual std::string const name_bullet_enemy_fireball() const {
return "Enemy fireBALL";
}
virtual std::string const name_bullet_flak() const {
return "Flak";
}
virtual std::string const name_bullet_enemy_flak() const {
return "Enemy flak";
}
virtual std::string const name_bullet_gauss() const {
return "gaussRIFLE blast";
}
virtual std::string const name_bullet_enemy_gauss() const {
return "Enemy gaussRIFLE blast";
}
virtual std::string const name_bullet_laser() const {
return "laserBEAM";
}
virtual std::string const name_bullet_enemy_laser() const {
return "Enemy laserBEAM";
}
virtual std::string const name_bullet_mine() const {
return "spaceMINE (safe)";
}
virtual std::string const name_bullet_enemy_mine() const {
return "Enemy spaceMINE";
}
virtual std::string const name_bullet_rail() const {
return "railGUN projectile";
}
virtual std::string const name_bullet_enemy_rail() const {
return "Enemy railGUN projectile";
}
virtual std::string const name_bullet_rocket() const {
return "guidedROCKET";
}
virtual std::string const name_bullet_enemy_rocket() const {
return "Enemy guidedROCKET";
}
virtual std::string const name_bullet_singularity() const {
return "Singularity";
}
virtual std::string const name_bullet_enemy_singularity() const {
return "Enemy singularity";
}
virtual std::string const name_ship_base() const {
/// Context: sphere menu, generic ship
return "Ship";
}
virtual std::string const name_ship_powerup() const {
/// Context: sphere menu, powerup - implying it's an escape capsule
return "Capsule";
}
virtual std::string const name_ship_message_pickup() const {
/// Context: sphere menu, ship's log casette containing a plot message
return "shipsLOG";
}
virtual std::string const name_ship_reverse_thruster_pickup() const {
/// Context: sphere menu, reverse thruster powerup
return "reverseTHRUSTER";
}
virtual std::string const description_reverse_thruster() const {
/// Context: powerup description
return "An extra pair of maneuvering thrusters, mounted to fire in reverse, allowing for additional maneuverability without having to re-orient the ship.";
}
virtual std::string const name_enemy_base() const {
/// Context: sphere menu, generic enemy
return "Enemy";
}
virtual std::string const name_enemy_carrier(unsigned int health, unsigned int health_max) const {
/// Context: sphere menu, enemy boss - parameters are how much health it has left
if(health == health_max) {
return "Enemy Carrier";
} else {
unsigned int health_percent = static_cast<unsigned int>(static_cast<float>(health) / static_cast<float>(health_max) * 100.0f);
std::stringstream ss;
ss << "Enemy Carrier (" << health_percent << "%)";
return ss.str();
}
}
virtual std::string const name_building_base() const {
/// Context: sphere menu, generic building
return "Structure";
}
virtual std::string const name_hive_base() const {
/// Context: sphere menu, generic building
//return "Hive";
return "Enemy Structure";
}
virtual std::string const name_fragment_base() const {
/// Context: sphere menu, ship wreckage
return "Fragments";
}
virtual std::string const name_fragment_enemy() const {
/// Context: sphere menu, ship wreckage
return "Enemy wreckage";
}
virtual std::string const name_fragment_playership() const {
/// Context: sphere menu, ship wreckage
return "Wreckage";
}
virtual std::string const control_menu() const {
/// Context: names of controls players can bind (same for the rest of controls_)
/// They're used on buttons so it's important to keep them as short as possible