Cosmy

Members
  • Content count

    93
  • Joined

  • Last visited

Community Reputation

167 Neutral

About Cosmy

  • Rank
    Member
  1. Bugs in code?

    Also if you are using SDL2 you are still using old SDL functions...   SDL_Surface*, SDL_FillRect()... why don't you create a SDL renderer? Will be much easier.   Try to use: SDL_CreateRenderer() SDL_SetRenderDrawColor() SDL_RenderClear() SDL_RenderFillRect() SDL_RenderPresent()
  2. What should I use

    I come across this http://www.thegamecreators.com/ many years ago...   Anyway depend on the game genre   Is that a classic RPG game? then http://www.rpgmakerweb.com/   Do you want something easy to program? then https://love2d.org/   Something else? then check http://www.stencyl.com/ or http://game-editor.com/Main_Page
  3. The problem are arguments you pass.   command is unsigned long?   [source]unsigned long command;[/source] is different from [source]unsigned int command;[/source]   and what about the_method? it should be [source]std::function<void(unsigned int, uint32_t)>[/source]
  4. Hello there,   Someone can share the ancient "DXUT" framework?   it have: d3dapp.cpp d3denumeration.cpp d3dfile.cpp d3dfont.cpp d3dsettings.cpp d3dutil.cpp dxstdafx.cpp dxutil.cpp etc...   It can be found in "Samples/C++/Common" folder.   I don't know in which version of DirectX can be found. The oldest version I have is Dec2005 and it doesn't have these files...   Thanks, Cosimo
  5. Hi all, I have a general question. In a small team (1-2 programmers, 1-2 2d artist, 1 game designer) how to split the earn (as percentage)? Please note that programmers have to develop on more platforms
  6. directx10 sprites?

    Most game companies avoid helper funtions from DirectX
  7. Hi all, I'm making a converter from p3d to 3ds (this below is the 3ds to p3d converter) [code] float TempX, TempY, TempZ, TempW; for( int i = 0; i < P3DMesh[counter].NumVertices; i++ ) { TempX = m->pointL[i].pos[0]; TempY = m->pointL[i].pos[1]; TempZ = m->pointL[i].pos[2]; float othermat[4][4]; othermat[0][0] = m->matrix[0][0]; othermat[0][1] = m->matrix[1][0]; othermat[0][2] = m->matrix[2][0]; othermat[0][3] = m->matrix[3][0]; othermat[1][0] = m->matrix[0][1]; othermat[1][1] = m->matrix[1][1]; othermat[1][2] = m->matrix[2][1]; othermat[1][3] = m->matrix[3][1]; othermat[2][0] = m->matrix[0][2]; othermat[2][1] = m->matrix[1][2]; othermat[2][2] = m->matrix[2][2]; othermat[2][3] = m->matrix[3][2]; othermat[3][0] = m->matrix[0][3]; othermat[3][1] = m->matrix[1][3]; othermat[3][2] = m->matrix[2][3]; othermat[3][3] = m->matrix[3][3]; // Mesh-Matrix auf Verts anwenden TempW = TempX*othermat[3][0] + TempY*othermat[3][1] + TempZ*othermat[3][2] + othermat[3][3]; if( TempW == 0 ){ continue; } TempW = 1 / TempW; P3DMesh[counter].Vertex[i].X = (TempX*othermat[0][0] + TempY*othermat[0][1] + TempZ*othermat[0][2] + othermat[0][3]) * TempW; P3DMesh[counter].Vertex[i].Y = (TempX*othermat[1][0] + TempY*othermat[1][1] + TempZ*othermat[1][2] + othermat[1][3]) * TempW; P3DMesh[counter].Vertex[i].Z = (TempX*othermat[2][0] + TempY*othermat[2][1] + TempZ*othermat[2][2] + othermat[2][3]) * TempW; } [/code] I know only P3DMesh[counter].Vertex[i].X, P3DMesh[counter].Vertex[i].Y, P3DMesh[counter].Vertex[i].Z I need do exactly the opposite, i need save in m->matrix[..][..] and m->pointL[i].pos[..] the data
  8. Hi all, I can mix DInput & WM_CHAR and XInput? In fact, i want to use dinput for managing mouse and joystick (with xinput), but keyboard in dinput isn't a great idea because you have to translate the scancode to ascii... Someone have some suggestions?
  9. GDI fonts

    1)I want create a font with CreateFont (NOT D3DXCreateFont) and use it with D3D9 But how to integrate it with D3D9? 2) Another question... I want to load a true type font (ttf) and use it with D3D9 I don't want to use external libraries such FreeType... Any ideas?
  10. D3D Circle vertex problem

    Quote:Original post by aryx I would say it's simply a matter of not being able to guarantee a set of points will actually have "full" pixel coverage. For example, if you were to zoom in then you'll start seeing spaces between points. Why not try D3DPT_LINESTRIP, which will draw a line from each point to the next. Now: http://img261.imageshack.us/img261/3829/immagine2ft.png
  11. Hi all, const float PI = 3.14159265f; const float DEGTORAD = PI / 180.0f; // DEGTORAD * degrees bool SetCustomVertex(CUSTOMVERTEX *pVertex, float x, float y, float z, float rhw, D3DCOLOR Color, float tu, float tv) { if (!pVertex) return false; pVertex->x = x; pVertex->y = y; pVertex->z = z; pVertex->rhw = rhw; pVertex->Color = Color; pVertex->tu = tu; pVertex->tv = tv; return true; } void Draw2DCircle(UINT uX, UINT uY, D3DCOLOR Color, float fRadius) { CUSTOMVERTEX Vertex[360]; for (int i = 0; i < 360; i++) { float f = DEGTORAD * i; SetCustomVertex(&Vertex[i], (float)(uX + cos(f) * fRadius), (float)(uY + sin(f) * fRadius), 0.5f, 1.0f, Color, 0.0f, 0.0f); } g_pDevice->SetFVF(D3DFVF_CUSTOMVERTEX); g_pDevice->SetTexture(0, NULL); g_pDevice->DrawPrimitiveUP(D3DPT_POINTLIST, 360, &Vertex[0], sizeof(Vertex[0])); } The problem is: [image]http://img228.imageshack.us/img228/7972/immaginefpk.png[/image] There are some points that aren't filled
  12. Quote:Original post by MJP You're returning a pointer to a temporary variable (fColor). Either make it a member of your CColorf class, or make it static member of that class, or have that GetARGB function take an array as a parameter that it will fill with the values. Ok thanks now it work :)
  13. Hi all, I have this // CColorf class real *GetARGB() const { real fColor[4] = { 0.0f }; fColor[0] = this->GetA(); fColor[1] = this->GetR(); fColor[2] = this->GetG(); fColor[3] = this->GetB(); return fColor; } // CD3D10Render class void CRenderD3D10::Clear(const CColorf &Colorf) { if (m_pDevice) { m_pDevice->ClearRenderTargetView(m_pRenderTargetView, Colorf.GetARGB()); m_pDevice->ClearDepthStencilView(m_pDepthStencilView, D3D10_CLEAR_DEPTH | D3D10_CLEAR_STENCIL, 1, 0); } // move it in another function if (m_pDXGISwapChain) m_pDXGISwapChain->Present(0, 0); } //-------------- if (m_pRenderD3D10) m_pRenderD3D10->Clear(CColorf(1.0f, 0.125f, 0.3f, 1.0f)); I'm using Visual C++ 2010. When i run the release exe the clear color is red-pink when i run the debug exe the clear color is black why this??? i checked the any single color and this is my log: //debug (a)1.000000,(r)0.125000,(g)0.300000,(b)1.000000 //release (a)1.000000,(r)0.125000,(g)0.300000,(b)1.000000 Please help me :(