Advertisement Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

250 Neutral

About Kurioes

  • Rank
  1. Kurioes

    Recomended image format?

    Quote:Original post by Kylotan Anybody used the JPG2000 format? Arguably fewer artifacts than normal JPGs at a given compression level. Dunno how many libraries support it however. For the highest quality though, PNG is definitely the way to go. Run them all through PNGCrush to help further with the size. I'm using JPG2000; it supports alpha channels and lossless encoding. Furthermore it's by far superior to JPEG (JPG2000 images look way better than JPEG images at the same file size). Photoshop CS appears to be able to save and load JPG2000 images (there's a plug-in on the CD according to this tech support document). You could also use a program called ImageAnalyzer to load and save them but you won't get a preview and I'm unsure if it supports alpha channels. You can use the JasPer library to load and save JPG2000 (and a few other file formats) in your own projects. It's here. If anyone needs an example of how to actually use JasPer I can refer you to my library, KBL; it can load (not save) .jp2 images (for alpha channels you'd need jpc; I'm working on it). The source is here; The files of interest are codec.h and codec.cpp I hope this'll be of use to anyone.
  2. Kurioes

    header unhappyness

    You could try forward-declaring CNes just before defining CSetting; // in setting.h ... class CNes; class CSetting { // ... }; Maybe that works...
  3. Kurioes

    Entry #231

    Heh liek teh omg nice to see it works now ;)
  4. It looks like only half of the triangles is facing the wrong way... try flipping half of them. (i.e. float L = -1.0f * sqrtf... in one of the two "chunks" of code). Did that do anything?
  5. Kurioes

    smart pointer trouble

    Yes I did. The errors were probably generated by something else (my smart pointer class contains sone other operators and member functions). You could take a look at it if you want; the URL is in my first post. p.s. It'll probably take a while (> day) for me to reply (provided I don't forget completely).
  6. Kurioes

    smart pointer trouble

    This subject is giving me a headache... I'm pretty sure this problem is solvable, but I decided reference counting is not the way to go for what I'm doing (a GUI... refcounting every control is kind of stupid and unnecesary). I really only need the smart pointers for recourse management - I don't even need typecasting. Thanks for all your help! (rate++) I'm still interested in the solution though, or some good articles about templates (I'm considering buying this book;
  7. Kurioes

    smart pointer trouble

    Quote:Original post by Tim Cowley Alternatively, add a... *** Source Snippet Removed *** your smart pointer declaration. It's not pretty, but it keeps your code safe (const-correct) and relieves you of the responsibility of making endless friend declarations. I can't do that; it would expose the pointer which, I want to avoid :( EDIT: i.e. "delete smartptr.GetPtr();" would mess up my reference counting.
  8. Kurioes

    smart pointer trouble

    I tried it; the compiler complains that there is no acceptable conversion and something about ambiguous constructors :( I could easily hack my way out by defining the () operator ( operator T*() ) but hiding the pointer is the point (pun not intended) of a smart pointer.
  9. Kurioes

    smart pointer trouble

    I tried it; the compiler complains that I cannot access nt's private member mPtr (which, in my case, indeed is private). Is there a workaround for this problem? Nearly there though... Thanks!
  10. I made a smart pointer (that does reference counting), and I'd like to do the following; Suppose I have a class CFoo, and a class derived from CFoo named CBar. I have two smart pointers; SmartPtr<CFoo> foo and SmartPtr<CBar> bar. Suppose bar holds a valid pointer. My (templated) smart pointer can't do this; foo = bar Is there any way to solve this? If so, how? My smart pointer (cRefHandle, bottom of file) definition can be found at Any help is welcome!
  11. That fixed it! Thanks. Rating++ for you.
  12. I have a class that is a handle to a refcounted object. When the class goes out of scope, it decreases the object's refcount. Upon being assigned another pointer the new object's refcount is increased (the previous object, if it exists, is released first). Now I have an stl::vector of these refhandles. If I push_back a refhandle, the object's refcount isn't being increased (nor is it being decreased when the vector goes out of scope). Is there any way of fixing this (for example with a custom allocator)? Maybe I'm going at this the wrong way... any suggestions? The offending code can be found at* For *, substitute "kbl/base/refcount.h" for the refhandle's code, or "kbl/gui/controls/container.h" for the vector's declaration (~ line 48; "typedef cRefHandle<cComponent> h_component_t;") Note that ".../kbl/kbl/..." should be in the URL (not a typo). Alternatively you could check out the latest revision using subversion. Thanks for any help and / or advice!
  13. Kurioes

    Another matrix identity

    A * AT = I Only if A is an orthagonal matrix. Generally, AT != A^-1. (EDIT: in reply to the previous poster)
  14. I'm okay with the links as long as I can still block them the way I do now. I'm never going to be interested in anything they offer anyway. Ads just annoy me (I adblock all of them).
  15. Kurioes

    Help Please

    To fix the errors go to the line numbers Dev-Cpp reports as being erroneous, and try to spot the error at that line (you got the core from the book, right?). If the error is not in the line Dev-Cpp says, it usually is before that line. Check for missing quotes, brackets and ()'s, and check if you didn't mix up ; and :. That should solve most of them I think.
  • 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!