Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

122 Neutral

About qxtianlong

  • Rank
  1. Quote:Original post by Codeka Quote:Original post by qxtianlong How does this engine support Chinese?What do you mean "how"? It looks like it's using HTML entity reference to include Unicode characters in the ASCII strings. 你 looks like a HTML entity reference, and since 20320 decimal is 4F60 in hexadecimal, it corresponds to Unicode characters U+4F60, which is 你. thanks all
  2. How does this engine support Chinese? #include <SFML/Audio.hpp> #include <SFML/Graphics.hpp> #pragma comment(lib,"sfml-main-d.lib") #pragma comment(lib,"sfml-system-d.lib") #pragma comment(lib,"sfml-window-d.lib") #pragma comment(lib,"sfml-graphics-d.lib") #pragma comment(lib,"sfml-audio-d.lib") int main() { // Create the main window sf::RenderWindow App(sf::VideoMode(800, 600,32), "SFML &#20320;&#22909;"); // Load a sprite to display sf::Image Image; if (!Image.LoadFromFile("data/gfx/intro.jpg")) return EXIT_FAILURE; sf::Sprite Sprite(Image); // Create a graphical string to display sf::Font Arial; if (!Arial.LoadFromFile("data/fonts/simsun.ttc")) return EXIT_FAILURE; sf::String Text("Hello &#20160;&#20040;&#19996;&#35199;", Arial, 50); // Load a music to play sf::Music Music; if (!Music.OpenFromFile("data/sfx/main.ogg")) return EXIT_FAILURE; // Play the music Music.Play(); // Start the game loop while (App.IsOpened()) { // Process events sf::Event Event; while (App.GetEvent(Event)) { // Close window : exit if (Event.Type == sf::Event::Closed) App.Close(); } // Clear screen App.Clear(); // Draw the sprite App.Draw(Sprite); // Draw the string App.Draw(Text); // Update the window App.Display(); } return EXIT_SUCCESS; } EDIT: Changed topic title to be more descriptive. - jba. [Edited by - jbadams on November 4, 2009 1:42:44 AM]
  3. qxtianlong

    2d demo

    Own engine supports bmp format, 16 has always been considered to be the fastest. Does not do any other complicated things, to be a game good enough for us. Gameres color inside the K1945 simulation is to use 开源 code [Edited by - qxtianlong on August 24, 2009 7:26:55 PM]
  4. qxtianlong

    I have remade Brick Shooter Jr!

    I like it. It's Great.
  5. qxtianlong

    OpenGL in Visual C++ Express

    hi,I think you missing the flatform sdk 1,I met the problem before, and I install the flatform sdk 1,then,It's no any problem... good luck! :p
  6. hello anybody,I'm looking for the include files for Opengl of the Masm, I met the nehe tutorials said the URL can be found,but I click the link, the page can be not open. anybody could tell me where can download these include files... becouse I enjoy the asm program language... :p thankyou everyone...
  7. I think you can tried... such as: FinalColor = TexelColor * SourceBlendFactor + PixelColor * DestBlendFactor struct CUSTOMVERTEX01 { D3DXVECTOR3 position; D3DXVECTOR3 normal; }; struct CUSTOMVERTEX02 { D3DXVECTOR3 position; D3DCOLOR color; FLOAT tu, tv; }; struct CUSTOMVERTEX { FLOAT x, y, z; DWORD color; }; #define D3DFVF_CUSTOMVERTEX (D3DFVF_XYZ|D3DFVF_DIFFUSE) #define D3DFVF_CUSTOMVERTEX_ELLIPSE (D3DFVF_XYZ|D3DFVF_NORMAL|D3DFVF_TEX1) #define D3DFVF_CUSTOMVERTEX01 (D3DFVF_XYZ|D3DFVF_NORMAL) #define D3DFVF_CUSTOMVERTEX02 (D3DFVF_XYZ|D3DFVF_DIFFUSE|D3DFVF_TEX1) ................ ................ g_pMyd3dDevice->SetRenderState( D3DRS_CULLMODE, D3DCULL_NONE ); g_pMyd3dDevice->SetRenderState( D3DRS_LIGHTING, FALSE ); g_pMyd3dDevice->SetRenderState( D3DRS_ZENABLE, TRUE ); .............. .............. .............. g_pMyd3dDevice->SetRenderState( D3DRS_ALPHABLENDENABLE, TRUE ); g_pMyd3dDevice->SetRenderState( D3DRS_SRCBLEND, D3DBLEND_SRCALPHA); g_pMyd3dDevice->SetRenderState( D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA); g_pMyd3dDevice->SetRenderState( D3DRS_ALPHATESTENABLE, TRUE ); g_pMyd3dDevice->SetRenderState( D3DRS_ALPHAREF, 0x0f ); g_pMyd3dDevice->SetRenderState( D3DRS_ALPHAFUNC,D3DCMP_GREATEREQUAL );
  8. qxtianlong

    DirectX9 Texture Coordinates Problem

    You can try it,for example: #define D3DFVF_TEXCOORDSIZE3(CoordIndex) (D3DFVF_TEXTUREFORMAT3 << (CoordIndex*2 + 16)) DWORD dwFVF = D3DFVF_XYZ | D3DFVF_NORMAL | D3DFVF_TEX1 | D3DFVF_TEXCOORDSIZE3(0);
  9. qxtianlong

    Direct input keyboard

    Quote: In the above context both methods are equivalent and there's no particular reason to choose one over the other except that I'm lazy and prefer the shorter version so I dont have to type as much ;p. I know this,but,the first time,you wrote this style, for example: m_pCurrentKeys = &m_keys[256]; the second time,you wrote this style, for example: m_pOldKeys = m_keys; If I can write in the same style,m_pOldKeys = &m_keys[0]; I know m_pOldKeys = m_keys and m_pOldKeys = &m_keys[0] is the same result, if you wrote like this,it's look good.... I'm no other meaning.:p ------------------------------------------------------------------------- I think you can try .... for example: HRESULT hr; BYTE Buffer[256]; ZeroMemory( Buffer, sizeof(Buffer) ); hr = lpdiKeyboard->GetDeviceState( sizeof(Buffer), Buffer ); if( FAILED( hr ) ) { hr = lpdiKeyboard->Acquire(); while( hr == DIERR_INPUTLOST ) hr = lpdiKeyboard->Acquire(); return hr; }
  10. qxtianlong

    Direct input keyboard

    Quote: m_pCurrentKeys = &m_keys[256]; m_pOldKeys = m_keys; why did not you write this,such as ............. m_pCurrentKeys = &m_keys[256]; m_pOldKeys = &m_keys[0]; you use two type in your code....
  11. qxtianlong

    need help with my computer

    search in the google.
  • 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!