Advertisement Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

235 Neutral

About nife

  • Rank
  1. nife

    Timing Question

    Also be aware of the leap problem when dealing with QPC:
  2. Hmm, this is actually hard to define, because I too like to have the GUI scaled with the resolution, but not in all games, since in some I actually find it much better to have a smaller GUI, when I run at a higher resolution. So maybe you should make an option "Scale position" / "Scale position and size" or something like that? Of course, the easiest way would be just to choose one, stick with it and stop wondering about this, which probably also makes the best decision in this case...
  3. LOL, I know what I did wrong when I looked at your answer. I placed the typename right before the T instead of in front of the class. But anyways, thank you very much, it made the whole thing possible :D
  4. Hi, I'm looking for a solution to this: template<class T> class Ptr { public: typedef boost::shared_ptr<T> Shared; }; typedef unsigned int Hash; template<class T> class CYNA_API AssetManager { public: typedef std::map<Hash, Ptr<T>::Shared> AssetMap; }; Because the AssetManager gives me the following errors (with GCC 3.4.4) error: type/value mismatch at argument 2 in template parameter list for `template<class _Key, class _Tp, class _Compare, class _Alloc> class std::map' error: expected a type, got ` Ptr<T>::Shared' error: template argument 4 is invalid error: ISO C++ forbids declaration of `AssetMap' with no type I've tried to typename the templates and a couple of other hacks/tips I found on the net, but no luck with either of them, unfortunately :( Thanks in advance...
  5. Listener classes could also be used instead of functors.
  6. Here's some info on RLE, including tutorials and such if you want to try to code the algorithm yourself (although just reading how the algorithm works, like the others already mentioned, will clearify to you what pictures can be shrunk by the use of RLE, just be taking a brief look at it): Wikipedia: RLE
  7. You know that classes and struct's are exactly the same in C++ except for the default member exposition, right? (classes, default private - struct's, default public). EDIT: Woops, wondered about this post for too long to be the first poster :P
  8. nife

    Looking for an IDE

    Quote:Original post by medevilenemy Dev-C++ supports most of that. Yes, but it crashes frequently, or at least on every computer (4-5 by now I guess) I've run it on. That was one of my main reasons for changing to Code::Blocks some time ago. Dev-C++ simply can't keep it up these days.
  9. MSDN: Performance counter value may unexpectedly leap forward
  10. Quote:Original post by Deyja When the preprocessor finds an include encased in <>, it looks for that file in the standard include directories set up with the compiler. So, it was looking for 'C:\program files\msvc7\vc\include\C:\CLASSES\CUSTOMER.H'. Well. We can surely see the problem here, yes? In short: the OP needs to type #include "C:/CLASSES/CUSTOMER.H" instead of <>.
  11. nife

    String to MethodName

    Quote:Original post by Kalthorn So I get a list of the Class methods, drop a ToString() on each one and compare that against the given string? You might want to create a hashmap (or a similar hashing container in C#) of those strings to speed up the process a bit.
  12. Okay, thanks for the answers guys. I guess I need to use an ugly hack to get my idea to compile after all...
  13. Hi, I just have a quick question, I couldn't really find the answer for (after I've tried and tried to solve it myself). I want to make a templated typedef if that's possible? It's because I've come to three possible solutions to my needs: 1. typedef boost::shared_ptr<Class> ClassPtr or class Class { typedef boost::shared_ptr<Ptr>; } 2. template<class T> SharedPtr : public boost::shared_ptr<T> { boost::shared_ptr wrapper implementation } 3. This is the one, I really want but cannot define properly. Something like SharedPtr<Class> (where SharedPtr is just a typedef) which I think could be made as so: typedef template<class T> SharedPtr<T> or template<class T> typedef SharedPtr<T> But since none of these are legal ways to typedef a templated class, I'm asking if I can do it the way I want, or do I have to use one of the other methods? EDIT: The reason for wanting to use a typedef in this case is that I am able to replace it with another implementation or my own later if needed.
  14. nife

    Released beta version of my game

    Looks good, although the link is broken as said above. Here's the actual link to the beta (reconstructed it myself :P)
  15. nife

    Timing information in C++

    Quote:Original post by Extrarius Use timeBeginPeriod with timeGetTime for ~1ms accuracy timeBeginPeriod(1) that is ;) And call timeEndPeriod(1) in termination of the program to ensure Windows standard timing frequencies hereafter.
  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. 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!