{"action":"created","comment":{"url":"https://api.github.com/repos/scummvm/scummvm/pulls/comments/53279820","id":53279820,"diff_hunk":"@@ -0,0 +1,192 @@\n+/* ScummVM - Graphic Adventure Engine\n+ *\n+ * ScummVM is the legal property of its developers, whose names\n+ * are too numerous to list here. Please refer to the COPYRIGHT\n+ * file distributed with this source distribution.\n+ *\n+ * This program is free software; you can redistribute it and/or\n+ * modify it under the terms of the GNU General Public License\n+ * as published by the Free Software Foundation; either version 2\n+ * of the License, or (at your option) any later version.\n+ *\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public License\n+ * along with this program; if not, write to the Free Software\n+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n+ *\n+ */\n+\n+#ifndef SCI_GRAPHICS_LISTS32_H\n+#define SCI_GRAPHICS_LISTS32_H\n+\n+#include \"common/array.h\"\n+\n+namespace Sci {\n+\n+/**\n+ * StablePointerArray holds pointers in a fixed-size array\n+ * that maintains position of erased items until `pack` is\n+ * called. It is used by DrawList, RectList, and\n+ * ScreenItemList. StablePointerArray takes ownership of\n+ * all pointers that are passed to it and deletes them when\n+ * calling `erase` or when destroying the\n+ * StablePointerArray.\n+ */\n+template <class T, uint N>\n+class StablePointerArray {\n+\tuint _size;\n+\tT *_items[N];\n+\n+public:\n+\ttypedef T **iterator;\n+\ttypedef T *const *const_iterator;","path":"engines/sci/graphics/lists32.h","position":46,"original_position":46,"commit_id":"8a1d3bfbb00214f75096b432e8b44d549b3fe69b","original_commit_id":"8a1d3bfbb00214f75096b432e8b44d549b3fe69b","user":{"login":"csnover","id":229244,"avatar_url":"https://avatars.githubusercontent.com/u/229244?v=3","gravatar_id":"","url":"https://api.github.com/users/csnover","html_url":"https://github.com/csnover","followers_url":"https://api.github.com/users/csnover/followers","following_url":"https://api.github.com/users/csnover/following{/other_user}","gists_url":"https://api.github.com/users/csnover/gists{/gist_id}","starred_url":"https://api.github.com/users/csnover/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/csnover/subscriptions","organizations_url":"https://api.github.com/users/csnover/orgs","repos_url":"https://api.github.com/users/csnover/repos","events_url":"https://api.github.com/users/csnover/events{/privacy}","received_events_url":"https://api.github.com/users/csnover/received_events","type":"User","site_admin":false},"body":"Nope! `const T **const_iterator` (or `T const **const_iterator`) would be pointer to pointer to const T which is not correct. The pointer to T is what is const so this definition is what it is supposed to be.","created_at":"2016-02-18T07:37:15Z","updated_at":"2016-02-18T07:37:15Z","html_url":"https://github.com/scummvm/scummvm/pull/675#discussion_r53279820","pull_request_url":"https://api.github.com/repos/scummvm/scummvm/pulls/675","_links":{"self":{"href":"https://api.github.com/repos/scummvm/scummvm/pulls/comments/53279820"},"html":{"href":"https://github.com/scummvm/scummvm/pull/675#discussion_r53279820"},"pull_request":{"href":"https://api.github.com/repos/scummvm/scummvm/pulls/675"}}},"pull_request":{"url":"https://api.github.com/repos/scummvm/scummvm/pulls/675","id":59599327,"html_url":"https://github.com/scummvm/scummvm/pull/675","diff_url":"https://github.com/scummvm/scummvm/pull/675.diff","patch_url":"https://github.com/scummvm/scummvm/pull/675.patch","issue_url":"https://api.github.com/repos/scummvm/scummvm/issues/675","number":675,"state":"open","locked":false,"title":"SCI: SCI32 accurate graphics renderer","user":{"login":"csnover","id":229244,"avatar_url":"https://avatars.githubusercontent.com/u/229244?v=3","gravatar_id":"","url":"https://api.github.com/users/csnover","html_url":"https://github.com/csnover","followers_url":"https://api.github.com/users/csnover/followers","following_url":"https://api.github.com/users/csnover/following{/other_user}","gists_url":"https://api.github.com/users/csnover/gists{/gist_id}","starred_url":"https://api.github.com/users/csnover/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/csnover/subscriptions","organizations_url":"https://api.github.com/users/csnover/orgs","repos_url":"https://api.github.com/users/csnover/repos","events_url":"https://api.github.com/users/csnover/events{/privacy}","received_events_url":"https://api.github.com/users/csnover/received_events","type":"User","site_admin":false},"body":"Before anything, I have to give a special huge thanks to @wjp who did pretty much all of the work reversing the SCI calclists code, helped debug after the initial implementation was written, and found many of my most egregious bugs. Also thanks to everyone in IRC that has been following along and giving suggestions, advice, and information during the work: @m-kiewitz, @lordhoto, @lskovlun, @sev-, and some other folks who I can’t seem to find to list on GitHub. Thanks you all!! :+1: \r\n\r\nThis PR introduces SCI32 accurate renderer architecture. Many cel drawing methods still need to be implemented, but I already have some code from @wjp to fill out most of this, so my next goal will be to finish that up so the rendering code is all reasonably solid, then continue working on text bitmap rendering and ScrollWindow, which are incomplete and known regressions from the old hacked code. So far probably like 75% or more of cel drawing already works since only a few draw methods are used most frequently. Depending on how people feel about it I may just start doing this work directly in master; let me know your thoughts. Eventually I will even get back to kSetShowStyle which is what I was trying to implement in the first place!\r\n\r\nThe only thing I am terribly nervous about here is the change to `Common::Array`, since obviously that is going to be exposed everywhere. I think it’s working, but I could use some extra eyes since it is entirely plausible that I made a really dumb mistake (I would have added unit tests… ¬_¬) and it is only a few lines.\r\n\r\nHopefully everything is reasonably clear and easy to review, I don’t expect a full review here from anyone since there’s a lot of known-still-busted stuff and it’s a lot of code, but I did just want to give everyone the opportunity to at least +1/-1 on the commit breakdown before I just start dumping code into master. I pinky swear I compiled in C++11 and C++98 modes and once again with SCI32 disabled and I checked EcoQuest and it’s great and oh god it’s going to break on MSVC anyway isn’t it, oh well. 🙉\r\n\r\nThanks,","created_at":"2016-02-17T05:49:28Z","updated_at":"2016-02-18T07:37:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"db05bffc3ce66ae545a50399a95dab12edbf3eae","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/scummvm/scummvm/pulls/675/commits","review_comments_url":"https://api.github.com/repos/scummvm/scummvm/pulls/675/comments","review_comment_url":"https://api.github.com/repos/scummvm/scummvm/pulls/comments{/number}","comments_url":"https://api.github.com/repos/scummvm/scummvm/issues/675/comments","statuses_url":"https://api.github.com/repos/scummvm/scummvm/statuses/8a1d3bfbb00214f75096b432e8b44d549b3fe69b","head":{"label":"csnover:sci32-accurate-renderer","ref":"sci32-accurate-renderer","sha":"8a1d3bfbb00214f75096b432e8b44d549b3fe69b","user":{"login":"csnover","id":229244,"avatar_url":"https://avatars.githubusercontent.com/u/229244?v=3","gravatar_id":"","url":"https://api.github.com/users/csnover","html_url":"https://github.com/csnover","followers_url":"https://api.github.com/users/csnover/followers","following_url":"https://api.github.com/users/csnover/following{/other_user}","gists_url":"https://api.github.com/users/csnover/gists{/gist_id}","starred_url":"https://api.github.com/users/csnover/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/csnover/subscriptions","organizations_url":"https://api.github.com/users/csnover/orgs","repos_url":"https://api.github.com/users/csnover/repos","events_url":"https://api.github.com/users/csnover/events{/privacy}","received_events_url":"https://api.github.com/users/csnover/received_events","type":"User","site_admin":false},"repo":{"id":40680302,"name":"scummvm","full_name":"csnover/scummvm","owner":{"login":"csnover","id":229244,"avatar_url":"https://avatars.githubusercontent.com/u/229244?v=3","gravatar_id":"","url":"https://api.github.com/users/csnover","html_url":"https://github.com/csnover","followers_url":"https://api.github.com/users/csnover/followers","following_url":"https://api.github.com/users/csnover/following{/other_user}","gists_url":"https://api.github.com/users/csnover/gists{/gist_id}","starred_url":"https://api.github.com/users/csnover/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/csnover/subscriptions","organizations_url":"https://api.github.com/users/csnover/orgs","repos_url":"https://api.github.com/users/csnover/repos","events_url":"https://api.github.com/users/csnover/events{/privacy}","received_events_url":"https://api.github.com/users/csnover/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/csnover/scummvm","description":"ScummVM main repository","fork":true,"url":"https://api.github.com/repos/csnover/scummvm","forks_url":"https://api.github.com/repos/csnover/scummvm/forks","keys_url":"https://api.github.com/repos/csnover/scummvm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/csnover/scummvm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/csnover/scummvm/teams","hooks_url":"https://api.github.com/repos/csnover/scummvm/hooks","issue_events_url":"https://api.github.com/repos/csnover/scummvm/issues/events{/number}","events_url":"https://api.github.com/repos/csnover/scummvm/events","assignees_url":"https://api.github.com/repos/csnover/scummvm/assignees{/user}","branches_url":"https://api.github.com/repos/csnover/scummvm/branches{/branch}","tags_url":"https://api.github.com/repos/csnover/scummvm/tags","blobs_url":"https://api.github.com/repos/csnover/scummvm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/csnover/scummvm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/csnover/scummvm/git/refs{/sha}","trees_url":"https://api.github.com/repos/csnover/scummvm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/csnover/scummvm/statuses/{sha}","languages_url":"https://api.github.com/repos/csnover/scummvm/languages","stargazers_url":"https://api.github.com/repos/csnover/scummvm/stargazers","contributors_url":"https://api.github.com/repos/csnover/scummvm/contributors","subscribers_url":"https://api.github.com/repos/csnover/scummvm/subscribers","subscription_url":"https://api.github.com/repos/csnover/scummvm/subscription","commits_url":"https://api.github.com/repos/csnover/scummvm/commits{/sha}","git_commits_url":"https://api.github.com/repos/csnover/scummvm/git/commits{/sha}","comments_url":"https://api.github.com/repos/csnover/scummvm/comments{/number}","issue_comment_url":"https://api.github.com/repos/csnover/scummvm/issues/comments{/number}","contents_url":"https://api.github.com/repos/csnover/scummvm/contents/{+path}","compare_url":"https://api.github.com/repos/csnover/scummvm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/csnover/scummvm/merges","archive_url":"https://api.github.com/repos/csnover/scummvm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/csnover/scummvm/downloads","issues_url":"https://api.github.com/repos/csnover/scummvm/issues{/number}","pulls_url":"https://api.github.com/repos/csnover/scummvm/pulls{/number}","milestones_url":"https://api.github.com/repos/csnover/scummvm/milestones{/number}","notifications_url":"https://api.github.com/repos/csnover/scummvm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/csnover/scummvm/labels{/name}","releases_url":"https://api.github.com/repos/csnover/scummvm/releases{/id}","deployments_url":"https://api.github.com/repos/csnover/scummvm/deployments","created_at":"2015-08-13T20:29:41Z","updated_at":"2016-02-16T22:52:47Z","pushed_at":"2016-02-18T06:54:29Z","git_url":"git://github.com/csnover/scummvm.git","ssh_url":"git@github.com:csnover/scummvm.git","clone_url":"https://github.com/csnover/scummvm.git","svn_url":"https://github.com/csnover/scummvm","homepage":"http://www.scummvm.org/","size":191577,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"scummvm:master","ref":"master","sha":"4d85aa193c5d9df2a8ee6352b885b6c9be8d1b76","user":{"login":"scummvm","id":365181,"avatar_url":"https://avatars.githubusercontent.com/u/365181?v=3","gravatar_id":"","url":"https://api.github.com/users/scummvm","html_url":"https://github.com/scummvm","followers_url":"https://api.github.com/users/scummvm/followers","following_url":"https://api.github.com/users/scummvm/following{/other_user}","gists_url":"https://api.github.com/users/scummvm/gists{/gist_id}","starred_url":"https://api.github.com/users/scummvm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scummvm/subscriptions","organizations_url":"https://api.github.com/users/scummvm/orgs","repos_url":"https://api.github.com/users/scummvm/repos","events_url":"https://api.github.com/users/scummvm/events{/privacy}","received_events_url":"https://api.github.com/users/scummvm/received_events","type":"Organization","site_admin":false},"repo":{"id":1358940,"name":"scummvm","full_name":"scummvm/scummvm","owner":{"login":"scummvm","id":365181,"avatar_url":"https://avatars.githubusercontent.com/u/365181?v=3","gravatar_id":"","url":"https://api.github.com/users/scummvm","html_url":"https://github.com/scummvm","followers_url":"https://api.github.com/users/scummvm/followers","following_url":"https://api.github.com/users/scummvm/following{/other_user}","gists_url":"https://api.github.com/users/scummvm/gists{/gist_id}","starred_url":"https://api.github.com/users/scummvm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scummvm/subscriptions","organizations_url":"https://api.github.com/users/scummvm/orgs","repos_url":"https://api.github.com/users/scummvm/repos","events_url":"https://api.github.com/users/scummvm/events{/privacy}","received_events_url":"https://api.github.com/users/scummvm/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/scummvm/scummvm","description":"ScummVM main repository","fork":false,"url":"https://api.github.com/repos/scummvm/scummvm","forks_url":"https://api.github.com/repos/scummvm/scummvm/forks","keys_url":"https://api.github.com/repos/scummvm/scummvm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/scummvm/scummvm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/scummvm/scummvm/teams","hooks_url":"https://api.github.com/repos/scummvm/scummvm/hooks","issue_events_url":"https://api.github.com/repos/scummvm/scummvm/issues/events{/number}","events_url":"https://api.github.com/repos/scummvm/scummvm/events","assignees_url":"https://api.github.com/repos/scummvm/scummvm/assignees{/user}","branches_url":"https://api.github.com/repos/scummvm/scummvm/branches{/branch}","tags_url":"https://api.github.com/repos/scummvm/scummvm/tags","blobs_url":"https://api.github.com/repos/scummvm/scummvm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/scummvm/scummvm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/scummvm/scummvm/git/refs{/sha}","trees_url":"https://api.github.com/repos/scummvm/scummvm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/scummvm/scummvm/statuses/{sha}","languages_url":"https://api.github.com/repos/scummvm/scummvm/languages","stargazers_url":"https://api.github.com/repos/scummvm/scummvm/stargazers","contributors_url":"https://api.github.com/repos/scummvm/scummvm/contributors","subscribers_url":"https://api.github.com/repos/scummvm/scummvm/subscribers","subscription_url":"https://api.github.com/repos/scummvm/scummvm/subscription","commits_url":"https://api.github.com/repos/scummvm/scummvm/commits{/sha}","git_commits_url":"https://api.github.com/repos/scummvm/scummvm/git/commits{/sha}","comments_url":"https://api.github.com/repos/scummvm/scummvm/comments{/number}","issue_comment_url":"https://api.github.com/repos/scummvm/scummvm/issues/comments{/number}","contents_url":"https://api.github.com/repos/scummvm/scummvm/contents/{+path}","compare_url":"https://api.github.com/repos/scummvm/scummvm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/scummvm/scummvm/merges","archive_url":"https://api.github.com/repos/scummvm/scummvm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/scummvm/scummvm/downloads","issues_url":"https://api.github.com/repos/scummvm/scummvm/issues{/number}","pulls_url":"https://api.github.com/repos/scummvm/scummvm/pulls{/number}","milestones_url":"https://api.github.com/repos/scummvm/scummvm/milestones{/number}","notifications_url":"https://api.github.com/repos/scummvm/scummvm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/scummvm/scummvm/labels{/name}","releases_url":"https://api.github.com/repos/scummvm/scummvm/releases{/id}","deployments_url":"https://api.github.com/repos/scummvm/scummvm/deployments","created_at":"2011-02-12T15:50:57Z","updated_at":"2016-02-16T10:56:54Z","pushed_at":"2016-02-18T05:14:03Z","git_url":"git://github.com/scummvm/scummvm.git","ssh_url":"git@github.com:scummvm/scummvm.git","clone_url":"https://github.com/scummvm/scummvm.git","svn_url":"https://github.com/scummvm/scummvm","homepage":"http://www.scummvm.org/","size":217648,"stargazers_count":570,"watchers_count":570,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":284,"mirror_url":null,"open_issues_count":21,"forks":284,"open_issues":21,"watchers":570,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/scummvm/scummvm/pulls/675"},"html":{"href":"https://github.com/scummvm/scummvm/pull/675"},"issue":{"href":"https://api.github.com/repos/scummvm/scummvm/issues/675"},"comments":{"href":"https://api.github.com/repos/scummvm/scummvm/issues/675/comments"},"review_comments":{"href":"https://api.github.com/repos/scummvm/scummvm/pulls/675/comments"},"review_comment":{"href":"https://api.github.com/repos/scummvm/scummvm/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/scummvm/scummvm/pulls/675/commits"},"statuses":{"href":"https://api.github.com/repos/scummvm/scummvm/statuses/8a1d3bfbb00214f75096b432e8b44d549b3fe69b"}}}}