Commit graph

39 commits

Author SHA1 Message Date
turleypol
1463b76c7c
Includes are now all relative to pol-core basefolder (#906)
* all except pol

* pol and includes under defines

* something weird has happened

* remove own folder from include searchpath

* fixed remaining, adapted include style for external headers

* missing include
2026-07-25 23:01:18 +02:00
turleypol
b9966ac6f5
Split bobject header (#892)
* splitted bobject header

* fixed runecl

* crashfix

* missing header

* more missing (debug build)

* runecl debug include

* renamed contiter, moved formating

* removed more unused headers
2026-07-08 19:58:41 +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
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
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
5fe8449df8
cleanup of executor (#801)
* cleanup of executor
mostly just minor cleanup
got rid of ESCRIPT_PROFILE define inbetween function/method calls by
moving the logic into a class (which is empty without the define)

* use a macro for profiler so that even in debug builds the class never
gets called without the define
2025-08-08 09:08:12 +02:00
Kevin Eady
593cfffb83
Add uninit, true, false keywords to grammar (#596)
* Update grammar

* Update expression handling for uninit

* update existing tests

* Add new tests

* Remove fullpath from escriptgrammar generation comment

* fix tests

* Update eScript guide

* Declare escript version 0x11

* Add core-changes

* Add `true` and `false` to grammar

* true/false implementation

* Fix existing tests

* Add new tests

* Update core changes

* add docs

* Fix BooleanValue::describe_to

* bool optimizations

* optimize uninit

* remove unused var assignments

* Update grammar for case labels for uninit, booleans

* Fix case label handling for uninit, true, false

* Tests

* Fix compiler version display v1.1700000017881393 -> v1.17

* optimize boolean binary operations

* fix unary boolean optimizer

* add boolean, uninit optimizer test

* Use new fmt lib apis

* Fix compiler warning

* really fix warning lol

* Add Executor[Module]::getParam for bools, FindSubstance test
2024-01-20 05:38:25 +01:00
Kevin Eady
12d6186d10
Script option enhancements (#118)
* Fix SCRIPTOPT_CAN_ACCESS_OFFLINE_MOBILES

* Add SCRIPTOPT_SURVIVE_ATTACHED_DISCONNECT

* wip beginning work on templatization

* Use PolModule in pol-specific modules

* wip, creating PolModule with getXYZParam

* wip 1, moving getXYZ to UOExecutor

* compilable with PolObjectImp / PolApplicObj

* add type guard

* wip, change signatures

change signatures of script_method, script_method_id, and
custom_script_method

* compilable (windows)

* linux fixes

* namespace fixes

* remove uoexhelp

* formatting

* compilable

- move can_access_offline_mobiles back to uoexec
- add guildscrobj and partyscrobj sources
- move EGuildRefObjImp and EPartyRefObjImp
- wip, implement asUOExec
- formatting uoexec.cpp,.h

* finish uoexec() helper

* some cleanup
2020-02-08 09:21:35 +01:00
turleypol
7e8f92bc85 rewrote module function generation, maybe this works 2019-11-10 22:04:08 +01:00
turleypol
e249e62434 fixed clang warning
no need to write tmp file for em headers, the dependency is file based
2019-11-10 13:20:18 +01:00
Kevin Eady
a12de6a3c4 change modname to const char* const, rename script 2019-10-19 10:23:45 +02:00
Kevin Eady
5c0fb7c4ea First support for .em-parsed module function tbls
- Create module parser custom target
- Include generated tables in .cpp sources
- Standardize module function names based off .em names
2019-10-17 22:37:26 +02:00
turleypol
ebe884c2fe Merge remote-tracking branch 'origin/master' into utf8
* origin/master: (70 commits)
  Fix to items randomly loading with AOS props due to incorrect initalization of props on load of server.
  Rectify core not clearing mobiles from client during shadow realm shift.
  SendQuestArrow() fix for HSA clients (#91)
  Hotfix/start skill script (#90)
  Noninvasive dynaprops (#89)
  Update objref.xml
  Some network error conditions were missing...
  Final adjustments to core-changes
  Added Turley's missing core-changes :P
  Improved connection handling:  - Linux isn't limited to 1024 connections anymore  - Windows may have some slight performance boost
  removed senseless gitignore files
  use generator unspecific clean cmd in build_tools.sh always generate compile_commands.json force color diagnostic (to work with ninja)
  Curl building uses now the same compiler as pol
  fixed target_link_directories system header declaration
  check if container is orphan when adding items as content. for now it crashes the shard to have the backtrace. (would crash anyway later)
  add corechanges for doc changes
  new build target "clang_format" runs clang-format on current modified or new files in pol-core dir.
  Formatting
  Fix xml indentation
  fix indentation
  ...

Conflicts:
	pol-core/bscript/execmodl.cpp
	pol-core/doc/core-changes.txt
	pol-core/pol/getmsg.cpp
	pol-core/pol/module/unimod.cpp
2019-08-16 19:02:53 +02:00
turleypol
395083a31c memoryestimation did not add the module cost per executor
added EstimateSize util.em function returns estimated memorysize in
bytes of given argument. (docs to be done)
2019-02-01 23:18:43 +01:00
turleypol
8f3a472e23 make the unicode param function directly available 2018-12-31 12:22:06 +01:00
turleypol
0a39af15a1 Changed classes to be final if possible, removed override macro 2018-10-09 09:47:27 +02:00
turleypol
3afc41241b
CMake on windows (#48)
CMake can now also be used for windows
2018-02-24 22:34:55 +01:00
turleypol
dbb25bdb62
Include and buildsystem cleanup (#45)
Include cleanup
Reworked buildsystem (Linux only)
Removed dynamic libs, Linux now again uses static linking (like windows)
2018-01-29 21:55:48 +01:00
turleypol
798eda5b63 Cleanup of header includes. 2018-01-01 21:52:14 +01:00
Fernando Rozenblit
a0be9bc3f2 Revert "Add const to FunctionTable"
This reverts commit 84301dd41d.
2017-01-24 23:07:07 +01:00
Fernando Rozenblit
84301dd41d Add const to FunctionTable 2017-01-24 22:56:20 +01:00
Fernando Rozenblit
ab9f9f9e79 Fix compilation problem in VS2013 2017-01-24 21:32:45 +01:00
turley
f9c3db9e41 Modules share the same (helper) template base class
Optimize function name search for all modules not only uo by using an additional map, replaced c array with vector for functionsdef.
Simplified pragma pack order. (MSVC version is supported in all
compilers)
Removed compilerassert.h (asserteql,..) replaced with static_assert
Removed some old #ifs
2016-12-20 23:53:32 +01:00
turley
189cad3479 Formating everything
Authors are not forced to use the clang-format setting, but should
atleast be inspired by the style.
The only thing which is now not allowed are tabs for ident/alignment!
2016-02-19 19:26:35 +01:00
turley
ed7b16b233 normalized lineendings 2016-02-11 22:54:43 +01:00
Gabriele Tozzi
d1ac902926 Documentation: reformatted headers for DoxyGen 2016-01-28 14:52:40 +01:00
turley
90f162924d Added override keyword to virtual functions 2014-11-23 15:07:02 +01:00
turley
d69e782f78 Moved ExecutorModule function into corresponding cpp, added missing overload to remove assignment in if clause. 2014-11-15 09:38:27 +01:00
frozenblit
cc44d08b24 Fixed visual studio warnings
Adding "inline" to the unused template functions removes the warning
about the function not being used (C4505).

Fixed a warning in ExceptionParser.cpp about GetTID() not being used by
not defining it in the first place for WIN32.
2014-11-08 13:24:01 +01:00
frozenblit
943b820eba More and more cleanups
Added some missing include guards, corrected wrong include guard names.
Removed more stl_inc.h includes.
2014-11-02 19:40:40 +01:00
frozenblit
d7fe789c65 More cleanups 2014-10-31 23:59:51 +01:00
turley
1a054e76e3 moved some escript function names into flyweight. 2014-08-15 15:27:46 +02:00
turley
99d7dc3037 namespaces...finally :)
Hard part is finished every file is touched. Namespaces are currently rough named by directory name.
Maybe we could split it more
2013-12-21 09:10:46 +00:00
turley
981ff65c43 -added ESCRIPT_PROFILE #define stops the execution time of functions/members/methods PolCore().internal(1) logs it into debug.log
-added globalproperty file for PreprocessorDefinitions (i hate to set needed defs in every proj) vs2008/10 only
-some speedups
-removed "Waah! ..." prints on heal/damage dead chr
-fixed "*.. is attacking you!*"
2011-03-04 14:32:18 +00:00
turley
7f1dc83acf some minor namespace fixes 2011-02-05 12:24:00 +00:00
turley
e10cd27cea sync: shini - long to int (prerequisit for 64-bit) 2010-03-29 14:52:03 +00:00
turley
2e39309bf1 coordinate vartype cleanup, i hope no new bugs :( 2009-09-10 12:24:52 +00:00
muaddib_pol
d032ee448f + POL is now, open source. 2009-09-03 19:44:42 +00:00