• Advertisement


  • Content count

  • Joined

  • Last visited

Community Reputation

139 Neutral

About localrob2

  • Rank
  1. Thanks for all the replies. Quote:Original post by frob Your 32-bit application will run just fine on the x64 systems. If you are talking about porting your code to be compiled for the architecture, you will have to worry about the issues mentioned above. So I should just be able to continue things as normal if I only plan on releasing an x86 program.
  2. I'm currently running win xp pro 32bit and VS2005 standard. If I upgrade to win xp 64bit or vista 64bit what types of problems can I expect in terms of programming? I know that's a vague question. When working with Win32 or SDL, are there major things I'm going to have to do differently, or are thing pretty much the same. I imagine there will be a few project properties I'll have to change, but the code should all be the same.
  3. Problem with debugging.

    When the game crashes the compiler should set you to a point where the error occurred, it should also give you an error code that may help you decipher what the problem is. What also may help pinpoint the exact error is break points. You can set a break point right before the area where the game crashes. Then Step In/Out of the code. This link kinda describes some debug features in VC 2005
  4. Game graphics

    You can find some free graphics online, a great sprite library is from Ari Feldman it has lots of free good quality sprites. I don't know the exact legality of taking sprites from other games, but you obviously can't profit from someone else's work.
  5. RPG engine design

    I have read Jim Adams RPG book, 2nd Ed. and I would not recommend it. It did give me an idea how somethings could be handled, but there were lots of problems otherwise. I did not like it as a 3d RPG engine or as just a 3d engine alone.
  6. deleting pointers in C++

    Quote:Original post by Simian Man Also, the use of identifiers beginning with an _ is considered bad practice since they are reserved for the implementation - though yours are not likely to cause problems. I usually prefix those with m,g,etc depending on where it is. I left that off...I guess just because. m_pCurState for a class data member, am I wrong?
  7. deleting pointers in C++

    Alright I found the problem. The base class of State, in it's destructor, it was trying to close out a font object that was also closed out in the child state class. I moved the font_close() to a new shutdown function in State, insuring that it will only be called once, I also moved the deletes in the App class to the destructor. One more question, if I have a pointer State* _pCurState, but I never instantiate it, do I need to delete that? For example, State* _pMenuState = new State(); State*_pCurState = _pMenuState; delete _pMenuState: Do I need to delete _pCurState? Thanks for all the replies.
  8. deleting pointers in C++

    @crazyfool Thanks for the quick replies. I guess my pseudo code was written poorly. The State pointer is a member of the application class. It is instantiated in the Init function, and then manipulated in Run().
  9. deleting pointers in C++

    I was under the impression that anytime you use the keyword new when instantiating a class, you should use delete to deallocate the memory. I have an Application class that has pointers to another class, State. The Application is constructed and destructed correctly, but the State object is created but never destroyed. Is it automatically destroyed when the program is closed? If so, then shouldn't the destructor for the Application and State class get called? Here is some pseudocode of what I have. Application* g_pGameApp; Main() g_pGameApp = new Application(); g_pGameApp->Init() { State* Menu = new State() } g_pGameApp->Run() { //stuff happens each frame } g_pGameApp->Shutdown() If I try and delete the State in the Application Shutdown it crashes.
  10. Game State Design

    I've used a switch statement before, but the problem I run into is that I need to put a switch statement for each function called every frame. The render function needs a state switch The key input function needs a state switch The update function needs a state switch Each of these would need different results for each state. I just found it to be kinda messy, and hard to add new states. Could I make a new function for each state? like for KeyInputIntro(), KeyInputGame(), etc.
  11. Game State Design

    I read this article on the codeproject.com about Game States. Basically it says each state is its own class. Then a Game State Manager changes states and calls the functions. What do you think about this design? Have you tired something like this or do you have a better design? I guess really I'm looking for tips or suggestions on how to handle game states. Thanks.
  12. Microsotf Visual C++ 2005

    yeah gumpy has the right link, I had the wrong one
  13. Microsotf Visual C++ 2005

    I had the same problem. I found two solutions. 1)Change the runtime library(in the properties->c/c of your project) to Multithreaded or multithreaded debug. Don't use the DLL type. 2)Or if you're like me you need to use the DLL(for SDL or whatever), you need to have the user install the .net framework redistributable,I believe this is the correct link there is a 3rd option, but I don't know if it's legally alright to do. You could just copy the Microsoft.VC80.CRT folder from your \Microsoft Visual Studio 8\VC\redist\x86 folder to your program folder.
  14. dump list box into a string

    Thank you all for the help, this is what I ended up doing. for(int j = 0;j<NumEntries;j++) { //get the length of the indexed element LengthString = SendMessage(playList.hCntrl,LB_GETTEXTLEN,j,0); //get the text of the element and put in tchBuffer SendMessage(playList.hCntrl,LB_GETTEXT,j,(LPARAM) tchBuffer); for(int i = 0;i<LengthString;i++) List << char(tchBuffer[i]); List << "\n\n"; }//no more entries in listbox it is not the most efficient way, but it works
  15. dump list box into a string

    Yes I am able to get an element from the listbox using LB_GETTEXT, it's an array of TCHARs, but I can write that to the file. Thanks. Quote:Write that data you're sending in SendMessage() to a "database"? Isn't that kind of what's happening? I'm sending the message from one database to another. The database being a standard control listbox. I just didn't understand how I could grab and interpret the elements in the listbox.
  • Advertisement