Difference between revisions of "Function Memory Addresses (SA)"

From GTAMods Wiki
Jump to navigation Jump to search
(Cheats)
(Added GetPlayerPed)
 
(22 intermediate revisions by 5 users not shown)
Line 1: Line 1:
==Audio==
+
{{Cleanup-rewrite}}
; 0x004EF510
+
==Base Functions==
: <code>Audio_36021_Unk</code>
 
  
==Cheats==
+
===Cheats===
 
; 0x00438480
 
; 0x00438480
 
: <code>CCheat::Process</code>
 
: <code>CCheat::Process</code>
Line 75: Line 74:
 
: <code>CCheat::PedsAttackAll</code>
 
: <code>CCheat::PedsAttackAll</code>
  
==Data Pools==
+
===Cutscene===
 +
; 0x004D5ED0
 +
: <code>CScene::End</code>
 +
 
 +
===Data Pools===
 
Data arrays for storing entities.
 
Data arrays for storing entities.
  
; 00550F10
+
; 0x00550F10
 
: <code>CPools::Initialise((void))</code>
 
: <code>CPools::Initialise((void))</code>
; 005519F0
+
; 0x005519F0
 
: <code>CPools::ShutDown((void))</code>
 
: <code>CPools::ShutDown((void))</code>
; 00550570
+
; 0x00550570
 
: <code>CPool_CBuilding_CBuilding::CPool_CBuilding_CBuilding((int))</code>
 
: <code>CPool_CBuilding_CBuilding::CPool_CBuilding_CBuilding((int))</code>
; 005507C0
+
; 0x005507C0
 
: <code>CPool_CColModel_CColModel::CPool_CColModel_CColModel((int))</code>
 
: <code>CPool_CColModel_CColModel::CPool_CColModel_CColModel((int))</code>
; 005506F0
+
; 0x005506F0
 
: <code>CPool_CDummy_CDummyPed::CPool_CDummy_CDummyPed((int))</code>
 
: <code>CPool_CDummy_CDummyPed::CPool_CDummy_CDummyPed((int))</code>
; 00550320
+
; 0x00550320
 
: <code>CPool_CEntryInfoNode_CEntryInfoNode::CPool_CEntryInfoNode_CEntryInfoNode((int))</code>
 
: <code>CPool_CEntryInfoNode_CEntryInfoNode::CPool_CEntryInfoNode_CEntryInfoNode((int))</code>
; 00550960
+
; 0x00550960
 
: <code>CPool_CEvent_CEvent::CPool_CEvent_CEvent((int))</code>
 
: <code>CPool_CEvent_CEvent::CPool_CEvent_CEvent((int))</code>
; 00550BD0
+
; 0x00550BD0
 
: <code>CPool_CNodeRoute_CNodeRoute::CPool_CNodeRoute_CNodeRoute((int))</code>
 
: <code>CPool_CNodeRoute_CNodeRoute::CPool_CNodeRoute_CNodeRoute((int))</code>
; 00550640
+
; 0x00550640
 
: <code>CPool_CObject_CObject::CPool_CObject_CObject((int))</code>
 
: <code>CPool_CObject_CObject::CPool_CObject_CObject((int))</code>
; 00550B00
+
; 0x00550B00
 
: <code>CPool_CPatrolRoute_CPatrolRoute::CPool_CPatrolRoute_CPatrolRoute((int))</code>
 
: <code>CPool_CPatrolRoute_CPatrolRoute::CPool_CPatrolRoute_CPatrolRoute((int))</code>
; 00550E40
+
; 0x00550E40
 
: <code>CPool_CPedAttractors_CPedAttractors::CPool_CPedAttractors_CPedAttractors((int))</code>
 
: <code>CPool_CPedAttractors_CPedAttractors::CPool_CPedAttractors_CPedAttractors((int))</code>
; 00550D70
+
; 0x00550D70
 
: <code>CPool_CPedIntelligence_CPedIntelligence::CPool_CPedIntelligence_CPedIntelligence((int))</code>
 
: <code>CPool_CPedIntelligence_CPedIntelligence::CPool_CPedIntelligence_CPedIntelligence((int))</code>
; 005503F0
+
; 0x005503F0
 
: <code>CPool_CPed_CPlayerPed::CPool_CPed_CPlayerPed((int))</code>
 
: <code>CPool_CPed_CPlayerPed::CPool_CPed_CPlayerPed((int))</code>
; 00550A30
+
; 0x00550A30
 
: <code>CPool_CPointRoute_CPointRoute::CPool_CPointRoute_CPointRoute((int))</code>
 
: <code>CPool_CPointRoute_CPointRoute::CPool_CPointRoute_CPointRoute((int))</code>
; 00550250
+
; 0x00550250
 
: <code>CPool_CPtrNodeDouble_CPtrNodeDouble::CPool_CPtrNodeDouble_CPtrNodeDouble((int))</code>
 
: <code>CPool_CPtrNodeDouble_CPtrNodeDouble::CPool_CPtrNodeDouble_CPtrNodeDouble((int))</code>
; 00550180
+
; 0x00550180
 
: <code>CPool_CPtrNodeSingle_CPtrNodeSingle::CPool_CPtrNodeSingle_CPtrNodeSingle((int))</code>
 
: <code>CPool_CPtrNodeSingle_CPtrNodeSingle::CPool_CPtrNodeSingle_CPtrNodeSingle((int))</code>
; 00550CA0
+
; 0x00550CA0
 
: <code>CPool_CTaskAllocator_CTaskAllocator::CPool_CTaskAllocator_CTaskAllocator((int))</code>
 
: <code>CPool_CTaskAllocator_CTaskAllocator::CPool_CTaskAllocator_CTaskAllocator((int))</code>
; 00550890
+
; 0x00550890
 
: <code>CPool_CTask_CTask::CPool_CTask_CTask((int))</code>
 
: <code>CPool_CTask_CTask::CPool_CTask_CTask((int))</code>
; 005504C0
+
; 0x005504C0
 
: <code>CPool_CVehicle_CAutomobile::CPool_CVehicle_CAutomobile((int))</code>
 
: <code>CPool_CVehicle_CAutomobile::CPool_CVehicle_CAutomobile((int))</code>
  
==File Management==
+
===Directory===
 +
These could make end of img files.
 +
 
 +
; 0x0023C470
 +
: <code>CDirectory::CDirectory((int))</code>
 +
; 0x0023C230
 +
: <code>CDirectory::FindItem((char const *,uint &,uint &))</code>
 +
; 0x0023C340
 +
: <code>CDirectory::ReadDirFile((char const *))</code>
 +
 
 +
===DX9===
 +
; 0x00402C1F
 +
: <code>CDX9::DeviceControlProc</code>
 +
; 0x00807C2B
 +
: <code>CDX9::Direct3DCreate9</code>
 +
; 0x0081805C
 +
: <code>CDX9::DirectDrawCreateEx</code>
 +
; 0x00817523
 +
: <code>CDX9::DirectInput8Create</code>
 +
 
 +
===Emergency===
 +
; 0x00407C50
 +
: <code>CEmergency::CreatePoliceInCity</code>
 +
; 0x0156AB70
 +
: <code>CEmergency::CreateRoadBlocks</code>
 +
 
 +
===Fading===
 +
; 0x0050AC20
 +
: <code>CFade::Fade</code>
 +
 
 +
===File Management===
 
; 0x004AB260
 
; 0x004AB260
 
: <code>CFileMgr::CloseFile((int))</code>
 
: <code>CFileMgr::CloseFile((int))</code>
Line 131: Line 164:
 
: <code>CFileMgr::SetDir((char const *))</code>
 
: <code>CFileMgr::SetDir((char const *))</code>
 
; 0x008232D8
 
; 0x008232D8
: <code>AssignFile</code>
+
: <code>CFileMgr::AssignFile</code>
 
; 0x00538950
 
; 0x00538950
: <code>BlockRead</code>
+
: <code>CFileMgr::BlockRead</code>
 +
; 0x0082318B
 +
: <code>CFileMgr::CloseFile</code>
 +
; 0x00402B8B
 +
: <code>CFileMgr::CreateFile</code>
  
==Scripts==
+
===Markers===
 +
; 0x00587CE0
 +
: <code>CMarker::Disable</code>
 +
 
 +
===Players===
 +
; 0x00409D10
 +
: <code>CPlayer::CreatePlayer_Unk</code>
 +
; 0x0056E210
 +
: <code>CPed::GetPlayerPed(u32 unknown)</code>
 +
 
 +
===Scripts===
 
; 0x00486720
 
; 0x00486720
 
: <code>CTheScripts::ReadObjectNamesFromScript((void))</code>
 
: <code>CTheScripts::ReadObjectNamesFromScript((void))</code>
Line 149: Line 196:
 
: <code>StoreOpcodeResult()</code>
 
: <code>StoreOpcodeResult()</code>
 
: For opcodes that return a value in a variable parameter, copies the return value from '''0xA43C78''' to the variable. A complementary function to <code>GetOpcodeParameters()</code>.
 
: For opcodes that return a value in a variable parameter, copies the return value from '''0xA43C78''' to the variable. A complementary function to <code>GetOpcodeParameters()</code>.
 +
; 0x0156A2A0
 +
: <code>CScript::CreateNewThread</code>
 +
; 0x00465AA0
 +
: <code>CScript::EndThread_Unk</code>
 +
; 0x00402B36
 +
: <code>CScript::ExitThreadProc</code>
 +
 +
===Stats===
 
; 0x0055C180
 
; 0x0055C180
: <code>AddToStat</code>
+
: <code>CStat::AddToStat</code>
 +
; 0x00532010
 +
: <code>CStat::CrimeCommited_Unk</code>
 +
; 0x00559FA0
 +
: <code>CStat::DecreaseStat</code>
 +
; 0x0057DDE0
 +
: <code>CStat::CreateStatsFile</code>
 +
 
 +
===Text===
 +
; 0x008214D0
 +
: <code>CText::CompareStrings</code>
 +
; 0x0076FA94
 +
: <code>CText::CompareText</code>
 +
; 0x0053CF30
 +
: <code>CText::ConvertGXTEntryToCRC32</code>
 +
; 0x0069F7E0
 +
: <code>CText::CopyToStatString</code>
 +
; 0x00718660
 +
: <code>CText::CopyString</code>
 +
; 0x00745E50
 +
: <code>CText::DialogProc</code>
 +
; 0x0071A700
 +
: <code>CText::DrawText</code>
 +
; 0x00719610
 +
: <code>CText::EnableTextDrawCentered</code>
 +
; 0x008220AD
 +
: <code>CText::ExtractDataFromString</code>
  
==Wanted Levels==
+
===Vehicles===
; 0x0056E5D0
+
; 0x0043A0B6
: <code>BustedProc</code>
+
: <code>CVehicle::CreateCar</code>
 +
; 0x006F7550
 +
: <code>CVehicle::CreateTrain</code>
 +
; 0x006F5DC0
 +
: <code>CVehicle::DestroyTrain</code>
  
==UnCategorised==
+
===UnCategorised===
; 004CE090
+
; 0x004CE090
 
: <code>CAnimBlendAssocGroup::GetAnimation((uint))</code>
 
: <code>CAnimBlendAssocGroup::GetAnimation((uint))</code>
; 00735FD0
+
; 0x00735FD0
 
: <code>CBulletInfo::Initialise((void))</code>
 
: <code>CBulletInfo::Initialise((void))</code>
; 00736A40
+
; 0x00736A40
 
: <code>CExplosion::Initialise((void))</code>
 
: <code>CExplosion::Initialise((void))</code>
; 00737B40
+
; 0x00737B40
 
: <code>CProjectileInfo::Initialise((void))</code>
 
: <code>CProjectileInfo::Initialise((void))</code>
; 007170C0
+
; 0x007170C0
 
: <code>CRGBA::CRGBA((uchar,uchar,uchar,uchar))</code>
 
: <code>CRGBA::CRGBA((uchar,uchar,uchar,uchar))</code>
; 00739B60
+
; 0x00739B60
 
: <code>CShotInfo::Initialise((void))</code>
 
: <code>CShotInfo::Initialise((void))</code>
; 0073A300
+
; 0x0073A300
 
: <code>CWeapon::InitialiseWeapons((void))</code>
 
: <code>CWeapon::InitialiseWeapons((void))</code>
; 005BF750
+
; 0x005BF750
 
: <code>CWeaponInfo::Initialise((void))</code>
 
: <code>CWeaponInfo::Initialise((void))</code>
; 0053BC80
+
; 0x0053BC80
 
: <code>LoadGame(char; fileName))</code>
 
: <code>LoadGame(char; fileName))</code>
 
: Initializes all data structures and loads fileName (which is gta.dat).
 
: Initializes all data structures and loads fileName (which is gta.dat).
; 005B9030
+
; 0x005B9030
 
: <code>LoadMapDefinitionFile(char; fileName))</code>
 
: <code>LoadMapDefinitionFile(char; fileName))</code>
 
: Parses and loads dat-files, such as default.dat and gta.dat.
 
: Parses and loads dat-files, such as default.dat and gta.dat.
; 00550F10
+
; 0x00550F10
 
: <code>AllocatePools())</code>
 
: <code>AllocatePools())</code>
 
: Allocates stuff which LimitAdjuster modifies, such as Peds and Buildings.
 
: Allocates stuff which LimitAdjuster modifies, such as Peds and Buildings.
; 0082119A
+
; 0x0082119A
 
: <code>malloc(size_t size)</code>
 
: <code>malloc(size_t size)</code>
; 00748760
+
; 0x00748760
 
: <code>int __stdcall WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,LPSTR lpCmdLine,int nShowCmd)</code>
 
: <code>int __stdcall WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,LPSTR lpCmdLine,int nShowCmd)</code>
; 00747F00
+
; 0x00747F00
 
: <code>int __stdcall WndProc(HWND hWnd,int msg,WPARAM wParam,int lParam)</code>
 
: <code>int __stdcall WndProc(HWND hWnd,int msg,WPARAM wParam,int lParam)</code>
; 007486F0
+
; 0x007486F0
 
: <code>int __cdecl RegisterSAWindow()</code>
 
: <code>int __cdecl RegisterSAWindow()</code>
; 00745560
+
; 0x00745560
 
: <code>HWND __cdecl CreateSAWindow(HINSTANCE hInstance)</code>
 
: <code>HWND __cdecl CreateSAWindow(HINSTANCE hInstance)</code>
; 007476B0
+
; 0x007476B0
 
: <code>void __cdecl PlayMPEG(int nShowCmd, char *filename)</code>
 
: <code>void __cdecl PlayMPEG(int nShowCmd, char *filename)</code>
 
: Used to play intro videos (Logo.mpg and GTAtitles.mpg)
 
: Used to play intro videos (Logo.mpg and GTAtitles.mpg)
 +
; 0x01569F10
 +
: <code>CMission::ClearLocals</code>
 +
; 0x0156EF70
 +
: <code>CMission::ClearRoadBlocks</code>
 +
; 0x00572670
 +
: <code>CMission::ClearZonesInfo</code>
 +
; 0x0040A2A0
 +
: <code>CreateFiremenInCity</code>
 +
; 0x00561B00
 +
: <code>DisableMissionFlag_Unk</code>
 +
; 0x00561AF0
 +
: <code>EnableMissionPack_Unk ( bool enabled )</code>
  
 +
== External Link ==
 +
* {{GTAF|194199|GTASA Memory Addresses}}
 +
* [http://sannybuilder.com/dev/research/gta_funcs.txt SA EXE 1.0 Functions List] - updated 10 Jan, 2008
 +
{{SA-navi}}
 
[[Category:Memory Addresses]]
 
[[Category:Memory Addresses]]

Latest revision as of 12:15, 23 January 2011

40px-Ambox rewrite orange.svg.png This article may need to be rewritten.
Please help improve this article. The discussion page may contain suggestions.

Base Functions

Cheats

0x00438480
CCheat::Process
0x00609F50
CCheat::SetWantedLevel
0x00438E90
CCheat::Add2Stars
0x00438E40
CCheat::AddArmourMoneyHealth
0x00438F20
CCheat::ClearWantedLevel
0x00407851
CCheat::CreateCar
0x0043A510
CCheat::CreateCar408
0x0043A500
CCheat::CreateCar409
0x0043A4A0
CCheat::CreateCar432
0x0043A4F0
CCheat::CreateCar442
0x0043A520
CCheat::CreateCar457
0x0043A4D0
CCheat::CreateCar502
0x0043A4E0
CCheat::CreateCar503
0x0043A4B0
CCheat::CreateCar504
0x0043A4C0
CCheat::CreateCar505
0x0043A660
CCheat::CreateCarDozer
0x0043A550
CCheat::CreateCarHunter
0x0043A560
CCheat::CreateCarQuad
0x0043A680
CCheat::CreateCarMonster
0x0043A670
CCheat::CreateCarStuntPlane
0x0043A570
CCheat::CreateCarTanker
0x00438FC0
CCheat::DecreaseGameSpeed
0x00438F90
CCheat::IncreaseGameSpeed
0x00439C70
CCheat::EveryoneArmed
0x00439600
CCheat::Jetpack
0x004399D0
CCheat::SetSkillsMax
0x00438F50
CCheat::SetWeather0
0x00438F40
CCheat::SetWeather1
0x00438F70
CCheat::SetWeather16
0x00438F60
CCheat::SetWeather4
0x00438F80
CCheat::SetWeather9
0x004385B0
CCheat::WeaponSet1
0x00438890
CCheat::WeaponSet2
0x00438B30
CCheat::WeaponSet3
0x00439B20
CCheat::PedsAttackAll

Cutscene

0x004D5ED0
CScene::End

Data Pools

Data arrays for storing entities.

0x00550F10
CPools::Initialise((void))
0x005519F0
CPools::ShutDown((void))
0x00550570
CPool_CBuilding_CBuilding::CPool_CBuilding_CBuilding((int))
0x005507C0
CPool_CColModel_CColModel::CPool_CColModel_CColModel((int))
0x005506F0
CPool_CDummy_CDummyPed::CPool_CDummy_CDummyPed((int))
0x00550320
CPool_CEntryInfoNode_CEntryInfoNode::CPool_CEntryInfoNode_CEntryInfoNode((int))
0x00550960
CPool_CEvent_CEvent::CPool_CEvent_CEvent((int))
0x00550BD0
CPool_CNodeRoute_CNodeRoute::CPool_CNodeRoute_CNodeRoute((int))
0x00550640
CPool_CObject_CObject::CPool_CObject_CObject((int))
0x00550B00
CPool_CPatrolRoute_CPatrolRoute::CPool_CPatrolRoute_CPatrolRoute((int))
0x00550E40
CPool_CPedAttractors_CPedAttractors::CPool_CPedAttractors_CPedAttractors((int))
0x00550D70
CPool_CPedIntelligence_CPedIntelligence::CPool_CPedIntelligence_CPedIntelligence((int))
0x005503F0
CPool_CPed_CPlayerPed::CPool_CPed_CPlayerPed((int))
0x00550A30
CPool_CPointRoute_CPointRoute::CPool_CPointRoute_CPointRoute((int))
0x00550250
CPool_CPtrNodeDouble_CPtrNodeDouble::CPool_CPtrNodeDouble_CPtrNodeDouble((int))
0x00550180
CPool_CPtrNodeSingle_CPtrNodeSingle::CPool_CPtrNodeSingle_CPtrNodeSingle((int))
0x00550CA0
CPool_CTaskAllocator_CTaskAllocator::CPool_CTaskAllocator_CTaskAllocator((int))
0x00550890
CPool_CTask_CTask::CPool_CTask_CTask((int))
0x005504C0
CPool_CVehicle_CAutomobile::CPool_CVehicle_CAutomobile((int))

Directory

These could make end of img files.

0x0023C470
CDirectory::CDirectory((int))
0x0023C230
CDirectory::FindItem((char const *,uint &,uint &))
0x0023C340
CDirectory::ReadDirFile((char const *))

DX9

0x00402C1F
CDX9::DeviceControlProc
0x00807C2B
CDX9::Direct3DCreate9
0x0081805C
CDX9::DirectDrawCreateEx
0x00817523
CDX9::DirectInput8Create

Emergency

0x00407C50
CEmergency::CreatePoliceInCity
0x0156AB70
CEmergency::CreateRoadBlocks

Fading

0x0050AC20
CFade::Fade

File Management

0x004AB260
CFileMgr::CloseFile((int))
0x005389D0
CFileMgr::CloseFile((int))
0x004AB240
CFileMgr::OpenFile((char const *))
0x00538900
CFileMgr::OpenFile((char const *))
0x00538950
CFileMgr::Read((int,char *,int))
0x005387D0
CFileMgr::SetDir((char const *))
0x008232D8
CFileMgr::AssignFile
0x00538950
CFileMgr::BlockRead
0x0082318B
CFileMgr::CloseFile
0x00402B8B
CFileMgr::CreateFile

Markers

0x00587CE0
CMarker::Disable

Players

0x00409D10
CPlayer::CreatePlayer_Unk
0x0056E210
CPed::GetPlayerPed(u32 unknown)

Scripts

0x00486720
CTheScripts::ReadObjectNamesFromScript((void))
0x00486780
CTheScripts::UpdateObjectIndices((void))
0x00464080
CRunningScript::CollectParameters((uint *,short)) (GetOpcodeParameters)
0x00469F00
CRunningScript_ProcessOneCommand
0x00A43C78
Where the routine above stores opcode parameters values. Max 32 parameters for an opcode it seems. (Although only 16 are ever used.)
0x00464370
StoreOpcodeResult()
For opcodes that return a value in a variable parameter, copies the return value from 0xA43C78 to the variable. A complementary function to GetOpcodeParameters().
0x0156A2A0
CScript::CreateNewThread
0x00465AA0
CScript::EndThread_Unk
0x00402B36
CScript::ExitThreadProc

Stats

0x0055C180
CStat::AddToStat
0x00532010
CStat::CrimeCommited_Unk
0x00559FA0
CStat::DecreaseStat
0x0057DDE0
CStat::CreateStatsFile

Text

0x008214D0
CText::CompareStrings
0x0076FA94
CText::CompareText
0x0053CF30
CText::ConvertGXTEntryToCRC32
0x0069F7E0
CText::CopyToStatString
0x00718660
CText::CopyString
0x00745E50
CText::DialogProc
0x0071A700
CText::DrawText
0x00719610
CText::EnableTextDrawCentered
0x008220AD
CText::ExtractDataFromString

Vehicles

0x0043A0B6
CVehicle::CreateCar
0x006F7550
CVehicle::CreateTrain
0x006F5DC0
CVehicle::DestroyTrain

UnCategorised

0x004CE090
CAnimBlendAssocGroup::GetAnimation((uint))
0x00735FD0
CBulletInfo::Initialise((void))
0x00736A40
CExplosion::Initialise((void))
0x00737B40
CProjectileInfo::Initialise((void))
0x007170C0
CRGBA::CRGBA((uchar,uchar,uchar,uchar))
0x00739B60
CShotInfo::Initialise((void))
0x0073A300
CWeapon::InitialiseWeapons((void))
0x005BF750
CWeaponInfo::Initialise((void))
0x0053BC80
LoadGame(char; fileName))
Initializes all data structures and loads fileName (which is gta.dat).
0x005B9030
LoadMapDefinitionFile(char; fileName))
Parses and loads dat-files, such as default.dat and gta.dat.
0x00550F10
AllocatePools())
Allocates stuff which LimitAdjuster modifies, such as Peds and Buildings.
0x0082119A
malloc(size_t size)
0x00748760
int __stdcall WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,LPSTR lpCmdLine,int nShowCmd)
0x00747F00
int __stdcall WndProc(HWND hWnd,int msg,WPARAM wParam,int lParam)
0x007486F0
int __cdecl RegisterSAWindow()
0x00745560
HWND __cdecl CreateSAWindow(HINSTANCE hInstance)
0x007476B0
void __cdecl PlayMPEG(int nShowCmd, char *filename)
Used to play intro videos (Logo.mpg and GTAtitles.mpg)
0x01569F10
CMission::ClearLocals
0x0156EF70
CMission::ClearRoadBlocks
0x00572670
CMission::ClearZonesInfo
0x0040A2A0
CreateFiremenInCity
0x00561B00
DisableMissionFlag_Unk
0x00561AF0
EnableMissionPack_Unk ( bool enabled )

External Link