Move git root from Client/ to src/ to track all source code: - Client: Game client source (moved to Client/Client/) - Server: Game server source - GameTools: Development tools - CryptoSource: Encryption utilities - database: Database scripts - Script: Game scripts - rylCoder_16.02.2008_src: Legacy coder tools - GMFont, Game: Additional resources 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
119 lines
3.2 KiB
C++
119 lines
3.2 KiB
C++
|
|
#ifndef _BGMController_H_
|
|
#define _BGMController_H_
|
|
|
|
#include "STL.h"
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////
|
|
//
|
|
class ITriggerEvent;
|
|
class CRegionTrigger;
|
|
struct IDirectSound8;
|
|
struct D3DXVECTOR3;
|
|
struct IDirect3DDevice8;
|
|
struct SVector2;
|
|
|
|
typedef struct _iobuf FILE;
|
|
|
|
typedef vector<int> TRIGGERLIST;
|
|
typedef vector<SVector2> POLYGON;
|
|
typedef pair<TRIGGERLIST, POLYGON> TRIGGERREGION;
|
|
typedef vector<TRIGGERREGION> TRIGGERREGIONS;
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////
|
|
//
|
|
|
|
class CBGMController
|
|
{
|
|
protected:
|
|
typedef vector<ITriggerEvent*> EVENT;
|
|
typedef vector<EVENT> EVENTS;
|
|
typedef pair<int, string> EVENTARGUNIT;
|
|
typedef vector<EVENTARGUNIT> EVENTARG;
|
|
typedef vector<EVENTARG> EVENTARGS;
|
|
typedef vector<long> OBJIDS;
|
|
typedef vector<OBJIDS> CONTAINER_OBJID;
|
|
typedef vector<D3DXVECTOR3> VERTEXVECTOR;
|
|
typedef vector<VERTEXVECTOR> TRIGGERVERTEXES;
|
|
|
|
CRegionTrigger * m_pRegionTrigger;
|
|
|
|
EVENTS * m_pEvents;
|
|
EVENTARGS * m_pEventArgs;
|
|
|
|
unsigned m_iTriggerSelected;
|
|
unsigned m_iPointSelected;
|
|
unsigned m_iLastDeleted;
|
|
|
|
TRIGGERREGIONS * m_pTriggerRegions;
|
|
CONTAINER_OBJID * m_pContainer_ObjID;
|
|
|
|
TRIGGERLIST const * m_pPrevTrigger;
|
|
|
|
TRIGGERVERTEXES * m_pVertexes;
|
|
|
|
|
|
protected:
|
|
CBGMController( IDirectSound8 * );
|
|
CBGMController( const CBGMController & );
|
|
CBGMController & operator=( const CBGMController & );
|
|
|
|
void BeginEvent( int );
|
|
void EndEvent( int );
|
|
void AddPointToVertexes( unsigned, float x, float y, float z );
|
|
void MovePointAtVertexes( unsigned, unsigned, float x, float y, float z );
|
|
void DeletePointAtVertexes( unsigned, unsigned );
|
|
|
|
|
|
public:
|
|
static CBGMController & GetInstance( IDirectSound8 * = 0 );
|
|
~CBGMController();
|
|
|
|
void Create( const char * szFilename, bool forEdit = false );
|
|
void Create( FILE *, bool forEdit = false );
|
|
void Save( const char * szFilename );
|
|
void Save( FILE * );
|
|
void Destroy();
|
|
|
|
void DestroyAllEvents();
|
|
void Update( float x, float y, float z );
|
|
|
|
//Æ®¸®°Å ¿¡µðÆÃÀ» À§ÇÑ ÇÔ¼öµé
|
|
bool IsValidTriggerSelected();
|
|
bool IsValidPointSelected();
|
|
|
|
unsigned AddTrigger();
|
|
void DeleteTrigger();
|
|
|
|
bool SelectTrigger( unsigned );
|
|
unsigned GetSelectTrigger() { return m_iTriggerSelected; }
|
|
|
|
int AddEvent( int eventID, const char * szArg );
|
|
bool SetEvent( int Event, int eventType, const char * szArg );
|
|
bool GetEvent( int Event, int & eventType, char * szArg );
|
|
bool DeleteEvent( int );
|
|
|
|
unsigned AddPoint( float x, float y, float z, long objID );
|
|
void MovePoint( float x, float y, float z );
|
|
void SetObjID( long objID );
|
|
void DeletePoint();
|
|
// bool SelectPoint( unsigned );
|
|
bool SelectPoint( unsigned triggerIndex, unsigned pointIndex );
|
|
void SelectClosestPoint( float x, float y, float z, float limitDistance );
|
|
void GetPoint( float & x, float & y, float & z, long & objID ); //Æ®¸®°Å¿Í Æ÷ÀÎÆ®°¡ °°ÀÌ ¼±ÅõÊ
|
|
|
|
void Rebuild( float Epsilon );
|
|
void Render( IDirect3DDevice8 * );
|
|
|
|
int GetPolygonCount();
|
|
int GetVertexCount( int i );
|
|
void GetVertex( int i, int j, float & x, float & y, float & z );
|
|
|
|
unsigned LastDeletedPoint() { return m_iLastDeleted; }
|
|
};
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////
|
|
|
|
#endif
|