Imports the current Win32 source for the pod-racing game 'Red Planet', built on the MUNGA engine and its L4 (Win32/DirectX) platform layer: - MUNGA / MUNGA_L4: cross-platform engine core and Win32 backend - RP / RP_L4: Red Planet game logic and Win32 application - DivLoader, Setup1: asset loader and installer project - lib, MUNGA_L4/openal, MUNGA_L4/sos: third-party audio dependencies Removed stale Subversion metadata and added .gitignore/.gitattributes. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
61 lines
1.4 KiB
C++
61 lines
1.4 KiB
C++
#pragma once
|
|
|
|
#include "network.h"
|
|
|
|
//##########################################################################
|
|
//########################## EntityID ################################
|
|
//##########################################################################
|
|
|
|
class EntityID
|
|
{
|
|
public:
|
|
#if defined(USE_SIGNATURE)
|
|
friend int Is_Signature_Bad(const volatile EntityID *);
|
|
#endif
|
|
|
|
typedef Enumeration LocalID;
|
|
|
|
EntityID();
|
|
EntityID(const EntityID&);
|
|
EntityID(HostID);
|
|
EntityID(HostID, LocalID);
|
|
|
|
Logical TestInstance() const;
|
|
HostID GetHostID() { return hostID; }
|
|
|
|
Logical operator!() const
|
|
{
|
|
Check(this);
|
|
return operator==(Null);
|
|
}
|
|
EntityID& operator=(const EntityID&);
|
|
|
|
EntityID operator-(const EntityID&) const;
|
|
|
|
EntityID& operator+=(const EntityID&);
|
|
EntityID& operator-=(const EntityID&);
|
|
|
|
EntityID& operator+=(LocalID);
|
|
EntityID& operator-=(LocalID);
|
|
|
|
Logical operator<(const EntityID&) const;
|
|
Logical operator<=(const EntityID&) const;
|
|
Logical operator>(const EntityID&) const;
|
|
Logical operator>=(const EntityID&) const;
|
|
Logical operator==(const EntityID&) const;
|
|
Logical operator!=(const EntityID&) const;
|
|
|
|
operator int() const;
|
|
|
|
static EntityID Null;
|
|
static LocalID LocalNull;
|
|
|
|
friend std::ostream& operator<<(std::ostream& stream, const EntityID& v)
|
|
{
|
|
return stream << v.hostID << ':' << v.localID;
|
|
}
|
|
|
|
private:
|
|
HostID hostID;
|
|
LocalID localID;
|
|
}; |