Commit Graph

53 Commits

Author SHA1 Message Date
b9936a80ee fix red talk word hitbox 2025-03-16 14:03:53 -04:00
cef17ea91c Optimize calculate_line_wrapping from O(N^2) to O(N) 2025-03-16 14:03:53 -04:00
46bfc92051 Refactor: function to turn eFont into sf::Font 2025-03-16 14:03:53 -04:00
1866fff3ce Cache measurement of space in TextStyle
I noticed a ton of string_length() calls on empty space strings,
each one making an sf::Text object to measure. I thought caching
the result would make the slow dialogs open faster but it didn't.
Still might as well do it, though.
2025-03-16 14:03:53 -04:00
5cfc6ba328 Fix all the compile warnings that occur on Mac.
(Except the OpenGL deprecation warning and some warnings coming from Boost.Process.)
2025-03-08 20:43:04 -05:00
823fb8904d Set scale-aware text size when initializing the object 2025-03-06 21:23:57 -05:00
01c11518cc Fix scaled text offset in fullscreen modes. Fix #651 2025-02-22 11:21:47 -05:00
32a532b7eb draw scale-aware text clipped to the adjusted clip_rect 2025-02-17 13:03:55 -06:00
d78793c979 store clip_rects of RenderTextures 2025-02-17 12:33:08 -06:00
9c70859244 Fix C++11 compiler error 2025-02-15 15:16:39 -06:00
78d10987fe draw scale-aware text onto RenderTextures 2025-02-15 15:16:15 -06:00
6fa63307b1 Draw scale-aware text onto windows 2025-02-15 15:12:25 -06:00
318f430917 clip missiles when they go beyond the ter screen 2025-02-13 09:49:59 -06:00
1103715faf add an option to show pipes to TextStyle 2025-02-09 20:28:06 -06:00
d8089fe013 silver 2025-01-22 11:01:22 -06:00
1fb1aa2ce3 add back the extra colours 2025-01-21 19:33:49 -06:00
3de6870628 parseColor use - instead of _ 2025-01-21 19:15:38 -06:00
4260d41bf6 colorize hp and sp in casting menu 2025-01-20 13:44:42 -06:00
daecca4abe dialogxml parseColor use a map built from Colours constants
parseColor() was doing a big if-else with string comparisons,
and returning values that differed from our Colours constants.
Since I couldn't find an instance of the colour attribute in our
existing xml, it should be safe to do away with those conflicting
values and refactor parseColor() to match the constants
and use cleaner code.
2025-01-20 13:44:31 -06:00
c7ce84def2 More intuitive coloration in spell menu 2025-01-20 13:42:20 -06:00
0ef3ad81d9 Recast hint for spellcasters 2025-01-20 13:42:03 -06:00
37640bf349 fix compiler warnings 2025-01-20 09:41:29 -05:00
a551da6299 add very rudimentary right-alignment text option 2024-11-16 17:47:07 -06:00
a725dc606a Fix #455 (#467)
Also fix #454 and #427
2024-11-16 15:44:12 -05:00
e2142158af fix #465 2024-11-10 11:33:02 -05:00
7791380a9a refactor dialogue word button on/off colors to constants 2024-09-03 00:08:26 -04:00
13a62445a3 Fix some compile warnings 2024-08-24 20:14:40 -04:00
d81e613ea1 more DRY overload function implementation 2024-08-22 09:47:06 -04:00
c08a10867c cTextMsg pre-calculate layout 2024-08-22 09:47:06 -04:00
5f97d8bfb3 refactor win_draw_string() so line wrapping can be cached 2024-08-22 09:47:06 -04:00
f400a5b7de Address a bunch of dead store issues found by the static analyzer.
Pretty much all of these fall into one of two categories:

* Variables that are obviously unneeded and in many cases completely unused – probably remnants of old code that was rewritten. These ones were deleted.

* Variables that look like they should be used but aren't. These ones have been suppressed, with a TODO message added as a reminder to investigate them in more detail later.
2024-08-10 12:22:05 -04:00
8a2cfbae7e Fix some issues rendering animated terrains in dialogs, and avoid a crash if a graphics sheet cannot be found 2023-01-30 00:07:25 -05:00
1654ac69aa Squash a too-verbose log message 2023-01-21 16:42:54 -05:00
8872f1aa25 Stop storing players as bare pointers - use unique_ptr instead
Should fix some potential memory leaks that were caught by static analysis
2023-01-12 21:26:08 -05:00
Morel Berenger
4cd2bfd8d1 render_image.cpp: improve gl error messages by adding filename 2023-01-06 20:49:08 -05:00
5b2561d034 Disable header maps in Xcode 12 2022-07-12 20:35:41 -04:00
a69d92d8dc Fix tiled textures not showing up on newer OSX 2022-07-05 09:52:24 -04:00
259e4ac125 Adjust the hilited string rendering to be less reliant on mysterious magic numbers
It still adds a mysterious offset to all text, but the returned rectns are now perfectly aligned to redraw the hilited string.
2020-12-19 17:32:46 -05:00
b8492a29b0 Extract shopping/talking colours to global constants
Adapted from patch by @clort81
2020-02-07 20:39:13 -05:00
805b35ec90 Fix Classify Custom Graphics wrongly claiming you don't have any 2020-02-05 23:48:36 -05:00
e6a6b41ec0 Fix incorrect clipping rect in scaled UI 2020-02-02 19:14:01 -05:00
3e686cb908 Tweak text colours to be less blindingly bright and closer to the original Mac BoE 2020-02-01 19:55:30 -05:00
d530abe00b Make use of the new resource manager's purgeable flag 2020-01-26 16:14:39 -05:00
14e2597108 Expose the shared pointer instead of the raw pointer in the resource manager and rewrite the custom sheets list to use a vector instead of manual memory management
In particular, this should fix a segmentation fault in the sound system caused by the resource manager pulling a resource that's in use.
2020-01-26 15:10:57 -05:00
542c037342 Integrate a new resource manager which should have better performance 2020-01-26 11:53:19 -05:00
d1838991a8 This is an attempt to fix the Travis build errors due to mismatched virtual override signatures 2018-03-03 18:44:27 -05:00
e77d5194a3 Add a version directive to the shaders 2018-02-19 02:15:28 -05:00
9127e4a03f Enable building tests in MSVC 2013 2017-09-16 12:46:31 -04:00
9c69e006d8 Refactor rendering to use an SFML view for placing the main UI within the overall interface 2017-09-04 14:36:55 -04:00
9d86053817 Fix up MSVC project file for the major reorganization 2017-08-30 00:09:01 -04:00