Anders Jenbo
9cee65da6c
Correct calculation for KerningFitSpacing
4 years ago
Anders Jenbo
b227afc4c4
Do not render text past first encoding error
...
Continuing past the error allows for CTD attacks using special crafted
invalid UTF-8 with a multiby indicator at the end the string
4 years ago
Anders Jenbo
11e37e972a
Port essential parts to use SDL abstraction for file access
4 years ago
Gleb Mazovetskiy
dec45920eb
Text rendering: Support Zero-width space
...
Zero-width space is a non-printing character that indicates a word
boundary.
https://en.wikipedia.org/wiki/Zero-width_space
4 years ago
Anders Jenbo
5b3abbd315
Correct dialog font full width
4 years ago
Anders Jenbo
b3546e3254
Load full width kerning programmatically
4 years ago
Anders Jenbo
f022a341b0
Avoid crashing from missing fonts
4 years ago
Andrew James
949206424e
Enable clang-tidy in Visual Studio projects ( #3101 )
4 years ago
ephphatha
b15e08fc3f
Deduplicate logic in GetAnimationProgress
4 years ago
obligaron
f7efb72314
Fix LoadFileInMem std::array overload
4 years ago
Gleb Mazovetskiy
f4404e1452
WordWrapString: Also break on `,` U+FF0C (FULLWIDTH COMMA)
5 years ago
Gleb Mazovetskiy
ff9affa513
Fix a couple of noisy MSVC warnings
5 years ago
Gleb Mazovetskiy
0c694edaba
WordWrapString: Wrap on punctuation
...
Useful for Chinese and Japanese, which do not have spaces between words,
nor whitespace after punctuation.
5 years ago
Anders Jenbo
4dd8b121ec
Replace TTF with PCX font
5 years ago
Anders Jenbo
d0f70d5468
Correct loading of unicode fonts past row 09
5 years ago
Anders Jenbo
704a04ae4d
Add support for Unicode fonts
5 years ago
Alex
6df826eb02
Fix compiler warnings
5 years ago
Anders Jenbo
7771a08d03
Translatable mainpanel
5 years ago
Gleb Mazovetskiy
4e1ad7ab65
LoadFile: Avoid opening the file twice
...
Previously we were passing the path to `GetFileSize`, which resulted in
opening and closing the file twice.
5 years ago
staphen
fb4f1ed8fd
Add structs for virtual gamepad
5 years ago
obligaron
e67ea3639f
Fix AnimationInfo::GetAnimationProgress() when normal animation logic is used (for example loaded save games)
5 years ago
staphen
09b8afba4e
Fix OOB error in DrawString
5 years ago
qndel
1f61b683a6
fix chat line wrapping
5 years ago
Juliano Leal Goncalves
5607c58daa
🏷️ Add 'PickRandomlyAmong' function that picks one value from a set of values randomly
...
This will be used in a few places where we previously used a raw integer random to index into a local array for selection, simplifying that type of logic to a single statement.
5 years ago
ephphatha
67ecea1a42
Always set the monster animation when ChangeAnimationData is called
...
Required updating AnimationInfo to handle being passed 0 for the total framecount, previously it would call clamp with min > max which was invalid.
5 years ago
ephphatha
8e155e011f
Rename helpers on Monster to match AnimationInfo
5 years ago
ephphatha
b12de6fe12
Use scoped enum for Direction
...
Identified and removed an instance of Direction being used as an argument for a bool parameter
Removed a single-use temporary variable being cast from sprite frame to direction to size_t
Co-authored-by: Anders Jenbo <anders@jenbo.dk>
Fix alignment of WalkSettings array
5 years ago
Anders Jenbo
41f6b62caa
Fix infinit loop if first word overflows the text box
...
Fixes #2829
5 years ago
Anders Jenbo
7169882b1f
✨ Implement new font rendering
5 years ago
Juliano Leal Goncalves
5bb7b0bf23
♻️ Reduce visibility of 'Displacement::fromDirection' to 'private'
...
This will enforce the new constructor conversion approach over the use of the static method.
5 years ago
Juliano Leal Goncalves
32e22a16b3
♻️ Leverage conversion constructor for 'Direction' to 'Displacement'
...
This makes code more consistent overall as we use the same pattern for dealing with Sizes.
5 years ago
Juliano Leal Goncalves
244235d1de
🏷️ Add explicit conversion constructor on 'Displacement' from 'Direction'
...
We'll leverage this for consistency with other conversions which similarly use a conversion constructor instead of a static method like 'fromDirection'.
5 years ago
Juliano Leal Goncalves
7da37da8c9
♻️ Leverage 'Point' in 'RenderTile' function
5 years ago
Juliano Leal Goncalves
bb2dfdfb73
🚚 Rename 'ItemStruct' to 'Item'
5 years ago
Juliano Leal Goncalves
f90d3239e5
✨ Add 'Center()' method on 'Rectangle'
5 years ago
Juliano Leal Goncalves
222817af23
✨ Add divide by int operator to 'Size' struct
...
To be used in several places for finding the "center" of rectangles, for example
5 years ago
obligaron
02900c8fa5
Demo: Fix rendering jittering
5 years ago
obligaron
2a6e5712de
Disable hardware cursor for demo playback
5 years ago
Anders Jenbo
df636c0afc
Remove DIR_OMNI
5 years ago
Vladimir Olteanu
090a04670c
Make OwnedSurface::OwnedSurface(Size) explicit
5 years ago
Vladimir Olteanu
bfcc57783c
Remove Surface::{Alloc,Free}, introduce OwnedSurface
5 years ago
obligaron
26e61b363b
demo: Centralize options override
5 years ago
obligaron
77f9bded9e
Introduce demo namespace
5 years ago
Vladimir Olteanu
b17ff04ee2
Use string_view in DrawString and friends
5 years ago
Anders Jenbo
d523fc1e81
Cleanups
5 years ago
ephphatha
0575716eac
Rename UiFlags members to group related options
5 years ago
ephphatha
4ad53232a0
Convert the UiFlags enum to a scoped enum type
...
Replace operator&& with named function
5 years ago
Anders Jenbo
24d0d37d26
Add drop shadow to DrawMapLineSteep
5 years ago
obligaron
551645060b
Fix item swapping and AnimationInfo::ChangeAnimationData
5 years ago
obligaron
1956c6a1c2
Fix some 64bit warnings
5 years ago