{"head":"07cbaaff5b67bb91508449c46df7c74e810daeb5","size":19,"push_id":44024245,"shas":[["44c11973c88eff58658a80f37dfa8a193c0757ff","dde609ec6bf5a655765a3f767551062849849f01@chrisfrisz.com","Removed Observer class compilation and linking from the Makefile.\n\nThe Observer class compiles without error (though it is untested), but\nit's not currently used in the project (it's eventually going to be\nused for Settings objects and possibly in the device\ninterface). Previously the Makefile attempted to link the compiled\nObserver into the final executable, but since it's not used would\nproduce linker errors related to missing vtable values (or something\nlike that).","Chris Frisz"],["c5cbc55aad41760fc1cc4124edd49dda04f5f13a","dde609ec6bf5a655765a3f767551062849849f01@chrisfrisz.com","Corrected the initialization for the static Clock pointer in the Clock\nclass.\n\nIt was originally in the header file, but of course that led to\nmultiple definition errors. The initialization is now done at the\nbeginning of the implementation in Clock.cpp. This solves the linker\nerror.","Chris Frisz"],["78b4e683bb6ec9a42ae24e64b245568bdbca1e8d","dde609ec6bf5a655765a3f767551062849849f01@chrisfrisz.com","Adding an output operator to the TimeStamp class.\n\nThe TimeStamp can now print its contents labeled by time resolution as\na single line. It's yet untested but compiles.","Chris Frisz"],["1e2f503afce6a346e72cdce0c5e14e817855872f","dde609ec6bf5a655765a3f767551062849849f01@chrisfrisz.com","Adding a clause to the .gitignore to ignore the final evolver executable.","Chris Frisz"],["8d74a6561bcb73936bb7778c76ccf645412c1a4c","dde609ec6bf5a655765a3f767551062849849f01@chrisfrisz.com","Adding missing definition for updateMilliseconds to Clock class.\n\nSomehow I managed to forget to add this function. It's there now","Chris Frisz"],["c4f91364260535ac64fc50daec0932aa269320ba","dde609ec6bf5a655765a3f767551062849849f01@chrisfrisz.com","Adding -lm to build flag for the evolver executable.\n\nThe quick and dirty way that I'm currently updating the global Clock\nfrom SFML requires the \"fmod\" function from the C math library. Of\ncourse this requires the -lm flag to be passed to the compiler.","Chris Frisz"],["8fc3816676cc07bf5c5a98da448ad6b73701ca3e","dde609ec6bf5a655765a3f767551062849849f01@chrisfrisz.com","Adding the Timer interface (inheriting Timer) to the TextMove\nMoveBehavior class for testing purposes.\n\nTextMove inherits the Timer class and on each key press prints the\ntime elapsed since the previous key press. This fairly effectively\ntests the TimeStamp, Clock, and Timer classes.","Chris Frisz"],["c6659f176cc86548747a4b565f56d276c85eadaf","dde609ec6bf5a655765a3f767551062849849f01@chrisfrisz.com","Fixing several small bugs in TimeStamp.\n\nThe copyTimeStamp function failed to copy over the millisecond value\nfrom the original TimeStamp. Additionally the normalization function\nperformed a bitwise AND instead of modulus division which has been\ncorrected.","Chris Frisz"],["78ed15ec74062aa07b6de8ca76f7e7a3a5c13c0e","dde609ec6bf5a655765a3f767551062849849f01@chrisfrisz.com","Correcting elapsedTime function in Timer.\n\nThe elapsedTime function, returning the elapsed time as a TimeStamp\nobject, failed to properly allocate a new TimeStamp object. This has\nbeen fixed.","Chris Frisz"],["6c840f0ae463cc8ff99654ff06cfe5c3c1d90768","dde609ec6bf5a655765a3f767551062849849f01@chrisfrisz.com","First-draft changes to have evolver's global Clock object to be\nupdated by SFML's GetElapsedTime function.\n\nThe main loop in evolverSF.cpp gets the elapsed frame time via the\nsf::Window::GetFrameTime function as a float and splits it into its\ninteger and float parts, converts the float part to a millisecond\ninteger value and passes both values to the Clock.","Chris Frisz"],["f4d1d4f3a9e74a6124e61126dd3baa1b48900b12","dde609ec6bf5a655765a3f767551062849849f01@chrisfrisz.com","Lowerint the resolution of the test program. It's easier to see terminal output that way.","Chris Frisz"],["25b5a2fcb261c497fe16659fed5a873edc8b75a3","dde609ec6bf5a655765a3f767551062849849f01@chrisfrisz.com","Changing behavior of TextMove to print full TimeStamp of elapsed time.\n\nThe TextMove MoveBehavior descendant previously printed the elapsed\nmilliseconds since the last move event. So as to test the output\noperator for TimeStamps, it will now print the full time resolution of\nthe elapsed time.","Chris Frisz"],["6dc9d7b34ec35da44aafa3bd2b1f9fdf530e5edf","dde609ec6bf5a655765a3f767551062849849f01@chrisfrisz.com","Changing implementation of the elapsed time member functions for the\nTimer to be based on the TimeStamp generated by elapsedTime.\n\nPreviously the elapsed time functions calculated the elapsed time\nindependently of one another. It turns out that didn't make sense when\nthere was already a way to get the full time difference resolution\nfrom the TimeStamp's functionality. Thus all the individual elapsed\ntime functions (hours, minutes, seconds, milliseconds) operate in\nterms of elapsedTime, which returns a TimeStamp of the elapsed time.","Chris Frisz"],["4e7ca8eb0a6662dbb4fc52c0c3ca05f97690679d","dde609ec6bf5a655765a3f767551062849849f01@chrisfrisz.com","Changing Timer constructor to initialize the mark member variable using the TimeStamp copy constructor.","Chris Frisz"],["3127729e664d4d0833cd74611d5806ca4419db73","dde609ec6bf5a655765a3f767551062849849f01@chrisfrisz.com","Fixing declaration for TimeStamp operator<< exceeding 72 characters.","Chris Frisz"],["a79529817374cb340b59103e2016adacf94f5ac1","dde609ec6bf5a655765a3f767551062849849f01@chrisfrisz.com","Changing TimeStamp normalization to take care of the case where fields\nare negative.\n\nPreviously TimeStamp only correctly normalized each field as it could\nbe reduced to a larger one (i.e. 1035 milliseconds would result in an\nincrement by one to the number of seconds and changing the\nmilliseconds field to 35). Now normalization also attempts to use an\nalgorithm akin to elementary school subtraction to \"borrow\" from a\nlarger field to bring the smaller field to zero or above (i.e. a\nmillisecond value of -2023 will be normalized to 77, decrementing\nthree from the seconds field).\n\nThis of course makes the assumption that a TimeStamp has an overall\npositive value. That is, when normalized all fields are 0 or\nabove. Otherwise the normalization will lead to a TimeStamp with an\nessentially nonsensical value including a negative \"hours\" field. This\nshould only result from stupid values passed to the setter functions\nof the TimeStamp or subtracting a later/larger TimeStamp from an\nolder/smaller one. Both of these situations make little sense and\nshould not occur if any reason is used by the programmer. However,\nthis probably indicates that it would be a good idea to change the\nsetter functions and subtraction operator for TimeStamps to throw\nexceptions for illegal inputs.","Chris Frisz"],["b772a05e1251e5d0dd0256d0f572e3e31c80ccac","dde609ec6bf5a655765a3f767551062849849f01@chrisfrisz.com","Changing TimeStamp argument to the output operator (<<) to const.\n\nThis isn't strictly necessary, but it lets anyone examining the\ninterface that the TimeStamp input will not be changed by the\nobservation of it.","Chris Frisz"],["ab2b80831b3a853a29f259c6ac0f18c3302a33fd","dde609ec6bf5a655765a3f767551062849849f01@chrisfrisz.com","Changing the behavior of TimeStamp addition and subtraction to not be\nbroken.\n\nPreviously the addition and subtraction operators for TimeStamps used\na one-liner trick involving the complex assignment forms (+= and -=)\nalong with the sopy constructor based on code I had seen\nonline. Whether my use of pointers differs from those assumed by the\narticle I was reading or the author was just suggesting crappy code,\nthe TimeStamp instance returned from the copy constructor was getting\ndestroyed before its pointer was passed out of the call to the\narithmetic operator. Thus I was getting junk values when using the\narithmetic operators even though the logic involved was overall sound.\n\nNow a less ephemeral instance is created and returned to the caller,\nseeming to solve the problem.","Chris Frisz"],["07cbaaff5b67bb91508449c46df7c74e810daeb5","dde609ec6bf5a655765a3f767551062849849f01@chrisfrisz.com","Changing the ordering of events in the main loop and simplifying the\nClock update in the main loop.\n\nI'm not convinced that this actually changes anything, but the serious\ncomputations by the engine have been moved to the beginning of the\ninfinite main loop, moving the SFML-related event handling and drawing\nto the end. This groups the high-priority computations together since\nthe engine shouldn't rely on event handling for important,\ntime-sensitive operations and, of course, drawing is always done last.\n\nAdditionally I realized that breaking the float returned from\nsf::Window::GetFrameTime() into its integer and fractional parts was\nunnecessary thanks to the normalization performed by the TimeStamp\nclass and so it has been reduced to simply updating the clock in terms\nof the frame time given in milliseconds.\n\nOne side note to all of this: my reason for making these changes was\nto do some slight optimization for the time-sensitive operations so\nthat they would occur together. I did this because the logic for\ncalculating elapsed time between events via the Timer interface seems\nto be working correctly. However, the printing from TextMove indicates\nthat the time difference between every second or third event is\nnegative which of course can't happen. For the moment I'm going to\nignore this sinc it might be an artifact of the I/O for printing\nduring the events which may be slower than the event firing. However,\nshould it rear its head again, hopefully I will remember this.","Chris Frisz"]],"ref":"refs/heads/clock"}