{"action":"created","comment":{"url":"https://api.github.com/repos/thasti/LittleComputerPeople/pulls/comments/22405915","id":22405915,"diff_hunk":"@@ -41,34 +162,207 @@ protected void onDraw(Canvas canvas){\n \n         // find out which room to draw\n         //TODO should be replaced by a proper find() in the list\n-        for (Iterator<Room> iter = roomList.iterator(); iter.hasNext(); ) {\n-            Room room = iter.next();\n-            if (room.getRoomID() == GlobalInformation.getCurrentRoom()) {\n-                drawRoom = room;\n+\n+        if(lastRoom != aktRoomID) {                                                 //hat sich lastroom gegenüber dem letzten Aufruf geändert? wenn ja dann lade den aktuellen Raum\n+            for (Iterator<Room> iter = World.getAllRooms().iterator(); iter.hasNext(); ) {\n+                Room room = iter.next();\n+                if (room.getID() == aktRoomID) {\n+                    drawRoom = room;\n+                    drawRoomB = Bitmap.createScaledBitmap(\n+                            BitmapFactory.decodeResource(resources, room.getPicResource()),\n+                            GlobalInformation.getScreenWidth(),\n+                            GlobalInformation.getScreenHeight(),\n+                            false);\n+                    lastRoom = room.getID();\n+                }\n             }\n         }\n+\n         if (drawRoom == null) {\n             // room not found\n             drawRoom = roomList.get(0);\n         }\n \n+        //Animation für das Subjekt, übernommen aus Subjekt\n+        /*****************************************************************************************/\n+        intel.tick();                   //KI aufrufen\n+        //hier muss später noch ein Aufruf zum ändern der Animation eingefügt werden, z.B. durch die KI oder durch RoomActivity selbst\n+        switch (animation) {\n+            case 0:     calculatePosition();\n+                        break;\n+\n+            //Weiter Switch-Cases für weitere Animationen\n+\n+            default:    aktBitmap = subjStandBitmap;        //entweder das oder eine Fehlermeldung\n+                        break;\n+        }\n+        //calculatePosition();\n+\n+        /*****************************************************************************************/\n+\n+\n         // draw the background image\n-        canvas.drawBitmap(drawRoom.getBitmapRoom(), 0, 0, p);\n+        canvas.drawBitmap(drawRoomB, 0, 0, p);\n \n         // draw all items (TODO: add layering)\n-        List<Item> drawItems = drawRoom.getItemList();\n-        \n-        for (Iterator<Item> iter = drawItems.iterator(); iter.hasNext(); ){\n-            Item obj = iter.next();\n-            canvas.drawBitmap(obj.getBitmapO(), obj.getxPos(), obj.getyPos(), p);\n+\n+        for (Iterator<Item> iter = World.getAllItems().iterator(); iter.hasNext(); ){\n+            Item item = iter.next();\n+            int ID = item.getPicresource();\n+            for (Iterator<Integer> id = drawRoom.getContainingitems().iterator(); id.hasNext(); ){\n+                if(id.next() == ID){\n+                    canvas.drawBitmap(\n+                            BitmapFactory.decodeResource(resources, item.getPicresource()),","path":"src/com/example/Demo_Subj/RoomView.java","position":225,"original_position":225,"commit_id":"f12e3ac8f33e20db02ac5a88e2a85a6c19ed1578","original_commit_id":"f12e3ac8f33e20db02ac5a88e2a85a6c19ed1578","user":{"login":"thasti","id":6706965,"avatar_url":"https://avatars.githubusercontent.com/u/6706965?v=3","gravatar_id":"","url":"https://api.github.com/users/thasti","html_url":"https://github.com/thasti","followers_url":"https://api.github.com/users/thasti/followers","following_url":"https://api.github.com/users/thasti/following{/other_user}","gists_url":"https://api.github.com/users/thasti/gists{/gist_id}","starred_url":"https://api.github.com/users/thasti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thasti/subscriptions","organizations_url":"https://api.github.com/users/thasti/orgs","repos_url":"https://api.github.com/users/thasti/repos","events_url":"https://api.github.com/users/thasti/events{/privacy}","received_events_url":"https://api.github.com/users/thasti/received_events","type":"User","site_admin":false},"body":"Die X- und Y-Koordinaten müssen noch mit Bildschirmbreite und -höhe multipliziert werden - in der XML stehen nur noch Werte von 0 bis 1 für die Koordinaten - sonst läuft das ja nicht auf verschiedenen Displaygrößen.","created_at":"2015-01-02T07:53:10Z","updated_at":"2015-01-02T07:53:10Z","html_url":"https://github.com/thasti/LittleComputerPeople/pull/31#discussion_r22405915","pull_request_url":"https://api.github.com/repos/thasti/LittleComputerPeople/pulls/31","_links":{"self":{"href":"https://api.github.com/repos/thasti/LittleComputerPeople/pulls/comments/22405915"},"html":{"href":"https://github.com/thasti/LittleComputerPeople/pull/31#discussion_r22405915"},"pull_request":{"href":"https://api.github.com/repos/thasti/LittleComputerPeople/pulls/31"}}},"pull_request":{"url":"https://api.github.com/repos/thasti/LittleComputerPeople/pulls/31","id":26744745,"html_url":"https://github.com/thasti/LittleComputerPeople/pull/31","diff_url":"https://github.com/thasti/LittleComputerPeople/pull/31.diff","patch_url":"https://github.com/thasti/LittleComputerPeople/pull/31.patch","issue_url":"https://api.github.com/repos/thasti/LittleComputerPeople/issues/31","number":31,"state":"open","locked":false,"title":"RoomView","user":{"login":"Ash0n","id":10048256,"avatar_url":"https://avatars.githubusercontent.com/u/10048256?v=3","gravatar_id":"","url":"https://api.github.com/users/Ash0n","html_url":"https://github.com/Ash0n","followers_url":"https://api.github.com/users/Ash0n/followers","following_url":"https://api.github.com/users/Ash0n/following{/other_user}","gists_url":"https://api.github.com/users/Ash0n/gists{/gist_id}","starred_url":"https://api.github.com/users/Ash0n/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ash0n/subscriptions","organizations_url":"https://api.github.com/users/Ash0n/orgs","repos_url":"https://api.github.com/users/Ash0n/repos","events_url":"https://api.github.com/users/Ash0n/events{/privacy}","received_events_url":"https://api.github.com/users/Ash0n/received_events","type":"User","site_admin":false},"body":"RoomView übernimmt Aufgaben von Subject und RoomActivity","created_at":"2015-01-01T17:17:44Z","updated_at":"2015-01-02T07:53:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/thasti/LittleComputerPeople/pulls/31/commits","review_comments_url":"https://api.github.com/repos/thasti/LittleComputerPeople/pulls/31/comments","review_comment_url":"https://api.github.com/repos/thasti/LittleComputerPeople/pulls/comments/{number}","comments_url":"https://api.github.com/repos/thasti/LittleComputerPeople/issues/31/comments","statuses_url":"https://api.github.com/repos/thasti/LittleComputerPeople/statuses/f12e3ac8f33e20db02ac5a88e2a85a6c19ed1578","head":{"label":"Ash0n:master","ref":"master","sha":"f12e3ac8f33e20db02ac5a88e2a85a6c19ed1578","user":{"login":"Ash0n","id":10048256,"avatar_url":"https://avatars.githubusercontent.com/u/10048256?v=3","gravatar_id":"","url":"https://api.github.com/users/Ash0n","html_url":"https://github.com/Ash0n","followers_url":"https://api.github.com/users/Ash0n/followers","following_url":"https://api.github.com/users/Ash0n/following{/other_user}","gists_url":"https://api.github.com/users/Ash0n/gists{/gist_id}","starred_url":"https://api.github.com/users/Ash0n/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ash0n/subscriptions","organizations_url":"https://api.github.com/users/Ash0n/orgs","repos_url":"https://api.github.com/users/Ash0n/repos","events_url":"https://api.github.com/users/Ash0n/events{/privacy}","received_events_url":"https://api.github.com/users/Ash0n/received_events","type":"User","site_admin":false},"repo":{"id":27586214,"name":"LittleComputerPeople","full_name":"Ash0n/LittleComputerPeople","owner":{"login":"Ash0n","id":10048256,"avatar_url":"https://avatars.githubusercontent.com/u/10048256?v=3","gravatar_id":"","url":"https://api.github.com/users/Ash0n","html_url":"https://github.com/Ash0n","followers_url":"https://api.github.com/users/Ash0n/followers","following_url":"https://api.github.com/users/Ash0n/following{/other_user}","gists_url":"https://api.github.com/users/Ash0n/gists{/gist_id}","starred_url":"https://api.github.com/users/Ash0n/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ash0n/subscriptions","organizations_url":"https://api.github.com/users/Ash0n/orgs","repos_url":"https://api.github.com/users/Ash0n/repos","events_url":"https://api.github.com/users/Ash0n/events{/privacy}","received_events_url":"https://api.github.com/users/Ash0n/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Ash0n/LittleComputerPeople","description":"SWT Project WS2014/2015","fork":true,"url":"https://api.github.com/repos/Ash0n/LittleComputerPeople","forks_url":"https://api.github.com/repos/Ash0n/LittleComputerPeople/forks","keys_url":"https://api.github.com/repos/Ash0n/LittleComputerPeople/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Ash0n/LittleComputerPeople/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Ash0n/LittleComputerPeople/teams","hooks_url":"https://api.github.com/repos/Ash0n/LittleComputerPeople/hooks","issue_events_url":"https://api.github.com/repos/Ash0n/LittleComputerPeople/issues/events{/number}","events_url":"https://api.github.com/repos/Ash0n/LittleComputerPeople/events","assignees_url":"https://api.github.com/repos/Ash0n/LittleComputerPeople/assignees{/user}","branches_url":"https://api.github.com/repos/Ash0n/LittleComputerPeople/branches{/branch}","tags_url":"https://api.github.com/repos/Ash0n/LittleComputerPeople/tags","blobs_url":"https://api.github.com/repos/Ash0n/LittleComputerPeople/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Ash0n/LittleComputerPeople/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Ash0n/LittleComputerPeople/git/refs{/sha}","trees_url":"https://api.github.com/repos/Ash0n/LittleComputerPeople/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Ash0n/LittleComputerPeople/statuses/{sha}","languages_url":"https://api.github.com/repos/Ash0n/LittleComputerPeople/languages","stargazers_url":"https://api.github.com/repos/Ash0n/LittleComputerPeople/stargazers","contributors_url":"https://api.github.com/repos/Ash0n/LittleComputerPeople/contributors","subscribers_url":"https://api.github.com/repos/Ash0n/LittleComputerPeople/subscribers","subscription_url":"https://api.github.com/repos/Ash0n/LittleComputerPeople/subscription","commits_url":"https://api.github.com/repos/Ash0n/LittleComputerPeople/commits{/sha}","git_commits_url":"https://api.github.com/repos/Ash0n/LittleComputerPeople/git/commits{/sha}","comments_url":"https://api.github.com/repos/Ash0n/LittleComputerPeople/comments{/number}","issue_comment_url":"https://api.github.com/repos/Ash0n/LittleComputerPeople/issues/comments/{number}","contents_url":"https://api.github.com/repos/Ash0n/LittleComputerPeople/contents/{+path}","compare_url":"https://api.github.com/repos/Ash0n/LittleComputerPeople/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Ash0n/LittleComputerPeople/merges","archive_url":"https://api.github.com/repos/Ash0n/LittleComputerPeople/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Ash0n/LittleComputerPeople/downloads","issues_url":"https://api.github.com/repos/Ash0n/LittleComputerPeople/issues{/number}","pulls_url":"https://api.github.com/repos/Ash0n/LittleComputerPeople/pulls{/number}","milestones_url":"https://api.github.com/repos/Ash0n/LittleComputerPeople/milestones{/number}","notifications_url":"https://api.github.com/repos/Ash0n/LittleComputerPeople/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Ash0n/LittleComputerPeople/labels{/name}","releases_url":"https://api.github.com/repos/Ash0n/LittleComputerPeople/releases{/id}","created_at":"2014-12-05T10:21:40Z","updated_at":"2015-01-01T21:43:21Z","pushed_at":"2015-01-01T21:43:20Z","git_url":"git://github.com/Ash0n/LittleComputerPeople.git","ssh_url":"git@github.com:Ash0n/LittleComputerPeople.git","clone_url":"https://github.com/Ash0n/LittleComputerPeople.git","svn_url":"https://github.com/Ash0n/LittleComputerPeople","homepage":"","size":9939,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"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":"thasti:master","ref":"master","sha":"5ca3fd858cb2d36d5e0fa7d65dfa2b773b88ad2b","user":{"login":"thasti","id":6706965,"avatar_url":"https://avatars.githubusercontent.com/u/6706965?v=3","gravatar_id":"","url":"https://api.github.com/users/thasti","html_url":"https://github.com/thasti","followers_url":"https://api.github.com/users/thasti/followers","following_url":"https://api.github.com/users/thasti/following{/other_user}","gists_url":"https://api.github.com/users/thasti/gists{/gist_id}","starred_url":"https://api.github.com/users/thasti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thasti/subscriptions","organizations_url":"https://api.github.com/users/thasti/orgs","repos_url":"https://api.github.com/users/thasti/repos","events_url":"https://api.github.com/users/thasti/events{/privacy}","received_events_url":"https://api.github.com/users/thasti/received_events","type":"User","site_admin":false},"repo":{"id":27178317,"name":"LittleComputerPeople","full_name":"thasti/LittleComputerPeople","owner":{"login":"thasti","id":6706965,"avatar_url":"https://avatars.githubusercontent.com/u/6706965?v=3","gravatar_id":"","url":"https://api.github.com/users/thasti","html_url":"https://github.com/thasti","followers_url":"https://api.github.com/users/thasti/followers","following_url":"https://api.github.com/users/thasti/following{/other_user}","gists_url":"https://api.github.com/users/thasti/gists{/gist_id}","starred_url":"https://api.github.com/users/thasti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thasti/subscriptions","organizations_url":"https://api.github.com/users/thasti/orgs","repos_url":"https://api.github.com/users/thasti/repos","events_url":"https://api.github.com/users/thasti/events{/privacy}","received_events_url":"https://api.github.com/users/thasti/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/thasti/LittleComputerPeople","description":"SWT Project WS2014/2015","fork":false,"url":"https://api.github.com/repos/thasti/LittleComputerPeople","forks_url":"https://api.github.com/repos/thasti/LittleComputerPeople/forks","keys_url":"https://api.github.com/repos/thasti/LittleComputerPeople/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thasti/LittleComputerPeople/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thasti/LittleComputerPeople/teams","hooks_url":"https://api.github.com/repos/thasti/LittleComputerPeople/hooks","issue_events_url":"https://api.github.com/repos/thasti/LittleComputerPeople/issues/events{/number}","events_url":"https://api.github.com/repos/thasti/LittleComputerPeople/events","assignees_url":"https://api.github.com/repos/thasti/LittleComputerPeople/assignees{/user}","branches_url":"https://api.github.com/repos/thasti/LittleComputerPeople/branches{/branch}","tags_url":"https://api.github.com/repos/thasti/LittleComputerPeople/tags","blobs_url":"https://api.github.com/repos/thasti/LittleComputerPeople/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thasti/LittleComputerPeople/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thasti/LittleComputerPeople/git/refs{/sha}","trees_url":"https://api.github.com/repos/thasti/LittleComputerPeople/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thasti/LittleComputerPeople/statuses/{sha}","languages_url":"https://api.github.com/repos/thasti/LittleComputerPeople/languages","stargazers_url":"https://api.github.com/repos/thasti/LittleComputerPeople/stargazers","contributors_url":"https://api.github.com/repos/thasti/LittleComputerPeople/contributors","subscribers_url":"https://api.github.com/repos/thasti/LittleComputerPeople/subscribers","subscription_url":"https://api.github.com/repos/thasti/LittleComputerPeople/subscription","commits_url":"https://api.github.com/repos/thasti/LittleComputerPeople/commits{/sha}","git_commits_url":"https://api.github.com/repos/thasti/LittleComputerPeople/git/commits{/sha}","comments_url":"https://api.github.com/repos/thasti/LittleComputerPeople/comments{/number}","issue_comment_url":"https://api.github.com/repos/thasti/LittleComputerPeople/issues/comments/{number}","contents_url":"https://api.github.com/repos/thasti/LittleComputerPeople/contents/{+path}","compare_url":"https://api.github.com/repos/thasti/LittleComputerPeople/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thasti/LittleComputerPeople/merges","archive_url":"https://api.github.com/repos/thasti/LittleComputerPeople/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thasti/LittleComputerPeople/downloads","issues_url":"https://api.github.com/repos/thasti/LittleComputerPeople/issues{/number}","pulls_url":"https://api.github.com/repos/thasti/LittleComputerPeople/pulls{/number}","milestones_url":"https://api.github.com/repos/thasti/LittleComputerPeople/milestones{/number}","notifications_url":"https://api.github.com/repos/thasti/LittleComputerPeople/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thasti/LittleComputerPeople/labels{/name}","releases_url":"https://api.github.com/repos/thasti/LittleComputerPeople/releases{/id}","created_at":"2014-11-26T13:36:48Z","updated_at":"2014-12-28T16:37:10Z","pushed_at":"2014-12-28T16:37:10Z","git_url":"git://github.com/thasti/LittleComputerPeople.git","ssh_url":"git@github.com:thasti/LittleComputerPeople.git","clone_url":"https://github.com/thasti/LittleComputerPeople.git","svn_url":"https://github.com/thasti/LittleComputerPeople","homepage":"","size":10283,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"open_issues_count":7,"forks":7,"open_issues":7,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/thasti/LittleComputerPeople/pulls/31"},"html":{"href":"https://github.com/thasti/LittleComputerPeople/pull/31"},"issue":{"href":"https://api.github.com/repos/thasti/LittleComputerPeople/issues/31"},"comments":{"href":"https://api.github.com/repos/thasti/LittleComputerPeople/issues/31/comments"},"review_comments":{"href":"https://api.github.com/repos/thasti/LittleComputerPeople/pulls/31/comments"},"review_comment":{"href":"https://api.github.com/repos/thasti/LittleComputerPeople/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/thasti/LittleComputerPeople/pulls/31/commits"},"statuses":{"href":"https://api.github.com/repos/thasti/LittleComputerPeople/statuses/f12e3ac8f33e20db02ac5a88e2a85a6c19ed1578"}}}}