Commit graph

42 commits

Author SHA1 Message Date
turleypol
9d2bf0ec60
replaced all uppercase hex formatting with lowercase variant (#645) 2024-05-05 09:13:12 +02:00
turleypol
d848deae18
POLLOG* macros use the new formatting (#598)
* POLLOG* macros use the new formatting
removed all old logging functions

* removed old fmt lib from everything except StreamWriter
removed unneeded functions

* fixed review comments
2024-01-16 17:55:42 +01:00
turleypol
6d73472029
Testsuite reorganization, new feature to call exported functions (#237)
* restructured pol testscripts
pkg based (dedicated pkgroot)
runs per pkg:
setup.ecl if exists
all scripts starting with "test"
cleanup.ecl if exists

return 1 for success everything else is an error

* Scripts can now be loaded and exported functions called
adapted testscripts to use this feature
critical script handling missing

* added support for used in critical scripts

* use weakptr instead of pid
moved keep_alive flag to uoexecutor

* Function and nethod accept now a argument list

* added docs

* missing docs

* faster shutdown time

* fixed typo

* fixed weird cornercase

* shorter test functions names, the length is limited, renamed
loadexported test script to have a dedicated testscript

* generate tiledata/multi for small boat
added generate scripts for generation..
adapted testdata set

* boat tests

* extended scripttests
scheduler will now always know about the loaded script
secured scheduler api

* cleanuo scripts for boat and npc

* shorter function for error return
fixed cleanup: npcs have gravestones, chars was one off and scripted
create of a char made it permanent logged in (until next restart),
which also means that it cannot be deleted

* bypass windows specific ecompile.cfg logic

* fix for parallel execution

* on windows its called .exe ..

* use target binary directly, so cmake can replace it with the actual path
use absolute path to testsuite
disabled temporary the copy of ecompile

* configure ecompile.cfg to add absolute path

* early sleepms calls can lead to endless waiting

* Code coverage (#260)

* play with coverage reports

* fix yml

* use 0 as default for gcov cmake var

* fixed used cov version, hopefully fixed now cmake

* demangle function names

* removed debug msg

* added a few polcore tests (basically just for coverage)
first set executor to noncritical before blocking

* added https://coveralls.io/github/polserver/polserver

* added a stackable item
added a few backpack insert tests
do coverage build only on push events not also for PR merge builds

* added storage tests..
docs need fixes, the Imps are not working at all

* fixed storage test to really move items

* added a house
corrected static/dynamic flag
created a few house tests

* updated yml file to new github api

* corrected coverage discord job name

* always put to runlist even if not necessary

* extended aos prop tests

* equip/unequip aos mod

* extra ci step for shard test fixtures and activated verbose shard test

* use extra ci step for all build configs, sorted testscripts for
execution

* fixed sorting

* added param to syslog to not print the context (cleaner testscript
visualization)

* added build targets for tests

* sleep api cleanup

* more aos property tests

* build for coveralls also on pullrequest

* readded debug state reset on schedule

* updated checkout ci action

* updated checkout in all ci runs
2020-12-16 18:56:10 +01:00
Fernando Rozenblit
030baa6352
Sanity check for an unlikely issue (#327)
Coverity detected a possible tainted value for len. The value should be set by BPacket but I don't think it hurts to add an extra check here. Alternatively, one could use BPacket's buffer.size() directly.
2020-09-26 16:12:04 +02:00
esdete
dc2d29b433 NULL to nullptr 2018-07-31 14:30:29 +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
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
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
7a531357fe Updated Memoryusage profiler 2015-01-19 18:18:21 +01:00
turley
b94b3aa3d5 Moved defines from ucfg.h into uconst.h
more header cleanup
2015-01-02 19:11:57 +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
frozenblit
fb717e2ef3 Even more cleanups.
Removed stl_inc.h from most of the include files. Still have some 200
files to go. I wish I'm done... someday...
2014-11-01 15:43:45 +01:00
frozenblit
7a638a8ca2 More cleanups, yay! 2014-11-01 11:27:02 +01:00
frozenblit
46973a84cc Defined PacketRegistry methods as static
As the methods were accessing handler / handler_v2 only, there's no need
to have instances of PacketRegistry. Changed all methods to static.
2014-10-05 21:16:08 +02:00
frozenblit
b5c69da394 Changed PacketRegistry to use PacketVersion
Reduced the functions in PacketRegistry by taking PacketVersion as
input.
2014-10-05 20:28:17 +02:00
frozenblit
79e359d030 Changed PacketRegistry namespace to Network 2014-10-05 18:22:16 +02:00
frozenblit
0499e2c4f9 More refactoring for PacketRegistry
Moved the inlined functions from header to source. If they become a
performance problem, we can deal with it later.

Renamed get_func to a more descriptive get_handler_callback (ditto for
get_func_v2).

Normalized the name of isDefined() -> is_defined().
2014-10-05 17:59:22 +02:00
frozenblit
afdcf6e51a More steps for packethook refactoring
Extracted a few functions, which makes the main code cleaner. Once
PacketVersion is used by the PacketRegistry, many of those functions
will be further simplified. Still in progress.
2014-10-04 20:29:58 +02:00
frozenblit
e900874694 A bit more of cleanup in the packethooks
Changed them to use the PacketRegistry. The length of variable packets
is set to -2 (MSGLEN_2BYTELEN_DATA), as is done for the normal packets,
so no special treatment is needed.
2014-10-03 17:43:58 +02:00
frozenblit
ed679dba3d Moved message handling code into its own cpp
Created a new file (msghandl.cpp) and moved the code from pol.cpp there.
Moved related files to the "network" folder, where they belong. Fixed
include names... (we should make this relative to the project root!)
2014-10-01 21:10:32 +02:00
frozenblit
bbcd9b4981 Beginning to cleanup packethooks.cpp 2014-09-30 23:06:23 +02:00
turley
fb873de803 decoupled headers to optimize a bit the build time 2014-05-03 09:06:19 +00:00
turley
31ee263a45 activated new logging facility 2014-01-18 13:29:38 +00: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
de2a1137f2 some minor speedups and bugfixes 2012-11-16 10:02:19 +00:00
frozenblit
ee9b4ff9b3 Just some code cleanup 2012-08-31 21:50:06 +00:00
turley
03dc8c934e linux fixes for 64bit 2011-12-23 14:49:51 +00:00
turley
4e7e400254 64bit compilation.. 2011-12-23 13:28:38 +00:00
turley
4765f1f0ec some small improvements:
movement code speedup: instead of storing new Mapshape simply store pointers 
reordered some class/structs (data alignment)
Mutex class freebsd compatible
mdump: invalid scope for pointer
some Constructor member reorders for linux
some unsigned < 0 checks removed
some nullpointer checks added
CallOutgoingPacketExportedFunction splitted into critical and noncritical part
npcs now use there boost for movement checks
2011-12-22 19:09:10 +00:00
turley
b35cbd463d finished pkt refactoring
gave threads names under windows for better debugging
fixed memoryleak in ItemGivenEvent
2011-12-19 16:34:21 +00:00
turley
41d05354c8 fixed locking on different threads for client, used the existing mutex too secure the whole transmit per client 2011-12-17 18:41:38 +00:00
turley
966ae49efa Fixed: enter/leave-events for NPCs (OWHorus)
Fixed: diagonal moves in npc::CanMove() and uo::FindPath() (OWHorus)
2011-04-30 09:22:52 +00:00
turley
e10cd27cea sync: shini - long to int (prerequisit for 64-bit) 2010-03-29 14:52:03 +00:00
turley
b2b394f90d Added: ClientRef object
pkt.sendpacket() & SendPacket() now accepts client or character
            r/o members:
            ip, acctname, clientversion, clientinfo, clienttype, clientver_detail, uo_expansion_client
            methods:
            compareversion()
            used as prelogin param for packethooks instead of old struct (so you can send packets)
     Added: character.client
            returns ClientRef object or error
     Note:  This or next release duplicate members/methods get deleted from chr (except acctname)
2010-03-25 15:56:33 +00:00
turley
7c54d3175f gcc fixes, minor cleanup 2009-11-06 16:07:47 +00:00
turley
8084d7c0e4 more cleanup
+pre-incrementing of iters is faster
2009-10-07 10:55:39 +00:00
muaddib_pol
6a73041445 + Network Code organized some. Baby steps, baby steps 2009-09-07 20:37:38 +00:00
Renamed from pol-core/pol/packethooks.cpp (Browse further)