mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 08:44:19 -04:00
directbase: Introduce BUILDING_ defines for each component
Ditto everything before, but for direct.
This commit is contained in:
parent
bd2a9d709a
commit
f231ba4cd7
@ -80,12 +80,6 @@ using namespace std;
|
||||
#define nassertv(condition) assert(condition)
|
||||
#define nassertv_always(condition) assert(condition)
|
||||
|
||||
// Panda defines these export symbols for building DLL's. Outside of Panda,
|
||||
// we assume we're not putting this code in a DLL, so we define them to
|
||||
// nothing.
|
||||
#define EXPCL_DIRECT
|
||||
#define EXPTP_DIRECT
|
||||
|
||||
// Panda defines a special Filename class. We'll use an ordinary string
|
||||
// instead.
|
||||
typedef string Filename;
|
||||
|
@ -18,10 +18,10 @@
|
||||
#include "notifyCategoryProxy.h"
|
||||
#include "configVariableBool.h"
|
||||
|
||||
NotifyCategoryDecl(deadrec, EXPCL_DIRECT, EXPTP_DIRECT);
|
||||
NotifyCategoryDecl(deadrec, EXPCL_DIRECT_DEADREC, EXPTP_DIRECT_DEADREC);
|
||||
|
||||
extern ConfigVariableBool accept_clock_skew;
|
||||
|
||||
extern EXPCL_DIRECT void init_libdeadrec();
|
||||
extern EXPCL_DIRECT_DEADREC void init_libdeadrec();
|
||||
|
||||
#endif
|
||||
|
@ -38,7 +38,7 @@ static const int max_timestamp_delays = 10;
|
||||
* update. The assumption is that all SmoothMovers in the world will be
|
||||
* operating in the same mode together.
|
||||
*/
|
||||
class EXPCL_DIRECT SmoothMover {
|
||||
class EXPCL_DIRECT_DEADREC SmoothMover {
|
||||
PUBLISHED:
|
||||
SmoothMover();
|
||||
~SmoothMover();
|
||||
|
@ -16,12 +16,62 @@
|
||||
|
||||
/* See dtoolsymbols.h for a rant on the purpose of this file. */
|
||||
|
||||
/* BUILDING_DIRECT is just a buildsystem shortcut for all of these: */
|
||||
#ifdef BUILDING_DIRECT
|
||||
#define EXPCL_DIRECT EXPORT_CLASS
|
||||
#define EXPTP_DIRECT EXPORT_TEMPL
|
||||
#define BUILDING_DIRECT_DEADREC
|
||||
#define BUILDING_DIRECT_DIRECTD
|
||||
#define BUILDING_DIRECT_INTERVAL
|
||||
#define BUILDING_DIRECT_MOTIONTRAIL
|
||||
#define BUILDING_DIRECT_SHOWBASE
|
||||
#define BUILDING_DIRECT_DISTRIBUTED
|
||||
#endif
|
||||
|
||||
#ifdef BUILDING_DIRECT_DEADREC
|
||||
#define EXPCL_DIRECT_DEADREC EXPORT_CLASS
|
||||
#define EXPTP_DIRECT_DEADREC EXPORT_TEMPL
|
||||
#else
|
||||
#define EXPCL_DIRECT IMPORT_CLASS
|
||||
#define EXPTP_DIRECT IMPORT_TEMPL
|
||||
#define EXPCL_DIRECT_DEADREC IMPORT_CLASS
|
||||
#define EXPTP_DIRECT_DEADREC IMPORT_TEMPL
|
||||
#endif
|
||||
|
||||
#ifdef BUILDING_DIRECT_DIRECTD
|
||||
#define EXPCL_DIRECT_DIRECTD EXPORT_CLASS
|
||||
#define EXPTP_DIRECT_DIRECTD EXPORT_TEMPL
|
||||
#else
|
||||
#define EXPCL_DIRECT_DIRECTD IMPORT_CLASS
|
||||
#define EXPTP_DIRECT_DIRECTD IMPORT_TEMPL
|
||||
#endif
|
||||
|
||||
#ifdef BUILDING_DIRECT_INTERVAL
|
||||
#define EXPCL_DIRECT_INTERVAL EXPORT_CLASS
|
||||
#define EXPTP_DIRECT_INTERVAL EXPORT_TEMPL
|
||||
#else
|
||||
#define EXPCL_DIRECT_INTERVAL IMPORT_CLASS
|
||||
#define EXPTP_DIRECT_INTERVAL IMPORT_TEMPL
|
||||
#endif
|
||||
|
||||
#ifdef BUILDING_DIRECT_MOTIONTRAIL
|
||||
#define EXPCL_DIRECT_MOTIONTRAIL EXPORT_CLASS
|
||||
#define EXPTP_DIRECT_MOTIONTRAIL EXPORT_TEMPL
|
||||
#else
|
||||
#define EXPCL_DIRECT_MOTIONTRAIL IMPORT_CLASS
|
||||
#define EXPTP_DIRECT_MOTIONTRAIL IMPORT_TEMPL
|
||||
#endif
|
||||
|
||||
#ifdef BUILDING_DIRECT_SHOWBASE
|
||||
#define EXPCL_DIRECT_SHOWBASE EXPORT_CLASS
|
||||
#define EXPTP_DIRECT_SHOWBASE EXPORT_TEMPL
|
||||
#else
|
||||
#define EXPCL_DIRECT_SHOWBASE IMPORT_CLASS
|
||||
#define EXPTP_DIRECT_SHOWBASE IMPORT_TEMPL
|
||||
#endif
|
||||
|
||||
#ifdef BUILDING_DIRECT_DISTRIBUTED
|
||||
#define EXPCL_DIRECT_DISTRIBUTED EXPORT_CLASS
|
||||
#define EXPTP_DIRECT_DISTRIBUTED EXPORT_TEMPL
|
||||
#else
|
||||
#define EXPCL_DIRECT_DISTRIBUTED IMPORT_CLASS
|
||||
#define EXPTP_DIRECT_DISTRIBUTED IMPORT_TEMPL
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -52,7 +52,7 @@ typedef int HANDLE;
|
||||
* presented in order chronologically by their intended usage. The first
|
||||
* group will probably provide everthing needed for DirectD.
|
||||
*/
|
||||
class EXPCL_DIRECT DirectD {
|
||||
class EXPCL_DIRECT_DIRECTD DirectD {
|
||||
PUBLISHED:
|
||||
DirectD();
|
||||
~DirectD();
|
||||
|
@ -53,7 +53,7 @@ class SocketStream;
|
||||
* the C++ layer, while server messages that are not understood by the C++
|
||||
* layer are returned up to the Python layer for processing.
|
||||
*/
|
||||
class EXPCL_DIRECT CConnectionRepository {
|
||||
class EXPCL_DIRECT_DISTRIBUTED CConnectionRepository {
|
||||
PUBLISHED:
|
||||
explicit CConnectionRepository(bool has_owner_view = false,
|
||||
bool threaded_net = false);
|
||||
|
@ -28,7 +28,7 @@ class CConnectionRepository;
|
||||
* This class defines some basic methods of DistributedSmoothNodeBase which
|
||||
* have been moved into C++ as a performance optimization.
|
||||
*/
|
||||
class EXPCL_DIRECT CDistributedSmoothNodeBase {
|
||||
class EXPCL_DIRECT_DISTRIBUTED CDistributedSmoothNodeBase {
|
||||
PUBLISHED:
|
||||
CDistributedSmoothNodeBase();
|
||||
~CDistributedSmoothNodeBase();
|
||||
|
@ -21,13 +21,13 @@
|
||||
#include "configVariableDouble.h"
|
||||
#include "configVariableBool.h"
|
||||
|
||||
NotifyCategoryDecl(distributed, EXPCL_DIRECT, EXPTP_DIRECT);
|
||||
NotifyCategoryDecl(distributed, EXPCL_DIRECT_DISTRIBUTED, EXPTP_DIRECT_DISTRIBUTED);
|
||||
|
||||
extern ConfigVariableInt game_server_timeout_ms;
|
||||
extern ConfigVariableDouble min_lag;
|
||||
extern ConfigVariableDouble max_lag;
|
||||
extern ConfigVariableBool handle_datagrams_internally;
|
||||
|
||||
extern EXPCL_DIRECT void init_libdistributed();
|
||||
extern EXPCL_DIRECT_DISTRIBUTED void init_libdistributed();
|
||||
|
||||
#endif
|
||||
|
@ -24,7 +24,7 @@
|
||||
* A constraint interval that will constrain the orientation of one node to
|
||||
* the orientation of another.
|
||||
*/
|
||||
class EXPCL_DIRECT CConstrainHprInterval : public CConstraintInterval {
|
||||
class EXPCL_DIRECT_INTERVAL CConstrainHprInterval : public CConstraintInterval {
|
||||
PUBLISHED:
|
||||
explicit CConstrainHprInterval(const string &name, double duration,
|
||||
const NodePath &node, const NodePath &target,
|
||||
|
@ -24,7 +24,7 @@
|
||||
* A constraint interval that will constrain the position and orientation of
|
||||
* one node to the position and orientation of another.
|
||||
*/
|
||||
class EXPCL_DIRECT CConstrainPosHprInterval : public CConstraintInterval {
|
||||
class EXPCL_DIRECT_INTERVAL CConstrainPosHprInterval : public CConstraintInterval {
|
||||
PUBLISHED:
|
||||
explicit CConstrainPosHprInterval(const string &name, double duration,
|
||||
const NodePath &node, const NodePath &target,
|
||||
|
@ -23,7 +23,7 @@
|
||||
* A constraint interval that will constrain the position of one node to the
|
||||
* position of another.
|
||||
*/
|
||||
class EXPCL_DIRECT CConstrainPosInterval : public CConstraintInterval {
|
||||
class EXPCL_DIRECT_INTERVAL CConstrainPosInterval : public CConstraintInterval {
|
||||
PUBLISHED:
|
||||
explicit CConstrainPosInterval(const string &name, double duration,
|
||||
const NodePath &node, const NodePath &target,
|
||||
|
@ -22,7 +22,7 @@
|
||||
* A constraint interval that will constrain the transform of one node to the
|
||||
* transform of another.
|
||||
*/
|
||||
class EXPCL_DIRECT CConstrainTransformInterval : public CConstraintInterval {
|
||||
class EXPCL_DIRECT_INTERVAL CConstrainTransformInterval : public CConstraintInterval {
|
||||
PUBLISHED:
|
||||
explicit CConstrainTransformInterval(const string &name, double duration,
|
||||
const NodePath &node,
|
||||
|
@ -21,7 +21,7 @@
|
||||
* The base class for a family of intervals that constrain some property to a
|
||||
* value over time.
|
||||
*/
|
||||
class EXPCL_DIRECT CConstraintInterval : public CInterval {
|
||||
class EXPCL_DIRECT_INTERVAL CConstraintInterval : public CInterval {
|
||||
PUBLISHED:
|
||||
bool bogus_variable;
|
||||
|
||||
|
@ -32,7 +32,7 @@ class CIntervalManager;
|
||||
* C++ will inherit from this class; Intervals that must be implemented in
|
||||
* Python will inherit from the similar Python class.
|
||||
*/
|
||||
class EXPCL_DIRECT CInterval : public TypedReferenceCount {
|
||||
class EXPCL_DIRECT_INTERVAL CInterval : public TypedReferenceCount {
|
||||
public:
|
||||
CInterval(const string &name, double duration, bool open_ended);
|
||||
virtual ~CInterval();
|
||||
@ -202,7 +202,7 @@ private:
|
||||
};
|
||||
|
||||
INLINE ostream &operator << (ostream &out, const CInterval &ival);
|
||||
EXPCL_DIRECT ostream &operator << (ostream &out, CInterval::State state);
|
||||
EXPCL_DIRECT_INTERVAL ostream &operator << (ostream &out, CInterval::State state);
|
||||
|
||||
#include "cInterval.I"
|
||||
|
||||
|
@ -36,7 +36,7 @@ class EventQueue;
|
||||
* It is also possible to create multiple IntervalManager objects for special
|
||||
* needs.
|
||||
*/
|
||||
class EXPCL_DIRECT CIntervalManager {
|
||||
class EXPCL_DIRECT_INTERVAL CIntervalManager {
|
||||
PUBLISHED:
|
||||
CIntervalManager();
|
||||
~CIntervalManager();
|
||||
|
@ -29,7 +29,7 @@
|
||||
* CLerpAnimEffectInterval to adjust the degree to which each animation
|
||||
* affects the actor.
|
||||
*/
|
||||
class EXPCL_DIRECT CLerpAnimEffectInterval : public CLerpInterval {
|
||||
class EXPCL_DIRECT_INTERVAL CLerpAnimEffectInterval : public CLerpInterval {
|
||||
PUBLISHED:
|
||||
INLINE explicit CLerpAnimEffectInterval(const string &name, double duration,
|
||||
BlendType blend_type);
|
||||
|
@ -21,7 +21,7 @@
|
||||
* The base class for a family of intervals that linearly interpolate one or
|
||||
* more numeric values over time.
|
||||
*/
|
||||
class EXPCL_DIRECT CLerpInterval : public CInterval {
|
||||
class EXPCL_DIRECT_INTERVAL CLerpInterval : public CInterval {
|
||||
PUBLISHED:
|
||||
enum BlendType {
|
||||
BT_no_blend,
|
||||
|
@ -23,7 +23,7 @@
|
||||
* An interval that lerps one or more properties (like pos, hpr, etc.) on a
|
||||
* NodePath over time.
|
||||
*/
|
||||
class EXPCL_DIRECT CLerpNodePathInterval : public CLerpInterval {
|
||||
class EXPCL_DIRECT_INTERVAL CLerpNodePathInterval : public CLerpInterval {
|
||||
PUBLISHED:
|
||||
explicit CLerpNodePathInterval(const string &name, double duration,
|
||||
BlendType blend_type, bool bake_in_start,
|
||||
|
@ -29,7 +29,7 @@
|
||||
* own begin and end times. Some of them may overlap and some of them may
|
||||
* not.
|
||||
*/
|
||||
class EXPCL_DIRECT CMetaInterval : public CInterval {
|
||||
class EXPCL_DIRECT_INTERVAL CMetaInterval : public CInterval {
|
||||
PUBLISHED:
|
||||
explicit CMetaInterval(const string &name);
|
||||
virtual ~CMetaInterval();
|
||||
|
@ -20,11 +20,11 @@
|
||||
#include "configVariableDouble.h"
|
||||
#include "configVariableBool.h"
|
||||
|
||||
NotifyCategoryDecl(interval, EXPCL_DIRECT, EXPTP_DIRECT);
|
||||
NotifyCategoryDecl(interval, EXPCL_DIRECT_INTERVAL, EXPTP_DIRECT_INTERVAL);
|
||||
|
||||
extern ConfigVariableDouble interval_precision;
|
||||
extern EXPCL_DIRECT ConfigVariableBool verify_intervals;
|
||||
extern EXPCL_DIRECT_INTERVAL ConfigVariableBool verify_intervals;
|
||||
|
||||
extern EXPCL_DIRECT void init_libinterval();
|
||||
extern EXPCL_DIRECT_INTERVAL void init_libinterval();
|
||||
|
||||
#endif
|
||||
|
@ -21,7 +21,7 @@
|
||||
/**
|
||||
* An interval that calls NodePath::hide().
|
||||
*/
|
||||
class EXPCL_DIRECT HideInterval : public CInterval {
|
||||
class EXPCL_DIRECT_INTERVAL HideInterval : public CInterval {
|
||||
PUBLISHED:
|
||||
explicit HideInterval(const NodePath &node, const string &name = string());
|
||||
|
||||
|
@ -17,7 +17,7 @@
|
||||
#include "directbase.h"
|
||||
#include "typedReferenceCount.h"
|
||||
|
||||
class EXPCL_DIRECT LerpBlendType : public TypedReferenceCount {
|
||||
class EXPCL_DIRECT_INTERVAL LerpBlendType : public TypedReferenceCount {
|
||||
PUBLISHED:
|
||||
LerpBlendType() {}
|
||||
virtual ~LerpBlendType();
|
||||
@ -47,7 +47,7 @@ private:
|
||||
static TypeHandle _type_handle;
|
||||
};
|
||||
|
||||
class EXPCL_DIRECT EaseInBlendType : public LerpBlendType {
|
||||
class EXPCL_DIRECT_INTERVAL EaseInBlendType : public LerpBlendType {
|
||||
PUBLISHED:
|
||||
EaseInBlendType() {}
|
||||
virtual ~EaseInBlendType();
|
||||
@ -77,7 +77,7 @@ private:
|
||||
static TypeHandle _type_handle;
|
||||
};
|
||||
|
||||
class EXPCL_DIRECT EaseOutBlendType : public LerpBlendType {
|
||||
class EXPCL_DIRECT_INTERVAL EaseOutBlendType : public LerpBlendType {
|
||||
PUBLISHED:
|
||||
EaseOutBlendType() {}
|
||||
virtual ~EaseOutBlendType();
|
||||
@ -107,7 +107,7 @@ private:
|
||||
static TypeHandle _type_handle;
|
||||
};
|
||||
|
||||
class EXPCL_DIRECT EaseInOutBlendType : public LerpBlendType {
|
||||
class EXPCL_DIRECT_INTERVAL EaseInOutBlendType : public LerpBlendType {
|
||||
PUBLISHED:
|
||||
EaseInOutBlendType() {}
|
||||
virtual ~EaseInOutBlendType();
|
||||
@ -136,7 +136,7 @@ private:
|
||||
static TypeHandle _type_handle;
|
||||
};
|
||||
|
||||
class EXPCL_DIRECT NoBlendType : public LerpBlendType {
|
||||
class EXPCL_DIRECT_INTERVAL NoBlendType : public LerpBlendType {
|
||||
PUBLISHED:
|
||||
NoBlendType() {}
|
||||
virtual ~NoBlendType();
|
||||
|
@ -21,7 +21,7 @@
|
||||
/**
|
||||
* An interval that calls NodePath::show().
|
||||
*/
|
||||
class EXPCL_DIRECT ShowInterval : public CInterval {
|
||||
class EXPCL_DIRECT_INTERVAL ShowInterval : public CInterval {
|
||||
PUBLISHED:
|
||||
explicit ShowInterval(const NodePath &node, const string &name = string());
|
||||
|
||||
|
@ -21,7 +21,7 @@
|
||||
* This interval does absolutely nothing, and is mainly useful for marking
|
||||
* time between other intervals within a sequence.
|
||||
*/
|
||||
class EXPCL_DIRECT WaitInterval : public CInterval {
|
||||
class EXPCL_DIRECT_INTERVAL WaitInterval : public CInterval {
|
||||
PUBLISHED:
|
||||
INLINE explicit WaitInterval(double duration);
|
||||
|
||||
|
@ -69,7 +69,7 @@ public:
|
||||
* coordinate of the texture corresponds to time and the v coordinate
|
||||
* corresponds to the "shape" of the motion trail.
|
||||
*/
|
||||
class EXPCL_DIRECT CMotionTrail : public TypedReferenceCount {
|
||||
class EXPCL_DIRECT_MOTIONTRAIL CMotionTrail : public TypedReferenceCount {
|
||||
PUBLISHED:
|
||||
CMotionTrail();
|
||||
~CMotionTrail();
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include "config_motiontrail.h"
|
||||
#include "dconfig.h"
|
||||
|
||||
extern EXPCL_DIRECT void init_libmotiontrail();
|
||||
extern EXPCL_DIRECT_MOTIONTRAIL void init_libmotiontrail();
|
||||
|
||||
Configure(config_motiontrail);
|
||||
NotifyCategoryDef(motiontrail, "");
|
||||
|
@ -20,8 +20,8 @@
|
||||
|
||||
#include "cMotionTrail.h"
|
||||
|
||||
NotifyCategoryDecl(motiontrail, EXPCL_DIRECT, EXPTP_DIRECT);
|
||||
NotifyCategoryDecl(motiontrail, EXPCL_DIRECT_MOTIONTRAIL, EXPTP_DIRECT_MOTIONTRAIL);
|
||||
|
||||
extern EXPCL_DIRECT void init_libmotiontrail();
|
||||
extern EXPCL_DIRECT_MOTIONTRAIL void init_libmotiontrail();
|
||||
|
||||
#endif
|
||||
|
@ -26,7 +26,7 @@
|
||||
#include "configVariableSearchPath.h"
|
||||
#include "nodePath.h"
|
||||
|
||||
ConfigureDecl(config_showbase, EXPCL_DIRECT, EXPTP_DIRECT);
|
||||
ConfigureDecl(config_showbase, EXPCL_DIRECT_SHOWBASE, EXPTP_DIRECT_SHOWBASE);
|
||||
|
||||
class CollisionTraverser;
|
||||
class Camera;
|
||||
@ -34,24 +34,24 @@ class GraphicsEngine;
|
||||
|
||||
BEGIN_PUBLISH
|
||||
|
||||
EXPCL_DIRECT ConfigVariableSearchPath &get_particle_path();
|
||||
EXPCL_DIRECT_SHOWBASE ConfigVariableSearchPath &get_particle_path();
|
||||
|
||||
EXPCL_DIRECT void throw_new_frame();
|
||||
EXPCL_DIRECT_SHOWBASE void throw_new_frame();
|
||||
|
||||
EXPCL_DIRECT DConfig &get_config_showbase();
|
||||
EXPCL_DIRECT void init_app_for_gui();
|
||||
EXPCL_DIRECT_SHOWBASE DConfig &get_config_showbase();
|
||||
EXPCL_DIRECT_SHOWBASE void init_app_for_gui();
|
||||
|
||||
// klunky interface since we cant pass array from python->C++
|
||||
EXPCL_DIRECT void add_fullscreen_testsize(int xsize, int ysize);
|
||||
EXPCL_DIRECT void runtest_fullscreen_sizes(GraphicsWindow *win);
|
||||
EXPCL_DIRECT bool query_fullscreen_testresult(int xsize, int ysize);
|
||||
EXPCL_DIRECT_SHOWBASE void add_fullscreen_testsize(int xsize, int ysize);
|
||||
EXPCL_DIRECT_SHOWBASE void runtest_fullscreen_sizes(GraphicsWindow *win);
|
||||
EXPCL_DIRECT_SHOWBASE bool query_fullscreen_testresult(int xsize, int ysize);
|
||||
|
||||
// to handle windows stickykeys
|
||||
EXPCL_DIRECT void store_accessibility_shortcut_keys();
|
||||
EXPCL_DIRECT void allow_accessibility_shortcut_keys(bool allowKeys);
|
||||
EXPCL_DIRECT_SHOWBASE void store_accessibility_shortcut_keys();
|
||||
EXPCL_DIRECT_SHOWBASE void allow_accessibility_shortcut_keys(bool allowKeys);
|
||||
|
||||
#ifdef IS_OSX
|
||||
EXPCL_DIRECT void activate_osx_application();
|
||||
EXPCL_DIRECT_SHOWBASE void activate_osx_application();
|
||||
#endif
|
||||
|
||||
END_PUBLISH
|
||||
|
Loading…
x
Reference in New Issue
Block a user