Difference between revisions of "Talk:Saves (GTA SA)"
(Structures alignment) |
m (→Structures alignment) |
||
Line 12: | Line 12: | ||
== Structures alignment == | == Structures alignment == | ||
− | Fields of every structure are aligned on 4 (dword), this means if there's a field with size 1 or 2 bytes in the end of structure, there are also additional ''unused'' bytes to align the memory addresses. So, what I'm talking about: the last two bytes in the USJ structure are not unknown, it's just a gap. They are two additional bytes to make the total size of the stucture dividable by 4. We should not add them in the description, as it causes confusion. Thus, the total size of the USJ block is 0x44, the last field there is 0x41 - isFound. 0x42, 0x43 must be removed. It would be better to return "0x44 end". Alignment also could be used in the middle of the structure: 0xC8 byte[4] in the Thread dump, actually it should be "0xC8 byte unknown", "0xC9 byte unknown, and 0xCA, 0xCB is the gap. Btw, the thread structure fully described [[Memory_Addresses_(SA)#Threads|here]]. | + | Fields of every structure are aligned on 4 (dword), this means if there's a field with size 1 or 2 bytes in the end of structure, there are also additional ''unused'' bytes to align the memory addresses. So, what I'm talking about: the last two bytes in the USJ structure are not unknown, it's just a gap. They are two additional bytes to make the total size of the stucture dividable by 4. We should not add them in the description, as it causes confusion. Thus, the total size of the USJ block is 0x44, the last field there is 0x41 - isFound. 0x42, 0x43 must be removed. It would be better to return "0x44 end". Alignment also could be used in the middle of the structure: 0xC8 byte[4] in the Thread dump, actually it should be "0xC8 byte unknown", "0xC9 byte unknown, and 0xCA, 0xCB is the gap. Btw, the thread structure is fully described [[Memory_Addresses_(SA)#Threads|here]]. [[User:Seemann|Seemann]] 03:19, 5 Sep 2007 (CDT) |
Revision as of 08:19, 5 September 2007
Note that the initial version is pretty confusing. Only the first block has been written in any detail and the rest are CyQ's shorthand notes from 2 years ago. It'll get better, at least those parts I have any understanding of will. ;) pdescobar 16:01, 1 Sep 2007 (CDT)
- ah, nice to see you again contributing to the GTA modding! I will add some save format info that I know later. Seemann 13:36, 2 Sep 2007 (CDT)
- Thanks, Seemann; it's good to be back. And thanks for the additions/corrections you've already added. pdescobar 17:34, 3 Sep 2007 (CDT)
Unique Stunt Jump coordinates
How confident are you in the format of the Jump block? Orion_SR has been doing some testing with me and his contention is that the coordinates in that block are not the point/radius format seen in the SCM opcode but instead take the format "startXmin, startYmin, startZmin, startXmax, startYmax, startZmax, landXmin, landYmin, landZmin, landXmax, landYmax, landZmax, camX, camY, camZ" and I think the min/max format looks more likely after some quick examinations. pdescobar 19:00, 4 Sep 2007 (CDT)
- Yes, you're right. Although to be more specific, they aren't the min/max points, it's a diagonal of the cube (there are 2 cubes: start and land); where the first XYZ is a lower cube angle, and the second is a upper angle. If a vehicle coords while in air are in the start cube the UJ begins. If it's landed in the land cube, the UJ is successful, otherwise it's not. Please, write this in the article. Seemann 23:43, 4 Sep 2007 (CDT)
- Updated. Note that I reinserted the word unique so now the block is called "Unique Stunt Jumps" as this is the term most commonly used from my experience. pdescobar 00:46, 5 Sep 2007 (CDT)
Structures alignment
Fields of every structure are aligned on 4 (dword), this means if there's a field with size 1 or 2 bytes in the end of structure, there are also additional unused bytes to align the memory addresses. So, what I'm talking about: the last two bytes in the USJ structure are not unknown, it's just a gap. They are two additional bytes to make the total size of the stucture dividable by 4. We should not add them in the description, as it causes confusion. Thus, the total size of the USJ block is 0x44, the last field there is 0x41 - isFound. 0x42, 0x43 must be removed. It would be better to return "0x44 end". Alignment also could be used in the middle of the structure: 0xC8 byte[4] in the Thread dump, actually it should be "0xC8 byte unknown", "0xC9 byte unknown, and 0xCA, 0xCB is the gap. Btw, the thread structure is fully described here. Seemann 03:19, 5 Sep 2007 (CDT)