Talk:Saves (GTA SA)

From GTAMods Wiki
Revision as of 19:35, 7 December 2007 by Pdescobar (talk | contribs) (Keep it up!)
Jump to navigation Jump to search

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)

I'd prefer that something like "gap" or "padding" or "unused" was used to inform people of that situation instead of simply leaving those extra bytes out of the description. It's more specific and keeps people from thinking that there is an omission or incorrect type size listed. pdescobar 11:32, 5 Sep 2007 (CDT)
Maybe (align) word would be more convenient there?
0x41  byte        Boolean: is USJ found
0x42  byte[2]     (align)
looking good :) Seemann 03:45, 6 Sep 2007 (CDT)
(Align) works fine for me. :) I also added an explanatory note in the beginning of the data block section based on your above comment. pdescobar 16:34, 7 Sep 2007 (CDT)

Keep it up!

pdescobar & OrionSR: Good work, guys! I wish I have more free time to add some info. Btw, what about re-formatting of old tables to the style I used in the Block #27 (using templates)? Seemann 09:45, 6 Dec 2007 (UTC)

And thanks to you too. Every time we add something, it seems you come along and fill in the blanks. :) I've considered the table format (Orion asked about that too) but the simple formatting I've been using is easier for me to update and it's also much easier to copy & paste into a code block on a forum since the spacing doesn't change. Maybe once this is a bit more stable and is not being changed so much we can make it pretty with the tables. pdescobar 19:35, 7 Dec 2007 (UTC)