Commit graph

4130 commits

Author SHA1 Message Date
turleypol
4872572914 debug build 2026-06-05 21:35:16 +02:00
turleypol
7ff9d877a8
Funcrefs do not detect pid change (#889)
* test for sending a function to the same program

* store executor pid inside funcrefs and classes

* docs
2026-05-31 11:45:35 +02:00
Sylvash
59edaae664
Added Ter Mur and removed width and height settings as they are auto detected now. (#888) 2026-05-30 18:01:16 +00:00
turleypol
552248917b
Fixed leak when a class/funcref is a global (#887)
* store globals as weakptr in class/funcs to prevent memleak when stored
as global WIP

* let it crash if globals are no longer valid?

* typo

* removed debug prints

* let only the current executor crash

* fixed logic

* added and corrected tests

* cleanup

* use emplace_back

* classes also need to switch to weakptr

* docs
2026-05-27 08:02:19 +02:00
Kevin Eady
6d748af2df
Add module function party::ListParties() (#886)
* implementation

* tests

* docs
2026-05-23 08:27:16 +02:00
turleypol
3f61f451b4
Improve memsize calculations (#885)
* improve memory size estimations for container

* cleanup and better estimation
2026-05-22 21:28:44 +02:00
turleypol
a6428cf598
GitHub actions update (#883)
* use different action to get the vs environ

* update download-artefact
2026-05-17 08:39:22 +02:00
turleypol
3dc9e072a5
Support vs2026 (#882)
* test vs26 image

* regenerate cached 3rd party libs

* update boost

* cppdap fix?

* update other caches

* disable simd for uuids? gcov build fails...

* switch back to default windows image

* updated actions
2026-05-14 19:08:15 +02:00
turleypol
ce8f042675
refptr: fixed assignment operators (#878)
* refptr: fixed assignment operators
first inc the refcount
then swap ptr
then release oldptr

* more cleanup
comparison in setter is unsafe and selfassignment is no problem, so
removed it.
add_ref is only valid in a constructor, so removed it
2026-05-14 13:30:44 +02:00
turleypol
19f1049973
fixed problem when sending vitals bigger then 0xffff to other clients (#877)
* fixed problem when sending vitals bigger then 0xffff to other clients.
The percent value was calculated based on the already capped values

* directly use the correct type

* docs
2026-05-14 11:41:09 +02:00
turleypol
6af8e734f0
buildcorechanges fixes for python 3.13 (#881)
starting with this version quotes will no longer be always escaped in
minidom,
do the encoding manually to have a consistent behaviour.
Parsing dates without year gives a warning which will likely fail with
3.14, so added a fake date.
2026-05-14 10:40:09 +02:00
AsY!um-
04a8a2ba11
Restore NPC cold_resist_cap from its own orig value on refresh_ar (#880)
* Restore NPC cold_resist_cap from its own orig on refresh_ar - tests

* Restore NPC cold_resist_cap from its own orig on refresh_ar - actual fix

* Update core-changes and make comments more concise
2026-05-10 15:43:03 +00:00
turleypol
2451034279
print starting line number when loading fails (#876) 2026-04-22 20:42:20 +02:00
turleypol
71c77723b6
Don't send statmsg pkt on every equipped item when refreshing ar (#875)
* do not send full_statmsg for each equipped item while refreshing armor

* added test

* docs
2026-04-22 14:52:48 +02:00
turleypol
4dd34a9442
using fmt instead of ostringstream (#873)
* using fmt instead of ostringstream

misc cleanup

* missing external libs for clang tidy check

* added test for cprops ignore while stacking
door descriptor

* use contains instead of count, removed disabled ancient code

* pack/packonto simplification/speedup

instead of using ostream and convert to string, use format and directly
a string
2026-04-06 16:21:50 +02:00
turleypol
a1864581a0
Use mariadb connector as a replacement for mysqlconnector (#872)
* silence cppdap lib

* refornat curl flags for readabilty

* zlib was build with the wrong runtime mode. Updated version

* use mariadb connector instead of mysql

* removed mysql define

* removed mysql

* removed installation of mysqlclient in workflow runs

* fixed curl install dir

* missing zstd on macos

* fixed module parsing for cmake 4.x

* docs

* added mariadb build to tidy_pr_check

* test sql on all platforms
some plugins need to included on windows
2026-03-30 22:50:24 +02:00
turleypol
5bd71ae8ee
Non blocking gump cmd (#871)
* refactor gump pkt creation

* testclient returns buttonid 1 pressed when 'button' is contained in the
commands

* extended test

* cleanup destructor mess a bit

* store gumps as pair to decide if the executor needs to be revived
more refactoring

* disallow copy, if used creates nasty bugs

* helper method to convert imp to character

* gumpevent

* new non-blocking dialog function, sends event instead

* test closegump

* test if serialnumber gets correctly converted and invalid entries get
skipped

* removed unused BApplicPtr class
added BApplicObjBase to impptrIf convert function

* use impptrIf

* CloseGump accepts now also an array of characters
extended tests

* moved deleted copy constructor to the public part

* by default clang tidy will check .inc files, removed this filter

* the last tidy run with modernize-loop wasnt added to the PR check

* keep vector with chr and gumpid per uomod
to prevent growing dont add to the cache if same chr with same id
already exists.

* docs

* core-changes
2026-03-16 08:11:43 +01:00
Kevin Eady
a4ef957803
Fix handling of AlternateMultiID in boat item descriptor structs (#869) 2026-03-09 17:22:13 +01:00
turleypol
f1787dea78
dont use a static buffer for reading cfgfile to be threadsafe (#868)
* dont use a static buffer for reading cfgfile to be threadsafe

eg config/www.cfg can load in the background
cleanup the file: deleted ancient define, simplified logic

* docs
2026-03-07 13:01:56 +01:00
turleypol
97fb7ffb04
Uoconvert the wrong coordinates where shown when a block contains more then the allowed number of items (#866)
* uoconvert: fixed wrong coordinates error msgs when too many static items exist in a
block

* fix gcc?

* since we have it.. use the correct literal

* fixed wrong format and warning

* docs and slightly changed msgs

* addressed comments
2026-02-23 06:59:08 +01:00
turleypol
be23b47c86
use unique_ptr to store BSpecialUserFuncJump to be able to delete instance before leftover imps are displayed. (#867)
its not an actual problem aka leak, but confusing since it gets reported
2026-02-20 12:17:55 +01:00
turleypol
593f547b73
active development is now 100.3 (#865) 2026-02-16 20:37:42 +00:00
turleypol
db532435d2
Release Pol v100.2.0 (#864) 2026-02-16 19:40:49 +00:00
turleypol
24c8c8b92f
Tidy modernize for loops (#862)
* trigger loop convert

* Automated clang-tidy change: modernize-loop-convert

* fixed refactor

* Automated clang-tidy change: modernize-loop-convert

* compile

* first look through

* fixes and start to use a few ranges

* revert autogenerated file

* compilation fix

* second pass

* renamed loop variable

---------

Co-authored-by: Clang Tidy <clang-tidy@users.noreply.github.com>
2026-01-31 09:14:02 +01:00
turleypol
83e9454880
fixed datastoreimp in tidy pr build(#861)
* fixed datastoreimp

* added comment how to potentially fix tidy build if we have problems with
headers
added clangd directory to gitignore
2026-01-25 10:47:25 +01:00
turleypol
77637b29f0
removed google-benchmark from repo, download when needed (#860)
increased minimal CMake version since efsw needs this version
2026-01-20 07:57:43 +01:00
turleypol
da2943acb8
Tidy copy initialization (#859)
* trigger tidy

* copy&move BApplicPtr obj
always commit tidy changes

* move PolObject

* fix house add_component

* Automated clang-tidy change: performance-unnecessary-copy-initialization,performance-unnecessary-value-param

* Revert "Automated clang-tidy change: performance-unnecessary-copy-initialization,performance-unnecessary-value-param"

This reverts commit bb6aab13dbdfa4aaf420cdaafaf22940f241fc5b.

* performance-unnecessary-value-param gives some weird suggestions

* Automated clang-tidy change: performance-unnecessary-copy-initialization

* minor performance improvements

* added used tidy check

* missing dependency

* renamed build so its no longer requires?

* better add docs for the sneaky fix

* silence pr check, not all headers can be compiled seperatly

---------

Co-authored-by: Clang Tidy <clang-tidy@users.noreply.github.com>
2026-01-19 08:17:28 +01:00
turleypol
07a22c4d5f
Workflow to check PRs via clang tidy (#858)
* workflow which checks the diff of a PR with clang-tidy

* check if suggestions work

* Revert "check if suggestions work"

This reverts commit 7c89b3b959.
2026-01-18 11:05:15 +01:00
turleypol
bce1154d7a
ClangTidy readability-else-after-return (#857)
* trigger tidy

* Automated clang-tidy change: readability-else-after-return

* compile test

* rerun

* Automated clang-tidy change: readability-else-after-return

* trigger..

* Automated clang-tidy change: readability-else-after-return

* manually removed a few

* Automated clang-tidy change: readability-else-after-return

* removed duplicate code

* fix remaining warnings

* fixed scope

---------

Co-authored-by: Clang Tidy <clang-tidy@users.noreply.github.com>
2026-01-18 09:35:52 +01:00
Lukáš Novotný
cf0346780b
do not include full program in funcref memory estimate (#856) 2026-01-17 18:44:02 +01:00
turleypol
21577d8e5b
Clang Tidy concat namespaces (#855)
* tidy

* Automated clang-tidy change: modernize-concat-nested-namespaces

* compile test

* fix namespace

---------

Co-authored-by: Clang Tidy <clang-tidy@users.noreply.github.com>
2026-01-17 10:30:21 +01:00
turleypol
6cc0d1698b
Clang Tidy replace typedefs with more readable using (#854)
* trigger tidy

* Automated clang-tidy change: modernize-use-using

* compile test

* unnamed struct fix?

* more unnamed structs

---------

Co-authored-by: Clang Tidy <clang-tidy@users.noreply.github.com>
2026-01-16 18:45:47 +01:00
turleypol
c882c42a31
misc clang-tidy (#853)
* trigger tidy

* Automated clang-tidy change: modernize-use-equals-delete,modernize-make-shared,modernize-make-unique,modernize-use-constraints,readability-container-size-empty,modernize-redundant-void-arg,modernize-use-emplace

* removed non needed macros

* missed to disable tidy build

---------

Co-authored-by: Clang Tidy <clang-tidy@users.noreply.github.com>
2026-01-16 12:22:43 +00:00
turleypol
bc9064c338
Clang Tidy default constructor (#852)
* trigger clang tidy

* Automated clang-tidy change: modernize-use-equals-default

* compile test

---------

Co-authored-by: Clang Tidy <clang-tidy@users.noreply.github.com>
2026-01-15 22:31:14 +01:00
turleypol
9dbdc7e91b
ClangTidy "modernize-use-override" (#851)
* let clang-tidy do its thing

* Automated clang-tidy change: modernize-use-override

* compile test

---------

Co-authored-by: Clang Tidy <clang-tidy@users.noreply.github.com>
2026-01-14 21:35:59 +01:00
turleypol
15409a3469
Class call_method refactor (#850)
* refactored call_method for classes

* cleanParams have to be called after func result is set

* added special bobjectimp to skip valuestack modifications
(Todo: name and comments)

* cleanup
2026-01-14 19:12:19 +01:00
turleypol
0259f11475
Class method if it's a method_id call now works if parameters are given (#849)
* modifed test to trigger the failure

* getParams modifies the ValueStack and thus cannot be called twice.

* docs
2026-01-10 18:12:09 +01:00
turleypol
37bbf0acd2
Fixed method_id call for class methods (#840)
* method-id calls on classes need to be redirected to non-id instruction

* added corechanges

* fixed compiler warning
2026-01-10 10:18:58 +00:00
turleypol
9daf269db5
Dynamic items with height 0 didn't block los like the static version (#848)
* dynamic items with height 0 (floor) didnt blocked LOS like static items
does
optimized los check by using multimap for faster lookup of dynamic items
added test

* revert multimap usage, benchmark showed that the original solution is
way faster

* docs
2026-01-10 10:52:03 +01:00
turleypol
bf4ec1951d
Write filenames and lines into ecompile .lst files (again) (#846)
* ListingWriter prints filepath, filelineno and source line
the old compiler did it, now again in the new compiler
since shortcircuit the original sourcelines are available during compilation

* remove listfile.inc function from test result

* prefix output

* custom formatting

* docs
2026-01-07 22:19:25 +01:00
turleypol
295c47395d
fixed efsw download (#847) 2026-01-06 22:18:59 +01:00
turleypol
e1bdc29454
keep forgetting how the testmap looks like.. (#845)
* I keep forgetting how the testmap looks like..
So two versions added plain and with raster

* gitattributes for png
2026-01-04 22:29:46 +01:00
turleypol
58a6db75be
Integer overflow when using GetConfigInt (#844)
* impptr_if now accepts also const BObjectImp*

* cfg::GetConfigInt returns error if the value would produce an overflow
code cleanup of cfgmod
added tests

* increase test coverage

* added comment why the exception should be catched without reaction
fixed member_id test

* added corechanges
its 2026
removed else
2026-01-04 13:22:11 +01:00
turleypol
bb1a0f13fb
fixed warning with gcc by splitting the if statement (#843) 2026-01-03 23:03:13 +01:00
turleypol
6ff48974cc
Code cleanup (structs and container add) (#842)
* BStruct cleanup

* container::add method has now a parameter for the position. reduces the
ambigous setposition calls.
And makes it clearer where the item is created.
removed in the touched headers the non needed virtual.

* removed exception when accessing a struct via an integer, no need to
crash the shard

* fixed test

* missed one virtual
2026-01-03 23:02:53 +01:00
turleypol
ed1b61aab9
Optimize comparison helper class for containers (#826)
* use transparent comparator to optimize away temporary string creation

* missing headers
should be case sensitive compare not insensitive

* flyweightstring support
made it insensitive again
next missing header

* more missing includes :(

* simplified via small wrapper

* allow also char[], removed on caller side some temp object creation which are no longer
needed

* it still only accepts string like objects.. fixed

* switched to strnicmp added comments

* missing header

* fixed comparison

* added unittest
2026-01-02 15:04:19 +01:00
turleypol
1699d413f0
More cmake options and fixed build of more esoteric platforms (#834)
* fixed compiler warning
removed ancient libc check

* extended gitignore

* cmake option to change binary output dir and external lib download dir
updated Efsw
fixed linking under android

* readded missing add_library

* c&p error

* updated Efsw to latest version
2026-01-02 14:29:52 +01:00
turleypol
e9d1e24d21
cleanup code for statmsg (#836) 2026-01-02 14:17:27 +01:00
turleypol
24238d963a
made ui version of the testclient work again (#837)
* made ui version of the testclient work again
draw map (water tiles)
draw visual range of client
shortcut for last speech

* more cleanup
2026-01-02 14:00:46 +01:00
turleypol
06efb37271
integrate macos build into build.yml so that it can be part of the (#841)
nightly release
2026-01-02 13:45:43 +01:00