Commit Graph

11 Commits

Author SHA1 Message Date
David Markowitz
e58218cfbc
chore: Speed up and cleanup level and zone loading; Add safer asset buffer reading (#1314)
* Remove std::couts littered throughout the base

* working

End of optimizations for now

going faster

* Remove extraneous compare function

std::less<LWOSCENEID> already does this in a map.

* gaming

* Update Zone.cpp

* dlu is moving to bitbucket again

* Update Level.cpp

---------

Co-authored-by: Jettford <mrjettbradford@gmail.com>
2023-12-23 11:24:16 -06:00
David Markowitz
5942182486
feat: Abstract Logger and simplify code (#1207)
* Logger: Rename logger to Logger from dLogger

* Logger: Add compile time filename

Fix include issues
Add writers
Add macros
Add macro to force compilation

* Logger: Replace calls with macros

Allows for filename and line number to be logged

* Logger: Add comments

and remove extra define

Logger: Replace with unique_ptr

also flush console at exit. regular file writer should be flushed on file close.

Logger: Remove constexpr on variable

* Logger: Simplify code

* Update Logger.cpp
2023-10-21 16:31:55 -07:00
David Markowitz
a8820c14f2
AssetManager: Match allocators (#1205)
Currently on line 116 of AssetManager.cpp, we have the following
`*data = (char*)malloc(*len);`
however on line 45 of AssetManager.h we have `delete m_Base;` which is not the same allocator as we used to allocate the memory.
This PR matches the malloc and free to be the correct calls.
2023-09-30 18:48:12 -05:00
David Markowitz
4734996c7c
Resolve most compiler warnings (#1053) 2023-04-12 11:48:20 -05:00
David Markowitz
bad3845d83
Address Docker issues and remove need to extract cdclient.fdb (#895)
* Implement a server res directory

* Only convert if neither exist

* Remove unzip, Update RegEx

* readme updates

Run setup after setting working dir

Address several docker issues

Revert "Run setup after setting working dir"

This reverts commit fd2fb9228e82a350204c1ef61f7ba059479bb12f.

Fix docker

* Remove extra submodules

* Rework logic

* Switch if block

* Remove need to extract fdb from client

* Change log name

* Update FdbToSqlite.cpp
2023-01-06 23:04:20 -06:00
Jonathan Romano
f8f5b731f1
Allow servers to be run from directories other than build. Read/write files relative to binary instead of cwd (#834)
Allows the server to be run from a non-build directory.  Also only read or write files relative to the build directory, regardless of where the server is run from
2022-11-27 03:59:59 -08:00
Demetri Van Sickle
9d62a8cd0b
Add backwards compatibility with servers using previous setup method
* MasterServer will nolonger require cdclient.fdb

* Added support for packed/unpacked clients not requiring .fdb file if .sqlite exsits
2022-11-21 14:19:37 -08:00
David Markowitz
1d5c71eb9b
Fix Pet Taming causing seg fault (#818)
* Fix Pet Taming

* Fix Pet Taming

* fix pet taming path loading
just make it go to build file since the asset managet handles intermediate steps
there is never res in the path in the live db, so no need to check

* special case BrickModels to uppercase if unpacked
remove redundent variable

Co-authored-by: Aaron Kimbrell <aronwk.aaron@gmail.com>
2022-11-05 19:09:26 -05:00
Aaron Kimbrell
162f84e285
simplify path fixing for packed vs unpacked (#816)
fix slashes for hasfile for unpacked client checking
2022-11-04 19:45:04 -05:00
David Markowitz
8edade5f98
Fix client paths (#811) 2022-11-02 20:30:35 -07:00
Jett
4a6f3e44ee
Add support for packed clients (#802)
* First iteration of pack reader and interface

* Fix memory leak and remove logs

* Complete packed asset interface and begin on file loading replacement

* Implement proper BinaryIO error

* Improve AssetMemoryBuffer for reading and implement more reading

* Repair more file loading code and improve how navmeshes are loaded

* Missing checks implementation

* Revert addition of Manifest class and migration changes

* Resolved all feedback.
2022-11-01 13:21:26 -05:00