Backports the text rendering code from 1.6 to 1.5.
Done by starting with the current master's engine/render/text_render
and backporting things as-needed until it worked.
CLX rendering and text input handling are also backported as part of
this change.
* Hotkeys: Support more keybindings (#6719)
* Extend F keys with F13-F24 range
* Add more possible keybindings
* Removed hardcoded keys that are used elsewhere
* Put PAUSE back where it was before
* Remove hardcoded logic for PAUSE key
* Hotkeys: Support more keybindings
This patch adds more keybindings, so we can map multiple keys.
It also adds a possibility to bind an alternate key to pause game
(currently mapped to P and Pause key by default).
Done with the following script:
```ruby
Dir["Source/**/*.{h,c,cc,cpp,hpp}"].each do |path|
v = File.read(path)
next if !v.include?("uint32_t") || v.include?("cstdint")
lines = v.lines
line_num = if lines[2].start_with?(" *")
lines.index { |l| l.start_with?(" */") } + 3
else
3
end
lines.insert(line_num, "#include <cstdint>\n")
File.write(path, lines.join(""))
end
```
then fixed-up manually
* Always use the same seed for generating set/quest maps
* Use setlvltype for loading quest/set-map (instead of leveltype)
* Ensure dungeon flags are reset when loading a quest/set-map
This allows forcing the locale without changing the settings.
The `forceLocale` option also lets us avoid changing the locale in settings if fonts.mpq is missing, fixing the following scenario:
1. System locale is ja
2. Launch the game -- fonts are missing
3. Close the game, download fonts.mpq
4. Launch the game again -- it is now in English because the settings have changed