Gta3.exe — различия между версиями

Материал из GTAModding.ru
Перейти к: навигация, поиск
м (CAntenna)
(CRegisteredMotionBlurStreak)
Строка 760: Строка 760:
 
  1  Тень (чёрный цвет) 2            2
 
  1  Тень (чёрный цвет) 2            2
 
  2  Свет (цвет RGB)    1            4
 
  2  Свет (цвет RGB)    1            4
 +
 +
===CRegisteredMotionBlurStreak===
 +
{|
 +
|Начало
 +
|0x880A00
 +
|-
 +
|Кол-во
 +
|4
 +
|-
 +
|Размер
 +
|0x54
 +
|}
 +
0x0000 | DWORD  id
 +
0x0004 | BYTE    red
 +
0x0005 | BYTE    green
 +
0x0006 | BYTE    blue
 +
0x0007 | BYTE    _pad1
 +
0x0008 | CVector partPointsA[3]
 +
0x002C | CVector partPointsB[3]
 +
0x0050 | BYTE    isPartNeedsToBeRendered[3]
 +
0x0053 | BYTE    _pad2
  
 
{{GTA3-navi}}
 
{{GTA3-navi}}
 
[[Категория:GTA 3]]
 
[[Категория:GTA 3]]

Версия 22:06, 26 июля 2012

Исполняющий файл игры, содержит игровой движок - RenderWare и много различных игровых ресурсов, некоторые из них будут описаны ниже.

Содержание

Исходные коды

Кроме собственно RenderWare, GTA3.exe содержит специализированную часть кода, написанного программистами Rockstar Games специально под нужды GTA и встречающийся исключительно в играх серии GTA3 и GTA4. Условно код носит название "GTA CORE" или "GTAGAME engine".

Основные компоненты GTA CORE

  • EventList.cpp - содержит список игровых событий
  • Crime.cpp - обеспечивает работу криминальных типов
  • Ped.cpp - формирует пути пешеходов на карте из nodes
  • PedAI.cpp - задаёт пешеходам определённое поведение
  • Pedtype.cpp - обработчик PED.DAT
  • Population.cpp - обработчик PEDGRP.DAT
  • Explosion.cpp
  • ProjectileInfo.cpp
  • Weapon.cpp - отвечает за оружие в игре
  • WeaponInfo.cpp - обработчик WEAPON.DAT

GTA3Portable:

  • binarytree.cpp
  • POLRADIO.CPP
  • EmergencyPed.cpp
  • CopPed.cpp
  • combostate.cpp
  • glass.cpp
  • automobile.cpp
  • world.cpp
  • tinyxmlparser.cpp
  • fluff.cpp
  • player.cpp
  • pathrental.cpp
  • cranes.cpp
  • pedpath.cpp
  • civilianped.cpp
  • tinystr.cpp
  • localareaknowledge.cpp
  • trafficlights.cpp
  • physical.cpp
  • renderer.cpp
  • tinyxml.cpp
  • shadows.cpp
  • dummy.cpp
  • objectivefunctions.cpp
  • entity.cpp
  • streamingnew.cpp
  • vehicle.cpp
  • garage.cpp
  • fecontrollerelement.cpp
  • carctrl.cpp

GTA3Mobile:

  • cdstream-tegra.cpp
  • font.cpp
  • sprite2d.cpp
  • Touchscreen.cpp
  • samp-oal.cpp
  • MobileFrontend.cpp
  • RadarMap.cpp
  • ImplArrays.cpp
  • IOSFile.cpp
  • IOSGamepad.cpp
  • EmuCustomShader.cpp

Лимиты

Как и в любой другой игре, в GTA3 тоже существуют так называемые игровые лимиты.

Лимит - определённое ограничение, наложенное разработчиками игры на конкретные виды игровых ресурсов - модели, текстуры, автотранспорт и т.д. Выражены в числовом виде.

Отредактировать лимиты можно любым HEX-редактором, отрыв в нём gta.exe или их можно изменять непосредственно в игровой памяти посредством написания asi-плагинов или через использование CLEO-скриптов, но это намного сложнее.

Основные лимиты gta3 по способу хранения можно разделить на одно-байтовые и четырёх-байтовые. Четырёх-байтовые в свою очередь делятся на множество подвидов, с ними можно будет ознакомиться ниже.

Классификация Хероманта

Данная классификация нестандартна, является результатом любительского подхода к изучению содержимого gta3.exe. Была получена без использования различных декомпиляторов, поэтому что-то ней может не совпадать с тем, что есть на самом деле.

Первая категория "Основные Лимиты"

Делятся на два типа по их идентификаторам в exe. Первый тип - "740989C16A", всегда занимает 1 байт, второй "740C89C168" - 4 байта.

Все адреса основных лимитов и их названия представлены ниже (база частично взята из GTA3 Limit Adjuster 1.0), в скобочках указаны их стандартные значения.

  • 00460C - Directory (512)
  • 0069D3 - Directory (128)
  • 037945 - CopPed (0)
  • 0A186F (0A177F) - PtrNode (30000) - Определяет допустимые объёмы коллизий на игровой карте
  • 0A188C (0A179C) - EntryInfoNode (5400)
  • 0A18A9 (0A17B9) - Peds (140)
  • 0A18C6 (0A17D6) - Vehicle (110)
  • 0A18E0 (0A17F0) - Buildings (5500)
  • 0A18FD (0A180D) - Treadable (1214)
  • 0A191A (0A182A) - Object (450)
  • 0A1937 (0A1847) - Dummy (2802)
  • 0A1954 (0A1864) - AudioScriptObj (256)
  • 0F54E2 (0F5432) - EmergencyPed (16)
  • OF556E (0F54BE) - EmergencyPed (17)
  • 127698 (127458) - TxdDef (850)
  • 15B6B8 (15B588) - ProjectileInfo (170)
  • 15B6DC (15B5AC) - ProjectileInfo (174)
  • 15B700 (15B5D0) - ProjectileInfo (179)

Вторая категория "Пути"

Содержит строковые значения, ссылающиеся на основные игровые ресурсы. Выложены самые интересные, являющиеся полезными для моддинга GTA3.

  • 1FD6B0 (1FD498) - fonts.txd
  • 1FDB2C (1FD914) - hud.txd
  • 1F34B0 (1F33A8) - menu.txd
  • 217C80 (217440) - txd.dir
  • 217C50 (217410) - txd.img
  • 1FFA0C (1FF7F4) - carcols.dat
  • 1F4EEC (1F4DDC) - default.dat
  • 1F57C4 (1F55AC) - gta3.dat
  • 2013D4 (2010B4) - handling.cfg
  • 1EE79C - main.scm
  • 2033FC (202CC4) - weapon.dat
  • 2035BD (202E85) - HEAD RADIO
  • 2034F5 (202DBD) - CLASSIC (DOUBLE CLEFF FM) RADIO
  • 20350E (202DD6) - KJAH RADIO
  • 203527 (202DEF) - RISE FM
  • 203540 (202E08) - LIPS 106
  • 203559 (202E21) - GAME FM
  • 203572 (202E3A) - MSX FM
  • 20358B (202E53) - FLASHBACK 95.6
  • 2035A4 (202E6C) - CHAT
  • 20F49D (20ED5D) - GTA3 USER FILES

Третья категория ""

Консоль дебаггера GTA CORE

Для тестирования GTA3 разработчиками использовалась консоль. В финальной версии она полностью заблокирована (оставили только кастратную возможность ввода чит-кодов без интерфейса командной строки). Текстуры консоли разработчиками были оставлены в frontend.txd и menu.txd.

Сообщения деббагера со строковыми значениями

Associated anim %s with model %s.

%s.IFP.

%s.DAT.

Start preload audio %s.

End preload audio %s.

cdvd_stream.%s: failed to create sync semaphore.

%s: failed to create stream semaphore.

%s: failed to create streaming thread.

Using no buffered loading for streaming.

%s: read info %p.

Using async loading for streaming.

Using sync loading for streaming.

Signal Sema Error.

Queue is full.

Queue is empty.

Created cdstream thread.

Streaming buffer size is %d sectors.

Memory allocated to Streaming is %dMB.

%s appears more than once in %s.

Txd %s appears more than once in %s.

Requested %d, memory size %dK.

Didn't delete island because it was being rendered.

finish model %s took %d ms.

finish txd %s took %d ms.

Failed to load %s.

failed to load %s because TXD %s is not in memory.

Failed to load %s.txd.

Failed to load %s.dff.

model %s took %d ms.

txd %s took %d ms.

Start load scene.

End load scene.

%d loaded, %d recorded.

%s is loaded.

%s is loading.

%s is recorded.

CREATED EMERGENCY VEHICLE.

PreparePathData.

ILLEGAL BLOCK. MORE THAN 1 INTERNALS AND NOT 2 EXTERNALS (Modelindex:%d).

ILLEGAL BLOCK. NEGATIVE NUMBER OF LANES (Obj:%d MI:%d).

ILLEGAL BLOCK. NO LANES IN NODE (Obj:%d MI:%d).

Done with PreparePathData.

NumNodes:%d Accounted for:%d.

GraphType:%d. FloodFill groups:%d.

Single car node: %f %f %f (%d).

Single ped node: %f %f %f.

ALERT: 2 car nodes have identical coordinates.

Modelindices of objects involved:%d %d.

ModelCoors: %f %f %f / %f %f %f.

ALERT: 2 ped nodes have identical coordinates.

Link from object %d to %d (MIs).

AARON IS TOO CHICKEN TO EAT MEAT!

Several car nodes on one road segment have identical coordinates (%d==%d && %d==%d).

Modelindex of cullprit: %d.

Several ped nodes on one road segment have identical coordinates (%d==%d && %d==%d).

All collectables have been picked up.

Playback out of sync.

FileSize:%d.

Couldn't find a hospital restart zone near the player %f %f %f->%f %f %f.

Couldn't find a police restart zone near the player.

Creating player: %d.

Couldn't find zone - %s.

REMOVE_SOUND - Sound doesn't exist.

RESTART_CRITICAL_MISSION - Player state is not PLAYING.

HAS_CHAR_BEEN_DAMAGED_BY_WEAPON - Character doesn't exist.

HAS_CAR_BEEN_DAMAGED_BY_WEAPON - Vehicle doesn't exist.

Couldn't find zone - %s.

Failed to find building.

CREATE_RANDOM_CAR_FOR_CAR_PARK - Unknown car model %d.

Will try to delete a vehicle where a mission entity should be.

Deleted a ped where a mission entity should be.

Arraymarker %i .

Path zero %i .

Initialising CClock...

CClock ready.

generic.%d:%s txd has been set to generic.

Loading texture dictionary file %s.

Can't find Atomic %s.

Loading model file %s.

Start loading %s.

FAILED.

Finish loading %s.

Loading object types from %s...

Reloading paths from %s...

Reloading object types from %s...

Can't reload %s.

Size of this thing:%d needs increasing.

Creating objects from %s...

Finished loading IPL.

Creating zones from %s...

Loading collision file %s.

colmodel %s can't find a modelinfo.

%s:Collision volume too big.

LOAD frontend.

LOAD sprite.

REMOVE frontend.

REMOVE menu textures.

Couldn't attach world plugin.

Couldn't attach RpSkin plugin.

Couldn't attach RpHAnim plugin.

Couldn't attach node name plugin.

Couldn't attach visibility plugins.

Couldn't attach RpAnimBlend plugin.

Couldn't attach RpMatFX plugin.

Loading the ModelViewer.Into TheGame!!!

Initialising CPad...

CPad ready.

PtrNodes left %d.

EntryInfoNodes left %d.

Peds left %d.

Vehicles left %d.

Buildings left %d.

Treadables left %d.

Objects left %d.

Dummys left %d.

AudioScriptObjects left %d.

Shutdown pool started.

Shutdown pool done.

pools have beem cleared .

Initialising CProfile...

Profile ready.

Intialising CTimeCycle...

TimeCycle ready.

Initialising CTimer...

Performance counter available.

Performance counter not available, using millesecond timer.

CTimer ready.

CopPursuit total messed up: re-setting.

CopPursuit pointer list messed up: re-sorting.

Building list %d,%d not empty.

Dummy list %d,%d not empty.

Building overlap list %d,%d not empty.

Vehicle overlap list %d,%d not empty.

Ped overlap list %d,%d not empty.

Object overlap list %d,%d not empty.

Dummy overlap list %d,%d not empty.

STUCK: Final Step: Player Entity %d Is Stuck.

THERE IS NO MAP BELOW THE FOLLOWING COORS:%f %f %f. (FindGroundZFor3DCoord).

Car ModelIndex (slot:%d) has changed from %d into %d.

Two %s at position %f,%f,%f.

%s is not used.

Map zone %s contains %s.

Overlapping zones %s and %s.

x = %.3f y = %.3f z= %.3f.

CObjectData: Cannot find object %s.

Error: No particle objects available!

Initialising CPed...

CPed ready.


THIS SHOULDN@T HAPPEN TOO OFTEN.

Initialising CPedType...

Loading ped data...

CPedType ready.

Shutting down CPedType...

CPedType shut down.

Initialising CPedStats...

Loading pedstats data...

CPedStats ready.

Shutting down CPedStats...

CPedStats shut down.

Initialising CPopulation...

CPopulation ready.

Shutting down CPopulation...

CPopulation shut down.

                                • NEED MORE SPACE FOR MOVING OBJECTS (FLUFF.H).

Available video memory %d.

Failed to allocate memory while creating template MLO.

Size of this thing:%d needs increasing.

Failed to load TXD.

CarNode missing: %d %d.

Trying to damage component %d of %s.

SirenOrAlarm toggled to %d.

CCarGenerator::DoInternalProcessing - can't find ground z for new car x = %f y = %f .

CPlane::CreateIncomingCesna(void).

CPlane::CreateDropOffCesna(void).

%d, max v = %3.2f, up at = %3.2f, down at = %3.2f.

Done Initing waterlevels.

Initialising CBulletInfo...

CBulletInfo ready.

Shutting down CBulletInfo...

CBulletInfo shut down.

Initialising CExplosion...

CExplosion ready.

Shutting down CExplosion...

CExplosion shut down.

Initialising CProjectileInfo...

CProjectileInfo ready.

Shutting down CProjectileInfo...

CProjectileInfo shut down.

Initialising CShotInfo...

CShotInfo ready.

Shutting down CShotInfo...

CShotInfo shut down.

Initialising CWeaponInfo...

Loading weapon data...

CWeaponInfo ready.

Shutting down CWeaponInfo...

CWeaponInfo shut down.

MP3 Report File.

Resolving Link.. - shortcut to "%s". - couldn't resolve shortcut.... - OK.

- NOT A VALID MP3.. - not an MP3 or supported MP3 type.
- Filename and path too long - %s - IGNORED).
- is a shortcut to "%s".

TOTAL SUPPORTED MP3s: %d.

EPlane Model Id is %d.

*** UNKNOWN CAR COLOUR %d *** 
*** UNKNOWN CAR MODEL INDEX %d *** 

Couldn't LoadLibrary DDraw.

Couldn't GetProcAddress DirectDrawCreateEx.

Couldn't DirectDrawCreateEx.

Couldn't LoadLibrary D3D8.DLL.

Couldn't LoadLibrary dpnhpast.dll.

Operating System is WinNT.

Operating System is Win2000.

Operating System is WinXP or greater.

Operating System is Win98.

Operating System is Win95.

DirectX version 0x%x.

Physical memory size %d.

Available physical memory %d.

Video memory size %d.

Available video memory %d.

FAILED(hr=0x%x) in (pVW->SetWindowPosition(rect.left, rect.top, rect.right, rect.bottom)).

FAILED(hr=0x%x) in (pVW->put_MessageDrain((OAHWND) PSGLOBAL(window))).

FAILED(hr=0x%x) in CoInitialize(NULL).

FAILED(hr=0x%x) in CoCreateInstance(CLSID_FilterGraph, NULL, CLSCTX_INPROC, IID_IGraphBuilder, (void **)&pGB).

FAILED(hr=0x%x) in pGB->RenderFile(&wFileName[0], NULL).

FAILED(hr=0x%x) in pGB->QueryInterface(IID_IMediaControl, (void **)&pMC).

FAILED(hr=0x%x) in pGB->QueryInterface(IID_IMediaEventEx, (void **)&pME).

FAILED(hr=0x%x) in pGB->QueryInterface(IID_IMediaSeeking, (void **)&pMS).

FAILED(hr=0x%x) in pGB->QueryInterface(IID_IVideoWindow, (void **)&pVW).

FAILED(hr=0x%x) in pVW->put_Owner((OAHWND) PSGLOBAL(window)).

FAILED(hr=0x%x) in pVW->put_WindowStyle(WS_CHILD | WS_CLIPSIBLINGS | WS_CLIPCHILDREN).

FAILED(hr=0x%x) in pME->SetNotifyWindow((OAHWND)PSGLOBAL(window), WM_GRAPHNOTIFY, 0).

FAILED(hr=0x%x) in pMC->Run().

Start preload end of game audio.

End preload end of game audio.

Loading Scripts .

Loading PedPool .

Loading Garages .

Loading Vehicles .

Loading Objects .

Loading Paths .

Loading Cranes .

Loading Pickups .

Loading Phoneinfo .

Loading Restart .

Loading Radar Blips .

Loading Zones .

Loading Gang Data .

Loading Car Generators .

Loading Particles .

Loading AudioScript Objects .

Loading Player Info .

Loading Stats .

Loading Streaming Stuff .

Loading PedType Stuff .

Game sucessfully loaded .

ret: %d, %s.

Couldn't open replay.rep for reading

Palette Size %d.

size_ = %d, max_size = %d.

    • ERROR** Block size suspiciously large %d.

SubBlock %d at %p.

    • ERROR** SubBlock failed to merge with previous.
    • ERROR** SubBlock size suspiciously large %d.

size_ = %d, bp_ = %p.

.-------------------------.

Nothing to report.

Block %d at %p.

Assertion (%s) failed in "%s" on line %d.

Unhandled exception: %08x.

At address:  %08x.

Классы и структуры

CVector

0x0000 | float x
0x0004 | float y
0x0008 | float z

CAntenna

Начало 0x664680
Кол-во 8
Размер 0x9C
0x0000 | BYTE    isExist
0x0001 | BYTE    isUpdated
0x0002 | BYTE    _pad[2]
0x0004 | DWORD   id
0x0008 | float   length     // Длина, для RcBandit равна 1.0
0x000С | CVector pointsA[6]
0x0054 | CVector pointsB[6]

CPointlight

Начало 0x7096D0
Кол-во 32
Размер 0x2C
0x0000 | CVector pos                  // Позиция
0x000C | CVector direction            // Направление
0x0018 | float   radius               // Радиус
0x001C | float   red                  // 0.0 - 1.0
0x0020 | float   green                // 0.0 - 1.0
0x0024 | float   blue                 // 0.0 - 1.0
0x0028 | BYTE    type                 // Тип источника света
0x0029 | BYTE    fogType              // Эффект с использованием текстуры pointlight
0x002A | BYTE    generateExtraShadows // Включить создание дополнительных теней для автомобиля игрока
0x002B | BYTE    _pad

CRegisteredShadow

Начало 0x779058
Кол-во 48
Размер 0x30
0x0000 | CVector   position
0x000C | float     rotationX1  // Эти параметры определяют разворот и размер
0x0010 | float     rotationY1
0x0014 | float     rotationX2
0x0018 | float     rotationY2
0x001C | float     zDistance   // Максимальное расстояние между позицией тени и поверхностью, на которую падает тень
0x0020 | float     scale       // Масштабирование относительно одного из углов
0x0024 | WORD      intensity
0x0026 | BYTE      type
0x0027 | BYTE      red
0x0028 | BYTE      green
0x0029 | BYTE      blue
0x002A | WORD      flags
0x002C | RwTexture *texture

Типы теней (type)

ID Описание           Source-Blend Dest-Blend
0                     5            6
1  Тень (чёрный цвет) 2            2
2  Свет (цвет RGB)    1            4

CRegisteredMotionBlurStreak

Начало 0x880A00
Кол-во 4
Размер 0x54
0x0000 | DWORD   id
0x0004 | BYTE    red
0x0005 | BYTE    green
0x0006 | BYTE    blue
0x0007 | BYTE    _pad1
0x0008 | CVector partPointsA[3]
0x002C | CVector partPointsB[3]
0x0050 | BYTE    isPartNeedsToBeRendered[3]
0x0053 | BYTE    _pad2
п · о · р
GTA III Grand Theft Auto III
Форматы файлов.b.a3d.anm.col.cfg.dff.dat.gxt.ide.ifp.img/.dir.ipl.raw/.sdt.rep.sc.scm.set.txd.zon
Документацияcarcols.datCHASE.DATCULLZONE.DATcuts.imgdefault.datfistfite.datflight.datgta3.exegta3.dat
gta3.imggta3.zonhandling.cfgmain.scmmap.datmap.zonobject.datparticle.cfgped.datpedgrp.dat
pedstats.datsfx.rawsurface.datTimeCyc.DATtracks.dattrain.datwater.datwaterpro.datweapon.dat
ИнструментыCLEOClump ViewerCol-IO‎Collision File Editor IIData toolDFF Viewerdffxbox2pcG-ToolsGTA Garage Mod Manager
GXT EditorGTA3 Limit AdjusterGTA3 Mission BuilderGTA3 PatcherIMG ToolKam's Max ScriptsMap Editor
Mod GeneratorMod InstallerMoo MapperPS2 TXD ModPS2 TXD ViewerResourse HackerRotation Calculator
RW AnalyzeViceTXDWater EditorSanny BuilderTXD ToolTXD WorkshopYAIEZModeler
Туториалыраздел в разработке
Классические МодыGPS RadarBye-Bye BikiniUltimate Stunt ParkThe SphereMiss LibertyIllandoIntercity HighwayShoreside Bridge
Rockstar HeightsLighthouse BridgeBlade FunparkOrbital CityLakeside IslandLiberty PenitentiaryJEM Island
Illando HelixCliff Climbing Mountain
Глобальные МодыReal GTA3Twenty TenSnow CityFrosted WinterUltimateBeta modX-box modBad BusinessGTA3 HDUltra mod
OpenTunnelsBack to the Future
МультиплеерMulti Theft AutoLiberty Unleashed
Исходники4x48ballambulanceasukaasusbcameracar_gencatcopcardebugdemodiablofiretruckfrankgates
genstufhealthhjhoodimportintrojoeykenjiloveluigimayhemmeatpickupsrampagerayrcswitch
taxitoniusjwantedyard