Difference between revisions of "Talk:Memory Addresses (SA)"
JGuntherS@NL (talk | contribs) |
(Suggestion) |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | + | ==Making something more clear== | |
+ | Under the section "Other Dynamic Memory Addresses (non-static)", there is a sub-section called "This pointer" which refers to the contents of the pointer to a pointer as specified above that sub-section. It's in my opinion that this is unclear and may lead to confusion. I suggest re-formatting the section something like this. | ||
+ | |||
+ | ====General==== | ||
+ | * 0xB6F5F0 - Player pointer (CPed) | ||
+ | * 0xB7CD98 - Player pointer, direct offset to the ped pool start (CPed) | ||
+ | * 0xB74498 - CPeds maximum number (normally 140) | ||
+ | * 0xB74490 - Contains a pointer to a pointer | ||
+ | ** +0 = Contains a pointer to the first element in the pool | ||
+ | ** +4 = Contains a pointer to a byte map indicating which elements are in use | ||
+ | ** +8 = [dword] Is the maximum number of elements in the pool | ||
+ | ** +12 = [dword] Is the current number of elements in the pool | ||
+ | |||
+ | |||
+ | ==Formatting As Lists== | ||
+ | By using description lists, each address can be emboldened on one line with the description indented below it. Using CODE tags for the code makes them stand out better. | ||
+ | |||
+ | When an entry has both code and prose descriptions, the prose one should be coded as a separate description. | ||
+ | |||
+ | Something like this: | ||
+ | ; 0xA49960 | ||
+ | : Start of SCM block. | ||
+ | : <code>0xA49960 + (4 * varnumber)</code> is that particular variable. | ||
+ | ; 0xA49D54 | ||
+ | : Timer for driving/flying missions. | ||
+ | : (<code>[dword]</code> in ms) | ||
+ | ; 0xA51974 | ||
+ | : Timer for boat/bike missions | ||
+ | : (<code>[dword]</code> in ms) | ||
+ | ; 0xA51A3C | ||
+ | : Timer for Bloodring race | ||
+ | ; 0xB6F5F0 | ||
+ | : Player pointer | ||
+ | : (<code>player_ptr</code>) | ||
+ | ; 0xB6F3B8 | ||
+ | : Car pointer | ||
+ | ; 0xB7CE50 | ||
+ | : Money | ||
+ | : <code>[dword]</code> | ||
+ | ; 0xBAA420 | ||
+ | : Wanted Level | ||
+ | |||
+ | However, since this article is so huge I don't really feel like doing it. [[User:Cerbera|Cerbera]] 00:12, 4 Jan 2007 (CST) | ||
+ | |||
+ | |||
+ | ==Code Sample== | ||
+ | I've made something handy, but I don't know where to put is, as it is a quite large piece of code: | ||
typedef DWORD _CMATRIX_TYPE; | typedef DWORD _CMATRIX_TYPE; | ||
Line 11: | Line 57: | ||
CMATRIX_TYPE * pMatrix; // 20 ... 23 | CMATRIX_TYPE * pMatrix; // 20 ... 23 | ||
BYTE _pad2[10]; // 24 ... 33 | BYTE _pad2[10]; // 24 ... 33 | ||
− | + | WORD wVehicleID; // 34 ... 35 | |
− | BYTE _pad3[ | + | BYTE _pad3[30]; // 36 ... 65 |
BYTE bImmunities; // 66 ... 66 | BYTE bImmunities; // 66 ... 66 | ||
BYTE _pad4[1]; // 67 ... 67 | BYTE _pad4[1]; // 67 ... 67 |
Latest revision as of 19:10, 28 January 2011
Making something more clear
Under the section "Other Dynamic Memory Addresses (non-static)", there is a sub-section called "This pointer" which refers to the contents of the pointer to a pointer as specified above that sub-section. It's in my opinion that this is unclear and may lead to confusion. I suggest re-formatting the section something like this.
General
- 0xB6F5F0 - Player pointer (CPed)
- 0xB7CD98 - Player pointer, direct offset to the ped pool start (CPed)
- 0xB74498 - CPeds maximum number (normally 140)
- 0xB74490 - Contains a pointer to a pointer
- +0 = Contains a pointer to the first element in the pool
- +4 = Contains a pointer to a byte map indicating which elements are in use
- +8 = [dword] Is the maximum number of elements in the pool
- +12 = [dword] Is the current number of elements in the pool
Formatting As Lists
By using description lists, each address can be emboldened on one line with the description indented below it. Using CODE tags for the code makes them stand out better.
When an entry has both code and prose descriptions, the prose one should be coded as a separate description.
Something like this:
- 0xA49960
- Start of SCM block.
0xA49960 + (4 * varnumber)
is that particular variable.- 0xA49D54
- Timer for driving/flying missions.
- (
[dword]
in ms) - 0xA51974
- Timer for boat/bike missions
- (
[dword]
in ms) - 0xA51A3C
- Timer for Bloodring race
- 0xB6F5F0
- Player pointer
- (
player_ptr
) - 0xB6F3B8
- Car pointer
- 0xB7CE50
- Money
[dword]
- 0xBAA420
- Wanted Level
However, since this article is so huge I don't really feel like doing it. Cerbera 00:12, 4 Jan 2007 (CST)
Code Sample
I've made something handy, but I don't know where to put is, as it is a quite large piece of code:
typedef DWORD _CMATRIX_TYPE; typedef _CMATRIX_TYPE CMATRIX_TYPE; // This is temporarily typedef DWORD _CPED_TYPE; typedef _CPED_TYPE CPED_TYPE; // This is temporarily typedef struct _CVEHICLE_TYPE { BYTE _pad1[20]; // 0 ... 19 CMATRIX_TYPE * pMatrix; // 20 ... 23 BYTE _pad2[10]; // 24 ... 33 WORD wVehicleID; // 34 ... 35 BYTE _pad3[30]; // 36 ... 65 BYTE bImmunities; // 66 ... 66 BYTE _pad4[1]; // 67 ... 67 float fXSpeed; // 68 ... 71 float fYSpeed; // 72 ... 75 float fZSpeed; // 76 ... 79 float fXSpin; // 80 ... 83 float fYSpin; // 84 ... 87 float fZSpin; // 88 ... 91 BYTE _pad5[48]; // 92 ... 139 float fMass; // 140 ... 143 float fTurnMass; // 144 ... 147 float fGripDivider; // 148 ... 151 float fMTGMultiplier; // 152 ... 155 BYTE _pad6[4]; // 156 ... 159 float fNGripLevel; // 160 ... 163 float fXCoM; // 164 ... 167 float fYCoM; // 168 ... 171 float fZCoM; // 172 ... 175 BYTE _pad7[888]; // 176 ... 1063 BYTE bEngineState; // 1064 ... 1064 BYTE _pad8[11]; // 1065 ... 1075 BYTE bBodyColor; // 1076 ... 1076 BYTE bStripeColor; // 1077 ... 1077 BYTE bBodyColor2; // 1078 ... 1078 BYTE bStripeColor2; // 1079 ... 1079 DWORD dwModData[8]; // 1080 ... 1111 float fWheelSize; // 1112 ... 1115 DWORD dwAlarmTimeLeft;// 1116 ... 1119 CPED_TYPE * pDriver; // 1120 ... 1123 CPED_TYPE * pPassenger[7]; // 1124 ... 1151 BYTE _pad9[20]; // 1152 ... 1171 float fSteerAngles[2];// 1172 ... 1179 float fGasPedal; // 1180 ... 1183 float fBreakPedal; // 1184 ... 1187 BYTE _pad10[28]; // 1188 ... 1215 float fHealth; // 1216 ... 1219 } CVEHICLE_TYPE;
-- JGuntherS@NL 09:10, 21 Dec 2006 (CST)