|
 |
|
|
|
|
|
GTA Modification Forums
Documenting GTA-SA memory adresses hard coded gets uncovered here
 |
|
 |
| |
Swoorup  |
Posted: Wednesday, May 2 2012, 16:08
|
innovator

Group: Members
Joined: Oct 28, 2008


|
| QUOTE | 0x4515D0 - void __thiscall CPathFind__findShortestRouteNodes(BYTE bType, float fOriginX, float fOriginY, float fOriginZ, DWORD dwFirstNode, float fDestX, float fDestY, float fDestZ, DWORD *pNodeList[], short *pSteps, short sMaxSteps, float *pDistance, float fMinRadius, DWORD dwLastNode, float fMaxRadius, bool bFollowPath, WORD wFlag, bool bUnk, bool bUnk)
bType - Route type 0 = vehicle 1 = pedestrian pNodeList - An array containing all route nodes found between the start and destination points.
|
About the pNodeList, is it stored seperately for each ped/ vehicle entities by the game?
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
Wesser  |
Posted: Thursday, May 3 2012, 10:17
|
The complexity simplifier, the efficiency optimizer

Group: Members
Joined: Aug 19, 2006



|
What do you mean? Something like this? CVehicle + 0x394 - [dword] Starting route node index (dwFirstNode) CVehicle + 0x3DB - [dword] Traffic flag ((dwTrafficFlag >> 6) & 1 = bFollowPath) CVehicle + 0x3EC - [float] Destination X (fDestX) CVehicle + 0x3F0 - [float] Destination Y (fDestY) CVehicle + 0x3F4 - [float] Destination Z (fDestZ) CVehicle + 0x3F8 - [dword] Array of the last 8 route nodes (dwNodeList[8]) CVehicle + 0x418 - [short] Amount of remaining route nodes (sSteps) Ped's related addresses are stored somewhere in a task pointer where I don't want to look through right now.
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
JoeBullet  |
Posted: Saturday, May 5 2012, 11:35
|
Player Hater

Group: Members
Joined: Dec 4, 2011

|
00000000 CRope struc ; (sizeof=0x328) 00000000 m_vecRopeSegments RwV3D 31 dup(?) 00000174 m_vecRopeStartPos RwV3D ? 00000180 m_vecRopeSegmentsReleased RwV3D 31 dup(?) 000002F4 m_pad1 dd ? 000002F8 m_pad2 dd ? 000002FC m_pad3 dd ? 00000300 m_pRopeEntity dd ? ; offset 00000304 m_pad4 dd ? 00000308 m_fMass dd ? 0000030C m_uiRopeTotalLength dd ? 00000310 pRopeHolder dd ? ; offset 00000314 m_pRopeAttacherObject dd ? ; offset 00000318 m_pAttachedEntity dd ? ; offset 0000031C m_uiRopeSegmentLength dd ? 00000320 m_uiHoldEntityExpireTime dd ? 00000324 m_uiSegmentCount db ? 00000325 m_ucRopeType db ? 00000326 m_ucFlags1 db ? 00000327 m_ucFlags2 db ? 00000328 CRope ends
.data:00B768B8 pRopePool CRope 8 dup(<?>)
0x555DC0 static CRope::ResetAll() 0x555F80 CRope::IsEntityAttachedToCrane(CEntity *pEntity) 0x555FB0 CRope::IsRopeOwnedByCrane() 0x556000 CRope::FindByRopeEntity(CEntity *pRopeEntity) 0x556030 CRope::ReleaseRope() 0x556070 CRope::CreateRopeAttacherObject() 0x556780 CRope::~CRope() 0x556800 CRope::Draw() 0x5569C0 CRope::AttachEntity(CEntity *pEntityToAttach) 0x556AE0 static CRope::DrawAll() 0x556B10 static CRope::DestroyAll() 0x556B40 static CRope * CRope::Create(CEntity *pRopeEntity, char ucRopeType, float startPosX, float startPosY, float startPosZ, bool bExpires, char ucSegmentCount, char ucFlags, CEntity *pRopeHolder, int uiExpireTime) 0x557530 CRope::Process() 0x558D10 CRope::CreateSwatRope(CVector *pPos) 0x558D70 static CRope::ProcessAll() 0x5561B0 CRope::Adjust(float startPosX, float startPosY, float startPosZ, int uiUnknown, CVector *pOutVec)
It needs to be verified, though.
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
JoeBullet  |
|
Player Hater

Group: Members
Joined: Dec 4, 2011

|
Great research! Though, it seems that your obj_c40350 struct is more like this: | CODE | 0000000 CShadowManager struc; (sizeof=0x54) 00000000 bInitialized db ? 00000001 field_1 db ? 00000002 field_2 db ? 00000003 field_3 db ? 00000004 ppShadowData dd 16 dup(?) ; offset 00000044 pCamera1 dd ? 00000048 pTexture1 dd ? 0000004C pCamera2 dd ? 00000050 pTexture2 dd ? 00000054 CShadowManager ends
|
I call it CShadowManager. 0x7067C0 CShadowManager::CShadowManager() 0x705B30 CShadowManager::DeleteShadowData(CShadowData* pShadowData) 0x706460 CShadowData::Init(bool bIsBlurred, char ucUnk, bool bUnk) CShadowData | CODE | 00000000 CShadowData struc; (sizeof=0x4C) 00000000 pParent dd ? ; CPhysical* 00000004 field_4 db ? 00000005 ucIntensity db ? 00000006 field_6 db ? 00000007 field_7 db ? 00000008 pCamera dd ? ; offset 0000000C pTexture dd ? ; offset 00000010 bIsBlurred db ? 00000011 field_11 db ? 00000012 field_12 db ? 00000013 field_13 db ? 00000014 pCameraBlurred dd ? 00000018 pTextureBlurred dd ? ; offset 0000001C field_1C dd ? 00000020 field_20 db ? 00000021 field_21 db ? 00000022 field_22 db ? 00000023 field_23 db ? 00000024 ObjectType dd ? 00000028 pLight dd ? ; offset 0000002C boundingSphere RwSphere ? 0000003C vecSunPosNormalized RwV3D ? 00000048 field_48 dd ? 0000004C CShadowData ends
|
CPhysical + 0x134: CShadowData *pShadowData Note: It seems that m_pRwObject is RpAtomic* rather then RpClump*. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | CODE | 00000000 CGlass struc; (sizeof=0x70) 00000000 matrix CMatrix ? 00000048 field_48 dd ? 0000004C field_4C dd ? 00000050 field_50 dd ? 00000054 field_54 RwV3D ? 00000060 time dd ? 00000064 field_64 dd ? 00000068 field_68 dd ? 0000006C field_6C db ? 0000006D field_6D db ? 0000006E field_6E db ? 0000006F field_6F db ? 00000070 CGlass ends
|
| CODE | .data:00C71BF8 aGlassPanes CGlass 2Dh dup(<?>)
|
| CODE | 0x854ee0 static CGlass::global_ctor() 0x856ba0 static CGlass::global_dtor() 0x71a8b0 CGlass::CGlass() 0x71a8c0 CGlass::~CGlass() 0x71a8d0 CGlass::Init() 0x71aa10 CGlass::Update() 0x71b0d0 static CGlass::UpdateAll() 0x71b100 CGlass::Render_One 0x71b620 CGlass::GeneratePanesForWindow 0x71bc40 CGlass::WindowRespondsToCollision 0x71c0d0 CGlass::WasGlassh*tByBullet 0x71c1a0 CGlass::WindowRespondsToExplosion 0x71ce20 CGlass::Render
|
Misc: 0x6A8C00 CAutomobile::ProcessBuoyancy 0x5E1FA0 CPed::ProcessBuoyancy CEntity revised... | CODE | class CEntitySAInterface { public: CEntitySAInterfaceVTBL * vtbl; // the virtual table CPlaceableSAInterface Placeable; // 4
RpClump * m_pRwObject; // 24 /********** BEGIN CFLAGS **************/ unsigned long bUsesCollision : 1; // does entity use collision unsigned long bCollisionProcessed : 1; // has object been processed by a ProcessEntityCollision function unsigned long bIsStatic : 1; // is entity static unsigned long bHasContacted : 1; // has entity processed some contact forces unsigned long bIsStuck : 1; // is entity stuck unsigned long bIsInSafePosition : 1; // is entity in a collision free safe position unsigned long bWasPostponed : 1; // was entity control processing postponed unsigned long bIsVisible : 1; //is the entity visible unsigned long bIsBIGBuilding : 1; // Set if this entity is a big building unsigned long bRenderDamaged : 1; // use damaged LOD models for objects with applicable damage unsigned long bStreamingDontDelete : 1; // Dont let the streaming remove this unsigned long bRemoveFromWorld : 1; // remove this entity next time it should be processed unsigned long bHash*tWall : 1; // has collided with a building (changes subsequent collisions) unsigned long bImBeingRendered : 1; // don't delete me because I'm being rendered unsigned long bDrawLast :1; // draw object last unsigned long bDistanceFade :1; // Fade entity because it is far away unsigned long bDontCastShadowsOn : 1; // Dont cast shadows on this object unsigned long bOffscreen : 1; // offscreen flag. This can only be trusted when it is set to true unsigned long bIsStaticWaitingForCollision : 1; // this is used by script created entities - they are static until the collision is loaded below them unsigned long bDontStream : 1; // tell the streaming not to stream me unsigned long bUnderwater : 1; // this object is underwater change drawing order unsigned long bHasPreRenderEffects : 1; // Object has a prerender effects attached to it unsigned long bIsTempBuilding : 1; // whether or not the building is temporary (i.e. can be created and deleted more than once) unsigned long bDontUpdateHierarchy : 1; // Don't update the aniamtion hierarchy this frame unsigned long bHasRoadsignText : 1; // entity is roadsign and has some 2deffect text stuff to be rendered unsigned long bDisplayedSuperLowLOD : 1; unsigned long bIsProcObject : 1; // set object has been generate by procedural object generator unsigned long bBackfaceCulled : 1; // has backface culling on unsigned long bLightObject : 1; // light object with directional lights unsigned long bUnimportantStream : 1; // set that this object is unimportant, if streaming is having problems unsigned long bTunnel : 1; // Is this model part of a tunnel unsigned long bTunnelTransition : 1; // This model should be rendered from within and outside of the tunnel /********** END CFLAGS **************/
uint8_t m_ucSeedColFlags; uint8_t m_ucSeedVisibleFlags; uint16_t m_nModelIndex;//34 CReferences * m_pReferences; //36 DWORD * m_pLastRenderedLink; // CLink<CEntity*>* m_pLastRenderedLink; +40 uint16_t m_nScanCode; // 44 uint8_t m_iplIndex; // used to define which IPL file object is in +46 uint8_t m_areaCode; // used to define what objects are visible at this point +47 // LOD sh*t CEntitySAInterface * m_pLod; // 48 // num child higher level LODs uint8_t numLodChildren; // 52 // num child higher level LODs that have been rendered int8_t numLodChildrenRendered; // 53
//********* BEGIN CEntityInfo **********// uint8_t nType : 3; // what type is the entity // 54 (2 == Vehicle) uint8_t nStatus : 5; // control status // 54 //********* END CEntityInfo **********//
uint8_t m_align; // 55
float pad1; // 56 uint32_t pad2; // 60 - a kind of frame counter or similar
uint32_t b0x01 : 1; // 64 uint32_t bApplyGravity : 1; uint32_t b0x04 : 1; uint32_t b0x08 : 1; uint32_t b0x10 : 1; uint32_t b0x20 : 1; uint32_t b0x40 : 1; uint32_t b0x80 : 1;
uint32_t b0x100 : 1; // 65 uint32_t bOnSolidSurface : 1; uint32_t b0x400 : 1; uint32_t b0x800 : 1; uint32_t b0x1000 : 1; uint32_t b0x2000 : 1; uint32_t b0x4000 : 1; uint32_t b0x8000 : 1;
uint32_t b0x10000 : 1; // 66 uint32_t b0x20000 : 1; uint32_t bBulletProof : 1; uint32_t bFireProof : 1; uint32_t bCollisionProof : 1; uint32_t bMeeleProof : 1; uint32_t bInvulnerable : 1; uint32_t bExplosionProof : 1;
uint32_t b0x1000000 : 1; // 67 uint32_t b0x2000000 : 1; uint32_t b0x4000000 : 1; uint32_t bTouchingWater : 1; uint32_t bEnableCollision : 1; uint32_t bDestroyed : 1; uint32_t b0x40000000 : 1; uint32_t b0x80000000 : 1; };
|
;;;;;;;;;;;;;;;;;;;;;;;;;;; | CODE | class CBodyPart { public: float pad1; // 0x00 RwV3D pos; // 0x04 RpQuat* pOrientation; // 0x10 uint32_t animID; // 0x14 float pad6; // 0x18 float pad7; // 0x1C float pad8; // 0x20 };
|
| CODE |
00000000 CBodyParts struc; (sizeof=0x48) 00000000 pTorso dd ? 00000004 pHead dd ? 00000008 pLegs dd ? 0000000C pShoes dd ? 00000010 pLowerLeftArm dd ? 00000014 pUpperLeftArm dd ? 00000018 pLowerRightArm dd ? 0000001C pUpperRightArm dd ? ; offset 00000020 pUpperBack dd ? ; offset 00000024 pLeftChest dd ? ; offset 00000028 pRightChest dd ? ; offset 0000002C pStomach dd ? 00000030 pLowerBack dd ? 00000034 pNecklace dd ? 00000038 pWatch dd ? 0000003C pGlasses dd ? 00000040 pHat dd ? 00000044 pSpecialCostume dd ? 00000048 CBodyParts ends
|
Though i think names are bit misleading for things such as pStomach, pWatch etc. CPed+0x488 pBodyParts CBodyParts ? This post has been edited by JoeBullet on Monday, May 14 2012, 07:37
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
DK22Pac  |
|
Assembly!

Group: Members
Joined: Apr 12, 2009


|
Wow, thank for your help, Joe. I'll continue "shadow" researching tommorow. For this time, I updated CRegisteredShadow structure. | CODE | 00000000 CRegisteredShadow struc; (sizeof=0x34) 00000000 pos RwV3D ? 0000000C X1 dd ? ; rotation params 00000010 Y1 dd ? 00000014 X2 dd ? 00000018 Y2 dd ? 0000001C zDistance dd ? 00000020 field_20 dd ? 00000024 texture dd ? ; RwTexture * 00000028 shadowData dd ? ; CShadowData * 0000002C intensity dw ? 0000002E colorType db ? ; 1 - black, 2 - RGB, 3 - inversed RGB 0000002F rChannel db ? 00000030 gChannel db ? 00000031 bChannel db ? 00000032 flags dw ? 00000034 CRegisteredShadow ends |
| CODE | | .data:00C40430 aShadows CRegisteredShadow 30h dup(<?>) |
About bones, I thought that: | CODE | | CBone+0x4 = RwV3D offset |
I have some stuff here: linkPS It is possible to get adress of any bone by some formula, I've released this in some of mine opcodes: | CODE | | 0D30: 0@ = actor $3 bone 4 |
(BoneIDs were documented in getPedBonePosition page at MTA site). This post has been edited by DK22Pac on Sunday, May 13 2012, 22:14
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
JoeBullet  |
|
Player Hater

Group: Members
Joined: Dec 4, 2011

|
| QUOTE (DK22Pac @ Sunday, May 13 2012, 22:05) | Wow, thank for your help, Joe. I'll continue "shadow" researching tommorow. For this time, I updated CRegisteredShadow structure.
| CODE | 00000000 CRegisteredShadow struc; (sizeof=0x34) 00000000 pos RwV3D ? 0000000C X1 dd ? ; rotation params 00000010 Y1 dd ? 00000014 X2 dd ? 00000018 Y2 dd ? 0000001C zDistance dd ? 00000020 field_20 dd ? 00000024 texture dd ? ; RwTexture * 00000028 shadowData dd ? ; CShadowData * 0000002C intensity dw ? 0000002E colorType db ? ; 1 - black, 2 - RGB, 3 - inversed RGB 0000002F rChannel db ? 00000030 gChannel db ? 00000031 bChannel db ? 00000032 flags dw ? 00000034 CRegisteredShadow ends |
| CODE | | .data:00C40430 aShadows CRegisteredShadow 30h dup(<?>) |
About bones, I thought that:
| CODE | | CBone+0x4 = RwV3D offset |
I have some stuff here: link PS It is possible to get adress of any bone by some formula, I've released this in some of mine opcodes:
| CODE | | 0D30: 0@ = actor $3 bone 4 |
(BoneIDs were documented in getPedBonePosition page at MTA site). | You are right about bones. CRegisteredShadow+0x20 is a some kind of Offset according to russian gtamodding wiki page.
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
Deji  |
Posted: Wednesday, Aug 1 2012, 02:17
|
Coding like a Rockstar!

Group: Members
Joined: Dec 24, 2007


|
| QUOTE (MeatSafeMurderer @ Friday, Jul 27 2012, 15:52) | Hi there, I am wondering if any of you know the addresses related to the positioning and color of hud items? I would search but, it appears to be broken | http://gtag.gtagaming.com/forums/index.php?showtopic=265I don't stand by every post there, though. Some things I posted (mostly addresses beginning with 0x8 are't to be fiddled with). It was made quite a long time ago. ----------------------------------------- Some stuff I'm researching... | CODE | 00000000 CConvo struc; (sizeof=0x1C) 00000000 field_0 dd ? 00000004 field_4 dd ? 00000008 pPed dd ? ; offset 0000000C ?unkTime1 dd ? 00000010 ?unkTime2 dd ? 00000014 ?stage dd ? 00000018 field_18 db ? 00000019 bIsWithoutSubtitles db ? 0000001A field_1A db ? 0000001B field_1B db ? 0000001C CConvo ends | This post has been edited by Deji on Wednesday, Aug 1 2012, 02:20
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
paulicabos  |
Posted: Saturday, Aug 4 2012, 11:51
|
Player Hater

Group: Members
Joined: Jul 27, 2012

|
| QUOTE (fastman92 @ Saturday, Aug 4 2012, 11:35) | C++, but it's exported from IDB database. You should download IDB database of gta_sa.exe and see that function yourself Then you can start writing your own function for trainter that will work exactly the same. | https://www.google.com/search?q=DB+database...iw=1163&bih=745I can't find , please give me a link edit: i don't see how that can help.. why is not as easy as the money hack, or gravity or other memory ? This post has been edited by paulicabos on Saturday, Aug 4 2012, 17:44
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
0 Members:
Pages:
(65) « First ... 61 62 [63] 64 65
Track this topic
Receive email notification when a reply has been made to this topic and you are not active on the board.
Subscribe to this forum
Receive email notification when a new topic is posted in this forum and you are not active on the board.
Download / Print this Topic
Download this topic in different formats or view a printer friendly version.
| |
 |
|
 |
|
|
|
|