Advertisement Jump to content
  • Advertisement

rjhwinner03

Member
  • Content Count

    93
  • Joined

  • Last visited

Community Reputation

-11 Bad

About rjhwinner03

  • Rank
    Member

Personal Information

  • Role
    Programmer
  • Interests
    QA

Recent Profile Visitors

1501 profile views
  1. Yes. I have removed the memset. I am getting the same results. I have had it commented out the whole time. But now, I have completely deleted it. It is gone. I get, now 1/3 - 1/4 of a minimap. Is there any way that I could do something to substitute for the memset function? On second thought, don't trouble yourselves. I am going to another website.
  2. Might I ask, in what way have you given any tidbits. I have given you an entire function, yet you keep asking for more. If you are trying to persuade me toward the open source community and GPL, I am not planning on now, and maybe ever, giving out any of my source code, but that may change, later, when this source code means less to me. Also, how can you prove that I do not know what I am doing? I literally have single handedly early programmed a full Real Time Strategy Game, and have made it known, and yet you say that I do not know what I am doing. The reason I came to this site is to get help, and maybe move to making my project open source, but my efforts of getting much help from this question have not been great, and you have not at all answered my question. No, I have just gotten wasted posts stating that I have no experience with C++, which is frustrating because I would sometimes stay up until past midnight with several weekends in a row doing programming, usually months at a time. If you want more code, state what you will need, if it is another function, or even the DirectX 9 files, but I don’t want to let my hard work go to the world in the form of source code, but in the form of a game, which I plan to get working. I am sorry if you take this post wrongly and I hope you understand what is bothering me, and causing me to write this post. However, BE MORE SPECIFIC Warmest Regards, rjhwinner03
  3. I will not post any more code, as this is a solo, commercial project being carried out by me. However, I did some more tests, and the memset function that is giving me issues is supposed to draw the square for the minimap. The sight texture is actually working, but the square is too small. I know this is a square because of the following: D3DLOCKED_RECT sRect; sightTexture->LockRect(0, &sRect, NULL, NULL); BYTE *bytes = (BYTE*)sRect.pBits; The bytes that are being used are supposed to be the coordinates for the minimap, which is drawn here: memset(bytes, 0, sRect.Pitch*sRect.Pitch); The value of sRect.Pitch is 128 pixels. This is the measurement that draws the length and the width of the square that is supposed to be the minimap. Here is what I need to have (photo from Empire Earth, not actually my game): M minimap looks like this, but with 1/3 of the minimap showing. For example, instead of the whole world showing, as seen here, only around Siberia would be showing on mine, which is a big problem and a big obstacle.
  4. Ok I will post the code, my computer is slowly doing updates.
  5. The code for the minimap is the code that is on the first post... If i keep the memset, I get an unhandled exception.
  6. 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.
  7. No, I have not... Memset(bytes, 0, sRect.Pitch*64 * 8); Do you mean this?
  8. 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.
  9. (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
  10. 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.
  11. 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...
  12. The debugger says: (Directly Quoted) sRect = {Pitch=128 pBits=0x05bc7000 } The Pitch is equal to 128, and the value pBits is located at 0x05bc7000
  13. 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...
  14. The code runs, but I still get the issue that I would get if I commented out the memset function...
  15. It still passes an exception if I uncomment the lock function...
  • 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!