Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TGIN chunk (GM2) #70

Closed
LinXP opened this issue Nov 14, 2018 · 16 comments
Closed

TGIN chunk (GM2) #70

LinXP opened this issue Nov 14, 2018 · 16 comments
Labels
data.win format Working on the details of the data.win file other games Working on support of other games than Deltarune/Undertale

Comments

@LinXP
Copy link

LinXP commented Nov 14, 2018

I'll start collecting information on TGIN chunk.
I don't know yet what he is responsible for, but I wrote the structure of this chunk.
Screen: http://i.prntscr.com/XQQBuoxPRim05LpPL2i8LA.png

@colinator27
Copy link
Member

Where have you found this chunk's existence?

@LinXP
Copy link
Author

LinXP commented Nov 14, 2018

@colinator27 https://store.steampowered.com/app/356650/Deaths_Gambit/
Hint: If you take a Steam game and change the SteamAppId parameter to zero, then the game will not require Steam App
ps: I can unload the folder with the game and give a link, if it is not against the rules

@colinator27
Copy link
Member

Are you sure TGIN is an actual chunk, or part of something else inside a chunk? If you haven't checked, just go through each chunk and jump to the next using its length. If TGIN doesn't show up, that means it's part of something else (maybe some other IFF-like data), but if it does then I guess we have a really weird chunk that I found no evidence of anywhere else.

@LinXP
Copy link
Author

LinXP commented Nov 15, 2018

@colinator27 I think it will be better to see the size of the chunks above and below
http://i.prntscr.com/DvbFx_JZQy6qr_x3wwgflQ.png

I found a couple more games:
Rivals of Aether http://i.prntscr.com/wgBxXIM6QC2-rJcFR45lhA.png
Wandersong http://i.prntscr.com/f-Qundz1R6iSTjWOh4XThg.png

And now the most interesting: BytecodeVersion these games 17
http://i.prntscr.com/dLhnyubuS1WdQ7MGwQjgzA.png

deathsgambit397.exe in IDA:
http://i.prntscr.com/_Gb-8uVuTNKPDdX3TeLqsA.png

@krzys-h
Copy link
Member

krzys-h commented Nov 15, 2018

Oh, bytecode 17 I see, that's new. I really wonder how did they get it, the latest GMS2 trial generates 16 afaik.

@colinator27
Copy link
Member

Hm, let me see if I have it in my latest compiler. I was analyzing 2.1.5, but I'll try 2.2 now.

@colinator27
Copy link
Member

colinator27 commented Nov 15, 2018

Hm, I can't seem to find anything about it (yet) in the compiler. How recently were these games built? I recall that there is a special beta branch for GMS2 somewhere...

Yeah, I give it a good chance that it's part of the beta branch. I'll try to pick it apart once the 2.2.1 update comes out of beta.

@krzys-h krzys-h added other games Working on support of other games than Deltarune/Undertale data.win format Working on the details of the data.win file labels Nov 15, 2018
@LinXP
Copy link
Author

LinXP commented Nov 15, 2018

@colinator27
Copy link
Member

Oh wow, that's a neat trick.

@colinator27
Copy link
Member

colinator27 commented Nov 15, 2018

I'll assist in collecting some information as well then. I know a lot of the compiler's structure already.

@colinator27
Copy link
Member

So, I'm getting a good amount of progress. This seems to relate to the new functions they added for texture groups, and I think TGIN stands for "texture group info".

@colinator27
Copy link
Member

Alright, so this has a pretty simple format. Here's what I got, and it works with the research LinXP did as well:

TGIN structure - likely stands for Texture Group Info
Chunk introduced in 2.2.1 with new texture functions
---

Int32 - unknown always 1

PointerList<T> structure (this is almost but not quite a ListChunk because of the 1 above). Each item represents a texture group:
    32-bit string pointer - Name
    32-bit pointer #1
    32-bit pointer #2
    32-bit pointer #3
    32-bit pointer #4
    32-bit pointer #5
    
    #1 leads here:
    SimpleList<int> of texture page IDs the group has
    
    #2 leads here:
    SimpleList<int> of sprite IDs the group has
    
    #3 leads here:
    SimpleList<int> of Spine sprite IDs (normal sprite ID, just this has Spine sprites separated) the group has
    
    #4 leads here:
    SimpleList<int> of font IDs the group has
    
    #5 leads here:
    SimpleList<int> of tileset IDs the group has

@colinator27
Copy link
Member

Also, I just realized the implementation for this should still be a ListChunk, but how EMBI does it. I'll try implementing it really quickly.

@colinator27
Copy link
Member

Support should be added in #76.

@krzys-h
Copy link
Member

krzys-h commented Nov 16, 2018

The "1" is probably just a version number, they realized with new chunks that something like this would be useful

@colinator27
Copy link
Member

Oh, yeah, that makes sense...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
data.win format Working on the details of the data.win file other games Working on support of other games than Deltarune/Undertale
Projects
None yet
Development

No branches or pull requests

3 participants