Commit graph

54 commits

Author SHA1 Message Date
Fernando Rozenblit
70b9c1305c
Add maximum cmdlevel to polsys::ListTextCommands() (#231)
The default, -1, will return all commands as before. No need for a version bump because the method checks the number of arguments.
2020-08-19 07:19:30 +02:00
Fernando Rozenblit
c49f5b4abb
Reorganize regions and realms (#228)
* Moved realms.h and realms.cpp to realms/..

* Moved regions into their own folder
2020-08-17 22:29:07 +02: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
Kevin Eady
ca850a0c76 project refactoring 2019-10-18 21:32:30 +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
Kevin Eady
b55e852a5b wip 1 2019-10-17 19:08:49 +02:00
turleypol
4f2f6a8e34 fixed formating 2019-09-26 18:49:33 +02:00
GIB
48656a9131 Functional. BUT DO NOT USE ON A SCRIPT WITHOUT A PACKAGE! 2019-09-22 00:38:34 +08:00
GIB
991ad00b4f Lay off the constants a bit.
Relocate the thing Turley told me to.
2019-09-22 00:17:09 +08:00
GIB
acdc42093e Inital commit for adding a direct package reference member to script objects. 2019-09-22 00:03:13 +08:00
turleypol
d2034347e7 removed more dead singlethread functions 2019-02-22 21:02:55 +01:00
turleypol
1f53191218 fixed critical bug in the internal clock system which prevents uptimes greater 20 days without
undefined behaviour.
Changed ReadMilliSecondClock() to return a double.
2018-10-22 20:29:55 +02:00
turleypol
0a39af15a1 Changed classes to be final if possible, removed override macro 2018-10-09 09:47:27 +02:00
esdete
dc2d29b433 NULL to nullptr 2018-07-31 14:30:29 +02:00
Gabriele Tozzi
b72f725e02 Whitespace fixes 2018-04-03 04:13:03 +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
eb34290222 Cleanup for modules' function tables 2017-01-24 21:57:16 +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
4d9aa75f3b Corrected definition order in module defs 2016-12-14 21:50:23 +01:00
turley
8df6edcba2 fixed usage of localtime 2016-11-21 21:34:37 +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
Gabriele Tozzi
77cd2516e0 Profiler: clean memory when disabled, minor fixes, estimateSize() 2016-02-01 03:59:09 +01:00
Gabriele Tozzi
53c2ba78c6 Added: CProp profiler, helps detecting unused CProps
It can be enabled by using the new pol.cfg option "ProfileCProps".
For better results, should be enabled before startup.
Impacts on performance very slightly, but consumes an average of
300 bytes of extra RAM for every CProp used.
New polsys.em function LogCPropProfile() can be called to dump
the profiling information into cpprofile.log.
2016-01-31 15:06:56 +01:00
Gabriele Tozzi
d1ac902926 Documentation: reformatted headers for DoxyGen 2016-01-28 14:52:40 +01:00
Gabriele Tozzi
45959b92d2 Small memory improvement: BObjectImp.type_ is now u8 instead of int
It is very unlikely to grow to more than 256 elements any time soon.
This should save 3 bytes for every single object that derived from it.
Also added explicit int conversions and a not, for better robustness.
2015-12-29 03:21:02 +01:00
Thomas Volkert
483fcc7071 Avoid compiler confusion (caused by file name pollution) 2015-11-15 19:52:18 +01:00
turley
dfd65e30cd Moved plib realm to pol 2015-09-18 19:11:46 +02:00
turley
28456ccaba new experimental setting pol.cfg SingleThreadDecay 1/0 (default 0)
new experimental setting pol.cfg ThreadDecayStatistics 1/0 (default 0)
SingleThreadDecay only spawns one thread for decay instead of one thread per realm (reduces thread switches)
ThreadDecayStatistics only works with active SingleThreadDecay log statistics about the decay cycles. Need to collect live data before starting the next step of optimizing decay.
2015-02-02 19:41:40 +01:00
turley
2104744458 Decay only in one thread instead of one thread per realm. (first experiment not activated by default) 2015-01-03 13:28:54 +01:00
turley
79dff37246 Splitted gamestate external. 2015-01-02 14:46:44 +01:00
turley
88ec380941 Moved globals into separate directory. 2014-12-30 15:20:59 +01:00
turley
2737393f2a Tried to put all global vars into centralized structures.
Currently plib/systemstate, pol/uvars, pol/ucfg, pol/multi/multidef

Next step should be to split them based on usage, since its currently a bit of include hell...
2014-12-30 14:14:41 +01:00
turley
90f162924d Added override keyword to virtual functions 2014-11-23 15:07:02 +01:00
frozenblit
46266a73f3 Fixed shadow realm crash + improvements
Added option "ShowRealmInfo" to spam the console with information about
realms in pol.cfg

Added number of offline mobiles and multis to the information from
polsys::Realms()

Added new method ListOfflineMobilesInRealm() in uo.em.

Encapsulated the Realm counts to be sure no one's changing them from the
outside.

Added missing core-changes entry ;)
2014-11-05 22:45:35 +01:00
frozenblit
7935b95fbd Realms can now track offline chars
Improved the tracking of offline chars in realms, so that shadowrealms
can't be destroyed while chars are still inside.

Next step: do the same for multis and add a command to list the offline
chars.
2014-11-04 22:58:12 +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
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
dsourc
d29476da7d Added polsys::FormatItemDescription( desc, amount := 1, suffix := "" ) This formats the desc using Pols built in Singular/Plular formatter
Removed automatic formatting of desc from GetItemDescriptor() function
2013-10-21 12:07:57 +00:00
turley
4c7f70fc79 first version of a generic message_queue (currently not lockfree, need to test more)
replaced old auto_ptr with unique_ptr
2013-09-13 18:07:19 +00:00
turley
4e7e400254 64bit compilation.. 2011-12-23 13:28:38 +00:00
turley
440e57bced hsa mul support
changed objtype to max 0x20000
splitted pkt transmit
needs more testing
2011-06-14 15:20:00 +00:00
turley
4f053bc563 minor performance stuff + next try to fix memory problem 2011-05-16 14:48:11 +00:00
turley
d32cec7d6c Added: basic::TypeOfInt( expr ) + basic.em constants
returns like TypeOf() the type of given parameter, but returns instead of a string an integer (see basic.em constants)
since integer comparison are way faster then string comparison this function should always be used for comparisons
2011-03-12 10:51:10 +00:00
frozenblit
eb61009c6e Fixed some possibilities of leaking if an exception was thrown and a few other warnings (all the rest, code analysis) 2010-07-10 20:02:50 +00:00
turley
007adac27e sync: shini: more 64bit stuff 2010-04-11 16:55:51 +00:00
turley
e10cd27cea sync: shini - long to int (prerequisit for 64-bit) 2010-03-29 14:52:03 +00:00
turley
7a2addff8d Fixed: StrReplace,SubStrReplace return "Invalid parameter type" instead of crashing if non string object
is given as to_replace, replace_with
Fixed: Several small memoryleaks
2010-02-16 12:46:55 +00:00