Jump to content
  • Advertisement

michamoo

Member
  • Content Count

    10
  • Joined

  • Last visited

Community Reputation

112 Neutral

About michamoo

  • Rank
    Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. I have one more small problem. This minimap is rotated by 180° . It was by 90°, so I just changed in U and V sin to cos and cos to sin. But it´s still 180°. It isn´t big problem, but.. It don´t looks like nice :D Code :     TNLVERTEX verts[CIRCLE_RESOLUTION+1]; float WedgeAngle = ( float )( ( 2 * D3DX_PI ) / CIRCLE_RESOLUTION ); rect.x -= 110; rect.y += 82;     for (int i = 0; i < CIRCLE_RESOLUTION+1; i++)     {  float Theta        = ( float )( i * WedgeAngle );            verts[i].m_fPosX = rect.x + 98*cos(D3DX_PI*(i/(CIRCLE_RESOLUTION/2.0f)));         verts[i].m_fPosY = rect.y + 98*sin(D3DX_PI*(i/(CIRCLE_RESOLUTION/2.0f)));         verts[i].m_fPosZ = 0;         verts[i].m_fRHW = 1.0f;         verts[i].m_dwColor = 0xFFFFFFFF; verts[i].m_fU = (float)( 0.5 + 0.5 * sin( Theta ) ); verts[i].m_fV = (float)( 0.5 - 0.5 * cos( Theta ) );     } FLOAT fMIP = 0.0f;   m_pDevice->m_pDevice->SetSamplerState( 0, D3DSAMP_MIPMAPLODBIAS, *((LPDWORD) &fMIP)); m_pDevice->m_pDevice->SetSamplerState( 0, D3DSAMP_MIPFILTER, D3DTEXF_LINEAR); m_pDevice->m_pDevice->SetTexture(0, m_pTMINIMAP);     m_pDevice->m_pDevice->SetFVF(T3DFVF_TNLVERTEX);     m_pDevice->m_pDevice->DrawPrimitiveUP(D3DPT_TRIANGLEFAN, CIRCLE_RESOLUTION, &verts, sizeof(TNLVERTEX)); As I said, I don´t have problem with giving money, so If someone will really help me, I will give him some $.
  2. YES IT WORKS!! Give me your paypal email!
  3. It is minimap, position is bad, but that I will correct later, that isn´t important. And I will try it, thanks!
  4. So, I little bit edited code. Now it looks like this : http://prntscr.com/6rpibs But that is again that what I said.    TNLVERTEX verts[CIRCLE_RESOLUTION+1];float WedgeAngle = ( float )( ( 2 * D3DX_PI ) / CIRCLE_RESOLUTION );    for (int i = 0; i < CIRCLE_RESOLUTION+1; i++)    { float Theta        = ( float )( i * WedgeAngle );       verts[i].m_fPosX = rect.x + 152*cos(D3DX_PI*(i/(CIRCLE_RESOLUTION/2.0f)));        verts[i].m_fPosY = rect.y + 152*sin(D3DX_PI*(i/(CIRCLE_RESOLUTION/2.0f)));        verts[i].m_fPosZ = 0;        verts[i].m_fRHW = 1;        verts[i].m_dwColor = 0xFFFFFFFF;verts[i].m_fU = (float)( 0.5 + 0.5 * cos( Theta ) );verts[i].m_fV = (float)( 0.5 - 0.5 * sin( Theta ) );    }m_pDevice->m_pDevice->SetTexture(0, m_pTMINIMAP);    m_pDevice->m_pDevice->SetFVF(VERTEX_2D_DIF::FVF);    m_pDevice->m_pDevice->DrawPrimitiveUP(D3DPT_TRIANGLEFAN, CIRCLE_RESOLUTION-1, &verts, sizeof(TNLVERTEX));
  5. Yes, but it worked like this, Positions are ok (if U and V are texture positions), or it´s something else and I need to replace it?
  6. So it can look like this?      const int NUMPOINTS = 30;   TNLVERTEX Circle[NUMPOINTS + 1];   float WedgeAngle = ( float )( ( 2 * D3DX_PI ) / NUMPOINTS ); FLOAT fMIP = 0.0f;     for( int i = 0; i m_pDevice->SetSamplerState( 0, D3DSAMP_MIPMAPLODBIAS, *((LPDWORD) &fMIP));m_pDevice->m_pDevice->SetSamplerState( 0, D3DSAMP_MIPFILTER, D3DTEXF_LINEAR);m_pDevice->m_pDevice->SetTexture( 0, m_pTMINIMAP);m_pDevice->m_pDevice->SetFVF(D3DFVF_TL);    m_pDevice->m_pDevice->DrawPrimitiveUP( D3DPT_TRIANGLEFAN, NUMPOINTS-2, Circle, sizeof( TNLVERTEX ) ); 
  7. That is +- problem, because this game is really big and it can´t be debugged in VS, cause it have big datafolder. anyway, maybe it can be problem too, I´m using VS 2003. And I will give you money, I´m not rich, but something I can give you :D  And thanks for all your help!
  8. I edited both, but now it don´t appear, I can´t see anything. I tried just with TriangleFan and U and V same as before, and it don´t work too. If we will resolve it, I can give you some money.
  9. I´m +- newbie in D3D programming, can you little help me? But thanks for help.
  10. Hello, I have small question.. I have game and.. I had there Square Minimap, but now I need Circle minimap. I tried something on internet, but when I used Filled Minimap, it have just color of minimap, and when I used normal rendering, it´s circle, but there is just one circle line, and in that circle isn´t anything, it´s empty. I´m using Device->SetTexture(0, pMINIMAP); Working one : (square) int nRng;int nPos; m_pTZOOMSCROLL->GetScrollPos(nRng, nPos);m_pTMAP->m_fTSCALE = TMINIMAP_INIT_SCALE / powf(TMINIMAP_SCALE_FACTOR, (FLOAT)nPos); CRect rect(0, 0,TMINIMAPTEX_SIZE,TMINIMAPTEX_SIZE); rect.OffsetRect(m_rc.left + m_rcAREA.left - (190 - m_rcAREA.Width()) / 0.85,  m_rc.top + m_rcAREA.top - (190 - m_rcAREA.Height()) / 0.65); TNLVERTEX vRECT[4] = {{ FLOAT(rect.left), FLOAT(rect.top), 0.5f, 1.0f, 0xFFFFFFFF, 0.0f, 0.0f},{ FLOAT(rect.right), FLOAT(rect.top), 0.5f, 1.0f, 0xFFFFFFFF, 1.0f, 0.0f},{ FLOAT(rect.left), FLOAT(rect.bottom), 0.5f, 1.0f, 0xFFFFFFFF, 0.0f, 1.0f},{ FLOAT(rect.right), FLOAT(rect.bottom), 0.5f, 1.0f, 0xFFFFFFFF, 1.0f, 1.0f}};FLOAT fMIP = 0.0f; m_pDevice->m_pDevice->SetSamplerState( 0, D3DSAMP_MIPMAPLODBIAS, *((LPDWORD) &fMIP));m_pDevice->m_pDevice->SetSamplerState( 0, D3DSAMP_MIPFILTER, D3DTEXF_LINEAR);m_pDevice->m_pDevice->SetTexture( 0, m_pTMINIMAP);m_pDevice->m_pDevice->SetFVF(T3DFVF_TNLVERTEX);m_pDevice->m_pDevice->DrawPrimitiveUP(D3DPT_TRIANGLESTRIP,2, vRECT, sizeof(TNLVERTEX)); Not working one : int nRng;int nPos; m_pTZOOMSCROLL->GetScrollPos(nRng, nPos);m_pTMAP->m_fTSCALE = TMINIMAP_INIT_SCALE / powf(TMINIMAP_SCALE_FACTOR, (FLOAT)nPos); CPoint rect(TMINIMAPTEX_SIZE); rect.Offset(m_rc.left + m_rcAREA.left - (190 - m_rcAREA.Width()) / 0.85, m_rc.top + m_rcAREA.top - (190 - m_rcAREA.Height()) / 0.65);  const int NUMPOINTS = 30;   TNLVERTEX Circle[NUMPOINTS + 1];   float WedgeAngle = ( float )( ( 2 * D3DX_PI ) / NUMPOINTS ); FLOAT fMIP = 0.0f;     for( int i = 0; i m_pDevice->SetSamplerState( 0, D3DSAMP_MIPMAPLODBIAS, *((LPDWORD) &fMIP));m_pDevice->m_pDevice->SetSamplerState( 0, D3DSAMP_MIPFILTER, D3DTEXF_LINEAR);m_pDevice->m_pDevice->SetTexture( 0, m_pTMINIMAP);m_pDevice->m_pDevice->SetFVF(D3DFVF_TL);    m_pDevice->m_pDevice->DrawPrimitiveUP( D3DPT_LINESTRIP, NUMPOINTS, Circle, sizeof( TNLVERTEX ) );Thanks for any help!
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!