{"action":"created","issue":{"url":"https://api.github.com/repos/krzys-h/UndertaleModTool/issues/4","repository_url":"https://api.github.com/repos/krzys-h/UndertaleModTool","labels_url":"https://api.github.com/repos/krzys-h/UndertaleModTool/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/krzys-h/UndertaleModTool/issues/4/comments","events_url":"https://api.github.com/repos/krzys-h/UndertaleModTool/issues/4/events","html_url":"https://github.com/krzys-h/UndertaleModTool/issues/4","id":360661852,"node_id":"MDU6SXNzdWUzNjA2NjE4NTI=","number":4,"title":"EXTN chunk is not implemented, so I just (roughly) fully documented it.","user":{"login":"colinator27","id":17358554,"node_id":"MDQ6VXNlcjE3MzU4NTU0","avatar_url":"https://avatars1.githubusercontent.com/u/17358554?v=4","gravatar_id":"","url":"https://api.github.com/users/colinator27","html_url":"https://github.com/colinator27","followers_url":"https://api.github.com/users/colinator27/followers","following_url":"https://api.github.com/users/colinator27/following{/other_user}","gists_url":"https://api.github.com/users/colinator27/gists{/gist_id}","starred_url":"https://api.github.com/users/colinator27/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/colinator27/subscriptions","organizations_url":"https://api.github.com/users/colinator27/orgs","repos_url":"https://api.github.com/users/colinator27/repos","events_url":"https://api.github.com/users/colinator27/events{/privacy}","received_events_url":"https://api.github.com/users/colinator27/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-09-16T17:48:02Z","updated_at":"2018-09-16T22:27:26Z","closed_at":null,"author_association":"NONE","body":"With some analysis of the latest GameMaker compiler and some testing of my own, I managed to figure out exactly how the EXTN chunk is formatted. It's actually pretty simple. I may do some more of this for another chunk later on. \r\n\r\nHere are the notes I took down, sorry if it's a little messy (indentation should be pretty obvious?):\r\n\r\n```\r\nEXTN: ListChunk\r\n---\r\n<normal FourCC and chunk length in every chunk>\r\n\r\nInt32 - Count of (used) extensions\r\n<normal list of 32-bit int pointers to item data, like other ListChunks, using count of used extensions>\r\n\r\nEach item:\r\n 32-bit string pointer to empty string: literally \"\" (just a null terminator), always (hardcoded seemingly)\r\n 32-bit string pointer to extension name (Name)\r\n 32-bit string pointer to class name (ClassName)\r\n \r\n List of \"extension includes\" (files), takes format of List<T>:\r\n  Int32 - Count\r\n  <list of 32-bit pointers to each item, as in List<T> format>\r\n  \r\n  Each item:\r\n   32-bit string pointer to filename (Filename)\r\n   32-bit string pointer to name of function called when game ends, as stored in the extension file, not as referenced in GameMaker, unless they are the same (Final)\r\n   32-bit string pointer to name of function called when extension initializes, as stored in the extension file, not as referenced in GameMaker, unless they are the same (Init)\r\n   Int32 - extension type/kind, value taken directly from project file (Kind)\r\n    0 -> unknown; likely unused\r\n    1 -> DLL\r\n    2 -> GML \"placeholder\"\r\n    3 -> unknown, but potentially used before GM:S\r\n    4 -> either an included data file, or a \"generic placeholder\" file\r\n    5 -> JS \"placeholder\"\r\n    \r\n   List of functions in the include file (if Kind is 2 [which is \"GML placeholder\"], then this is always empty):\r\n    Int32 - Count\r\n    <list of 32-bit pointers to each item, as in List<T> format>\r\n    \r\n    Each item:\r\n     32-bit string pointer to function name, as referenced in GameMaker (Name)\r\n     Int32 - function ID (Id) - just a unique ID of some kind (very likely based on code analysis, incrementing)\r\n     Int32 - function type/kind (Kind)\r\n      \r\n     Int32 - function return type (ReturnType). Value taken directly from project file:\r\n      1 -> string\r\n      2 -> double\r\n     \r\n     32-bit string pointer to external function name (in the external file); not as it is referenced in GameMaker code, unless they are identical (ExtName)\r\n     \r\n     Int32 - Count of arguments\r\n     Array (NOT a List-type thing) of Int32, count of items is the \"Count of arguments\" just stated - represents each argument's type. Value taken directly from project file:\r\n      1 -> string\r\n      2 -> double\r\n```\r\n\r\nSo, anyway, I guess this issue could be used to track the implementation of the EXTN chunk in the tool/lib, unless this isn't meant to be where this is done."},"comment":{"url":"https://api.github.com/repos/krzys-h/UndertaleModTool/issues/comments/421844420","html_url":"https://github.com/krzys-h/UndertaleModTool/issues/4#issuecomment-421844420","issue_url":"https://api.github.com/repos/krzys-h/UndertaleModTool/issues/4","id":421844420,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMTg0NDQyMA==","user":{"login":"colinator27","id":17358554,"node_id":"MDQ6VXNlcjE3MzU4NTU0","avatar_url":"https://avatars1.githubusercontent.com/u/17358554?v=4","gravatar_id":"","url":"https://api.github.com/users/colinator27","html_url":"https://github.com/colinator27","followers_url":"https://api.github.com/users/colinator27/followers","following_url":"https://api.github.com/users/colinator27/following{/other_user}","gists_url":"https://api.github.com/users/colinator27/gists{/gist_id}","starred_url":"https://api.github.com/users/colinator27/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/colinator27/subscriptions","organizations_url":"https://api.github.com/users/colinator27/orgs","repos_url":"https://api.github.com/users/colinator27/repos","events_url":"https://api.github.com/users/colinator27/events{/privacy}","received_events_url":"https://api.github.com/users/colinator27/received_events","type":"User","site_admin":false},"created_at":"2018-09-16T22:27:26Z","updated_at":"2018-09-16T22:27:26Z","author_association":"NONE","body":"So I did some more reading of decompiled and obfuscated compiler code to attempt to figure out what EMBI is...\r\n\r\nIt appears to stand for \"embedded images\", and has something to do with some strange texture page (the texture page is created at the beginning of compilation, and seems to be empty?). No matter what I did in a test project, I literally could not get EMBI to have any real content.\r\n\r\nNevertheless, here's what I found based off of the code:\r\n```\r\nEMBI - stands for \"embedded images\"?\r\nCouldn't figure out how to fill the chunk with any data by editing a project and recompiling...\r\n---\r\n<normal FourCC and chunk length found in every chunk>\r\n\r\nInt32 - literally just the number 1, always (unknown)\r\n\r\nArray of some kind:\r\n Int32 - count of items in array\r\n \r\n Each item:\r\n  32-bit string pointer, some kind of texture page identifier?\r\n  32-bit pointer to something relating to a texture page entry?\r\n```\r\n\r\nIt doesn't seem to be commonly used if at all... I saw some strings that said things like \"front\", \"back\", and \"res\" but I still have no idea. My initial guess was that it could contain splash images, but that exports as a standalone PNG file. Unless it's different on other platforms, or there are other kinds of images I'm neglecting."}}
{"actor":{"display_login":"colinator27"}}