Commit Graph

948 Commits

Author SHA1 Message Date
rdb 8178fb21f3 direct: don't rely on vfs being present in builtins 2020-08-11 09:40:34 +02:00
Fireclaw 316d254c64 distributed: Fix two ServerRepository issues in Python 3 2020-05-05 17:28:32 +02:00
fireclawthefox b3c79096e5 distributed: fix division exception in ServerRepository
change operator to double slash for integer division

Closes #762
2019-10-29 20:47:48 +01:00
rdb f149fb4ab0 direct: big formatting changes for the benefit of API reference
Part of the effort to move the API reference to Sphinx, see panda3d/panda3d-docs#21
2019-10-29 20:43:41 +01:00
rdb e4f493b872 dcparser: use vector_uchar for blobs, step towards Python 3 compat
Closes #298
2018-12-19 12:45:32 +01:00
rdb 5ac3cf3fc6 Eliminate C++ DConfig; replace it with a Python compatibility shim 2018-11-02 23:27:07 +01:00
Sam Edwards 4695557a5d general: Don't require BUILDING_* for static builds 2018-08-31 23:54:32 -06:00
rdb b1d2111037 express: add Datagram add_blob and add_blob32, et al.
This is for writing Python 2/3 agnostic code for writing binary data to a datagram, and reading from it using DatagramIterator.
2018-08-19 16:01:39 +02:00
Sam Edwards b2bfb31114 general: Remove `using std::*` from headers
Also remove most `using namespace std;` statements. The only one that remains is in py_panda.h.

Closes #350
Closes #335
2018-06-14 16:04:49 +02:00
Sam Edwards 7790f8429d general: Fully qualify header references into the std namespace
Closes #341
2018-06-07 10:35:12 +02:00
Sam Edwards e2b4353800 general: Replace NULL (and 0 as pointer) with C++11 nullptr
Exceptions to this replacement are:
- .c files
- Headers included by a .c file
- stb_image.h
- dr_flac.h
- Strings
- Comments
2018-06-03 16:35:13 -06:00
rdb 6b726fa697 general: fix various compiler warnings and issues exposed thereby 2018-05-30 11:09:35 +02:00
rdb e9ae7dcc40 Use vector_uchar instead of string for binary network/file data
This distinction allows us to better support Python 3, since it will raise exceptions when trying to put arbitrary binary data in a str object.

This also adds some convenience functions for efficiently initializing a Datagram or PTA_uchar from a vector_uchar.
2018-04-02 23:17:14 +02:00
Tohka 0b1ad67e13 distributed: Fix DC file reading regression (#295) 2018-03-31 04:01:35 -06:00
Sam Edwards 9dd37e9dbc general: Add guards to ensure proper BUILDING_ macros defined
This is designed to sanity-check the buildsystem, ensuring that the
expected BUILDING_ macros are defined at the expected time. It
also helps catch cases where the wrong BUILDING_/EXPCL_ macros
are used.
2018-03-25 13:17:52 -06:00
Sam Edwards f231ba4cd7 directbase: Introduce BUILDING_ defines for each component
Ditto everything before, but for direct.
2018-03-25 13:17:52 -06:00
Michael Wass b10ee32752 direct: Fix some more NameErrors
Closes #274
2018-03-08 11:44:04 +01:00
Sam Edwards ac8417ffdf distributed: `type(x) == types.FooType` -> `inspect.isfoo(x)`
This is more compatible across Python 2 vs. 3.

[skip ci]
2018-03-04 15:28:39 -07:00
Sam Edwards b72d1c198f distributed: Fix the import test (and syntax on Python 3) 2018-02-23 19:52:48 -07:00
Sam Edwards f76b8a6ad8 distributed: Replace the OTP protocol format with Astron's
Again, all this does is affect the 4-years-disused OTP system, leaving
the CMU system entirely untouched.

This changes the packet formatting in several of distributed's helper
classes.
2018-02-23 16:45:50 -07:00
Sam Edwards 167c6dcafa distributed: Change the message numbers to match Astron's
I imagine very few Panda3D users depend on the message numbers having
particular values. The ones removed belonged to Disney's OTP system,
which hasn't been used by anybody in over 4 years.

At any rate, old code should continue to work, just at the cost of
compatibility between clients and servers running different P3D versions.
2018-02-23 16:35:50 -07:00
Sam Edwards 97368ec321 distributed: Make a few slight cleanliness changes
I brought all of these over from the Astron fork
2018-02-23 15:55:30 -07:00
rdb 588d41ed7e Fix assorted compiler warnings 2017-12-24 15:12:58 +01:00
rdb dd2806c8bd Mark constructors 'explicit' for which coercion makes no sense 2017-11-06 19:47:38 +01:00
rdb d576c6b638 Improvements to generated API docs, especially in direct tree.
Also add an entry point for pfreeze.
2017-05-24 13:30:21 +02:00
AnythingTechPro 5050aae5c8 Code formatting cleanups in StagedObject
Closes #142
2017-03-30 19:49:30 +02:00
Sam Edwards 4080e03d05 distributed: Remove use of exceptionLogged() decorator
This isn't available when __debug__==False either.
2017-03-27 01:00:00 -06:00
Sam Edwards f062c64e9a distributed: Fix broken reference to StackTrace when __debug__==False 2017-03-27 00:56:05 -06:00
Tohka e9a43a21fa Remove PiratesMagicWordManager VR Studio code reference 2016-11-04 02:41:41 +07:00
rdb 1049088f11 Clean up some of the dtool_config.h variables 2016-10-24 22:10:46 +02:00
rdb 47388b0dbc Separate out CPython calls from core libs; eliminate need for pystub 2016-07-20 14:30:41 +02:00
Sam Edwards 0846a89677 general: Stop using several deprecated pandac.PandaModules imports. 2016-06-27 00:06:40 -07:00
rdb f068a8613b Fix a few unnecessary uses of exec/eval 2016-06-22 13:50:58 +02:00
Tohka 9a562d1a1c Remove useless "children" property of DistributedObjectBase
This property is not used and causes problems on the latest build.
2016-05-15 12:33:41 +03:00
rdb 18874fa151 Replace PN_int/uint types with stdint.h types, since all compilers we support have them.
Plus, we already had code that relied on them being available anyway.
2016-05-11 00:27:58 +02:00
rdb 23bf9ea5c7 The direct tree is now valid Python 2 *and* 3 2016-03-28 22:33:30 +02:00
rdb 54fa31ba17 StandardError -> Exception, other 2to3 changes, threaded 2to3 2016-03-25 17:13:09 +01:00
tobspr 0fcfb8e372 New file headers, new comment style 2016-02-17 17:47:48 +01:00
rdb 0a366e987f Merge branch 'release/1.9.x'
Conflicts:
	panda/src/glstuff/glGraphicsStateGuardian_src.cxx
	panda/src/putil/bamReader.h
2016-01-26 11:45:04 +01:00
rdb a55d915aea Add missing CDistributedSmoothNodeBase import 2016-01-26 11:17:57 +01:00
mfwass f8837999ed Cleanup trailing whitespace 2015-12-13 10:08:41 -05:00
rdb 32367fcbdc Fix various import issues in the direct tree 2015-12-06 22:36:05 +01:00
rdb 3c2f820ad8 Merge branch 'release/1.9.x'
Conflicts:
	direct/src/p3d/DeploymentTools.py
2015-11-24 13:39:36 +01:00
rdb 9348cf6b29 Prevent packp3d from including xml and panda3d modules in every .p3d 2015-11-24 13:35:18 +01:00
rdb c93e50ca05 Merge branch 'release/1.9.x'
Conflicts:
	.travis.yml
	dtool/src/cppparser/cppBison.cxx.prebuilt
	dtool/src/cppparser/cppBison.yxx
	makepanda/makepanda.py
2015-11-19 18:43:13 +01:00
rdb 378030e9b9 Remove unnecessary "pass" statements from DistributedCamera code 2015-11-19 15:38:57 +01:00
rdb db3ab953e4 Remove ppremake, genPyCode, and all hacks created to support them 2015-11-09 19:06:49 +01:00
Michael Wass 1c2c60acba Removed a nonexistent import from GridChild
This import is nonexistent and has no calls to it. The purpose it serves right now is causing an ImportError :P.
2015-07-20 11:03:42 -04:00
rdb d9342043b0 Deprecate pandac.PandaModules and genPyCode, move extensions to panda3d/, clean up imports and deprecated behaviour 2015-06-28 13:55:31 +02:00
rdb 3371df8403 Fix tp_compare, better __repr__/__str__ handling 2015-03-25 19:36:35 +01:00