{"action":"created","comment":{"url":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/comments/144702848","pull_request_review_id":69401294,"id":144702848,"diff_hunk":"@@ -0,0 +1,553 @@\n+// Copyright 2017 Dolphin Emulator Project\r\n+// Licensed under GPLv2+\r\n+// Refer to the license.txt file included.\r\n+\r\n+#pragma once\r\n+\r\n+#include \"LuaScripting.h\"\r\n+\r\n+#include <algorithm>\r\n+#include <fstream>\r\n+#include <string>\r\n+#include <wx/button.h>\r\n+#include <wx/frame.h>\r\n+#include <wx/menu.h>\r\n+#include <wx/panel.h>\r\n+#include <wx/sizer.h>\r\n+#include <wx/textctrl.h>\r\n+#include \"Core\\Core.h\"\r\n+#include \"Core\\HW\\GCPad.h\"\r\n+#include \"Core\\HW\\GCPadEmu.h\"\r\n+#include \"Core\\Movie.h\"\r\n+#include \"DolphinWX/Main.h\"\r\n+#include \"DolphinWX/WxUtils.h\"\r\n+#include \"Frame.h\"\r\n+#include \"InputCommon\\InputConfig.h\"\r\n+\r\n+namespace Lua\r\n+{\r\n+int printToTextCtrl(lua_State* L);\r\n+int frameAdvance(lua_State* L);\r\n+int getFrameCount(lua_State* L);\r\n+int getMovieLength(lua_State* L);\r\n+int softReset(lua_State* L);\r\n+\r\n+// Slots from 0-99.\r\n+int saveState(lua_State* L);\r\n+int loadState(lua_State* L);\r\n+\r\n+// The argument should be a percentage of speed. I.E. setEmulatorSpeed(100) would set it to normal\r\n+// playback speed\r\n+int setEmulatorSpeed(lua_State* L);\r\n+\r\n+int getAnalog(lua_State* L);\r\n+int setAnalog(lua_State* L);\r\n+int setAnalogPolar(lua_State* L);\r\n+int getCStick(lua_State* L);\r\n+int setCStick(lua_State* L);\r\n+int setCStickPolar(lua_State* L);\r\n+int getButtons(lua_State* L);\r\n+int setButtons(lua_State* L);\r\n+int setDPad(lua_State* L);\r\n+int getTriggers(lua_State* L);\r\n+int setTriggers(lua_State* L);\r\n+\r\n+// GLOBAL IS NECESSARY FOR LOG TO WORK\r\n+LuaScriptFrame* currentWindow;\r","path":"Source/Core/DolphinWX/LuaScriptFrame.cpp","position":56,"original_position":56,"commit_id":"29c2c0c5daee67b3ca47ba36fe924b10161d9cc2","original_commit_id":"29c2c0c5daee67b3ca47ba36fe924b10161d9cc2","user":{"login":"lioncash","id":712067,"avatar_url":"https://avatars1.githubusercontent.com/u/712067?v=4","gravatar_id":"","url":"https://api.github.com/users/lioncash","html_url":"https://github.com/lioncash","followers_url":"https://api.github.com/users/lioncash/followers","following_url":"https://api.github.com/users/lioncash/following{/other_user}","gists_url":"https://api.github.com/users/lioncash/gists{/gist_id}","starred_url":"https://api.github.com/users/lioncash/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lioncash/subscriptions","organizations_url":"https://api.github.com/users/lioncash/orgs","repos_url":"https://api.github.com/users/lioncash/repos","events_url":"https://api.github.com/users/lioncash/events{/privacy}","received_events_url":"https://api.github.com/users/lioncash/received_events","type":"User","site_admin":false},"body":"What makes this necessary?","created_at":"2017-10-14T20:28:15Z","updated_at":"2017-10-14T21:05:00Z","html_url":"https://github.com/dolphin-emu/dolphin/pull/6117#discussion_r144702848","pull_request_url":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/6117","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/comments/144702848"},"html":{"href":"https://github.com/dolphin-emu/dolphin/pull/6117#discussion_r144702848"},"pull_request":{"href":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/6117"}}},"pull_request":{"url":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/6117","id":146579632,"html_url":"https://github.com/dolphin-emu/dolphin/pull/6117","diff_url":"https://github.com/dolphin-emu/dolphin/pull/6117.diff","patch_url":"https://github.com/dolphin-emu/dolphin/pull/6117.patch","issue_url":"https://api.github.com/repos/dolphin-emu/dolphin/issues/6117","number":6117,"state":"open","locked":false,"title":"Lua scripting (Gamecube only)","user":{"login":"NickDriscoll","id":8892329,"avatar_url":"https://avatars3.githubusercontent.com/u/8892329?v=4","gravatar_id":"","url":"https://api.github.com/users/NickDriscoll","html_url":"https://github.com/NickDriscoll","followers_url":"https://api.github.com/users/NickDriscoll/followers","following_url":"https://api.github.com/users/NickDriscoll/following{/other_user}","gists_url":"https://api.github.com/users/NickDriscoll/gists{/gist_id}","starred_url":"https://api.github.com/users/NickDriscoll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NickDriscoll/subscriptions","organizations_url":"https://api.github.com/users/NickDriscoll/orgs","repos_url":"https://api.github.com/users/NickDriscoll/repos","events_url":"https://api.github.com/users/NickDriscoll/events{/privacy}","received_events_url":"https://api.github.com/users/NickDriscoll/received_events","type":"User","site_admin":false},"body":"This branch adds a Lua console and Lua scripting capabilities to the Dolphin Emulator.\r\n\r\nSee the documentation on how to write scripts for Dolphin [Here](https://github.com/NickDriscoll/dolphin/blob/Lua_scripting/Lua.md)\r\n\r\nIt's GameCube only for now simply because I've had to sift through the source code myself to discern how Dolphin works, and I couldn't figure out Wiimotes.","created_at":"2017-10-14T01:05:24Z","updated_at":"2017-10-14T21:05:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e965b6be66763fa1311d1e547a5026e25cfe1c05","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/6117/commits","review_comments_url":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/6117/comments","review_comment_url":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dolphin-emu/dolphin/issues/6117/comments","statuses_url":"https://api.github.com/repos/dolphin-emu/dolphin/statuses/29c2c0c5daee67b3ca47ba36fe924b10161d9cc2","head":{"label":"NickDriscoll:Lua_scripting","ref":"Lua_scripting","sha":"29c2c0c5daee67b3ca47ba36fe924b10161d9cc2","user":{"login":"NickDriscoll","id":8892329,"avatar_url":"https://avatars3.githubusercontent.com/u/8892329?v=4","gravatar_id":"","url":"https://api.github.com/users/NickDriscoll","html_url":"https://github.com/NickDriscoll","followers_url":"https://api.github.com/users/NickDriscoll/followers","following_url":"https://api.github.com/users/NickDriscoll/following{/other_user}","gists_url":"https://api.github.com/users/NickDriscoll/gists{/gist_id}","starred_url":"https://api.github.com/users/NickDriscoll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NickDriscoll/subscriptions","organizations_url":"https://api.github.com/users/NickDriscoll/orgs","repos_url":"https://api.github.com/users/NickDriscoll/repos","events_url":"https://api.github.com/users/NickDriscoll/events{/privacy}","received_events_url":"https://api.github.com/users/NickDriscoll/received_events","type":"User","site_admin":false},"repo":{"id":104613871,"name":"dolphin","full_name":"NickDriscoll/dolphin","owner":{"login":"NickDriscoll","id":8892329,"avatar_url":"https://avatars3.githubusercontent.com/u/8892329?v=4","gravatar_id":"","url":"https://api.github.com/users/NickDriscoll","html_url":"https://github.com/NickDriscoll","followers_url":"https://api.github.com/users/NickDriscoll/followers","following_url":"https://api.github.com/users/NickDriscoll/following{/other_user}","gists_url":"https://api.github.com/users/NickDriscoll/gists{/gist_id}","starred_url":"https://api.github.com/users/NickDriscoll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NickDriscoll/subscriptions","organizations_url":"https://api.github.com/users/NickDriscoll/orgs","repos_url":"https://api.github.com/users/NickDriscoll/repos","events_url":"https://api.github.com/users/NickDriscoll/events{/privacy}","received_events_url":"https://api.github.com/users/NickDriscoll/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/NickDriscoll/dolphin","description":"Dolphin is a GameCube / Wii emulator, allowing you to play games for these two platforms on PC with improvements.","fork":true,"url":"https://api.github.com/repos/NickDriscoll/dolphin","forks_url":"https://api.github.com/repos/NickDriscoll/dolphin/forks","keys_url":"https://api.github.com/repos/NickDriscoll/dolphin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NickDriscoll/dolphin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NickDriscoll/dolphin/teams","hooks_url":"https://api.github.com/repos/NickDriscoll/dolphin/hooks","issue_events_url":"https://api.github.com/repos/NickDriscoll/dolphin/issues/events{/number}","events_url":"https://api.github.com/repos/NickDriscoll/dolphin/events","assignees_url":"https://api.github.com/repos/NickDriscoll/dolphin/assignees{/user}","branches_url":"https://api.github.com/repos/NickDriscoll/dolphin/branches{/branch}","tags_url":"https://api.github.com/repos/NickDriscoll/dolphin/tags","blobs_url":"https://api.github.com/repos/NickDriscoll/dolphin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NickDriscoll/dolphin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NickDriscoll/dolphin/git/refs{/sha}","trees_url":"https://api.github.com/repos/NickDriscoll/dolphin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NickDriscoll/dolphin/statuses/{sha}","languages_url":"https://api.github.com/repos/NickDriscoll/dolphin/languages","stargazers_url":"https://api.github.com/repos/NickDriscoll/dolphin/stargazers","contributors_url":"https://api.github.com/repos/NickDriscoll/dolphin/contributors","subscribers_url":"https://api.github.com/repos/NickDriscoll/dolphin/subscribers","subscription_url":"https://api.github.com/repos/NickDriscoll/dolphin/subscription","commits_url":"https://api.github.com/repos/NickDriscoll/dolphin/commits{/sha}","git_commits_url":"https://api.github.com/repos/NickDriscoll/dolphin/git/commits{/sha}","comments_url":"https://api.github.com/repos/NickDriscoll/dolphin/comments{/number}","issue_comment_url":"https://api.github.com/repos/NickDriscoll/dolphin/issues/comments{/number}","contents_url":"https://api.github.com/repos/NickDriscoll/dolphin/contents/{+path}","compare_url":"https://api.github.com/repos/NickDriscoll/dolphin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NickDriscoll/dolphin/merges","archive_url":"https://api.github.com/repos/NickDriscoll/dolphin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NickDriscoll/dolphin/downloads","issues_url":"https://api.github.com/repos/NickDriscoll/dolphin/issues{/number}","pulls_url":"https://api.github.com/repos/NickDriscoll/dolphin/pulls{/number}","milestones_url":"https://api.github.com/repos/NickDriscoll/dolphin/milestones{/number}","notifications_url":"https://api.github.com/repos/NickDriscoll/dolphin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NickDriscoll/dolphin/labels{/name}","releases_url":"https://api.github.com/repos/NickDriscoll/dolphin/releases{/id}","deployments_url":"https://api.github.com/repos/NickDriscoll/dolphin/deployments","created_at":"2017-09-24T02:46:13Z","updated_at":"2017-09-24T02:46:40Z","pushed_at":"2017-10-14T17:22:15Z","git_url":"git://github.com/NickDriscoll/dolphin.git","ssh_url":"git@github.com:NickDriscoll/dolphin.git","clone_url":"https://github.com/NickDriscoll/dolphin.git","svn_url":"https://github.com/NickDriscoll/dolphin","homepage":"https://dolphin-emu.org/","size":311786,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"dolphin-emu:master","ref":"master","sha":"2dfbf866fb7ea70cf23f402b5106f5b38324a8e1","user":{"login":"dolphin-emu","id":5050316,"avatar_url":"https://avatars2.githubusercontent.com/u/5050316?v=4","gravatar_id":"","url":"https://api.github.com/users/dolphin-emu","html_url":"https://github.com/dolphin-emu","followers_url":"https://api.github.com/users/dolphin-emu/followers","following_url":"https://api.github.com/users/dolphin-emu/following{/other_user}","gists_url":"https://api.github.com/users/dolphin-emu/gists{/gist_id}","starred_url":"https://api.github.com/users/dolphin-emu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dolphin-emu/subscriptions","organizations_url":"https://api.github.com/users/dolphin-emu/orgs","repos_url":"https://api.github.com/users/dolphin-emu/repos","events_url":"https://api.github.com/users/dolphin-emu/events{/privacy}","received_events_url":"https://api.github.com/users/dolphin-emu/received_events","type":"Organization","site_admin":false},"repo":{"id":11577304,"name":"dolphin","full_name":"dolphin-emu/dolphin","owner":{"login":"dolphin-emu","id":5050316,"avatar_url":"https://avatars2.githubusercontent.com/u/5050316?v=4","gravatar_id":"","url":"https://api.github.com/users/dolphin-emu","html_url":"https://github.com/dolphin-emu","followers_url":"https://api.github.com/users/dolphin-emu/followers","following_url":"https://api.github.com/users/dolphin-emu/following{/other_user}","gists_url":"https://api.github.com/users/dolphin-emu/gists{/gist_id}","starred_url":"https://api.github.com/users/dolphin-emu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dolphin-emu/subscriptions","organizations_url":"https://api.github.com/users/dolphin-emu/orgs","repos_url":"https://api.github.com/users/dolphin-emu/repos","events_url":"https://api.github.com/users/dolphin-emu/events{/privacy}","received_events_url":"https://api.github.com/users/dolphin-emu/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dolphin-emu/dolphin","description":"Dolphin is a GameCube / Wii emulator, allowing you to play games for these two platforms on PC with improvements.","fork":false,"url":"https://api.github.com/repos/dolphin-emu/dolphin","forks_url":"https://api.github.com/repos/dolphin-emu/dolphin/forks","keys_url":"https://api.github.com/repos/dolphin-emu/dolphin/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dolphin-emu/dolphin/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dolphin-emu/dolphin/teams","hooks_url":"https://api.github.com/repos/dolphin-emu/dolphin/hooks","issue_events_url":"https://api.github.com/repos/dolphin-emu/dolphin/issues/events{/number}","events_url":"https://api.github.com/repos/dolphin-emu/dolphin/events","assignees_url":"https://api.github.com/repos/dolphin-emu/dolphin/assignees{/user}","branches_url":"https://api.github.com/repos/dolphin-emu/dolphin/branches{/branch}","tags_url":"https://api.github.com/repos/dolphin-emu/dolphin/tags","blobs_url":"https://api.github.com/repos/dolphin-emu/dolphin/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dolphin-emu/dolphin/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dolphin-emu/dolphin/git/refs{/sha}","trees_url":"https://api.github.com/repos/dolphin-emu/dolphin/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dolphin-emu/dolphin/statuses/{sha}","languages_url":"https://api.github.com/repos/dolphin-emu/dolphin/languages","stargazers_url":"https://api.github.com/repos/dolphin-emu/dolphin/stargazers","contributors_url":"https://api.github.com/repos/dolphin-emu/dolphin/contributors","subscribers_url":"https://api.github.com/repos/dolphin-emu/dolphin/subscribers","subscription_url":"https://api.github.com/repos/dolphin-emu/dolphin/subscription","commits_url":"https://api.github.com/repos/dolphin-emu/dolphin/commits{/sha}","git_commits_url":"https://api.github.com/repos/dolphin-emu/dolphin/git/commits{/sha}","comments_url":"https://api.github.com/repos/dolphin-emu/dolphin/comments{/number}","issue_comment_url":"https://api.github.com/repos/dolphin-emu/dolphin/issues/comments{/number}","contents_url":"https://api.github.com/repos/dolphin-emu/dolphin/contents/{+path}","compare_url":"https://api.github.com/repos/dolphin-emu/dolphin/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dolphin-emu/dolphin/merges","archive_url":"https://api.github.com/repos/dolphin-emu/dolphin/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dolphin-emu/dolphin/downloads","issues_url":"https://api.github.com/repos/dolphin-emu/dolphin/issues{/number}","pulls_url":"https://api.github.com/repos/dolphin-emu/dolphin/pulls{/number}","milestones_url":"https://api.github.com/repos/dolphin-emu/dolphin/milestones{/number}","notifications_url":"https://api.github.com/repos/dolphin-emu/dolphin/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dolphin-emu/dolphin/labels{/name}","releases_url":"https://api.github.com/repos/dolphin-emu/dolphin/releases{/id}","deployments_url":"https://api.github.com/repos/dolphin-emu/dolphin/deployments","created_at":"2013-07-22T09:07:57Z","updated_at":"2017-10-14T11:43:41Z","pushed_at":"2017-10-14T19:55:33Z","git_url":"git://github.com/dolphin-emu/dolphin.git","ssh_url":"git@github.com:dolphin-emu/dolphin.git","clone_url":"https://github.com/dolphin-emu/dolphin.git","svn_url":"https://github.com/dolphin-emu/dolphin","homepage":"https://dolphin-emu.org/","size":349093,"stargazers_count":3742,"watchers_count":3742,"language":"C++","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":942,"mirror_url":null,"open_issues_count":133,"forks":942,"open_issues":133,"watchers":3742,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/6117"},"html":{"href":"https://github.com/dolphin-emu/dolphin/pull/6117"},"issue":{"href":"https://api.github.com/repos/dolphin-emu/dolphin/issues/6117"},"comments":{"href":"https://api.github.com/repos/dolphin-emu/dolphin/issues/6117/comments"},"review_comments":{"href":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/6117/comments"},"review_comment":{"href":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dolphin-emu/dolphin/pulls/6117/commits"},"statuses":{"href":"https://api.github.com/repos/dolphin-emu/dolphin/statuses/29c2c0c5daee67b3ca47ba36fe924b10161d9cc2"}},"author_association":"NONE"}}
{"actor":{"display_login":"lioncash"}}