{"action":"created","comment":{"url":"https://api.github.com/repos/diasurgical/devilution/pulls/comments/199047055","pull_request_review_id":133090035,"id":199047055,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5OTA0NzA1NQ==","diff_hunk":"@@ -0,0 +1,139 @@\n+# Contribution Guide\n+\n+This guide outlines useful resources, tools and processes for contribution to\n+Devilution.\n+\n+## Useful Repos\n+\n+* [diasurgical/scalpel](https://github.com/diasurgical/scalpel) - uploaded .SYM\n+  files from each realese of Diablo 1 on Playstation\n+* [sanctuary/notes](https://github.com/sanctuary/notes) - documented\n+  Windows-specific Diablo code\n+\n+## Software and Utils\n+\n+* A clean installation of Diablo patched to version 1.09b (Diablo.exe)\n+* Download IDA (Interactive Disassembler) [Hex-Rays](https://www.hex-rays.com/products/ida/support/download_freeware.shtml)\n+* Download IDC script from sancturary/notes repository: [notes.idc](http://sanctuary.github.io/notes/notes.idc)\n+\n+## How To...\n+\n+Described below are steps for using the IDA and SYM to reverse the Diablo\n+source.\n+\n+### Understanding Devilusion and Sancutary Notes\n+\n+Both Devilution and the Sancutary Notes repo have the intended aim to get as\n+close as possible to document the original game. Devilution is closer in the\n+sense that the same names have been used for functions as based on the SYM\n+debug info. The notes repo has tried to use consistent naming for functions,\n+e.g. prefix with source file name.\n+\n+See for instance [drlg_l1_load_dun](http://sanctuary.github.io/notes/#function/drlg_l1_load_dun),\n+which is defined in `drlg_l1.cpp`. This function has the PSX signature\n+`void LoadL1Dungeon__FPcii(char *sFileName, int vx, int vy)`, but is documented\n+in the Sancutary Notes repo as follows for consistency:\n+\n+```cpp\n+/// address: 0x40AE79\n+///\n+/// drlg_l1_load_dun loads tile IDs, monsters and objects from the given\n+/// dungeon file.\n+///\n+/// PSX ref: 0x8013CF64\n+/// PSX def: void LoadL1Dungeon__FPcii(char *sFileName, int vx, int vy)\n+void __fastcall drlg_l1_load_dun(char *dun_path, int view_x, int view_y);\n+```\n+\n+### Interactive Disassembler Usage\n+\n+* Open the `Diablo.exe` (verison 1.09b in IDA) and wait for it to finish\n+  analysis\n+  * Open as \"Portable Executable\"\n+  * Processor type i386 (80386)\n+* Run the IDC script in IDA on the fresh IDB database to import names for\n+  variables and functions, type definitions, etc. (Note: run the IDC script\n+  only on new IDB databases as it removes all variable names before adding new\n+  ones.); for more info, see [#79 (comment)](https://github.com/diasurgical/devilution/pull/79#issuecomment-400536087)\n+* Example: search for `drlg_l1_load_dun`\n+  * Starting memory address `0x40AE79`\n+  * Funcation name `drlg_l1_load_dun`\n+  * Function arguments `(char *dun_path, int view_x, int view_y)`\n+  * #TODO whatelse can be inferred from below?\n+\n+```\n+; drlg_l1_load_dun loads tile IDs, monsters and objects from the given\n+; dungeon file.\n+; Attributes: bp-based frame\n+\n+; void __fastcall drlg_l1_load_dun(char *dun_path, int view_x, int view_y)\n+drlg_l1_load_dun proc near\n+\n+var_C= dword ptr -0Ch\n+var_8= dword ptr -8\n+var_4= dword ptr -4\n+view_y= dword ptr  8\n+\n+push    ebp\n+mov     ebp, esp\n+sub     esp, 0Ch\n+push    ebx\n+push    esi\n+push    edi\n+push    10h\n+pop     eax\n+mov     [ebp+var_C], edx\n+push    60h\n+mov     dword_5D2458, eax\n+mov     dword_5D245C, eax\n+pop     eax\n+mov     esi, ecx\n+mov     dword_5CF328, eax\n+mov     dword_5CF32C, eax\n+call    gendung_init_transparency\n+xor     edx, edx        ; size\n+mov     ecx, esi        ; file_path\n+call    engine_mem_load_file\n+mov     esi, eax\n+xor     ecx, ecx\n+```\n+\n+### About the SYM\n+\n+The diasurgical/scalpel includes a copy of a symbolic file was accidentally","path":"CONTRIBUTE.md","position":103,"original_position":103,"commit_id":"37d899542531c0c940da9b9ef1912ff19c9494ef","original_commit_id":"37d899542531c0c940da9b9ef1912ff19c9494ef","user":{"login":"mewmew","id":1414531,"node_id":"MDQ6VXNlcjE0MTQ1MzE=","avatar_url":"https://avatars1.githubusercontent.com/u/1414531?v=4","gravatar_id":"","url":"https://api.github.com/users/mewmew","html_url":"https://github.com/mewmew","followers_url":"https://api.github.com/users/mewmew/followers","following_url":"https://api.github.com/users/mewmew/following{/other_user}","gists_url":"https://api.github.com/users/mewmew/gists{/gist_id}","starred_url":"https://api.github.com/users/mewmew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mewmew/subscriptions","organizations_url":"https://api.github.com/users/mewmew/orgs","repos_url":"https://api.github.com/users/mewmew/repos","events_url":"https://api.github.com/users/mewmew/events{/privacy}","received_events_url":"https://api.github.com/users/mewmew/received_events","type":"User","site_admin":false},"body":"```diff\r\n-The diasurgical/scalpel includes a copy of a symbolic file was accidentally\r\n+The diasurgical/scalpel repository includes a copy of a symbolic file that was accidentally\r\n```","created_at":"2018-06-29T03:51:28Z","updated_at":"2018-06-29T03:53:36Z","html_url":"https://github.com/diasurgical/devilution/pull/99#discussion_r199047055","pull_request_url":"https://api.github.com/repos/diasurgical/devilution/pulls/99","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/diasurgical/devilution/pulls/comments/199047055"},"html":{"href":"https://github.com/diasurgical/devilution/pull/99#discussion_r199047055"},"pull_request":{"href":"https://api.github.com/repos/diasurgical/devilution/pulls/99"}}},"pull_request":{"url":"https://api.github.com/repos/diasurgical/devilution/pulls/99","id":198198240,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk4MTk4MjQw","html_url":"https://github.com/diasurgical/devilution/pull/99","diff_url":"https://github.com/diasurgical/devilution/pull/99.diff","patch_url":"https://github.com/diasurgical/devilution/pull/99.patch","issue_url":"https://api.github.com/repos/diasurgical/devilution/issues/99","number":99,"state":"open","locked":false,"title":"start of contribution guide","user":{"login":"ttdonovan","id":10460,"node_id":"MDQ6VXNlcjEwNDYw","avatar_url":"https://avatars3.githubusercontent.com/u/10460?v=4","gravatar_id":"","url":"https://api.github.com/users/ttdonovan","html_url":"https://github.com/ttdonovan","followers_url":"https://api.github.com/users/ttdonovan/followers","following_url":"https://api.github.com/users/ttdonovan/following{/other_user}","gists_url":"https://api.github.com/users/ttdonovan/gists{/gist_id}","starred_url":"https://api.github.com/users/ttdonovan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ttdonovan/subscriptions","organizations_url":"https://api.github.com/users/ttdonovan/orgs","repos_url":"https://api.github.com/users/ttdonovan/repos","events_url":"https://api.github.com/users/ttdonovan/events{/privacy}","received_events_url":"https://api.github.com/users/ttdonovan/received_events","type":"User","site_admin":false},"body":"From this issue #84 I've stated a contribution guide. Feel free to make any changes. Other things that might be useful are screenshots or a video explaining how to reverse an example function.\r\n\r\nThere are also a couple of `#TODO`s that could use some polishing to further explain concepts.","created_at":"2018-06-29T02:14:40Z","updated_at":"2018-06-29T03:53:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4f2c928f8128964d0981b7870525dc71a34ad460","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/diasurgical/devilution/pulls/99/commits","review_comments_url":"https://api.github.com/repos/diasurgical/devilution/pulls/99/comments","review_comment_url":"https://api.github.com/repos/diasurgical/devilution/pulls/comments{/number}","comments_url":"https://api.github.com/repos/diasurgical/devilution/issues/99/comments","statuses_url":"https://api.github.com/repos/diasurgical/devilution/statuses/37d899542531c0c940da9b9ef1912ff19c9494ef","head":{"label":"ttdonovan:contribute","ref":"contribute","sha":"37d899542531c0c940da9b9ef1912ff19c9494ef","user":{"login":"ttdonovan","id":10460,"node_id":"MDQ6VXNlcjEwNDYw","avatar_url":"https://avatars3.githubusercontent.com/u/10460?v=4","gravatar_id":"","url":"https://api.github.com/users/ttdonovan","html_url":"https://github.com/ttdonovan","followers_url":"https://api.github.com/users/ttdonovan/followers","following_url":"https://api.github.com/users/ttdonovan/following{/other_user}","gists_url":"https://api.github.com/users/ttdonovan/gists{/gist_id}","starred_url":"https://api.github.com/users/ttdonovan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ttdonovan/subscriptions","organizations_url":"https://api.github.com/users/ttdonovan/orgs","repos_url":"https://api.github.com/users/ttdonovan/repos","events_url":"https://api.github.com/users/ttdonovan/events{/privacy}","received_events_url":"https://api.github.com/users/ttdonovan/received_events","type":"User","site_admin":false},"repo":{"id":138251955,"node_id":"MDEwOlJlcG9zaXRvcnkxMzgyNTE5NTU=","name":"devilution","full_name":"ttdonovan/devilution","owner":{"login":"ttdonovan","id":10460,"node_id":"MDQ6VXNlcjEwNDYw","avatar_url":"https://avatars3.githubusercontent.com/u/10460?v=4","gravatar_id":"","url":"https://api.github.com/users/ttdonovan","html_url":"https://github.com/ttdonovan","followers_url":"https://api.github.com/users/ttdonovan/followers","following_url":"https://api.github.com/users/ttdonovan/following{/other_user}","gists_url":"https://api.github.com/users/ttdonovan/gists{/gist_id}","starred_url":"https://api.github.com/users/ttdonovan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ttdonovan/subscriptions","organizations_url":"https://api.github.com/users/ttdonovan/orgs","repos_url":"https://api.github.com/users/ttdonovan/repos","events_url":"https://api.github.com/users/ttdonovan/events{/privacy}","received_events_url":"https://api.github.com/users/ttdonovan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ttdonovan/devilution","description":"Diablo devolved - magic behind the 1996 computer game","fork":true,"url":"https://api.github.com/repos/ttdonovan/devilution","forks_url":"https://api.github.com/repos/ttdonovan/devilution/forks","keys_url":"https://api.github.com/repos/ttdonovan/devilution/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ttdonovan/devilution/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ttdonovan/devilution/teams","hooks_url":"https://api.github.com/repos/ttdonovan/devilution/hooks","issue_events_url":"https://api.github.com/repos/ttdonovan/devilution/issues/events{/number}","events_url":"https://api.github.com/repos/ttdonovan/devilution/events","assignees_url":"https://api.github.com/repos/ttdonovan/devilution/assignees{/user}","branches_url":"https://api.github.com/repos/ttdonovan/devilution/branches{/branch}","tags_url":"https://api.github.com/repos/ttdonovan/devilution/tags","blobs_url":"https://api.github.com/repos/ttdonovan/devilution/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ttdonovan/devilution/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ttdonovan/devilution/git/refs{/sha}","trees_url":"https://api.github.com/repos/ttdonovan/devilution/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ttdonovan/devilution/statuses/{sha}","languages_url":"https://api.github.com/repos/ttdonovan/devilution/languages","stargazers_url":"https://api.github.com/repos/ttdonovan/devilution/stargazers","contributors_url":"https://api.github.com/repos/ttdonovan/devilution/contributors","subscribers_url":"https://api.github.com/repos/ttdonovan/devilution/subscribers","subscription_url":"https://api.github.com/repos/ttdonovan/devilution/subscription","commits_url":"https://api.github.com/repos/ttdonovan/devilution/commits{/sha}","git_commits_url":"https://api.github.com/repos/ttdonovan/devilution/git/commits{/sha}","comments_url":"https://api.github.com/repos/ttdonovan/devilution/comments{/number}","issue_comment_url":"https://api.github.com/repos/ttdonovan/devilution/issues/comments{/number}","contents_url":"https://api.github.com/repos/ttdonovan/devilution/contents/{+path}","compare_url":"https://api.github.com/repos/ttdonovan/devilution/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ttdonovan/devilution/merges","archive_url":"https://api.github.com/repos/ttdonovan/devilution/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ttdonovan/devilution/downloads","issues_url":"https://api.github.com/repos/ttdonovan/devilution/issues{/number}","pulls_url":"https://api.github.com/repos/ttdonovan/devilution/pulls{/number}","milestones_url":"https://api.github.com/repos/ttdonovan/devilution/milestones{/number}","notifications_url":"https://api.github.com/repos/ttdonovan/devilution/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ttdonovan/devilution/labels{/name}","releases_url":"https://api.github.com/repos/ttdonovan/devilution/releases{/id}","deployments_url":"https://api.github.com/repos/ttdonovan/devilution/deployments","created_at":"2018-06-22T03:49:12Z","updated_at":"2018-06-28T18:43:35Z","pushed_at":"2018-06-29T02:09:15Z","git_url":"git://github.com/ttdonovan/devilution.git","ssh_url":"git@github.com:ttdonovan/devilution.git","clone_url":"https://github.com/ttdonovan/devilution.git","svn_url":"https://github.com/ttdonovan/devilution","homepage":"","size":1018,"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,"archived":false,"open_issues_count":0,"license":{"key":"unlicense","name":"The Unlicense","spdx_id":"Unlicense","url":"https://api.github.com/licenses/unlicense","node_id":"MDc6TGljZW5zZTE1"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"diasurgical:master","ref":"master","sha":"49c387cd7bad2d684f310bb751e8c03a244c03f0","user":{"login":"diasurgical","id":40645014,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQwNjQ1MDE0","avatar_url":"https://avatars1.githubusercontent.com/u/40645014?v=4","gravatar_id":"","url":"https://api.github.com/users/diasurgical","html_url":"https://github.com/diasurgical","followers_url":"https://api.github.com/users/diasurgical/followers","following_url":"https://api.github.com/users/diasurgical/following{/other_user}","gists_url":"https://api.github.com/users/diasurgical/gists{/gist_id}","starred_url":"https://api.github.com/users/diasurgical/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diasurgical/subscriptions","organizations_url":"https://api.github.com/users/diasurgical/orgs","repos_url":"https://api.github.com/users/diasurgical/repos","events_url":"https://api.github.com/users/diasurgical/events{/privacy}","received_events_url":"https://api.github.com/users/diasurgical/received_events","type":"Organization","site_admin":false},"repo":{"id":127684759,"node_id":"MDEwOlJlcG9zaXRvcnkxMjc2ODQ3NTk=","name":"devilution","full_name":"diasurgical/devilution","owner":{"login":"diasurgical","id":40645014,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQwNjQ1MDE0","avatar_url":"https://avatars1.githubusercontent.com/u/40645014?v=4","gravatar_id":"","url":"https://api.github.com/users/diasurgical","html_url":"https://github.com/diasurgical","followers_url":"https://api.github.com/users/diasurgical/followers","following_url":"https://api.github.com/users/diasurgical/following{/other_user}","gists_url":"https://api.github.com/users/diasurgical/gists{/gist_id}","starred_url":"https://api.github.com/users/diasurgical/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diasurgical/subscriptions","organizations_url":"https://api.github.com/users/diasurgical/orgs","repos_url":"https://api.github.com/users/diasurgical/repos","events_url":"https://api.github.com/users/diasurgical/events{/privacy}","received_events_url":"https://api.github.com/users/diasurgical/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/diasurgical/devilution","description":"Diablo devolved - magic behind the 1996 computer game","fork":false,"url":"https://api.github.com/repos/diasurgical/devilution","forks_url":"https://api.github.com/repos/diasurgical/devilution/forks","keys_url":"https://api.github.com/repos/diasurgical/devilution/keys{/key_id}","collaborators_url":"https://api.github.com/repos/diasurgical/devilution/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/diasurgical/devilution/teams","hooks_url":"https://api.github.com/repos/diasurgical/devilution/hooks","issue_events_url":"https://api.github.com/repos/diasurgical/devilution/issues/events{/number}","events_url":"https://api.github.com/repos/diasurgical/devilution/events","assignees_url":"https://api.github.com/repos/diasurgical/devilution/assignees{/user}","branches_url":"https://api.github.com/repos/diasurgical/devilution/branches{/branch}","tags_url":"https://api.github.com/repos/diasurgical/devilution/tags","blobs_url":"https://api.github.com/repos/diasurgical/devilution/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/diasurgical/devilution/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/diasurgical/devilution/git/refs{/sha}","trees_url":"https://api.github.com/repos/diasurgical/devilution/git/trees{/sha}","statuses_url":"https://api.github.com/repos/diasurgical/devilution/statuses/{sha}","languages_url":"https://api.github.com/repos/diasurgical/devilution/languages","stargazers_url":"https://api.github.com/repos/diasurgical/devilution/stargazers","contributors_url":"https://api.github.com/repos/diasurgical/devilution/contributors","subscribers_url":"https://api.github.com/repos/diasurgical/devilution/subscribers","subscription_url":"https://api.github.com/repos/diasurgical/devilution/subscription","commits_url":"https://api.github.com/repos/diasurgical/devilution/commits{/sha}","git_commits_url":"https://api.github.com/repos/diasurgical/devilution/git/commits{/sha}","comments_url":"https://api.github.com/repos/diasurgical/devilution/comments{/number}","issue_comment_url":"https://api.github.com/repos/diasurgical/devilution/issues/comments{/number}","contents_url":"https://api.github.com/repos/diasurgical/devilution/contents/{+path}","compare_url":"https://api.github.com/repos/diasurgical/devilution/compare/{base}...{head}","merges_url":"https://api.github.com/repos/diasurgical/devilution/merges","archive_url":"https://api.github.com/repos/diasurgical/devilution/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/diasurgical/devilution/downloads","issues_url":"https://api.github.com/repos/diasurgical/devilution/issues{/number}","pulls_url":"https://api.github.com/repos/diasurgical/devilution/pulls{/number}","milestones_url":"https://api.github.com/repos/diasurgical/devilution/milestones{/number}","notifications_url":"https://api.github.com/repos/diasurgical/devilution/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/diasurgical/devilution/labels{/name}","releases_url":"https://api.github.com/repos/diasurgical/devilution/releases{/id}","deployments_url":"https://api.github.com/repos/diasurgical/devilution/deployments","created_at":"2018-04-02T01:01:47Z","updated_at":"2018-06-29T03:24:56Z","pushed_at":"2018-06-29T03:20:23Z","git_url":"git://github.com/diasurgical/devilution.git","ssh_url":"git@github.com:diasurgical/devilution.git","clone_url":"https://github.com/diasurgical/devilution.git","svn_url":"https://github.com/diasurgical/devilution","homepage":"","size":1015,"stargazers_count":4974,"watchers_count":4974,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":603,"mirror_url":null,"archived":false,"open_issues_count":29,"license":{"key":"unlicense","name":"The Unlicense","spdx_id":"Unlicense","url":"https://api.github.com/licenses/unlicense","node_id":"MDc6TGljZW5zZTE1"},"forks":603,"open_issues":29,"watchers":4974,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/diasurgical/devilution/pulls/99"},"html":{"href":"https://github.com/diasurgical/devilution/pull/99"},"issue":{"href":"https://api.github.com/repos/diasurgical/devilution/issues/99"},"comments":{"href":"https://api.github.com/repos/diasurgical/devilution/issues/99/comments"},"review_comments":{"href":"https://api.github.com/repos/diasurgical/devilution/pulls/99/comments"},"review_comment":{"href":"https://api.github.com/repos/diasurgical/devilution/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/diasurgical/devilution/pulls/99/commits"},"statuses":{"href":"https://api.github.com/repos/diasurgical/devilution/statuses/37d899542531c0c940da9b9ef1912ff19c9494ef"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"mewmew"}}