mirror of
https://github.com/Ragora/T2-CPP.git
synced 2026-03-07 22:40:27 +00:00
* Minor cleanups.
* Add preprocessor macros for resolving member field offsets in a standard, easy to read way.
This commit is contained in:
parent
fc39b03ffb
commit
0410000234
12 changed files with 88 additions and 69 deletions
|
|
@ -11,11 +11,6 @@ namespace DX
|
|||
public:
|
||||
Player(unsigned int obj);
|
||||
|
||||
//! Object Name
|
||||
const char *name;
|
||||
//! Object ID
|
||||
const unsigned int &id;
|
||||
|
||||
//! Player Object Jetting State (readonly, writing it doesn't do anything)
|
||||
const bool &is_jetting;
|
||||
//! Player Object Jumping State (readonly, writing it doesn't do anything)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,9 @@
|
|||
#pragma once
|
||||
|
||||
#define MEMBER_POINTER(obj, type, offset) (type*)(obj + offset)
|
||||
#define MEMBER_FIELD(obj, type, offset) *(type*)(obj + offset)
|
||||
#define MEMBER_POINT3F(obj, offset, spacing) MEMBER_FIELD(obj, float, offset), MEMBER_FIELD(obj, float, offset + spacing), MEMBER_FIELD(obj, float, offset + (spacing * 2))
|
||||
|
||||
namespace DX
|
||||
{
|
||||
class SimObject
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue