Skip to content

Commit

Permalink
linux build: add MSDN COM __interface replacement
Browse files Browse the repository at this point in the history
  • Loading branch information
eagleivg committed Aug 12, 2018
1 parent 0ad7e6b commit d560068
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 2 additions & 0 deletions src/xrCore/_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,7 @@ using string_path = char[2 * max_path];
// XXX: Replace __interface with either struct or class. MS defines it as struct for COM, but this project is C++.
#if defined(WINDOWS)
#define xr_pure_interface __interface
#elif defined(LINUX)
#define xr_pure_interface struct
#endif
#endif
4 changes: 0 additions & 4 deletions src/xrEngine/xr_object.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@ class CInifile;
#define CROW_RADIUS2 (60.f)

class IPhysicsShell;
#if defined(WINDOWS)
xr_pure_interface IObjectPhysicsCollision;
#endif

class CAttachmentOwner;
class CInventoryOwner;
Expand Down Expand Up @@ -188,9 +186,7 @@ class IGameObject : public virtual IFactoryObject,
virtual IRenderVisual* Visual() const = 0;
virtual void OnChangeVisual() = 0;
virtual IPhysicsShell* physics_shell() = 0;
#if defined(WINDOWS)
virtual const IObjectPhysicsCollision* physics_collision() = 0;
#endif
// Name management
virtual shared_str cName() const = 0;
virtual void cName_set(shared_str N) = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/xrGame/PhysicsShellHolder.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class CPhysicsShellHolder : public CGameObject,
virtual bool ActivationSpeedOverriden(Fvector& dest, bool clear_override) { return false; }
IC CPhysicsShell*& PPhysicsShell() { return m_pPhysicsShell; }
IC CPhysicsShellHolder* PhysicsShellHolder() { return this; }
virtual const IObjectPhysicsCollision* physics_collision();
virtual const IObjectPhysicsCollision* physics_collision() {}
virtual const IPhysicsShell* physics_shell() const;
virtual IPhysicsShell* physics_shell();
virtual const IPhysicsElement* physics_character() const;
Expand Down

0 comments on commit d560068

Please sign in to comment.