{"push_id":555857024,"size":27,"distinct_size":3,"ref":"refs/heads/master","head":"866b3121b62af86a76f9004597e57900a2fa8fb1","before":"28ad03656fa05ae79e8f659115cb3710f764c5ff","commits":[{"sha":"cb85fb6021a7d1a9785b7f4b1c8dd5220feb40c6","author":{"email":"f5e3aea00e688759cad65efbc8f2cd54bdee3cc2@gmail.com","name":"Noam Chitayat"},"message":"Porting project to Lua 5.2\n\nUpdated CMakeLists.txt to use FindLua instead of FindLua51.\nUpdated LuaWrapper to the latest version.\nAdded necessary new params to Lua 5.2 API calls.","distinct":false,"url":"https://api.github.com/repos/noam-c/EDEn/commits/cb85fb6021a7d1a9785b7f4b1c8dd5220feb40c6"},{"sha":"f79fe5852ae40508b9a8073e19aac9700fb0859a","author":{"email":"f5e3aea00e688759cad65efbc8f2cd54bdee3cc2@gmail.com","name":"Noam Chitayat"},"message":"Supporting return values in async script functions\n\nPlumbs through the ability for script functions (particularly\nasynchronous ones) to return a set of results instead of always having\nno return value.\n\nThis change introduces a CoroutineResults object which basically acts\nas a tuple of return values for a given Task. When a Task is signaled\nfor completion, a component can choose to give it any amount of result\nvalues, which it will then store. A Coroutine can then retrieve and\niterate over the results before resuming (for example, a Script can\npush all the parameters onto the Lua stack as return values to a script\nfunction call before resuming the Lua coroutine).\n\nWhile doing this, also added waitForFinish support to the Actor Move\nfunction. The function was used as a test bed for the new code, but it\nhas nothing meaningful to return. Still, the wait seems useful so I’m\nkeeping that in there. To facilitate this, I refactored some of the\nfunctionality in ScriptFunctions.cpp so that it could be used by script\nfunctions in other classes.","distinct":false,"url":"https://api.github.com/repos/noam-c/EDEn/commits/f79fe5852ae40508b9a8073e19aac9700fb0859a"},{"sha":"20cdcf8fe31c109aecfb9dafb5b14b8d83610b2b","author":{"email":"f5e3aea00e688759cad65efbc8f2cd54bdee3cc2@gmail.com","name":"Noam Chitayat"},"message":"Updating copyrights, removing trailing spaces\n\nUpdated all the code copyrights to 2015 (important).\nRemoved all trailing whitespace by replacing the regular expression\n“\\s+\\n” with “\\n” (not important at all ;) ).","distinct":false,"url":"https://api.github.com/repos/noam-c/EDEn/commits/20cdcf8fe31c109aecfb9dafb5b14b8d83610b2b"},{"sha":"ccf810859b9532c2cbebd0088beb2388ad0f3488","author":{"email":"f5e3aea00e688759cad65efbc8f2cd54bdee3cc2@gmail.com","name":"Noam Chitayat"},"message":"Holding Space no longer skips past dialogue\n\nPreviously, if you held Space to speed up the dialogue scrolling, it\nwould move on to the next line as soon as the end of the current line\nwas encountered. This is because Space is held and causing repeated\nSDL_KEYDOWN events. Checking if the event is a repeat before moving on\nto the next line fixes this issue.","distinct":false,"url":"https://api.github.com/repos/noam-c/EDEn/commits/ccf810859b9532c2cbebd0088beb2388ad0f3488"},{"sha":"006a121a00435d52708ed6c827f9a1e1cf60f2ba","author":{"email":"f5e3aea00e688759cad65efbc8f2cd54bdee3cc2@gmail.com","name":"Noam Chitayat"},"message":"Refactor Tile Engine GUI into Overlay class\n\nFor the upcoming choice menu work, it will be important to more clearly\nseparate the UI elements of the Tile Engine into a dedicated component,\nso that the logic for managing the debug console, shortcut bar, and\ndialogue box can be detangled from the management of the UI elements\nthemselves.","distinct":false,"url":"https://api.github.com/repos/noam-c/EDEn/commits/006a121a00435d52708ed6c827f9a1e1cf60f2ba"},{"sha":"c29f75b55c5b446c6d92d0ef019a15be73f89f3b","author":{"email":"f5e3aea00e688759cad65efbc8f2cd54bdee3cc2@gmail.com","name":"Noam Chitayat"},"message":"Moving some files to subfolders\n\nCreated a Controls folder for common Controls that aren’t part of the\nMenu. This currently includes the debug console window and will come to\ninclude other cross-state controls like the dialogue box control.\n\nAlso moved some utility classes in the src/ folder into the utils\nsubfolder as appropriate.","distinct":false,"url":"https://api.github.com/repos/noam-c/EDEn/commits/c29f75b55c5b446c6d92d0ef019a15be73f89f3b"},{"sha":"60b1eeccfdd80705290bb3d0f4e8ea97382f75f6","author":{"email":"f5e3aea00e688759cad65efbc8f2cd54bdee3cc2@gmail.com","name":"Noam Chitayat"},"message":"Text event support, and updating debug console\n\nAdded text input support for Rocket elements using the SDL Text Input\nevent. This fixes the issue where the debug console didn’t respond to\ntext input at all.\n\nAlso updated the debug console to send a DebugCommandMessage through a\ngiven message pipe instead of using the SDL event queue. This means the\nevent will be processed in the same frame, which is fine. The major\nupshot of this is that the message is easier to create and interpret,\nand doesn’t leave any dangling resources to clean up.","distinct":false,"url":"https://api.github.com/repos/noam-c/EDEn/commits/60b1eeccfdd80705290bb3d0f4e8ea97382f75f6"},{"sha":"09d724caee15eb481b2f2ab5ebcefa4f70592da9","author":{"email":"f5e3aea00e688759cad65efbc8f2cd54bdee3cc2@gmail.com","name":"Noam Chitayat"},"message":"Renaming Controls/ to views/, adding controllers/\n\nMoved DialogueController to a common controllers subdirectory, and\nrenamed Controls to “views” in order to disambiguate the two subfolders.","distinct":false,"url":"https://api.github.com/repos/noam-c/EDEn/commits/09d724caee15eb481b2f2ab5ebcefa4f70592da9"},{"sha":"87472bb4e66bf09dc8d66cdc33f7cfcca276ab3a","author":{"email":"f5e3aea00e688759cad65efbc8f2cd54bdee3cc2@gmail.com","name":"Noam Chitayat"},"message":"Introducing common RCSS classes\n\nAside from the libRocket-provided base.rcss, there was a need for\ncommon “utility classes” across all of EDEn’s RML pages. Added a\ncommon.rcss stylesheet for these classes and included it in all\nexisting RML files.","distinct":false,"url":"https://api.github.com/repos/noam-c/EDEn/commits/87472bb4e66bf09dc8d66cdc33f7cfcca276ab3a"},{"sha":"ab23276e5b9aa17a4049dd8f788931ff08cff463","author":{"email":"f5e3aea00e688759cad65efbc8f2cd54bdee3cc2@gmail.com","name":"Noam Chitayat"},"message":"Separating dialogue box GUI from controller\n\nStandard view/logic separation. Refactored all the view-specific parts\nof DialogueController into a separate DialogueBox view, which is now\nconstructed outside of the controller and passed to it.\n\nIn the TileEngine’s case, the dialogue box is constructed in the tile\nengine overlay, where the overlay itself now loads the RML and then\ngives the dialogue box a specific RML element to manage.\n\nAlso tweaked the dialogue controller to create Line objects directly in\nthe line queue, instead of creating unique_ptrs, removing some of the\nindirection there. To make sure that Lines were allocated and assigned\ncorrectly, it helped to be more explicit about the rule that Tasks\ncan’t be copied, so I formalized this in the Task object.","distinct":false,"url":"https://api.github.com/repos/noam-c/EDEn/commits/ab23276e5b9aa17a4049dd8f788931ff08cff463"},{"sha":"726e0d52405bfea9e0c4226930e4508d31438a66","author":{"email":"f5e3aea00e688759cad65efbc8f2cd54bdee3cc2@gmail.com","name":"Noam Chitayat"},"message":"Renaming dialogueBox.rml to tileEngineOverlay.rml","distinct":false,"url":"https://api.github.com/repos/noam-c/EDEn/commits/726e0d52405bfea9e0c4226930e4508d31438a66"},{"sha":"d129445b7360691f97d5ba89fdd89ac86a85a6b2","author":{"email":"f5e3aea00e688759cad65efbc8f2cd54bdee3cc2@gmail.com","name":"Noam Chitayat"},"message":"Moving Line out of DialogueController\n\nThe Line (now known as DialogueEntry) class will soon be a bit more\ncomplex; enough that it should be placed in a separate file from the\nDialogueController to improve readability.","distinct":false,"url":"https://api.github.com/repos/noam-c/EDEn/commits/d129445b7360691f97d5ba89fdd89ac86a85a6b2"},{"sha":"41eabbe8cd5627cc72034fda79d81ca0150a38b7","author":{"email":"f5e3aea00e688759cad65efbc8f2cd54bdee3cc2@gmail.com","name":"Noam Chitayat"},"message":"Fixes TileEngine leak, crash on second game start\n\nThis was a fun one.\n\nIf you hit “New Game”, play a bit (or don’t), then press Escape to go\nback to the Main Menu, then hitting “New Game” again causes a crash.\nThis happens because libRocket notices that the TileEngine Rocket\ncontext wasn’t cleaned up, and so it doesn’t allocate a second one by\nthe same name. It returns null, causing a segmentation fault when the\ncontext object is inevitably used.\n\nThe reason that the Rocket context is still hanging around is because\nTileEngine doesn’t get cleaned up. Of course, since TileEngine is\nallocated as a shared_ptr, the most likely culprit was a shared_ptr\ncycle with TileEngine as a member.\n\nHowever, upon searching the codebase, it seemed that all shared_ptr\ninstances that would hold the TileEngine are temporary parameters. Only\nthe ExecutionStack holds a shared_ptr to the TileEngine (in the state\nqueue), and the ScriptEngine only holds a weak_ptr to it.\n\nOf course, after putting in a lot of breakpoints, and starting to\nremove code, it became clear that the extra mystery reference was only\nadded if a script ran. And more specifically, the extra reference was\nonly added if a script coroutine was run and it called “setRegion”!\n\nIt turns out that setRegion called m_tileEngine.lock() to create a\nlocal shared_ptr to TileEngine. Normally, this would clean up by\nitself. Normally. TileEngine::setRegion can lead to a Map script being\ncalled, which would ultimately cause the caller of setRegion to yield.\nLua’s yield function is implemented using a longjmp instruction, which\nmeans that the program never returns to the end of setRegion’s call,\nand thus never removes the shared_ptr instance!\n\nSo yes, boys and girls, even a temporary shared_ptr can leak. If you’re\ngoing to call a function that has even a remote chance of calling\n“longjmp”, make sure you’ve cleaned up your dangling resources and\nshared_ptrs before making the call.\n\nChanged the setRegion, narrate and say functions to get a raw pointer\nto the TileEngine, allowing the temporary shared_ptr go out of scope,\nand only *then* call the potentially yielding function inside the\nTileEngine via the raw pointer.\n\nDefinitely one of the most subtle and interesting bugs I’ve seen, but\nI’d love to have those hours of my life back.","distinct":false,"url":"https://api.github.com/repos/noam-c/EDEn/commits/41eabbe8cd5627cc72034fda79d81ca0150a38b7"},{"sha":"dce0540a77fbec88e0a244f571253a1debd47f5d","author":{"email":"f5e3aea00e688759cad65efbc8f2cd54bdee3cc2@gmail.com","name":"Noam Chitayat"},"message":"Adding utility to retrieve Lua string array params\n\nAdds a simple utility to go through a Lua sequence (a table with a run of positive integer keys) and extract the strings inside.","distinct":false,"url":"https://api.github.com/repos/noam-c/EDEn/commits/dce0540a77fbec88e0a244f571253a1debd47f5d"},{"sha":"0fafb4dd24d6f49a5b389a217c492624a05d2838","author":{"email":"f5e3aea00e688759cad65efbc8f2cd54bdee3cc2@gmail.com","name":"Noam Chitayat"},"message":"Improve Rocket binding query selection flexibility\n\nEdenRocketBindings supported query selection from a document given an\nRML element ID. The scope of this functionality has been widened to\nsupport ID selection from any RML element container to its descendants.","distinct":false,"url":"https://api.github.com/repos/noam-c/EDEn/commits/0fafb4dd24d6f49a5b389a217c492624a05d2838"},{"sha":"4160ccda70d8928baacbe71f9a899737c74f5bb2","author":{"email":"f5e3aea00e688759cad65efbc8f2cd54bdee3cc2@gmail.com","name":"Noam Chitayat"},"message":"Tasks now support lvalue results\n\nThe current implementation of Task::complete only takes rvalue\nreferences, which rules out lvalue copies of primitives (such as int\nresults). This small change makes Task::complete a little more\nopen-minded so that lvalue primitives can be sent to it without fail.","distinct":false,"url":"https://api.github.com/repos/noam-c/EDEn/commits/4160ccda70d8928baacbe71f9a899737c74f5bb2"},{"sha":"1085908330758407365aafd67e5cf0fc6a6135cd","author":{"email":"f5e3aea00e688759cad65efbc8f2cd54bdee3cc2@gmail.com","name":"Noam Chitayat"},"message":"Adding choice list support to dialogues\n\nTL;DR — this change adds support for, and an example of, choice menus\nin dialogue boxes, along with mouse support for choice selections.\n\nThis change adds “choices” as a parameter to the ‘say’ and ‘narrate’\nfunctions in Lua. These functions can now be used to take a string\narray of choices to present to the user. Many of the changes in this\ncommit are plumbing this “choices” parameter through to the\nDialogueController, which constructs DialogueEntry objects with\noptional choice lists, and ensuring that entries that present choices\ncan’t be skipped past without a choice first being selected by the\nplayer.\nThis change also makes all the necessary UI changes to support choices\nappearing in the dialogue box, as well as mouse input for selecting one\nof the choices that appears. This includes adding the choice menu to\nthe RML, adding input handlers to the view class, making the dialogue\nbox operate on a div inside the overlay document instead of the entire\ndocument itself (since it will support other UI pieces in the future),\nas well as some additional RCSS polish. Finally, a ChoicesDataSource\nwas introduced so that the choices wouldn’t need to be added to the RML\nmanually by the DialogueBox class.","distinct":false,"url":"https://api.github.com/repos/noam-c/EDEn/commits/1085908330758407365aafd67e5cf0fc6a6135cd"},{"sha":"33c68be6927f6fdc62f0d181a3097178a9b4a7c9","author":{"email":"f5e3aea00e688759cad65efbc8f2cd54bdee3cc2@gmail.com","name":"Noam Chitayat"},"message":"Small optimizations for ExecutionStack code\n\nRemoved an unused field in GameState, and made some ExecutionStack\nfunctions prefer references to shared pointers instead of copies of\nthem, to cut out a couple of extra shared_ptr allocations.","distinct":false,"url":"https://api.github.com/repos/noam-c/EDEn/commits/33c68be6927f6fdc62f0d181a3097178a9b4a7c9"},{"sha":"5543be69dd4ab257484645c6eb8d0fb6bacf5669","author":{"email":"f5e3aea00e688759cad65efbc8f2cd54bdee3cc2@gmail.com","name":"Noam Chitayat"},"message":"Use std::move to assign shared_ptrs passed by copy\n\nA lot of method signatures in the code indicate that a shared_ptr needs\nto be passed to them by copy. Although this constructs an additional\nshared_ptr instance, it clarifies the intention of these functions to\nhold ownership of these resources after the execution of the function\n(e.g. constructors). However, it’s a little less than\noptimal since the shared_ptr copying causes atomic\nincrements/decrements. A fix to this issue is to use std::move on the\nshared_ptr copies when storing\nthem to reduce the cost of each shared_ptr field assignment.","distinct":false,"url":"https://api.github.com/repos/noam-c/EDEn/commits/5543be69dd4ab257484645c6eb8d0fb6bacf5669"},{"sha":"2d1e4ac4ad7a0f3c1f65d825bb912a90d4ab9c47","author":{"email":"f5e3aea00e688759cad65efbc8f2cd54bdee3cc2@gmail.com","name":"Noam Chitayat"},"message":"Transitions take Textures instead of GameStates\n\nTransitionStates no longer deal with capturing ScreenTextures, and\ninstead just take arbitrary Textures to transition between.\nScreenTextures now expose a helper to take a snapshot of a GameState.","distinct":false,"url":"https://api.github.com/repos/noam-c/EDEn/commits/2d1e4ac4ad7a0f3c1f65d825bb912a90d4ab9c47"}]}