{"action":"created","comment":{"url":"https://api.github.com/repos/OutpostUniverse/HFL/pulls/comments/363407621","pull_request_review_id":338795600,"id":363407621,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDM2MzQwNzYyMQ==","diff_hunk":"@@ -117,7 +117,28 @@ int GameMapEx::LoadMap(char *fileName)\n \r\n void GameMapEx::CopyTileMap(int* tileMap)\r\n {\r\n+\tif (!isInited) {\r\n+\t\treturn;\r\n+\t}\r\n+\r\n \tint **tileArray = (int**)(mapTileData);\r\n+\tOP2Map *p = (OP2Map*)mapObj;\r\n \t\r\n-\tmemcpy(tileMap, *tileArray, GetMapWidth()*GetMapHeight()*sizeof(int));\r\n+\tint padding;\r\n+\tint length;\r\n+\r\n+\tif (p->clipRect.x1 == -1)\r\n+\t{\r\n+\t\t// Around the world map\r\n+\t\tpadding = 0;\r\n+\t\tlength = p->tileWidth * p->tileHeight;\r\n+\t}\r\n+\telse\r\n+\t{\r\n+\t\t// Standard map\r\n+\t\tpadding = p->clipRect.x1 * p->tileHeight;\r\n+\t\tlength = p->clipRect.Width() * p->clipRect.Height();\r\n+\t}\r","path":"Source/GameMapEx.cpp","position":null,"original_position":26,"commit_id":"aefa8713192b4d97529f31fbb36ecf2e9edc8883","original_commit_id":"aefa8713192b4d97529f31fbb36ecf2e9edc8883","user":{"login":"TechCor8","id":48194787,"node_id":"MDQ6VXNlcjQ4MTk0Nzg3","avatar_url":"https://avatars2.githubusercontent.com/u/48194787?v=4","gravatar_id":"","url":"https://api.github.com/users/TechCor8","html_url":"https://github.com/TechCor8","followers_url":"https://api.github.com/users/TechCor8/followers","following_url":"https://api.github.com/users/TechCor8/following{/other_user}","gists_url":"https://api.github.com/users/TechCor8/gists{/gist_id}","starred_url":"https://api.github.com/users/TechCor8/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TechCor8/subscriptions","organizations_url":"https://api.github.com/users/TechCor8/orgs","repos_url":"https://api.github.com/users/TechCor8/repos","events_url":"https://api.github.com/users/TechCor8/events{/privacy}","received_events_url":"https://api.github.com/users/TechCor8/received_events","type":"User","site_admin":false},"body":"Here's my new proposed code:\r\n```\r\nint mapWidth = p->paddingOffsetTileX == 32 ? p->tileWidth / 2 : p->tileWidth;\r\nmemcpy(tileMap, *tileArray + p->paddingOffsetTileX*p->tileHeight, mapWidth*p->tileHeight*sizeof(int));\r\n```","created_at":"2020-01-06T17:56:46Z","updated_at":"2020-01-06T17:56:47Z","html_url":"https://github.com/OutpostUniverse/HFL/pull/24#discussion_r363407621","pull_request_url":"https://api.github.com/repos/OutpostUniverse/HFL/pulls/24","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/OutpostUniverse/HFL/pulls/comments/363407621"},"html":{"href":"https://github.com/OutpostUniverse/HFL/pull/24#discussion_r363407621"},"pull_request":{"href":"https://api.github.com/repos/OutpostUniverse/HFL/pulls/24"}},"in_reply_to_id":363179963},"pull_request":{"url":"https://api.github.com/repos/OutpostUniverse/HFL/pulls/24","id":358424258,"node_id":"MDExOlB1bGxSZXF1ZXN0MzU4NDI0MjU4","html_url":"https://github.com/OutpostUniverse/HFL/pull/24","diff_url":"https://github.com/OutpostUniverse/HFL/pull/24.diff","patch_url":"https://github.com/OutpostUniverse/HFL/pull/24.patch","issue_url":"https://api.github.com/repos/OutpostUniverse/HFL/issues/24","number":24,"state":"open","locked":false,"title":"Added GameMapEx CopyTileMap function","user":{"login":"TechCor8","id":48194787,"node_id":"MDQ6VXNlcjQ4MTk0Nzg3","avatar_url":"https://avatars2.githubusercontent.com/u/48194787?v=4","gravatar_id":"","url":"https://api.github.com/users/TechCor8","html_url":"https://github.com/TechCor8","followers_url":"https://api.github.com/users/TechCor8/followers","following_url":"https://api.github.com/users/TechCor8/following{/other_user}","gists_url":"https://api.github.com/users/TechCor8/gists{/gist_id}","starred_url":"https://api.github.com/users/TechCor8/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TechCor8/subscriptions","organizations_url":"https://api.github.com/users/TechCor8/orgs","repos_url":"https://api.github.com/users/TechCor8/repos","events_url":"https://api.github.com/users/TechCor8/events{/privacy}","received_events_url":"https://api.github.com/users/TechCor8/received_events","type":"User","site_admin":false},"body":"","created_at":"2019-12-31T21:29:53Z","updated_at":"2020-01-06T17:56:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ce3236d8c091aef4bd7f56c406c35f377e3606a5","assignee":null,"assignees":[],"requested_reviewers":[{"login":"Brett208","id":15183337,"node_id":"MDQ6VXNlcjE1MTgzMzM3","avatar_url":"https://avatars3.githubusercontent.com/u/15183337?v=4","gravatar_id":"","url":"https://api.github.com/users/Brett208","html_url":"https://github.com/Brett208","followers_url":"https://api.github.com/users/Brett208/followers","following_url":"https://api.github.com/users/Brett208/following{/other_user}","gists_url":"https://api.github.com/users/Brett208/gists{/gist_id}","starred_url":"https://api.github.com/users/Brett208/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Brett208/subscriptions","organizations_url":"https://api.github.com/users/Brett208/orgs","repos_url":"https://api.github.com/users/Brett208/repos","events_url":"https://api.github.com/users/Brett208/events{/privacy}","received_events_url":"https://api.github.com/users/Brett208/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/OutpostUniverse/HFL/pulls/24/commits","review_comments_url":"https://api.github.com/repos/OutpostUniverse/HFL/pulls/24/comments","review_comment_url":"https://api.github.com/repos/OutpostUniverse/HFL/pulls/comments{/number}","comments_url":"https://api.github.com/repos/OutpostUniverse/HFL/issues/24/comments","statuses_url":"https://api.github.com/repos/OutpostUniverse/HFL/statuses/aefa8713192b4d97529f31fbb36ecf2e9edc8883","head":{"label":"TechCor8:GameMap-CopyTiles","ref":"GameMap-CopyTiles","sha":"aefa8713192b4d97529f31fbb36ecf2e9edc8883","user":{"login":"TechCor8","id":48194787,"node_id":"MDQ6VXNlcjQ4MTk0Nzg3","avatar_url":"https://avatars2.githubusercontent.com/u/48194787?v=4","gravatar_id":"","url":"https://api.github.com/users/TechCor8","html_url":"https://github.com/TechCor8","followers_url":"https://api.github.com/users/TechCor8/followers","following_url":"https://api.github.com/users/TechCor8/following{/other_user}","gists_url":"https://api.github.com/users/TechCor8/gists{/gist_id}","starred_url":"https://api.github.com/users/TechCor8/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TechCor8/subscriptions","organizations_url":"https://api.github.com/users/TechCor8/orgs","repos_url":"https://api.github.com/users/TechCor8/repos","events_url":"https://api.github.com/users/TechCor8/events{/privacy}","received_events_url":"https://api.github.com/users/TechCor8/received_events","type":"User","site_admin":false},"repo":{"id":231111064,"node_id":"MDEwOlJlcG9zaXRvcnkyMzExMTEwNjQ=","name":"HFL","full_name":"TechCor8/HFL","private":false,"owner":{"login":"TechCor8","id":48194787,"node_id":"MDQ6VXNlcjQ4MTk0Nzg3","avatar_url":"https://avatars2.githubusercontent.com/u/48194787?v=4","gravatar_id":"","url":"https://api.github.com/users/TechCor8","html_url":"https://github.com/TechCor8","followers_url":"https://api.github.com/users/TechCor8/followers","following_url":"https://api.github.com/users/TechCor8/following{/other_user}","gists_url":"https://api.github.com/users/TechCor8/gists{/gist_id}","starred_url":"https://api.github.com/users/TechCor8/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TechCor8/subscriptions","organizations_url":"https://api.github.com/users/TechCor8/orgs","repos_url":"https://api.github.com/users/TechCor8/repos","events_url":"https://api.github.com/users/TechCor8/events{/privacy}","received_events_url":"https://api.github.com/users/TechCor8/received_events","type":"User","site_admin":false},"html_url":"https://github.com/TechCor8/HFL","description":"Hacker's Function Library","fork":true,"url":"https://api.github.com/repos/TechCor8/HFL","forks_url":"https://api.github.com/repos/TechCor8/HFL/forks","keys_url":"https://api.github.com/repos/TechCor8/HFL/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TechCor8/HFL/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TechCor8/HFL/teams","hooks_url":"https://api.github.com/repos/TechCor8/HFL/hooks","issue_events_url":"https://api.github.com/repos/TechCor8/HFL/issues/events{/number}","events_url":"https://api.github.com/repos/TechCor8/HFL/events","assignees_url":"https://api.github.com/repos/TechCor8/HFL/assignees{/user}","branches_url":"https://api.github.com/repos/TechCor8/HFL/branches{/branch}","tags_url":"https://api.github.com/repos/TechCor8/HFL/tags","blobs_url":"https://api.github.com/repos/TechCor8/HFL/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TechCor8/HFL/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TechCor8/HFL/git/refs{/sha}","trees_url":"https://api.github.com/repos/TechCor8/HFL/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TechCor8/HFL/statuses/{sha}","languages_url":"https://api.github.com/repos/TechCor8/HFL/languages","stargazers_url":"https://api.github.com/repos/TechCor8/HFL/stargazers","contributors_url":"https://api.github.com/repos/TechCor8/HFL/contributors","subscribers_url":"https://api.github.com/repos/TechCor8/HFL/subscribers","subscription_url":"https://api.github.com/repos/TechCor8/HFL/subscription","commits_url":"https://api.github.com/repos/TechCor8/HFL/commits{/sha}","git_commits_url":"https://api.github.com/repos/TechCor8/HFL/git/commits{/sha}","comments_url":"https://api.github.com/repos/TechCor8/HFL/comments{/number}","issue_comment_url":"https://api.github.com/repos/TechCor8/HFL/issues/comments{/number}","contents_url":"https://api.github.com/repos/TechCor8/HFL/contents/{+path}","compare_url":"https://api.github.com/repos/TechCor8/HFL/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TechCor8/HFL/merges","archive_url":"https://api.github.com/repos/TechCor8/HFL/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TechCor8/HFL/downloads","issues_url":"https://api.github.com/repos/TechCor8/HFL/issues{/number}","pulls_url":"https://api.github.com/repos/TechCor8/HFL/pulls{/number}","milestones_url":"https://api.github.com/repos/TechCor8/HFL/milestones{/number}","notifications_url":"https://api.github.com/repos/TechCor8/HFL/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TechCor8/HFL/labels{/name}","releases_url":"https://api.github.com/repos/TechCor8/HFL/releases{/id}","deployments_url":"https://api.github.com/repos/TechCor8/HFL/deployments","created_at":"2019-12-31T15:33:51Z","updated_at":"2019-12-31T15:38:35Z","pushed_at":"2020-01-06T03:17:36Z","git_url":"git://github.com/TechCor8/HFL.git","ssh_url":"git@github.com:TechCor8/HFL.git","clone_url":"https://github.com/TechCor8/HFL.git","svn_url":"https://github.com/TechCor8/HFL","homepage":null,"size":162,"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,"disabled":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"OutpostUniverse:master","ref":"master","sha":"32ac4211680ecfac3fea091cb9adadb95ec633ac","user":{"login":"OutpostUniverse","id":22143588,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyMTQzNTg4","avatar_url":"https://avatars0.githubusercontent.com/u/22143588?v=4","gravatar_id":"","url":"https://api.github.com/users/OutpostUniverse","html_url":"https://github.com/OutpostUniverse","followers_url":"https://api.github.com/users/OutpostUniverse/followers","following_url":"https://api.github.com/users/OutpostUniverse/following{/other_user}","gists_url":"https://api.github.com/users/OutpostUniverse/gists{/gist_id}","starred_url":"https://api.github.com/users/OutpostUniverse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OutpostUniverse/subscriptions","organizations_url":"https://api.github.com/users/OutpostUniverse/orgs","repos_url":"https://api.github.com/users/OutpostUniverse/repos","events_url":"https://api.github.com/users/OutpostUniverse/events{/privacy}","received_events_url":"https://api.github.com/users/OutpostUniverse/received_events","type":"Organization","site_admin":false},"repo":{"id":113399299,"node_id":"MDEwOlJlcG9zaXRvcnkxMTMzOTkyOTk=","name":"HFL","full_name":"OutpostUniverse/HFL","private":false,"owner":{"login":"OutpostUniverse","id":22143588,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIyMTQzNTg4","avatar_url":"https://avatars0.githubusercontent.com/u/22143588?v=4","gravatar_id":"","url":"https://api.github.com/users/OutpostUniverse","html_url":"https://github.com/OutpostUniverse","followers_url":"https://api.github.com/users/OutpostUniverse/followers","following_url":"https://api.github.com/users/OutpostUniverse/following{/other_user}","gists_url":"https://api.github.com/users/OutpostUniverse/gists{/gist_id}","starred_url":"https://api.github.com/users/OutpostUniverse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OutpostUniverse/subscriptions","organizations_url":"https://api.github.com/users/OutpostUniverse/orgs","repos_url":"https://api.github.com/users/OutpostUniverse/repos","events_url":"https://api.github.com/users/OutpostUniverse/events{/privacy}","received_events_url":"https://api.github.com/users/OutpostUniverse/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/OutpostUniverse/HFL","description":"Hacker's Function Library","fork":false,"url":"https://api.github.com/repos/OutpostUniverse/HFL","forks_url":"https://api.github.com/repos/OutpostUniverse/HFL/forks","keys_url":"https://api.github.com/repos/OutpostUniverse/HFL/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OutpostUniverse/HFL/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OutpostUniverse/HFL/teams","hooks_url":"https://api.github.com/repos/OutpostUniverse/HFL/hooks","issue_events_url":"https://api.github.com/repos/OutpostUniverse/HFL/issues/events{/number}","events_url":"https://api.github.com/repos/OutpostUniverse/HFL/events","assignees_url":"https://api.github.com/repos/OutpostUniverse/HFL/assignees{/user}","branches_url":"https://api.github.com/repos/OutpostUniverse/HFL/branches{/branch}","tags_url":"https://api.github.com/repos/OutpostUniverse/HFL/tags","blobs_url":"https://api.github.com/repos/OutpostUniverse/HFL/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OutpostUniverse/HFL/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OutpostUniverse/HFL/git/refs{/sha}","trees_url":"https://api.github.com/repos/OutpostUniverse/HFL/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OutpostUniverse/HFL/statuses/{sha}","languages_url":"https://api.github.com/repos/OutpostUniverse/HFL/languages","stargazers_url":"https://api.github.com/repos/OutpostUniverse/HFL/stargazers","contributors_url":"https://api.github.com/repos/OutpostUniverse/HFL/contributors","subscribers_url":"https://api.github.com/repos/OutpostUniverse/HFL/subscribers","subscription_url":"https://api.github.com/repos/OutpostUniverse/HFL/subscription","commits_url":"https://api.github.com/repos/OutpostUniverse/HFL/commits{/sha}","git_commits_url":"https://api.github.com/repos/OutpostUniverse/HFL/git/commits{/sha}","comments_url":"https://api.github.com/repos/OutpostUniverse/HFL/comments{/number}","issue_comment_url":"https://api.github.com/repos/OutpostUniverse/HFL/issues/comments{/number}","contents_url":"https://api.github.com/repos/OutpostUniverse/HFL/contents/{+path}","compare_url":"https://api.github.com/repos/OutpostUniverse/HFL/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OutpostUniverse/HFL/merges","archive_url":"https://api.github.com/repos/OutpostUniverse/HFL/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OutpostUniverse/HFL/downloads","issues_url":"https://api.github.com/repos/OutpostUniverse/HFL/issues{/number}","pulls_url":"https://api.github.com/repos/OutpostUniverse/HFL/pulls{/number}","milestones_url":"https://api.github.com/repos/OutpostUniverse/HFL/milestones{/number}","notifications_url":"https://api.github.com/repos/OutpostUniverse/HFL/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OutpostUniverse/HFL/labels{/name}","releases_url":"https://api.github.com/repos/OutpostUniverse/HFL/releases{/id}","deployments_url":"https://api.github.com/repos/OutpostUniverse/HFL/deployments","created_at":"2017-12-07T03:41:49Z","updated_at":"2020-01-06T02:31:23Z","pushed_at":"2020-01-06T03:17:38Z","git_url":"git://github.com/OutpostUniverse/HFL.git","ssh_url":"git@github.com:OutpostUniverse/HFL.git","clone_url":"https://github.com/OutpostUniverse/HFL.git","svn_url":"https://github.com/OutpostUniverse/HFL","homepage":null,"size":199,"stargazers_count":1,"watchers_count":1,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":6,"license":null,"forks":2,"open_issues":6,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/OutpostUniverse/HFL/pulls/24"},"html":{"href":"https://github.com/OutpostUniverse/HFL/pull/24"},"issue":{"href":"https://api.github.com/repos/OutpostUniverse/HFL/issues/24"},"comments":{"href":"https://api.github.com/repos/OutpostUniverse/HFL/issues/24/comments"},"review_comments":{"href":"https://api.github.com/repos/OutpostUniverse/HFL/pulls/24/comments"},"review_comment":{"href":"https://api.github.com/repos/OutpostUniverse/HFL/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/OutpostUniverse/HFL/pulls/24/commits"},"statuses":{"href":"https://api.github.com/repos/OutpostUniverse/HFL/statuses/aefa8713192b4d97529f31fbb36ecf2e9edc8883"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"TechCor8"}}