Menu

small issues with flatland 1.3

Help
gorchillo
2005-07-26
2013-03-22
  • gorchillo

    gorchillo - 2005-07-26

    a few hints for beginners trying to play with flatland, also a small reminder for philip to fix these in a future release

    visual studio .net 2003 reports a syntax error in flatland.cpp: ambiguous call to atan(1); the compiler tries to distiguish between double and float variants of atan(); making it 1.0 or 1.0f instead of 1 will resolve this;

    class Object in the file demo.h lacks a virtual destructor; because of this, deleted objects (for example when calling space.pop() in the simple demo) will not be correctly uninitialized, causing a crash in ODE in the debug build; add line "virtual ~Object() {}" to the public section of class Object to fix the problem; it may be a good idea to do the same with Flatland::Object in flatland.h

    stepping through simple.cpp with vstudio 2003 in debug mode is acting wierd: the debugger is always showing the wrong line (ie. other than the one it's about to execute); i don't know why; all other files work fine in this regard, but simple.cpp being likely the first one for a beginner to try and step through, he might give up right there (as i did few months ago)

     
    • Philip Rideout

      Philip Rideout - 2005-07-30

      First, apologies that I didn't respond sooner...

      Thanks for pointing out these issues!

      The atan thing wasn't happening for me because I was using an older VStudio.  I'll be sure to test with both versions from here on out.  And you're definitely right about the missing virtual destructors -- strange that the crash doesn't occur for me.  And the off-by-one stepping problem with simple.cpp is due to some bad end-of-line characters in the file.

      I'll fix all these issues in the next release.  Thanks again!

       
    • Armitage

      Armitage - 2005-11-08

      Does these issues (particularly the atan one) issue has a fix now ?

       
    • Armitage

      Armitage - 2005-11-08

      Sorry i did not see the fix above :|
      Strange forum behaviours, somes link changed when i've post... bheu... Whatever

       

Log in to post a comment.