4983 Commits

Author SHA1 Message Date
Alberth289346
5ff228ac21 Refactor drawable draw / hit_test / is_multiple_frame_animation methods (#2808)
* Refactor drawable draw/hit_test/is_multiple_frame_animation

- Replaced the 'drawable' base class function pointers by abstract virtual methods.
- Implemented them in 'animation' and 'sprite_render_list'.
- Added an enumeration to 'animation' to track the kind of animation that is stored.

- Deleted all the functions of the removed function pointers.

* Fix converting lua userdata to animation

reinterpret_cast and static_cast from a void pointer to any type
other than the original is not allowed in c++, there is no
guarantee that the memory is the same, and as soon as virtual
functions are involved it is not.

This fixes that defect as far as it affected this patch by taking
advantage of our metadata to extract the right type of class.

---------

Co-authored-by: Stephen E. Baker <baker.stephen.e@gmail.com>
2025-04-06 17:01:16 -04:00
Stephen E. Baker
14d1a581a1 Add support for AddressSanitizer, drop VLD (#2813)
* Add support for AddressSanitizer, drop VLD

VLD is no longer maintained so it's removed.

Added a convenience option for enabling AddressSanitizer:
https://github.com/google/sanitizers/wiki/AddressSanitizer

The options provided here work in gcc and llvm. Address sanitizer
is available in MSVC but uses a slightly different flag. Undefined Behavior sanitizer in not available for MSVC at this time.

I have not enabled it in the windows dev preset because I cannot test
it.
2025-04-06 13:06:15 -04:00
Artem Argus
f1cb271240 minor afteload fix in world.lua (#2815) 2025-04-06 11:20:23 +01:00
Artem Argus Gusakov
7ba18ff6f4 Operation Theatre. patient should not escape after start walk to surgeon screen. 2025-04-05 23:31:38 +03:00
lewri
a3fca6afad Update assertion message 2025-04-05 19:06:20 +01:00
Stephen E. Baker
b0c25e3f00 Merge pull request #2089 from mugmuggy/start_audio
Set volume straight after music is set playing
2025-04-05 09:45:30 -04:00
mugmuggy
c946c69b46 Set volume straight after music is set playing 2025-04-05 11:19:01 +01:00
Toby
abd405d543 Fix campaign subfolders (#2804) 2025-04-03 21:03:25 +01:00
Artem Argus
2baea0e396 On pickup surgeon remove surgical gown (#2810)
* On a pickup surgeon from the operating room, remove his surgical gown.

*  Review improvements.
2025-04-03 21:01:40 +01:00
Artem Argus Gusakov
d9fc2247c8 prevent pickup surgeon during surgery operation 2025-04-03 19:23:47 +03:00
mugmuggy
5a801aa2f5 Move finding work out of room #1582/#2060
Penalise finding work if in a room
2025-03-30 21:28:18 +01:00
Artem Argus
9ec1281f0d Object/Machine updateDynamicInfo should not increase object usage (#2803)
* Object/Machine updateDynamicInfo should not increase object usage #2156

* add Object:isMachine()
2025-03-29 21:13:32 -04:00
Stephen E. Baker
6c8ec977c5 Merge pull request #2806 from ARGAMX/dont-give-away-year-awards-so-easily
Don't give away awards so easily
2025-03-28 23:23:11 -04:00
Artem Argus Gusakov
cd11a87f63 Don't give away awards so easily #2230 2025-03-27 22:57:26 +03:00
lewri
96548ac4bc Add interpeter path for custom linux installs (#2802)
Add standard interpreter path when setting a custom install directory and standard `/usr` prefix for Linux
2025-03-24 13:17:23 +00:00
Stephen E. Baker
c25e3e3ea1 Merge pull request #2800 from TheCycoONE/vcpkg_bump_2025_03
Bump vcpkg for 2025-03-21
2025-03-23 09:18:01 -04:00
Stephen E. Baker
37748402a3 Merge pull request #2797 from ARGAMX/show_dynamic_info_for_machine_menu
Show dynamic info for machine menu
2025-03-21 21:38:54 -04:00
Stephen E. Baker
f3b71244e8 Merge pull request #2799 from tobylane/fixcampaignrestart
Fix restarting saves from custom campaigns
2025-03-21 21:36:49 -04:00
Stephen E. Baker
0fbe5363c1 Bump vcpkg for 2025-03-21 2025-03-21 20:59:58 -04:00
Toby Lane
e10fd7e60f Fix restarting saves from custom campaigns 2025-03-21 18:57:12 +00:00
Artem Argus Gusakov
cdab9c0862 show dynamic info for machine menu 2025-03-20 17:27:37 +03:00
Artem Argus
b826da4aa7 Epidemic refactoring. coverup_in_progress rename. (#2781)
* epidemic refactoring

* Apply suggestions from code review

Co-authored-by: lewri <lewri@users.noreply.github.com>

* epidemic refactoring. review improvements.

* savegame version bump to 212
2025-03-16 15:14:06 +00:00
Toby
3178181112 Include the users campaign dir in looking for campaigns (#2756)
* Load campaigns from CorsixTH and users campaign folders
* Ignore campaigns with duplicate names, and inform player
* Check subdirs in search for campaign files
* Improve campaign dialog
2025-03-15 22:56:45 -04:00
Stephen E. Baker
d1e16e9688 Merge pull request #2795 from tobylane/chartprogress
Measure goal progress better in the progress report
2025-03-15 22:42:31 -04:00
Stephen E. Baker
96bcb08d68 Merge pull request #2789 from lewri/fix_tick_resets
Fix tick_rate remapping
2025-03-15 22:39:44 -04:00
Stephen E. Baker
bc5628a2c3 Merge pull request #2768 from lewri/remove_sr_epi
Remove Serious Radiation epidemics
2025-03-15 22:38:59 -04:00
lewri
3e0f44a958 Merge pull request #2197 from Alberth289346/poisson-func
Add Poisson distribution function.
2025-03-14 19:19:22 +00:00
Toby Lane
0b606c2416 Measure goal progress better in the progress report 2025-03-13 18:13:55 +00:00
lewri
b77d3f1407 Apply suggestions from code review
Co-authored-by: Alberth289346 <alberth289346@gmail.com>
2025-03-12 21:22:25 +00:00
lewri
38bebbeea9 Remove Serious Radiation epidemics 2025-03-12 21:22:25 +00:00
lewri
b3c7d72cf3 Merge pull request #2752 from Alberth289346/cleanup-use-object
Cleanup/"fix" the UseObjectAction
2025-03-09 10:29:55 +00:00
Artem Argus
02ae4d168e free build heating fix (#2792) 2025-03-08 15:32:43 +00:00
lewri
3b3e77b737 Fix tick_rate remapping 2025-03-06 18:19:59 +00:00
Alberth289346
3b38e89c7b Merge pull request #2783 from Alberth289346/is-sprite-visible
Add method for sprite visibility test
2025-03-05 19:13:50 +01:00
Stephen E. Baker
177d9d59a3 Merge pull request #2786 from lewri/rename_moods
Adjust mood icons
2025-03-04 22:46:10 -05:00
Ngoc Phuc Khang Nguyen
b7c31b866d Fixed the typos mentioned in Issue 2784 (#2790) 2025-03-04 20:40:04 +00:00
lewri
676f25a419 Adjust mood icons 2025-02-27 19:24:12 +00:00
Stephen E. Baker
b4b45167a4 Merge pull request #2785 from lewri/update_announcer
Adjust random announcement target
2025-02-25 19:49:31 -05:00
lewri
6de09a23db Adjust random announcement target 2025-02-23 20:53:45 +00:00
Alberth
69b59dbc0d Revert formatter changes. 2025-02-23 09:20:04 +01:00
Alberth
7b23ae78cf Formatter fixes 2025-02-23 08:50:11 +01:00
Alberth
3e64859f7c Add "is_sprite_visible" method 2025-02-23 08:49:44 +01:00
Stephen E. Baker
1659cac64c Merge pull request #2782 from lewri/lightness_typo
Fix typo in lightness calculation
2025-02-22 18:59:20 -05:00
lewri
f517f9ea82 Fix typo in lightness calculation 2025-02-21 18:22:13 +00:00
Stephen E. Baker
82273234a0 Merge pull request #2762 from lewri/reroute_spawns
Change reroute behaviour on trimmed paths
2025-02-20 19:15:55 -05:00
Artem Argus
c991ad7cd9 Calculate Epidemic outcome on inspector arrive (#2748)
* #2738 stop epidemic timer on epidemic successfully eradicated

* review remarks.

* Update CorsixTH/Lua/epidemic.lua

Co-authored-by: Alberth289346 <alberth289346@gmail.com>

* epidemic income calculate on inspector arrive

* review fixes.

---------

Co-authored-by: Alberth289346 <alberth289346@gmail.com>
2025-02-19 21:59:43 +00:00
Toby
9c27eac232 Add adviser messages for patients waiting for a staffed gps office (#2761) 2025-02-12 19:15:58 +00:00
Artem Argus
ce2d6fd39b Russian translation improvements (#2774)
* Russian Translation improvements

* Ukrainian Translation fix
2025-02-10 18:56:09 +00:00
Stephen E. Baker
7fa317ceca Merge pull request #2772 from tobylane/oldcode
Remove old commented out code
2025-02-06 20:22:47 -05:00
Toby Lane
32fe9e0adf Remove commented out and deprecated code from Entity 2025-02-06 17:25:13 +00:00