Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Sonstige Fragen zu Delphi (https://www.delphipraxis.net/19-sonstige-fragen-zu-delphi/)
-   -   Delphi Frage zu Speicheradressen... (https://www.delphipraxis.net/85251-frage-zu-speicheradressen.html)

Dash 28. Jan 2007 00:16


Frage zu Speicheradressen...
 
Hi,

also ich beschäftige mich gerade ein wenig mit GTA San Andreas, durch die Manipulation von diversen Speicheradressen konnte ich schon ganz witzige Dinge anstellen. Nur kommt ich mit nen paar Sachen nicht klar.

Um zu gucken welche Adressen sich manipulieren lassen, schaue ich hier:
http://www.gtamodding.com/index.php?...esses_%28SA%29

Mit den normalen Adressen wie "0xA49960" habe ich keine Probleme, allerdings steht da nun jetzt auch was von Blocks, was ich nun gar nicht kapiere.

Beispiele:
Zitat:

0xC7F158 - Start of checkpoint block (the checkpoints that are used in the "illegal street racing" mini-games). Each block is 38 bytes, but theres always only two at a time
Each block contains:
+0 [Byte] = Type of checkpoint
+2 [Byte] = RGBA color value
+4 [Float] = X-axis Position
+8 [Float] = Y-axis Position
+12 [Float] = Z-axis Position
+16 to +24 [All Floats] = Rotation Matrix (direction from this checkpoint to the next)
+32 [Float] = Checkpoint radius
oder weiter unten steht auch was von CPed...

Zitat:

0xB74490 contains a pointer. This pointer:

+0 contains a pointer to the first element in the pool.
+8 [DWord] is the maximum number of elements in the pool.
+12 [DWord] is the current number of elements in the pool.
+32 is the ped pool start.
For each ped in the pool:

In most cases, you can use even the DWord of playeraddress as CPed value.

CPed +0x14 - Pointer to XYZ position structure (and rotation)
DWORD(CPed+0x14) +0x0 to +0x2C is the rotation matrix
DWORD(CPed+0x14) +0x30 = XPos
DWORD(CPed+0x14) +0x34 = YPos
DWORD(CPed+0x14) +0x38 = ZPos
CPed +0x42 (Byte) is the BP/EP/FP/DP (special flags) status of the player as follows:
Add these values, and write the sum into +66
Wie komm ich nun an diese Adressen wie XPos, YPos usw. ran?

Gruß
Dash

3_of_8 28. Jan 2007 00:33

Re: Frage zu Speicheradressen...
 
Na du zählst einfach die angegebenen Offsets dazu:

Zitat:

0xC7F158
...
+0 [Byte] = Type of checkpoint = 0xC7F158+0
+2 [Byte] = RGBA color value = 0xC7F158+2
+4 [Float] = X-axis Position = 0xC7F158+4
+8 [Float] = Y-axis Position = 0xC7F158+8
+12 [Float] = Z-axis Position = 0xC7F158+12
+16 to +24 [All Floats] = Rotation Matrix = 0xC7F158+16..24
+32 [Float] = Checkpoint radius = 0xC7F158+32

Dash 28. Jan 2007 00:36

Re: Frage zu Speicheradressen...
 
Ah danke... das ist ja leicht :stupid:
Werde das morgen bzw. nachher mal probieren, ist schon spät.

Gruß
Dash


Alle Zeitangaben in WEZ +1. Es ist jetzt 08:01 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz