Commit graph

89 commits

Author SHA1 Message Date
turleypol
9a34ee8839 shame one me just changed inrange functions instead of reimplementing
them
extended inRange api in PosNd, moved direction methods to Oos2d
2020-04-12 22:24:54 +02:00
turleypol
36f3427ca0 fixed npcmod 2020-04-10 14:17:41 +02:00
turleypol
4643ba72ba extended pos4d with more facing functionality, moved facing enum to
position.h
finished mobile folder
2020-04-09 20:29:32 +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
f5310f48f4 Merge remote-tracking branch 'origin/master' into utf8
* origin/master:
  Style...
  Getting rid of a warning
  Fixed wrong return type
  style issues :p
  Fixed the check for max line length and some other minor issues
  Added SocketLineReader class, which is responsible for reading lines from a socket in a more efficient way. Modified Aux, Debug and WWW to use the new class.
  removed some ancient macros from clib.h
  Added error for if NaN sent as PID
  Update docs to use different wording to prevent confusion.
  Updated Docs.
  Fix for GetProcess() not actually loading the parent PID.
  Update docs to use different wording to prevent confusion.
  updated travis build clang and ninja
  Updated Docs.
  Fix for GetProcess() not actually loading the parent PID.
  Improved network code used by http and aux servers

Conflicts:
	pol-core/doc/core-changes.txt
2019-09-02 18:55:07 +02:00
turleypol
691d330c07 removed some ancient macros from clib.h 2019-08-25 09:05:15 +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
8b085e86ef dont assume a tainted string by default
cfgfiles (which includes savefiles, datafiles) get sanizized on read,
filemod::readfile, xml module, sql handled
old ascii speech packets handled
2019-01-12 17:14:05 +01:00
turleypol
04066c309d moved unicode sanitize functions to clib as a preparation to sanitize
only once
renamed mklower/mkupper to make it clear that it should only be used
for pure ascii texts
compiler triggers only once a warning about invalid unicode file
2019-01-12 11:46:30 +01:00
turleypol
f4ae345155 If a unicode string is detected as param sysmsg etc module functions
automatically use the unicode replacement
2019-01-03 22:14:10 +01:00
turleypol
cc27bb611f removed last usage of convertUCtoArray 2019-01-03 11:00:46 +01:00
turleypol
ee92a503bf updated speech code 2019-01-02 23:35:38 +01:00
turleypol
89fd3991ce all unicode module functions ahould now accept both Arrays for backward
compatibility and (unicode)strings
2018-12-31 14:28:37 +01:00
turleypol
a89886a0ce Merge remote-tracking branch 'origin/master' into utf8
* origin/master:
  more network specific code moved
  moved pkt headers into network folder
  fixed argument count for DepletedFunction
  Updated cotire, updated pch
  Added vitals.cfg DepletedFunction gets called once the vital reaches zero removed UnderFlowFunction since it was never used
2018-12-31 10:37:35 +01:00
turleypol
9cfb4ec5a5 moved pkt headers into network folder 2018-12-30 21:35:54 +01:00
turleypol
1c57ac43cf renamed all unicode speech functions for easier refactoring 2018-12-23 10:24:46 +01:00
turleypol
8d9de3918a Merge remote-tracking branch 'origin/master' into utf8
* origin/master: (58 commits)
  fixed style
  fixed namespaces of moved files
  moved polfile/uofile files into plib to cleanup atleast a bit the compile dependencies
  fixed cpu usage of usesinglethreadlogin
  fixed warning
  PolCore().internal(6, scriptname) logs name and memoryusage of variables for given script into log/scriptmemory.log. Globals, locals and all current call stacks. scriptname has to be the relative path from root with ecl ending. Precondition is an existing .dbg file for the given script, this will be created by compiling the script with -x
  added PolCore().internal(5) logs memoryusage in bytes of each script instance into log/memoryusagescripts.log
  updated flyweight memory report (used for memory saving of strings) enable via ENABLE_FLYWEIGHT_REPORT cmake option
  Turns out that Windows has the same wrong format specifier
  Fix wrong format specifier for pointers (fmtlib)
  Mentioned the ENTEREDAREA and LEFTAREA events for items in the docs
  Changed core-changes.txt so that there was only one date entry for my additions.
  Fixed more documentation errors for the ListObjectsInBoxOfClass and ListItemsInBoxOfObjType functions.
  Fixed prototype in XML docs for ListObjectsInBoxOfClass and ListObjectsInBoxOfObjType
  ** Fix docs for ListObjectsInBoxOfClass and remove commented debug code.
  **** Commit for 2018-11-25 **** Added ListObjectsInBox to uo.em.
  **** Commit for 2018-11-25 **** Added ListItemsInBoxOfObjType( objtype, x1, y1, z1, x2, y2, z2, realm := _DEFAULT_REALM) to uo.em Updated core-changes.txt with the ListItemsInBoxOfObjType info. Updated uo.em docs with the ListItemsInBoxOfObjType info.
  silence old core-changes.txt format warnings
  Update web server docs.
  More gitignore
  ...
2018-12-22 10:43:32 +01:00
turleypol
25dae4fc21 fixed namespaces of moved files 2018-12-22 00:32:47 +01:00
turleypol
e1b14dcd00 moved polfile/uofile files into plib to cleanup atleast a bit the
compile dependencies
2018-12-21 20:27:05 +01:00
turleypol
366f7e7122 Merge remote-tracking branch 'upstream/master'
* upstream/master: (45 commits)
  renamed mobile syshook to character used unique_ptr for all syshooks
  added docs
  code simplification, deprecate warning for uoclient.cfg MethodScript entry
  party and guild ref support docs and testing left?
  custom methods for client and account references
  fixed line length
  syshooks for npc/mobiles
  first round for scripted object class methods
  Fixed formatting error.
  Added new return option to consume ammunition hook which allows the hook to make the core continue with the usual ammunition checks.
  Fix critical bug in FindObjtypeInContainer()
  fixed compiler warning
  fixed linesize
  windows fixes
  Added cmake option to run clang-tidy used everywhere nullptr
  Changed classes to be final if possible, removed override macro
  Added additional documentation.
  next..
  clang 7 is currently untrusted... next try 6 ;)
  fixed new clang warnings, new compiler version on travis (lets see how many commits are needed till it works)
  ...

Conflicts:
	.travis.yml
	pol-core/bscript/impstr.h
	pol-core/clib/cfgfile.cpp
	pol-core/pol/module/npcmod.cpp
2018-10-14 14:00:33 +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
turleypol
f86e8b3e6c made stylecheck happy 2018-06-25 19:31:01 +02:00
turleypol
d751a9e2a6 fixed array usage 2018-06-25 19:31:01 +02:00
turleypol
ee10d76ec4 started with unimod 2018-06-25 19:31:01 +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
a983d25e4e removed bool members and replaced them with flags.
Further decrease memory foodprint.
2016-12-07 23:34:16 +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
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
turley
0d9d13bdb9 moved unicode from clib to pol 2015-09-19 10:55:48 +02:00
turley
dfd65e30cd Moved plib realm to pol 2015-09-18 19:11:46 +02:00
Thomas Volkert
1dd2200c6b Renamed endian.h to clib_endian.h to avoid redefinition problems in
system files and the general hiding of the endian.h from the system
2015-08-31 20:01:31 +02:00
turley
1b5ad6d59e more moving of properties... 2015-05-15 15:23:18 +02:00
turley
64d8fdb310 Moved npc files into mobiles dir, changed the namespace accordingly
removed some old code
2015-01-16 19:44:07 +01:00
turley
e8b46466fa Simplified WorldIterator more
completely removed wrldsize header
simplified more headers
changed zone_convert* parameter from non-const reference to pointer, to make the caller clear that it will change.
2015-01-03 10:15:31 +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
turley
dd4d4c0f9a Added new WorldIteratorFilter for active client only players
Fixed warning during pkt write of sound effects.
2014-11-21 21:28:09 +01:00