52 lines
812 B
C
52 lines
812 B
C
#pragma once
|
|
|
|
#include "defines.h"
|
|
#include <d3d9.h>
|
|
#include <d3dx9math.h>
|
|
|
|
struct BlockTreeElement
|
|
{
|
|
float m_fColor;
|
|
D3DXVECTOR3 m_v3Pos;
|
|
D3DXVECTOR3 m_v3Rot;
|
|
float m_fSize;
|
|
float m_fTimeOffset;
|
|
|
|
BlockTreeElement* m_ParentObject;
|
|
};
|
|
|
|
struct BlockTreeBuilder
|
|
{
|
|
D3DXVECTOR3 m_v3Pos;
|
|
D3DXVECTOR3 m_v3Rot;
|
|
int m_iWalkAxis;
|
|
|
|
float m_fSize;
|
|
float m_fSizeChange;
|
|
float m_fColor;
|
|
float m_fRotOffset;
|
|
float m_fTimeOffset;
|
|
|
|
int m_iLevel;
|
|
|
|
BlockTreeElement* m_pParent;
|
|
};
|
|
|
|
struct BlockTree
|
|
{
|
|
BlockTreeElement* m_pElements;
|
|
int m_iElementcount;
|
|
|
|
float m_fBaseTime;
|
|
float m_fLastChangeTime;
|
|
|
|
float m_fTimeStep;
|
|
|
|
void Init();
|
|
bool IsActive( float fTime );
|
|
void AddToScene( float fTime, int iObject );
|
|
};
|
|
|
|
void PrepareBlockTrees();
|
|
|
|
void AddBlockTreesToScene( float fTime ); |