Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

-6 Poor

About rjhwinner03

  • Rank

Personal Information

  • Role
  • Interests

Recent Profile Visitors

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

  1. Ok I will post the code, my computer is slowly doing updates.
  2. The code for the minimap is the code that is on the first post... If i keep the memset, I get an unhandled exception.
  3. But I have tried getting rid of the memset, which is for a minimap. When I delete the memset, only about 1/3 of the minimap texture is drawn.
  4. No, I have not... Memset(bytes, 0, sRect.Pitch*64 * 8); Do you mean this?
  5. I have already tried the pitch time 64... It gave me only a little chunk of the image that I need to have a full minimap.
  6. (1) The pitch multiplied by the height give a lesser value than the pitch squared... thus giving an image that is not complete. For some reason, as I have seen, the member values for the 3rd variable in the function are not supposed to be greater than the width or height... Why would I settle for half an image? -rjhwinner03
  7. No, I mean essential... the image height is 64, and the pitch is 128... It may be essential not to do, but that is how it supposed to work. Anyway, it worked in older Windows Versions that could run DX 9.0c.
  8. Ok... I will divide this answer into 3 answers. (1) I am still using pitch * pitch in the code because it is essential in the usage of memset for the drawing of the texture which is saved in memory (the minimap texture). This texture is checked every frame to make sure that the player's troops and their view radii are visible on the minimap, allowing for easy viewing, such as games like Age of Empires, Civilization, and Total War do. (2) I am sorry that I have provided too little information for your, and some other peoples' liking... Just tell me what other information you would need, and I will provide it... After all, this whole project was just based on random techniques (mostly old ones from the late '90s) that seemed to do exactly what I wanted them to. (3)I do know, actually, that the texture HAS to be locked in order for everything to work correctly, and I just forgot to uncomment it in the main question. Here is a few more lines of code: (I am extremely sorry that I forgot to post them in the starting code!) //Sight texture m_pDevice->CreateTexture(64, 64, 1, D3DUSAGE_DYNAMIC, D3DFMT_L8, D3DPOOL_DEFAULT, &sightTexture, NULL); I did uncomment the locking texture code... I changed that in the first question...
  9. The debugger says: (Directly Quoted) sRect = {Pitch=128 pBits=0x05bc7000 } The Pitch is equal to 128, and the value pBits is located at 0x05bc7000
  10. All of this stuff worked like a charm in Windows XP through Windows 8... I had no errors... Windows 10 is and has been a big obstacle for me in the past and the present...
  11. The code runs, but I still get the issue that I would get if I commented out the memset function...
  12. It still passes an exception if I uncomment the lock function...
  13. I just bought an SGI Indy from ebay. I netbooted the OS, and got the ethernet internet working... My next question is, "What now?" What can I do with the computer? My original reason of getting the computer is so I could do C/C++ programming on it, but I do not have all of the CD's that are needed for things such as the MIPS assembler... What do I do?
  14. In one of my games, I have a minimap. the question that has been buzzing around in my mind for a while is "Why wont this function work correctly?" I did some experimenting and I narrowed my selection down to a memset function. Here are the lines of code. ... D3DLOCKED_RECT sRect; sightTexture->LockRect(0, &sRect, NULL, NULL); BYTE *bytes = (BYTE*)sRect.pBits; memset(bytes, 0, sRect.Pitch*sRect.Pitch); float intensity = 1.3f; D3DXVECTOR2 center = D3DXVECTOR2(32.0f, 32.0f); for(int y=0;y<64;y++) for(int x=0;x<64;x++) { float d = D3DXVec2Length(&(center - D3DXVECTOR2((float)x, (float)y))); int value = (int)(((32.0f - d) / 32.0f) * 255.0f * intensity); if(value < 0)value = 0; if(value > 255)value = 255; bytes[x + y * sRect.Pitch] = value; } sightTexture->UnlockRect(0); ... Where is the code going wrong? I found this technique on an old programming website I used to use... Without the memset function, only 1/3 of my minimap gets rendered...
  15. I have almost completed a single player RTS game and a multiplayer FPS game. And I have worked on around 40+ different projects. This project is just me trying to expand my RTS project to multiplayer, which I am currently incapable of doing.
  • Advertisement

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!