This problem seems very simple but I cannot solve it no matter what I try...
I have the prototype in the class, there is no duplicate prototypes with the same name nor functions. Yet it can't find it.
Look at these screenshots to see what I mean
Here is the class where they are added in the header file
Here is where I try to use the thing where all the functions and variables pop out doesn't have it.
As you can see in that image the RemoveParticle
function is in the same area as FindTargetEffect
function yet it can find the RemoveParticle
just fine, and FindTargetEffect
it can't.
If you think it's the defines.. i commented them out and it still doesn't work
Here is the header class.
class CParticleEntityManager {
public:
friend class CParticleEntity;
friend class CParticleBundle;
CParticleEntityManager();
int AddParticleToTargetBone(const char *name,
DWORD targetID,
int effectBoneIndex,
bool useEffectBoneRotation,
D3DXVECTOR3 &offset,
bool autoRemove = true,
/*bool bNonstopPlay = false,*/
bool continued = false,
D3DXMATRIX matContinued = D3DXMATRIX(0.0f, 0.0f, 0.0f, 0.0f,
0.0f, 0.0f, 0.0f, 0.0f,
0.0f, 0.0f, 0.0f, 0.0f,
0.0f, 0.0f, 0.0f, 0.0f)/*
#ifdef DEF_XMODEL_BONE_EFFECT_OEN_081125
, bool bXModel = false
#endif
#ifdef DEF_ADD_PARTICLE_OEN_081211
, float fDelayTime = -1
#endif
#ifdef DEF_BUG_PARTICLE_OEN_090310
, int nTargetType = 0
, bool bOverlap = true
#endif*/
);
// ???T?ó á??ó?? ?????? °3?? ?y?o, ?úμé°a ????
int AddParticleToCameraCenter(const char *name, bool autoRemove = true);
// á?á¤?? à§???í 1??a?? ?????? °3?? ?y?o, ?úμé°a ????
int AddParticle(const char *name, D3DXVECTOR3 &position, D3DXMATRIX &rotation, bool autoRemove = true);
// á?á¤?? à§???? ?????? °3?? ?y?o, ?úμé°a ????
int AddParticle(const char *name, D3DXVECTOR3 &position, bool autoRemove = true);
// ?????? °3???| àìμ?
void MoveParticle(int hEntity, D3DXVECTOR3 &position);
// ?????? °3???| àìμ?°ú è?àü
void MoveParticle(int hEntity, D3DXVECTOR3 &position, D3DXMATRIX &rotation);
// ?????? °3?? ?èá| (immediately °? true ?é 1ù·? ?èá|, false ?é ??à??y?oμè ??????à? ???íàì ′ù?ò?§±?á? ±a′ù?2)
void RemoveParticle(int hEntity, bool immediately);
/**
* ?????? °3?? ????
* date 2008-04-23
* author oen
* param hEntity ???? ?£???? ?úμé
* param *replace ??????à? oˉ°???′ù?é oˉ°??ò ?????? ?í
* param restart_ ???? è? ??????à? ′ù?? ??·1àì ???3á? àˉ1?
*/
void ResetParticle(int hEntity, const char *replace = NULL, bool restart_ = true);
/**
* ??′? ?úμéà? °?á? °3??à? o?àúoíà? ?3á¤
* date 2008-04-23
* author oen
* param hEntity ?úμé
* param visible_ true : o?àó false : ?èo?àó
*/
//void SetVisible(int hEntity, bool visible_);
// ?eμ? ?????? °3?? ???? (??μe?í???- ????)
void ResetAllParticles();
// CMyD3DApplication::RenderView ???- è£?a (postRender ′? 3aá??? μ?·? ·?′??μ?3??°? ?ê???? °??ì?§1??? (?1?| μé?é 1è°?è-?éà? ??°???′? è?°ú)
HRESULT Render(bool postRender);
// CMyD3DApplication::FrameMove ???- �a
void FrameMove(float elapsedTime);
// ±í?úào DX °′?? o1±? °ü?? ????μé :-(
HRESULT InitDeviceObjects(IDirect3DDevice9 *pDevice);
HRESULT RestoreDeviceObjects();
HRESULT InvalidateDeviceObjects();
HRESULT DeleteDeviceObjects();
#ifdef _TOOL
// àì???íμéà? á¤????′ù.
void Clear();
#endif
#if defined(DEF_BUG_PARTICLE_OEN_090310) || defined(DEF_EFFECT_OEN_090325)
/**
* μ?à??? ID ?? μ?à??? àì???í°? où?? à?′?á? ?ì?é′ù.
* param dwID ?£à? ID
* param strEffectName ?£à? àì???í ?í
*
eturn ?£?ò′ù?é ??′? àì???í?| ???£?ò′ù?é -1
*/
int FindTargetEffect(DWORD dwTargetID, LPCSTR strEffectName);
#endif
// ??μe?í???- ??????′? oˉ??μé
int m_hTestParticle;
D3DXVECTOR3 m_testParticleOffset;
bool m_showWireFrame;
bool m_freeze;
bool m_fixPosition;
int m_numDrawParticles;
bool m_bTabSelect; // ?11??° ??àì ?±?? μ??ú′?á? è?à? ??±a à§?? oˉ??
#ifdef DEF_EFFECT_BOX_ESCAFLOWNE_2006_03_16 // àì?????? ??1ì?í
BOXVERTEX m_Vertices[ 8 ];
BOXINDEX m_Indices[ 12 ];
LPDIRECT3DVERTEXBUFFER9 m_pBoxVB;
LPDIRECT3DINDEXBUFFER9 m_pBoxIB;
int m_nTest;
#endif
// ?????? °′?? ᢱùà? à§?? ᢱù?μ?a oˉ°?
CParticleEntity * GetEntityByHandle(int handle);
private:
void Init();
int GetNewHandle();
int GetSortedDrawEntities(CParticleEntity **drawEntities);
void FlushVertexBuffer(prtShaderStage_t *shader, int vbWriteOffset, int vbWriteSize);
#ifdef DEF_EFFECT_BOX_ESCAFLOWNE_2006_03_16 // àì?????? ??1ì?í
void InitBox(); // 1ú?o ?ê±aè-
void RenderBox(); // 1ú?o ±×??±a
#endif
CParticleEntity * m_pEntities[MAX_PARTICLE_ENTITIES];
CParticleEntity * m_pEntityList;
int m_numEntities;
float m_fElapsedTime;
bool m_bConfirmDevice;
bool m_bRestoreDevice;
bool m_bSoftware;
PDIRECT3DDEVICE9 m_pD3DDev;
PDIRECT3DVERTEXBUFFER9 m_pVertexBuffer;
PDIRECT3DINDEXBUFFER9 m_pIndexBuffer;
PDIRECT3DVERTEXSHADER9 m_pBumpEnvVertexShader;
PDIRECT3DPIXELSHADER9 m_pBumpEnvPixelShader;
PDIRECT3DVERTEXSHADER9 m_pHeatHazeMaskVertexShader;
PDIRECT3DPIXELSHADER9 m_pHeatHazeMaskPixelShader;
CTexture * m_pHeatHazeTexture;
};
extern CParticleEntityManager g_particleEntityManager;
question from:
https://stackoverflow.com/questions/65857457/c-strange-problem-cannot-find-function-member-in-class